Regional public service demand prediction method and system based on artificial intelligence
By constructing a multi-source heterogeneous data fusion system and hierarchical AI model integration training, combined with a dynamic iterative optimization mechanism, the data and model problems in regional public service demand forecasting were solved, achieving high-precision, dynamic forecasting and decision support, while ensuring data security and system efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHONGBEI UNIV
- Filing Date
- 2026-01-17
- Publication Date
- 2026-04-28
AI Technical Summary
Existing technologies for predicting regional public service demand suffer from problems such as limited data collection dimensions, lack of adaptability in feature engineering, simplistic prediction model structure, lack of continuous optimization mechanisms, and unreasonable system architecture design, resulting in low prediction accuracy and difficulty in supporting actual decision-making.
We construct a multi-source heterogeneous data fusion system, use an improved mutual information entropy algorithm to screen features, combine hierarchical AI model integration training and dynamic iterative optimization mechanism, and use blockchain technology to ensure data security, thereby achieving comprehensive data, regional differentiation of features, and continuous adaptive optimization of the model.
It enables high-precision and dynamic prediction of regional public service needs, provides intuitive decision support, improves the accuracy of prediction results and the efficiency of system operation, and ensures data security.
Smart Images

Figure CN121936841A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of public service technology, specifically to a method and system for predicting regional public service demand based on artificial intelligence. Background Technology
[0002] Regional public services are core infrastructure for ensuring residents' quality of life and promoting harmonious social development. The accuracy of demand forecasting directly determines the efficiency of public resource allocation and residents' satisfaction. With the acceleration of urbanization and changes in population structure, the demand for regional public services is becoming more diversified, dynamic, and differentiated, making traditional forecasting methods insufficient to meet practical application needs. In existing technologies, regional public service demand forecasting mainly relies on statistical analysis models (such as regression analysis and time series ARIMA models) and simple machine learning algorithms, which have the following significant drawbacks: The data collection is limited to a single dimension, focusing mainly on static basic data such as population and economy, while ignoring dynamic data such as residents' travel trajectories and public service usage behavior, as well as related data such as emergencies and public opinion. This results in incomplete data support and an inability to reflect the dynamic changes in demand. Feature engineering lacks adaptability, uses a fixed feature set for model training, and does not take into account the differences in population density, economic level, geographical location, etc. in different regions. The correlation between features and prediction targets is not sufficiently explored, which reduces the prediction accuracy of the model. The predictive model has a simple structure and is difficult to capture the long-term trend, cyclical fluctuation and abnormal changes of data at the same time. It has a weak ability to predict demand variations in scenarios such as public health emergencies and large-scale social events. Lacking a continuous optimization mechanism, the model runs in a fixed manner after training and cannot be dynamically adjusted according to the deviation between newly collected data and actual needs, resulting in a gradual decrease in prediction accuracy over time. The forecast results are presented in a single format, only outputting numerical forecasts without providing visualizations or targeted resource allocation decision-making suggestions, making it difficult to directly support actual work. The system architecture is poorly designed, with data acquisition, processing, and modeling modules operating independently and lacking a collaborative mechanism, resulting in low operational efficiency. Furthermore, a robust data security system has not been established, posing a risk of data leakage. With the rapid development of artificial intelligence and big data technologies, their advantages in data mining, pattern recognition, and predictive analysis have been widely verified. However, existing technologies have not yet formed an integrated regional public service demand prediction solution that combines "method + system," and cannot simultaneously solve multiple problems such as data comprehensiveness, feature adaptability, model accuracy, continuous optimization, and decision support. Therefore, designing a multi-dimensional, high-precision, iterative, and strongly supported artificial intelligence-based method and system for predicting regional public service demand has become an urgent technical challenge. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method and system for predicting regional public service demand based on artificial intelligence, so as to realize accurate and dynamic prediction of regional public service demand, provide comprehensive decision support for resource allocation, and at the same time ensure the security of data processing and the efficiency of system operation. To solve the above-mentioned technical problems, the technical solution provided by this invention is: a method for predicting regional public service demand based on artificial intelligence, comprising the following steps: S1. Multi-source heterogeneous data fusion and collection: Construct a three-dimensional data collection system that includes static basic data, dynamic behavioral data, and emergency-related data. Collect population statistics, economic indicators, public service facility operation data, resident travel trajectory data, emergency record data, and online public opinion data of the target area through four methods: API interface, real-time transmission from sensors, government data sharing platform, and social media public opinion crawling. S2. Dynamic Feature Engineering Construction: Based on the improved mutual information entropy algorithm, core features are selected, and a differentiated feature set is constructed by combining regional attributes. Trend, periodic and random features are extracted through time-series feature decomposition. Attention mechanism is used to assign dynamic weights to different features to form a high-dimensional feature vector that adapts to the target region. S3. Hierarchical AI Model Integration Training: Construct a three-level model architecture including a basic prediction layer, a precision correction layer, and an anomaly adaptation layer. The basic prediction layer uses a temporal convolutional network to capture long-term data dependencies. The precision correction layer corrects the errors of the basic prediction results through a gradient boosting tree. The anomaly adaptation layer uses a generative adversarial network to learn the demand variation patterns under sudden scenarios and integrates the output results of the three-level model through a weighted voting mechanism. S4. Dynamic Iterative Optimization: The training data is updated in real time based on the sliding window method. The Bayesian optimization algorithm is used to dynamically adjust the model hyperparameters, and a feedback mechanism for the deviation between the prediction results and the actual needs is established. The feature weights and model fusion coefficients are recalculated every cycle to achieve continuous adaptive optimization of the model. Furthermore, in step S1, a distributed data acquisition framework is adopted, which supports multi-threaded parallel acquisition. The number of acquisition threads is dynamically allocated according to the number of data sources. Data from different sources is standardized and uniformly converted into JSON format. Field naming follows a three-level naming rule of "region-data type-indicator name". Furthermore, in step S1, a data traceability chain is constructed using blockchain technology. Each data block contains a collection node ID, collection timestamp, data hash value, and source authentication information. The authenticity of the data is verified using a proof-of-work mechanism. Data transmission uses the SSL / TLS 1.3 encryption protocol and is encrypted and stored using the national cryptographic algorithm SM4. The key is distributed and managed using the asymmetric encryption algorithm RSA2048. Furthermore, in step S2, the improved mutual information entropy algorithm introduces a regional difference coefficient, which is calculated using the entropy weighting method. It comprehensively considers four dimensions: regional population density, economic development level, geographical location, and public service infrastructure, with weights of 30%, 25%, 20%, and 25%, respectively. When selecting core features, the basic mutual information value between the original feature and the prediction target is first calculated, and then multiplied by the regional difference coefficient to obtain a weighted mutual information value. Features with a weighted mutual information value ≥ 0.6 are selected as core features. Further, in step S2, the temporal feature decomposition adopts the ensemble empirical mode decomposition method, the added Gaussian white noise amplitude is 0.2 times the standard deviation of the original data, and the number of ensembles is set to 100; the attention mechanism network adopts a multi-head attention structure with 8 heads, and maps the features to the attention space through a fully connected layer. The average prediction error of the past 3 cycles is used as the feedback signal to dynamically adjust the feature weights, and the weight update cycle is consistent with the highest frequency cycle of data acquisition. Furthermore, in step S3, the convolutional layers of the temporal convolutional network adopt an dilated convolutional structure, with the dilation rate starting from 1 and increasing exponentially by 2, and the maximum dilation rate not exceeding 1 / 4 of the length of the input temporal data; each convolutional block contains a convolutional layer, a batch normalization layer, a ReLU activation function, and a dropout layer, with the dropout rate set to 0.15 to avoid model overfitting; the input layer uses an embedding layer to map the high-dimensional feature vector to a 512-dimensional feature space, and the output layer uses a linear activation function to output the basic predicted value. Furthermore, in step S3, the objective function of the gradient boosting tree adopts the log-likelihood loss function, and the regularization term includes L1 regularization and L2 regularization, with regularization coefficients determined by grid search as 0.1 and 1.0, respectively; the maximum depth of the decision tree is set to 8, the minimum sum of sample weights is 0.1, the initial learning rate is 0.1, and an adaptive learning rate strategy is adopted, which is dynamically adjusted according to the error decrease rate in each iteration; 5-fold cross-validation is adopted, and the tree structure is optimized with the goal of minimizing the root mean square error of the validation set. Further, in step S3, the generator and discriminator of the generative adversarial network are both constructed based on a deep residual network. The generator contains 6 residual blocks, each consisting of two 3×3 convolutional layers, a batch normalization layer, and a ReLU activation function, with the output layer using the tanh activation function. The discriminator contains 4 residual blocks and 2 fully connected layers, with the output layer using the sigmoid activation function. The loss function of the generative adversarial network uses Wasserstein distance combined with gradient penalty, the learning rate is set to 0.0001, and the number of iterations is dynamically adjusted according to the amount of abnormal data samples. For every 10% increase in the sample size, the number of iterations increases by 50. Further, in step S4, the initial window size of the sliding window is 6 months. When the data update frequency is hourly, the window size is adjusted to 1 month; when the update frequency is daily, it is adjusted to 3 months; and when the update frequency is monthly, it remains at 6 months. The search space of the Bayesian optimization algorithm contains 20 hyperparameter dimensions, uses a Gaussian process as a surrogate model, and sets the balance coefficient between exploration and utilization to 0.2. The three-level warning threshold of the deviation feedback mechanism is determined by statistically analyzing the fluctuation range of actual demand over the past 3 years. The threshold for mild deviation is ±5%, the threshold for moderate deviation is ±10%, and the threshold for severe deviation is ±15%. When the moderate threshold is exceeded, the feature weights are recalculated. When the severe threshold is exceeded, the model architecture is fine-tuned. The fine-tuning includes the number of TCN convolutional blocks, the number of XGBoost decision trees, and the structure of GAN residual blocks. The present invention also provides an artificial intelligence-based regional public service demand prediction system, including a data acquisition module, a data processing and security module, a feature engineering module, a model training and prediction module, a dynamic optimization module, a visualization and decision support module, and a system management module; The data acquisition module adopts a distributed architecture design, including an API interface acquisition unit, a sensor data receiving unit, a government data docking unit, and a public opinion crawling unit. It supports multi-threaded parallel acquisition and can automatically match the acquisition method according to the data source type, and dynamically allocate the number of acquisition threads. The data processing and security module includes a data standardization unit, a data traceability unit, an encrypted transmission unit, and an encrypted storage unit, which realizes unified data format, traceability of the collection process, and security assurance for transmission and storage. It also supports data quality verification functions and automatically removes abnormal data with a missing value ratio of more than 30%. The feature engineering module includes a core feature selection unit, a temporal feature decomposition unit, and a dynamic weight allocation unit. It incorporates an improved mutual information entropy algorithm, an EEMD decomposition algorithm, and a multi-head attention mechanism network, which can automatically adjust feature selection and weighting strategies according to regional attributes. The model training and prediction module includes a TCN basic prediction unit, an XGBoost precision correction unit, a GAN anomaly adaptation unit, and a model fusion unit. It supports manual configuration and automatic optimization of model parameters and can automatically load the corresponding model architecture according to the prediction scenario. The dynamic optimization module includes a data update unit, a hyperparameter optimization unit, and a bias feedback unit, enabling real-time updates of training data, intelligent optimization of model hyperparameters, and rapid response to prediction bias. The visualization and decision support module includes a result visualization unit and a report generation unit, supports various visualization formats such as heatmaps, trend curves, and radar charts, automatically generates structured resource allocation suggestion reports, and supports report export; The system management module includes a user management unit, a permission control unit, a log recording unit, and a system monitoring unit. It supports multi-role permission allocation, automatically records system operation logs and operation logs, monitors the operating status of each module in real time, and triggers alarm notifications when an anomaly occurs. The advantages of this invention compared to the prior art are: This invention constructs a three-dimensional data acquisition system that integrates three types of multi-source heterogeneous data: static, dynamic, and burst data. It combines a distributed acquisition framework with a data security guarantee mechanism to ensure both the comprehensiveness and timeliness of the data, as well as data privacy and security, thus solving the problems of single data dimension and insufficient security in traditional methods. This invention introduces a regional difference coefficient through an improved mutual information entropy algorithm, and combines it with EEMD temporal decomposition and multi-head attention mechanism to achieve regional difference screening and dynamic weighting of features, improve the correlation between features and prediction targets, and solve the problem of poor adaptability of traditional feature engineering. The hierarchical AI model integration architecture of this invention simultaneously captures the long-term trends, periodic fluctuations and anomalous changes in data, resulting in low prediction errors and solving the problem of weak prediction capabilities of traditional models. The dynamic iterative optimization mechanism of this invention achieves continuous adaptive optimization of the model through sliding window data updates, Bayesian hyperparameter optimization, and bias feedback adjustment, avoiding the decay of prediction accuracy and solving the problem of traditional models lacking a continuous optimization mechanism. The visualization of forecast results and the generation of resource allocation suggestion reports in this invention provide intuitive and specific decision-making basis for public service planning, solving the problem of weak decision support from traditional forecast results. Attached Figure Description Figure 1 This is a flowchart of the regional public service demand prediction method based on artificial intelligence according to the present invention. Figure 2 This is a system block diagram of the regional public service demand prediction system based on artificial intelligence, as described in this invention. Detailed Implementation Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present invention. The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the invention or its application or use. Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification. In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values. The following detailed description of the artificial intelligence-based regional public service demand prediction method and system of the present invention, with reference to the accompanying drawings, provides further insight. Combined with appendix Figure 1-2 The specific implementation process of the regional public service demand prediction method and system based on artificial intelligence of the present invention is as follows: An AI-based method for predicting regional public service demand includes the following steps: S1. Construct a three-dimensional data acquisition system consisting of "static basic data + dynamic behavioral data + sudden related data". Adopt a distributed data acquisition framework and collect data in parallel through four methods: API interface, real-time transmission from sensors, government data sharing platform, and social media sentiment crawling. The number of acquisition threads is dynamically allocated according to the number of data sources, and the single-thread acquisition rate is not less than 100MB / minute. Static basic data: Collect population statistics (number, age structure, gender ratio, household registration type, etc.), economic indicator data (total GDP, per capita income, industrial structure, etc.), and basic data of public service facilities (number, distribution location, scale, years of operation, etc.) of the target area through the government data sharing platform. The data update cycle is monthly. Dynamic behavioral data: Residents' travel trajectory data, public service usage data (usage frequency, stay duration, service type preference, etc.) and traffic flow data are collected through traffic sensors, public service venue check-in devices, and mobile terminal positioning API interfaces. The data update cycle is on the hourly level. Emergency-related data: Data on natural disasters, public health emergencies, large-scale social events, and other emergencies, as well as related public opinion data, are collected through government emergency management systems and social media public opinion crawling tools. The data update cycle is on the order of minutes. The collected heterogeneous data undergoes format standardization, being uniformly converted to JSON format, with field naming following a three-level naming rule of "region-data type-indicator name". A data traceability chain is constructed using blockchain technology, with each data block containing the collection node ID, collection timestamp, data hash value, and source authentication information. A proof-of-work mechanism is used to verify data authenticity. Data transmission employs the SSL / TLS 1.3 encryption protocol, combined with the national cryptographic algorithm SM4 for encrypted data storage. The key is distributed and managed using the asymmetric encryption algorithm RSA2048 to ensure data privacy and security. S2. Core Feature Selection: Core features are selected based on an improved mutual information entropy algorithm. This algorithm introduces a regional difference coefficient, which is calculated using the entropy weighting method. It comprehensively considers four dimensions: regional population density, economic development level, geographical location, and public service infrastructure, with weights of 30%, 25%, 20%, and 25%, respectively. First, the basic mutual information value between the original feature and the prediction target is calculated. Then, it is multiplied by the regional difference coefficient to obtain a weighted mutual information value. Features with a weighted mutual information value ≥ 0.6 are selected as core features to ensure regional suitability. Time series feature decomposition: The ensemble empirical mode decomposition (EEMD) method is used to decompose the time series data in the core features. The amplitude of the added Gaussian white noise is 0.2 times the standard deviation of the original data. The number of ensembles is set to 100 to avoid mode aliasing. After decomposition, three types of features are obtained: trend (reflecting long-term development patterns), periodic (reflecting seasonal or periodic fluctuations), and random (reflecting the influence of accidental factors). Dynamic feature weighting: A multi-head attention mechanism network (with 8 heads) is constructed. The decomposed features are mapped to the attention space through a fully connected layer. The average prediction error of the past 3 cycles is used as the feedback signal to dynamically adjust the weights of different features. The weight update cycle is consistent with the highest frequency cycle of data acquisition, and finally a high-dimensional feature vector adapted to the target region is formed. S3. Construct a three-level model architecture consisting of a "basic prediction layer + precise correction layer + anomaly adaptation layer," and fuse the output results of the three-level model through a weighted voting mechanism, as detailed below: The basic prediction layer (TCN) uses a temporal convolutional network to capture long-term dependencies in the data. The convolutional layers employ a dilated convolutional structure, with the dilation rate starting at 1 and increasing exponentially by 2, with a maximum dilation rate not exceeding 1 / 4 of the length of the input temporal data. Each convolutional block contains a convolutional layer, a batch normalization layer, a ReLU activation function, and a dropout layer (with a dropout rate set to 0.15). The input layer uses an embedding layer to map high-dimensional feature vectors to a 512-dimensional feature space, and the output layer uses a linear activation function to output the basic prediction value. The precise correction layer (XGBoost) takes the prediction results from TCN and the original high-dimensional feature vectors as input. The objective function is the log-likelihood loss function, and the regularization term includes L1 regularization (coefficient 0.1) and L2 regularization (coefficient 1.0). The maximum depth of the decision tree is set to 8, the minimum sum of sample weights is 0.1, and the initial learning rate is 0.1. An adaptive learning rate strategy is adopted, which is dynamically adjusted according to the error reduction rate in each iteration. Five-fold cross-validation is used to optimize the tree structure with the goal of minimizing the root mean square error (RMSE) of the validation set, and the corrected prediction value is output. Anomaly Adaptation Layer (GAN): Both the generator and discriminator are built on a deep residual network (ResNet). The generator contains 6 residual blocks (each residual block consists of two 3×3 convolutional layers, a batch normalization layer, and a ReLU activation function), and the output layer uses the tanh activation function. The discriminator contains 4 residual blocks and 2 fully connected layers, and the output layer uses the sigmoid activation function. The GAN's loss function uses Wasserstein distance combined with gradient penalty, the learning rate is set to 0.0001, and the number of iterations is dynamically adjusted according to the amount of anomalous data samples (the number of iterations increases by 50 for every 10% increase in the sample size). Through adversarial training, it learns the demand variation patterns under sudden scenarios and outputs demand correction values under anomalous scenarios. Model fusion: A weighted voting mechanism is adopted, which assigns weights based on the prediction accuracy of the three-level models in historical data (the higher the accuracy, the greater the weight). The output results of the three-level models are weighted and summed to obtain the final predicted value of public service demand. S4. Real-time data updates: The sliding window method is used to update training data. The initial window size is 6 months. When the data update frequency is hourly, the window size is adjusted to 1 month. When the update frequency is daily, the window size is adjusted to 3 months. When the update frequency is monthly, the window size is kept at 6 months. The sliding window is used every cycle (weekly) to include newly collected data and remove expired data. Hyperparameter optimization: Bayesian optimization algorithm is adopted with the goal of minimizing prediction error (RMSE). The search space includes 20 hyperparameter dimensions (covering the kernel size of TCN, the learning rate of XGBoost, the number of iterations of GAN, etc.). Gaussian process is used as surrogate model. The balance coefficient between exploration and exploitation is set to 0.2. Hyperparameter optimization is performed every two weeks. Deviation Feedback Optimization: A deviation feedback mechanism is established between the predicted results and actual needs. The three-level early warning thresholds are determined by statistically analyzing the fluctuation range of actual needs over the past three years (mild deviation ±5%, moderate deviation ±10%, severe deviation ±15%). When the deviation value exceeds the moderate threshold, feature weights are recalculated; when the deviation value exceeds the severe threshold, model architecture fine-tuning is triggered. Fine-tuning includes adjusting the number of TCN convolutional blocks, the number of XGBoost decision trees, and the GAN residual block structure. S5 presents the forecast results in the form of a heat map (showing the spatial distribution of demand within the region), a trend curve (showing the temporal variation of demand), and a supply-demand gap radar chart (showing the supply-demand matching situation of different types of services), supporting multi-dimensional interactive queries. It also outputs a resource allocation recommendation report, which includes three core components: the number of new public service facilities (calculated based on the supply-demand gap), layout optimization schemes (combining regional population distribution and transportation convenience), and resource scheduling path planning (based on the shortest path algorithm). To achieve the above method, this invention also provides an artificial intelligence-based regional public service demand forecasting system. This system includes a data acquisition module, a data processing and security module, a feature engineering module, a model training and prediction module, a dynamic optimization module, a visualization and decision support module, and a system management module. These modules work collaboratively to achieve fully automated operation throughout the entire process. Data acquisition module: Adopting a distributed architecture design, it includes an API interface acquisition unit, a sensor data receiving unit, a government data docking unit, and a public opinion crawling unit. It supports multi-threaded parallel acquisition, can automatically match the acquisition method according to the data source type, and dynamically allocate the number of acquisition threads to ensure acquisition efficiency. Data processing and security module: Includes data standardization unit, data traceability unit, encrypted transmission unit, and encrypted storage unit, to achieve unified data format, traceability of the collection process, and security assurance for transmission and storage. It supports data quality verification function and automatically removes abnormal data with missing values exceeding 30%. Feature engineering module: includes core feature selection unit, temporal feature decomposition unit, dynamic weight allocation unit, built-in improved mutual information entropy algorithm, EEMD decomposition algorithm and multi-head attention mechanism network, which can automatically adjust feature selection and weighting strategy according to regional attributes; Model training and prediction module: includes TCN basic prediction unit, XGBoost precision correction unit, GAN anomaly adaptation unit, and model fusion unit. It supports manual configuration and automatic optimization of model parameters and can automatically load the corresponding model architecture according to the prediction scenario. Dynamic optimization module: includes a data update unit, a hyperparameter optimization unit, and a bias feedback unit, enabling real-time updates of training data, intelligent optimization of model hyperparameters, and rapid response to prediction bias; Visualization and Decision Support Module: Includes result visualization unit and report generation unit, supports various visualization forms such as heatmap, trend curve, radar chart, can automatically generate structured resource allocation suggestion reports, and supports report export (formats include PDF, Word, Excel). System management module: includes user management unit, permission control unit, log recording unit, and system monitoring unit. It supports multi-role permission allocation (administrator, operator, viewer), automatically records system operation logs and operation logs, monitors the operating status of each module in real time, and triggers alarm notifications when an anomaly occurs. The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.
Claims
1. A method for predicting regional public service demand based on artificial intelligence, characterized in that, Includes the following steps: S1. Multi-source heterogeneous data fusion and collection: Construct a three-dimensional data collection system that includes static basic data, dynamic behavioral data, and emergency-related data. Collect population statistics, economic indicators, public service facility operation data, resident travel trajectory data, emergency record data, and online public opinion data of the target area through four methods: API interface, real-time transmission from sensors, government data sharing platform, and social media public opinion crawling. S2. Dynamic Feature Engineering Construction: Based on the improved mutual information entropy algorithm, core features are selected, and a differentiated feature set is constructed by combining regional attributes. Trend, periodic and random features are extracted through time-series feature decomposition. Attention mechanism is used to assign dynamic weights to different features to form a high-dimensional feature vector that adapts to the target region. S3. Hierarchical AI Model Integration Training: Construct a three-level model architecture including a basic prediction layer, a precision correction layer, and an anomaly adaptation layer. The basic prediction layer uses a temporal convolutional network to capture long-term data dependencies. The precision correction layer corrects the errors of the basic prediction results through a gradient boosting tree. The anomaly adaptation layer uses a generative adversarial network to learn the demand variation patterns under sudden scenarios and integrates the output results of the three-level model through a weighted voting mechanism. S4. Dynamic Iterative Optimization: The training data is updated in real time based on the sliding window method. The Bayesian optimization algorithm is used to dynamically adjust the model hyperparameters, and a feedback mechanism for the deviation between the prediction results and the actual needs is established. The feature weights and model fusion coefficients are recalculated every cycle to achieve continuous adaptive optimization of the model.
2. The regional public service demand forecasting method based on artificial intelligence according to claim 1, characterized in that: In step S1, a distributed data acquisition framework is adopted, which supports multi-threaded parallel acquisition. The number of acquisition threads is dynamically allocated according to the number of data sources. Data from different sources is standardized and uniformly converted into JSON format. Field naming follows a three-level naming rule of "region-data type-indicator name".
3. The regional public service demand forecasting method based on artificial intelligence according to claim 2, characterized in that: In step S1, a data traceability chain is constructed using blockchain technology. Each data block contains a collection node ID, collection timestamp, data hash value, and source authentication information. The authenticity of the data is verified using a proof-of-work mechanism. Data transmission uses the SSL / TLS 1.3 encryption protocol, combined with the national cryptographic algorithm SM4 for data encryption and storage, and the key is distributed and managed using the asymmetric encryption algorithm RSA2048.
4. The regional public service demand forecasting method based on artificial intelligence according to claim 3, characterized in that: In step S2, the improved mutual information entropy algorithm introduces a regional difference coefficient, which is calculated using the entropy weighting method. It comprehensively considers four dimensions: regional population density, economic development level, geographical location, and public service infrastructure, with weights of 30%, 25%, 20%, and 25%, respectively. When selecting core features, the basic mutual information value between the original feature and the prediction target is first calculated, and then multiplied by the regional difference coefficient to obtain the weighted mutual information value. Features with a weighted mutual information value ≥ 0.6 are selected as core features.
5. The regional public service demand forecasting method based on artificial intelligence according to claim 4, characterized in that: In step S2, the temporal feature decomposition adopts the ensemble empirical mode decomposition method, the added Gaussian white noise amplitude is 0.2 times the standard deviation of the original data, and the number of ensembles is set to 100. The attention mechanism network adopts a multi-head attention structure with 8 heads. Features are mapped to the attention space through a fully connected layer. The average prediction error of the past 3 cycles is used as the feedback signal to dynamically adjust the feature weights. The weight update cycle is consistent with the highest frequency cycle of data acquisition.
6. The regional public service demand forecasting method based on artificial intelligence according to claim 5, characterized in that: In step S3, the convolutional layers of the temporal convolutional network adopt a dilated convolutional structure, with the dilation rate starting from 1 and increasing exponentially by 2, and the maximum dilation rate not exceeding 1 / 4 of the length of the input temporal data; each convolutional block contains a convolutional layer, a batch normalization layer, a ReLU activation function, and a dropout layer, with the dropout rate set to 0.15 to avoid model overfitting; the input layer uses an embedding layer to map the high-dimensional feature vector to a 512-dimensional feature space, and the output layer uses a linear activation function to output the basic predicted value.
7. The regional public service demand forecasting method based on artificial intelligence according to claim 6, characterized in that: In step S3, the objective function of the gradient boosting tree adopts the log-likelihood loss function, and the regularization term includes L1 regularization and L2 regularization. The regularization coefficients are determined to be 0.1 and 1.0 respectively through grid search. The maximum depth of the decision tree is set to 8, the minimum sum of sample weights is 0.1, the initial learning rate is 0.1, and an adaptive learning rate strategy is adopted, which is dynamically adjusted according to the error decrease rate of each iteration. Cross-validation uses 5-fold cross-validation, and the tree structure is optimized with the goal of minimizing the root mean square error of the validation set.
8. The regional public service demand forecasting method based on artificial intelligence according to claim 7, characterized in that: In step S3, both the generator and discriminator of the generative adversarial network are constructed based on a deep residual network. The generator contains 6 residual blocks, each consisting of two 3×3 convolutional layers, a batch normalization layer, and a ReLU activation function. The output layer uses the tanh activation function. The discriminator contains 4 residual blocks and 2 fully connected layers. The output layer uses the sigmoid activation function. The loss function of the generative adversarial network uses Wasserstein distance combined with gradient penalty. The learning rate is set to 0.0001. The number of iterations is dynamically adjusted according to the amount of abnormal data samples. For every 10% increase in the sample size, the number of iterations increases by 50.
9. The regional public service demand forecasting method based on artificial intelligence according to claim 8, characterized in that: In step S4, the initial window size of the sliding window is 6 months. When the data update frequency is hourly, the window size is adjusted to 1 month; when the update frequency is daily, it is adjusted to 3 months; and when the update frequency is monthly, it remains at 6 months. The search space of the Bayesian optimization algorithm contains 20 hyperparameter dimensions, uses a Gaussian process as a surrogate model, and sets the balance coefficient between exploration and utilization to 0.
2. The three-level warning threshold of the deviation feedback mechanism is determined by statistically analyzing the fluctuation range of actual demand over the past 3 years. The threshold for mild deviation is ±5%, the threshold for moderate deviation is ±10%, and the threshold for severe deviation is ±15%. When the moderate threshold is exceeded, the feature weights are recalculated. When the severe threshold is exceeded, the model architecture is fine-tuned. The fine-tuning includes the number of TCN convolutional blocks, the number of XGBoost decision trees, and the structure of GAN residual blocks.
10. A regional public service demand forecasting system based on artificial intelligence, characterized in that, It includes a data acquisition module, a data processing and security module, a feature engineering module, a model training and prediction module, a dynamic optimization module, a visualization and decision support module, and a system management module; The data acquisition module adopts a distributed architecture design, including an API interface acquisition unit, a sensor data receiving unit, a government data docking unit, and a public opinion crawling unit. It supports multi-threaded parallel acquisition and can automatically match the acquisition method according to the data source type, and dynamically allocate the number of acquisition threads. The data processing and security module includes a data standardization unit, a data traceability unit, an encrypted transmission unit, and an encrypted storage unit, which realizes unified data format, traceability of the collection process, and security assurance for transmission and storage. It also supports data quality verification functions and automatically removes abnormal data with a missing value ratio of more than 30%. The feature engineering module includes a core feature selection unit, a temporal feature decomposition unit, and a dynamic weight allocation unit. It incorporates an improved mutual information entropy algorithm, an EEMD decomposition algorithm, and a multi-head attention mechanism network, which can automatically adjust feature selection and weighting strategies according to regional attributes. The model training and prediction module includes a TCN basic prediction unit, an XGBoost precision correction unit, a GAN anomaly adaptation unit, and a model fusion unit. It supports manual configuration and automatic optimization of model parameters and can automatically load the corresponding model architecture according to the prediction scenario. The dynamic optimization module includes a data update unit, a hyperparameter optimization unit, and a bias feedback unit, enabling real-time updates of training data, intelligent optimization of model hyperparameters, and rapid response to prediction bias. The visualization and decision support module includes a result visualization unit and a report generation unit, supports various visualization formats such as heatmaps, trend curves, and radar charts, automatically generates structured resource allocation suggestion reports, and supports report export; The system management module includes a user management unit, a permission control unit, a log recording unit, and a system monitoring unit. It supports multi-role permission allocation, automatically records system operation logs and operation logs, monitors the operating status of each module in real time, and triggers alarm notifications when an anomaly occurs.