Urban lighting demand prediction method and system based on spatio-temporal graph neural network

CN122549655APending Publication Date: 2026-08-11SHENZHEN DEWEI ELECTRIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610690265.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-19
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0005]针对现有技术的不足,本发明提供了基于时空图神经网络的城市照明需求预测方法及系统,解决了上述背景技术中提出的预测模型在事件发生时段及周边区域出现偏差,无法保证预测结果的实时准确性的问题

Benefits of technology

1.本发明中,通过融合来自物联网终端与城市管理数据库的多源异构数据构建统一时空数据集,并利用时空图神经网络同时学习城市中不同节点在时间和空间维度上的复杂依赖关系,能够更全面、准确地刻画城市照明需求的形成与演化规律,从而提高对未来照明需求强度预测的精度和可靠性,为节能调控提供依据。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122549655A_ABST
    Figure CN122549655A_ABST
Patent Text Reader

Abstract

This invention relates to the field of intelligent lighting technology and discloses a method and system for predicting urban lighting demand based on a spatiotemporal graph neural network. The system includes: a multi-source data perception and processing module, a spatiotemporal graph construction and feature learning module, a meta-learning adaptive prediction module, a lighting strategy optimization and execution module, and a model online update module. By integrating multi-source heterogeneous data from IoT terminals and urban management databases to construct a unified spatiotemporal dataset, and utilizing a spatiotemporal graph neural network to simultaneously learn the complex dependencies of different nodes in the city in the temporal and spatial dimensions, it can more comprehensively and accurately depict the formation and evolution of urban lighting demand, thereby improving the accuracy and reliability of predicting future lighting demand intensity and providing a basis for energy-saving regulation. By introducing a meta-learning strategy, the prediction model can utilize historical experience to adapt to new urban areas and time periods, solving the problem of insufficient generalization ability of the model in unfamiliar scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent lighting technology, specifically to a method and system for predicting urban lighting demand based on a spatiotemporal graph neural network. Background Technology

[0002] As a core component of smart city infrastructure, urban lighting systems cover all areas including roads, commercial areas, residential areas, and public green spaces. Their operational stability and energy consumption levels are directly related to urban operating costs, public safety, and residents' quality of life.

[0003] Currently, the sensing data relied upon for urban lighting demand forecasting is mainly based on fixed spatiotemporal sampling patterns and static historical statistical characteristics. It is impossible to perceive and integrate the transient impact of sudden urban events on local lighting demand in real time. When such impacts are not captured and used for forecasting in a timely manner, the forecasting model will deviate during the event period and in the surrounding area, and the real-time accuracy of the forecast results cannot be guaranteed.

[0004] Therefore, a method and system for predicting urban lighting demand based on spatiotemporal graph neural networks are proposed to solve the above problems. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method and system for predicting urban lighting demand based on spatiotemporal graph neural networks. This solves the problem that the prediction models proposed in the background art exhibit deviations during the event occurrence period and in the surrounding area, failing to guarantee the real-time accuracy of the prediction results.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a method and system for predicting urban lighting demand based on a spatiotemporal graph neural network, wherein the method includes the following steps: S1. Collect multi-source urban data and preprocess it to generate a standard spatiotemporal dataset; S2. Based on the aforementioned standard spatiotemporal dataset, construct a spatiotemporal heterogeneous graph and generate spatiotemporal graph structure data; S3. Based on the spatiotemporal graph structure data, perform embedding representation learning of graph nodes and edges to generate preliminary spatiotemporal feature vectors; S4. Based on the preliminary spatiotemporal feature vector, a multi-head attention mechanism is introduced to perform feature fusion and generate an enhanced spatiotemporal feature vector. S5. Based on the enhanced spatiotemporal feature vector, the model is rapidly and adaptively trained using a meta-learning strategy to generate meta-learning model parameters. S6. Based on the enhanced spatiotemporal feature vector and the meta-learning model parameters, predict future lighting demand across multiple time periods to generate demand intensity prediction data; S7. Based on the demand intensity prediction data, perform lighting control command mapping and scheduling optimization to generate a dynamic control command sequence; S8. Based on the dynamic control command sequence, drive the lighting facilities to perform adjustments and collect actual energy consumption feedback data; S9. Based on the actual energy consumption feedback data and the demand intensity prediction data, perform prediction error calculation and model adversarial training to generate an updated prediction model.

[0007] Preferably, the step S1 of collecting and preprocessing multi-source urban data includes the following steps: S11. Through IoT sensing terminals deployed throughout the city and the city management database, collect multi-source heterogeneous sensing data for historical periods and real-time periods. The multi-source heterogeneous sensing data includes: historical lighting energy consumption time series data, real-time traffic flow data, real-time meteorological environment data, real-time pedestrian flow and event data, urban geographic information grid data, and urban functional zoning attribute data. S12. Perform time alignment and missing value interpolation on the collected historical lighting energy consumption time series data, real-time traffic flow data, real-time meteorological environment data, real-time pedestrian flow and event data to generate sensing data; S13. Spatial correlation and standardization processing are performed on the perceived data, the urban geographic information grid data, and the urban functional zoning attribute data to eliminate dimensional differences and generate the standard spatiotemporal dataset.

[0008] Preferably, the generation of spatiotemporal graph structure data in step S2 includes the following steps: S21. Each street light controller in the urban geographic information grid is used as a graph node; S22. Define multiple types of edges to characterize different spatiotemporal relationships between nodes, including: spatial adjacency edges built based on physical distance, nearest neighbor edges built based on Euclidean distance of historical lighting energy consumption time series, dynamic influence edges built based on real-time traffic flow correlation, and self-connecting edges across time steps to model the temporal evolution of the nodes themselves. S23. Assign the multi-dimensional feature data in the standard spatiotemporal dataset to the corresponding graph nodes and edges to construct a spatiotemporal graph structure data containing node features, edge features, and edge types.

[0009] Preferably, the generation of the preliminary spatiotemporal feature vector in S3 includes the following steps: S31. Obtain the spatiotemporal graph structure data; S32. Use a heterogeneous graph neural network to process the spatiotemporal graph structure data, perform message passing and aggregation for different types of edges, learn the high-order spatial structure features of each graph node under its multi-hop neighbors and topological connection relationships, and generate node spatial embedding vectors. S33. Organize the node spatial embedding vector according to the time series, input it into the temporal convolutional network, capture the local and long-term dependency patterns of each node in the time dimension, and generate node spatiotemporal evolution feature vectors. S34. Output the spatiotemporal evolution feature vector of the node as the initial spatiotemporal feature vector.

[0010] Preferably, generating the enhanced spatiotemporal feature vector in step S4 includes the following steps: S41. Obtain the preliminary spatiotemporal feature vector; S42. In the spatial dimension, a graph attention network mechanism is applied to calculate the attention weight between the target node and the features of its neighboring nodes, and the neighboring node information is adaptively weighted and aggregated to generate spatial attention-weighted features. S43. In the time dimension, apply the temporal attention mechanism to calculate the importance weight of features at different historical time steps to predict future moments, selectively focus on key historical moment information, and generate time attention weighted features. S44. The spatial attention-weighted features and the temporal attention-weighted features are concatenated and fused, and then nonlinear transformation and feature compression are performed through a feedforward neural network to generate an enhanced spatiotemporal feature vector.

[0011] Preferably, the generative learning model parameters in S5 include the following steps: S51. Construct a meta-learning task, treating lighting prediction problems from different urban areas as different tasks; S52. In the meta-training stage, the enhanced spatiotemporal feature vector is processed by a parameter generation network to generate model parameter adjustment amounts that are adaptive to the current specific prediction task. S53. In the meta-testing phase, a small amount of the latest observation data of the target prediction area is used as the support set to generate model parameter adjustment amounts, and combined with the basic parameters of the model, the meta-learning model parameters are obtained.

[0012] Preferably, generating demand intensity prediction data in step S6 includes the following steps: S61. Obtain the enhanced spatiotemporal feature vector and the parameters of the meta-learning model; S62. Input the enhanced spatiotemporal feature vector into the parameterized meta-learning spatiotemporal prediction model; S63. The meta-learning spatiotemporal prediction model decodes and outputs the predicted value of lighting demand intensity for the first preset time interval in the future based on the input features. The predicted value is represented by the expected illuminance of each graph node in each future time period, generating demand intensity prediction data.

[0013] Preferably, generating the dynamic control command sequence in step S7 includes the following steps: S71. Obtain the demand intensity prediction data; S72. Establish a mapping model between lighting demand intensity and specific street light control commands. The mapping model takes into account the physical characteristics of street lights, group control strategies, dimming curves, and energy-saving constraints. S73. Using the total energy consumption threshold, illumination uniformity threshold and safety lighting parameters within the predicted time period as constraints, a heuristic optimization algorithm is used to globally schedule and optimize the sequence of control commands to generate the final dynamic control command sequence. This command sequence includes the target brightness level and on / off status of each street light controller at different time points.

[0014] Preferably, step S9 includes the following steps: S91. After executing S8, collect actual urban lighting energy consumption data and compare it with the demand intensity prediction data for the corresponding time period, calculate the prediction error, record the demand intensity prediction data as the prediction data, and record the actual urban lighting energy consumption data as the real data. S92. Construct a discriminator network, input the predicted data and the real data into the discriminator network, and generate a discrimination result; S93. Using the spatiotemporal graph neural network model as a generator, adversarial training is performed with the discriminator to generate a prediction model after adversarial training.

[0015] Preferably, the system includes: The multi-source data sensing and processing module is used to acquire urban multi-source heterogeneous sensing data through the data acquisition unit, and to perform cleaning, alignment and standardization processing through the data preprocessing unit to generate the standard spatiotemporal dataset. The spatiotemporal graph construction and feature learning module is connected to the multi-source data perception and processing module. It is used to build a spatiotemporal heterogeneous graph based on the standard spatiotemporal dataset through the graph structure construction unit, generate the preliminary spatiotemporal feature vector by learning the representation of nodes and edges through the graph neural network embedding unit, and output the enhanced spatiotemporal feature vector using the spatiotemporal attention fusion unit. The meta-learning adaptive prediction module, connected to the spatiotemporal graph construction and feature learning module, is used to divide the prediction task through the meta-task construction unit, generate the meta-learning model parameters based on the enhanced spatiotemporal feature vector through the fast parameter adaptation unit, and output the demand intensity prediction data by the demand prediction unit. The lighting strategy optimization and execution module is connected to the meta-learning adaptive prediction module. It is used to convert the demand intensity prediction data into control commands through the command mapping unit, generate the dynamic control command sequence through the scheduling optimization unit, and drive the lighting facilities and collect the actual energy consumption feedback data through the command execution and feedback unit. The online model update module is connected to the lighting strategy optimization and execution module. It is used to compare the actual energy consumption feedback data with the demand intensity prediction data through the error calculation unit, update the model parameters through the adversarial training unit, and output the updated prediction model.

[0016] Compared with existing technologies, this invention provides a method and system for predicting urban lighting demand based on spatiotemporal graph neural networks, which has the following beneficial effects: 1. In this invention, a unified spatiotemporal dataset is constructed by integrating multi-source heterogeneous data from IoT terminals and urban management databases. By utilizing a spatiotemporal graph neural network to simultaneously learn the complex dependencies of different nodes in the city in the temporal and spatial dimensions, the formation and evolution of urban lighting demand can be more comprehensively and accurately depicted, thereby improving the accuracy and reliability of predicting future lighting demand intensity and providing a basis for energy-saving regulation.

[0017] 2. In this invention, by introducing a meta-learning strategy, the prediction model can adapt to new urban areas and time periods using historical experience, thus solving the problem of insufficient generalization ability of the model in unfamiliar scenarios. At the same time, by performing similarity metric evaluation on the spatial neighbor features and its own historical time features of each node, and performing weighted feature fusion accordingly, the model can capture changes in the dynamic functional connections of the city, thereby enhancing the adaptability and robustness of the prediction system in real, complex, and dynamic environments.

[0018] 3. In this invention, by constructing a spatiotemporal heterogeneous graph containing multiple relationships, it is possible to distinguish and express the differentiated lighting demand patterns of different functional areas. On this basis, by using optimization algorithms to generate control strategies with the goal of dynamic control command sequences of zoning, time-based and hierarchical division, the overall energy efficiency and rationality of resource allocation of the urban lighting system are improved while meeting public safety and functional requirements. Attached Figure Description

[0019] Figure 1 This is a flowchart of the urban lighting demand prediction method based on spatiotemporal graph neural network of the present invention; Figure 2 This is a diagram illustrating the architecture of the urban lighting demand prediction system based on a spatiotemporal graph neural network, as described in this invention. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] For specific implementation examples, please refer to: Figures 1-2 A method and system for predicting urban lighting demand based on spatiotemporal graph neural networks, the method comprising the following steps: S1. Collect multi-source urban data and preprocess it to generate a standard spatiotemporal dataset; S2. Based on the standard spatiotemporal dataset, construct a spatiotemporal heterogeneous graph and generate spatiotemporal graph structure data; S3. Based on the spatiotemporal graph structure data, perform embedding representation learning of graph nodes and edges to generate preliminary spatiotemporal feature vectors; S4. Based on the initial spatiotemporal feature vector, a multi-head attention mechanism is introduced to perform feature fusion and generate an enhanced spatiotemporal feature vector. S5. Based on the enhanced spatiotemporal feature vector, the model is rapidly and adaptively trained using a meta-learning strategy to generate meta-learning model parameters. S6. Based on the enhanced spatiotemporal feature vector and meta-learning model parameters, predict future lighting demand across multiple time periods and generate demand intensity prediction data. S7. Based on demand intensity prediction data, perform lighting control command mapping and scheduling optimization to generate dynamic control command sequence; S8. Based on the dynamic control command sequence, drive the lighting facilities to perform adjustments and collect actual energy consumption feedback data; S9. Based on actual energy consumption feedback data and demand intensity prediction data, calculate prediction error and perform adversarial training of the model to generate an updated prediction model.

[0022] The process of collecting and preprocessing multi-source urban data in S1 includes the following steps: S11. Through IoT sensing terminals deployed throughout the city and urban management database, collect multi-source heterogeneous sensing data for historical and real-time periods. The multi-source heterogeneous sensing data includes: historical lighting energy consumption time series data, real-time traffic flow data, real-time meteorological environment data, real-time pedestrian flow and event data, urban geographic information grid data, and urban functional zoning attribute data. S12. Perform time alignment and missing value interpolation on the collected historical lighting energy consumption time series data, real-time traffic flow data, real-time meteorological environment data, real-time pedestrian flow and event data to generate sensing data; S13. Perform spatial correlation and standardization processing on the sensing data, urban geographic information grid data, and urban functional zoning attribute data to eliminate dimensional differences and generate a standard spatiotemporal dataset. Spatial association processing involves spatially mapping geographic information grid data with urban functional zoning attribute data, binding attribute data falling within the same preset geographic grid cell with the identifier of that grid cell. The calculation formula is as follows: ; in, Indicates the first The first geographic grid cell and the first The spatial relationships of urban functional zoning attribute points are represented by 1 indicating inclusion and 0 indicating exclusion. For the first The coordinates of the center point of each functional area For the first The scope of a geographic grid; Standardization is used to eliminate differences in data distribution; the calculation formula is as follows: ; in, For nodes At any moment The raw sensory data, and These are the mean and standard deviation of the historical sensing data for this node, respectively. The data is standardized. Normalization is used to scale data of different dimensions to a uniform interval [0,1]. The calculation formula is as follows: ; in, For the normalized data, and They are nodes Minimum and maximum values ​​of historical data; Through the above standardization and normalization processes, a standard spatiotemporal dataset with unified dimensions is finally generated.

[0023] The steps involved in generating spatiotemporal graph structure data in S2 are as follows: S21. Each street light controller in the urban geographic information grid is used as a graph node; S22. Define multiple types of edges to characterize different spatiotemporal relationships between nodes; including: spatial adjacency edges based on physical distance, nearest neighbor edges based on Euclidean distance of historical lighting energy consumption time series, dynamic influence edges based on real-time traffic flow correlation, and self-connecting edges across time steps to model the temporal evolution of the nodes themselves. The construction of spatially adjacent edges satisfies the following conditions: ; in, Represents a node With nodes Are there any spatially adjacent edges between them? Used for compute nodes With nodes The physical distance between them The preset spatial distance threshold; The nearest neighbor edge is constructed by calculating the similarity between nodes using the following formula, and a connection is established when the similarity is higher than a preset threshold: ; in, Represents a node With nodes Euclidean distance of historical lighting energy consumption series and Representing nodes respectively and nodes In the Energy consumption value per time step. This represents the total length of the time series. The correlation strength of the dynamically influential edge is determined by the statistical correlation of real-time traffic flow data, and the calculation formula is as follows: The correlation strength of the dynamically influential edge is determined by the statistical correlation of real-time traffic flow data, and the calculation formula is as follows: ; in, Indicates at time node arrive The dynamics affect the edge weights. and, They are nodes and Traffic flow sequence within the recent time window, Describing covariance, Represents standard deviation, when When, establish the edge, where, This is a preset correlation strength threshold; S23. Assign the multi-dimensional feature data in the standard spatiotemporal dataset to the corresponding graph nodes and edges to construct a spatiotemporal graph structure data containing node features, edge features, and edge types.

[0024] The process of generating preliminary spatiotemporal feature vectors in S3 includes the following steps: S31. Obtain the spatiotemporal graph structure data; S32. Process spatiotemporal graph structure data using heterogeneous graph neural networks, perform message passing and aggregation for different types of edges, learn the high-order spatial structure features of each graph node under its multi-hop neighbors and topological connections, and generate node spatial embedding vectors, including the following steps: S321. For each graph node in the spatiotemporal graph structure data, receive feature information from neighboring nodes through its different types of edges; S322. For each edge type, use an independent linear transformation layer to transform the feature information transmitted on the edge of that type. S323. The feature information received and transformed from the same node through different types of edges is summed to obtain the intermediate aggregated feature of that node. For the target node... , its first Features obtained by aggregation of layers through addition operations The calculation method is as follows: ; in, For the first Layer nodes eigenvectors, Represents a non-linear activation function. A set of edge types, Indicates the type Edges and nodes The set of connected neighbor nodes, For the corresponding edge type In the The trainable weight matrix of the layer, For neighboring nodes In the features of the previous layer, The normalized factor; S324. Apply a nonlinear activation function to the intermediate aggregation features and update the feature representation of the graph node to complete one message passing and aggregation. S325. Repeat steps S321 to S324 to learn the high-order spatial structure features of each graph node under its multi-hop neighbors and generate node spatial embedding vectors. S33. Organize the node spatial embedding vector according to the time series, input it into the temporal convolutional network, capture the local and long-term dependency patterns of each node in the time dimension, and generate the spatiotemporal evolution feature vector of the node, including the following steps: S331. Arrange the spatial embedding vector of each graph node in chronological order to form the temporal series feature of that node. S332. Using a one-dimensional causal convolutional layer of a temporal convolutional network, a sliding convolution operation is performed on time-series features to capture local dependency patterns in the temporal dimension; the one-dimensional causal convolution operates at each time step. Output The calculation is as follows: ; in, In time step Temporal convolution output, This indicates that the input time series is at time step Features For the convolution kernel at the index Trainable weights, For convolution kernel index, The kernel size is the size of a one-dimensional causal convolution kernel, and satisfies the following conditions: ; S333. By stacking multiple one-dimensional causal convolutional layers and introducing residual connections and dilated convolutions between layers, let the ... The expansion factor of the layer is The convolution kernel weights are , No. The output features of the layer are Then the first Layer output The calculation is as follows: ; in, The size of a one-dimensional causal convolution kernel. For the first The expansion rate of the layer, by increasing Expand the time perception field to capture long-term dependencies. For the first Layer in time step The output characteristics, To modify the activation function of the linear unit, For convolution kernel index, For the first Convolutional kernels at index Trainable weights, For the first Layer in time step The output characteristics, For the first Layer in time step The output feature vector; S334. Use the output of the last layer of the temporal convolutional network as the spatiotemporal evolution feature vector of the node. S34. Output the node spatiotemporal evolution feature vector as the initial spatiotemporal feature vector.

[0025] The process of generating enhanced spatiotemporal feature vectors in S4 includes the following steps: S41. Obtain preliminary spatiotemporal feature vectors; S42. In the spatial dimension, a graph attention network mechanism is applied to calculate the attention weights between the target node and the features of its neighboring nodes. Adaptive weighted aggregation of neighboring node information is then performed to generate spatial attention-weighted features, including the following steps: S421, For the target node and one of its neighboring nodes , the feature vectors of the two nodes and To splice; S422. Input the concatenated feature vector into a shared attention weight calculation layer, and calculate an original attention coefficient using the LeakyReLU activation function. : ; in, For nodes and nodes The original attention coefficients between them For the modified linear unit activation function with leakage, Indicates transpose. For the shared linear transformation weight matrix, For attention vectors, This represents a vector concatenation operation; S423. Use the softmax function on the target node. All neighbors Original attention coefficient Normalization is performed to obtain the normalized attention weights for each neighbor node. : ; in, The attention weights are normalized. It is an exponential function. For nodes The set of all neighboring nodes, For node indexing, , For nodes With nodes , The original attention coefficients between them; S424. Multiply the feature vector of each neighbor node by its corresponding normalized attention weight, and sum the weighted neighbor features to generate the target node. Spatial attention weighted features : ; in, For the index of neighboring nodes, It is a non-linear activation function. For normalized attention weights, For the shared linear transformation weight matrix, For neighboring nodes eigenvectors; S43. In the time dimension, apply a temporal attention mechanism to calculate the importance weights of features at different historical time steps for predicting future moments, selectively focus on key historical moment information, and generate time-attention-weighted features, including the following steps: S431, History Feature vectors at each time step Form a feature matrix; S432, using a trainable weight matrix , , Query matrix for calculating feature matrix Key matrix Sum matrix ; S433. Calculate the dot product of the query matrix and the transpose of the key matrix, and divide by a scaling factor. The unnormalized attention score matrix is ​​obtained as follows: ; in, For normalized exponential functions, Let be the dimension of the key vector. For querying the matrix, The key matrix, For value matrices, Represents the transpose of a matrix; S434. Apply the softmax function to the attention score matrix to obtain the normalized importance weights of each historical time step for predicting future moments. S435, Combine importance weights with value matrix Multiply the results and sum them to generate time-attention-weighted features; S44. Spatial attention-weighted features and temporal attention-weighted features are concatenated and fused, and then nonlinear transformation and feature compression are performed through a feedforward neural network to generate an enhanced spatiotemporal feature vector.

[0026] The parameters of the generative learning model in S5 include the following steps: S51. Construct a meta-learning task, treating lighting prediction problems from different urban areas as different tasks, including the following steps: S511. Sample data from multiple city regions from historical data, with each region's data divided into an independent meta-task. ; S512, For each metatask The data is further divided into support sets for rapid model adaptation. and query sets used to evaluate the effectiveness of the adaptation ; S513. The goal of the meta-learning task is to improve the model parameters. By supporting set After performing a few gradient updates on the corresponding query set, The prediction performance is obtained; its optimization objective is expressed as: ; in, For the first A query set for each task. For the first Support set for each task For loss function, The learning rate for the inner loop. Indicates gradient calculation; S52. In the meta-training phase, the enhanced spatiotemporal feature vectors are processed through a parameter generation network to generate model parameter adjustments that are adaptive to the current specific prediction task. This includes the following steps: S521. The parameter generation network consists of a feature encoder and a parameter predictor. S522, Feature encoder receives enhanced spatiotemporal feature vector And map it to a task context vector. : ; in, For encoder networks, To enhance the spatiotemporal feature vector, For feature encoder Trainable parameters; S523, The parameter predictor uses task context vectors As input, output a set of model parameter adjustments. The adjustment amount corresponds to the trainable parameters in the spatiotemporal graph neural network model. The incremental change is represented by the following mapping relationship: ; in, This refers to the adjustment amount of the model parameters. For parameter predictor networks, For parameter predictor Trainable parameters; S53. In the meta-testing phase, a small amount of the latest observation data of the target prediction area is used as the support set to generate model parameter adjustment amounts, and combined with the basic parameters of the model, the meta-learning model parameters are obtained.

[0027] Generating demand intensity forecast data in S6 includes the following steps: S61. Obtain the enhanced spatiotemporal feature vector and meta-learning model parameters; S62. Input the enhanced spatiotemporal feature vector into the parameterized meta-learning spatiotemporal prediction model; S63. The meta-learning spatiotemporal prediction model decodes and outputs the predicted value of lighting demand intensity for the first preset time interval in the future, based on the input features. The predicted value is represented by the expected illuminance of each graph node in each future time period, generating demand intensity prediction data, including the following steps: S631, The decoder part of the meta-learning spatiotemporal prediction model consists of fully connected layers; S632, Enhance the spatiotemporal feature vector The fully connected layer of the input decoder; S633. Through linear transformation and nonlinear activation of the fully connected layer, the high-dimensional feature vector is mapped to the predicted value of lighting demand intensity corresponding to the first preset time interval in the future. : ; in, and These represent the weights and biases of the fully connected layer of the decoder. The enhanced spatiotemporal feature vector is input to the decoder. It is a non-linear activation function.

[0028] The steps involved in generating a dynamic control command sequence in S7 are as follows: S71. Obtain demand intensity forecast data; S72. Establish a mapping model from lighting demand intensity to specific street light control commands. The mapping model takes into account the physical characteristics of street lights, group control strategies, dimming curves, and energy-saving constraints. S73. Using the total energy consumption threshold, illumination uniformity threshold, and safe lighting parameters within the predicted time period as constraints, a heuristic optimization algorithm is used to globally schedule and optimize the sequence of control commands, generating the final dynamic control command sequence. This command sequence includes the target brightness level and on / off status of each street light controller at different time points, specifically including the following steps: S731. Define the optimization objective function. The objective function is the weighted sum of the estimated total energy consumption of all controlled streetlights during the prediction period and the weighted sum of the illumination uniformity evaluation function. Its mathematical expression is: ; in, To represent the decision variable matrix of the brightness level and on / off state of all streetlights during all optimization periods, Let be the total energy consumption estimation function. Let be the illumination uniformity evaluation function. Since a larger value of the illumination uniformity evaluation function indicates a more uniform illumination distribution, a negative sign is introduced to transform this term into a minimization objective. These are non-negative weighting coefficients; S732. Define optimization constraints, including: the brightness level of each street light at each time point does not exceed its physical upper limit, is not lower than the lower limit specified by the safety lighting parameters, and the illuminance of key areas is not lower than the threshold specified by the safety lighting parameters. S733. Using the encoding of the dynamically controlled instruction sequence as the optimization variable, and employing a pre-defined heuristic optimization strategy, under the premise of satisfying the constraints of S732, iteratively searches to make the objective function of S731 more efficient. The optimized instruction sequence generates the final dynamic control instruction sequence.

[0029] S9 includes the following steps: S91. After executing S8, collect the actual urban lighting energy consumption data and compare it with the demand intensity prediction data for the corresponding time period. Calculate the prediction error, record the demand intensity prediction data as the prediction data, and record the actual urban lighting energy consumption data as the real data. S92. Construct a discriminator network, input the predicted data and the real data into the discriminator network, and generate the discrimination result, including the following steps: S921, Discriminator Network Depend on It consists of a fully connected layer; S922, Forecast data and real data The first fully connected layer of the input discriminator network; S923, Nonlinear transformation is performed sequentially through subsequent fully connected layers and activation functions, the... Layer output The calculation is as follows: ; in, and For the first Layer weights and biases For the discriminator The output feature vector of the layer, For the discriminator The output feature vector of the layer, Nonlinear activation function; S924. Finally, the output layer is passed through a sigmoid function, which outputs a scalar value between 0 and 1. As the discrimination result, it represents the probability that the input data is judged as real data: ; in, The output function of the discriminator. The weight vector of the output layer. For the discriminator The layer, specifically the output feature vector of the last hidden layer. For the bias of the output layer, Indicates transpose; S93. Using the spatiotemporal graph neural network model as a generator, adversarially train it against the discriminator to generate a predictive model after adversarial training, including the following steps: S931, Fixed Generator The parameters use real data. and the prediction data generated by the generator For discriminator Training was conducted, including... , The input features are used to minimize the discrimination error of the discriminator between the real and predicted data. The corresponding loss function is... for: ; in, Let the loss function be that of the discriminator. For expectation operator, For real data, To make the discriminator use real data The probability of being judged as true. The generator is based on input features The generated prediction data, The discriminator will generate data The probability of being judged as true. Input to the generator Distribution; S932, Fixed Discriminator The parameters for the generator The training objective is to maximize the discriminator's discrimination error against the generator's predicted data, corresponding to the loss function. for: ; in, Let the loss function of the generator be... For expectation operator, As input features, For the generator based on The generated prediction data, The discriminator will generate data The probability of being judged as true. Input to the generator The distribution of .

[0030] S933. Alternately repeat steps S931 and S932 until the training process reaches equilibrium, generating a predictive model after adversarial training.

[0031] The system includes: The multi-source data sensing and processing module is used to acquire multi-source heterogeneous sensing data of the city through the data acquisition unit, and then perform cleaning, alignment and standardization processing through the data preprocessing unit to generate a standard spatiotemporal dataset. The spatiotemporal graph construction and feature learning module connects to the multi-source data perception and processing module. It is used to build a spatiotemporal heterogeneous graph based on a standard spatiotemporal dataset through the graph structure construction unit, generate a preliminary spatiotemporal feature vector by learning the representation of nodes and edges through the graph neural network embedding unit, and output an enhanced spatiotemporal feature vector using the spatiotemporal attention fusion unit. The meta-learning adaptive prediction module connects the spatiotemporal graph construction and feature learning modules. It is used to divide prediction tasks through the meta-task construction unit, generate meta-learning model parameters based on the enhanced spatiotemporal feature vector through the fast parameter adaptation unit, and output demand intensity prediction data by the demand prediction unit. The lighting strategy optimization and execution module is connected to the meta-learning adaptive prediction module. It is used to convert the demand intensity prediction data into control commands through the command mapping unit, generate a dynamic control command sequence through the scheduling optimization unit, and drive the lighting facilities and collect actual energy consumption feedback data by the command execution and feedback unit. The online model update module connects to the lighting strategy optimization and execution module. It is used to compare the actual energy consumption feedback data with the demand intensity prediction data through the error calculation unit, and update the model parameters through the adversarial training unit to output the updated prediction model.

[0032] The operation steps of the urban lighting demand prediction method and system based on spatiotemporal graph neural networks are as follows: Step 1: Multi-source data acquisition and fusion processing: This method first collects historical and real-time multi-source heterogeneous sensing data through IoT sensing terminals deployed throughout the city and urban management databases. This data includes historical lighting energy consumption, real-time traffic flow, real-time weather conditions, real-time pedestrian flow and events, urban geographic information grids, and functional zoning attributes. After collection, all data undergoes time alignment, missing value imputation, spatial correlation, and standardization normalization to generate a unified, standardized spatiotemporal dataset, providing high-quality input for subsequent modeling.

[0033] Step 2: Construction of Urban Spatiotemporal Heterogeneous Map: Based on a standard spatiotemporal dataset, a spatiotemporal heterogeneous graph capable of depicting complex urban relationships is constructed. Each street light controller is defined as a graph node, and various types of edges are defined to represent the relationships between nodes, including spatial adjacency edges based on physical distance, functional similarity edges based on historical energy consumption pattern similarity, dynamic influence edges based on real-time traffic flow association, and self-connecting edges connecting nodes themselves across time steps. Multidimensional features from the standard spatiotemporal dataset are assigned to the corresponding nodes and edges, thus forming a spatiotemporal graph structure data containing complete structural and attribute information.

[0034] Step 3: Spatiotemporal Deep Feature Learning Heterogeneous graph neural networks are used to process spatiotemporal graph structure data. By performing message passing and aggregation along different types of edges, the high-order spatial structure features of each node under its multi-hop neighbors are learned, generating node spatial embedding vectors. Subsequently, a temporal convolutional network is used to capture the local and long-term dependency patterns of each node's features in the time series, generating node spatiotemporal evolution feature vectors, i.e., preliminary spatiotemporal feature vectors.

[0035] Step 4: Enhancement of Dynamic Attention Features: A multi-head attention mechanism is introduced to dynamically fuse the initial spatiotemporal feature vectors. In the spatial dimension, a graph attention network mechanism is applied to calculate the attention weights between nodes and their neighbors, performing adaptive weighted aggregation of neighbor information to generate spatial attention-weighted features. In the temporal dimension, a temporal attention mechanism is applied to calculate the importance weights of different historical moments to predict future moments, selectively focusing on key historical information to generate temporal attention-weighted features. The two are then fused and transformed through a feedforward neural network to obtain an enhanced spatiotemporal feature vector with stronger representational capabilities.

[0036] Step 5: Meta-learning for fast adaptive prediction: To enhance the model's generalization ability to new regions and scenarios, a meta-learning strategy is introduced. The prediction problems for different urban regions are constructed as different meta-tasks. During the meta-training phase, a parameter generation network rapidly generates model parameter adjustments for specific tasks based on enhanced spatiotemporal feature vectors. For new target prediction regions, a small amount of their latest data is used as a support set to generate meta-learning model parameters. Finally, the enhanced spatiotemporal feature vectors are input into the parameterized prediction model, decoding and outputting demand intensity prediction data for future periods.

[0037] Step Six: Optimize Decision-Making and Closed-Loop Execution Based on the predicted demand intensity data, a mapping model from demand intensity to specific street light control commands is established. Using a heuristic optimization algorithm, under multiple constraints including total energy consumption, light uniformity, and safe lighting, global scheduling optimization is performed to generate the optimal dynamic control command sequence. This system drives the lighting facilities to execute this command sequence and simultaneously collects actual energy consumption feedback data.

[0038] Step 7: Adversarial Training and Online Model Updates The system calculates the prediction error by comparing actual energy consumption feedback data with predicted demand intensity data. It then introduces an adversarial training mechanism, using a spatiotemporal graph neural network model as a generator and constructing a discriminator network to distinguish between predicted and real data. Through adversarial training between the generator and discriminator, the generator's performance is continuously optimized, generating updated prediction models, thus forming a complete closed-loop system encompassing perception, prediction, decision-making, execution, and feedback optimization.

[0039] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0040] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for urban lighting demand prediction based on spatio-temporal graph neural networks, characterized in that: The method includes the following steps: S1. Collect multi-source urban data and preprocess it to generate a standard spatiotemporal dataset; S2. Based on the aforementioned standard spatiotemporal dataset, construct a spatiotemporal heterogeneous graph and generate spatiotemporal graph structure data; S3. Based on the spatiotemporal graph structure data, perform embedding representation learning of graph nodes and edges to generate preliminary spatiotemporal feature vectors; S4. Based on the preliminary spatiotemporal feature vector, a multi-head attention mechanism is introduced to perform feature fusion and generate an enhanced spatiotemporal feature vector. S5. Based on the enhanced spatiotemporal feature vector, the model is rapidly and adaptively trained using a meta-learning strategy to generate meta-learning model parameters. S6. Based on the enhanced spatiotemporal feature vector and the meta-learning model parameters, predict future lighting demand across multiple time periods to generate demand intensity prediction data; S7. Based on the demand intensity prediction data, perform lighting control command mapping and scheduling optimization to generate a dynamic control command sequence; S8. Based on the dynamic control command sequence, drive the lighting facilities to perform adjustments and collect actual energy consumption feedback data; S9. Based on the actual energy consumption feedback data and the demand intensity prediction data, perform prediction error calculation and model adversarial training to generate an updated prediction model.

2. The spatio-temporal graph neural network-based urban lighting demand prediction method according to claim 1, characterized in that: The process of collecting and preprocessing multi-source urban data in S1 includes the following steps: S11. Through IoT sensing terminals deployed throughout the city and the city management database, collect multi-source heterogeneous sensing data for historical periods and real-time periods. The multi-source heterogeneous sensing data includes: historical lighting energy consumption time series data, real-time traffic flow data, real-time meteorological environment data, real-time pedestrian flow and event data, urban geographic information grid data, and urban functional zoning attribute data. S12. Perform time alignment and missing value interpolation on the collected historical lighting energy consumption time series data, real-time traffic flow data, real-time meteorological environment data, real-time pedestrian flow and event data to generate sensing data; S13. Spatial correlation and standardization processing are performed on the perceived data, the urban geographic information grid data, and the urban functional zoning attribute data to eliminate dimensional differences and generate the standard spatiotemporal dataset.

3. The urban lighting demand prediction method based on spatiotemporal graph neural network according to claim 2, characterized in that: The generation of spatiotemporal graph structure data in S2 includes the following steps: S21. Each street light controller in the urban geographic information grid is used as a graph node; S22. Define multiple types of edges to characterize different spatiotemporal relationships between nodes, including: spatial adjacency edges built based on physical distance, nearest neighbor edges built based on Euclidean distance of historical lighting energy consumption time series, dynamic influence edges built based on real-time traffic flow correlation, and self-connecting edges across time steps to model the temporal evolution of the nodes themselves. S23. Assign the multi-dimensional feature data in the standard spatiotemporal dataset to the corresponding graph nodes and edges to construct a spatiotemporal graph structure data containing node features, edge features, and edge types.

4. The urban lighting demand prediction method based on spatiotemporal graph neural network according to claim 3, characterized in that: The process of generating the initial spatiotemporal feature vector in S3 includes the following steps: S31. Obtain the spatiotemporal graph structure data; S32. Use a heterogeneous graph neural network to process the spatiotemporal graph structure data, perform message passing and aggregation for different types of edges, learn the high-order spatial structure features of each graph node under its multi-hop neighbors and topological connection relationships, and generate node spatial embedding vectors. S33. Organize the node spatial embedding vector according to the time series, input it into the temporal convolutional network, capture the local and long-term dependency patterns of each node in the time dimension, and generate node spatiotemporal evolution feature vectors. S34. Output the spatiotemporal evolution feature vector of the node as the initial spatiotemporal feature vector.

5. The urban lighting demand prediction method based on spatiotemporal graph neural network according to claim 4, characterized in that: The process of generating the enhanced spatiotemporal feature vector in S4 includes the following steps: S41. Obtain the preliminary spatiotemporal feature vector; S42. In the spatial dimension, a graph attention network mechanism is applied to calculate the attention weight between the target node and the features of its neighboring nodes, and the neighboring node information is adaptively weighted and aggregated to generate spatial attention-weighted features. S43. In the time dimension, apply the temporal attention mechanism to calculate the importance weight of features at different historical time steps to predict future moments, selectively focus on key historical moment information, and generate time attention weighted features. S44. The spatial attention-weighted features and the temporal attention-weighted features are concatenated and fused, and then nonlinear transformation and feature compression are performed through a feedforward neural network to generate an enhanced spatiotemporal feature vector.

6. The urban lighting demand prediction method based on spatiotemporal graph neural network according to claim 5, characterized in that: The parameters of the generative learning model in S5 include the following steps: S51. Construct a meta-learning task, treating lighting prediction problems from different urban areas as different tasks; S52. In the meta-training stage, the enhanced spatiotemporal feature vector is processed by a parameter generation network to generate model parameter adjustment amounts that are adaptive to the current specific prediction task. S53. In the meta-testing phase, a small amount of the latest observation data of the target prediction area is used as the support set to generate model parameter adjustment amounts, and combined with the basic parameters of the model, the meta-learning model parameters are obtained.

7. The urban lighting demand prediction method based on spatiotemporal graph neural network according to claim 6, characterized in that: The step of generating demand intensity prediction data in S6 includes the following steps: S61. Obtain the enhanced spatiotemporal feature vector and the parameters of the meta-learning model; S62. Input the enhanced spatiotemporal feature vector into the parameterized meta-learning spatiotemporal prediction model; S63. The meta-learning spatiotemporal prediction model decodes and outputs the predicted value of lighting demand intensity for the first preset time interval in the future based on the input features. The predicted value is represented by the expected illuminance of each graph node in each future time period, generating demand intensity prediction data.

8. The urban lighting demand prediction method based on spatiotemporal graph neural network according to claim 7, characterized in that: The generation of the dynamic control command sequence in S7 includes the following steps: S71. Obtain the demand intensity prediction data; S72. Establish a mapping model between lighting demand intensity and specific street light control commands. The mapping model takes into account the physical characteristics of street lights, group control strategies, dimming curves, and energy-saving constraints. S73. Using the total energy consumption threshold, illumination uniformity threshold and safety lighting parameters within the predicted time period as constraints, a heuristic optimization algorithm is used to globally schedule and optimize the sequence of control commands to generate the final dynamic control command sequence. This command sequence includes the target brightness level and on / off status of each street light controller at different time points.

9. The urban lighting demand prediction method based on spatiotemporal graph neural network according to claim 1, characterized in that: S9 includes the following steps: S91. After executing S8, collect actual urban lighting energy consumption data and compare it with the demand intensity prediction data for the corresponding time period, calculate the prediction error, record the demand intensity prediction data as the prediction data, and record the actual urban lighting energy consumption data as the real data. S92. Construct a discriminator network, input the predicted data and the real data into the discriminator network, and generate a discrimination result; S93. Using the spatiotemporal graph neural network model as a generator, adversarial training is performed with the discriminator to generate a prediction model after adversarial training.

10. A city lighting demand prediction system based on a spatiotemporal graph neural network, used to implement the city lighting demand prediction method based on a spatiotemporal graph neural network as described in any one of claims 1-9, characterized in that: The system includes: The multi-source data sensing and processing module is used to acquire urban multi-source heterogeneous sensing data through the data acquisition unit, and to perform cleaning, alignment and standardization processing through the data preprocessing unit to generate the standard spatiotemporal dataset. The spatiotemporal graph construction and feature learning module is connected to the multi-source data perception and processing module. It is used to build a spatiotemporal heterogeneous graph based on the standard spatiotemporal dataset through the graph structure construction unit, generate the preliminary spatiotemporal feature vector by learning the representation of nodes and edges through the graph neural network embedding unit, and output the enhanced spatiotemporal feature vector using the spatiotemporal attention fusion unit. The meta-learning adaptive prediction module, connected to the spatiotemporal graph construction and feature learning module, is used to divide the prediction task through the meta-task construction unit, generate the meta-learning model parameters based on the enhanced spatiotemporal feature vector through the fast parameter adaptation unit, and output the demand intensity prediction data by the demand prediction unit. The lighting strategy optimization and execution module is connected to the meta-learning adaptive prediction module. It is used to convert the demand intensity prediction data into control commands through the command mapping unit, generate the dynamic control command sequence through the scheduling optimization unit, and drive the lighting facilities and collect the actual energy consumption feedback data through the command execution and feedback unit. The online model update module is connected to the lighting strategy optimization and execution module. It is used to compare the actual energy consumption feedback data with the demand intensity prediction data through the error calculation unit, update the model parameters through the adversarial training unit, and output the updated prediction model.