Old community reconstruction effect simulation system based on digital twinning
Through real-time collection of multi-source data, improved variational autoencoders and spatiotemporal graph neural networks, combined with a federated learning optimization model, the problems of data fusion and privacy protection in the renovation of old communities are solved, efficient optimization and evaluation of renovation plans are achieved, and the scientific nature and feasibility of the renovation plans are improved.
Patent Information
- Application Number
- CN202510853060.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-09-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies lack multi-source heterogeneous data fusion and privacy-protected collaborative analysis in the renovation of old communities, making it difficult to achieve centimeter-level precision in three-dimensional behavior tracking and quantitative recording of service efficiency. Traditional queuing models are unable to handle heavy-tailed distributions, resulting in insufficient matching between renovation plans and actual needs and low evaluation efficiency.
A multi-source data real-time acquisition module is used in combination with smart trash can sensors and RFID devices. Anomaly detection and congestion analysis are performed through an improved variational autoencoder and spatiotemporal graph neural network. A federated learning optimization model is used to generate transformation plans under privacy protection, and iterative optimization is verified through digital twin simulation.
It has achieved accurate diagnosis and optimization of service facilities in old communities, improved the accuracy of renovation plan decisions and the utilization rate of facility service capacity, reduced ineffective renovation investment, and improved renovation efficiency and residents' satisfaction.
Smart Images

Figure CN120706707A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart cities and digital twin technologies, and in particular to a digital twin-based simulation system for simulating the renovation effects of old residential communities. Background Art
[0002] With the acceleration of urban renewal, the renovation of older residential communities has become a crucial initiative to improve residents' quality of life. Traditional renovation plans primarily rely on manual research and static planning, collecting limited data through questionnaires and on-site observations, and employing tools such as CAD for two-dimensional design. This model suffers from inherent flaws such as coarse data granularity (typically measured in hours), a single dimension (lacking fine-grained data such as behavioral trajectories), and outdated analytical methods (relying on empirical formulas). Particularly in scenarios such as garbage sorting and public facility layout, it is difficult to capture the spatiotemporal dynamics of resident behavior (such as fluctuations in service demand during peak hours), resulting in a poor match between renovation plans and actual needs. While existing digital twin technology has found some application in the industrial sector, mature solutions for the dynamic modeling of complex social systems such as older residential communities remain lacking. In particular, significant technical gaps exist in areas such as multi-source heterogeneous data fusion and privacy-preserving collaborative analysis.
[0003] The current assessment system for the renovation of old residential communities has three core flaws: First, the data collection layer relies on a single sensor (such as a camera), making it difficult to achieve centimeter-level accuracy in three-dimensional behavior tracking (the error of the existing UWB system is >30cm), and there is a lack of quantitative records of key services such as garbage disposal (such as weight and classification accuracy); Second, in terms of analysis methods, traditional queuing models cannot handle the heavy-tailed distribution of service times (20% of residents take more than 3 times the mean), and spatiotemporal graph neural networks do not consider the topological constraints of facility layout, resulting in congestion prediction errors of more than 40%; Third, in terms of optimization mechanism, centralized learning requires aggregation of raw data, which violates privacy protection regulations (such as GDPR), and manual solution evaluation takes 2 to 3 weeks each time, which is inefficient. Summary of the Invention
[0004] The purpose of the present invention is to provide a digital twin-based simulation system for the renovation of old residential communities to solve the problems in the above background.
[0005] The purpose of the present invention can be achieved through the following technical solutions:
[0006] A digital twin-based simulation system for simulating the effects of renovation of old residential communities, including:
[0007] A multi-source data real-time acquisition module, which is used to collect real-time three-dimensional movement trajectory and service duration data of residents when using the garbage sorting station, and at the same time combines the weighing sensor and RFID identification device of the smart trash can to record the type and weight of garbage served each time;
[0008] A service efficiency anomaly detection module uses an improved variational autoencoder to detect anomalies in service duration sequences, calculates the dynamic time warping distance between adjacent service intervals, and marks an abnormal service event if the dynamic time warping distance exceeds 2 standard deviations. It also generates a service efficiency fluctuation anomaly feature value in the range of 0-1.
[0009] A spatial congestion analysis module, which constructs a spatiotemporal graph neural network based on residents' movement trajectories, calculates the congestion propagation anomaly eigenvalues between facility nodes through a graph attention mechanism, quantifies spatial usage inequality using the Lorenz curve, and outputs dynamic spatial congestion anomaly eigenvalues;
[0010] A federated intelligent decision-making module, which combines the abnormal service efficiency fluctuation characteristic values and the abnormal dynamic spatial congestion characteristic values into a comprehensive service effectiveness characteristic vector, inputs it into a pre-trained federated learning optimization model for analysis, and identifies the optimization potential of the current facility layout based on the analysis results;
[0011] A digital twin verification module dynamically adjusts the number and layout of service windows based on model output, and iteratively optimizes the transformation plan through digital twin simulation verification until the preset service efficiency indicators are achieved.
[0012] As a further solution of the present invention: the improved variational autoencoder anomaly detection method comprises the following steps:
[0013] First, a bidirectional gated recurrent unit encoder network is constructed, whose input layer receives the normalized service duration sequence data;
[0014] Then, a multi-head self-attention mechanism is introduced in the decoder part to calculate the correlation between different time steps through multiple parallel attention heads;
[0015] Finally, the variational inference process is completed by combining the dual constraints of latent space distribution optimization and sequence reconstruction error.
[0016] As a further solution of the present invention: the method for calculating the dynamic time warping distance includes the following steps:
[0017] First, the adjacent service interval sequence is standardized and preprocessed to eliminate the influence of different dimensions;
[0018] Then the sequence similarity is calculated using a dynamic time warping algorithm with a constrained window, where the window size is set to a specific ratio of the sequence length;
[0019] Finally, anomaly judgment is performed based on the dynamically updated statistical threshold, and when the distance value exceeds the current mean plus two standard deviations, it is marked as an anomaly.
[0020] As a further solution of the present invention: the method for generating the abnormal characteristic value of service efficiency fluctuation includes the following steps:
[0021] First, the frequency of abnormal events within the preset time window is counted and its relative ratio to the baseline frequency is calculated;
[0022] This ratio is then mapped into a standard range through a nonlinear activation function;
[0023] Finally, the characteristic value is weighted and adjusted based on the duration factor of the abnormal event, where the duration weight is set to a fixed ratio.
[0024] As a further solution of the present invention: the method for constructing the spatiotemporal graph neural network includes the following steps:
[0025] Discretize the cell plan into grid nodes, each node contains location coordinates and timestamp information;
[0026] A three-layer heterogeneous graph structure is established to represent the residents' mobility paths, facility distribution topology, and spatiotemporal correlation relationships respectively;
[0027] Embed a gated graph attention mechanism in each layer of the graph to dynamically adjust the message passing weights between different nodes;
[0028] The residual connection method is used to fuse the features of each layer to prevent the gradient of the deep network from disappearing.
[0029] As a further solution of the present invention: the method for calculating the congestion propagation anomaly characteristic value includes the following steps:
[0030] Extract the congestion propagation pattern between nodes through graph convolution operations;
[0031] Introducing spatiotemporal location coding to distinguish congestion characteristics in different time periods and regions;
[0032] Calculate the congestion influence coefficient between each facility node to form a dynamic propagation matrix;
[0033] The propagation matrix is subjected to singular value decomposition to extract the main abnormal propagation mode features and obtain the abnormal characteristic values of congestion propagation.
[0034] As a further solution of the present invention: the method for generating the dynamic spatial congestion anomaly characteristic value comprises the following steps:
[0035] Based on the node congestion feature matrix output by the spatiotemporal graph neural network, the congestion change rate of each facility node in the continuous time window is calculated;
[0036] A dynamic time warping algorithm is used to compare the difference between the current congestion pattern and the historical benchmark pattern to extract abnormal fluctuation characteristics;
[0037] Construct a comprehensive evaluation index including the following dimensions:
[0038] Spatial dimension: Calculate the Gini coefficient of congestion index in each area
[0039] Time dimension: Analyzing the autocorrelation of congestion duration
[0040] Intensity dimension: assesses the deviation value of peak congestion level;
[0041] The multi-dimensional indicators are fused into dynamic spatial congestion anomaly feature values in the range of 0-1 through a three-layer fully connected neural network, where the output layer uses the Sigma id activation function for normalization.
[0042] The method for establishing the historical benchmark model includes:
[0043] Collect congestion data during normal operating hours for 30 consecutive days;
[0044] Use K-means clustering algorithm to identify typical congestion patterns;
[0045] Establish a probability distribution reference system based on Gaussian mixture model;
[0046] The Gini coefficient is calculated using the improved trapezoidal area method, which specifically includes:
[0047] Divide the cell area into several equal-area grids;
[0048] Sort grid data in ascending order by congestion index;
[0049] Compute the normalized area difference between the Lorentz curve and the diagonal.
[0050] As a further solution of the present invention: the analysis method of the federated learning optimization model includes the following steps:
[0051] Build a Transformer-based multi-task learning architecture consisting of a shared encoder and three task-specific decoders;
[0052] FedProx algorithm is used for federated aggregation, and the proximal term parameter μ = 0.1 is set to control the model difference;
[0053] During local training on each participating node, a differential privacy mechanism is introduced to add random noise that conforms to the Gaussian distribution.
[0054] The uncertainty of model prediction is evaluated by the Monte Carlo Dropout method, and high-confidence optimization results are screened.
[0055] As a further solution of the present invention: the analysis method of the federated learning optimization model includes the following steps:
[0056] Build a Transformer-based multi-task learning architecture consisting of a shared encoder and three task-specific decoders;
[0057] FedProx algorithm is used for federated aggregation, and the proximal term parameter μ = 0.1 is set to control the model difference;
[0058] During local training on each participating node, a differential privacy mechanism is introduced to add random noise that conforms to the Gaussian distribution.
[0059] The uncertainty of model prediction is evaluated by the Monte Carlo Dropout method, and high-confidence optimization results are screened.
[0060] As a further solution of the present invention: the simulation verification iterative optimization method includes the following steps:
[0061] A virtual renovation scheme matrix was constructed, using an 8×8 grid layout to store 64 candidate schemes, with each grid cell containing complete facility layout parameters and service strategies.
[0062] Implement multi-scale simulation tests, including:
[0063] Micro level: simulate the entire service process of a single resident;
[0064] Meso-level: assessing the dynamics of regional-level pedestrian density;
[0065] Macro level: Analyze the overall service network throughput performance;
[0066] Automatically adjust solution parameters based on the Bayesian optimization algorithm to prioritize the exploration of high-potential solution areas;
[0067] A dynamic termination mechanism is established to automatically output the optimal solution when the optimization amplitude of three consecutive iterative iterations is less than the preset threshold.
[0068] Beneficial effects of the present invention:
[0069] (1) The present invention achieves accurate diagnosis and optimization of the operating status of service facilities in old residential communities by constructing a multi-source heterogeneous data fusion and analysis system. The system adopts a multimodal perception system consisting of a millimeter-wave radar array (operating frequency band 60GHz, bandwidth 4GHz) and a UWB positioning network (based on the DW1000 chip, TOF ranging accuracy ±10cm). It can capture the three-dimensional movement trajectory of residents in real time (sampling frequency 20Hz, positioning accuracy 0.1m). Combined with the high-precision weighing sensor (C3 level, ±10g accuracy) and RFID identification device (13.56MHz, 10cm reading distance) equipped in the smart trash can, a complete digital representation system for service behavior is constructed. At the data analysis level, an innovative improved variational autoencoder (bidirectional LSTM encoder + multi-head self-attention decoder) is used to detect anomalies in service duration sequences. A dynamic time warping algorithm (Sakoe-Chiba constraint with a 15% bandwidth) is used to identify abnormal service events. Furthermore, a spatiotemporal graph neural network (a three-layer heterogeneous graph structure + a gated graph attention mechanism) is used to quantify spatial congestion characteristics and, combined with an improved Gini coefficient algorithm (considering regional area weights and spatial autocorrelation), assess the rationality of facility layout. This multi-scale, multi-dimensional intelligent analysis method accurately identifies efficiency bottlenecks in service processes (such as abnormally long sorting times at waste sorting stations) and spatial planning flaws (such as the propagation of congestion at intersections). Compared to traditional methods based on manual research and empirical judgment, it improves the accuracy of renovation plan decisions from 62% to 87% (based on measured data), reduces ineffective renovation investment by approximately 45%, and increases facility service capacity utilization by 38%. The system achieves cross-community knowledge sharing through a federated learning framework (FedProx algorithm, μ=0.1), further improving the generalization ability of the analysis model and the scientific nature of decision-making while ensuring data privacy (differential privacy protection of ε=2.0).
[0070] (2) This paper innovatively constructs a privacy-preserving federated learning collaborative optimization system, and realizes secure sharing and joint modeling of cross-cell data through the FedProx algorithm (proximal term parameter μ = 0.1). The system adopts a three-layer federated architecture: 1) Transformer encoders (12 layers, 768 hidden dimensions) are deployed on local nodes for feature extraction; 2) the middle layer implements gradient security aggregation through a differential privacy mechanism (Gaussian noise σ = 0.01, ε = 2.0); 3) the global model integrates multi-source knowledge and issues optimization strategies. This architecture improves the model accuracy by 28% while ensuring that the data does not leave the domain. The digital twin verification module innovatively adopts the "digital bed" test matrix (8×8 solution grid) and combines it with a multi-scale simulation system: at the micro level, individual behavior is simulated through a social force model (parameter α = 0.5); at the meso level, computational fluid dynamics is used to analyze the flow density (5 minutes / frame); at the macro level, discrete event simulation is used to evaluate the system throughput. The optimization process uses an improved Bayesian algorithm, which converges to the optimal solution after 50 iterations, achieving a 4.2-fold improvement in efficiency compared to manual planning (measured data). The system possesses dynamic evolutionary capabilities, continuously updating model parameters through an online learning mechanism (with a 30-day sliding window) to maintain optimal service performance indicators. Actual deployment data shows that the implementation of this system reduced peak wait times at waste sorting stations from 23 minutes to 14 minutes (a 39.1% decrease), increased facility turnover by 27.3%, and boosted resident satisfaction by 31.5 percentage points. In particular, the system's proposed "off-peak opening" strategy reduced the standard deviation of the facility utilization curve by 42%, significantly improving resource allocation balance. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] The present invention will be further described below with reference to the accompanying drawings.
[0072] Figure 1 This is a flow chart of a digital twin-based simulation system for simulating the renovation effects of old residential communities in the present invention. DETAILED DESCRIPTION
[0073] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0074] See also Figure 1 As shown, the present invention is a simulation system for the renovation of old residential areas based on digital twins, including:
[0075] A multi-source data real-time acquisition module, which is used to collect real-time three-dimensional movement trajectory and service duration data of residents when using the garbage sorting station, and at the same time combines the weighing sensor and RFID identification device of the smart trash can to record the type and weight of garbage served each time;
[0076] A service efficiency anomaly detection module uses an improved variational autoencoder to detect anomalies in service duration sequences, calculates the dynamic time warping distance between adjacent service intervals, and marks an abnormal service event if the dynamic time warping distance exceeds 2 standard deviations. It also generates a service efficiency fluctuation anomaly feature value in the range of 0-1.
[0077] A spatial congestion analysis module, which constructs a spatiotemporal graph neural network based on residents' movement trajectories, calculates the congestion propagation anomaly eigenvalues between facility nodes through a graph attention mechanism, quantifies spatial usage inequality using the Lorenz curve, and outputs dynamic spatial congestion anomaly eigenvalues;
[0078] A federated intelligent decision-making module, which combines the abnormal service efficiency fluctuation characteristic values and the abnormal dynamic spatial congestion characteristic values into a comprehensive service effectiveness characteristic vector, inputs it into a pre-trained federated learning optimization model for analysis, and identifies the optimization potential of the current facility layout based on the analysis results;
[0079] A digital twin verification module dynamically adjusts the number and layout of service windows based on model output, and iteratively optimizes the transformation plan through digital twin simulation verification until the preset service efficiency indicators are achieved.
[0080] The specific implementation process of the multi-source data real-time acquisition module is as follows:
[0081] Spatial positioning data collection: Four 60GHz millimeter-wave radar nodes were deployed in a cross pattern around the waste sorting station. Each node used beamforming technology to achieve a 120° horizontal field of view and a 60° vertical field of view. Three-dimensional point cloud data with an accuracy of 0.1 meters was acquired using a MIMO antenna array and FMCW modulation, with a sampling frequency of 20Hz. Six UWB positioning anchor points were deployed to form a regular hexagonal positioning network. The UWB tags worn by residents used DW1000 chips and calculated their position coordinates using two-way time-of-flight ranging (TOF) with a 10Hz update frequency. The data was then fused with millimeter-wave radar data using Kalman filtering.
[0082] Garbage disposal data collection: A cantilever beam weighing sensor with a 50kg capacity and C3 accuracy is integrated into the mechanical structure of the trash can's disposal port. It uses a four-wire connection to eliminate the effects of wire resistance and is equipped with a 24-bit ADC. The RFID reader operates at a frequency of 13.56MHz and has a read distance of 10cm. It is synchronized with the weighing sensor through hardware triggering. When a weight change of more than 200g and a duration of more than 300ms is detected, the RFID reader is automatically activated to read and record the associated resident ID and disposal timestamp.
[0083] Multi-source data fusion processing: Deploy an edge computing gateway, and the built-in time synchronization module uses the PTPv2 protocol to achieve microsecond-level time alignment among various devices, establishing a unified spatiotemporal benchmark. Design a data fusion algorithm, perform DBSCAN clustering on the millimeter-wave radar point cloud to extract human targets, and then associate the targets with the UWB positioning data using the Hungarian algorithm, ultimately outputting a three-dimensional motion trajectory with the resident ID. Weighing data and RFID information are transactionally stored in a SQLite database to ensure data integrity.
[0084] The specific implementation process of the service efficiency anomaly detection module is as follows:
[0085] The improved variational autoencoder anomaly detection method specifically includes the following steps: first, constructing an encoder network including a bidirectional LSTM structure, configuring 64 neurons in the input layer to receive a standardized service duration sequence, setting two LSTM layers in the forward and backward networks, and connecting a Dropout layer with a dropout rate of 20% after each layer, and setting the hidden state dimension to 128 dimensions; then, designing four parallel attention heads in the decoder part, setting the query, key, and value matrix dimensions of each head to 32, using the scaled dot product method to calculate the attention weight, adding LayerNorm normalization to the output layer and retaining the residual connection; finally, constructing a dual-objective loss function including KL divergence and mean square error, using the Adam optimizer with an initial learning rate of 0.001 for training, and decaying the learning rate to 90% of the original every 10 epochs.
[0086] The dynamic time warping distance calculation method specifically includes the following steps: first, the original service interval sequence is subjected to min-max normalization processing, a sliding average filter with a window size of 5 is used to eliminate noise, missing data points are supplemented using cubic spline interpolation, and outliers are corrected according to the 3σ principle; then, a Sakoe-Chiba constraint band with a width of 15% of the sequence length is set, a time-weighted Euclidean distance is used as the metric, the optimal curved path is searched through a dynamic programming method, and the cumulative distance is calculated; finally, the statistics are initialized based on the first 100 samples, and the threshold is updated using an exponentially weighted moving average with a decay coefficient of α=0.1. When the distance value exceeds μ+2.5σ, it is marked as an anomaly, and the timestamp of the anomaly is recorded.
[0087] The method for generating abnormal characteristic values of service efficiency fluctuations specifically includes the following steps: first, taking 30 minutes as the basic statistical window, calculating the relative ratio of the abnormal event count within the window to the historical benchmark of the same period in the past 7 days, and performing a logarithmic transformation on the ratio; then, mapping the processed ratio to the interval [0, 1] using an improved si gmo id function, where the slope parameter is set to 2.5 and the center point offset is set to 1.2; finally, dividing the abnormal event into three intervals according to its duration, configuring weight coefficients of 0.3, 0.6, and 0.8 respectively for weighted averaging calculation, and finally outputting the characteristic value with two decimal places.
[0088] The specific implementation process of the spatial congestion analysis module is as follows:
[0089] The method for constructing a spatiotemporal graph neural network specifically includes the following implementation steps:
[0090] First, the cell map is divided into a uniform square grid with a preset accuracy, with each grid cell being a 0.5-meter square. Each grid node is assigned a unique identifier and stores composite information consisting of two-dimensional coordinates and a precise timestamp. The time dimension is discretized at fixed intervals, typically set to 5-minute time slices. A spatial index structure is also established to accelerate subsequent node queries and traversal operations.
[0091] A composite graph structure consisting of three subgraph layers is constructed: the first layer is a resident mobility map, where nodes represent spatial grid intersections, edges represent actual resident movement paths, and edge weights reflect the volume of foot traffic; the second layer is a facility distribution map, where nodes correspond to the actual locations of various service facilities, edges represent accessible paths between facilities, and edge weights are determined by path length; the third layer is a spatiotemporal association graph, where nodes are expanded into space-time cube units, edges represent spatiotemporal proximity, and edge weights use an exponential decay function to simulate the effect of time decay. Each layer of the graph structure shares a common underlying spatial reference system.
[0092] A gated graph attention mechanism is embedded within each graph layer. This mechanism comprises multiple learnable gating functions that control the scope of information reception, feature importance weights, and information transmission strength. Residual connections are used to deeply fuse features extracted from each layer. Feature dimensions are first adjusted through one-dimensional convolution, and then features are aggregated using a weighted summation approach. The final output is a joint feature representation that contains spatial, temporal, and semantic information. The entire network is trained end-to-end, with backpropagation automatically optimizing component parameters.
[0093] The method for calculating the congestion propagation anomaly characteristic value specifically includes the following implementation steps:
[0094] Multi-level graph convolution operations are performed on the constructed spatiotemporal graph. Each convolution layer aggregates features using a fixed range of neighboring nodes. To maintain computational efficiency, polynomial approximation is used to simplify convolution kernel operations, while skip connections are introduced to preserve original feature information. A nonlinear activation function is applied after each convolution layer to enhance representation capabilities, and batch normalization is used to stabilize the training process.
[0095] To distinguish congestion characteristics across different time periods and regions, a specialized spatiotemporal location encoding scheme was designed. Spatial encoding uses a two-dimensional sine function to preserve relative spatial relationships; temporal encoding uses a periodic cosine function to effectively capture periodic patterns such as morning and evening rush hours. These two encodings are combined through concatenation and linear transformation to form a unified spatiotemporal location representation.
[0096] Based on the features extracted by graph convolution, a dynamic propagation relationship matrix is constructed. The spatial correlation strength between nodes is first calculated, and then a time decay factor is introduced to form a complete propagation coefficient matrix. Singular value decomposition is performed on this matrix to extract the main propagation modes. Anomaly scores are calculated using the reconstruction error to quantify the degree to which the current propagation mode deviates from the typical mode.
[0097] The method for generating the dynamic spatial congestion anomaly characteristic value specifically includes the following implementation steps:
[0098] From the spatial dimension, the degree of congestion distribution imbalance in each region is calculated using an improved Gini coefficient method that takes into account the regional area weight and the spatial correlation of adjacent regions. From the temporal dimension, the duration and periodic characteristics of congestion are analyzed, and the autocorrelation coefficient and trend component are calculated. From the intensity dimension, the abnormal degree of peak congestion is evaluated, and a standardized scoring system based on historical distribution is established.
[0099] Indicators from the three dimensions of space, time, and intensity are fed into a fully connected neural network for deep fusion. The network employs a three-layer structure, with the hidden layer using a rectified linear unit activation function and the output layer using a sigmoid function to normalize the results to the range of 0 to 1. The training process utilizes an optimization algorithm with weight decay to prevent overfitting.
[0100] Establish a dynamic update strategy for feature values, including short-term sliding window updates and long-term pattern adjustments. Short-term updates adjust feature values in real time based on the latest observations; long-term updates periodically retrain model parameters to adapt to changes in cell usage patterns. Also, set anomaly warning thresholds to trigger warnings when feature values exceed the thresholds.
[0101] The specific implementation process of the federal intelligent decision-making module is as follows:
[0102] The method for fusing the comprehensive service effectiveness feature vector specifically includes the following implementation steps:
[0103] First, the abnormal eigenvalues of service efficiency fluctuations and dynamic spatial congestion were standardized. The Z-score method was used to transform each eigenvalue into a distribution with a mean of 0 and a standard deviation of 1. To ensure the timeliness of the standardized parameters, a dynamic update mechanism was established, recalculating the mean and standard deviation every 24 hours. Extreme values outside the 3σ range were truncated using the Winsorize method to prevent outliers from interfering with subsequent analysis.
[0104] A dynamic feature weight adjustment module based on the attention mechanism was designed, with initial weights set to 0.6 for service efficiency and 0.4 for spatial congestion. The attention calculation layer, comprised of three subnetworks: query, key, and value, dynamically adjusts weight distribution by calculating correlation scores between features. To prevent excessive weight fluctuations, the weight change range is limited to ±0.1. A historical weight memory mechanism is also introduced to smooth out recent weight changes.
[0105] A feature cross-layer network layer is constructed, using outer product operations to generate second-order combined features of service efficiency and spatial congestion. To control feature dimensionality expansion, a feature filtering mechanism is designed to retain only the combined features with the top 50% mutual information scores. The cross-layer output is concatenated with the original features to form an enhanced representation that combines first- and second-order features.
[0106] The analysis method of the federated learning optimization model includes the following implementation steps:
[0107] A Transformer-based shared encoder was constructed, employing a 12-layer self-attention architecture with eight attention heads per layer and a hidden layer dimension of 768. Three task-specific decoders were designed: a service window optimization decoder using a pointer network architecture, a facility layout decoder employing a graph attention mechanism, and a path planning decoder based on a sequence generation architecture. A gradient isolation mechanism was established between the shared encoder and each decoder to prevent interference between tasks.
[0108] An improved FedProx algorithm was used for federated aggregation, with the proximal term parameter μ set to 0.1 to control the divergence between the local and global models. 30% of the nodes were selected for each round of federated training, with the number of local training epochs set to 5 and a batch size of 32. To handle non-IID data, a client selection strategy based on cosine similarity was designed to prioritize nodes with complementary data distributions for training.
[0109] During local training, Gaussian noise with a mean of 0 and a standard deviation of 0.01 is added to the gradient to achieve (ε, δ)-differential privacy protection, with a privacy budget of ε = 2.0 and δ = 1e-5. During the model prediction phase, the Monte Carlo Dropout method is used to calculate the mean and variance of the prediction results through 50 forward propagations, and high-confidence predictions with a coefficient of variation less than 0.1 are selected as the final output.
[0110] The simulation verification iterative optimization method includes the following implementation steps:
[0111] A virtual renovation plan matrix was constructed using an 8×8 grid layout, forming a total of 64 independent plan storage units. Each grid unit fully stores the following parameter information: facility spatial coordinate location data, including X / Y axis positioning information accurate to the centimeter level; service resource configuration parameters, detailing the number of service windows, opening hours, and service capacity; and path network topology, storing the width, direction, and connectivity of all access paths. A multi-dimensional evaluation index file was also created for each plan unit, recording various performance test results in real time.
[0112] A three-level simulation testing framework was established: at the micro level, agent-based modeling technology was used to simulate the entire process of individual residents, from entering the community to completing service, with a time resolution of seconds, capturing all the interactions during the service process. At the meso level, a crowd density simulation system based on fluid dynamics principles was deployed, generating heat maps of each area at 5-minute intervals to analyze the dynamic process of congestion formation and dissipation. At the macro level, a discrete event simulation model of the service network was constructed to calculate key performance indicators such as overall system throughput, average waiting time, and resource utilization. These three levels of simulation systems were synchronized through a unified time management mechanism.
[0113] An improved Bayesian optimization algorithm automatically searches for the optimal solution. It first establishes a solution performance prediction model based on a Gaussian process. Then, using acquisition functions, it evaluates the exploration value of each region, prioritizing in-depth testing of solution areas with high potential. An adaptive adjustment mechanism is incorporated into the optimization process, automatically expanding the search scope when performance plateaus. A dynamic termination mechanism is implemented with two criteria: a primary criterion requiring a performance improvement of no more than 1% over three consecutive iterations, and a secondary criterion requiring a total of 50 iterations. Optimization terminates when either criterion is triggered, automatically outputting the current optimal solution and generating a detailed solution comparison and analysis report.
[0114] Working Principle of the Presentation: This invention achieves intelligent evaluation and optimization of renovation plans for older residential communities through the collaborative work of a multi-source data real-time acquisition module, a service efficiency anomaly detection module, a spatial congestion analysis module, a federated intelligent decision-making module, and a digital twin verification module. Specifically, the system first accurately collects residents' three-dimensional motion trajectory data using a millimeter-wave radar array and a UWB positioning network. This data is then recorded using the weighing sensors and RFID identification devices of smart trash cans. An improved variational autoencoder is then used to detect anomalies in service duration sequences. A dynamic time warping algorithm is used to identify anomalous service events and generate standardized service efficiency fluctuation eigenvalues. For spatial analysis, the system constructs a spatiotemporal graph neural network model, utilizes a graph attention mechanism to calculate congestion propagation characteristics between facility nodes, combines it with the Lorenz curve to quantify spatial usage inequality, and outputs dynamic spatial congestion eigenvalues. The federated intelligent decision-making module integrates these features into a comprehensive service effectiveness feature vector, which is then input into a Transformer-based multi-task federated learning model for analysis, generating optimization recommendations while protecting data privacy. Finally, the digital twin verification module iteratively verifies the renovation plan in a virtual environment through multi-scale simulation testing and Bayesian optimization algorithms until the preset service efficiency indicators are achieved. This system innovatively combines digital twin technology with federated learning to intelligently process the entire renovation process for older residential communities, from data collection, analysis and evaluation, to optimization and verification, significantly improving the scientific nature and feasibility of the renovation plan.
[0115] The above is a detailed description of an embodiment of the present invention. However, the content described is only a preferred embodiment of the present invention and should not be considered to limit the scope of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A digital twin-based simulation system for the renovation of old residential areas, characterized by: include: A multi-source data real-time acquisition module, which is used to collect real-time three-dimensional movement trajectory and service duration data of residents when using the garbage sorting station, and at the same time combines the weighing sensor and RFID identification device of the smart trash can to record the type and weight of garbage served each time; A service efficiency anomaly detection module uses an improved variational autoencoder to detect anomalies in service duration sequences, calculates the dynamic time warping distance between adjacent service intervals, and marks an abnormal service event if the dynamic time warping distance exceeds 2 standard deviations. It also generates a service efficiency fluctuation anomaly feature value in the range of 0-1. A spatial congestion analysis module, which constructs a spatiotemporal graph neural network based on residents' movement trajectories, calculates the congestion propagation anomaly eigenvalues between facility nodes through a graph attention mechanism, quantifies spatial usage inequality using the Lorenz curve, and outputs dynamic spatial congestion anomaly eigenvalues; A federated intelligent decision-making module, which combines the abnormal service efficiency fluctuation characteristic values and the abnormal dynamic spatial congestion characteristic values into a comprehensive service effectiveness characteristic vector, inputs it into a pre-trained federated learning optimization model for analysis, and identifies the optimization potential of the current facility layout based on the analysis results; A digital twin verification module dynamically adjusts the number and layout of service windows based on model output, and iteratively optimizes the transformation plan through digital twin simulation verification until the preset service efficiency indicators are achieved.
2. The old residential area renovation effect simulation system based on digital twin according to claim 1 is characterized in that: The improved variational autoencoder anomaly detection method comprises the following steps: First, a bidirectional gated recurrent unit encoder network is constructed, whose input layer receives the normalized service duration sequence data; Then, a multi-head self-attention mechanism is introduced in the decoder part to calculate the correlation between different time steps through multiple parallel attention heads; Finally, the variational inference process is completed by combining the dual constraints of latent space distribution optimization and sequence reconstruction error.
3. The old residential area renovation effect simulation system based on digital twin according to claim 1 is characterized in that: The method for calculating the dynamic time warping distance comprises the following steps: First, the adjacent service interval sequence is standardized and preprocessed to eliminate the influence of different dimensions; Then the sequence similarity is calculated using a dynamic time warping algorithm with a constrained window, where the window size is set to a specific ratio of the sequence length; Finally, anomaly judgment is performed based on the dynamically updated statistical threshold, and when the distance value exceeds the current mean plus two standard deviations, it is marked as an anomaly.
4. The old residential area renovation effect simulation system based on digital twin according to claim 1 is characterized in that: The method for generating abnormal characteristic values of service efficiency fluctuations comprises the following steps: First, the frequency of abnormal events within the preset time window is counted and its relative ratio to the baseline frequency is calculated; This ratio is then mapped into a standard range through a nonlinear activation function; Finally, the characteristic value is weighted and adjusted based on the duration factor of the abnormal event, where the duration weight is set to a fixed ratio.
5. The old residential area renovation effect simulation system based on digital twin according to claim 1 is characterized in that: The method for constructing the spatiotemporal graph neural network includes the following steps: Discretize the cell plan into grid nodes, each node contains location coordinates and timestamp information; A three-layer heterogeneous graph structure is established to represent the residents' mobility paths, facility distribution topology, and spatiotemporal correlation relationships respectively; Embed a gated graph attention mechanism in each layer of the graph to dynamically adjust the message passing weights between different nodes; The residual connection method is used to fuse the features of each layer to prevent the gradient of the deep network from disappearing.
6. The old residential area renovation effect simulation system based on digital twin according to claim 1 is characterized in that: The method for calculating the congestion propagation anomaly characteristic value comprises the following steps: Extract the congestion propagation pattern between nodes through graph convolution operations; Introducing spatiotemporal location coding to distinguish congestion characteristics in different time periods and regions; Calculate the congestion influence coefficient between each facility node to form a dynamic propagation matrix; The propagation matrix is subjected to singular value decomposition to extract the main abnormal propagation mode features and obtain the abnormal characteristic values of congestion propagation.
7. The old residential area renovation effect simulation system based on digital twin according to claim 1 is characterized in that: The method for generating a dynamic spatial congestion anomaly characteristic value comprises the following steps: Based on the node congestion feature matrix output by the spatiotemporal graph neural network, the congestion change rate of each facility node in the continuous time window is calculated; A dynamic time warping algorithm is used to compare the difference between the current congestion pattern and the historical benchmark pattern to extract abnormal fluctuation characteristics; Construct a comprehensive evaluation index including the following dimensions: Spatial dimension: Calculate the Gini coefficient of congestion index in each area Time dimension: Analyzing the autocorrelation of congestion duration Intensity dimension: assesses the deviation value of peak congestion level; The multi-dimensional indicators are fused into dynamic spatial congestion anomaly feature values in the range of 0-1 through a three-layer fully connected neural network, where the output layer uses the Sigma id activation function for normalization. The method for establishing the historical benchmark model includes: Collect congestion data during normal operating hours for 30 consecutive days; Use K-means clustering algorithm to identify typical congestion patterns; Establish a probability distribution reference system based on Gaussian mixture model; The Gini coefficient is calculated using the improved trapezoidal area method, which specifically includes: Divide the cell area into several equal-area grids; Sort grid data in ascending order by congestion index; Compute the normalized area difference between the Lorentz curve and the diagonal.
8. The old residential area renovation effect simulation system based on digital twin according to claim 1 is characterized in that: The method for fusing the comprehensive service effectiveness feature vector comprises the following steps: Standardize the abnormal characteristic values of service efficiency fluctuation and dynamic spatial congestion to eliminate dimensional differences; The attention mechanism is used to dynamically assign feature weights, where the service efficiency feature weight is initially set to 0.6, and the spatial congestion feature weight is initially set to 0.4; Generate second-order combined features through feature cross-layer to capture the interactive relationship between service efficiency and spatial congestion; The PCA dimensionality reduction method is used to compress the fused features into a 10-dimensional vector, retaining more than 95% of the original information.
9. The digital twin-based simulation system for old residential area renovation according to claim 1 is characterized in that: The analysis method of the federated learning optimization model includes the following steps: Build a Transformer-based multi-task learning architecture consisting of a shared encoder and three task-specific decoders; FedProx algorithm is used for federated aggregation, and the proximal term parameter μ = 0.1 is set to control the model difference; During local training on each participating node, a differential privacy mechanism is introduced to add random noise that conforms to the Gaussian distribution. The uncertainty of model prediction is evaluated by the Monte Carlo Dropout method, and high-confidence optimization results are screened.
10. The digital twin-based simulation system for old residential area renovation according to claim 1 is characterized in that: The simulation verification iterative optimization method comprises the following steps: A virtual renovation scheme matrix was constructed, using an 8×8 grid layout to store 64 candidate schemes, with each grid cell containing complete facility layout parameters and service strategies. Implement multi-scale simulation tests, including: Micro level: simulate the entire service process of a single resident; Meso-level: assessing the dynamics of regional-level pedestrian density; Macro level: Analyze the overall service network throughput performance; Automatically adjust solution parameters based on the Bayesian optimization algorithm to prioritize the exploration of high-potential solution areas; A dynamic termination mechanism is established to automatically output the optimal solution when the optimization amplitude of three consecutive iterative iterations is less than the preset threshold.
Citation Information
Cited By
Defect detection method and system for gantry machine tool workbench casting part
CN120927812A