Street lamp lighting control method, system, computer device and storage medium
By acquiring historical pedestrian traffic data from the park's streetlight system, using STL decomposition and Transformer models for prediction, and combining weather and holiday information, the streetlight lighting power is dynamically adjusted, solving the problem of energy waste in traditional park streetlights and achieving accurate prediction and energy-saving effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN ALL THINGS CLOUD TECH CO LTD
- Filing Date
- 2023-02-15
- Publication Date
- 2026-07-21
AI Technical Summary
Traditional park street lighting systems cannot dynamically adjust lighting power, resulting in wasted electricity and failing to meet the needs of changing pedestrian traffic.
By acquiring historical pedestrian traffic data in the park, using the STL decomposition method and Transformer model for prediction, and combining weather and holiday information, the street light power is dynamically adjusted to achieve time-of-day dimming control.
It enables accurate prediction of pedestrian traffic in the park, dynamically adjusts lighting time, achieves energy conservation and emission reduction, and reduces operating costs.
Smart Images

Figure CN116113112B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent lighting control technology, and more specifically to a street lighting control method, system, computer equipment, and storage medium. Background Technology
[0002] Industrial parks, as an important element of cities, are hubs for population and industry. In recent years, with the continuous development and upgrading of technologies such as big data and the Internet of Things, traditional industrial parks are evolving into smart parks. Intelligent street lighting, as a key component of smart park construction, provides a platform for the intelligentization of industrial parks.
[0003] Currently, most park street lighting systems adopt a centralized circuit control method, which means that the lights are turned on and off at set times and the brightness is constant, i.e., the lighting power is constant. Because the lighting power is constant throughout the day and cannot be dynamically adjusted, it results in a huge waste of electricity. Summary of the Invention
[0004] This invention provides a street lighting control method, system, computer equipment, and storage medium to enable dynamic adjustment of street lighting power in a park based on changes in pedestrian traffic, thereby achieving energy conservation in the park.
[0005] In a first aspect, embodiments of the present invention provide a street light lighting control method, comprising:
[0006] Obtain historical pedestrian flow data for each road and the total entrance / exit within the park;
[0007] The historical pedestrian flow data of the total entrances and exits and the historical pedestrian flow data of each road were organized into pedestrian flow sequence data. The STL decomposition method was then used to decompose all the obtained pedestrian flow sequence data, so that the pedestrian flow sequence data at each moment was decomposed into an equally weighted trend sequence. T Seasonal sequence S and random sequences R ;
[0008] Collect data on peak commuting times, holiday dates, and daily weather conditions within the park, and analyze the trend sequence. T Seasonal sequence S and random sequences R Add numerical markers to indicate whether it is rush hour, holiday dates, and weather conditions to obtain seasonal sequences. S’、 Trend sequence T’ and random sequences R’ ;
[0009] Each seasonal sequence S’、 Trend sequence T’ and random sequences R’Input the Transformer model and sum the prediction results of each sequence after passing through the Transformer model to obtain the predicted pedestrian flow of the total entrance and exit of the park and the predicted pedestrian flow of each road;
[0010] Error in calculating predicted pedestrian flow at total entrances and exits and the average error of predicted pedestrian flow for each road ,like Then, the predicted pedestrian flow for each road is adjusted based on the predicted pedestrian flow at the total entrance and exit of the park;
[0011] The lighting power of the streetlights on each road is adjusted according to the final predicted pedestrian flow for each time of day, so as to carry out time-segmented dimming control of the streetlights in the park.
[0012] Secondly, embodiments of the present invention also provide a street lighting control system, which includes a unit for performing the above-described method.
[0013] Thirdly, embodiments of the present invention also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.
[0014] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, can implement the above-described method.
[0015] Compared with existing technologies, this invention obtains historical pedestrian flow data for each road and the main entrance / exit through regularization, and decomposes the regularized pedestrian flow sequence data using the STL decomposition method to obtain three equally weighted sequences. After decomposition, each sequence is combined with the park's peak commuting times, holiday dates, and daily weather conditions. Then, the Transformer model is used to predict the pedestrian flow at the park's main entrance / exit and for each road. When the error of the predicted pedestrian flow at the main entrance / exit is less than the average error of the predicted pedestrian flow for each road, the predicted pedestrian flow for each road is corrected based on the predicted pedestrian flow at the park's main entrance / exit. Furthermore, the lighting power of the streetlights on each road is adjusted according to the final predicted pedestrian flow at each moment of the corrected road, so as to achieve time-segmented dimming control of the park's road streetlights. It can be seen that this invention can achieve accurate prediction of pedestrian flow on park roads, and by combining the park's peak commuting times, holiday dates, and daily weather conditions, the lighting time of park road lighting can be dynamically adjusted and time-segmented dimming control can be achieved, thereby achieving the goal of energy saving in the park and also achieving the goal of cost reduction and efficiency improvement. Attached Figure Description
[0016] Figure 1 This is a schematic flowchart of the street lighting control method provided in an embodiment of the present invention.
[0017] Figure 2 This is a schematic block diagram of a street lighting control system provided in an embodiment of the present invention.
[0018] Figure 3 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0019] To enable those skilled in the art to more clearly understand the purpose, technical solution, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0020] Reference Figure 1 , Figure 1 This is a schematic flowchart of a street light lighting control method according to an embodiment of the present invention. As shown in the figure, the street light lighting control method includes:
[0021] S101. Calculate the sunrise and sunset times for the day, and determine the on and off times of the park's streetlights based on the weather conditions.
[0022] In this invention, the on / off times of the park's streetlights are adaptively adjusted based on sunrise and sunset times and the weather conditions of the day. Further, this step specifically includes: calculating the sunrise time T of the day using a sunrise / sunset algorithm based on the park's geographical location. C and sunset time T L Get the weather for the day; if the weather is sunny, then use the sunrise time T. C and sunset time T L This refers to the time for turning off and on the streetlights in the park; and if the weather on that day is... In case of rain, snow, hail, sandstorm, or cloudy weather, the lighting time T should be adjusted accordingly. on =T L - Δt Lights off time T off =T C + Δt ,in, .
[0023] As can be seen, in this embodiment, the sunrise and sunset times calculated using the sunrise-sunset algorithm are used as the reference times for turning the park streetlights on and off. Because the average road surface illuminance is lower in foggy, rainy, snowy, hailous, sandstorm, or cloudy weather than in sunny weather, the road surface illumination is lower. In the event of rain, snow, hail, sandstorms, or cloudy weather, the calculated sunrise and sunset times for the day are combined with a time offset value. Δt Adjust the turn-off and turn-on times of the park's streetlights.
[0024] S102. Obtain historical pedestrian flow data for each road and the main entrance / exit in the park.
[0025] Specifically, this step may include: acquiring surveillance camera information from the main entrance / exit and all roads within the park; sequentially using the YOLOv3 algorithm and the DeepSort algorithm to detect, track, and count pedestrian traffic in the surveillance camera information, thereby obtaining historical pedestrian traffic data for each road and the main entrance / exit within a preset time period of a first preset time in the past. The YOLOv3 algorithm is a commonly used object detection algorithm, while the DeepSort algorithm is a multi-object tracking algorithm based on object detection.
[0026] Understandably, the park can monitor pedestrian traffic at each road and main entrance / exit by installing binocular cameras at the roads and main entrance / exit. Preferably, the first preset time period can be two months, and the preset time period can be 16:00-8:00, meaning that historical pedestrian traffic data for each road and main entrance / exit over the past 60 days from 16:00 to 8:00 can be obtained based on the park's surveillance camera information combined with the YOLOv3 algorithm and the DeepSort algorithm.
[0027] S103. The historical pedestrian flow data of the total entrance and exit and the historical pedestrian flow data of each road are respectively organized into pedestrian flow sequence data, and the STL decomposition method is used to decompose all the obtained pedestrian flow sequence data, so as to decompose the pedestrian flow sequence data at each moment into an equally weighted trend sequence. T Seasonal sequence S and random sequences R .
[0028] In this step, historical pedestrian flow data can be normalized into a uniform format of pedestrian flow sequence data based on time, and then the normalized pedestrian flow sequence data can be decomposed using the STL decomposition method.
[0029] In this embodiment, the pedestrian flow sequence data may include time and corresponding pedestrian flow. Preferably, the last moment corresponding to each time period (e.g., within 1 hour) of the collected data is used as the time index. For example, if the pedestrian flow from 20:00 to 21:00 on January 11, 2023 is 100, it can be normalized into pedestrian flow sequence data in the format 2023 / 1 / 11 21:00,100.
[0030] S104. Collect the park's peak commuting times, holiday dates, and daily weather conditions, and analyze the trend sequence. T Seasonal sequence S and random sequences R Add numerical markers to indicate whether it is rush hour, holiday dates, and weather conditions to obtain seasonal sequences.S’、 Trend sequence T’ and random sequences R’ .
[0031] Understandably, pedestrian traffic on park roads is affected by external factors such as weather and holidays. Weather information is sourced from the meteorological bureau's official website and, for the sake of uniformity, roughly includes ten weather conditions: sunny, cloudy, overcast, showers, light rain (light snow), moderate rain (moderate snow), heavy rain (heavy snow), rainstorm (blizzard), fog (haze), and sandstorm, which can be represented by the numbers 1-10 respectively.
[0032] In this invention, to improve the prediction accuracy of the model, time is used as the correlation field in the trend sequence before entering the model prediction. T t Seasonal sequence S t and random sequences R t The algorithm introduces external features, namely, incorporating numerical markers representing whether it is rush hour, whether it is a holiday, and weather conditions into the trend sequence at the same time. T t Seasonal sequence S t and random sequences R t For example, if the final data after integration is: 2023 / 1 / 11 21:00,1,0,5,50, it means that from 20:00 to 21:00 on January 11, 2023, it was the peak commuting time, not a holiday, the weather was light rain, and the pedestrian flow was 50.
[0033] S105, Sequence of each season S’、 Trend sequence T’ and random sequences R’ Input the Transformer model and sum the prediction results of each sequence after passing through the Transformer model to obtain the predicted pedestrian flow at the total entrance and exit of the park and the predicted pedestrian flow on each road.
[0034] In this embodiment, all seasonal sequences can be... S’、 Trend sequence T’ and random sequences R’ The dataset is divided into a training set and a test set at a specific ratio, and each sequence in the training set and the test set is used to train the Transformer model.
[0035] The Transformer model of this invention consists of three identical sub-modules stacked together. Each sub-module mainly includes a multi-head attention mechanism layer and a fully connected layer. The outputs of the multi-head attention mechanism layer and the fully connected layer need to be subjected to residual connection and normalization operations.
[0036] Preferably, the Transformer model first performs feature extraction on the input sequence. The feature extraction includes converting the input sequence into a mathematical vector representation, adding positional encoding to obtain an input matrix, then passing the input matrix through three Transformer sub-modules for feature extraction, and finally connecting a fully connected layer to transform the data dimension to 1 dimension, thereby obtaining the prediction result for each sequence.
[0037] The specific method of summing the prediction results of each sequence after passing through the Transformer model is as follows: the prediction results of each sequence after passing through the Transformer model are summed with the same weight to obtain the predicted pedestrian flow of the total entrance and exit of the park and the predicted pedestrian flow of each road.
[0038] S106. Calculate the error in the predicted pedestrian flow at the total entrances and exits. and the average error of predicted pedestrian flow for each road ,like Then, the predicted pedestrian flow for each road is adjusted based on the predicted pedestrian flow at the park's total entrance and exit.
[0039] Since the park is a closed area with fixed entrances and exits, the predicted pedestrian flow at the total entrances and exits is often not exactly equal to the sum of the predicted pedestrian flow on each road over a period of time. In order to balance the two prediction results and make the local pedestrian flow prediction results of each road more accurate, this invention corrects the predicted pedestrian flow on each road by using the predicted pedestrian flow at the total entrances and exits.
[0040] Understandably, there is an error in the predicted pedestrian flow at the main entrances and exits. and the average error of predicted pedestrian flow for each road It can be calculated based on the predicted pedestrian flow predicted by the Transformer model and the historical pedestrian flow data obtained by detecting, tracking and counting from surveillance camera information.
[0041] S107. Adjust the lighting power of the streetlights on each road according to the final predicted pedestrian flow for each time of each road after correction, so as to carry out time-segmented dimming control of the streetlights in the park.
[0042] In this step, adjusting the lighting power of the streetlights based on the final predicted pedestrian flow for each road at each moment specifically includes: comparing the final predicted pedestrian flow for each road at each moment with a maximum preset threshold and a minimum preset threshold; when the final predicted pedestrian flow is less than or equal to the minimum preset threshold, controlling the lighting power of the streetlights to remain at the minimum lighting power. P min When the predicted pedestrian flow is greater than or equal to the maximum preset threshold, the lighting power of the streetlights on that road will be kept constant at the maximum lighting power.P max When the final predicted pedestrian flow falls between the maximum and minimum preset thresholds, according to the formula... Control and adjust the lighting power of the streetlights on this road ,in, a The positive correlation coefficient For each road, the final predicted pedestrian flow is corrected. P min P max It can be seen that when the final predicted pedestrian flow is between the maximum and minimum preset thresholds, the lighting power and pedestrian flow are linearly correlated.
[0043] Preferably, in this embodiment, the minimum preset threshold and the maximum preset threshold can be 50 and 1000 respectively, and the minimum lighting power... P min and maximum lighting power P max The values can be 100W and 350W respectively, and in some embodiments, the above values can be adjusted according to actual needs.
[0044] In summary, the street lighting control method of this invention firstly adapts the daily light-on and light-off times by combining sunrise and sunset times with the weather conditions. Secondly, it acquires historical pedestrian traffic data from park cameras and uses the STL decomposition method to decompose the normalized pedestrian traffic sequence data into three equally weighted sequences. After decomposition, each sequence is combined with the park's peak commuting times, holiday dates, and daily weather conditions. Then, the Transformer model is used to predict the pedestrian traffic at the park's main entrance and on each road. Finally, the predicted pedestrian traffic at the park's main entrance is corrected based on the predicted pedestrian traffic at the park's main entrance. Based on the corrected predicted pedestrian traffic at each time point, the lighting power of the streetlights on each road is adjusted to achieve time-segmented dimming control of the park's street lighting. This overcomes the shortcomings of current intelligent lighting methods for parks, achieves energy conservation in the park, and realizes the goals of energy saving, emission reduction, cost reduction, and efficiency improvement.
[0045] Figure 2 This is a schematic block diagram of a street lighting control system 300 provided in an embodiment of the present invention. Figure 2 As shown, corresponding to the street lighting control method of the above embodiments, the present invention also provides a street lighting control system 300. This street lighting control system 300 includes a unit for executing the street lighting control method of the above embodiments, and the system can be configured in a server. Specifically, please refer to... Figure 2The street lighting control system 300 includes a calculation and adjustment unit 301, a data acquisition unit 302, a regularization and decomposition unit 303, a feature fusion unit 304, a pedestrian flow prediction unit 305, a correction and allocation unit 306, and a dimming control unit 307.
[0046] The calculation and adjustment unit 301 is used to calculate the sunrise and sunset times of the day and determine the on-time and off-time of the park streetlights in combination with the weather of the day. Preferably, the sunrise and sunset time is calculated based on the geographical location of the park using a sunrise and sunset algorithm, and then the on-time and off-time of the park streetlights are adaptively adjusted in combination with the sunrise and sunset time and the weather of the day.
[0047] The data acquisition unit 302 is used to acquire historical pedestrian flow data for each road and the main entrance / exit in the park; specifically, it is used to: acquire surveillance camera information from the main entrance / exit and all roads in the park, and sequentially use the YOLOv3 algorithm and the DeepSort algorithm to detect, track, and count the pedestrian flow in the surveillance camera information, thereby acquiring historical pedestrian flow data for each road and the main entrance / exit within a preset time period of the past first preset time. The YOLOv3 algorithm is a commonly used target detection algorithm, while the DeepSort algorithm is a multi-target tracking algorithm based on target detection.
[0048] The normalization and decomposition unit 303 is used to normalize the historical pedestrian flow data of the total entrance and exit and the historical pedestrian flow data of each road into sequence data, and to decompose all the obtained pedestrian flow sequence data using the STL decomposition method, so as to decompose the pedestrian flow sequence data at each moment into an equally weighted trend sequence. T Seasonal sequence S and random sequences R Understandably, historical pedestrian flow data can be normalized into a unified format of pedestrian flow sequence data based on time, and then all normalized pedestrian flow sequence data can be decomposed using the STL decomposition method. In this embodiment, the pedestrian flow sequence data may include time and corresponding pedestrian flow.
[0049] The feature fusion unit 304 is used to collect the park's peak commuting times, holiday dates, and daily weather conditions, and in the trend sequence T t Seasonal sequence S t and random sequences R t Add numerical markers to indicate whether it is rush hour, holiday dates, and weather conditions to obtain seasonal sequences. S’、 Trend sequence T’ and random sequences R’Because pedestrian traffic on park roads is affected by external factors such as weather and holidays, in order to improve the model's prediction accuracy, time is used as a correlation field in the trend sequence before entering the model for prediction. T t Seasonal sequence S t and random sequences R t The algorithm introduces external features, namely, incorporating numerical markers representing whether it is rush hour, whether it is a holiday, and weather conditions into the trend sequence at the same time. T t Seasonal sequence S t and random sequences R t middle.
[0050] The crowd flow prediction unit 305 is used to predict each seasonal sequence S’、 Trend sequence T’ and random sequences R’ The Transformer model is input, and the prediction results of each sequence after passing through the Transformer model are summed to obtain the predicted pedestrian flow at the total entrance and exit of the park and the predicted pedestrian flow on each road. Preferably, in this embodiment, the sequences are predicted using different parallel Transformer models respectively; finally, the prediction values of the different Transformer models are summed to obtain the final prediction value. Specifically, summing the prediction results of each sequence after passing through the Transformer model involves summing the prediction results of each sequence after passing through the Transformer model with equal weights to obtain the predicted pedestrian flow at the total entrance and exit of the park and the predicted pedestrian flow on each road.
[0051] The correction allocation unit 306 is used to calculate the error of the predicted pedestrian flow at the total entrances and exits. and the average error of predicted pedestrian flow for each road ,like The predicted pedestrian flow for each road is then corrected based on the predicted pedestrian flow at the total entrance and exit of the park. Since the park is a closed area with fixed entrances and exits, in order to make the local pedestrian flow prediction results for each road more accurate, this invention corrects the predicted pedestrian flow for each road based on the predicted pedestrian flow at the total entrance and exit.
[0052] The dimming control unit 307 is used to adjust the lighting power of the streetlights on each road according to the final predicted pedestrian flow at each time of each road, so as to perform time-based dimming control of the streetlights in the park. Preferably, adjusting the lighting power of the streetlights according to the final predicted pedestrian flow at each time of each road specifically includes: comparing the final predicted pedestrian flow at each time of each road with a maximum preset threshold and a minimum preset threshold; when the final predicted pedestrian flow is less than or equal to the minimum preset threshold, controlling the lighting power of the streetlights to remain at the minimum lighting power. P min When the predicted pedestrian flow is greater than or equal to the maximum preset threshold, the lighting power of the streetlights on that road will be kept constant at the maximum lighting power. P max When the final predicted pedestrian flow falls between the maximum and minimum preset thresholds, according to the formula... Control and adjust the lighting power of the streetlights on this road ,in, a The positive correlation coefficient For each road, the final predicted pedestrian flow is corrected. P min P max .
[0053] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned street lighting control system 300 and its various units can be referred to the corresponding descriptions in the foregoing method embodiments. For the sake of convenience and brevity, these details will not be repeated here.
[0054] The aforementioned street lighting control system 300 can be implemented as a computer program, which can, for example... Figure 3 It runs on the computer device shown.
[0055] Please see Figure 3 , Figure 3 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a server, which can be a standalone server or a server cluster composed of multiple servers.
[0056] See Figure 3 The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.
[0057] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a street lighting control method.
[0058] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0059] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a street lighting control method.
[0060] This network interface 505 is used for network communication with other devices. Those skilled in the art will understand that... Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0061] The processor 502 is used to run a computer program 5032 stored in the memory to perform the following steps: calculate the sunrise and sunset times of the day, and determine the on and off times of the park's streetlights based on the weather conditions of the day; acquire historical pedestrian flow data for each road and the main entrance / exit in the park; organize the historical pedestrian flow data of the main entrance / exit and the historical pedestrian flow data of each road into pedestrian flow sequence data, and use the STL decomposition method to decompose all the acquired pedestrian flow sequence data, so as to decompose the pedestrian flow sequence data at each moment into an equally weighted trend sequence. T Seasonal sequence S and random sequences R Collect data on peak commuting times, holiday dates, and daily weather conditions within the park, and analyze the trend sequence. T t Seasonal sequence S t and random sequences R t Add numerical markers to indicate whether it is rush hour, holiday dates, and weather conditions to obtain seasonal sequences. S’、 Trend sequence T’ and random sequences R’ ; The sequence of each season S’、 Trend sequence T’ and random sequences R’Input the Transformer model and sum the prediction results of each sequence after passing through the Transformer model to obtain the predicted pedestrian flow at the total entrance and exit of the park and the predicted pedestrian flow on each road; calculate the error of the predicted pedestrian flow at the total entrance and exit. and the average error of predicted pedestrian flow for each road ,like The predicted pedestrian flow of each road is then adjusted based on the predicted pedestrian flow of the park's total entrance and exit. The lighting power of the streetlights on each road is then adjusted based on the final predicted pedestrian flow of each road at each time, so as to carry out time-segmented dimming control of the park's streetlights.
[0062] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0063] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0064] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When executed by a processor, the program instructions cause the processor to perform the following steps: calculate the sunrise and sunset times for the day, and determine the on / off times of the park's streetlights based on the day's weather; acquire historical pedestrian flow data for each road and the main entrance / exit in the park; organize the historical pedestrian flow data of the main entrance / exit and the historical pedestrian flow data of each road into pedestrian flow sequence data, and decompose all the acquired pedestrian flow sequence data using the STL decomposition method, so as to decompose the pedestrian flow sequence data at each moment into an equally weighted trend sequence. T Seasonal sequence Sand random sequences R Collect data on peak commuting times, holiday dates, and daily weather conditions within the park, and analyze the trend sequence. T t Seasonal sequence S t and random sequences R t Add numerical markers to indicate whether it is rush hour, holiday dates, and weather conditions to obtain seasonal sequences. S’、 Trend sequence T’ and random sequences R’ ; The sequence of each season S’、 Trend sequence T’ and random sequences R’ Input the Transformer model and sum the prediction results of each sequence after passing through the Transformer model to obtain the predicted pedestrian flow at the total entrance and exit of the park and the predicted pedestrian flow on each road; calculate the error of the predicted pedestrian flow at the total entrance and exit. and the average error of predicted pedestrian flow for each road ,like The predicted pedestrian flow of each road is then adjusted based on the predicted pedestrian flow of the park's total entrance and exit. The lighting power of the streetlights on each road is then adjusted based on the final predicted pedestrian flow of each road at each time, so as to carry out time-segmented dimming control of the park's streetlights.
[0065] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0066] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0067] In the embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of each unit is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0068] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the system of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0069] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a client, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0070] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A street light lighting control method, characterized in that, include: Obtain historical pedestrian flow data for each road and the total entrance / exit within the park; The historical pedestrian flow data of the total entrances and exits and the historical pedestrian flow data of each road were organized into pedestrian flow sequence data. The STL decomposition method was then used to decompose all the obtained pedestrian flow sequence data, so that the pedestrian flow sequence data at each moment was decomposed into an equally weighted trend sequence. T Seasonal sequence S and random sequences R ; Collect data on peak commuting times, holiday dates, and daily weather conditions within the park, and analyze the trend sequence. T Seasonal sequence S and random sequences R Add numerical markers to indicate whether it is rush hour, holiday dates, and weather conditions to obtain seasonal sequences. S’、 Trend sequence T’ and random sequences R’ ; Each seasonal sequence S’、 Trend sequence T’ and random sequences R’ Input the Transformer model and sum the prediction results of each sequence after passing through the Transformer model to obtain the predicted pedestrian flow of the total entrance and exit of the park and the predicted pedestrian flow of each road; Error in calculating predicted pedestrian flow at total entrances and exits and the average error of predicted pedestrian flow for each road ,like Then, the predicted pedestrian flow for each road is adjusted based on the predicted pedestrian flow at the total entrance and exit of the park; The lighting power of the streetlights on each road is adjusted according to the final predicted pedestrian flow for each time of day, so as to carry out time-segmented dimming control of the streetlights in the park.
2. The street lighting control method as described in claim 1, characterized in that, The method of adjusting the lighting power of streetlights on each road based on the final predicted pedestrian flow for each road at each moment, specifically includes: The final predicted pedestrian flow for each road at each time moment is compared with the maximum and minimum preset thresholds. When the final predicted pedestrian flow is less than or equal to the minimum preset threshold, the lighting power of the streetlights on that road is controlled to remain at the minimum lighting power. P min When the predicted pedestrian flow is greater than or equal to the maximum preset threshold, the lighting power of the streetlights on that road will be kept constant at the maximum lighting power. P max When the final predicted pedestrian flow falls between the maximum and minimum preset thresholds, according to the formula... Control and adjust the lighting power of the streetlights on this road Where a is the positive correlation coefficient. For each road, the final predicted pedestrian flow is corrected. P min P max .
3. The street lighting control method as described in claim 1, characterized in that, The step of summing the prediction results of each sequence after passing through the Transformer model specifically includes: summing the prediction results of each sequence after passing through the Transformer model with the same weight.
4. The street lighting control method as described in claim 1, characterized in that, The acquisition of historical pedestrian flow data for each road and total entrance / exit in the park specifically includes: The system acquires surveillance camera information from the main entrance and all roads within the park. It then uses the YOLOv3 algorithm and the DeepSort algorithm to detect, track, and count the pedestrian flow in the surveillance camera information, thereby obtaining historical pedestrian flow data for each road and the main entrance within a preset time period of the first preset time in the past.
5. The street lighting control method as described in claim 1, characterized in that, Prior to obtaining historical pedestrian flow data for each road and total entrance / exit in the park, the following steps were also included: Calculate the sunrise and sunset times for the day, and determine the on and off times of the park's streetlights based on the weather conditions.
6. The street lighting control method as described in claim 5, characterized in that, The calculation of the sunrise and sunset times for the day, combined with the weather conditions, to determine the on and off times of the park's streetlights specifically includes: The sunrise / sunset algorithm is used to calculate the sunrise time T of the day based on the geographical location of the park. C and sunset time T L ; Get the weather for the day. If the weather is sunny, then use the sunrise time T. C and sunset time T L This refers to the time when the park's streetlights are turned off and on; And if the weather on that day is In case of rain, snow, hail, sandstorm, or cloudy weather, the lighting time T should be adjusted accordingly. on =T L - Δt Lights off time T off =T C + Δt ,in, .
7. A street light lighting control system, characterized in that, include: Includes a unit for performing the method as described in any one of claims 1-6.
8. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1-6.
9. A storage medium, characterized in that, The storage medium stores a computer program, which includes program instructions that, when executed by a processor, can implement the method as described in any one of claims 1-6.