A method and system for edge gateway monitoring data transmission combined with neural network

By building a network status prediction model and edge knowledge graph, combined with a lightweight encryption mechanism, the data explosion, uneven signal coverage and security issues in edge gateway monitoring data transmission are solved, achieving efficient, reliable and secure data transmission.

CN120455498BActive Publication Date: 2025-09-19FUJIAN JIANYAN INVESTIGATION DESIGNING INST +4
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510947563.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-09-19
Estimated Expiration
2045-07-10

AI Technical Summary

Technical Problem

Traditional edge gateways face problems in monitoring data transmission, such as data explosion and real-time processing pressure, uneven signal coverage, poor communication quality, low intelligence, and insufficient security, which affect the effectiveness and timeliness of monitoring data.

Method used

An edge gateway monitoring data transmission method combined with neural networks is adopted. By constructing a network status prediction model, a message ring queue and an edge knowledge graph, dynamically adjusting the batch processing strategy, and adopting a lightweight encryption mechanism, efficient, reliable and secure transmission of monitoring data is achieved.

Benefits of technology

It significantly improves the efficiency, reliability and security of monitoring data transmission, adapts to complex network environments, reduces computing resource requirements, and ensures the real-time and integrity of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455498B_ABST
    Figure CN120455498B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for edge gateway monitoring data transmission combined with a neural network in the field of intersectional technology of artificial intelligence and engineering monitoring. The method includes: step S1, obtaining a large amount of historical network monitoring data to construct a data set, and training and deploying a network status prediction model through the data set; step S2, the edge gateway creates a message ring queue and an edge knowledge graph; step S3, collecting monitoring data and rolling storage to the message ring queue; step S5, collecting real-time network monitoring data and inputting it into the network status prediction model to obtain a network status prediction result to match the corresponding batch processing strategy; step S6, the edge gateway pre-processes the monitoring data stored in the message ring queue in sequence based on the batch processing strategy and the edge knowledge graph, encrypts the pre-processed monitoring data into encrypted monitoring data, and then uploads it to the server. The advantages of the present invention are: greatly improving the efficiency, reliability and security of monitoring data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intersectional technology of artificial intelligence and engineering monitoring, and in particular to a method and system for edge gateway monitoring data transmission combined with a neural network. Background Art

[0002] With the accelerating pace of urbanization, a large number of existing buildings and infrastructure in cities are gradually entering the aging stage. The structural safety of these existing buildings and infrastructure is directly related to the stability of urban operations and the reliability of public services. To understand the health status of the key structures of these existing buildings and infrastructure for timely maintenance, the construction of efficient, real-time monitoring systems has become an urgent need for urban management.

[0003] Monitoring the health of existing buildings and infrastructure has traditionally relied on manual inspections, but these methods suffer from limited coverage, low data collection frequency, and a lack of intelligent judgment capabilities, making them unsuitable for large-scale, high-frequency, and real-time monitoring scenarios. Therefore, the deployment of edge gateways, which upload monitoring data collected by sensors to servers, has emerged. However, traditional edge gateways have the following technical drawbacks when transmitting monitoring data:

[0004] 1. With the expansion of monitoring scale and the surge in the number of sensors, edge gateways face the dual challenges of data explosion and real-time processing pressure.

[0005] 2. In complex urban environments, problems such as uneven signal coverage, limited bandwidth, and poor communication quality frequently occur, causing edge gateways to be prone to delays, packet loss, and redundant transmission during the transmission of monitoring data, seriously affecting the effectiveness and timeliness of monitoring data.

[0006] 3. The edge gateway has a low level of intelligence and cannot dynamically adjust the transmission strategy according to network conditions. It also lacks a secure encryption mechanism, and relevant data can easily be stolen and tampered with in plain text during transmission.

[0007] Therefore, how to provide an edge gateway monitoring data transmission method and system combined with a neural network to improve the efficiency, reliability and security of monitoring data transmission has become a technical problem that needs to be solved urgently. Summary of the Invention

[0008] The technical problem to be solved by the present invention is to provide an edge gateway monitoring data transmission method and system combined with a neural network, so as to improve the efficiency, reliability and security of monitoring data transmission.

[0009] In a first aspect, the present invention provides a method for edge gateway monitoring data transmission in combination with a neural network, comprising the following steps:

[0010] Step S1: creating a network state prediction model based on the sequentially connected time series feature extraction layer, the dual-channel fusion layer, and the prediction output layer, and setting a loss function of the network state prediction model;

[0011] The time series feature extraction layer is constructed based on the Tiny-TCN channel and the Tiny-Attention channel; the Tiny-TCN channel is used to capture multi-scale local time series features and global dependency features from the input monitoring data through the dilated convolution kernel; the Tiny-Attention channel is used to weightedly splice the local time series features and global dependency features through the sliding window mechanism to obtain comprehensive time series features; the prediction output layer is used to map the comprehensive time series features to obtain network status prediction results of good network, medium network or congested network;

[0012] Step S2: Acquire a large amount of historical network monitoring data, pre-process each of the historical network monitoring data to construct a data set, train, verify, and test the network status prediction model using the data set and the loss function, compress the network status prediction model during the training process, and deploy the network status prediction model that passes the test to the edge gateway;

[0013] Step S3: The edge gateway creates a message ring queue and an edge knowledge graph;

[0014] Step S4: The edge gateway collects monitoring data with the collection time through the monitoring sensor, and stores the monitoring data in a rolling manner into a message ring queue based on the device unique identification code of the monitoring sensor;

[0015] Step S5: The edge gateway collects real-time network monitoring data, inputs the real-time network monitoring data into the deployed network status prediction model to obtain a network status prediction result, and matches a corresponding batch processing strategy based on the network status prediction result;

[0016] Step S6: The edge gateway pre-processes the monitoring data stored in the message ring queue in sequence based on the batch processing strategy and the edge knowledge graph, encrypts the pre-processed monitoring data into encrypted monitoring data, and then uploads it to the server.

[0017] Furthermore, the step S2 is specifically as follows:

[0018] Acquire a large amount of historical network monitoring data including at least packet loss rate, network delay, bandwidth utilization, network topology, device performance indicators, and alarm information, perform preprocessing on each of the historical network monitoring data including at least missing value filling, outlier removal, noise reduction, and normalization, and annotate the network status of each of the preprocessed historical network monitoring data to construct a data set;

[0019] Based on the time series, the dataset is divided into a training set, a validation set, and a test set in a ratio of 8:1:1. The network state prediction model is trained using the training set. During the training process, the float32 weights of the network state prediction model are quantized to int8 using the TensorFlow Lite for Micro tool. The channels and neurons of the network state prediction model are pruned using a dynamic pruning method, and hyperparameters including at least the learning rate, batch size, and random dropout rate are continuously optimized until the loss value of the loss function is less than a preset loss threshold or a preset early stopping condition is met;

[0020] The trained network state prediction model is verified using the validation set to determine whether the prediction accuracy is greater than a preset accuracy threshold. If not, the verification fails and the dataset is expanded to continue training. If so, the verification passes, and:

[0021] The verified network status prediction model is tested using the test set to determine whether the confidence is greater than a preset confidence threshold. If not, the test fails and the data set is expanded to continue training; if so, the test passes and the network status prediction model that passes the test is deployed to the edge gateway.

[0022] Furthermore, in step S3, the message ring queue is provided with a plurality of queue slots for storing monitoring data, each of the queue slots corresponds to a hash value of a device unique identification code of a monitoring sensor, and is rolled over based on the stored collection time;

[0023] The edge knowledge graph is constructed based on entities, relationships and attributes; the entity is the edge gateway; the relationship is the positional relationship and connection relationship between the edge gateway and the monitoring sensor; the attribute is the risk event; the edge knowledge graph is used to determine the transmission priority of the monitoring data.

[0024] Furthermore, the step S4 is specifically as follows:

[0025] The edge gateway collects monitoring data with the collection time through the monitoring sensor based on the preset collection cycle, calculates the hash value of the device unique identification code of the monitoring sensor, and stores the collected monitoring data based on the hash value mapping to the corresponding queue slot of the message ring queue;

[0026] The step S5 is specifically as follows:

[0027] The edge gateway collects real-time network monitoring data, pre-processes the real-time network monitoring data through the streaming computing engine, and then inputs the data into the deployed network status prediction model to obtain the network status prediction result;

[0028] The edge gateway matches the corresponding batch processing strategy based on the network status prediction result through the Q-Learning algorithm; the batch processing strategy includes at least a processing window length, an aggregation algorithm, a sampling frequency, a number of retransmissions, and a compression algorithm.

[0029] Furthermore, the step S6 is specifically as follows:

[0030] The edge gateway extracts an adjacency matrix and a feature matrix from the edge knowledge graph, encodes the adjacency matrix and the feature matrix through a graph neural network to obtain an embedding vector, and sets a transmission priority of the monitoring data collected by each monitoring sensor based on the embedding vector;

[0031] The edge gateway reads the corresponding monitoring data from the message ring queue based on the transmission priority, and pre-processes the monitoring data based on the matching batch processing strategy;

[0032] The edge gateway calculates the MAC value of the pre-processed monitoring data using the Poly1305 algorithm, encrypts the pre-processed monitoring data using the session key to obtain ciphertext data, and encapsulates the encrypted monitoring data in the format of file header + ciphertext data + MAC value + communication unique code, and uploads the encrypted monitoring data to the server in real time through the TLS protocol;

[0033] The session key is generated by negotiation between the edge grid and the server, and when the network status prediction result is that the network is good, a renegotiation operation is triggered to update the session key;

[0034] The negotiation process of the session key is specifically as follows: the server creates a pair of service public key and server private key based on the ECC algorithm, and transmits the service public key to the edge gateway; the edge gateway creates a pair of gateway public key and gateway private key based on the ECC algorithm, and transmits the gateway public key to the server; the server negotiates the server private key and the gateway public key through the ECDH algorithm to obtain a first negotiation key, uses a key derivation function to derive the first negotiation key, and obtains a session key for ChaCha20 encryption; the edge gateway negotiates the gateway private key and the service public key through the ECDH algorithm to obtain a second negotiation key, uses a key derivation function to derive the second negotiation key, and obtains a session key for ChaCha20 encryption.

[0035] In a second aspect, the present invention provides an edge gateway monitoring data transmission system combined with a neural network, comprising the following modules:

[0036] A network state prediction model creation module is used to create a network state prediction model based on the sequentially connected time series feature extraction layer, the dual-channel fusion layer, and the prediction output layer, and set the loss function of the network state prediction model;

[0037] The time series feature extraction layer is constructed based on the Tiny-TCN channel and the Tiny-Attention channel; the Tiny-TCN channel is used to capture multi-scale local time series features and global dependency features from the input monitoring data through the dilated convolution kernel; the Tiny-Attention channel is used to weightedly splice the local time series features and global dependency features through the sliding window mechanism to obtain comprehensive time series features; the prediction output layer is used to map the comprehensive time series features to obtain network status prediction results of good network, medium network or congested network;

[0038] A network status prediction model deployment module is used to obtain a large amount of historical network monitoring data, pre-process each of the historical network monitoring data to construct a data set, train, verify and test the network status prediction model using the data set and loss function, compress the network status prediction model during training, and deploy the network status prediction model that passes the test to the edge gateway;

[0039] The queue graph creation module is used for the edge gateway to create a message ring queue and an edge knowledge graph;

[0040] A monitoring data collection and storage module is used for the edge gateway to collect monitoring data with collection time through monitoring sensors, and to roll and store the monitoring data into a message ring queue based on the device unique identification code of the monitoring sensor;

[0041] A network status prediction module is used for edge gateways to collect real-time network monitoring data, input the real-time network monitoring data into the deployed network status prediction model, obtain network status prediction results, and match corresponding batch processing strategies based on the network status prediction results;

[0042] The monitoring data encryption transmission module is used for the edge gateway to pre-process the monitoring data stored in the message ring queue in sequence based on the batch processing strategy and the edge knowledge graph, encrypt the pre-processed monitoring data into encrypted monitoring data, and then upload it to the server.

[0043] Furthermore, the network status prediction model deployment module is specifically used to:

[0044] Acquire a large amount of historical network monitoring data including at least packet loss rate, network delay, bandwidth utilization, network topology, device performance indicators, and alarm information, perform preprocessing on each of the historical network monitoring data including at least missing value filling, outlier removal, noise reduction, and normalization, and annotate the network status of each of the preprocessed historical network monitoring data to construct a data set;

[0045] Based on the time series, the dataset is divided into a training set, a validation set, and a test set in a ratio of 8:1:1. The network state prediction model is trained using the training set. During the training process, the float32 weights of the network state prediction model are quantized to int8 using the TensorFlow Lite for Micro tool. The channels and neurons of the network state prediction model are pruned using a dynamic pruning method, and hyperparameters including at least the learning rate, batch size, and random dropout rate are continuously optimized until the loss value of the loss function is less than a preset loss threshold or a preset early stopping condition is met;

[0046] The trained network state prediction model is verified using the validation set to determine whether the prediction accuracy is greater than a preset accuracy threshold. If not, the verification fails and the dataset is expanded to continue training. If so, the verification passes, and:

[0047] The verified network status prediction model is tested using the test set to determine whether the confidence is greater than a preset confidence threshold. If not, the test fails and the data set is expanded to continue training; if so, the test passes and the network status prediction model that passes the test is deployed to the edge gateway.

[0048] Furthermore, in the queue map creation module, the message ring queue is provided with a plurality of queue slots for storing monitoring data, each of the queue slots corresponds to a hash value of a device unique identification code of a monitoring sensor, and is rolled over based on the stored collection time;

[0049] The edge knowledge graph is constructed based on entities, relationships and attributes; the entity is the edge gateway; the relationship is the positional relationship and connection relationship between the edge gateway and the monitoring sensor; the attribute is the risk event; the edge knowledge graph is used to determine the transmission priority of the monitoring data.

[0050] Furthermore, the monitoring data collection and storage module is specifically used to:

[0051] The edge gateway collects monitoring data with the collection time through the monitoring sensor based on the preset collection cycle, calculates the hash value of the device unique identification code of the monitoring sensor, and stores the collected monitoring data based on the hash value mapping to the corresponding queue slot of the message ring queue;

[0052] The network status prediction module is specifically used for:

[0053] The edge gateway collects real-time network monitoring data, pre-processes the real-time network monitoring data through the streaming computing engine, and then inputs the data into the deployed network status prediction model to obtain the network status prediction result;

[0054] The edge gateway matches the corresponding batch processing strategy based on the network status prediction result through the Q-Learning algorithm; the batch processing strategy includes at least a processing window length, an aggregation algorithm, a sampling frequency, a number of retransmissions, and a compression algorithm.

[0055] Furthermore, the monitoring data encryption transmission module is specifically used to:

[0056] The edge gateway extracts an adjacency matrix and a feature matrix from the edge knowledge graph, encodes the adjacency matrix and the feature matrix through a graph neural network to obtain an embedding vector, and sets a transmission priority of the monitoring data collected by each monitoring sensor based on the embedding vector;

[0057] The edge gateway reads the corresponding monitoring data from the message ring queue based on the transmission priority, and pre-processes the monitoring data based on the matching batch processing strategy;

[0058] The edge gateway calculates the MAC value of the pre-processed monitoring data using the Poly1305 algorithm, encrypts the pre-processed monitoring data using the session key to obtain ciphertext data, and encapsulates the encrypted monitoring data in the format of file header + ciphertext data + MAC value + communication unique code, and uploads the encrypted monitoring data to the server in real time through the TLS protocol;

[0059] The session key is generated by negotiation between the edge grid and the server, and when the network status prediction result is that the network is good, a renegotiation operation is triggered to update the session key;

[0060] The negotiation process of the session key is specifically as follows: the server creates a pair of service public key and server private key based on the ECC algorithm, and transmits the service public key to the edge gateway; the edge gateway creates a pair of gateway public key and gateway private key based on the ECC algorithm, and transmits the gateway public key to the server; the server negotiates the server private key and the gateway public key through the ECDH algorithm to obtain a first negotiation key, uses a key derivation function to derive the first negotiation key, and obtains a session key for ChaCha20 encryption; the edge gateway negotiates the gateway private key and the service public key through the ECDH algorithm to obtain a second negotiation key, uses a key derivation function to derive the second negotiation key, and obtains a session key for ChaCha20 encryption.

[0061] The advantages of the present invention are:

[0062] 1. Create a network status prediction model through the sequentially connected time series feature extraction layer, dual-channel fusion layer and prediction output layer, and set the loss function of the network status prediction model; the time series feature extraction layer is constructed based on the Tiny-TCN channel and the Tiny-Attention channel; the Tiny-TCN channel is used to capture multi-scale local time series features and global dependency features from the input monitoring data through the expansion convolution kernel; the Tiny-Attention channel is used to weightedly splice the local time series features and global dependency features through the sliding window mechanism to obtain the comprehensive time series features; the prediction output layer is used to map the comprehensive time series features to obtain the network status prediction results of good network, medium network or congested network; then obtain a large amount of historical network monitoring data, pre-process each historical network monitoring data and construct a data set, train, verify and test the network status prediction model through the data set and loss function, compress the network status prediction model during the training process, and deploy the network status prediction model that passes the test to the edge gateway; then the edge gateway creates a message ring queue, edge knowledge The edge knowledge graph collects monitoring data with the collection time through monitoring sensors, and rolls the monitoring data into a message ring queue based on the device's unique identification code. The real-time network monitoring data collected in real time is input into the deployed network status prediction model to obtain network status prediction results. The corresponding batch processing strategy is matched based on the network status prediction results. Based on the batch processing strategy and the edge knowledge graph, the monitoring data stored in the message ring queue is preprocessed in sequence. The preprocessed monitoring data is encrypted into encrypted monitoring data and uploaded to the server. In other words, the monitoring data is selected for preprocessing and transmission in sequence through the message ring queue and the edge knowledge graph, reducing the processing pressure caused by the synchronous processing of various monitoring data by the edge grid. The network status prediction results predicted by the pre-trained network status prediction model are used to dynamically adjust the batch processing strategy of the monitoring data (for example, reducing the sampling rate and adopting a high compression ratio compression algorithm to reduce the data transmission volume) to better cope with network congestion. The transmitted monitoring data is encrypted to prevent the monitoring data from being stolen and tampered with in plain text, ultimately greatly improving the efficiency, reliability and security of monitoring data transmission.

[0063] 2. By adopting a dual-channel structure of Tiny-TCN (lightweight temporal convolutional network) and Tiny-Attention (lightweight attention mechanism), Tiny-TCN captures local temporal features and global dependency features, and Tiny-Attention performs weighted concatenation of local temporal features and global dependency features to obtain comprehensive temporal features. Compared with a single model (such as a pure CNN or RNN), this effectively improves feature extraction capabilities while simplifying the model size, thereby significantly improving the accuracy of network state prediction, effectively balancing prediction accuracy, model size, and operational efficiency.

[0064] 3. Compress the network state prediction model through int8 quantization (TensorFlow Lite for Micro tool) and dynamic pruning (channel / neuron level), reducing computing resource requirements, making it suitable for deployment on resource-constrained edge gateways while maintaining prediction performance (guaranteed by loss function threshold and verification accuracy).

[0065] 4. By monitoring the hash value of the sensor's unique device identification code, the queue slot of the message ring queue is mapped to store monitoring data, avoiding the overflow problem of traditional queues and improving the storage efficiency of monitoring data; through the rolling storage mechanism combined with dynamic updates of the collection time, the real-time monitoring data and efficient use of storage space are ensured.

[0066] 5. By constructing an edge knowledge graph that includes entity relationships (edge ​​gateway-monitoring sensor location / connection) and risk event attributes, and combining graph neural network (GNN) encoding to generate an embedding vector that identifies the transmission priority, dynamic hierarchical transmission of monitoring data is achieved. Compared with fixed priority rules, it is more adaptable to the complex and changing edge network environment.

[0067] 6. Based on the network status prediction results (good / medium / congested), the batch processing strategy (such as window length, aggregation algorithm, compression algorithm, etc.) is dynamically adjusted through reinforcement learning (Q-Learning) to achieve a balance between transmission efficiency and resource utilization. For example, when the network is congested, the sampling frequency is reduced or a high compression algorithm is enabled to improve system robustness.

[0068] 7. By adopting the Poly1305+ChaCha20 combination (low computational overhead) and dynamic session key negotiation (based on ECC / ECDH), data confidentiality and integrity are guaranteed; when the network is good, session key updates are actively triggered to avoid the risk of leakage caused by long-term use of session keys, taking into account both security and edge device performance limitations.

[0069] 8. By setting up a data set covering multi-dimensional indicators such as packet loss rate, latency, and bandwidth, and through hyperparameter optimization (learning rate, batch size, etc.) and double verification of validation / test sets, the generalization ability of the network status prediction model is ensured; after deployment, the network status prediction model is dynamically updated in combination with real-time network monitoring data to form a self-optimizing closed-loop system.

[0070] 9. By setting encryption, the monitoring data is standardized and encapsulated according to the file header + ciphertext + MAC + communication unique code, and transmitted through the TLS protocol, it has strong compatibility and is easy to parse on the server side, reducing the complexity of system integration.

[0071] 10. Preprocessing of historical network monitoring data, including missing value filling (such as interpolation), outlier removal (based on statistical thresholds or isolation forest algorithm), noise reduction (wavelet transform or sliding average) and normalization, effectively improves data quality. Combined with dynamic labeling of network status labels (good / medium / congested), it ensures that training data is highly consistent with real-world scenarios, reducing the risk of model overfitting.

[0072] 11. By building a lightweight dual-channel neural network model (a fusion of Tiny-TCN and Tiny-Attention), it achieves accurate extraction of multi-scale temporal features and dynamic prediction of network status. Combined with the dynamic priority scheduling of the edge knowledge graph, the Q-Learning-driven adaptive batch processing strategy, and a lightweight end-to-end encryption mechanism (Poly1305+ChaCha20), it efficiently completes data cleaning, compression, and encrypted transmission at the edge, significantly improving network status prediction accuracy, resource utilization, and transmission security. At the same time, through the rolling storage and streaming processing engine of the message ring queue, it ensures low-latency response (millisecond-level processing) and system robustness in high-real-time scenarios such as the Industrial Internet of Things, forming a full-process closed loop of "model prediction-dynamic optimization-secure transmission", which combines technological innovation and engineering practicality. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0074] Figure 1 This is a flow chart of a method for edge gateway monitoring data transmission combined with a neural network in the present invention.

[0075] Figure 2 It is a structural diagram of an edge gateway monitoring data transmission system combined with a neural network in the present invention. DETAILED DESCRIPTION

[0076] The technical solution in the embodiments of the present application has the following overall idea: monitoring data is selected in sequence for preprocessing and sending through a message ring queue and an edge knowledge graph, thereby reducing the processing pressure caused by the synchronous processing of various monitoring data by the edge grid; the network status prediction results predicted by the pre-trained network status prediction model are used to dynamically adjust the batch processing strategy of the monitoring data to better cope with the network congestion status, and the transmitted monitoring data is encrypted to prevent the monitoring data from being stolen and tampered with in plain text, thereby improving the efficiency, reliability and security of monitoring data transmission.

[0077] Please refer to Figures 1 to 2 As shown, a preferred embodiment of the edge gateway monitoring data transmission method combined with a neural network of the present invention includes the following steps:

[0078] Step S1: creating a network state prediction model based on the sequentially connected time series feature extraction layer, the dual-channel fusion layer, and the prediction output layer, and setting a loss function of the network state prediction model;

[0079] The time series feature extraction layer is constructed based on the Tiny-TCN channel and the Tiny-Attention channel; the Tiny-TCN channel is used to capture multi-scale local time series features and global dependency features from the input monitoring data through the dilated convolution kernel; the Tiny-Attention channel is used to weightedly splice the local time series features and global dependency features through the sliding window mechanism to obtain comprehensive time series features; the prediction output layer is used to map the comprehensive time series features to obtain network status prediction results of good network, medium network or congested network;

[0080] By adopting a dual-channel structure of Tiny-TCN (lightweight temporal convolutional network) and Tiny-Attention (lightweight attention mechanism), Tiny-TCN captures local temporal features and global dependency features, and Tiny-Attention performs weighted concatenation of local temporal features and global dependency features to obtain comprehensive temporal features. Compared with a single model (such as pure CNN or RNN), it effectively improves the feature extraction capability while simplifying the model size, thereby significantly improving the accuracy of network state prediction, and effectively balancing prediction accuracy, model size and operating efficiency.

[0081] The network state prediction model combines the Conv+BatchNorm+ReLU operations into a fused operator (Fused Op) to reduce the number of intermediate cache reads and writes. It also introduces a shared convolution kernel strategy, where multiple layers share some convolution kernel weights to reduce redundant memory loading.

[0082] The formula of the loss function is:

[0083] L=α·L_pred+β·L_fusion+γ·L_temporal;

[0084] Among them, L represents the loss value of the loss function; α, β, and γ represent weight coefficients, α+β+γ=1; L_pred represents the prediction error term; L_fusion represents the dual-channel fusion regularization term; L_temporal represents the temporal feature constraint term;

[0085] Step S2: Acquire a large amount of historical network monitoring data, pre-process each of the historical network monitoring data to construct a data set, train, verify, and test the network status prediction model using the data set and the loss function, compress the network status prediction model during the training process, and deploy the network status prediction model that passes the test to the edge gateway;

[0086] Step S3: The edge gateway creates a message ring queue and an edge knowledge graph; the edge knowledge graph is dynamically updated based on the latest data;

[0087] Step S4: The edge gateway collects monitoring data with the collection time through monitoring sensors, and rolls the monitoring data into a message ring queue based on the unique device identification code of the monitoring sensor; the monitoring sensors include at least temperature sensors, humidity sensors, vibration sensors, and pressure sensors, which are deployed at monitoring locations of existing buildings and infrastructure;

[0088] Step S5: The edge gateway collects real-time network monitoring data, inputs the real-time network monitoring data into the deployed network status prediction model to obtain a network status prediction result, and matches a corresponding batch processing strategy based on the network status prediction result;

[0089] Step S6: The edge gateway pre-processes the monitoring data stored in the message ring queue in sequence based on the batch processing strategy and the edge knowledge graph, encrypts the pre-processed monitoring data into encrypted monitoring data, and then uploads it to the server.

[0090] By constructing a lightweight dual-channel neural network model (a fusion of Tiny-TCN and Tiny-Attention), the precise extraction of multi-scale time series features and the dynamic prediction of network status are achieved. Combined with the dynamic priority scheduling of the edge knowledge graph, the Q-Learning-driven adaptive batch processing strategy and the lightweight end-to-end encryption mechanism (Poly1305+ChaCha20), data cleaning, compression and encrypted transmission are efficiently completed at the edge, significantly improving the network status prediction accuracy, resource utilization and transmission security. At the same time, through the rolling storage and streaming processing engine of the message ring queue, low-latency response (millisecond-level processing) and system robustness in high-real-time scenarios such as the Industrial Internet of Things are guaranteed, forming a full-process closed loop of "model prediction-dynamic optimization-secure transmission", which combines technological innovation and engineering practicality.

[0091] The step S2 is specifically as follows:

[0092] Acquiring a large amount of historical network monitoring data including at least packet loss rate, network latency, bandwidth utilization, network topology, device performance indicators, and alarm information, performing preprocessing on each of the historical network monitoring data including at least missing value filling, outlier removal, noise reduction, and normalization, and annotating each of the preprocessed historical network monitoring data with a network status to construct a data set; the network status is selected as good network, medium network, or congested network;

[0093] Through preprocessing of historical network monitoring data, including missing value filling (such as interpolation), outlier removal (based on statistical thresholds or isolation forest algorithm), noise reduction (wavelet transform or sliding average) and normalization, data quality is effectively improved. Combined with dynamic labeling of network status labels (good / medium / congested), it ensures that training data is highly consistent with real-world scenarios, reducing the risk of model overfitting.

[0094] Based on the time series, the dataset is divided into a training set, a validation set, and a test set in a ratio of 8:1:1. The network state prediction model is trained using the training set. During the training process, the float32 weights of the network state prediction model are quantized to int8 using the TensorFlow Lite for Micro tool. The channels and neurons of the network state prediction model are pruned using a dynamic pruning method, and hyperparameters including at least the learning rate, batch size, and random dropout rate are continuously optimized until the loss value of the loss function is less than a preset loss threshold or a preset early stopping condition is met;

[0095] The trained network state prediction model is verified using the validation set to determine whether the prediction accuracy is greater than a preset accuracy threshold. If not, the verification fails and the dataset is expanded to continue training. If so, the verification passes, and:

[0096] The verified network status prediction model is tested using the test set to determine whether the confidence is greater than a preset confidence threshold. If not, the test fails and the data set is expanded to continue training; if so, the test passes and the network status prediction model that passes the test is deployed to the edge gateway.

[0097] Through int8 quantization (TensorFlow Lite for Micro tool) and dynamic pruning (channel / neuron level) to compress the network state prediction model, reduce computing resource requirements, suitable for deployment on resource-constrained edge gateways, while maintaining prediction performance (guaranteed by loss function threshold and verification accuracy).

[0098] In step S3, the message ring queue is provided with a plurality of queue slots for storing monitoring data, each of which corresponds to a hash value of a device unique identification code of a monitoring sensor, and is stored in a rolling manner based on the stored collection time; that is, the message ring queue is a virtual HASH ring;

[0099] The edge knowledge graph is constructed based on entities, relationships and attributes; the entity is the edge gateway; the relationship is the positional relationship and connection relationship between the edge gateway and the monitoring sensor; the attribute is the risk event; the edge knowledge graph is used to determine the transmission priority of the monitoring data.

[0100] By monitoring the hash value of the sensor's unique device identification code, the queue slot of the message ring queue is mapped to store the monitoring data, avoiding the overflow problem of the traditional queue and improving the storage efficiency of the monitoring data; through the rolling storage mechanism combined with the dynamic update of the collection time, the real-time monitoring data and efficient use of storage space are ensured.

[0101] By constructing an edge knowledge graph containing entity relationships (edge ​​gateway-monitoring sensor location / connection) and risk event attributes, and combining graph neural network (GNN) encoding to generate an embedding vector that identifies transmission priority, dynamic hierarchical transmission of monitoring data can be achieved. Compared with fixed priority rules, it is more adaptable to the complex and changing edge network environment.

[0102] The step S4 is specifically as follows:

[0103] The edge gateway collects monitoring data with the collection time through the monitoring sensor based on the preset collection cycle, calculates the hash value of the device unique identification code of the monitoring sensor, and stores the collected monitoring data based on the hash value mapping to the corresponding queue slot of the message ring queue;

[0104] The step S5 is specifically as follows:

[0105] The edge gateway collects real-time network monitoring data, pre-processes it through the streaming computing engine, and then inputs it into the deployed network status prediction model to obtain the network status prediction results. In specific implementation, the edge gateway also combines memory reuse technology;

[0106] By setting up a data set covering multi-dimensional indicators such as packet loss rate, latency, and bandwidth, and through hyperparameter optimization (learning rate, batch size, etc.) and double verification of validation / test sets, the generalization ability of the network status prediction model is ensured; after deployment, the network status prediction model is dynamically updated in combination with real-time network monitoring data to form a self-optimizing closed-loop system.

[0107] The edge gateway uses the Q-Learning algorithm to match a corresponding batch processing strategy based on the network status prediction result; the batch processing strategy includes at least a processing window length, an aggregation algorithm, a sampling frequency, a number of retransmissions, and a compression algorithm. The aggregation algorithm includes at least a mean, a maximum, a minimum, a wave coefficient, and a variance.

[0108] Based on the network status prediction results (good / medium / congested), reinforcement learning (Q-Learning) is used to dynamically adjust batch processing strategies (such as window length, aggregation algorithm, compression algorithm, etc.) to achieve a balance between transmission efficiency and resource utilization. For example, when the network is congested, the sampling frequency is reduced or a high compression algorithm is enabled to improve system robustness.

[0109] The step S6 is specifically as follows:

[0110] The edge gateway extracts an adjacency matrix and a feature matrix from the edge knowledge graph, encodes the adjacency matrix and the feature matrix through a graph neural network to obtain an embedding vector, and sets a transmission priority of the monitoring data collected by each monitoring sensor based on the embedding vector;

[0111] The edge gateway reads the corresponding monitoring data from the message ring queue based on the transmission priority, and pre-processes the monitoring data based on the matching batch processing strategy;

[0112] The edge gateway calculates the MAC value of the pre-processed monitoring data using the Poly1305 algorithm, encrypts the pre-processed monitoring data using the session key to obtain ciphertext data, and encapsulates the encrypted monitoring data in the format of file header + ciphertext data + MAC value + communication unique code. The encrypted monitoring data is uploaded to the server in real time via the TLS protocol, and the corresponding monitoring data in the message ring queue is deleted; the communication unique code is used to prevent replay attacks;

[0113] By setting up encryption, monitoring data is standardized and encapsulated according to file header + ciphertext + MAC + communication unique code, and transmitted through the TLS protocol, it has strong compatibility and is easy to parse on the server side, reducing the complexity of system integration.

[0114] The session key is generated by negotiation between the edge grid and the server, and when the network status prediction result is that the network is good, a renegotiation operation is triggered to update the session key;

[0115] The negotiation process of the session key is specifically as follows: the server creates a pair of service public key and server private key based on the ECC algorithm, and transmits the service public key to the edge gateway; the edge gateway creates a pair of gateway public key and gateway private key based on the ECC algorithm, and transmits the gateway public key to the server; the server negotiates the server private key and the gateway public key through the ECDH algorithm to obtain a first negotiation key, uses a key derivation function to derive the first negotiation key, and obtains a session key for ChaCha20 encryption; the edge gateway negotiates the gateway private key and the service public key through the ECDH algorithm to obtain a second negotiation key, uses a key derivation function to derive the second negotiation key, and obtains a session key for ChaCha20 encryption.

[0116] By adopting the Poly1305+ChaCha20 combination (low computational overhead) and dynamic session key negotiation (based on ECC / ECDH), data confidentiality and integrity are guaranteed; when the network is good, session key updates are actively triggered to avoid the risk of leakage caused by long-term use of session keys, taking into account both security and edge device performance limitations.

[0117] A preferred embodiment of the edge gateway monitoring data transmission system combined with a neural network of the present invention includes the following modules:

[0118] A network state prediction model creation module is used to create a network state prediction model based on the sequentially connected time series feature extraction layer, the dual-channel fusion layer, and the prediction output layer, and set the loss function of the network state prediction model;

[0119] The time series feature extraction layer is constructed based on the Tiny-TCN channel and the Tiny-Attention channel; the Tiny-TCN channel is used to capture multi-scale local time series features and global dependency features from the input monitoring data through the dilated convolution kernel; the Tiny-Attention channel is used to weightedly splice the local time series features and global dependency features through the sliding window mechanism to obtain comprehensive time series features; the prediction output layer is used to map the comprehensive time series features to obtain network status prediction results of good network, medium network or congested network;

[0120] By adopting a dual-channel structure of Tiny-TCN (lightweight temporal convolutional network) and Tiny-Attention (lightweight attention mechanism), Tiny-TCN captures local temporal features and global dependency features, and Tiny-Attention performs weighted concatenation of local temporal features and global dependency features to obtain comprehensive temporal features. Compared with a single model (such as pure CNN or RNN), it effectively improves the feature extraction capability while simplifying the model size, thereby significantly improving the accuracy of network state prediction, and effectively balancing prediction accuracy, model size and operating efficiency.

[0121] The network state prediction model combines the Conv+BatchNorm+ReLU operations into a fused operator (Fused Op) to reduce the number of intermediate cache reads and writes. It also introduces a shared convolution kernel strategy, where multiple layers share some convolution kernel weights to reduce redundant memory loading.

[0122] The formula of the loss function is: L=α·L_pred+β·L_fusion+γ·L_temporal;

[0123] Among them, L represents the loss value of the loss function; α, β, and γ represent weight coefficients, α+β+γ=1; L_pred represents the prediction error term; L_fusion represents the dual-channel fusion regularization term; L_temporal represents the temporal feature constraint term;

[0124] A network status prediction model deployment module is used to obtain a large amount of historical network monitoring data, pre-process each of the historical network monitoring data to construct a data set, train, verify and test the network status prediction model using the data set and loss function, compress the network status prediction model during training, and deploy the network status prediction model that passes the test to the edge gateway;

[0125] A queue graph creation module is used for the edge gateway to create a message ring queue and an edge knowledge graph; the edge knowledge graph is dynamically updated based on the latest data;

[0126] A monitoring data collection and storage module is used for the edge gateway to collect monitoring data with collection time through monitoring sensors, and to roll-store the monitoring data into a message ring queue based on the unique device identification code of the monitoring sensor; the monitoring sensors include at least temperature sensors, humidity sensors, vibration sensors, and pressure sensors, and are deployed at monitoring locations of existing buildings and infrastructure;

[0127] A network status prediction module is used for edge gateways to collect real-time network monitoring data, input the real-time network monitoring data into the deployed network status prediction model, obtain network status prediction results, and match corresponding batch processing strategies based on the network status prediction results;

[0128] The monitoring data encryption transmission module is used for the edge gateway to pre-process the monitoring data stored in the message ring queue in sequence based on the batch processing strategy and the edge knowledge graph, encrypt the pre-processed monitoring data into encrypted monitoring data, and then upload it to the server.

[0129] By constructing a lightweight dual-channel neural network model (a fusion of Tiny-TCN and Tiny-Attention), the precise extraction of multi-scale time series features and the dynamic prediction of network status are achieved. Combined with the dynamic priority scheduling of the edge knowledge graph, the Q-Learning-driven adaptive batch processing strategy and the lightweight end-to-end encryption mechanism (Poly1305+ChaCha20), data cleaning, compression and encrypted transmission are efficiently completed at the edge, significantly improving the network status prediction accuracy, resource utilization and transmission security. At the same time, through the rolling storage and streaming processing engine of the message ring queue, low-latency response (millisecond-level processing) and system robustness in high-real-time scenarios such as the Industrial Internet of Things are guaranteed, forming a full-process closed loop of "model prediction-dynamic optimization-secure transmission", which combines technological innovation and engineering practicality.

[0130] The network status prediction model deployment module is specifically used to:

[0131] Acquiring a large amount of historical network monitoring data including at least packet loss rate, network latency, bandwidth utilization, network topology, device performance indicators, and alarm information, performing preprocessing on each of the historical network monitoring data including at least missing value filling, outlier removal, noise reduction, and normalization, and annotating each of the preprocessed historical network monitoring data with a network status to construct a data set; the network status is selected as good network, medium network, or congested network;

[0132] Through preprocessing of historical network monitoring data, including missing value filling (such as interpolation), outlier removal (based on statistical thresholds or isolation forest algorithm), noise reduction (wavelet transform or sliding average) and normalization, data quality is effectively improved. Combined with dynamic labeling of network status labels (good / medium / congested), it ensures that training data is highly consistent with real-world scenarios, reducing the risk of model overfitting.

[0133] Based on the time series, the dataset is divided into a training set, a validation set, and a test set in a ratio of 8:1:1. The network state prediction model is trained using the training set. During the training process, the float32 weights of the network state prediction model are quantized to int8 using the TensorFlow Lite for Micro tool. The channels and neurons of the network state prediction model are pruned using a dynamic pruning method, and hyperparameters including at least the learning rate, batch size, and random dropout rate are continuously optimized until the loss value of the loss function is less than a preset loss threshold or a preset early stopping condition is met;

[0134] The trained network state prediction model is verified using the validation set to determine whether the prediction accuracy is greater than a preset accuracy threshold. If not, the verification fails and the dataset is expanded to continue training. If so, the verification passes, and:

[0135] The verified network status prediction model is tested using the test set to determine whether the confidence is greater than a preset confidence threshold. If not, the test fails and the data set is expanded to continue training; if so, the test passes and the network status prediction model that passes the test is deployed to the edge gateway.

[0136] Through int8 quantization (TensorFlow Lite for Micro tool) and dynamic pruning (channel / neuron level) to compress the network state prediction model, reduce computing resource requirements, suitable for deployment on resource-constrained edge gateways, while maintaining prediction performance (guaranteed by loss function threshold and verification accuracy).

[0137] In the queue map creation module, the message ring queue is provided with a plurality of queue slots for storing monitoring data, each of which corresponds to a hash value of a device unique identification code of a monitoring sensor, and is stored in a rolling manner based on the stored collection time; that is, the message ring queue is a virtual HASH ring;

[0138] The edge knowledge graph is constructed based on entities, relationships and attributes; the entity is the edge gateway; the relationship is the positional relationship and connection relationship between the edge gateway and the monitoring sensor; the attribute is the risk event; the edge knowledge graph is used to determine the transmission priority of the monitoring data.

[0139] By monitoring the hash value of the sensor's unique device identification code, the queue slot of the message ring queue is mapped to store the monitoring data, avoiding the overflow problem of the traditional queue and improving the storage efficiency of the monitoring data; through the rolling storage mechanism combined with the dynamic update of the collection time, the real-time monitoring data and efficient use of storage space are ensured.

[0140] By constructing an edge knowledge graph containing entity relationships (edge ​​gateway-monitoring sensor location / connection) and risk event attributes, and combining graph neural network (GNN) encoding to generate an embedding vector that identifies transmission priority, dynamic hierarchical transmission of monitoring data can be achieved. Compared with fixed priority rules, it is more adaptable to the complex and changing edge network environment.

[0141] The monitoring data acquisition and storage module is specifically used for:

[0142] The edge gateway collects monitoring data with the collection time through the monitoring sensor based on the preset collection cycle, calculates the hash value of the device unique identification code of the monitoring sensor, and stores the collected monitoring data based on the hash value mapping to the corresponding queue slot of the message ring queue;

[0143] The network status prediction module is specifically used for:

[0144] The edge gateway collects real-time network monitoring data, pre-processes it through the streaming computing engine, and then inputs it into the deployed network status prediction model to obtain the network status prediction results. In specific implementation, the edge gateway also combines memory reuse technology;

[0145] By setting up a data set covering multi-dimensional indicators such as packet loss rate, latency, and bandwidth, and through hyperparameter optimization (learning rate, batch size, etc.) and double verification of validation / test sets, the generalization ability of the network status prediction model is ensured; after deployment, the network status prediction model is dynamically updated in combination with real-time network monitoring data to form a self-optimizing closed-loop system.

[0146] The edge gateway uses the Q-Learning algorithm to match a corresponding batch processing strategy based on the network status prediction result; the batch processing strategy includes at least a processing window length, an aggregation algorithm, a sampling frequency, a number of retransmissions, and a compression algorithm. The aggregation algorithm includes at least a mean, a maximum, a minimum, a wave coefficient, and a variance.

[0147] Based on the network status prediction results (good / medium / congested), reinforcement learning (Q-Learning) is used to dynamically adjust batch processing strategies (such as window length, aggregation algorithm, compression algorithm, etc.) to achieve a balance between transmission efficiency and resource utilization. For example, when the network is congested, the sampling frequency is reduced or a high compression algorithm is enabled to improve system robustness.

[0148] The monitoring data encryption transmission module is specifically used for:

[0149] The edge gateway extracts an adjacency matrix and a feature matrix from the edge knowledge graph, encodes the adjacency matrix and the feature matrix through a graph neural network to obtain an embedding vector, and sets a transmission priority of the monitoring data collected by each monitoring sensor based on the embedding vector;

[0150] The edge gateway reads the corresponding monitoring data from the message ring queue based on the transmission priority, and pre-processes the monitoring data based on the matching batch processing strategy;

[0151] The edge gateway calculates the MAC value of the pre-processed monitoring data using the Poly1305 algorithm, encrypts the pre-processed monitoring data using the session key to obtain ciphertext data, and encapsulates the encrypted monitoring data in the format of file header + ciphertext data + MAC value + communication unique code. The encrypted monitoring data is uploaded to the server in real time via the TLS protocol, and the corresponding monitoring data in the message ring queue is deleted; the communication unique code is used to prevent replay attacks;

[0152] By setting up encryption, monitoring data is standardized and encapsulated according to file header + ciphertext + MAC + communication unique code, and transmitted through the TLS protocol, it has strong compatibility and is easy to parse on the server side, reducing the complexity of system integration.

[0153] The session key is generated by negotiation between the edge grid and the server, and when the network status prediction result is that the network is good, a renegotiation operation is triggered to update the session key;

[0154] The negotiation process of the session key is specifically as follows: the server creates a pair of service public key and server private key based on the ECC algorithm, and transmits the service public key to the edge gateway; the edge gateway creates a pair of gateway public key and gateway private key based on the ECC algorithm, and transmits the gateway public key to the server; the server negotiates the server private key and the gateway public key through the ECDH algorithm to obtain a first negotiation key, uses a key derivation function to derive the first negotiation key, and obtains a session key for ChaCha20 encryption; the edge gateway negotiates the gateway private key and the service public key through the ECDH algorithm to obtain a second negotiation key, uses a key derivation function to derive the second negotiation key, and obtains a session key for ChaCha20 encryption.

[0155] By adopting the Poly1305+ChaCha20 combination (low computational overhead) and dynamic session key negotiation (based on ECC / ECDH), data confidentiality and integrity are guaranteed; when the network is good, session key updates are actively triggered to avoid the risk of leakage caused by long-term use of session keys, taking into account both security and edge device performance limitations.

[0156] In summary, the advantages of the present invention are:

[0157] 1. Create a network status prediction model through the sequentially connected time series feature extraction layer, dual-channel fusion layer and prediction output layer, and set the loss function of the network status prediction model; the time series feature extraction layer is constructed based on the Tiny-TCN channel and the Tiny-Attention channel; the Tiny-TCN channel is used to capture multi-scale local time series features and global dependency features from the input monitoring data through the expansion convolution kernel; the Tiny-Attention channel is used to weightedly splice the local time series features and global dependency features through the sliding window mechanism to obtain the comprehensive time series features; the prediction output layer is used to map the comprehensive time series features to obtain the network status prediction results of good network, medium network or congested network; then obtain a large amount of historical network monitoring data, pre-process each historical network monitoring data and construct a data set, train, verify and test the network status prediction model through the data set and loss function, compress the network status prediction model during the training process, and deploy the network status prediction model that passes the test to the edge gateway; then the edge gateway creates a message ring queue, edge knowledge The edge knowledge graph collects monitoring data with the collection time through monitoring sensors, and rolls the monitoring data into a message ring queue based on the device's unique identification code. The real-time network monitoring data collected in real time is input into the deployed network status prediction model to obtain network status prediction results. The corresponding batch processing strategy is matched based on the network status prediction results. Based on the batch processing strategy and the edge knowledge graph, the monitoring data stored in the message ring queue is preprocessed in sequence. The preprocessed monitoring data is encrypted into encrypted monitoring data and uploaded to the server. In other words, the monitoring data is selected for preprocessing and transmission in sequence through the message ring queue and the edge knowledge graph, reducing the processing pressure caused by the synchronous processing of various monitoring data by the edge grid. The network status prediction results predicted by the pre-trained network status prediction model are used to dynamically adjust the batch processing strategy of the monitoring data (for example, reducing the sampling rate and adopting a high compression ratio compression algorithm to reduce the data transmission volume) to better cope with network congestion. The transmitted monitoring data is encrypted to prevent the monitoring data from being stolen and tampered with in plain text, ultimately greatly improving the efficiency, reliability and security of monitoring data transmission.

[0158] 2. By adopting a dual-channel structure of Tiny-TCN (lightweight temporal convolutional network) and Tiny-Attention (lightweight attention mechanism), Tiny-TCN captures local temporal features and global dependency features, and Tiny-Attention performs weighted concatenation of local temporal features and global dependency features to obtain comprehensive temporal features. Compared with a single model (such as a pure CNN or RNN), this effectively improves feature extraction capabilities while simplifying the model size, thereby significantly improving the accuracy of network state prediction, effectively balancing prediction accuracy, model size, and operational efficiency.

[0159] 3. Compress the network state prediction model through int8 quantization (TensorFlow Lite for Micro tool) and dynamic pruning (channel / neuron level), reducing computing resource requirements, making it suitable for deployment on resource-constrained edge gateways while maintaining prediction performance (guaranteed by loss function threshold and verification accuracy).

[0160] 4. By monitoring the hash value of the sensor's unique device identification code, the queue slot of the message ring queue is mapped to store monitoring data, avoiding the overflow problem of traditional queues and improving the storage efficiency of monitoring data; through the rolling storage mechanism combined with dynamic updates of the collection time, the real-time monitoring data and efficient use of storage space are ensured.

[0161] 5. By constructing an edge knowledge graph that includes entity relationships (edge ​​gateway-monitoring sensor location / connection) and risk event attributes, and combining graph neural network (GNN) encoding to generate an embedding vector that identifies the transmission priority, dynamic hierarchical transmission of monitoring data is achieved. Compared with fixed priority rules, it is more adaptable to the complex and changing edge network environment.

[0162] 6. Based on the network status prediction results (good / medium / congested), the batch processing strategy (such as window length, aggregation algorithm, compression algorithm, etc.) is dynamically adjusted through reinforcement learning (Q-Learning) to achieve a balance between transmission efficiency and resource utilization. For example, when the network is congested, the sampling frequency is reduced or a high compression algorithm is enabled to improve system robustness.

[0163] 7. By adopting the Poly1305+ChaCha20 combination (low computational overhead) and dynamic session key negotiation (based on ECC / ECDH), data confidentiality and integrity are guaranteed; when the network is good, session key updates are actively triggered to avoid the risk of leakage caused by long-term use of session keys, taking into account both security and edge device performance limitations.

[0164] 8. By setting up a data set covering multi-dimensional indicators such as packet loss rate, latency, and bandwidth, and through hyperparameter optimization (learning rate, batch size, etc.) and double verification of validation / test sets, the generalization ability of the network status prediction model is ensured; after deployment, the network status prediction model is dynamically updated in combination with real-time network monitoring data to form a self-optimizing closed-loop system.

[0165] 9. By setting encryption, the monitoring data is standardized and encapsulated according to the file header + ciphertext + MAC + communication unique code, and transmitted through the TLS protocol, it has strong compatibility and is easy to parse on the server side, reducing the complexity of system integration.

[0166] 10. Preprocessing of historical network monitoring data, including missing value filling (such as interpolation), outlier removal (based on statistical thresholds or isolation forest algorithm), noise reduction (wavelet transform or sliding average) and normalization, effectively improves data quality. Combined with dynamic labeling of network status labels (good / medium / congested), it ensures that training data is highly consistent with real-world scenarios, reducing the risk of model overfitting.

[0167] 11. By building a lightweight dual-channel neural network model (a fusion of Tiny-TCN and Tiny-Attention), it achieves accurate extraction of multi-scale temporal features and dynamic prediction of network status. Combined with the dynamic priority scheduling of the edge knowledge graph, the Q-Learning-driven adaptive batch processing strategy, and a lightweight end-to-end encryption mechanism (Poly1305+ChaCha20), it efficiently completes data cleaning, compression, and encrypted transmission at the edge, significantly improving network status prediction accuracy, resource utilization, and transmission security. At the same time, through the rolling storage and streaming processing engine of the message ring queue, it ensures low-latency response (millisecond-level processing) and system robustness in high-real-time scenarios such as the Industrial Internet of Things, forming a full-process closed loop of "model prediction-dynamic optimization-secure transmission", which combines technological innovation and engineering practicality.

[0168] Although the specific embodiments of the present invention are described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A method for monitoring data transmission via an edge gateway in combination with a neural network, characterized in that: The steps include: Step S1: creating a network state prediction model based on the sequentially connected time series feature extraction layer, the dual-channel fusion layer, and the prediction output layer, and setting a loss function of the network state prediction model; The temporal feature extraction layer is constructed based on the Tiny-TCN channel and the Tiny-Attention channel; the Tiny-TCN channel is used to capture multi-scale local temporal features and global dependency features from the input monitoring data through the dilated convolution kernel; The Tiny-Attention channel is used to perform weighted concatenation of local time series features and global dependency features through a sliding window mechanism to obtain comprehensive time series features; the prediction output layer is used to map the comprehensive time series features to obtain network status prediction results of good network, medium network, or congested network; Step S2: Acquire a large amount of historical network monitoring data, pre-process each of the historical network monitoring data to construct a data set, train, verify, and test the network status prediction model using the data set and the loss function, compress the network status prediction model during the training process, and deploy the network status prediction model that passes the test to the edge gateway; Step S3: The edge gateway creates a message ring queue and an edge knowledge graph; Step S4: The edge gateway collects monitoring data with the collection time through the monitoring sensor, and stores the monitoring data in a rolling manner into a message ring queue based on the device unique identification code of the monitoring sensor; Step S5: The edge gateway collects real-time network monitoring data, inputs the real-time network monitoring data into the deployed network status prediction model to obtain a network status prediction result, and matches a corresponding batch processing strategy based on the network status prediction result; Step S6: The edge gateway pre-processes the monitoring data stored in the message ring queue in sequence based on the batch processing strategy and the edge knowledge graph, encrypts the pre-processed monitoring data into encrypted monitoring data, and then uploads it to the server.

2. The method for edge gateway monitoring data transmission combined with a neural network according to claim 1, characterized in that: The step S2 is specifically as follows: Acquire a large amount of historical network monitoring data including at least packet loss rate, network delay, bandwidth utilization, network topology, device performance indicators, and alarm information, perform preprocessing on each of the historical network monitoring data including at least missing value filling, outlier removal, noise reduction, and normalization, and annotate the network status of each of the preprocessed historical network monitoring data to construct a data set; Based on the time series, the dataset is divided into a training set, a validation set, and a test set in a ratio of 8:1:

1. The network state prediction model is trained using the training set. During the training process, the float32 weights of the network state prediction model are quantized to int8 using the TensorFlow Lite for Micro tool. The channels and neurons of the network state prediction model are pruned using a dynamic pruning method, and hyperparameters including at least the learning rate, batch size, and random dropout rate are continuously optimized until the loss value of the loss function is less than a preset loss threshold or a preset early stopping condition is met; The trained network state prediction model is verified using the validation set to determine whether the prediction accuracy is greater than a preset accuracy threshold. If not, the verification fails and the dataset is expanded to continue training. If so, the verification passes, and: The verified network status prediction model is tested using the test set to determine whether the confidence is greater than a preset confidence threshold. If not, the test fails and the data set is expanded to continue training; if so, the test passes and the network status prediction model that passes the test is deployed to the edge gateway.

3. The method for edge gateway monitoring data transmission combined with a neural network as claimed in claim 1, characterized in that: In step S3, the message ring queue is provided with a plurality of queue slots for storing monitoring data, each of the queue slots corresponds to a hash value of a device unique identification code of a monitoring sensor, and is rolled over based on the stored collection time; The edge knowledge graph is constructed based on entities, relationships and attributes; the entity is the edge gateway; the relationship is the position relationship and connection relationship between the edge gateway and the monitoring sensor; the attribute is the risk event; The edge knowledge graph is used to determine the transmission priority of monitoring data.

4. The method for edge gateway monitoring data transmission combined with a neural network as claimed in claim 1, characterized in that: The step S4 is specifically as follows: The edge gateway collects monitoring data with the collection time through the monitoring sensor based on the preset collection cycle, calculates the hash value of the device unique identification code of the monitoring sensor, and stores the collected monitoring data based on the hash value mapping to the corresponding queue slot of the message ring queue; The step S5 is specifically as follows: The edge gateway collects real-time network monitoring data, pre-processes the real-time network monitoring data through the streaming computing engine, and then inputs the data into the deployed network status prediction model to obtain the network status prediction result; The edge gateway matches the corresponding batch processing strategy based on the network status prediction result through the Q-Learning algorithm; the batch processing strategy includes at least a processing window length, an aggregation algorithm, a sampling frequency, a number of retransmissions, and a compression algorithm.

5. The method for edge gateway monitoring data transmission combined with a neural network as claimed in claim 1, characterized in that: The step S6 is specifically as follows: The edge gateway extracts an adjacency matrix and a feature matrix from the edge knowledge graph, encodes the adjacency matrix and the feature matrix through a graph neural network to obtain an embedding vector, and sets a transmission priority of the monitoring data collected by each monitoring sensor based on the embedding vector; The edge gateway reads the corresponding monitoring data from the message ring queue based on the transmission priority, and pre-processes the monitoring data based on the matching batch processing strategy; The edge gateway calculates the MAC value of the pre-processed monitoring data using the Poly1305 algorithm, encrypts the pre-processed monitoring data using the session key to obtain ciphertext data, and encapsulates the encrypted monitoring data in the format of file header + ciphertext data + MAC value + communication unique code, and uploads the encrypted monitoring data to the server in real time through the TLS protocol; The session key is generated by negotiation between the edge grid and the server, and when the network status prediction result is that the network is good, a renegotiation operation is triggered to update the session key; The negotiation process of the session key is specifically as follows: the server creates a pair of service public key and server private key based on the ECC algorithm, and transmits the service public key to the edge gateway; the edge gateway creates a pair of gateway public key and gateway private key based on the ECC algorithm, and transmits the gateway public key to the server; the server negotiates the server private key and the gateway public key through the ECDH algorithm to obtain a first negotiation key, uses a key derivation function to derive the first negotiation key, and obtains a session key for ChaCha20 encryption; the edge gateway negotiates the gateway private key and the service public key through the ECDH algorithm to obtain a second negotiation key, uses a key derivation function to derive the second negotiation key, and obtains a session key for ChaCha20 encryption.

6. An edge gateway monitoring data transmission system combined with a neural network, characterized by: Includes the following modules: A network state prediction model creation module is used to create a network state prediction model based on the sequentially connected time series feature extraction layer, the dual-channel fusion layer, and the prediction output layer, and set the loss function of the network state prediction model; The temporal feature extraction layer is constructed based on the Tiny-TCN channel and the Tiny-Attention channel; the Tiny-TCN channel is used to capture multi-scale local temporal features and global dependency features from the input monitoring data through the dilated convolution kernel; The Tiny-Attention channel is used to perform weighted concatenation of local time series features and global dependency features through a sliding window mechanism to obtain comprehensive time series features; the prediction output layer is used to map the comprehensive time series features to obtain network status prediction results of good network, medium network, or congested network; A network status prediction model deployment module is used to obtain a large amount of historical network monitoring data, pre-process each of the historical network monitoring data to construct a data set, train, verify and test the network status prediction model using the data set and loss function, compress the network status prediction model during training, and deploy the network status prediction model that passes the test to the edge gateway; The queue graph creation module is used for the edge gateway to create a message ring queue and an edge knowledge graph; A monitoring data collection and storage module is used for the edge gateway to collect monitoring data with collection time through monitoring sensors, and to roll and store the monitoring data into a message ring queue based on the device unique identification code of the monitoring sensor; A network status prediction module is used for edge gateways to collect real-time network monitoring data, input the real-time network monitoring data into the deployed network status prediction model, obtain network status prediction results, and match corresponding batch processing strategies based on the network status prediction results; The monitoring data encryption transmission module is used for the edge gateway to pre-process the monitoring data stored in the message ring queue in sequence based on the batch processing strategy and the edge knowledge graph, encrypt the pre-processed monitoring data into encrypted monitoring data, and then upload it to the server.

7. The edge gateway monitoring data transmission system combined with a neural network as claimed in claim 6, characterized in that: The network status prediction model deployment module is specifically used to: Acquire a large amount of historical network monitoring data including at least packet loss rate, network delay, bandwidth utilization, network topology, device performance indicators, and alarm information, perform preprocessing on each of the historical network monitoring data including at least missing value filling, outlier removal, noise reduction, and normalization, and annotate the network status of each of the preprocessed historical network monitoring data to construct a data set; Based on the time series, the dataset is divided into a training set, a validation set, and a test set in a ratio of 8:1:

1. The network state prediction model is trained using the training set. During the training process, the float32 weights of the network state prediction model are quantized to int8 using the TensorFlow Lite for Micro tool. The channels and neurons of the network state prediction model are pruned using a dynamic pruning method, and hyperparameters including at least the learning rate, batch size, and random dropout rate are continuously optimized until the loss value of the loss function is less than a preset loss threshold or a preset early stopping condition is met; The trained network state prediction model is verified using the validation set to determine whether the prediction accuracy is greater than a preset accuracy threshold. If not, the verification fails and the dataset is expanded to continue training. If so, the verification passes, and: The verified network status prediction model is tested using the test set to determine whether the confidence is greater than a preset confidence threshold. If not, the test fails and the data set is expanded to continue training; if so, the test passes and the network status prediction model that passes the test is deployed to the edge gateway.

8. The edge gateway monitoring data transmission system combined with a neural network according to claim 6, characterized in that: In the queue map creation module, the message ring queue is provided with a plurality of queue slots for storing monitoring data, each of the queue slots corresponds to a hash value of a device unique identification code of a monitoring sensor, and is rolled over based on the stored collection time; The edge knowledge graph is constructed based on entities, relationships and attributes; the entity is the edge gateway; the relationship is the position relationship and connection relationship between the edge gateway and the monitoring sensor; the attribute is the risk event; The edge knowledge graph is used to determine the transmission priority of monitoring data.

9. The edge gateway monitoring data transmission system combined with a neural network according to claim 6, characterized in that: The monitoring data acquisition and storage module is specifically used for: The edge gateway collects monitoring data with the collection time through the monitoring sensor based on the preset collection cycle, calculates the hash value of the device unique identification code of the monitoring sensor, and stores the collected monitoring data based on the hash value mapping to the corresponding queue slot of the message ring queue; The network status prediction module is specifically used for: The edge gateway collects real-time network monitoring data, pre-processes the real-time network monitoring data through the streaming computing engine, and then inputs the data into the deployed network status prediction model to obtain the network status prediction result; The edge gateway matches the corresponding batch processing strategy based on the network status prediction result through the Q-Learning algorithm; the batch processing strategy includes at least a processing window length, an aggregation algorithm, a sampling frequency, a number of retransmissions, and a compression algorithm.

10. The edge gateway monitoring data transmission system combined with a neural network according to claim 6, characterized in that: The monitoring data encryption transmission module is specifically used for: The edge gateway extracts an adjacency matrix and a feature matrix from the edge knowledge graph, encodes the adjacency matrix and the feature matrix through a graph neural network to obtain an embedding vector, and sets a transmission priority of the monitoring data collected by each monitoring sensor based on the embedding vector; The edge gateway reads the corresponding monitoring data from the message ring queue based on the transmission priority, and pre-processes the monitoring data based on the matching batch processing strategy; The edge gateway calculates the MAC value of the pre-processed monitoring data using the Poly1305 algorithm, encrypts the pre-processed monitoring data using the session key to obtain ciphertext data, and encapsulates the encrypted monitoring data in the format of file header + ciphertext data + MAC value + communication unique code, and uploads the encrypted monitoring data to the server in real time through the TLS protocol; The session key is generated by negotiation between the edge grid and the server, and when the network status prediction result is that the network is good, a renegotiation operation is triggered to update the session key; The negotiation process of the session key is specifically as follows: the server creates a pair of service public key and server private key based on the ECC algorithm, and transmits the service public key to the edge gateway; the edge gateway creates a pair of gateway public key and gateway private key based on the ECC algorithm, and transmits the gateway public key to the server; the server negotiates the server private key and the gateway public key through the ECDH algorithm to obtain a first negotiation key, uses a key derivation function to derive the first negotiation key, and obtains a session key for ChaCha20 encryption; the edge gateway negotiates the gateway private key and the service public key through the ECDH algorithm to obtain a second negotiation key, uses a key derivation function to derive the second negotiation key, and obtains a session key for ChaCha20 encryption.

Citation Information

Patent Citations

  • Task scheduling method and device based on buffer queue and hash ring

    CN112231079A

  • Network traffic prediction method based on time-space diagram attention mechanism

    CN116170351A