Multi-source internet of things data fusion processing method and system for smart campus

By combining spatiotemporal graph convolutional neural networks and rolling temporal models with multi-agent reinforcement learning, the problems of dynamic correlation and error propagation in data fusion in smart campuses are solved, achieving high-precision, low-privacy pre-control and autonomous decision-making, and improving the system's adaptability and scalability.

CN123179304APending Publication Date: 2026-11-27UNIV OF JINAN
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611646980.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-23
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing smart campus data fusion technologies suffer from problems such as passive fusion paradigms, chain-like error accumulation, lagging closed-loop control, and centralized architecture bottlenecks. They cannot effectively capture dynamic spatiotemporal correlations on campus, resulting in fluctuations in fusion accuracy, amplified errors, and high privacy risks, making it difficult to achieve proactive control and large-scale deployment.

Method used

By employing spatiotemporal correlation modeling of multi-source IoT data, an intra-chain error self-verification mechanism, a pre-prediction and control strategy, and a cloud-edge collaborative autonomous architecture, multi-source feature fusion and three-dimensional linkage control are achieved through spatiotemporal graph convolutional neural networks and rolling temporal models. The strategy is iteratively optimized by combining multi-agent reinforcement learning.

Benefits of technology

It improves fusion accuracy and risk response efficiency, reduces error propagation rate and privacy risks, enhances system self-evolution capability and scalability, realizes a paradigm shift from post-remediation to pre-emptive control, and improves resource utilization efficiency and system robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179304A_ABST
    Figure CN123179304A_ABST
Patent Text Reader

Abstract

The present application belongs to the field of wisdom campus Internet of Things and big data fusion technology, discloses a kind of wisdom campus-oriented multi-source Internet of Things data fusion processing method and system, comprising the following steps: collecting the multi-source Internet of Things data of each area of wisdom campus and attaching space-time metadata;According to the adaptive matching cleaning strategy of campus scene on each edge node, preprocessing is carried out, and after information entropy verification, standardized detailed data set is generated;Campus spatiotemporal heterogeneous graph is constructed, and multi-source feature fusion is carried out through spatiotemporal graph convolutional neural network;The integrated feature is input into the rolling time domain model prediction controller to generate three-dimensional linkage front-end control instruction;Reverse mapping to physical space to execute control;Through multi-agent reinforcement learning iterative update full-link strategy.The present application realizes the deep spatiotemporal correlation fusion and front-end control of multi-source Internet of Things data, significantly improves the fusion accuracy, risk response efficiency and system self-evolution ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of smart campus IoT and big data integration technology, and particularly relates to a multi-source IoT data fusion processing method and system for smart campuses. Background Technology

[0002] With the deepening of smart campus construction, a massive number of heterogeneous IoT devices have been deployed on campus, covering multiple dimensions such as environmental sensing, video surveillance, access control, teaching equipment, payment processing, and network behavior, generating a huge amount of diverse IoT data with complex spatiotemporal distribution. Effectively integrating multi-source IoT data is the foundation for realizing core business functions such as campus security and prevention, resource optimization and scheduling, and comprehensive student evaluation.

[0003] Existing smart campus data fusion technologies generally adopt a time-aligned passive fusion architecture, which involves first collecting data from each device, then aligning and stitching the data according to time windows, and finally inputting it into the business model for analysis. This architecture suffers from four deep-seated technical bottlenecks:

[0004] First, the fusion paradigm is passive. Existing solutions rely on manually preset scenarios and fixed weights, which cannot capture the dynamic spatiotemporal relationships of campus personnel flow and equipment status. The fusion accuracy fluctuates significantly with changes in the scenario. The relationship patterns of different areas on campus (laboratories, canteens, classrooms) vary significantly, and fixed-weight fusion strategies are difficult to adapt to this dynamism.

[0005] Second, errors accumulate in a chain reaction. Governance, integration, and application are executed sequentially, and errors from the previous cleaning step are propagated along the chain, lacking internal self-verification and correction mechanisms. When a deviation occurs in the front-end data cleaning stage (such as mistakenly identifying a valid risk signal as noise and deleting it), the subsequent integration and application stages cannot detect this error, leading to the error being amplified at each stage.

[0006] Third, closed-loop control is lagging behind. Existing solutions are all reactive, requiring manual verification and parameter adjustments after risks occur, failing to provide predictive control based on future trends. Campus safety and security require proactive intervention, not passive response.

[0007] Fourth, the centralized architecture has bottlenecks. Centralized cloud processing requires the transmission of a large amount of raw data, resulting in high bandwidth pressure, high privacy risks, and edge nodes lack autonomous decision-making capabilities, making it difficult to support large-scale smart campus deployments.

[0008] Therefore, there is an urgent need to build a new data fusion processing solution with dynamic correlation modeling capabilities, in-chain error self-verification mechanism, pre-prediction and control strategy, and cloud-edge collaborative autonomous architecture. Summary of the Invention

[0009] This application addresses the problems existing in the prior art by proposing a multi-source IoT data fusion processing method and system for smart campuses. It realizes deep spatiotemporal correlation fusion and pre-control of multi-source IoT data, significantly improving fusion accuracy, risk response efficiency and system self-evolution capability.

[0010] To achieve the above objectives, this application provides the following technical solution:

[0011] Firstly, a method for multi-source IoT data fusion processing for smart campuses includes the following steps: S1. Collecting multi-source IoT data from various areas of the smart campus, adding spatiotemporal metadata to each data point, and generating a raw dataset with spatiotemporal labels; S2. At the edge nodes corresponding to each area, adaptively matching the corresponding cleaning strategy according to the current campus scenario, performing preprocessing on the raw dataset, and generating a standardized detailed dataset after passing the information entropy verification; S3. Constructing a campus spatiotemporal heterogeneous graph based on the standardized detailed dataset, performing multi-source feature fusion on the spatiotemporal heterogeneous graph through a spatiotemporal graph convolutional neural network, and outputting a fused embedded feature sequence; S4. Inputting the fused embedded feature sequence into a rolling temporal model predictive controller to predict the system state within a preset time step in the future, and generating a three-dimensional linkage pre-control instruction; S5. Mapping the three-dimensional linkage pre-control instruction back to the physical campus space, and correspondingly adjusting the monitoring and acquisition parameters of IoT devices in each area, the data governance intensity of edge nodes, and the operating parameters of campus facilities; S6. Iteratively updating the cleaning strategy, graph fusion weights, and predictive control model through multi-agent reinforcement learning based on business feedback and data quality monitoring results.

[0012] Optionally, step S1 specifically includes:

[0013] S11. The multi-source IoT data is accessed according to the data type using the corresponding acquisition method. The data types include at least environmental sensing data, equipment operation data, video and image data, traffic and consumption data, network behavior data, teaching process data, and location trajectory data.

[0014] S12. For business systems with different adaptation conditions, adaptively select message middleware push method, change data capture method or log parsing collection method to obtain data.

[0015] S13. Attach a unified spatiotemporal metadata tag to each piece of collected data. The spatiotemporal metadata includes at least the spatial coordinates of the point, the timestamp of the collection time, and the device type code.

[0016] Optionally, step S2 specifically includes:

[0017] S21. Based on spatiotemporal metadata and prior scene rules, identify the campus scene type of the current teaching area;

[0018] S22. Match the corresponding data cleaning algorithm combination according to the scenario type, and perform deduplication, outlier detection and processing, and missing value filling on the original dataset;

[0019] S23. Perform normalization and standardization on the processed data to unify the data units and value ranges;

[0020] S24. Calculate the information entropy of the original dataset before preprocessing and the information entropy of the standardized dataset after preprocessing, and obtain the entropy difference.

[0021] S25. Compare the entropy difference value with the preset entropy difference threshold. If it is less than or equal to the preset entropy difference threshold, the data quality is deemed qualified, and a standardized detailed dataset is output. If it is greater than the preset entropy difference threshold, the cleaning algorithm parameters are adjusted, and the process is returned to step S22 to re-execute the preprocessing.

[0022] Optionally, step S3 specifically includes:

[0023] S31. Extract point entities, personnel entities, and region entities from the standardized detailed data, and use them as point nodes, personnel nodes, and region nodes respectively to construct a node set of a spatiotemporal heterogeneous graph.

[0024] S32. Based on the spatial positional relationship, temporal sequence relationship, and personnel movement relationship between nodes, construct spatial adjacency edges, temporal correlation edges, and behavioral trajectory edges respectively to form the edge set of the spatiotemporal heterogeneous graph;

[0025] S33. Initialize an input feature vector for each node, wherein the input feature vector contains multi-source IoT data features of the corresponding entity;

[0026] S34. Perform multi-layer graph convolution calculation on the spatiotemporal heterogeneous graph through a spatiotemporal graph convolutional neural network. When spatial convolution aggregation, a mutual information weighted aggregation method is adopted to aggregate spatial neighborhood features and temporal dynamic features to generate fused embedding features of each node.

[0027] S35. Aggregate the fusion embedding features of all point nodes within the region according to the region dimension to generate a region fusion embedding feature sequence; aggregate the temporal fusion embedding features of personnel nodes according to the personnel dimension to generate a personnel trajectory fusion embedding feature sequence.

[0028] Optionally, in step S34, the mutual information weighted aggregation method specifically includes:

[0029] S341. Calculate the mutual information value of the features between the central node and each neighboring node;

[0030] S342. Calculate the aggregation weight of each neighboring node based on the mutual information value. The higher the mutual information, the greater the aggregation weight.

[0031] S343. The features of all neighboring nodes are weighted and summed according to the aggregation weights to obtain the spatial convolution aggregation result.

[0032] Optionally, step S4 specifically includes:

[0033] S41. Starting from the current moment, determine the prediction time domain and the control time domain, and construct a system state vector that includes facility risk value, personnel risk value, and data quality value;

[0034] S42. Based on the fused embedded feature sequence, the system state vector at each moment in the time domain is recursively predicted through the state prediction model.

[0035] S43. Construct an optimization objective function with the joint objectives of minimizing state deviation and minimizing control cost;

[0036] S44. Solve the optimization objective function to obtain the optimal control sequence in the control time domain, and take the first set of control quantities as the three-dimensional linkage pre-control command output at the current moment.

[0037] Optionally, step S6 specifically includes:

[0038] S61. Configure an independent governance agent for each edge node of the teaching area, and define the observation space and action space of the agent;

[0039] S62. Design an instant reward function that includes data accuracy, risk detection rate, and bandwidth utilization.

[0040] S63. Each agent interacts with the environment locally, collects observation, action, and reward data, and updates the local policy network parameters using the proximal policy optimization algorithm.

[0041] S64: The cloud periodically aggregates the policy parameters of each intelligent agent, generates a global optimization policy, and distributes it to each edge intelligent agent.

[0042] Optionally, step S5 specifically includes:

[0043] S51. Pre-construct a digital twin space corresponding to the physical campus space;

[0044] S52. Input the three-dimensional linkage pre-control command into the digital twin space, perform coordinate mapping and command parsing in the digital twin space, convert the normalized adjustment amount into the actual executable parameter value of the device, and after simulation verification, send the command to the physical device for execution.

[0045] S53. Simultaneously perform the following three adjustments in the physical space: adjust the monitoring and acquisition parameters of IoT devices in each area, adjust the data governance intensity of edge nodes, and adjust the operating parameters of campus facilities.

[0046] Optionally, in step S52, the specific implementation method of simulation verification includes:

[0047] The control commands are simulated and executed in the digital twin space, and the state changes after execution are predicted. If the verification is successful, the commands are sent to the physical device for execution; if the verification fails, the process returns to step S4 to perform optimization and solution again.

[0048] Secondly, the present invention provides a multi-source IoT data fusion processing system for smart campuses, used to implement the multi-source IoT data fusion processing method for smart campuses as described in the first aspect, including:

[0049] The data acquisition module is used to collect multi-source IoT data from various areas of the smart campus, add spatiotemporal metadata to each data point, and generate a raw dataset with spatiotemporal labels.

[0050] The edge governance module is used to adaptively match the corresponding cleaning strategy on the edge nodes of each region according to the current campus scene, perform preprocessing on the original dataset, and generate a standardized detailed dataset after passing the information entropy verification.

[0051] The spatiotemporal graph fusion module is used to construct a campus spatiotemporal heterogeneous graph based on the standardized detailed dataset, perform multi-source feature fusion on the spatiotemporal heterogeneous graph through a spatiotemporal graph convolutional neural network, and output a fused embedded feature sequence.

[0052] The predictive control module is used to input the fused embedded feature sequence into the rolling time domain model predictive controller, predict the system state within a preset time step in the future, and generate three-dimensional linkage pre-control instructions.

[0053] The reverse execution module is used to reverse map the three-dimensional linkage pre-control command to the physical campus space, and adjust the monitoring and acquisition parameters of IoT devices in each area, the data governance intensity of edge nodes, and the operating parameters of campus facilities accordingly.

[0054] The iterative optimization module is used to iteratively update the cleaning strategy, graph fusion weights, and predictive control model through multi-agent reinforcement learning based on business feedback and data quality monitoring results.

[0055] The beneficial effects of this application are as follows:

[0056] (1) This application uses spatiotemporal heterogeneous graph convolution and mutual information weighted aggregation to deeply mine the spatiotemporal correlation and human-computer interaction relationship of multi-source data. Mutual information weighted aggregation can adaptively highlight the influence of highly correlated nodes, suppress the noise interference of low-correlation nodes, improve the representation ability of fusion features, and improve the accuracy of risk identification.

[0057] (2) This application introduces rolling time-domain model predictive control, realizing a paradigm shift from "post-event remediation" to "pre-emptive regulation," advancing risk response time and improving risk management efficiency. Three-dimensional linkage regulation achieves coordinated optimization of data collection, governance, and facilities, improving resource utilization efficiency. Through MPC pre-emptive regulation, the blindness of traditional fixed-cycle regulation is avoided, significantly reducing resource waste caused by ineffective regulation.

[0058] (3) The in-chain information entropy verification mechanism of this application effectively blocks the chain propagation of errors and reduces the error propagation rate in the governance process. The scenario-adaptive cleaning strategy achieves a balance between quality and efficiency, ensuring high accuracy in key scenarios (such as laboratories) while reducing the overall computational load.

[0059] (4) The edge multi-agent autonomous architecture of this application offloads a large amount of computing to the edge, reducing cloud bandwidth usage. The federated learning mode avoids the cross-regional transmission of raw data, significantly reducing data privacy risks and greatly improving system scalability. The local autonomous decision-making capability of edge nodes enables the system to continue to operate normally when the network fluctuates, enhancing the system's robustness.

[0060] (5) The multi-agent reinforcement learning in this application enables autonomous iteration of the entire policy chain, eliminating the need for frequent manual parameter tuning. The system becomes more accurate with use, reducing operation and maintenance costs and continuously adapting to the dynamic changes in campus business. Through the federated reinforcement learning framework, each edge agent can both utilize local data characteristics for personalized optimization and share global experience to accelerate convergence. Attached Figure Description

[0061] Figure 1 This is a schematic diagram illustrating the application scenarios of a multi-source IoT data fusion processing system for smart campuses, based on some embodiments of this application.

[0062] Figure 2 This is a schematic diagram of a multi-source IoT data fusion processing method for smart campuses according to Embodiment 1 of this application.

[0063] Figure 3 This is a schematic diagram of a multi-source IoT data fusion processing system for smart campuses, as described in Embodiment 2 of this application.

[0064] Figure label:

[0065] 100. Data Acquisition Module; 200. Edge Governance Module; 300. Spatiotemporal Graph Fusion Module; 400. Predictive Control Module; 500. Reverse Execution Module; 600. Iterative Optimization Module. Detailed Implementation

[0066] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description of this application is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely one preferred embodiment of this application and are only used to explain this application. They do not limit the scope of protection of this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0067] like Figure 1 As shown, Figure 1 This diagram illustrates a multi-source IoT data fusion processing system application scenario for smart campuses. Deployed within a cloud-edge collaborative architecture, it covers core areas such as teaching buildings, laboratories, canteens, and libraries. In the laboratory scenario, the system integrates multi-source data in real time, including temperature and humidity, smoke, equipment operation, and personnel trajectories. After adaptive cleaning and information entropy verification at edge nodes, it mines the dynamic relationships between people, equipment, and space through spatiotemporal heterogeneous graph convolution. A rolling temporal predictive controller proactively identifies risks such as hazardous chemical leaks and equipment overheating, generating three-dimensional linkage pre-control commands for data collection encryption, governance enhancement, and facility coordination. After verification through digital twin simulation, these commands are sent back to physical devices for execution. In the canteen access scenario, the system integrates gate records, video counting, and WiFi location data to predict congestion trends and proactively schedule access control and ventilation facilities. Each edge agent continuously iterates its strategy through federated reinforcement learning, achieving a paradigm shift in campus security and prevention from passive response to proactive prediction.

[0068] Example 1:

[0069] like Figure 2 As shown, a multi-source IoT data fusion processing method for smart campuses includes the following steps:

[0070] S1. Collect multi-source IoT data from various areas of the smart campus, add spatiotemporal metadata to each data point, and generate a raw dataset with spatiotemporal labels.

[0071] S2. At the edge nodes corresponding to each region, the corresponding cleaning strategy is adaptively matched according to the current campus scene, and the original dataset is preprocessed. After passing the information entropy verification, a standardized detailed dataset is generated.

[0072] S3. Construct a campus spatiotemporal heterogeneous graph based on the standardized detailed dataset, and perform multi-source feature fusion on the spatiotemporal heterogeneous graph through a spatiotemporal graph convolutional neural network. The spatiotemporal graph convolutional neural network determines the graph fusion weights based on mutual information weighted aggregation and outputs the fused embedded feature sequence.

[0073] S4. The system integrates and embeds the feature sequence into the rolling time-domain model predictive controller to predict the system state within a preset time step in the future, and generates a three-dimensional linkage pre-control command covering three dimensions: monitoring and acquisition parameters, data governance intensity, and facility operation parameters.

[0074] S5. In the pre-constructed digital twin space, the three-dimensional linkage pre-control commands are mapped from the digital twin space to the physical campus space, and the monitoring and acquisition parameters of IoT devices in each area, the data governance intensity of edge nodes, and the operating parameters of campus facilities are adjusted accordingly.

[0075] S6. Based on business feedback and data quality monitoring results, iteratively update the cleaning strategy, graph fusion weights, and predictive control model through multi-agent reinforcement learning, and use the updated results for the execution of subsequent steps S2, S3, and S4.

[0076] In a specific embodiment, step S1 involves using a multi-mode, non-perceptible data acquisition method to access various heterogeneous IoT data, and labeling each data point with unified spatiotemporal metadata to form a standardized raw dataset. Specifically, this includes:

[0077] S11. The multi-source IoT data is accessed using corresponding acquisition methods according to data type. Data types include seven major categories: environmental sensing data, equipment operation data, video and image data, access and consumption data, network behavior data, teaching process data, and location trajectory data, achieving full-dimensional coverage of the campus physical space, personnel behavior, and equipment status. Specifically, environmental sensing data includes numerical data collected by devices such as temperature and humidity sensors, smoke sensors, light sensors, and water and electricity meters, reflecting the regional environmental status and resource consumption.

[0078] The equipment operation category includes the operation status logs, fault records, and control command data of devices such as smart blackboards, air conditioning systems, smart lighting, access control controllers, and smart door locks, reflecting the operational status of campus facilities.

[0079] Video and image data include image frames and video streams captured by high-definition classroom teaching tracking cameras and public area security cameras, as well as face recognition results, people counting results, and behavior recognition results output by edge AI analysis.

[0080] Access and consumption data includes event-based data such as access records from campus gates, campus card usage records, and library borrowing records, reflecting the spatial and temporal location and behavioral patterns of individuals.

[0081] Network behavior data includes campus WiFi access records, internet activity logs, and learning behavior data from online learning systems, reflecting individuals' online activity trajectories.

[0082] The teaching process category includes learning data from the entire learning process on online teaching platforms such as Rain Classroom and Zhihuishu, including pre-class preparation, classroom interaction, assignments, and exams.

[0083] Location trajectory data includes campus WiFi AP positioning data and Bluetooth beacon positioning data, providing continuous spatial location information for personnel.

[0084] S12. For business systems with different adaptation conditions, the system adaptively selects either message middleware push, change data capture, or log parsing collection methods to acquire data. Specifically, for business systems of different eras and architectures within the campus, this embodiment designs at least three collection methods, automatically selecting the appropriate method based on system adaptation conditions to achieve non-intrusive and seamless data access, minimizing integration costs and impact on existing systems. Details are as follows:

[0085] The message middleware push data collection method is used for newly built business systems that support secondary development (such as new versions of access control systems and all-in-one card systems). It utilizes message middleware such as Kafka / RabbitMQ, allowing the business system to proactively push incremental data as data is generated. This method offers the lowest latency and strongest real-time performance, making it suitable for high-priority security data.

[0086] The Change Data Capture (CDC) method is used for systems that are already online and running, where business code cannot be modified but database access can be granted (such as academic affairs systems and financial systems). It employs FlinkCDC technology to monitor database change logs in real time and extracts newly added, modified, and deleted data records by parsing the logs. This method does not require intrusion into the business system code and has minimal impact on the performance of the original system.

[0087] Log parsing and collection is a method for older systems that cannot be further developed or whose databases are not accessible. It involves collecting system runtime log files and using regular expression matching and keyword extraction to extract valid data. This method has the strongest adaptability and can cover almost all existing older systems.

[0088] The three acquisition methods can be deployed in combination according to the system type to form a full-scenario data acquisition system, which can reduce data acquisition latency and meet the needs of real-time fusion processing.

[0089] S13. Attach a unified spatiotemporal metadata tag to each piece of collected data. The spatiotemporal metadata includes at least the spatial coordinates of the data point, the timestamp of the collection time, and the device type code. Specifically, all collected raw data is tagged with a unified format spatiotemporal metadata tag. The metadata contains three core fields:

[0090] The spatial coordinates of the data acquisition device are the physical spatial coordinates of the location. The unified coordinate system of the campus is adopted, and the format is (x, y, floor), which represent the horizontal coordinate, vertical coordinate and floor of the plane, respectively.

[0091] The data is collected using a timestamp, representing the precise time the data was generated. The timestamp format is Unix and the precision is in milliseconds.

[0092] Equipment type code identifies the type and category of the equipment from which the data originates. It adopts a hierarchical coding format, with the first digit being the major category code and the last three digits being the sub-category code.

[0093] By annotating with spatiotemporal metadata, all heterogeneous data have a unified spatiotemporal benchmark, laying the foundation for subsequent spatiotemporal correlation and fusion. The final output is a raw dataset with spatiotemporal labels, which is stored in the ODS operational data layer of the edge nodes.

[0094] In a specific embodiment, step S2 specifically includes:

[0095] S21. Based on spatiotemporal metadata and prior scenario rules, identify the campus scenario type for the current teaching area. Campus scenario types include at least laboratory scenarios, traffic flow scenarios, and regular teaching scenarios; the data characteristics, quality requirements, and business objectives of different scenarios differ significantly. Laboratory scenarios include chemistry labs, physics labs, and computer labs, with the core objective of safety risk prevention and control, requiring the highest quality of environmental sensor data and equipment operation data. Traffic flow scenarios include densely populated areas such as school gates, teaching building entrances, and canteen entrances and exits, with the core objective of personnel trajectory analysis and congestion risk prevention and control, requiring high real-time performance of traffic data and video counting data. Regular teaching scenarios include ordinary classrooms, study rooms, and libraries, with the core objective of teaching quality monitoring and resource scheduling, requiring high accuracy of teaching equipment data and personnel attendance data.

[0096] S22. Match the appropriate data cleaning algorithm combination according to the scenario type, and perform deduplication, outlier detection and processing, and missing value imputation on the original dataset. Specifically, the cleaning process includes three stages in sequence: data deduplication, outlier detection and processing, and missing value imputation. In the data deduplication process, for data with unique identifier fields (such as student ID, device ID, and access record ID), exact matching is used to remove duplicates based on complete matching of unique fields. For approximately duplicate data without unique identifiers (such as the same values ​​continuously reported by sensors or duplicate faces in image recognition), fuzzy matching is used to remove duplicates, and the similarity between records is calculated using the Jaccard similarity coefficient. The formula for calculating the Jaccard similarity coefficient is:

[0097]

[0098] Where A and B are the feature sets of two records to be compared; The number of elements in the intersection; This represents the number of elements in the union. The Jaccard similarity coefficient ranges from [0,1]. A higher value indicates a higher similarity between the two records. The preset similarity threshold can be configured according to the scenario.

[0099] Specifically, in outlier detection and handling, different outlier detection algorithms are matched to different scenarios:

[0100] In a laboratory setting, a combination of the Isolation Forest algorithm and the Local Anomaly Factor (LOF) algorithm was used. This scenario involves data with multiple dimensions and complex anomaly patterns; machine learning algorithms can effectively identify multi-dimensional joint anomalies, avoiding missed detections due to a single threshold.

[0101] Furthermore, the Isolation Forest algorithm constructs T isolated trees (iTrees) by recursively and randomly cutting the feature space. In this embodiment, T is preferably 100 trees. The preferred value is 256, which allows for control of computational overhead while ensuring detection accuracy. For sample x, its path length on the i-th isolated tree... Defined as the number of edges traversed from the root node to a leaf node. The average path length of sample x across T isolated trees. The calculation formula is:

[0102]

[0103] Where T is the total number of isolated trees; Let x be the path length of sample x on the i-th isolated tree.

[0104] The formula for calculating the anomaly score of sample x is:

[0105]

[0106] in, The anomaly score for sample x; The number of subsamples for a single isolated tree; The normalization constant for the path length is calculated using the following formula:

[0107]

[0108] in, For harmonic numbers, Let Euler's constant be . Anomaly fraction The value range is (0,1]. The closer the score is to 1, the higher the probability of an anomaly. The closer the score is to 0, the higher the probability of normality.

[0109] The Local Anomaly Factor (LOF) algorithm quantifies the degree of anomaly by calculating the local density deviation between a sample x and its k nearest neighbors. In this embodiment, the preferred value of k is 20, meaning that the 20 nearest neighbors of the sample are selected for local density calculation. This value strikes a balance between detection sensitivity and computational efficiency. The k-th reachable distance of sample x... Defined as:

[0110]

[0111] in, Let be the distance from sample o to its k-th nearest neighbor; Let be the Euclidean distance between sample x and sample o; k is the pre-defined number of neighborhood samples. Local reachability density of sample x. The calculation formula is:

[0112]

[0113] in, Let x be the set of k nearest neighbors. For set Number of samples in the middle. Local outliers of sample x. The calculation formula is:

[0114]

[0115] in, Let be the local reachability density of sample o;

[0116] when When the value is significantly greater than 1, it indicates that the local density of sample x is lower than the average local density of its neighboring samples, and it is judged as an outlier.

[0117] In this time-series scenario, the Z-Score statistical detection algorithm is applied. The data in this scenario is time-series numerical with a relatively stable distribution. The Z-Score algorithm identifies anomalies by calculating the standard deviation of sample values ​​from the mean. When an error is detected, it is considered abnormal, where x is the current value of the sample to be detected; The mean, Standard deviation, The preset threshold is used. This algorithm has high computational efficiency and low latency, meeting real-time requirements.

[0118] In typical teaching scenarios, a combined strategy of boxplot detection and business threshold rules is employed. Boxplot detection identifies statistical outliers based on the interquartile range (IQR) of the data distribution, i.e., outliers when the sample value is less than a certain threshold. or greater than When it is judged as abnormal, among which, , These are the first and third quartiles, respectively; the business threshold rules are set within a reasonable range based on the equipment's rated parameters. This dual verification method balances statistical accuracy and business interpretability.

[0119] Outlier handling employs a classification strategy. Outliers identified as equipment noise or data acquisition errors are replaced using interpolation. Outliers identified as genuine business anomalies (such as sudden temperature increases or abnormal gatherings of people) retain their original values ​​and are tagged with anomalies for subsequent risk assessment, thus avoiding the accidental deletion of valid risk signals.

[0120] Specifically, in the missing value imputation process, a tiered imputation strategy is adopted based on data importance and distribution characteristics:

[0121] For low-importance and symmetrically distributed numerical data, the mean is used for padding, which is the average value of the field within the current time window. Filling in missing values ​​is the most computationally efficient method. Among them, The arithmetic mean of this field within the current time window is used as the filler value for missing values; This represents the i-th valid sample value for this field within the current time window; n is the total number of valid samples.

[0122] For numerical data with low importance and skewed distribution, the median is used for filling; that is, the median of the field in the current time window is used. Fill in missing values, where, The median of this field is the sample median within the current time window, used as imputation for missing values; n is the total number of valid samples (n is odd); when n is even, the median is... This is the average of the two middle valid sample values. It can effectively avoid the influence of extreme values ​​on the filling results.

[0123] For categorical and labeled data, the mode is used for filling, which means using the category value that appears most frequently in the current time window. Fill in missing values, where c is the category value; This represents the frequency of occurrence of category c.

[0124] For continuous time series data, linear interpolation or spline interpolation is used to fill the gaps, ensuring the temporal continuity of the data. Specifically, for linear interpolation, let the two most recent valid data points before and after the missing value be... and ,in, If so, then the time is missing. The formula for calculating the corresponding fill value y is:

[0125]

[0126] in, , These are the timestamps of the two most recent valid data points before and after the missing time; , These are the data values ​​for the corresponding time points.

[0127] Cubic spline interpolation: over the entire time series interval Above, construct a piecewise cubic polynomial function. So that it satisfies in each sub-interval superior It is a cubic polynomial, and has internal nodes. It satisfies both continuity and second-order smoothness:

[0128]

[0129] Where i is the sub-interval index; , , , Let be the polynomial coefficients of the i-th subinterval; , These are the times at the left and right endpoints of the sub-interval, respectively; Let be the interpolation function value corresponding to time t in the i-th subinterval.

[0130] Natural boundary conditions are used for boundary constraints. The coefficients of the polynomials in each subinterval are determined by solving a system of tridiagonal equations. , , , Then substitute the missing time t into the cubic polynomial of the corresponding subinterval. Calculate the fill value.

[0131] High-value core data is used, and a random forest machine learning model is employed for prediction and imputation. Missing values ​​are predicted by utilizing other related features within the same region, resulting in the highest imputation accuracy. Let the target feature be Y, and the m auxiliary feature vectors related to Y within the same region be... The random forest regression model constructs B decision regression trees, each trained based on a randomly selected subset of samples and features. For the auxiliary feature vector x of the sample to be filled, the formula for calculating the filling value is:

[0132]

[0133] in, Let be the predicted output value of the b-th decision regression tree for input x; B is the total number of decision regression trees in the random forest. The arithmetic mean of the prediction results from B trees is used as the final imputation value for the missing value. By utilizing the joint information of other related features in the same region for prediction, the accuracy of missing value imputation can be effectively improved.

[0134] S23. Perform normalization and standardization on the processed data to unify the data units and value ranges. Specifically, after cleaning, the data undergoes normalization and standardization to eliminate the influence of different physical units, mapping all numerical features to a unified scale, laying the foundation for subsequent fusion calculations. Two standardization methods are used based on the data characteristics:

[0135] Min-Max normalization: linearly maps data to the interval [0,1]. It is suitable for data with stable distribution and clear upper and lower bounds. The calculation formula is:

[0136]

[0137] Where x is the original value; This is the minimum value of the field within the current window; This is the maximum value of the field within the current window. The value is the normalized value.

[0138] Z-Score standardization: Transforms data into a standard normal distribution with a mean of 0 and a standard deviation of 1. It is suitable for data that are approximately normally distributed and have no clear upper or lower bounds. The calculation formula is:

[0139]

[0140] in, These are the standardized values; This is the mean of the field; Standard deviation; These are the standardized values.

[0141] S24. Calculate the information entropy of the original dataset before preprocessing. Information entropy of the preprocessed standardized dataset The amount of information loss As the entropy difference. Specifically, after preprocessing and before entering the fusion stage, an intra-chain information entropy verification checkpoint is set to quantify the change in information before and after data processing, determine whether the cleaning process has caused the loss of effective information or abnormal distortion, and block the chain propagation of errors from the source. Information entropy is used to measure the information uncertainty and information content of a dataset, and the calculation formula is:

[0142]

[0143] Where n is the total number of data categories, and for continuous data, the number of categories is obtained by discretization binning; Let be the probability density of the i-th class, i.e., the proportion of samples in that class to the total number of samples; H is the information entropy value, the larger the entropy value, the richer the information content of the dataset and the more dispersed the distribution. This indicates the amount of information loss in the data before and after preprocessing. The information entropy of the original dataset before preprocessing, The information entropy of the preprocessed, standardized dataset.

[0144] Calculate the information entropy of the original dataset before preprocessing. Information entropy of the preprocessed standardized dataset Find the amount of information loss. ;

[0145] Calculate the entropy difference (information loss): .

[0146] S25. Compare the entropy difference value with the preset entropy difference threshold. If it is less than or equal to the threshold, it is deemed qualified and a standardized detailed dataset is output. If it is greater than the threshold, the cleaning algorithm parameters are adjusted, and the process returns to step S22 to re-execute the preprocessing. Specifically, the entropy difference verification process is as follows: Judgment rule: preset entropy difference threshold. ,like If the data quality is deemed satisfactory and the cleaning process has not resulted in a significant loss of useful information, a standardized detailed dataset is output to the next stage; otherwise... If an error occurs, the cleaning process is deemed abnormal, potentially due to excessive deduplication or accidental deletion of outliers. The cleaning algorithm parameters are automatically adjusted (e.g., relaxing the outlier threshold or switching the filling algorithm), and the preprocessing procedure is re-executed until the verification is successful. Less information loss indicates that the cleaning process has not excessively removed valid information; information loss exceeding the threshold indicates over-cleaning, requiring a callback of the cleaning parameters.

[0147] Entropy difference threshold The threshold can be dynamically set according to the scenario. For example, the threshold is set to 0.15 for laboratory scenarios to strictly control information loss, while the threshold is set to 0.3 for regular teaching scenarios to allow for moderate information compression to improve efficiency.

[0148] In-chain entropy verification reduces the error propagation rate in the data governance process, effectively avoiding the "garbage in, garbage out" problem and ensuring the reliability of subsequent fusion and analysis. The final output of this step, a standardized detailed dataset, is stored in the DWD detailed data layer of the edge node.

[0149] In a specific embodiment, step S3 specifically includes:

[0150] S31. Extract point entities, personnel entities, and region entities from standardized detailed data, and use them as point nodes, personnel nodes, and region nodes respectively to construct the node set of a spatiotemporal heterogeneous graph. Specifically, abstract the physical and logical entities within the campus as graph nodes. The spatiotemporal heterogeneous graph is defined as a directed heterogeneous graph with temporal sequence. ,in, Let be the set of nodes at time t. Let be the set of edges at time t.

[0151] Furthermore, the definition of a point node corresponds to each data collection point of an IoT device, such as a temperature sensor, camera, or access control gate. Each point node is associated with all data features collected by that device, and its attributes include device ID, spatial coordinates, device type, and real-time data feature vector. Point nodes are the most basic physical nodes and are the direct carriers of data.

[0152] Personnel nodes are defined as individual personnel (such as students, teachers, etc.) within the campus, identified by a unique personnel ID. Each personnel node is associated with all behavioral trajectory data and attribute characteristics of that person. Node attributes include personnel ID, real-time location, and behavioral feature vector. Personnel nodes serve as the link connecting different locations, reflecting the human dimension of the data.

[0153] A region node is defined as a physical spatial region, such as a classroom, laboratory, corridor, or floor. Each region node aggregates the features of all point nodes within that region. Node attributes include region ID, region coordinate range, and region comprehensive feature vector. Region nodes are spatial aggregation units, reflecting the regional dimensional relationships of data.

[0154] The three types of nodes form a hierarchical structure of location-personnel-region, enabling multi-scale modeling from micro-equipment to macro-region.

[0155] S32. Based on the spatial location relationships, temporal sequence relationships, and personnel movement relationships between nodes, construct spatial adjacency edges, temporal correlation edges, and behavioral trajectory edges to form a set of edges in a spatiotemporal heterogeneous graph. Specifically, a spatial adjacency edge is defined as connecting spatially adjacent point nodes or region nodes, representing the physical proximity relationship. If the spatial distance between two points is less than a preset adjacency threshold, a spatial adjacency edge is established. The weight of the edge is negatively correlated with the spatial distance; the closer the distance, the higher the weight. Spatial adjacency edges support the spatial propagation of features; for example, temperature anomalies in adjacent classrooms will affect each other.

[0156] Temporally related edges are defined as edges that connect the states of the same node at adjacent time points, representing the evolutionary relationship over time. A temporally related edge is established between time point t and time point t-1 for each node, and the weight of the edge is negatively correlated with the time interval. Temporally related edges support the temporal propagation of features and capture the dynamic trends of state changes.

[0157] Definition of behavioral trajectory edges: Connecting personnel nodes and location nodes, representing the movement relationship between personnel and locations. If a personnel appears at a location within a time window, a behavioral trajectory edge from that personnel node to that location node is established. In some embodiments, the preset time window length is preferably 30 seconds, that is, if a personnel appears at a location within 30 seconds (e.g., through access control card swiping, WiFi probe detection, or Bluetooth beacon positioning), a behavioral trajectory edge from that personnel node to that location node is established; the window length can be dynamically configured according to the scenario, shortened to 10 seconds in densely populated areas to improve real-time performance, and extended to 60 seconds in teaching areas to cover the entire classroom interaction cycle. The weight of the edge is positively correlated with the personnel's dwell time; the longer the dwell time, the higher the weight. The calculation formula is as follows: ;in, The duration of time a person stays at the location; For reference duration of stay.

[0158] S33. Each node initializes an input feature vector, which contains multi-source IoT data features of the corresponding entity. Specifically, the input feature of a point node is the standardized feature vector of the raw data collected at that point; the input feature of a personnel node is the behavioral trajectory feature of the personnel at the current moment; and the input feature of a region node is the aggregation of the features of all point nodes in that region.

[0159] S34. A multi-layer graph convolutional computation is performed on the spatiotemporal heterogeneous graph using a spatiotemporal graph convolutional neural network. During spatial convolution aggregation, a mutual information-weighted aggregation method is used to aggregate spatial neighborhood features and temporal dynamic features, generating fused embedding features for each node. Specifically, a spatiotemporal graph convolutional neural network (ST-GNN) is used to perform multi-layer convolutional computation on the spatiotemporal heterogeneous graph. During spatial convolution aggregation, a mutual information-weighted aggregation method is used, simultaneously aggregating spatial neighborhood features and temporal dynamic features.

[0160] In some embodiments, the spatiotemporal graph convolutional neural network comprises two spatiotemporal graph convolutional layers, with the first layer having a hidden dimension of 128 and the second layer having a hidden dimension of 64. Temporal convolution window length. Five time steps were set (corresponding to data from the past five sampling times). Each layer was followed by a ReLU activation function and a Dropout layer (with a Dropout rate of 0.2) to prevent overfitting. The network was trained using the Adam optimizer with an initial learning rate of 1×10⁻³ and a batch size of 64. The above configuration was optimized using a grid search on the smart campus dataset. The two-layer structure effectively integrates second-order spatial neighborhood information (i.e., nodes and their neighbors' neighbors can all participate in feature aggregation), balancing modeling capability and computational efficiency.

[0161] The network employs a sequential structure of spatial and temporal convolutions. Each layer first aggregates spatial features, then extracts temporal features, and multiple layers are stacked to obtain deeply fused features. For any node v in the spatiotemporal heterogeneous graph, its input features at time t are: The output features after a spatiotemporal graph convolution layer The calculation formula is:

[0162]

[0163] Where v is the target node currently being calculated; t is the current time. This is the output feature vector of node v at time t after passing through a spatiotemporal graph convolution layer; It is the set of spatial neighbor nodes of node v, that is, all nodes connected to node v through spatial adjacency edges; This is a spatial aggregation function used to aggregate the features of neighboring nodes into a vector; The spatial convolution weight matrix, For the input feature dimension, is the output feature dimension, and is the learnable parameter; For a window length of The temporal convolution operator, for node v in the past One-dimensional convolution is performed on the feature sequences at each time step to capture the dynamic dependencies in the time dimension; is the temporal convolution weight matrix, and are the learnable parameters; These are bias terms, which are learnable parameters; It is a nonlinear activation function. Temporal convolution operator. The output has the same dimension as the spatial aggregation result AGG. The two are added together and then projected onto the weight matrix. Dimensional output is used to ensure that the spatial branch and temporal branch dimensions are aligned.

[0164] In step S34, the mutual information weighted aggregation method specifically includes:

[0165] S341. Calculate the mutual information value of the features between the central node and each neighboring node. The formula for calculating the mutual information I(u,v) of the features between the central node v and the neighboring node u is:

[0166]

[0167] in, The marginal probability density of node v with feature value x; The marginal probability density for node u with feature value y; Let x be the joint probability density of the two node features, x and y, respectively; x is the value of the feature of node v; and y is the value of the feature of node u.

[0168] S342. Calculate the aggregation weight of each neighboring node based on the mutual information value; the higher the mutual information, the greater the aggregation weight. The aggregation weight of neighboring node u relative to the center node v. The calculation formula is:

[0169]

[0170] in, This represents the mutual information value between the central node v and its neighboring node u. It is the sum of the mutual information values ​​between the central node v and all its neighboring nodes; Let be the aggregate weight of the neighboring node u, and the sum of the aggregate weights of all neighboring nodes is 1.

[0171] S343. The features of all neighboring nodes are weighted and summed according to the aggregation weights to obtain the spatial convolution aggregation result. The calculation formula is as follows:

[0172]

[0173] in, Let be the input feature vector of the neighboring node u at time t; The aggregation weight of the neighboring node u relative to the center node v; This is the output of the spatial aggregation function, i.e., the eigenvector after weighted summation.

[0174] By stacking multiple layers of spatiotemporal graph convolutions, the network can capture multi-level spatial adjacency relationships and long-term temporal dependencies. The output node fusion embedding features include spatial neighborhood information, temporal evolution information, and information related to human behavior.

[0175] S35. Aggregate the fusion embedding features of all points within a region according to the region dimension to generate a region fusion embedding feature sequence; aggregate the temporal fusion embedding features of personnel nodes according to the personnel dimension to generate a personnel trajectory fusion embedding feature sequence. Specifically, for the region fusion embedding feature sequence, according to the region dimension, the fusion embedding features of all points within a region are averaged and concatenated to generate a comprehensive fusion feature vector for that region; these are then arranged by time steps to form the region fusion embedding feature sequence. For the personnel trajectory fusion embedding feature sequence, according to the personnel dimension, the temporal fusion embedding features of a single personnel node are concatenated to generate the trajectory fusion feature vector for that person; these are then arranged by time steps to form the personnel trajectory fusion embedding feature sequence.

[0176] In a specific embodiment, step S4 introduces rolling time-domain model predictive control technology, which predicts future multi-step states based on fused feature sequences, and generates control commands for three-dimensional linkage of data acquisition, governance, and facilities. Specifically, this includes:

[0177] S41. Starting from the current moment, determine the prediction time domain and the control time domain, and construct a system state vector containing facility risk values, personnel risk values, and data quality values. The core parameters of model predictive control are defined as follows:

[0178] System state vector This includes facility risk value, personnel risk value, and data quality value, with each dimension ranging from [0,1].

[0179] Control Vector This includes data collection and adjustment quantities, treatment and adjustment quantities, and facility adjustment quantities.

[0180] Prediction Time Domain : The number of time steps to predict the future, set to 5 steps;

[0181] Control Time Domain Optimize the number of time steps for the control quantity, set to 2 steps.

[0182] S42. Based on the fused embedded feature sequence, the system state vector at each time point in the time domain is recursively predicted using a state prediction model. A linear time-varying state prediction model is established:

[0183]

[0184] Where k=0,1,..., For predicting the step size index; For prediction in the time domain; The system's state vector at time t+k includes three dimensions: facility risk value, personnel risk value, and data quality value. Let A be the control vector of the system at time t+k, comprising three dimensions: acquisition regulation, governance regulation, and facility regulation; A is the state transition matrix, representing the evolutionary characteristics of the state itself; and B is the control input matrix, representing the degree of influence of the control variables on the state. Matrices A and B are obtained through training on historical data and are updated online as the system runs.

[0185] In some embodiments, the state transition matrix A and the control input matrix B are identified online using recursive least squares. During the initialization phase, at least 1000 sets of historical data (state-control-state transition triplets) are collected, and initial estimates of A and B are obtained through batch least squares fitting. During the online operation phase, after each new set of state transition data is collected, A and B are updated using recursive least squares with a forgetting factor. The forgetting factor enables the model to track the time-varying characteristics of the campus environment while suppressing the influence of measurement noise.

[0186] S43. Construct an optimization objective function with the joint objectives of minimizing state deviation and minimizing control cost. The calculation formula is as follows:

[0187]

[0188] Where J is the value of the objective function; The reference state vector (the facility risk value and personnel risk value are set to 0, and the data quality value is set to 1). Let Q be the 2-norm of the weighted vector, where Q is the diagonal matrix of state weights; Let R be the 2-norm of a weighted vector, where R is a diagonal matrix of control weights.

[0189] S44. Solve the objective function to obtain the optimal control sequence in the control time domain, and take the first set of control variables as the three-dimensional linkage pre-control command output at the current moment. The calculation formula is as follows:

[0190]

[0191] in, To solve for the control vectors at each time step in the optimal control sequence obtained after optimizing the objective function, the first set of control variables in the sequence is taken. This serves as the output of the three-dimensional linkage pre-control command at the current moment.

[0192] The optimization problem described above is a typical quadratic programming problem, which can be solved efficiently using methods such as the effective set method and the interior point method. According to the rolling optimization principle of MPC, only the first set of control variables in the control sequence is considered. This serves as the final output at the current moment, i.e., the three-dimensional linkage pre-control command. The latest state is acquired again at the next moment, and the prediction and solution are performed again, continuously updating the control commands. (Control time domain) The subsequent control input remains at the final value in the control time domain. Remain unchanged to complete the prediction in the time domain. The state is predicted recursively within the context.

[0193] In a specific embodiment, in step S5, relying on the campus digital twin space, the control commands are mapped back to the physical campus space. After simulation verification, they are issued for execution, realizing a virtual-physical closed loop of digital space optimization and physical space execution. Specifically, this includes:

[0194] S51. A digital twin space pre-constructed with a 1:1 precise mapping to the physical campus space. Specifically, this involves constructing a full-element virtual mirror of the physical campus in the digital world through 3D modeling, real-time data mapping, and simulation interaction technologies, achieving bidirectional mapping and real-time interaction between the physical entity and the digital model. The digital twin space comprises the following three levels:

[0195] The geometric layer constructs a three-dimensional geometric model of the campus buildings, floors, classrooms, and equipment, accurately reproducing the physical spatial layout;

[0196] The data layer maps real-time fused feature data to corresponding spatial locations, driving the state update of the digital twin;

[0197] The interaction layer provides visual interaction and simulation verification interfaces, supporting status display, command simulation, and effect prediction.

[0198] The digital twin space is both a visualization carrier of data fusion results and an intermediate hub connecting digital instructions and physical devices.

[0199] S52. Input the three-dimensional linkage pre-control command into the digital twin space, perform coordinate mapping and command parsing in the digital twin space, convert the normalized adjustment amount into the actual executable parameter value of the equipment, and after simulation verification, send the command to the physical equipment for execution. Specifically, coordinate mapping converts the region and point codes corresponding to the command into physical space coordinates, locating the specific equipment and facilities; command parsing converts the normalized adjustment amount into the actual executable parameter value of the equipment; for example, converting the collected adjustment amount into a specific sampling frequency value; simulation verification simulates the execution of the control command in the digital twin space, predicts the state changes after execution, and verifies the rationality and safety of the command.

[0200] The control commands are simulated and executed in the digital twin space, and the state changes after execution are predicted. If the verification is successful, the commands are sent to the physical device for execution; if the verification fails, the process returns to step S4 to perform optimization and solution again.

[0201] S53. Simultaneously execute the following three adjustments in the physical space: adjust the monitoring and acquisition parameters of IoT devices in each area, adjust the data governance intensity of edge nodes, and adjust the operating parameters of campus facilities. Specifically, adjust the acquisition parameters of IoT devices, including the sampling frequency of sensors in the corresponding area, the resolution and frame rate of cameras, and the data reporting interval of access control systems. Increase the acquisition frequency in high-risk areas, up to 1 second / time; decrease the acquisition frequency in low-risk areas, down to 5 minutes / time, to achieve on-demand acquisition and save bandwidth and equipment power consumption.

[0202] The governance intensity of edge nodes has been adjusted, modifying the accuracy of the cleaning algorithm, the sensitivity of anomaly detection, and the level of missing value imputation for the corresponding edge nodes. High-risk areas are switched to a high-precision governance mode, employing more complex algorithms; low-risk areas are switched to a high-efficiency governance mode, using lightweight algorithms to balance quality and computing power.

[0203] Adjustments are made to the operating parameters of campus facilities, including air conditioning, lighting, ventilation, and access control. For example, if a high density of people is anticipated, ventilation is increased in advance; if equipment overheating is anticipated, cooling systems are activated in advance, achieving proactive control.

[0204] The execution results are transmitted back to the digital twin space in real time to update the state of the twin and form an execution closed loop.

[0205] In a specific embodiment, step S6 involves constructing a multi-agent reinforcement learning architecture, endowing edge nodes with autonomous learning capabilities, and continuously iteratively optimizing strategies through interaction with the environment. Specifically, this includes:

[0206] S61. Configure an independent governance agent for each edge node of the teaching area, defining the agent's observation space and action space. Specifically, the observation space includes local data accuracy, risk detection rate, bandwidth utilization, computing resource utilization, current scene type, etc., with all observations normalized to the [0,1] interval (5 dimensions in total). The action space includes continuous actions such as adjusting cleaning algorithm parameters, anomaly thresholds, fusion weights, and acquisition frequency, as well as discrete actions such as algorithm switching. Policy Network Used to generate an action probability distribution based on input state observations. These are the network parameters. That is, the policy network uses the observation vector at the current time step. (Including normalized observations such as local data accuracy, risk detection rate, bandwidth utilization, computing resource utilization, and current scene type) as input, the output after forward propagation is the probability distribution of each action in the action space. The agent selects the action to execute based on the probability distribution.

[0207] In some embodiments, the policy network It is a three-layer fully connected feedforward neural network: the input layer dimension is the observation space dimension. (Including 5-dimensional observations such as local data accuracy, risk detection rate, and bandwidth utilization), hidden layer 1 has 128 neurons, hidden layer 2 has 64 neurons, and the output layer dimension is the action space dimension. (Includes encoding of continuous and discrete actions, totaling 6 dimensions; includes acquisition frequency adjustment, anomaly detection threshold adjustment, governance intensity level, graph fusion temperature coefficient, cleaning algorithm switching flag, and reporting frequency multiplier). The hidden layer activation function is ReLU, the continuous action part of the output layer uses the Tanh activation function (output range [-1,1]), and the discrete action part uses the Softmax activation function. The value network uses the same hidden layer structure as the policy network, and the output is a state value scalar. The Adam optimizer is used during training, with a learning rate of 3×10⁻. 4 The discount factor γ = 0.99 and the GAE parameter λ = 0.95.

[0208] S62. Design an instant reward function that includes data accuracy, risk detection rate, and bandwidth utilization. The calculation formula is as follows:

[0209]

[0210] in, For data accuracy; For risk detection rate; Bandwidth utilization; , , These are the weighting coefficients.

[0211] In some embodiments, the weight coefficients of the instant reward function are set to a default value. =0.4、 =0.4、 =0.2, the sum of the three weights is 1. This set of values ​​was determined through multiple rounds of experimental optimization in typical smart campus scenarios, balancing detection accuracy and resource consumption. For areas with high safety sensitivity (such as laboratories and hazardous chemical storage areas), the weights can be adjusted to... =0.3、 =0.5、 =0.2 to enhance risk detection capabilities; for bandwidth-constrained edge nodes, the weight can be adjusted to =0.35、 =0.35、 =0.30 to reduce bandwidth usage. The weighting coefficient can be configured by the administrator according to the service priority, and the configured value must meet the normalization constraint. + + =1.

[0212] S63. Each agent interacts with the environment locally, collects observation, action, and reward data, and updates the local policy network parameters using the proximal policy optimization algorithm. The PPO algorithm adjusts the importance sampling ratio. ,in, These are the parameters of the current policy network; To update the parameters of the old policy network; Let t be the state observed by the agent at time t; For the agent in state The action to be performed; For the current policy in state Select action The probability of; For the old strategy in state Select action The probability of; The importance sampling ratio is used to measure the relative probability of the old and new strategies in action selection.

[0213] The pruning objective function of the PPO algorithm is:

[0214]

[0215] in, To trim the objective function value; This is the estimated value of the dominance function at time t; The hyperparameters are used to limit the magnitude of policy updates; The pruning function sets the importance sampling ratio. Limited to the range Inside; Let be the expected value over all times t. This pruning mechanism limits the policy update magnitude to a preset range, preventing large single updates from causing training instability.

[0216] S64. The cloud periodically aggregates the policy parameters of each agent, generates a globally optimized policy, and distributes it to each edge agent. Specifically, policy parameter upload: Each agent uploads its trained local policy parameters to the cloud, without uploading any raw data. Global aggregation: The cloud uses a federated averaging algorithm to perform a weighted average of the policy parameters of all agents, generating globally optimized policy parameters. The weights are determined based on the amount of data and sample quality in each region. Global policy distribution: The cloud distributes the globally optimized policy parameters to each edge agent, which updates its local policy and enters the next iteration.

[0217] Through federated reinforcement learning, the system can continuously and autonomously optimize itself after deployment, becoming more accurate the longer it runs. Compared to manual parameter tuning, the efficiency of policy optimization is improved by more than 3 times, and it can adapt to changes in the scenario, continuously maintaining optimal performance.

[0218] Example 2:

[0219] like Figure 3 As shown, this embodiment provides a multi-source IoT data fusion processing system for smart campuses, used to implement the multi-source IoT data fusion processing method for smart campuses as described in Embodiment 1, including:

[0220] The data acquisition module 100 is used to collect multi-source IoT data from various areas of the smart campus, add spatiotemporal metadata to each data point, and generate a raw dataset with spatiotemporal labels.

[0221] The edge governance module 200 is used to adaptively match the corresponding cleaning strategy according to the current campus scene at the edge nodes corresponding to each region, perform preprocessing on the original dataset, and generate a standardized detailed dataset after passing the information entropy verification.

[0222] The spatiotemporal graph fusion module 300 is used to construct a campus spatiotemporal heterogeneous graph based on the standardized detailed dataset, perform multi-source feature fusion on the spatiotemporal heterogeneous graph through a spatiotemporal graph convolutional neural network, and output a fused embedded feature sequence.

[0223] Predictive control module 400 is used to input the fused embedded feature sequence into the rolling time domain model predictive controller, predict the system state within a preset time step in the future, and generate three-dimensional linkage pre-control instructions.

[0224] The reverse execution module 500 is used to reverse map the three-dimensional linkage pre-control command to the physical campus space, and adjust the monitoring and acquisition parameters of IoT devices in each area, the data governance intensity of edge nodes, and the operating parameters of campus facilities accordingly.

[0225] The iterative optimization module 600 is used to iteratively update the cleaning strategy, graph fusion weights, and predictive control model through multi-agent reinforcement learning based on business feedback and data quality monitoring results.

[0226] Specifically, the data acquisition module 100 is deployed inside each IoT device (including sensors, cameras, access control gates, WiFi APs, etc.) on the edge side or in its nearest access gateway, responsible for the acquisition and initial encapsulation of raw data. The edge governance module 200, spatiotemporal graph fusion module 300, predictive control module 400, and reverse execution module 500 are all deployed on edge nodes of each building / area. Each edge node corresponds to a teaching area (such as a teaching building or a laboratory building), and the edge nodes operate independently and in parallel. The iterative optimization module 600 is deployed in the cloud data center and communicates with each edge node through the campus backbone network.

[0227] Specifically, the data acquisition module 100 transmits the original dataset with spatiotemporal labels to the edge governance module 200 of the edge node in the same area via the MQTToverTLS protocol, with a transmission frequency of one batch every 10 seconds. After completing scene adaptive cleaning and information entropy verification, the edge governance module 200 transmits the standardized detailed dataset to the spatiotemporal graph fusion module 300 within the same edge node via memory sharing. The fused embedded feature sequence output by the spatiotemporal graph fusion module 300 is directly transmitted to the prediction control module 400 within the same edge node via an internal interface as input to the state prediction model. The three-dimensional linkage pre-control command generated by the prediction control module 400 is transmitted to the reverse execution module 500 within the same edge node via inter-process communication (IPC). The reverse execution module 500 issues the verified control command to the corresponding area-side devices to adjust the device's acquisition parameters, the edge node's governance intensity, and the facility's operating parameters. The governance agents of each edge node upload the locally trained policy parameters to the iterative optimization module 600 in the cloud through an encrypted channel. The iterative optimization module 600 uses a federated average algorithm to weight and aggregate the policy parameters of each region, generate a global optimization policy, and then distribute it to the agents of each edge node to complete the policy iterative update.

[0228] The above-described specific embodiments are preferred embodiments of a multi-source Internet of Things data fusion processing method and system for smart campuses according to this application, and are not intended to limit the specific implementation scope of this application. The scope of this application includes but is not limited to the specific embodiments described above. All equivalent changes made in accordance with the shape and structure of this application are within the protection scope of this application.

Claims

1. A method for multi-source IoT data fusion processing for smart campuses, characterized in that, Includes the following steps: S1. Collect multi-source IoT data from various areas of the smart campus, add spatiotemporal metadata to each data point, and generate a raw dataset with spatiotemporal labels. S2. At the edge nodes corresponding to each region, the corresponding cleaning strategy is adaptively matched according to the current campus scene, and the original dataset is preprocessed. After passing the information entropy verification, a standardized detailed dataset is generated. S3. Construct a campus spatiotemporal heterogeneous graph based on the standardized detailed dataset, perform multi-source feature fusion on the spatiotemporal heterogeneous graph through a spatiotemporal graph convolutional neural network, and output a fused embedded feature sequence. S4. Input the fused embedded feature sequence into the rolling time domain model prediction controller to predict the system state within a preset time step in the future and generate a three-dimensional linkage pre-control command. S5. The three-dimensional linkage pre-control command is reverse-mapped to the physical campus space, and the monitoring and acquisition parameters of IoT devices in each area, the data governance intensity of edge nodes, and the operating parameters of campus facilities are adjusted accordingly. S6. Based on business feedback and data quality monitoring results, the cleaning strategy, graph fusion weights, and predictive control model are iteratively updated through multi-agent reinforcement learning.

2. The multi-source IoT data fusion processing method for smart campuses according to claim 1, characterized in that, Step S1 specifically includes: S11. The multi-source IoT data is accessed according to the data type using the corresponding acquisition method. The data types include at least environmental sensing data, equipment operation data, video and image data, traffic and consumption data, network behavior data, teaching process data, and location trajectory data. S12. For business systems with different adaptation conditions, adaptively select message middleware push method, change data capture method or log parsing collection method to obtain data. S13. Attach a unified spatiotemporal metadata tag to each piece of collected data. The spatiotemporal metadata includes at least the spatial coordinates of the point, the timestamp of the collection time, and the device type code.

3. The multi-source IoT data fusion processing method for smart campuses according to claim 1, characterized in that, Step S2 specifically includes: S21. Based on spatiotemporal metadata and prior scene rules, identify the campus scene type of the current teaching area; S22. Match the corresponding data cleaning algorithm combination according to the scenario type, and perform deduplication, outlier detection and processing, and missing value filling on the original dataset; S23. Perform normalization and standardization on the processed data to unify the data units and value ranges; S24. Calculate the information entropy of the original dataset before preprocessing and the information entropy of the standardized dataset after preprocessing, and obtain the entropy difference. S25. Compare the entropy difference value with the preset entropy difference threshold. If it is less than or equal to the preset entropy difference threshold, the data quality is deemed qualified, and a standardized detailed dataset is output. If it is greater than the preset entropy difference threshold, the cleaning algorithm parameters are adjusted, and the process is returned to step S22 to re-execute the preprocessing.

4. The multi-source IoT data fusion processing method for smart campuses according to claim 1, characterized in that, Step S3 specifically includes: S31. Extract point entities, personnel entities, and region entities from the standardized detailed data, and use them as point nodes, personnel nodes, and region nodes respectively to construct a node set of a spatiotemporal heterogeneous graph. S32. Based on the spatial positional relationship, temporal sequence relationship, and personnel movement relationship between nodes, construct spatial adjacency edges, temporal correlation edges, and behavioral trajectory edges respectively to form the edge set of the spatiotemporal heterogeneous graph; S33. Initialize an input feature vector for each node, wherein the input feature vector contains multi-source IoT data features of the corresponding entity; S34. Perform multi-layer graph convolution calculation on the spatiotemporal heterogeneous graph through a spatiotemporal graph convolutional neural network. When spatial convolution aggregation, a mutual information weighted aggregation method is adopted to aggregate spatial neighborhood features and temporal dynamic features to generate fused embedding features of each node. S35. Aggregate the fusion embedding features of all point nodes within the region according to the region dimension to generate a region fusion embedding feature sequence; aggregate the temporal fusion embedding features of personnel nodes according to the personnel dimension to generate a personnel trajectory fusion embedding feature sequence.

5. The multi-source IoT data fusion processing method for smart campuses according to claim 4, characterized in that, In step S34, the mutual information weighted aggregation method specifically includes: S341. Calculate the mutual information value of the features between the central node and each neighboring node; S342. Calculate the aggregation weight of each neighboring node based on the mutual information value. The higher the mutual information, the greater the aggregation weight. S343. The features of all neighboring nodes are weighted and summed according to the aggregation weights to obtain the spatial convolution aggregation result.

6. The multi-source IoT data fusion processing method for smart campuses according to claim 1, characterized in that, Step S4 specifically includes: S41. Starting from the current moment, determine the prediction time domain and the control time domain, and construct a system state vector that includes facility risk value, personnel risk value, and data quality value; S42. Based on the fused embedded feature sequence, the system state vector at each moment in the time domain is recursively predicted through the state prediction model. S43. Construct an optimization objective function with the joint objectives of minimizing state deviation and minimizing control cost; S44. Solve the optimization objective function to obtain the optimal control sequence in the control time domain, and take the first set of control quantities as the three-dimensional linkage pre-control command output at the current moment.

7. The multi-source IoT data fusion processing method for smart campuses according to claim 1, characterized in that, Step S6 specifically includes: S61. Configure an independent governance agent for each edge node of the teaching area, and define the observation space and action space of the agent; S62. Design an instant reward function that includes data accuracy, risk detection rate, and bandwidth utilization. S63. Each agent interacts with the environment locally, collects observation, action, and reward data, and updates the local policy network parameters using the proximal policy optimization algorithm. S64: The cloud periodically aggregates the policy parameters of each intelligent agent, generates a global optimization policy, and distributes it to each edge intelligent agent.

8. The multi-source IoT data fusion processing method for smart campuses according to claim 1, characterized in that, Step S5 specifically includes: S51. Pre-construct a digital twin space corresponding to the physical campus space; S52. Input the three-dimensional linkage pre-control command into the digital twin space, perform coordinate mapping and command parsing in the digital twin space, convert the normalized adjustment amount into the actual executable parameter value of the device, and after simulation verification, send the command to the physical device for execution. S53. Simultaneously perform the following three adjustments in the physical space: adjust the monitoring and acquisition parameters of IoT devices in each area, adjust the data governance intensity of edge nodes, and adjust the operating parameters of campus facilities.

9. The multi-source IoT data fusion processing method for smart campuses according to claim 8, characterized in that, In step S52, the specific implementation method of simulation verification includes: The control commands are simulated and executed in the digital twin space, and the state changes after execution are predicted. If the verification is successful, the commands are sent to the physical device for execution; if the verification fails, the process returns to step S4 to perform optimization and solution again.

10. A multi-source Internet of Things (IoT) data fusion processing system for smart campuses, characterized in that: The method for implementing the multi-source IoT data fusion processing method for smart campuses as described in any one of claims 1-9 includes: The data acquisition module is used to collect multi-source IoT data from various areas of the smart campus, add spatiotemporal metadata to each data point, and generate a raw dataset with spatiotemporal labels. The edge governance module is used to adaptively match the corresponding cleaning strategy on the edge nodes of each region according to the current campus scene, perform preprocessing on the original dataset, and generate a standardized detailed dataset after passing the information entropy verification. The spatiotemporal graph fusion module is used to construct a campus spatiotemporal heterogeneous graph based on the standardized detailed dataset, perform multi-source feature fusion on the spatiotemporal heterogeneous graph through a spatiotemporal graph convolutional neural network, and output a fused embedded feature sequence. The predictive control module is used to input the fused embedded feature sequence into the rolling time domain model predictive controller, predict the system state within a preset time step in the future, and generate three-dimensional linkage pre-control instructions. The reverse execution module is used to reverse map the three-dimensional linkage pre-control command to the physical campus space, and adjust the monitoring and acquisition parameters of IoT devices in each area, the data governance intensity of edge nodes, and the operating parameters of campus facilities accordingly. The iterative optimization module is used to iteratively update the cleaning strategy, graph fusion weights, and predictive control model through multi-agent reinforcement learning based on business feedback and data quality monitoring results.