A method, device and medium for detecting street light circuit fault based on DBSCAN algorithm
By applying the DBSCAN algorithm in urban lighting systems and combining the Internet of Things technology, the rapid monitoring and positioning of fault loops is achieved, and the problem of difficult to diagnose street light faults in the existing technology is solved, and the stability and safety of the system are improved.
Patent Information
- Application Number
- CN202411807288.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-04
AI Technical Summary
The prior art is difficult to monitor and locate fault circuits in urban lighting systems, resulting in the inability to effectively diagnose street light failures.
Using a method based on DBSCAN algorithm, the operating status data of the lighting equipment is collected through the Internet of Things single-light controller, data preprocessing and density clustering calculations are performed, fault data clusters are identified and fault loops are located.
It realizes rapid monitoring and positioning of fault circuits in urban lighting systems, simplifies the fault diagnosis process, and improves the stability and safety of the system.
Smart Images

Figure CN119762825A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of loop fault detection and positioning, and in particular to a method, device and medium for detecting a street lamp loop fault based on a DBSCAN algorithm. Background Art
[0002] With the acceleration of urbanization, energy-saving concepts are increasingly valued. Traditional urban lighting systems, such as old sodium lamp facilities and their group control through distribution cabinets, have gradually shown their shortcomings. These traditional lighting methods not only have high energy consumption and high maintenance costs, but are also prone to problems such as line failures. These problems not only affect the lighting effect, but may also bring safety hazards, making it difficult to meet the requirements of modern cities for energy conservation, environmental protection and safety. Therefore, exploring and adopting more efficient and intelligent urban lighting solutions has become a key step in promoting sustainable urban development. This includes but is not limited to the introduction of LED lighting technology, intelligent control systems, and the use of renewable energy to achieve the goal of energy conservation and emission reduction, while improving the stability and safety of the system and enhancing the livability and aesthetics of the city.
[0003] However, during the renovation of urban street lamps, due to the inconsistency in the service life of various equipment, the urban street lamp management office replaced the old lamps but did not replace the distribution cabinet equipment. The inconsistent system data made it impossible to diagnose the relevant street lamp faults.
[0004] Therefore, there is a need for a method, device and medium that can quickly monitor and locate a faulty circuit in an urban lighting system and analyze the fault problem. Summary of the invention
[0005] The main purpose of the present invention is to provide a method for detecting street lamp circuit faults based on the DBSCAN algorithm, aiming to solve the problem that the prior art is difficult to monitor and locate faulty circuits in urban lighting systems.
[0006] To achieve the above object, the present invention proposes a method for detecting street lamp circuit failure based on DBSCAN algorithm, the method comprising the following steps:
[0007] Carry out data collection and obtain the operating status of lighting equipment through the IoT single-lamp controller in the urban lighting system;
[0008] Pre-process the collected data to obtain the longitude and latitude of lighting equipment that has been offline for more than three days and the time when the fault occurred;
[0009] Set the corresponding parameters of the DBSCAN algorithm and set the neighborhood radius and minimum number of samples according to the street lamp layout of the urban lighting system;
[0010] Perform density clustering calculation to obtain data clusters of equipment longitude and latitude and fault occurrence time data and output all clusters;
[0011] Determine whether the best clustering result is obtained; if so, perform abnormal situation judgment and output the final result; if not, adjust the DBSCAN parameters and re-execute the density clustering calculation step.
[0012] Preferably, the step of determining the abnormal situation includes:
[0013] Data preparation: extract each cluster and its corresponding device information from the DBSCAN clustering results;
[0014] Device filtering: filtering devices on the same road segment. Devices with matching road segment names of at least three devices will pass the screening.
[0015] Number analysis: extract the selected devices and analyze the pole numbers to check whether there are more than 3 consecutive odd or even segments;
[0016] The result output returns the ID of the abnormal device or records the abnormal situation in the form of a log.
[0017] Preferably, the step of preprocessing the collected data to obtain the longitude and latitude of the device that has been offline for more than three days and the time when the fault occurred includes:
[0018] Difference between the fault occurrence time of each device and the maximum value of the fault occurrence time and take the absolute value;
[0019] The difference is digitized and converted into vector form using the equipment longitude and latitude and the time when the fault occurred as features to form training data.
[0020] Preferably, the step of setting corresponding parameters of the DBSCAN algorithm and setting the neighborhood radius and the minimum number of samples according to the street lamp arrangement of the urban lighting system includes:
[0021] The street lighting equipment is divided according to the street lighting arrangement of the urban lighting system;
[0022] According to the fault characteristics of suspected line faults in lighting equipment in the same street lamp arrangement, DBSCAN parameters of neighborhood radius and minimum sample number are set, and clustering judgment is performed using the DBSCAN parameters.
[0023] Preferably, the step of performing density clustering calculation, obtaining data clusters of equipment longitude and latitude and fault occurrence time data, and outputting all clusters includes:
[0024] Based on the selected DBSCAN parameters, using the DBSCAN algorithm to perform density clustering calculation on the training data;
[0025] Identify core samples, edge samples, and noise samples using the DBSCAN algorithm;
[0026] Determine the cluster assignment of each sample, determine the initial cluster division and core points of the sample;
[0027] When the core point set is not empty, construct the current cluster sample, and then repeatedly calculate the sample data therein to obtain the data clusters of all samples, and output the results of all clusters.
[0028] The present invention further provides a device for detecting a street lamp circuit fault, the device for detecting a street lamp circuit fault comprising:
[0029] Data acquisition module, used to connect to the IoT single lamp controller on the street lighting equipment to realize the status collection of the equipment;
[0030] The data processing module pre-processes the collected equipment status data and converts the equipment status data and the fault occurrence time into vectors;
[0031] The data analysis module converts the equipment status data and the fault occurrence time into vectors and performs density clustering calculation through the DBSCAN algorithm to identify core samples, edge samples and noise samples, and determine the clustering allocation of each sample.
[0032] The present invention also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for detecting street lamp circuit failure based on the DBSCAN algorithm as described in any one of the above technical solutions are performed.
[0033] The present invention adopts DBSCAN (Density-Based Spatial Clustering of Applications with Noise) to divide municipal street lamps and their lines into clusters. At the same time, the DBSCAN algorithm itself can automatically determine the number of clusters and effectively process non-spherical clusters and noise data. Compared with the prior art, the present invention is more suitable for processing data with urban road structures in urban lighting systems and is more conducive to mining the natural structure of potential fault modes. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained according to the processes shown in these drawings without paying creative work.
[0035] Figure 1 It is a flowchart of a first embodiment of a method for detecting a street lamp circuit fault based on a DBSCAN algorithm of the present invention;
[0036] Figure 2 It is a flow chart of a second embodiment of a method for detecting a street lamp circuit fault based on a DBSCAN algorithm of the present invention;
[0037] Figure 3 It is a flowchart of a first embodiment of a method for detecting a street lamp circuit fault based on a DBSCAN algorithm of the present invention;
[0038] Figure 4 It is a flow chart of a third embodiment of a method for detecting a street lamp circuit fault based on a DBSCAN algorithm of the present invention;
[0039] Figure 5 It is a structural schematic diagram of a basic arrangement method of lighting fixtures in the urban lighting system disclosed in the present invention;
[0040] Figure 6 A clustering result diagram of DBSCAN in one embodiment of a method for detecting a street lamp circuit fault based on the DBSCAN algorithm of the present invention;
[0041] Figure 7 A clustering result diagram of DBSCAN after abnormal situation inspection in one embodiment of the method for detecting street lamp circuit fault based on DBSCAN algorithm of the present invention;
[0042] Figure 8 A schematic diagram of the device structure of the hardware operating environment designed for the method for detecting street lamp circuit faults based on the DBSCAN algorithm of the present invention;
[0043] Fig. 9 The figure is a schematic diagram of the module structure of an embodiment of an integrated device for detecting street lamp circuit faults of the present invention. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0046] In addition, the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0047] One of the technical applications disclosed in the present invention is to solve the problem that during the renovation of urban street lights, due to the inconsistency in the service life of various equipment, the urban street light management office replaces old lighting equipment but does not replace the distribution cabinet equipment, and the inconsistent system data makes it impossible to diagnose related street light faults.
[0048] In detail, the technical means disclosed in the present invention can diagnose problems existing in the circuit line and accurately find out the information of the line fault only through the geographic positioning of the street light equipment, the offline time point of the single light controller and the name of the street light equipment without relying on the data of the distribution cabinet. Combined with the longitude and latitude information of the equipment, the disconnection position of the single light controller equipment installed in the urban lighting system and the coordination with the circuit without a centralized controller can also be accurately analyzed. Based on the longitude and latitude information of the street light pole, combined with the online and offline detection function of the single light controller of the Internet of Things, the use of DBSCAN combined with longitude and latitude and offline time points can analyze the equipment line fault problems at different points in multiple areas based on a large area. The method of the present invention has the advantages of simplicity, easy operation, and rapid positioning.
[0049] The DBSCAN clustering algorithm (Density-Based Spatial Clustering of Applications with Noise) adopted in the present invention performs clustering calculation based on sample distribution density. Its essence is to cluster adjacent points into clusters by means of "direct density reachability" and "density reachability". A cluster is defined as the largest set of density-connected points. The DBSCAN algorithm can divide areas with sufficiently high density into clusters and can find clusters of arbitrary shapes in a noisy spatial database. The following parameters are used in the DBSCAN algorithm for calculation: Neighborhood radius (ε(epsilon)): represents the radius of the neighborhood. The area within the radius of a given object is called the ε neighborhood of the object, that is, the search range around a certain point; Minimum number of samples (minPts): represents the minimum number of neighborhood points required for a core point; Core object: If the number of sample points within the ε neighborhood of a given object is greater than or equal to minPts, then the object is called a core object; Direct density reachability: For a sample set D, if a sample point q is within the ε neighborhood of p, and p is a core object, then object q is directly density reachable from object p; Density reachability: For a sample set D, given a string of sample points p1, p2…p n , p=p1,q=p n , if the object p i From p i-1 Direct density reachable, then object q is density reachable from object p; Density connected: There is a point o in the sample set D, if object o is density reachable to both object p and object q, then p and q are density connected.
[0050] Because the coordinate position of street lamps will not change easily, this algorithm can be used to divide the lighting equipment represented by street lamps and their lines in the urban lighting system into clusters. The DBSCAN algorithm itself can then automatically determine the number of clusters, effectively process non-spherical clusters and noise data, and obtain the natural structure of the fault mode of the lighting system.
[0051] Based on this, refer to Figure 1-Figure 9 , an embodiment of the present application provides a method for detecting street lamp circuit faults based on the DBSCAN algorithm.
[0052] The present invention provides a method for detecting a street lamp circuit fault based on a DBSCAN algorithm, which specifically comprises the following steps:
[0053] Step S01: collect data and obtain the operating status of lighting equipment through the IoT single lamp controller in the urban lighting system;
[0054] In detail, a single lamp controller refers to a controller that can control each individual lamp. Single lamp controllers are divided into power line single lamp controllers and ZigBee single lamp controllers based on technology type. Among them, the power line single lamp controller uses the power line that transmits current as a communication carrier, without the need for additional wiring, but is greatly affected by external factors such as humidity and vibration, and the signal is easily interfered; ZigBee single lamp controller uses ZigBee technology to achieve short-range, low-complexity, low-power, low-rate two-way wireless communication.
[0055] The present invention collects the status of lighting equipment through the Internet of Things single-lamp controller installed on the lighting equipment in the urban lighting system. The single-lamp controller can record and upload the working status (online or offline) and related status data of the working time of the lighting equipment it controls. These status data are transmitted to the MQTT message transmission protocol and then stored in the storage database according to the subscription information topic.
[0056] Step S02, pre-process the collected data to obtain the longitude and latitude of lighting equipment that has been offline for more than three days and the time of fault occurrence; subtract the fault time of each device from the maximum value of the fault time and take the absolute value; digitize the difference, use the longitude and latitude of the equipment and the time of fault occurrence as features to convert it into vector form to form training data.
[0057] Specifically, in this embodiment, the difference between the fault occurrence time of each lighting device and the maximum value of the fault occurrence time is taken and the absolute value is taken, and the difference is digitized by a formula, which is specifically as follows:
[0058] t n =|d n -d max | / 86400
[0059] Among them, t n is the time difference of the nth day, d n is the time on the nth day when the fault occurred (the original time format is year, month, day, hour, minute, and second), d max The maximum value of the fault occurrence time.
[0060] The latitude and longitude of the lighting equipment and the time difference are converted into vector form X through the formula. The specific formula is as follows:
[0061] X=
[0062] [[lon1],lat1,t1],
[0063] …,…,
[0064] [[[lon n ],lat n,t n ]]
[0065] Among them: parameters lon1…lon n Indicates the longitude of the current geographic location of 1…n devices; parameters lat1…lat n Indicates the latitude of the current geographical location of 1…n devices; parameters t1…t n Indicates the offline time difference of 1…n devices that were offline for more than 3 days. The longitude and latitude of the device and the time when the fault occurred are used as features to form the training data.
[0066] Step S03, setting corresponding parameters of the DBSCAN algorithm, setting the neighborhood radius and the minimum number of samples according to the street lamp arrangement of the urban lighting system; dividing the street lamp equipment according to the street lamp arrangement of the urban lighting system; setting the DBSCAN parameters of the neighborhood radius and the minimum number of samples for the fault characteristics of suspected line faults in the lighting equipment in the same street lamp arrangement, and performing clustering judgment with the DBSCAN parameters;
[0067] It should be noted that if Figure 5 As shown, there are currently five conventional lighting fixture arrangements for urban lighting systems, namely, single-sided arrangement, double-sided staggered arrangement, double-sided symmetrical arrangement, central symmetrical arrangement, and horizontal cable arrangement. The above five arrangements correspond to Figure 2 The a~e structure diagram in the figure. The lamp layout and installation spacing used for different road levels are different from each other. Therefore, it is necessary to set appropriate parameters in the selection of DBSCAN parameters to ensure that clusters can be accurately identified in the density clustering process, and the approximate location of a certain type of fault line described in the data summary can be divided.
[0068] In detail, the present invention takes the common c-type bilateral symmetrical arrangement as an example, and chooses to set the neighborhood radius of DBSCAN to ε=0.002, and the minimum number of samples is 5. The setting of this parameter is used to perform clustering judgment on the arrangement of lighting fixtures arranged bilaterally symmetrically. At the same time, the setting of this parameter can take into account other types of arrangements. It can be understood that if the overall spacing of lighting fixtures in the urban lighting system is wide (>30 meters), the neighborhood radius ε can be appropriately increased.
[0069] Step S04, perform density clustering calculation, obtain data clusters of equipment longitude and latitude and fault occurrence time data and output all clusters; based on the selected DBSCAN parameters, use the DBSCAN algorithm to perform density clustering calculation on the training data; identify core samples, edge samples and noise samples through the DBSCAN algorithm; determine the clustering assignment of each sample, determine the initial cluster division and core points of the sample; when the core point set is not empty, construct the current cluster sample, and then repeatedly calculate the sample data therein to obtain the data clusters of all samples, and output the results of all clusters.
[0070] In detail, based on the sample set D and the neighborhood radius of the selected parameters is set to ε = 0.002, the minimum number of samples is 5, and the DBSCAN algorithm is used for density clustering calculation. The specific steps are as follows:
[0071] Step S11: Input sample set D = {x1, x2, ... x n}, neighborhood parameters (∈,minPts), and output cluster partition C;
[0072] Step S12: Initialize the core point set The number of clusters k = 0, the set of unvisited samples Γ = D, cluster division
[0073] Step S13: for each sample x i ∈D, using the given distance metric, find the sample x i ∈-neighborhood subsample set N∈(x i );
[0074] Step S14, determine the neighborhood subsample set |N∈(x i )|is it greater than or equal to minPts; if so, then x n Add to the core object sample set Ω and repeat steps S11 to S14; if not, return to step S11 and repeat steps S11 to S14;
[0075] Step S15: when the core point set Ω is not empty, randomly select a core point o from Ω as the core point of the current cluster, and initialize the core object queue Ω of the current cluster. cur = {o}, increase the cluster counter k = k + 1, and initialize the current sample set C k ={o}, remove o from the unvisited sample set Γ.
[0076] Step S16, when Ω cur When it is not empty, take a sample q from it, calculate the ∈-neighborhood N∈(q) of sample q, and determine whether |N∈(q)| is greater than or equal to minPts; if so, calculate the intersection of N∈(q) and Γ and will Add to the current cluster core object queueΩ cur and the current cluster sample set C k , removed from the unvisited sample set Γ If all samples in the set are found, this step is executed again; if not, this step is executed again until the core point in the core point set is found;
[0077] Step S17, complete the calculation and output all clusters C = {C1, C2, ..., C k}.
[0078] Reference Figure 3 Based on the above embodiment, in another embodiment, the step of performing density clustering calculation, obtaining data clusters of equipment longitude and latitude and fault occurrence time data and outputting all clusters also includes:
[0079] Step S21, select an unvisited point, and select an unvisited point from the data set as the current point;
[0080] Step S22, select a neighborhood, and calculate all neighborhood points of the current point within the range of ε;
[0081] Step S23, determine whether all neighboring points of the current point are greater than or equal to minPts; if so, mark the current point as a core point and form a cluster; if not, return to step S21 and recalculate;
[0082] Step S24, expanding the cluster, adding all neighboring points to the current cluster, and repeating steps S22 and S23 until no further expansion is possible;
[0083] Step S25, process the noise and determine whether a point is a core point or a boundary point; if so, return the point to step S21 and recalculate; if not, regard the point as noise.
[0084] Step S05, determine whether the best clustering result is obtained; if so, perform abnormal situation judgment and output the final result; if not, adjust the DBSCAN parameters and re-execute the density clustering calculation step.
[0085] Reference Figure 4 Based on the above embodiment, in another embodiment, the step of determining the abnormal situation further includes:
[0086] Step S31: data preparation, extracting each cluster and its corresponding device information from the DBSCAN clustering results;
[0087] Step S32, device filtering, filtering devices on the same road section, wherein devices with road section names matching at least three devices are filtered;
[0088] Step S33: number analysis, extracting and analyzing the lamp pole numbers of the screened devices to check whether there are more than 3 consecutive odd or even segments;
[0089] Step S34: Output the result, return the ID of the abnormal device, or record the abnormal situation in the form of a log.
[0090] like Fig. 9 As shown, the present invention also provides a device for detecting a street lamp circuit failure, the device for detecting a street lamp circuit failure comprising:
[0091] The data acquisition module 10 is used to connect to the IoT single lamp controller on the street lamp lighting equipment to realize the status collection of the equipment;
[0092] The data processing module 20 pre-processes the collected device status data and converts the device status data and the fault occurrence time into vectors;
[0093] The data analysis module 30 converts the equipment status data and the fault occurrence time into vectors and performs density clustering calculation through the DBSCAN algorithm to identify core samples, edge samples and noise samples, and determine the clustering allocation of each sample.
[0094] The device for detecting street light circuit faults provided by the present application adopts the method for detecting street light circuit faults based on the DBSCAN algorithm in the above-mentioned embodiment, which can solve the technical problems raised. Compared with the prior art, the beneficial effects of the integrated device for detecting street light circuit faults provided by the present application are the same as the beneficial effects of the method for detecting street light circuit faults based on the DBSCAN algorithm provided in the above-mentioned embodiment, and other technical features in the integrated device for detecting street light circuit faults are the same as the features disclosed in the above-mentioned embodiment method, which will not be described in detail here.
[0095] The present invention also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for detecting street lamp circuit faults based on the DBSCAN algorithm as in any of the above technical solutions are performed.
[0096] The present invention also provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, the computer-readable program instructions being used to execute the method for detecting street lamp circuit faults based on the DBSCAN algorithm in the above-mentioned embodiment.
[0097] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, 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 or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0098] The computer-readable storage medium may be included in the device for detecting a street lamp circuit failure; or may exist independently without being assembled into the device for detecting a street lamp circuit failure.
[0099] It is understandable that the present invention can also relate to a device for detecting a street lamp circuit fault, the device comprising:
[0100] At least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for detecting street lamp circuit faults based on the DBSCAN algorithm in the above-mentioned embodiment 1.
[0101] The device for detecting street lamp circuit failure in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The device for detecting street lamp circuit failure disclosed above is only an example and should not bring any limitation to the functions and scope of use of the embodiment of the present application.
[0102] like Figure 8 As shown, the device for detecting a street light circuit fault may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM) 1004. Various programs and data required for the operation of the device for detecting a street light circuit fault are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the device for detecting a street light circuit failure to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a device for detecting a street light circuit failure with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0103] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0104] The device for detecting street light circuit faults provided by the present application adopts the method for detecting street light circuit faults based on the DBSCAN algorithm in the above-mentioned embodiment, which can solve the integrated technical problem of detecting street light circuit faults. Compared with the prior art, the beneficial effects of the device for detecting street light circuit faults provided by the present application are the same as the beneficial effects of the method for detecting street light circuit faults based on the DBSCAN algorithm provided in the above-mentioned embodiment, and other technical features in the device for detecting street light circuit faults are the same as the features disclosed in the method of the previous embodiment, which will not be described in detail here.
[0105] It should be understood that the various parts disclosed in the present invention can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0106] The above is only a specific implementation of the present invention, but the protection scope of this application is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this application, which should be included in the protection scope of this application. Therefore, the protection scope of this application should be based on the protection scope of the claims.
[0107] In combination with all the above embodiments, the present invention provides a method, device and medium for detecting street lamp circuit faults based on the DBSCAN algorithm. The DBSCAN algorithm is used to divide lighting equipment represented by street lamps and their lines in the urban lighting system into clusters. The DBSCAN algorithm itself automatically determines the number of clusters, effectively processes non-spherical clusters and noise data, and obtains the natural structure of the fault mode of the lighting system. It can discover clusters of arbitrary shapes and no longer depends on the shape of the clusters. It can process complex geometric shapes and is robust to noise. It can identify and exclude noise data points. Unlike K-means in the prior art, it does not require the user to set the number of clusters before the algorithm starts. It has the advantages of simplicity, easy operation, and rapid positioning.
[0108] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the inventive concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A method for detecting street lamp circuit faults based on DBSCAN algorithm, characterized in that: The following steps are involved: Carry out data collection and obtain the operating status of lighting equipment through the IoT single-lamp controller in the urban lighting system; Pre-process the collected data to obtain the longitude and latitude of lighting equipment that has been offline for more than three days and the time when the fault occurred; Set the corresponding parameters of the DBSCAN algorithm and set the neighborhood radius and minimum number of samples according to the street lamp layout of the urban lighting system; Perform density clustering calculation to obtain data clusters of equipment longitude and latitude and fault occurrence time data and output all clusters; Determine whether the best clustering result is obtained; if so, perform abnormal situation judgment and output the final result; if not, adjust the DBSCAN parameters and re-execute the density clustering calculation step.
2. The method for detecting street lamp circuit failure based on DBSCAN algorithm as claimed in claim 1, characterized in that: The step of judging the abnormal situation includes: Data preparation: extract each cluster and its corresponding device information from the DBSCAN clustering results; Device filtering: filtering devices on the same road segment. Devices with matching road segment names of at least three devices will pass the screening. Number analysis: extract the selected devices and analyze the pole numbers to check whether there are more than 3 consecutive odd or even segments; The result output returns the ID of the abnormal device or records the abnormal situation in the form of a log.
3. The method for detecting street lamp circuit failure based on DBSCAN algorithm as claimed in claim 2, characterized in that: The step of preprocessing the collected data to obtain the longitude and latitude of the device that has been offline for more than three days and the time when the fault occurred includes: Difference between the fault occurrence time of each device and the maximum value of the fault occurrence time and take the absolute value; The difference is digitized and converted into vector form using the equipment longitude and latitude and the time when the fault occurred as features to form training data.
4. The method for detecting street lamp circuit failure based on DBSCAN algorithm as claimed in claim 3, characterized in that: The steps of setting corresponding parameters of the DBSCAN algorithm and setting the neighborhood radius and the minimum number of samples according to the street lamp arrangement mode of the urban lighting system include: The street lighting equipment is divided according to the street lighting arrangement of the urban lighting system; According to the fault characteristics of suspected line faults in lighting equipment in the same street lamp arrangement, DBSCAN parameters of neighborhood radius and minimum sample number are set, and clustering judgment is performed using the DBSCAN parameters.
5. The method for detecting street lamp circuit failure based on DBSCAN algorithm as claimed in claim 4, characterized in that: The steps of performing density clustering calculation, obtaining data clusters of equipment longitude and latitude and fault occurrence time data, and outputting all clusters include: Based on the selected DBSCAN parameters, using the DBSCAN algorithm to perform density clustering calculation on the training data; Identify core samples, edge samples, and noise samples using the DBSCAN algorithm; Determine the cluster assignment of each sample, determine the initial cluster division and core points of the sample; When the core point set is not empty, construct the current cluster sample, and then repeatedly calculate the sample data therein to obtain the data clusters of all samples, and output the results of all clusters.
6. A device for detecting a street lamp circuit fault, characterized in that: The device for detecting street lamp circuit failure comprises: Data acquisition module, used to connect to the IoT single lamp controller on the street lighting equipment to realize the status collection of the equipment; The data processing module pre-processes the collected equipment status data and converts the equipment status data and the fault occurrence time into vectors; The data analysis module converts the equipment status data and the fault occurrence time into vectors and performs density clustering calculation through the DBSCAN algorithm to identify core samples, edge samples and noise samples, and determine the clustering allocation of each sample.
7. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for detecting street lamp circuit faults based on the DBSCAN algorithm as described in any one of claims 1 to 5 are implemented.