Smart city public resource dynamic allocation system based on AI
By using an AI-based smart city public resource dynamic allocation system, which combines deep learning time series prediction and reinforcement learning algorithms, dynamic prediction and optimization decision-making of resource demand are realized. This solves the problem of resource redundancy and shortage, improves emergency response speed and global optimization capabilities, and meets the needs of smart cities for efficient and intelligent resource allocation.
Patent Information
- Application Number
- CN202511859060.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-03-06
AI Technical Summary
The existing public resource allocation system is unable to adapt to dynamic changes in demand in real time and accurately, resulting in both local redundancy and shortage of resources, slow response, high cost of manual intervention, and failure to meet the requirements of efficient and intelligent resource allocation for smart cities.
An AI-based smart city public resource dynamic allocation system is adopted. It acquires multi-source heterogeneous data through a data acquisition and fusion module, uses deep learning time series prediction models and reinforcement learning algorithms to predict and optimize resource demand, generates dynamic resource allocation strategies, and performs scheduling and feedback through a resource scheduling execution and feedback module.
It enables dynamic prediction and optimization decision-making of resource demand, improves emergency response speed and global optimization capabilities, solves the problem of resource redundancy and shortage, and meets the needs of smart cities for efficient and intelligent resource allocation.
Smart Images

Figure CN121616042A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of public resource allocation technology, and in particular to an AI-based smart city public resource dynamic allocation system. Background Technology
[0002] In the construction of smart cities, existing public resource allocation systems mostly rely on fixed rules and historical data, making it difficult to adapt to dynamic changes in demand in real time. Traditional allocation models often result in both local redundancy and shortage of resources, slow response times that cannot quickly address emergencies, and high costs for manual intervention. They also fail to achieve global optimization and cannot meet the requirements of efficient and intelligent dynamic resource allocation for smart cities.
[0003] Therefore, there is an urgent need to provide a technical solution to address the above problems. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides an AI-based smart city public resource dynamic allocation system, the technical solution of which is as follows:
[0005] The data acquisition and fusion module is used to acquire public resource status data from various sensing devices in the smart city and public resource demand data from the city management platform of the smart city in real time, and to fuse the public resource status data and the public resource demand data to generate multi-source heterogeneous real-time urban data.
[0006] The artificial intelligence demand prediction module is used to process the multi-source heterogeneous real-time urban data through a pre-trained deep learning time series prediction model, and output quantitative demand prediction results for public resources of different regions and categories in the smart city within a future preset time period.
[0007] The dynamic optimization decision module is used to generate an optimized dynamic resource allocation strategy by solving the quantitative demand prediction results, the preset allocation optimization target and the current public resource constraints in real time using a reinforcement learning algorithm.
[0008] The resource scheduling execution and feedback module is used to convert the optimized dynamic resource allocation strategy into target control instructions, and send the target control instructions to the corresponding public resource execution terminal of the smart city to complete the scheduling and allocation of resources. At the same time, it collects the actual status data after resource allocation and feeds it back to the data acquisition and fusion module.
[0009] The beneficial effects of the AI-based smart city public resource dynamic allocation system of the present invention are as follows:
[0010] The system of this invention integrates multi-source heterogeneous data from smart cities in real time, and combines deep learning time series prediction and reinforcement learning algorithms to achieve dynamic prediction and optimization decision-making of resource demand. It breaks through the limitations of traditional models, improves emergency response speed and global optimization capabilities, solves the problem of resource redundancy and shortage, and meets the needs of efficient and intelligent resource allocation in smart cities.
[0011] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0013] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0014] Figure 1 This is a schematic diagram of an embodiment of an AI-based smart city public resource dynamic allocation system according to the present invention. Detailed Implementation
[0015] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0016] Figure 1 This diagram illustrates the structure of an embodiment of an AI-based smart city public resource dynamic allocation system provided by the present invention. Figure 1 As shown, the system includes:
[0017] The data acquisition and fusion module 110 is used to acquire public resource status data from various sensing devices in the smart city and public resource demand data from the city management platform of the smart city in real time, and to fuse the public resource status data and the public resource demand data to generate multi-source heterogeneous real-time urban data.
[0018] Smart cities refer to new concepts and models that utilize next-generation information technologies such as the Internet of Things, cloud computing, big data, and geospatial information integration to promote the intelligentization of urban planning, construction, management, and services; for example, an urban system that uses information technology to achieve intelligent allocation of traffic signal resources. Sensing devices refer to sensors or data collection devices deployed throughout the city to collect information about the physical world; for example, cameras and geomagnetic sensors used to collect traffic flow data at intersections. Public resource status data refers to real-time monitoring data reflecting the current operational status of urban public resources; for example, the current timing scheme of traffic lights at various intersections and real-time traffic flow data. Urban management platforms refer to software system platforms that integrate various urban management functions within a smart city; for example, intelligent traffic management platforms used by traffic police departments. Public resource demand data refers to data reflecting the demand for public resources during urban operations; for example, estimated traffic flow data for each intersection at different times. Multi-source heterogeneous real-time urban data refers to continuously updated urban operational data from different sources and formats; for example, real-time traffic datasets that integrate camera video streams, geomagnetic sensor data, and traffic platform statistics.
[0019] The artificial intelligence demand prediction module 120 is used to process the multi-source heterogeneous real-time urban data through a pre-trained deep learning time series prediction model, and output quantitative demand prediction results for public resources of different regions and categories in the smart city within a preset future time period.
[0020] Among these, the pre-trained deep learning time series prediction model refers to a deep neural network model used for time series prediction, pre-trained based on historical data; for example, an LSTM time series prediction model pre-trained based on historical traffic flow data. The future preset time period refers to a pre-defined range of future time; for example, the traffic flow prediction period for the next 15 minutes. Public resources refer to various urban resources that provide services to the public; for example, road passage times and traffic light timing resources. Quantified demand prediction results refer to future resource demand prediction results expressed in numerical form; for example, the number of seconds of green light time required for each intersection in the east, west, south, and north directions within the next 15 minutes.
[0021] The dynamic optimization decision module 130 is used to generate an optimized dynamic resource allocation strategy by using a reinforcement learning algorithm to solve the problem in real time based on the quantitative demand prediction results, the preset allocation optimization target and the current public resource constraints.
[0022] The preset allocation optimization objective refers to the pre-defined optimization goal to be achieved in resource allocation; for example, maximizing road traffic efficiency or minimizing average vehicle waiting time. Current public resource constraints refer to the restrictions on public resource allocation at the current moment; for example, the minimum green light time limit or maximum red light time limit for traffic lights at each intersection. Reinforcement learning algorithms refer to machine learning algorithms that learn optimal decision-making strategies through interaction between an agent and its environment; for example, the Q-learning algorithm used to learn optimal traffic light timing strategies. The optimized dynamic resource allocation strategy refers to the best resource allocation scheme obtained through optimization calculation; for example, the traffic light timing scheme at each intersection that maximizes overall traffic flow.
[0023] The resource scheduling execution and feedback module 140 is used to convert the optimized dynamic resource allocation strategy into target control instructions, and send the target control instructions to the corresponding public resource execution terminal of the smart city to complete the scheduling and allocation of resources. At the same time, it collects the actual status data after resource allocation and feeds it back to the data acquisition and fusion module 110.
[0024] Among them, target control instructions refer to specific operational instructions sent to the execution equipment; for example, an instruction sent to the traffic light controller to "extend the green light in the east-west direction by 10 seconds." Public resource execution terminals refer to the equipment that specifically performs resource allocation operations; for example, an intelligent traffic light controller. Actual status data refers to the actual effect data collected after resource allocation; for example, traffic flow changes actually monitored after traffic light timing adjustments.
[0025] The technical solution in this embodiment integrates multi-source heterogeneous data from smart cities in real time, and combines deep learning time series prediction and reinforcement learning algorithms to achieve dynamic prediction and optimization decision-making of resource demand. This breaks through the limitations of traditional models, improves emergency response speed and global optimization capabilities, solves the problem of resource redundancy and shortage, and meets the needs of efficient and intelligent resource allocation in smart cities.
[0026] In an alternative embodiment, the data acquisition and fusion module 110 is specifically used for:
[0027] The system receives public resource status data from various sensing devices in the smart city in real time via a distributed data interface; these sensing devices include image acquisition devices, video surveillance devices, and Internet of Things (IoT) sensors.
[0028] Among these, distributed data interfaces refer to programming interfaces that support data exchange in distributed systems; for example, a Kafka message queue interface for receiving data from sensors at intersections. Image acquisition equipment refers to devices used to acquire image information; for example, surveillance cameras installed at intersections. Video surveillance equipment refers to complete sets of equipment used for video surveillance; for example, intelligent traffic monitoring cameras with vehicle recognition capabilities. Internet of Things (IoT) sensors refer to sensors used in the Internet of Things (IoT) to perceive information about the physical world; for example, geomagnetic sensors buried underground at intersections to detect vehicle passage.
[0029] The public resource demand data is periodically obtained from the city management platform of the smart city through an application programming interface.
[0030] Application Programming Interface (API) refers to the interface specifications for mutual calls between software systems; for example, calling the RESTful API of a traffic management platform.
[0031] Among the above-mentioned optional methods, it is further clarified that the data acquisition and fusion module utilizes distributed interfaces and APIs to acquire and integrate multi-source data in real time, providing the system with comprehensive and accurate resource status and demand information, thereby enhancing the system's ability to perceive the urban resource situation.
[0032] In an alternative embodiment, the data acquisition and fusion module 110 is specifically used for:
[0033] The public resource status data and the public resource demand data are timestamped and aligned, and the time-synchronized public resource status data and public resource demand data are mapped to the unified grid coordinate system of the smart city.
[0034] The unified grid coordinate system refers to a coordinate system that divides urban areas into a unified standard grid; for example, the urban road network is divided into a standard grid of 100m×100m for management.
[0035] Extract the real-time feature vector of the mapped public resource status data and the demand feature vector of the public resource demand data, and perform feature-level fusion of the real-time feature vector and the demand feature vector to obtain the fused feature vector.
[0036] Among them, the real-time feature vector refers to a numerical vector representing the current operational status of resources, extracted from real-time collected public resource status data; for example, a 128-dimensional feature vector containing parameters such as traffic flow, queue length, and average vehicle speed extracted from real-time video streams from intersection cameras. The demand feature vector refers to a numerical vector representing resource demand characteristics; for example, a 128-dimensional feature vector representing vehicle traffic demand at a specific intersection during a specific time period. The fused feature vector refers to a feature vector obtained by fusing features from multiple sources; for example, a 256-dimensional feature vector that fuses features such as traffic flow, weather, and time.
[0037] Specifically: 1) Spatial features of public resource status data are extracted and real-time feature vectors are generated through convolutional neural networks, while temporal features of public resource demand data are extracted and demand feature vectors are generated through fully connected networks; 2) The real-time feature vectors and demand feature vectors are concatenated to form a combined feature vector; 3) An attention mechanism is used to weight different feature dimensions in the combined feature vector, and the fused feature vector is obtained by calculating the attention weights and summing the weighted features.
[0038] An attention mechanism is used to weight the fused feature vectors to generate real-time urban data with spatiotemporal correlation characteristics from multiple sources.
[0039] Specifically: 1) The fused feature vector is used as the input of the attention mechanism, and the query vector, key vector and value vector are generated through linear transformation; 2) The similarity between the query vector and the key vector is calculated and normalized by the softmax function to obtain the attention weight matrix; 3) The attention weight matrix is multiplied by the value vector to obtain the weighted output vector, which is the real-time urban data with spatiotemporal correlation characteristics from multiple sources.
[0040] Among the above-mentioned optional methods, the accuracy of data fusion is further ensured by timestamp alignment and grid coordinate system mapping, enabling multi-source heterogeneous data to be processed under a unified framework, thereby improving the quality and efficiency of data fusion.
[0041] In one alternative embodiment, the artificial intelligence demand prediction module 120 is specifically used for:
[0042] The multi-source heterogeneous real-time urban data is divided into multiple consecutive time windows according to the time series.
[0043] Time window data refers to data segments divided in chronological order; for example, traffic flow sequence data divided into 5-minute time windows.
[0044] The multiple time window data are input into the encoder of the pre-trained deep learning temporal prediction model, and the spatiotemporal feature representations in the multiple time window data are extracted through the multi-head self-attention mechanism of the encoder.
[0045] Among them, multi-head self-attention mechanism refers to a self-attention mechanism that uses multiple attention heads to compute in parallel; for example, a mechanism that uses eight attention heads to compute the spatiotemporal dependencies of traffic flow in parallel. Spatiotemporal feature representation refers to information representation that simultaneously includes temporal and spatial features; for example, a traffic flow feature representation that simultaneously includes temporal variation patterns and spatial distribution patterns.
[0046] The spatiotemporal feature representation is input into the decoder of the pre-trained deep learning time series prediction model. The decoder generates the predicted demand distribution of different categories of public resources in each grid area within the future preset time period based on the unified grid coordinate system of the smart city.
[0047] Among them, the predicted demand distribution refers to the predicted distribution of resource demand; for example, the predicted time distribution of vehicle traffic demand in different directions at each intersection.
[0048] The predicted demand distribution is de-standardized to output the quantitative demand prediction results of public resources of different regions and categories in the smart city within the preset future time period.
[0049] Among them, de-standardization processing refers to the process of restoring standardized data to its original dimensions; for example, restoring the normalized prediction results to the actual green light time in seconds.
[0050] Among the above-mentioned optional methods, it is further clarified that the artificial intelligence demand forecasting module adopts a deep learning time series forecasting model, which can quantitatively predict future resource demand, providing a scientific basis for subsequent resource allocation decisions and enhancing the accuracy and foresight of the system's forecasts.
[0051] In one alternative embodiment, the artificial intelligence demand prediction module 120 is specifically used for:
[0052] Each time window of data is converted into a corresponding feature matrix; where each time window of data contains multiple time steps, each time step corresponds to a row of the feature matrix, and each feature dimension corresponds to a column of the feature matrix.
[0053] In this context, the feature matrix refers to feature data organized in matrix form; for example, a traffic flow feature matrix where rows represent time steps and columns represent feature dimensions. A time step refers to a single point in time or a period of time within a time series; for example, traffic flow prediction is performed every minute as a time step.
[0054] The feature matrix is transformed into a query matrix, a key matrix, and a value matrix through linear transformations.
[0055] In this context, the query matrix refers to the matrix used in the attention mechanism to retrieve information; for example, matrix Q used to retrieve relevant spatiotemporal features. The key matrix refers to the matrix used in the attention mechanism to match queries; for example, key matrix K used to match queries. The value matrix refers to the matrix used in the attention mechanism to generate output; for example, value matrix V used to generate attention-weighted values.
[0056] The query matrix, the key matrix, and the value matrix are processed using the multi-head self-attention mechanism. Each attention head independently calculates its attention weight and generates a corresponding attention output. The outputs of all attention heads are then concatenated, and the concatenated result is linearly transformed to obtain the spatiotemporal feature representation that integrates multi-head attention information.
[0057] Here, attention head refers to a single attention computation unit in a multi-head attention mechanism; for example, a single computation unit in an 8-head attention mechanism. Attention output refers to the output result calculated by the attention mechanism; for example, a weighted feature representation calculated by a single attention head.
[0058] In the above-mentioned optional methods, by further converting the time window data into a feature matrix and using a multi-head self-attention mechanism to extract spatiotemporal features, the system can gain a deeper understanding of the spatiotemporal relationships in the data, thereby improving the accuracy and depth of demand forecasting.
[0059] In one alternative approach, the multi-head self-attention mechanism calculates the spatiotemporal feature representation using the following formula:
[0060]
[0061]
[0062]
[0063] In the formula, This represents the spatiotemporal features. For querying the matrix, The key matrix, For value matrices, For splicing operations, For the first The output of each attention head, The total number of attention heads; The output projection weight matrix is used to perform a linear transformation on the spliced data. For the first The query projection weight matrix of each attention head For the first The key projection weight matrix of each attention head. For the first The values of each attention head are projected onto the weight matrix. for The transpose of the matrix, For attention mechanism functions, is the dimension of the key vector.
[0064] It should be noted that the process of calculating the spatiotemporal feature representation through the multi-head self-attention mechanism is as follows:
[0065] 1) Calculate single-head attention using the first expression, which is:
[0066]
[0067] The first expression is expanded into a multi-headed form using the second expression, which is:
[0068]
[0069] The second expression is achieved through matrix multiplication. Linear projection transformation of each attention head;
[0070] The outputs of all attention heads are fused using a third expression, which is:
[0071]
[0072] The third expression achieves a linear transformation of the output through matrix multiplication, resulting in the final spatiotemporal feature representation.
[0073] in, This represents the input feature matrix with dimension . , For time steps, For feature dimensions; This indicates a query for the projected weight matrix, with dimension 1. ; This represents the key projection weight matrix, with dimension 1. ; The value projection weight matrix has dimensions of . ; Represents a query matrix with dimensions of ; Represents the key matrix, with dimension . ; Represents a value matrix with dimension 1. ; Indicates the first The query projection weight matrix for each attention head, with dimensions of . ; Indicates the first The key projection weight matrix of each attention head, with dimension [missing information]. ; Indicates the first The values of each attention head are projected onto a weight matrix, with dimensions of [dimensional value]. ; This represents the output projection weight matrix, with dimensions of . ; Indicates the dimension of the key vector; Indicates the dimension of the value vector; Indicates the output feature dimension; Indicates the total number of heads of attention; Indicates a splicing operation; This represents the softmax activation function; Indicates the first The output of each attention head.
[0074] Among the above-mentioned optional methods, it is further clarified that the multi-head self-attention mechanism effectively integrates information from different attention heads through a specific calculation formula, thereby enhancing the richness and accuracy of spatiotemporal feature representation.
[0075] In one alternative embodiment, the artificial intelligence demand prediction module 120 is specifically used for:
[0076] The spatiotemporal feature representation is used as the initial hidden state input of the decoder, and the initial hidden state is the starting state of the decoder at the first time step.
[0077] The initial hidden state refers to the hidden state at the initial moment of the recurrent neural network; for example, the initial state when the decoder starts decoding.
[0078] The time stepping module of the decoder generates the predicted output for each time step within the preset future time period step by step; wherein, the time stepping module is a recurrent neural network structure in the decoder that processes the sequence step by step in chronological order.
[0079] Here, a time-stepping module refers to a module that processes the sequence step by step according to time steps; for example, an LSTM unit that generates prediction results for future time steps step by step. A recurrent neural network structure refers to a neural network with a recurrent connection structure; for example, an LSTM network structure used for time series prediction.
[0080] For each time step, the hidden state of the previous time step is used as the input state of the current time step. Based on the unified grid coordinate system of the smart city, the attention weight of each grid area is calculated through a spatial attention mechanism.
[0081] Spatial attention mechanism refers to an attention mechanism that focuses on spatial relationships; for example, an attention mechanism that focuses on the spatial correlation between different intersections. Attention weight refers to the weight coefficients calculated by the attention mechanism; for example, weight values representing the importance of different intersections.
[0082] The attention weights of each grid region are weighted and fused with the current hidden state of the decoder to generate a context vector for each grid region.
[0083] In this context, a grid region refers to a single grid cell in a grid coordinate system; for example, a 100m × 100m road grid numbered G-1024. The current hidden state refers to the hidden state of the recurrent neural network at the current moment; for example, the hidden state of the decoder when predicting traffic flow at minute t. The context vector refers to a feature vector containing contextual information; for example, a feature vector incorporating spatial attention weights.
[0084] The context vector of each grid region is mapped to the predicted demand distribution of different categories of public resources in each grid region through a fully connected layer.
[0085] Among the above-mentioned optional methods, it is further clarified that the decoder uses the initial hidden state and time stepping module to gradually generate resource demand predictions for future periods. Combined with the spatial attention mechanism, the precision and spatial adaptability of the prediction are improved.
[0086] In an alternative approach, the spatial attention mechanism calculates the attention weight for each grid region using the following formula:
[0087]
[0088]
[0089] In the formula, For the first The first time step Line number Attention weights for column grid regions For the first The first time step Line number Attention score for column grid regions Calculate a vector for the attention score. Here is the attention weight matrix. This is the attention bias vector; For decoder number The hidden state of each time step, that is, the input state of the current time step; For the first Line number Geographic feature vectors of column grids, The hyperbolic tangent activation function is used. The number of rows in the grid coordinate system. The number of columns in the grid coordinate system. This is a vector concatenation operation.
[0090] Among the above-mentioned alternative approaches, the spatial attention mechanism is further clarified by calculating the attention weight of the grid region, enabling the system to focus on the resource needs of key areas, thereby improving the targeting and efficiency of resource allocation.
[0091] In an alternative embodiment, the dynamic optimization decision module 130 is specifically used for:
[0092] Based on the future demand information in the quantitative demand prediction results and the current available resource stock information in the current public resource constraints, the state space of the reinforcement learning environment is constructed.
[0093] Here, future demand information refers to resource demand information for future time periods; for example, the projected traffic demand at each intersection within the next 15 minutes. Current available resource inventory information refers to the quantity of currently available resources; for example, the remaining green light time available at each intersection. The reinforcement learning environment refers to the virtual environment in which reinforcement learning agents interact; for example, a simulation environment simulating traffic flow changes. The state space refers to the set of all possible states in reinforcement learning; for example, a set of states including traffic flow, traffic light status, etc.
[0094] Based on the state space, a resource allocation action space is defined, which contains the specific allocation quantity of each type of public resource in each grid region.
[0095] The action space refers to the set of all possible actions in reinforcement learning; for example, the set of actions for adjusting traffic light timings at intersections. The specific allocation quantity refers to the specific amount of resources allocated; for example, the specific number of seconds of green light time allocated to the east-west direction at a certain intersection.
[0096] A reward function is constructed based on the preset allocation optimization objective. The reward function is used to evaluate the comprehensive benefits of different resource allocation actions.
[0097] Among these, the reward function refers to a function used to evaluate the quality of an action; for example, a reward function calculated based on traffic efficiency and waiting time. The resource allocation action refers to the specific operation of allocating resources; for example, the action of "extending the green light for north-south traffic at intersection A by 15 seconds." Comprehensive benefit refers to the overall benefit that considers multiple indicators; for example, the comprehensive benefit that simultaneously considers traffic efficiency, safety, and energy consumption.
[0098] A multi-agent reinforcement learning algorithm is adopted, in which each grid region is defined as an agent; wherein each agent makes decisions based on the state space and the reward function.
[0099] Among them, multi-agent reinforcement learning algorithms refer to reinforcement learning algorithms that involve multiple agents; for example, the MASAC algorithm, where each intersection is treated as an agent. An agent refers to an entity that learns and makes decisions in reinforcement learning; for example, an agent responsible for making traffic light timing decisions at a single intersection.
[0100] Resource allocation actions for the corresponding grid area are generated through the policy network corresponding to each agent, and the optimized dynamic resource allocation strategy is formed by the resource allocation actions of all agents.
[0101] The policy network is a deep neural network that performs state-to-action mapping for each agent. Its input is the current state information, and its output is the resource allocation action corresponding to the agent.
[0102] Among the above-mentioned optional methods, it is further clarified that the dynamic optimization decision module is based on the reinforcement learning algorithm, constructs the state space and action space, and evaluates the resource allocation action through the reward function, thereby realizing the dynamic optimization of resource allocation and improving the overall efficiency of resource utilization.
[0103] In an alternative embodiment, the resource scheduling execution and feedback module 140 is specifically used for:
[0104] The optimized dynamic resource allocation strategy is converted into executable target control instructions according to the communication protocol requirements of the public resource execution terminal; different types of public resource execution terminals correspond to different instruction conversion rules.
[0105] Among these, communication protocol requirements refer to the protocol specifications that the device communication must follow; for example, the TCP / IP protocol specifications followed by a traffic light controller. Command translation rules refer to the rules for translating policies into commands; for example, the rules for translating "increase green light time" into specific control signals.
[0106] The target control commands are sent in parallel to the corresponding public resource execution terminals through the IoT communication platform of the smart city; among them, multiple public resource execution terminals include: traffic signal control equipment, water and electricity pipeline regulation equipment and emergency resource dispatching equipment.
[0107] Among them, the Internet of Things (IoT) communication platform refers to a platform that supports communication between IoT devices; for example, an NB-IoT communication platform connecting all traffic lights. Traffic signal control equipment refers to equipment that controls traffic signals; for example, a smart traffic light controller. Water and electricity network regulation equipment refers to equipment that regulates water and electricity networks; for example, a smart water valve controller and smart grid switch. Emergency resource dispatching equipment refers to equipment used for emergency resource dispatching; for example, a smart emergency supplies distribution cabinet.
[0108] The system monitors the instruction execution status of each public resource execution terminal in real time and collects actual status data after resource allocation; the actual status data includes: resource allocation completion rate, resource utilization rate, and environmental impact indicators.
[0109] Among these, "instruction execution status" refers to the current state of instruction execution; for example, the status feedback of the traffic light controller receiving and executing instructions. "Resource allocation completion rate" refers to the degree to which resource allocation tasks are completed; for example, the consistency between planned and actual green light times. "Resource utilization rate" refers to the degree to which resources are effectively utilized; for example, the ratio of the actual number of vehicles passing through during green light time to the theoretical capacity. "Environmental impact indicators" refer to indicators of the environmental impact of resource allocation; for example, the exhaust emissions generated by vehicles waiting.
[0110] The actual state data is subjected to quality verification and anomaly detection, and the verified actual state data is fed back to the data acquisition and fusion module. The data acquisition and fusion module compares and analyzes the actual state data with the quantitative demand prediction results to generate a performance evaluation report for the optimization of the pre-trained deep learning time series prediction model.
[0111] Among them, the performance evaluation report refers to a quantitative evaluation document generated by the system after a comprehensive analysis of the resource allocation effect; for example, a comprehensive evaluation report generated by comparing actual traffic flow with predicted demand, which includes indicators such as prediction accuracy, traffic efficiency improvement rate, and resource utilization rate.
[0112] Among the above-mentioned optional methods, it is further clarified that the resource scheduling execution and feedback module converts the optimization strategy into control commands, issues them through the Internet of Things platform and monitors the execution status, collects actual data feedback, forming a closed-loop control, and improving the system's real-time performance and adaptability.
[0113] To better illustrate the technical solution of this embodiment, the following example is used for explanation:
[0114] S10, the data acquisition and fusion module receives public resource status data in real time from image acquisition devices (such as cameras) and IoT sensors (such as geomagnetic sensors) deployed at various intersections in Smart City A through a distributed data interface, including current traffic flow in each direction, vehicle queue length and real-time traffic light timing scheme.
[0115] S20, the data acquisition and fusion module obtains batched public resource demand data from the traffic management platform of Smart City A at regular intervals through the application programming interface, including historical traffic flow statistics of each intersection at different times and estimated traffic flow for future activities;
[0116] S30, the data acquisition and fusion module performs timestamp alignment processing on public resource status data and public resource demand data, and maps the time-synchronized data to the unified grid coordinate system of Smart City A, where each grid area corresponds to an intersection;
[0117] S40. The data acquisition and fusion module extracts the real-time feature vector (including 128-dimensional features such as traffic flow and queue length) of the mapped public resource status data and the demand feature vector (including 128-dimensional features such as historical traffic and estimated traffic) of the public resource demand data, and performs feature-level fusion to obtain a 256-dimensional fused feature vector.
[0118] S50, the data acquisition and fusion module uses an attention mechanism to weight the fused feature vectors, generating multi-source heterogeneous real-time urban data with spatiotemporal correlation characteristics;
[0119] S60, the artificial intelligence demand forecasting module divides multi-source heterogeneous real-time urban data into multiple consecutive time windows (each time window is 5 minutes and contains 5 time steps).
[0120] S70, the artificial intelligence demand prediction module inputs time window data into the encoder of the pre-trained deep learning time series prediction model, and extracts spatiotemporal feature representations through the encoder's multi-head self-attention mechanism, where each attention head independently calculates attention weights for different spatiotemporal dimensions;
[0121] The S80 AI demand prediction module inputs the spatiotemporal feature representation into the decoder, which then generates the predicted green light demand time distribution for each intersection in different directions (east, west, south, and north) within the next 15 minutes based on a unified grid coordinate system.
[0122] S90, the artificial intelligence demand forecasting module performs destandardization processing on the forecast demand distribution and outputs the quantitative demand forecast results (in seconds) of smart city A at different intersections and in different directions within the next 15 minutes.
[0123] S100, the dynamic optimization decision-making module, constructs the state space and action space of the reinforcement learning environment based on the quantitative demand prediction results, the preset allocation optimization objectives (maximizing traffic efficiency and minimizing waiting time) and the current public resource constraints (minimum green light time and maximum red light time at each intersection);
[0124] S110, the dynamic optimization decision-making module adopts a multi-agent reinforcement learning algorithm, treating each intersection as an agent, and generating the corresponding green light time adjustment action through the policy network of each agent;
[0125] S120 and the resource allocation actions of the intelligent agent together constitute the optimized dynamic resource allocation strategy, that is, a set of traffic light timing adjustment schemes covering all intersections.
[0126] S130, the resource scheduling execution and feedback module converts the dynamic resource allocation strategy into target control instructions (such as Modbus TCP protocol data packets) that conform to the communication protocol of traffic signal control equipment.
[0127] S140, the resource scheduling execution and feedback module sends the target control commands to the traffic signal control equipment at each intersection in parallel through the IoT communication platform (such as NB-IoT network) of Smart City A;
[0128] S150. Each traffic signal control device executes instructions to adjust the signal timing scheme. At the same time, the resource scheduling execution and feedback module monitors the execution status of instructions in real time and collects actual status data, including resource allocation completion rate (consistency between actual green light time and planned green light time), resource utilization rate (percentage of vehicles passing through during green light period), and environmental impact indicators (reduction in vehicle waiting emissions).
[0129] S160, the resource scheduling execution and feedback module performs quality verification and anomaly detection on the actual status data, and feeds back the verified data to the data acquisition and fusion module;
[0130] S170, the data acquisition and fusion module compares and analyzes the actual state data with the quantitative demand prediction results, and generates a performance evaluation report (including indicators such as prediction accuracy and traffic efficiency improvement ratio), which is used for iterative optimization of the pre-trained deep learning time series prediction model.
[0131] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.
[0132] It should be noted that the terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and represent a limitation on a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that shown or described.
[0133] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. An AI-based smart city public resource dynamic allocation system, characterized in that, The system comprises: a data acquisition and fusion module, configured to acquire real-time public resource state data of various sensing devices of a smart city and public resource demand data of a city management platform of the smart city, and perform fusion processing on the public resource state data and the public resource demand data to generate multi-source heterogeneous real-time city data; an artificial intelligence demand prediction module, configured to process the multi-source heterogeneous real-time city data by a pre-trained deep learning time series prediction model, and output a quantitative demand prediction result of different types of public resources in different regions of the smart city in a future preset time period; a dynamic optimization decision module, configured to perform real-time solving by using a reinforcement learning algorithm based on the quantitative demand prediction result, a preset allocation optimization target and a current public resource constraint condition, and generate an optimized dynamic resource allocation strategy; a resource scheduling execution and feedback module, configured to convert the optimized dynamic resource allocation strategy into target control instructions, and issue the target control instructions to corresponding public resource execution terminals of the smart city to complete resource scheduling and allocation, and collect actual state data after resource allocation and feed back to the data acquisition and fusion module. 2.The AI-based smart city public resource dynamic allocation system of claim 1, wherein, The data acquisition and fusion module is specifically configured to: receive the public resource state data of the various sensing devices of the smart city in real time through a distributed data interface; wherein the various sensing devices include image acquisition devices, video monitoring devices and Internet of Things sensors; acquire batched public resource demand data from the city management platform of the smart city at regular time intervals through an application programming interface. 3.The AI-based smart city public resource dynamic allocation system of claim 2, wherein, The data acquisition and fusion module is specifically configured to: perform timestamp alignment processing on the public resource state data and the public resource demand data, and map the time-synchronized public resource state data and the public resource demand data to a unified grid coordinate system of the smart city; extract real-time feature vectors of the mapped public resource state data and demand feature vectors of the public resource demand data, and perform feature-level fusion on the real-time feature vectors and the demand feature vectors to obtain fused feature vectors; perform weighted processing on the fused feature vectors by using an attention mechanism to generate the multi-source heterogeneous real-time city data with spatio-temporal correlation characteristics. 4.The AI-based smart city public resource dynamic allocation system of claim 1, wherein, The artificial intelligence demand prediction module is specifically configured to: divide the multi-source heterogeneous real-time city data into continuous multiple time window data according to time sequence; input the multiple time window data into an encoder of the pre-trained deep learning time series prediction model, and extract spatio-temporal feature representations in the multiple time window data by using a multi-head self-attention mechanism of the encoder; input the spatio-temporal feature representations into a decoder of the pre-trained deep learning time series prediction model, and generate a prediction demand distribution of different types of public resources in each grid region in the future preset time period based on the unified grid coordinate system of the smart city by using the decoder. The predicted demand distribution is de-standardized to output the quantitative demand prediction result of the smart city in different regions and different categories of public resources in the future preset time period. 5.The AI-based smart city public resource dynamic allocation system of claim 4, wherein, The artificial intelligence demand prediction module is specifically configured to: convert each time window data into a corresponding feature matrix; wherein each time window data contains multiple time steps, each time step corresponds to a row of the feature matrix, and each feature dimension corresponds to a column of the feature matrix; generate a query matrix, a key matrix, and a value matrix through linear transformation of the feature matrix respectively; adopt the multi-head self-attention mechanism to process the query matrix, the key matrix, and the value matrix, independently calculate attention weights and generate corresponding attention outputs through each attention head, perform splicing operation on the outputs of all attention heads, and perform linear transformation on the spliced result to obtain the spatio-temporal feature representation fused with multi-head attention information. 6.The AI-based smart city public resource dynamic allocation system according to claim 5, characterized in that, The multi-head self-attention mechanism calculates the spatio-temporal feature representation through the following formula: In the formula, This represents the spatiotemporal features. For querying the matrix, The key matrix, For value matrices, For splicing operations, For the first The output of each attention head, The total number of attention heads; The output projection weight matrix is used to perform a linear transformation on the spliced data. For the first The query projection weight matrix of each attention head For the first The key projection weight matrix of each attention head. For the first The values of each attention head are projected onto the weight matrix. for The transpose of the matrix, For attention mechanism functions, is the dimension of the key vector. 7.The AI-based smart city public resource dynamic allocation system of claim 6, wherein, The artificial intelligence demand prediction module is specifically configured to: input the spatio-temporal feature representation as the initial hidden state of the decoder, and the initial hidden state is the starting state of the decoder at the first time step; generate the prediction output of each time step in the future preset time period through the time stepping module of the decoder step by step; wherein the time stepping module is a recurrent neural network structure in the decoder that processes sequences step by step in time sequence; for each time step, take the hidden state of the previous time step as the input state of the current time step, calculate the attention weight of each grid region through the spatial attention mechanism based on the unified grid coordinate system of the smart city; weight and fuse the attention weight of each grid region with the current hidden state of the decoder to generate the context vector of each grid region; map the context vector of each grid region to the predicted demand distribution of different categories of public resources in each grid region through a fully connected layer. 8.The AI-based smart city public resource dynamic allocation system of claim 7, wherein, The spatial attention mechanism calculates the attention weight of each grid region through the following formula: In the formula, For the first The first time step Line number Attention weights for column grid regions For the first The first time step Line number Attention score for column grid regions Calculate a vector for the attention score. This is the attention weight matrix. This is the attention bias vector; For the decoder The hidden state of each time step, that is, the input state of the current time step; For the first Line number Geographic feature vectors of column grids, The hyperbolic tangent activation function is used. The number of rows in the grid coordinate system. The number of columns in the grid coordinate system. This is a vector concatenation operation. 9.The AI-based smart city public resource dynamic allocation system of claim 8, wherein, The dynamic optimization decision module is specifically configured to: construct a state space of a reinforcement learning environment based on the future demand information in the quantitative demand prediction result and the current available resource inventory information in the current public resource constraint condition; define a resource allocation action space based on the state space, wherein the action space contains the specific allocation quantity of each category of public resources in each grid region; construct a reward function according to the preset allocation optimization target, wherein the reward function is used to evaluate the comprehensive benefits of different resource allocation actions; adopt a multi-agent reinforcement learning algorithm to define each grid region as an agent; wherein each agent makes decisions according to the state space and the reward function; generate the resource allocation action of the corresponding grid region through the policy network corresponding to each agent, and jointly constitute the optimized dynamic resource allocation strategy according to the resource allocation actions of all agents; The policy network is a deep neural network for mapping state to action for each agent, and the input of the deep neural network is current state information, and the output is a resource allocation action corresponding to the agent. 10.The AI-based smart city public resource dynamic allocation system of claim 9, wherein, The resource scheduling execution and feedback module is specifically configured to: convert the optimized dynamic resource allocation strategy into executable target control instructions according to the communication protocol requirements of the public resource execution terminal, wherein different categories of public resource execution terminals correspond to different instruction conversion rules; through the Internet of Things communication platform of the smart city, the target control instructions are distributed to the corresponding public resource execution terminal in parallel, wherein the plurality of public resource execution terminals include traffic signal control equipment, water and electricity pipe network regulation equipment and emergency resource scheduling equipment; monitor the instruction execution state of each public resource execution terminal in real time, and collect actual state data after resource allocation, wherein the actual state data includes resource allocation completion degree, resource utilization rate and environmental impact index; perform quality verification and anomaly detection on the actual state data, and feed back the verified actual state data to the data acquisition and fusion module, compare and analyze the actual state data and the quantitative demand prediction result through the data acquisition and fusion module, and generate a performance evaluation report for optimizing the pre-trained deep learning time series prediction model.