Lamp spatial position relationship analysis method and system based on clustering algorithm
Through the clustering algorithm-based method, the spatial position relationship between lamps in the intelligent lighting system is analyzed, and the problems of low accuracy and high cost in the existing technology are solved, and efficient and accurate lamp position relationship analysis and intelligent control are achieved.
Patent Information
- Application Number
- CN202411708474.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-11-27
AI Technical Summary
The prior art is difficult to accurately analyze the spatial position relationship between lamps in intelligent lighting systems, resulting in low analysis accuracy and relying on additional sensors or equipment, which is costly.
Using a clustering algorithm method, by obtaining the induction data of lamps, determining the induction feature vectors between each two lamps, clustering and using neural network classification, determining the relative position relationship, and finally identifying and screening adjacent relationships to realize the analysis of the position relationship of lamps without sensors.
The cost of spatial position relationship analysis of lamps is reduced, the accuracy of analysis is improved, and intelligent control of lamps is realized, including intelligent linkage, intelligent positioning and other functions.
Smart Images

Figure CN119202878B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet of Things information processing technology, and in particular to a method and system for analyzing the spatial position relationship of lamps based on a clustering algorithm. Background Art
[0002] In order to achieve the goals of carbon neutrality and carbon peak, all industries are currently carrying out energy-saving renovations in lighting. One of the renovations is energy saving based on intelligent control, and various intelligent controls often require the position relationship between lamps. If not, they can only be entered manually, which is a large workload and accounts for a large proportion of the project implementation cost of intelligent lighting.
[0003] When intelligently mining the positional relationship between lamps, using a single artificial intelligence model to learn is not very adaptable to different scenarios, because the distance between adjacent lamps in different scenarios varies greatly, and the relationship between lamps and the movement paths of people or objects is also different, resulting in low accuracy in the spatial position analysis of lamps. At the same time, using additional sensors or other equipment to measure the distance or position of lamps is also a solution, but it is costly. Summary of the invention
[0004] The purpose of this application is to propose a method and system for analyzing the spatial position relationship of lamps based on a clustering algorithm, so as to reduce the cost of analyzing the spatial position relationship of lamps and improve the accuracy of the analysis of the spatial position relationship of lamps.
[0005] In order to solve the above technical problems, the present application provides a method for analyzing the spatial position relationship of lamps based on a clustering algorithm, comprising:
[0006] Acquire multiple pieces of lamp sensing data within a set time period, wherein the lamp sensing data includes a triggered lamp identification and a triggering time;
[0007] Determine a sensing feature vector between every two lamps based on each piece of lamp sensing data and preset parameters;
[0008] Clustering the sensing feature vectors to obtain a plurality of clusters, and classifying the center point of each cluster using a neural network to determine the relative position relationship between every two lamps;
[0009] Identifying and screening adjacent relationships in the relative position relationship to obtain a target relative position relationship;
[0010] The lamp in the lamp sensing data is controlled and processed according to the relative position relationship of the target.
[0011] In order to solve the above technical problems, the present application provides a lamp spatial position relationship analysis system based on a clustering algorithm, comprising:
[0012] A sensing data acquisition unit, used to acquire a plurality of pieces of lamp sensing data within a set time period, wherein the lamp sensing data includes a triggered lamp identification and a triggering time;
[0013] A characteristic vector determining unit, used for determining a sensing characteristic vector between every two lamps based on each piece of the lamp sensing data and preset parameters;
[0014] A position relationship determination unit, used for clustering the sensing feature vectors to obtain a plurality of clusters, and classifying the center point of each cluster using a neural network to determine the relative position relationship between every two lamps;
[0015] A position relationship screening unit, used for identifying and screening adjacent relationships in the relative position relationship to obtain a target relative position relationship;
[0016] A lamp processing unit is used to control and process the lamp in the lamp sensing data according to the relative position relationship of the target.
[0017] The present invention provides a method and system for analyzing the spatial position relationship of lamps based on a clustering algorithm. The method includes: obtaining multiple lamp sensing data within a set time period, wherein the lamp sensing data includes a triggered lamp identification and a triggering time; determining the sensing feature vector between every two lamps based on each lamp sensing data and preset parameters; clustering the sensing feature vectors to obtain multiple clusters, and using a neural network to classify the center point of each cluster to determine the relative position relationship between every two lamps; identifying and screening the adjacent relationships in the relative position relationship to obtain a target relative position relationship; and controlling and processing the lamps in the lamp sensing data according to the target relative position relationship. The present invention determines the sensing feature vector between every two lamps from the lamp sensing data, clusters the sensing vectors, and uses a neural network to classify based on the center point of the clustered clusters, so as to achieve lamp ranging or positioning without sensors or other equipment, which is conducive to reducing the cost of analyzing the spatial position relationship of lamps and improving the accuracy of analyzing the spatial position relationship of lamps. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 It is a flowchart of the implementation process of the method for analyzing the spatial position relationship of lamps based on the clustering algorithm provided in the embodiment of the present application;
[0020] Figure 2 is a schematic diagram of the position relationship of lamps provided in an embodiment of the present application;
[0021] Figure 3 is a specific implementation flow chart of step S2 provided in an embodiment of the present application;
[0022] Figure 4 is a specific implementation flow chart of step S24 provided in an embodiment of the present application;
[0023] Figure 5 is a specific implementation flow chart of step S25 provided in an embodiment of the present application;
[0024] Figure 6 is a specific implementation flow chart of step S3 provided in an embodiment of the present application;
[0025] Figure 7 is a schematic diagram of a cluster center curve provided in an embodiment of the present application;
[0026] Figure 8 is a specific implementation flow chart of step S4 provided in an embodiment of the present application;
[0027] Fig. 9 is a specific implementation flow chart of step S5 provided in an embodiment of the present application;
[0028] Fig.10 It is a schematic diagram of a lamp spatial position relationship analysis system based on a clustering algorithm provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0030] 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 application. The appearance of the phrase in various locations 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.
[0031] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0032] The present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0033] It should be noted that the lamp spatial position relationship analysis method based on clustering algorithm provided in the embodiment of the present application is generally executed by an Internet of Things platform. Accordingly, the lamp spatial position relationship analysis system based on clustering algorithm is generally configured in the Internet of Things platform.
[0034] The method for analyzing the spatial position relationship of lamps based on a clustering algorithm provided in the present application is used in an intelligent lighting system to achieve distance measurement or positioning of lamps without the need for sensors or other equipment, which is beneficial to reducing the cost of analyzing the spatial position relationship of lamps while improving the accuracy of the analysis of the spatial position relationship of lamps. The lamps can also be controlled intelligently, including intelligent linkage, intelligent positioning, topology generation, group control, automatic numbering and role classification.
[0035] Among them, the intelligent lighting system uses advanced electromagnetic voltage regulation and electronic induction technology to improve the extra 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. Spatial position relationship is the relative relationship between one or more positions in space defined by the business. For example, in a street light system, relative to the road, the lights can be divided into the middle of the intersection, the roadside of the intersection, and the ordinary roadside.
[0036] See also Figure 1 and Figure 2 , Figure 1 A specific implementation of a method for analyzing the spatial position relationship of lamps based on a clustering algorithm is shown. Figure 2 It is a schematic diagram of the position relationship of lamps provided in an embodiment of the present application.
[0037] It should be noted that if there are substantially the same results, the method of the present invention is not limited to Figure 1 The process sequence shown is limited to the following steps:
[0038] S1: Acquire a plurality of lamp sensing data within a set time period, wherein the lamp sensing data includes a triggered lamp identification and a triggering time.
[0039] Specifically, there are sensing terminals such as infrared sensors, 5.8G and 24G human microwave radars that are sensing devices for people, cars or other moving objects. Lighting terminals refer to LED and other types of lamps. 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 presence 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. Once the presence sensing terminal senses moving objects such as people and cars, it will trigger a sensing event, activate the lighting terminal, and report the sensing trigger event to the lighting system. At present, presence sensing terminals have become the standard configuration of green energy-saving lamps, which can turn on the lights when people are around and turn off when people leave. When realizing various functions such as lamp role classification, intelligent positioning, topology generation, group control, automatic numbering, and intelligent linkage, if the spatial position relationship between lamps can be obtained, it will greatly improve the effect and efficiency. Figure 2 The spatial position relationship between lamps is determined mainly based on the moving path of people or objects.
[0040] In an embodiment of the present application, a plurality of lamp sensing data within a set time period in the intelligent lighting system is acquired, wherein each lamp sensing data includes a triggered lamp identification and a triggering time.
[0041] It should be noted that the time period is set according to actual conditions and is not limited here. In a specific embodiment, multiple pieces of lamp sensing data within a five-day period are obtained.
[0042] S2: Determine a sensing feature vector between every two lamps based on each piece of lamp sensing data and preset parameters.
[0043] Specifically, the sensing feature vector between every two lamps is determined using each lamp sensing data and pre-set parameters.
[0044] The preset parameters include a preset start time, end time and time window length. In a specific embodiment, a maximum time Tmax is set, which is twice the time required for the distance between adjacent lamps at the normal moving speed of a person / object, and can be set to 26 seconds. Set a start time Tstart, set to -Tmax. Set an end time Tend, set to Tmax. Set a time window length w, set to 0.2 seconds. For every two lamps, initialize a counting vector for them, the length of which is (Tend-Tstart) / w, and the value is 0.
[0045] See also Figure 3 , Figure 3 A specific implementation of step S2 is shown, which is described in detail as follows:
[0046] S21: extracting the lamp sensing data in sequence, and using the currently extracted lamp sensing data as current sensing data;
[0047] S22: Calculating a current sensing time period based on the trigger time of the current sensing data, the start time, and the end time;
[0048] S23: Acquire the sensing data of the lamps whose triggering time is in the current sensing time period as the sensing data to be calculated;
[0049] S24: Compare the sensing data to be calculated with the lamp identification of the current sensing data to calculate components of the counting vectors of the sensing data to be calculated and the current sensing data.
[0050] Specifically, the sensing data of the lamps are extracted in sequence, and the sensing data of the lamps currently extracted are used as the current sensing data d; then the current sensing time period is calculated based on the trigger time d2, the start time Tstart and the end time Tend of the current sensing data. The start time Tstart plus the sensing time dt is used as the initial value of the current sensing time period, and the end time Tend plus the sensing time dt is used as the end value of the current sensing time period. Then, the sensing data of the lamps whose trigger time d2 is in the current sensing time period is obtained as the sensing data to be calculated d2. Finally, the sensing data to be calculated is compared with the lamp identification of the current sensing data to calculate the components of the counting vectors of the sensing data to be calculated and the current sensing data.
[0051] See also Figure 4 , Figure 4 A specific implementation of step S24 is shown, which is described in detail as follows:
[0052] S241: Compare the sensing data to be calculated with the lamp identification of the current sensing data;
[0053] S242: If the lamp identifiers of the sensing data to be calculated and the current sensing data are not equal, adding one to the kth component of the counting vector of the sensing data to be calculated and the current sensing data, respectively, where k is a non-negative integer;
[0054] S243: After all the sensing data of the lamps are extracted and calculated, the counting vector of each lamp is obtained.
[0055] Specifically, the lamp identification of the sensing data to be calculated is compared with that of the current sensing data. If the lamp identification of the sensing data to be calculated is not equal to that of the current sensing data, the kth component of the counting vector of the sensing data to be calculated and the current sensing data is increased by one, where k is a non-negative integer; if the lamp identification of the sensing data to be calculated is not equal to that of the current sensing data, the component of the counting vector is not increased. When all the sensing data of the lamps are extracted and calculated, the counting vector of each lamp is obtained. Among them, k is the value obtained by rounding off the time difference between the sensing data to be calculated and the current sensing data minus the start time and divided by the length of the time window.
[0056] In a specific embodiment, a piece of lamp sensing data d is taken out in sequence, 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, that is, the lamp identifications of the two lamps are not equal, then the kth component of the counting vector of the two lamps is added by one, where k=(d2t-dt-Tstart) / w, d2t is the sensing time of the sensing data d2 to be calculated, and w is the time window length.
[0057] S25: Determine the sensing feature vector between every two lamps based on the counting vector.
[0058] See also Figure 5 , Figure 5 A specific implementation of step S25 is shown, which is described in detail as follows:
[0059] S251: Calculate the initial feature vector of every two lamps based on each component of the current counting vector and preset weight parameters using a preset formula;
[0060] S252: Calculate the maximum value of all components of the initial characteristic vectors of every two lamps to obtain the maximum value component;
[0061] S253: Calculate the sum of the maximum value component and the preset value to obtain an addition result, and divide any component in the initial feature vector of every two lamps by the addition result to obtain the sensing feature vector of every two lamps.
[0062] Specifically, a preset formula is used to calculate the initial feature vector of every two lamps based on the components of the current count vector and the preset weight parameters. For every two lamps, the i-th component of the feature vector is:
[0063] (W0*C[i]+W1*C[i+1]+W2*C[i+2]+W1*C[i+3]+W0*C[i+4]) / (W0+W1+W2+W1+W0);
[0064] Where i ranges from 0 to (Tend-Tstart) / w-4, W0 / W1 / W2 are three weight parameters, and satisfy W0≤W1≤W2, and W0=3, W1=4, and W2=5 can be set. C[k] represents the kth component of the count vector.
[0065] Calculate the maximum value of all components of the initial characteristic vector of every two lamps to obtain the maximum value component max; then calculate the sum of the maximum value component and the preset value to obtain the addition result, and divide any component in the initial characteristic vector of every two lamps by the addition result to obtain the sensing characteristic vector of every two lamps.
[0066] In a specific embodiment, each component of the initial feature vector is divided by (max+Y), where Y is a constant and can be set to 5.
[0067] S3: clustering the sensing feature vectors to obtain a plurality of clusters, and classifying the center point of each cluster using a neural network to determine the relative position relationship between every two lamps.
[0068] Specifically, the sensing feature vectors are clustered by a clustering algorithm to obtain a plurality of clusters, and then the center point of each cluster is classified using a neural network to determine the relative position relationship between every two lamps.
[0069] In a specific embodiment, 7 to 9 clusters are generated, each cluster is used as a classification, and each cluster has a corresponding center point. The neural network of the embodiment of the present application can be a layer of CNN + a layer of pooling + a layer of fully connected layer + a layer of softmax. This neural network consumes less resources and is suitable for running on edge computing nodes. The neural network can also be a layer of CNN + a layer of pooling + a layer of relu + a layer of CNN + a layer of pooling + a layer of fully connected layer + a layer of softmax. This neural network has a better effect, but consumes more computing resources.
[0070] See also Figure 6 and Figure 7 , Figure 6 A specific implementation of step S3 is shown. Figure 7 Schematic diagram of cluster center curve provided in the embodiment of the present application, as described in detail as follows:
[0071] S31: clustering the sensing feature vectors using a preset clustering algorithm to obtain a plurality of clusters;
[0072] S32: performing feature analysis on the sensing feature vector corresponding to the center point of the cluster by using the neural network, and performing feature classification on the feature analysis result by using a fully connected layer to obtain a classification result;
[0073] S33: performing pooling processing and activation processing on the classification results to obtain the relative position relationship between every two lamps.
[0074] Specifically, a preset clustering algorithm is used to cluster the sensing feature vectors to obtain a plurality of clusters. The preset clustering algorithm may be a K-Means algorithm and a K-Medioids algorithm, etc. In an embodiment of the present application, the neural network adopts a layer of CNN + a layer of pooling + a layer of relu + a layer of CNN + a layer of pooling + a layer of fully connected layer + a layer of softmax. Therefore, in an embodiment of the present application, a feature analysis is performed on the sensing feature vector corresponding to the center point of the cluster through a neural network, and a fully connected layer is used to perform feature classification on the feature analysis results to obtain a classification result. The classification results are pooled and activated to obtain the relative position relationship between every two lamps. The relative position relationship includes a front-to-back relationship, a left-to-right relationship, and no relationship.
[0075] S4: Identify and screen the adjacent relationships in the relative position relationship to obtain the target relative position relationship.
[0076] Specifically, whether every two lamps are in an adjacent relationship is determined according to the preceding and succeeding relationship and the left-right relationship in the relative position relationship, and lamps that are too far away are deleted from the relative position relationship, thereby obtaining a target relative relationship.
[0077] See also Figure 8 , Figure 8 A specific implementation of step S4 is shown, which is described in detail as follows:
[0078] S41: calculating the time distance between the center points of the preceding and succeeding relationships and the left-right relationships, and determining whether every two lamps are in an adjacent relationship according to the time distance, to obtain an adjacent relationship result;
[0079] S42: extracting every two lamps in the preceding-successor relationship and the left-right relationship as lamp pairs to be screened;
[0080] S43: Calculate the distance between the characteristic vector of the pair of lamps to be screened and the distance center to obtain the target distance;
[0081] S44: if the target distance exceeds a preset threshold, the pair of lamps to be screened is screened out from the relative position relationship to obtain a preliminary screening result;
[0082] S45: Generate the target relative position relationship based on the neighbor relationship result and the preliminary screening result.
[0083] Specifically, the subscript of the peak value is calculated for the center points of the preceding and succeeding relationships and the left and right relationships respectively to calculate the time distance, so as to compare the sizes in the same type of relationship according to the time distance. If the time distance exceeds the preset value, the two lamps are determined to be in an adjacent relationship. If the time distance does not exceed the preset value, the two lamps are determined to be in a non-adjacent relationship. Then, the distance between the characteristic vector of the pair of lamps to be screened and the distance center is calculated to obtain the target distance; if the target distance exceeds the preset threshold, the pair of lamps to be screened is screened out from the relative position relationship to obtain a preliminary screening result. The target relative position relationship is generated based on the adjacent relationship result and the preliminary screening result. After obtaining the target relative position relationship, the embodiment of the present application outputs the lamp identification, relative position relationship, characteristic vector and characteristic vector of the center point of the type for every two lamps in a relative position relationship, so as to facilitate the subsequent intelligent post-control of the lamps.
[0084] The preset threshold is set according to the actual situation and is not limited here. In a specific embodiment, when the maximum time Tmax is 26 seconds and the time window length w is 0.2 seconds, the threshold is set to 1.65.
[0085] S5: Control the lamp in the lamp sensing data according to the relative position relationship of the target.
[0086] Specifically, the above steps have obtained the target relative position relationship between every two lamps, and the lamps in the lamp sensing data can be controlled and processed according to the target relative position relationship. The control processing includes intelligent linkage of lamps, intelligent positioning, topology generation, group control, automatic numbering, and role classification.
[0087] See also Fig. 9 , Fig. 9 A specific implementation of step S5 is shown, which is described in detail as follows:
[0088] S51: constructing two lamps in a preceding and succeeding adjacent relationship in the target relative position relationship as a preceding lamp to link a succeeding lamp, so as to establish lamp linkage.
[0089] S52: constructing a topological graph according to the preceding and succeeding relationships and the left-right relationships in the relative position relationship of the targets by using a force-directed layout algorithm;
[0090] S53: performing line numbering and segment numbering on the lamps according to the front-to-back relationship and the left-to-right relationship in the relative position relationship of the target;
[0091] S54: Classifying lamps according to the target relative relationship;
[0092] S55: Determine a plurality of center point lamps according to the preceding, succeeding, adjacent relationship and the left-right relationship in the target relative position relationship, and perform group control based on the center point lamps.
[0093] Specifically, for two lamps with a preceding and following adjacent relationship, the preceding lamp can be automatically set to link with the following lamp, that is, when the preceding lamp senses a person or other object, in addition to lighting itself, it also notifies the following lamp to light up in advance, thereby improving the lighting experience. According to the preceding and following relationship and the left-right relationship, algorithms such as force-directed layout can be used to generate an approximate lamp plane topology, thereby generating a topology map, which is much cheaper than using an indoor positioning sensing terminal. Through the preceding and following adjacent relationship and the left-right relationship, it is convenient to group control multiple lamps centered on a specified lamp, such as lighting up a lane. According to the preceding and following relationship and the left-right relationship, lamps can be automatically numbered continuously and in sections to facilitate personnel management of lamps. It can provide lamp location prompts for lamp maintenance and other operations, especially in places such as parking lots with one-way lanes as the main feature. According to the relative position relationship of lamps, combined with application scenario rules, it can be used to classify lamps, such as distinguishing aisle lamps from seat lamps in offices.
[0094] In a specific embodiment, taking a parking lot as an example, after using the method provided by the embodiment of the present application, the construction workers install the lamps, confirm that the lights can all be turned on, and can report data to the platform, and then they can go. Then after being put into use for a period of time, the method can be used to mine the historical data of induction triggering.
[0095] First, assume that Tmax=26 seconds and w=0.2 seconds. For each pair of lights (light A->light B), count the number of times light A senses a person between -26 seconds and 26 seconds, and light B also triggers sensing, and distribute the count in each 0.2 second window.
[0096] Taking into account specific factors such as non-uniform motion, the statistical results are flattened. For example, (light A->light B), if the number of statistical sensing times is (1, 2, 3, 11, 3, 7, 0, 1), and the weights (3, 4, 5, 4, 3) are used to flatten the peak, it becomes (4.16, 5.58, 5.05, 4.37), for example, 4.16=(1*3+2*4+3*5+11*4+3*3) / (3+4+5+4+3).
[0097] For each vector, divide by the maximum value of its own component plus 5 to compress the component to between 0 and 1. For example, (4.16, 5.58, 5.05, 4.37) becomes (0.39, 0.53, 0.48, 0.41), and (1, 5, 0, 4) becomes (0.1, 0.5, 0.0, 0.4). Clustering of feature vectors usually results in 8 categories. The vector curve of the center point of each category is as follows: Figure 7 shown.
[0098] The center points of the eight categories are classified by neural network. Generally, the CNN layer is used to analyze the vector first, and the full-connect layer is used for classification, supplemented by pooling, relu and softmax layers. The position relationship type of each category is output: front and back, left and right, and no relationship. Figure 7 For example, series 1 and series 2 can be roughly considered to have one peak in general, and the subscript of the peak represents the time distance between the two; series 3 is a left-right relationship, and the waveform of the classification center point is roughly the middle two peaks; there is no relationship without special peaks and valleys, such as series 5. In the subsequent relationship, by comparing the subscripts of the peaks, it can be roughly determined that series 6 is an adjacent successor, while series 2 and series 7 with larger peak subscripts are indirect successors.
[0099] After classifying the cluster centers, the relative position relationship between every two lamps can be identified. And further screening is performed based on the distance from the center. Those that are too far from the center point will be judged as "unrelated". These data are output to subsequent intelligent processing links, such as lamp role classification, intelligent positioning, topology generation, group control, automatic numbering, intelligent linkage and other functions.
[0100] Set up lighting linkage: For two adjacent lighting fixtures, you can automatically set the preceding lighting fixture to link with the succeeding lighting fixture. That is, when the preceding lighting fixture senses a person or other object, it notifies the succeeding lighting fixture to light up in advance, improving the lighting experience. Figure 7 For example, for every two lamps in Series 6, the latter follows the former.
[0101] Generate topology graph: Based on the predecessor and successor relationships and left-right relationships, force-directed layout and other algorithms can be used to generate a rough planar topology of the lamps, which is much cheaper than using indoor positioning sensing terminals. Lamps are nodes of the force-directed graph. There is an attraction between two lamps with predecessor and successor relationships, and a tighter attraction between two lamps with left-right relationships. Other lamps are repelled, allowing them to grow naturally. Those that are gathered together are left-right relationships and predecessor and successor relationships, and those that are connected by wires but not adjacent are predecessor and successor relationships.
[0102] Group control: Through the front-to-back adjacent relationship and left-to-right relationship, multiple lamps centered on a specified lamp can be easily group controlled, such as lighting up a lane.
[0103] Automatic numbering: According to the relationship between the front and the back and the relationship between the left and the right, the lamps can be automatically numbered continuously and in sections, making it easier for personnel to manage the lamps.
[0104] Lamp location: It can provide lamp location prompts for lamp maintenance and other operations, especially in parking lots with one-way lanes. For example, if you see a lamp abnormality on the platform, such as no data reported for a long time, you can determine its approximate location based on the topology map, and then go to the site to check if there are any lamps that are not lit. If there are any that are not lit, it is likely that they are faulty. If the lamps around the location are all lit, you can use the flashing function on the lamps on site. By looking at the relationship between the flashing lights and the offline lights, you can find the faulty lights faster.
[0105] Lamp classification: According to the relative position relationship of the lamps and combined with the application scenario rules, it can be used to classify lamps, such as distinguishing between aisle lights and seat lights in the office. Aisle lights have relatively simple and stable front-to-back or left-to-right relationships, while seat lights have more and more complex front-to-back and left-to-right relationships. Combined with the density of trigger data, seat lights and aisle lights can be distinguished with a higher probability.
[0106] In an embodiment of the present application, a plurality of lamp sensing data within a set time period are obtained, wherein the lamp sensing data includes a triggered lamp identification and a triggering time; based on each lamp sensing data and preset parameters, a sensing feature vector between every two lamps is determined; the sensing feature vectors are clustered to obtain a plurality of clusters, and the center point of each cluster is classified using a neural network to determine the relative position relationship between every two lamps; the adjacent relationships in the relative position relationship are identified and screened to obtain a target relative position relationship; and the lamps in the lamp sensing data are controlled and processed according to the target relative position relationship. The embodiment of the present invention determines the sensing feature vector between every two lamps from the lamp sensing data, clusters the sensing vectors, and uses a neural network to classify based on the center point of the clustered clusters, thereby achieving lamp ranging or positioning without sensors or other equipment, which is beneficial to reducing the cost of analyzing the spatial position relationship of lamps, while improving the accuracy of analyzing the spatial position relationship of lamps.
[0107] Please refer to Fig.10 , as a response to the above Figure 1 The present application provides an embodiment of a lamp spatial position relationship analysis system based on a clustering algorithm. Figure 1 Corresponding to the method embodiment shown, the system can be specifically applied to various Internet of Things platforms.
[0108] like Fig.10 As shown, the lamp spatial position relationship analysis system based on clustering algorithm of this embodiment includes: a sensing data acquisition unit 61, a feature vector determination unit 62, a position relationship determination unit 63, a position relationship screening unit 64 and a lamp processing unit 65, wherein:
[0109] The sensing data acquisition unit 61 is used to acquire a plurality of pieces of sensing data of lamps within a set time period, wherein the sensing data of lamps include a triggered lamp identification and a triggering time;
[0110] A feature vector determining unit 62, configured to determine a sensing feature vector between every two lamps based on each piece of lamp sensing data and preset parameters;
[0111] A position relationship determination unit 63, used for clustering the sensing feature vectors to obtain a plurality of clusters, and classifying the center point of each cluster using a neural network to determine the relative position relationship between every two lamps;
[0112] A position relationship screening unit 64, used for identifying and screening adjacent relationships in the relative position relationship to obtain a target relative position relationship;
[0113] The lamp processing unit 65 is used to control the lamp in the lamp sensing data according to the relative position relationship of the target.
[0114] Furthermore, the preset parameters include a preset start time, an end time and a time window length; and the feature vector determination unit includes:
[0115] A sensing data extraction unit, used for sequentially extracting the sensing data of the lamps, and taking the currently extracted sensing data of the lamps as current sensing data;
[0116] A time period calculation unit, configured to calculate a current sensing time period based on a trigger time of the current sensing data, the start time and the end time;
[0117] A unit for determining data to be calculated, used for acquiring sensing data of the lamps whose triggering time is in the current sensing time period as sensing data to be calculated;
[0118] A counting vector calculation unit, used for comparing the sensing data to be calculated with the lamp identification of the current sensing data, so as to calculate the counting vector of the sensing data to be calculated and the current sensing data;
[0119] The sensing feature vector calculation unit is used to determine the sensing feature vector between every two lamps based on the counting vector.
[0120] Furthermore, the sensing feature vector calculation unit includes:
[0121] A comparing unit, used for comparing the sensing data to be calculated with the lamp identification of the current sensing data;
[0122] a component adding unit, configured to add one to the kth component of the counting vector of the sensing data to be calculated and the current sensing data respectively if the lamp identifiers of the sensing data to be calculated and the current sensing data are not equal, wherein k is a non-negative integer;
[0123] The calculation completion unit is used to obtain the counting vector of each lamp after all the lamp sensing data are extracted and calculated.
[0124] Furthermore, the sensing feature vector calculation unit includes:
[0125] An initial feature vector calculation unit, used to calculate the initial feature vector of every two lamps based on each component of the current count vector and a preset weight parameter using a preset formula;
[0126] A maximum value calculation unit, used to calculate the maximum value of all components of the initial characteristic vector of every two lamps to obtain a maximum value component;
[0127] An adding unit is used to calculate the sum of the maximum value component and a preset value to obtain an addition result, and divide any component in the initial characteristic vector of every two lamps by the addition result to obtain the sensing characteristic vector of every two lamps.
[0128] Further, the position relationship determining unit 63 includes:
[0129] A clustering unit, used for clustering the sensing feature vectors using a preset clustering algorithm to obtain a plurality of clusters;
[0130] A classification unit, used to perform feature analysis on the sensing feature vector corresponding to the center point of the cluster through the neural network, and perform feature classification on the feature analysis result using a fully connected layer to obtain a classification result;
[0131] The pooling unit is used to perform pooling processing and activation processing on the classification results to obtain the relative position relationship between every two lamps.
[0132] Further, the relative position relationship includes a preceding and succeeding relationship, a left-right relationship, and no relationship; the position relationship screening unit 64 includes:
[0133] A relationship judgment unit, used to calculate the time distance between the center points of the preceding and succeeding relationships and the left-right relationships, determine whether every two lamps are in an adjacent relationship according to the time distance, and obtain an adjacent relationship result;
[0134] An extraction unit, used for extracting every two lamps in the preceding-successor relationship and the left-right relationship as lamp pairs to be screened;
[0135] A distance calculation unit, used for calculating the distance between the characteristic vector of the pair of lamps to be screened and the distance center, to obtain a target distance;
[0136] A screening unit, configured to screen out the pair of lamps to be screened from the relative position relationship if the target distance exceeds a preset threshold, to obtain a preliminary screening result;
[0137] A relationship generating unit is used to generate the target relative position relationship based on the adjacent relationship result and the preliminary screening result.
[0138] Furthermore, the lamp processing unit 65 includes:
[0139] A lamp linkage unit, used to establish that two lamps in a preceding and succeeding adjacent relationship in the target relative position relationship are the preceding lamp and the succeeding lamp to link up with each other, so as to establish lamp linkage;
[0140] A topology map construction unit, used to construct a topology map according to the preceding and succeeding relationships and the left-right relationships in the relative position relationship of the targets by using a force-directed layout algorithm;
[0141] A lamp coding unit, used for connecting and segmenting the lamps according to the preceding and succeeding relationships and the left-right relationships in the relative position relationship of the target;
[0142] A lamp classification unit, used for classifying lamps according to the relative relationship of the targets;
[0143] The group control unit is used to determine a plurality of center point lamps according to the preceding, succeeding, adjacent relationship and the left-right relationship in the relative position relationship of the targets, and perform group control based on the center point lamps.
[0144] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the present application specification and the accompanying drawings, directly or indirectly used in other related technical fields, is similarly within the scope of protection of the present application.
Claims
1. A method for analyzing the spatial position relationship of lamps based on clustering algorithm, characterized in that: include: Acquire multiple pieces of lamp sensing data within a set time period, wherein the lamp sensing data includes a triggered lamp identification and a triggering time; Determine a sensing feature vector between every two lamps based on each piece of lamp sensing data and preset parameters; Clustering the sensing feature vectors to obtain a plurality of clusters, and classifying the center point of each cluster using a neural network to determine the relative position relationship between every two lamps; Identifying and screening adjacent relationships in the relative position relationship to obtain a target relative position relationship; Controlling and processing the lamp in the lamp sensing data according to the relative position relationship of the target; The preset parameters include a preset start time, an end time and a time window length; the step of determining the sensing feature vector between every two lamps based on each piece of the lamp sensing data and the preset parameters includes: Extracting the lamp sensing data in sequence, and using the currently extracted lamp sensing data as current sensing data; Calculate a current sensing time period based on the trigger time of the current sensing data, the start time, and the end time; Acquire the sensing data of the lamp whose trigger time is in the current sensing time period as the sensing data to be calculated; Compare the sensing data to be calculated with the lamp identification of the current sensing data to calculate the counting vector of the sensing data to be calculated and the current sensing data; The sensing feature vector between every two lamps is determined based on the counting vector.
2. The method for analyzing the spatial position relationship of lamps based on clustering algorithm according to claim 1, characterized in that: The step of comparing the sensing data to be calculated with the lamp identification of the current sensing data to calculate the counting vector of the sensing data to be calculated and the current sensing data includes: Comparing the sensing data to be calculated with the lamp identification of the current sensing data; If the lamp identifiers of the sensing data to be calculated and the current sensing data are not equal, then the kth component of the counting vector of the sensing data to be calculated and the current sensing data is increased by 1, where k is a non-negative integer; When all the sensing data of the lamps are extracted and calculated, the counting vector of each of the lamps is obtained.
3. The method for analyzing the spatial position relationship of lamps based on clustering algorithm according to claim 1, characterized in that: The determining the sensing feature vector between every two lamps based on the counting vector comprises: Calculate the initial feature vector of every two lamps based on the components of the current count vector and the preset weight parameters using a preset formula; Calculate the maximum value of all components of the initial characteristic vector of every two lamps to obtain the maximum value component; The sum of the maximum value component and the preset value is calculated to obtain an addition result, and any component in the initial characteristic vector of every two lamps is divided by the addition result to obtain the sensing characteristic vector of every two lamps.
4. The method for analyzing the spatial position relationship of lamps based on clustering algorithm according to claim 1, characterized in that: The clustering of the sensing feature vectors to obtain a plurality of clusters, and classifying the center point of each cluster using a neural network to determine the relative position relationship between every two lamps, includes: Clustering the sensing feature vectors using a preset clustering algorithm to obtain a plurality of clusters; Performing feature analysis on the sensing feature vector corresponding to the center point of the cluster by using the neural network, and performing feature classification on the feature analysis result by using a fully connected layer to obtain a classification result; Pooling processing and activation processing are performed on the classification results to obtain the relative position relationship between every two lamps.
5. The method for analyzing the spatial position relationship of lamps based on clustering algorithm according to any one of claims 1 to 4, characterized in that: The relative position relationship includes a preceding and succeeding relationship, a left-right relationship, and no relationship; the identification and screening of adjacent relationships in the relative position relationship to obtain a target relative position relationship includes: Calculating the time distance between the center points of the preceding and succeeding relationships and the left-right relationships, determining whether every two lamps are in an adjacent relationship based on the time distance, and obtaining an adjacent relationship result; Extracting every two lamps in the preceding-successor relationship and the left-right relationship as lamp pairs to be screened; Calculate the distance between the characteristic vector of the pair of lamps to be screened and the distance center to obtain the target distance; If the target distance exceeds a preset threshold, the pair of lamps to be screened is screened out from the relative position relationship to obtain a preliminary screening result; The target relative position relationship is generated based on the neighbor relationship result and the preliminary screening result.
6. The method for analyzing the spatial position relationship of lamps based on clustering algorithm according to claim 5, characterized in that: The controlling and processing of the lamp in the lamp sensing data according to the relative position relationship of the target includes: The two lamps in the preceding and succeeding adjacent relationship in the target relative position relationship are the preceding lamp and the succeeding lamp linked to each other, so as to establish lamp linkage; A force-directed layout algorithm is used to construct a topological graph according to the preceding and succeeding relationships and the left-right relationships in the relative position relationship of the targets; According to the front-to-back relationship and the left-to-right relationship in the relative position relationship of the target, the lamps are numbered in lines and in sections; Classifying the lamps according to the relative relationship of the targets; A plurality of center point lamps are determined according to the preceding, succeeding, adjacent and left-right relationships in the target relative position relationship, and group control is performed based on the center point lamps.
7. A lamp spatial position relationship analysis system based on clustering algorithm, characterized in that: include: A sensing data acquisition unit, used to acquire a plurality of pieces of lamp sensing data within a set time period, wherein the lamp sensing data includes a triggered lamp identification and a triggering time; A characteristic vector determining unit, used for determining a sensing characteristic vector between every two lamps based on each piece of the lamp sensing data and preset parameters; A position relationship determination unit, used for clustering the sensing feature vectors to obtain a plurality of clusters, and classifying the center point of each cluster using a neural network to determine the relative position relationship between every two lamps; A position relationship screening unit, used for identifying and screening adjacent relationships in the relative position relationship to obtain a target relative position relationship; A lamp processing unit, used for controlling and processing the lamp in the lamp sensing data according to the relative position relationship of the target; The preset parameters include a preset start time, an end time and a time window length; the feature vector determination unit includes: A sensing data extraction unit, used for sequentially extracting the sensing data of the lamps, and taking the currently extracted sensing data of the lamps as current sensing data; A time period calculation unit, configured to calculate a current sensing time period based on a trigger time of the current sensing data, the start time and the end time; A unit for determining data to be calculated, used for acquiring sensing data of the lamps whose triggering time is in the current sensing time period as sensing data to be calculated; A counting vector calculation unit, used for comparing the sensing data to be calculated with the lamp identification of the current sensing data, so as to calculate the counting vector of the sensing data to be calculated and the current sensing data; The sensing feature vector calculation unit is used to determine the sensing feature vector between every two lamps based on the counting vector.
8. The lamp spatial position relationship analysis system based on clustering algorithm according to claim 7, characterized in that: The sensing feature vector calculation unit comprises: A comparing unit, used for comparing the sensing data to be calculated with the lamp identification of the current sensing data; a component adding unit, configured to add one to the kth component of the counting vector of the sensing data to be calculated and the current sensing data respectively if the lamp identifiers of the sensing data to be calculated and the current sensing data are not equal, wherein k is a non-negative integer; The calculation completion unit is used to obtain the counting vector of each lamp after all the lamp sensing data are extracted and calculated.
Citation Information
Patent Citations
Clustering method and device, computer equipment and storage medium
CN115344692A
LED light intelligent control method and system and computer equipment
CN117979487A