Intelligent control method for data one-way transmission system based on LSTM predictive analysis
By using LSTM neural network to predict packet transmission delay time and dynamically adjust transmission parameters in a one-way data transmission system, the deficiencies in the balance between transmission rate and success rate of the existing system are solved, and more efficient and reliable data transmission is achieved.
Patent Information
- Application Number
- CN202411903030.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The existing one-way data transmission system cannot effectively balance the data transmission rate and success rate, and relies on manual intervention and high redundancy transmission, resulting in inefficiency and large system overhead.
Adopt a neural network architecture based on LSTM, through collecting and pre -processing time sequence data, training LSTM models to predict the transmission delay time of the data packet, and dynamically adjust the transmission parameter according to the prediction results to achieve the adaptive prediction and auxiliary adjustment of the parameters of the data transmission system Essence
Significantly improves the success rate of data transmission, reduces manual intervention and system overhead, enhances the robustness of the system, and finds the best balance between transmission rate and success rate.
Smart Images

Figure CN119363676A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data communication transmission, and in particular relates to an intelligent control method for a one-way data transmission system based on LSTM prediction analysis. Background Art
[0002] One-way data transmission (also known as data diode technology) is an important data security technology. Its essence is to use hardware to ensure that data can only be transmitted from a low-security level network to a high-security level network, and sensitive data will not be leaked due to reverse transmission. This transmission method is usually used in scenarios with high security requirements (such as military, government agencies, financial institutions, etc.) to protect sensitive data from unauthorized access and leakage.
[0003] A one-way data transmission system cannot form a retransmission mechanism, so the flow of the transmission process is controlled by the sender. In a computer and network channel with specific performance, the data packet size and sending delay of the sender determine the data transmission rate and success rate. The size of the network data packet or sending delay is proportional to the transmission efficiency and inversely proportional to the transmission success rate, that is: larger data packets or shorter sending delays can improve transmission efficiency, but may increase the risk of data loss and reduce the data transmission success rate; smaller data packets or longer sending delays are more suitable for unstable network environments, which helps to improve the data transmission success rate, but limits the data transmission rate. Appropriate data packets and sending delays can prevent network congestion and buffer overflow. The transmission rate needs to be adjusted according to network performance and the processing power of the receiving end.
[0004] Traditional control strategies include manual control, delayed redundant transmission and dual-machine redundant feedback. Among them: (1) Manual control: if the receiving end cannot parse the data successfully or some of the data does not match during the transmission process, it means that the transmission is wrong and the receiving end needs to manually report the error. The staff will then notify the sender to resend the message through other means. Although the reliability of the transmission is guaranteed, it consumes a lot of manpower and material resources and has low efficiency. (2) Delayed redundant transmission, that is, the sender increases the redundancy of the data packet and transmits the data according to a certain delay period and repetition number. This method improves the fault tolerance of one-way data transmission, but the high redundancy leads to lower efficiency, especially when the data scale is large, which has a greater impact on the business; (3) Dual-machine redundant feedback, that is, building two sets of one-way transmission systems with the same configuration, and implementing a feedback mechanism by comparing the sending and receiving conditions of the two systems. This can alleviate the above problems to a certain extent, but it increases the hardware cost. Summary of the invention
[0005] In view of this, the present invention aims to provide an intelligent control method for a one-way data transmission system based on LSTM predictive analysis. By constructing a neural network architecture based on LSTM (Long Short-Term Memory network), the method can realize adaptive parameter prediction and auxiliary adjustment of the one-way data transmission system, thereby finding the best balance between the data transmission rate and the data transmission success rate, improving the transmission success rate while reducing manual intervention, reducing system overhead, and enhancing system robustness.
[0006] To achieve the above object, the technical solution created by the present invention is implemented as follows: An intelligent control method for a one-way data transmission system based on LSTM prediction analysis comprises the following steps: S1: Collect time series data that affect data transmission rate and data transmission success rate, and preprocess the time series data to obtain a training set; S2: Build a neural network architecture based on LSTM, input the training set obtained in step S1 into the neural network architecture, train the neural network architecture, and obtain a network model; S3: Input the time series data to be tested into the network model obtained in step S2 for prediction, and adjust the neural network architecture according to the prediction results; repeat step S2 to train the adjusted neural network architecture until the training is completed and the optimal model is obtained; S4: deploying the optimal model obtained in step S3 to an actual one-way data transmission system. The one-way transmission system predicts the transmission delay time of the data packet according to the optimal model, and adjusts and sends the data packet according to the predicted transmission delay time.
[0007] Furthermore, in step S1, the time series data includes network I / O performance data, hardware I / O performance data and data packet size at the sending end.
[0008] Furthermore, the preprocessing in step S1 includes the following steps: S11: Normalize time series data; S12: Arrange the normalized time series data into sequences according to time , and then create a feature sequence for: ; The corresponding average delay time of the data packet , express The average packet delay time at time, t Indicates the time, T Indicates the total time; Feature sequence Each element in Contains K features, namely: ; S13: The feature sequence Further divide according to the time step n to obtain the training feature sequence : ; ; in, m Represents the training feature sequence Neutron sequence The index of Represents the training feature sequence Neutron sequence The total number of each subsequence ; S14: Training feature sequence And the corresponding average packet delay time Construct a training set and train feature sequence subsequence in correspond Average packet delay at time .
[0009] Furthermore, in step S2, the neural network architecture includes an input layer, a hidden layer and an output layer; wherein the input of the hidden layer at the current moment includes the subsequence corresponding to the current moment , the output of the hidden layer at the previous moment and the state information of the hidden layer at the previous moment; the output of the hidden layer at the current moment includes the output of the hidden layer at the current moment and the state information of the hidden layer at the current moment; the output result of the hidden layer at the last moment passes through the fully connected layer, and then outputs the predicted average delay time of the data packet through the output layer.
[0010] Furthermore, the hidden layer includes an input gate, a forget gate, an output gate and a change gate; the input gate determines the information input into the hidden layer at the current moment, and the forget gate determines the degree to which the hidden layer at the current moment forgets the information of the hidden layer at the previous moment; the change gate determines the state information of the hidden layer at the current moment according to the information of the forget gate and the input gate; the output gate outputs the output of the hidden layer at the current moment according to the state information of the hidden layer at the current moment.
[0011] Further, in step S4, the unidirectional transmission system includes a first thread and a second thread, in which the optimal model predicts the transmission delay time of the data packet and passes the predicted transmission delay time to the first thread; the first thread packages the data, adjusts and sends the data packet according to the predicted transmission delay time.
[0012] Compared with the prior art, the invention can achieve the following beneficial effects: (1) In the intelligent control method of a one-way data transmission system based on LSTM prediction analysis, the present invention creates an accurate prediction of the LSTM model, which can dynamically adjust the transmission strategy according to network congestion, delay, etc., avoid packet loss or transmission failure, and significantly improve the success rate of data transmission, thereby ensuring the safe and reliable transmission of data; at the same time, the present invention can collect and analyze network and hardware performance data in real time, predict the success rate of data transmission, and dynamically adjust transmission parameters (such as data packet size, transmission delay, etc.) to achieve an optimal balance between transmission rate and success rate; (2) The intelligent control method for one-way data transmission system based on LSTM prediction analysis created by the present invention reduces manual intervention and improves efficiency: Traditional methods rely on manual intervention (such as manual reporting and resending of data), which is not only labor-intensive but also prone to operational delays; the present invention realizes automatic prediction and adjustment through the LSTM model, greatly reducing manual participation, improving the automation level of the system and data transmission efficiency, and is particularly suitable for scenarios that require long-term and efficient transmission; (3) The intelligent control method of the one-way data transmission system based on LSTM predictive analysis created by the present invention supports large-scale data transmission: In the process of large-scale data transmission, the traditional redundant transmission mechanism often significantly reduces the transmission efficiency; the present invention can maintain high efficiency and high reliability during large data transmission by optimizing the transmission parameters and rate, and is more suitable for the large-scale one-way data transmission needs in the fields of industry, government and finance. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings constituting part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments and descriptions of the present invention are used to explain the present invention and do not constitute an improper limitation on the present invention. In the drawings: Figure 1 A flow chart of an intelligent control method for a one-way data transmission system based on LSTM prediction analysis according to an embodiment of the present invention; Figure 2 A schematic diagram of the structure of the LSTM-based neural network architecture described in the embodiment of the present invention; Figure 3 A schematic diagram of the structure of the hidden layer described in the embodiment of the present invention; Figure 4 This is a flow chart of step S4 described in the embodiment of the present invention. DETAILED DESCRIPTION
[0014] In order to make the purpose, technical solution and advantages of the invention more clear, the invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described here are only used to explain the invention and do not constitute a limitation of the invention.
[0015] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0016] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0017] In the description of the invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the invention can be understood according to specific circumstances.
[0018] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments.
[0019] like Figure 1 and Figure 2 As shown, the intelligent control method of the one-way data transmission system based on LSTM prediction analysis described in the embodiment of the present invention includes the following steps: S1: Collect time series data that affects the data transmission rate and data transmission success rate, and preprocess the time series data to obtain a training set.
[0020] Among them, the time series data includes network I / O performance data, hardware I / O performance data and the data packet size of the sender. In the embodiment of the present invention, the network I / O performance data specifically includes network throughput, network bandwidth, propagation delay, queuing delay, processing delay, packet loss rate, network jitter, network congestion and network utilization; hardware I / O performance data includes system load, number of processes, context switching, read and write delay, I / O throughput, computing throughput, concurrent throughput and memory throughput. The specific parameters of the time series data, the corresponding description of the parameters, the corresponding acquisition method of the parameters, and the corresponding value range of the parameters are shown in Table 1: Table 1:
[0021] In a multi-performance type bidirectional interconnection system, TCP (Transmission Control Protocol) is used for data transmission to obtain various I / O performance data and the average delay time of data packets within a stable I / O performance range.
[0022] The preprocessing in step S1 includes the following steps: S11: Normalize the time series data using the following formula to meet the input requirements of subsequent processing: ; in, represents the normalized data, Represents the original data, and Represents the original data The corresponding maximum and minimum values.
[0023] For a given multivariate one-way transmission equipment performance time series data collected from different sources, the method proposed in the present invention aims to use the multivariate input feature sequence to predict the data transmission success rate under specified parameters. Therefore, the collected time series data needs to be processed as follows: S12: Arrange the normalized time series data into sequences according to time , and then create a feature sequence for: ; The corresponding average delay time of the data packet , represents the average delay time of the data packet at time t, t represents the time, and T represents the total time; Feature sequence Each element in Contains K features, namely: ; In the embodiment of the present invention, each element There are 18 features in it, that is, K=18.
[0024] S13: In order to meet the dimensions required by the neural network architecture to be constructed later, the feature sequence Further divide according to the time step n to obtain the training feature sequence : ; ; in, m Represents the training feature sequence Neutron sequence The index of each training sample Contains from time m To m+n-1 data, Represents the training feature sequence Neutron sequence The total number of each subsequence ; S14: Training feature sequence And the corresponding average packet delay time Construct a training set and train feature sequence subsequence in correspond Average packet delay at time .
[0025] S2: Build a neural network architecture based on LSTM, input the training set obtained in step S1 into the neural network architecture, train the neural network architecture, and obtain a network model.
[0026] LSTM is a popular deep learning technique in RNN (Recurrent Neural Network) for time series forecasting. For example, LSTM is not only used for classification and regression problems in stock market forecasting, but also in rainfall runoff modeling, fMRI (functional magnetic resonance imaging) data analysis, anomaly detection, mobile traffic forecasting and other fields. Although standard RNN is better than traditional networks in retaining information, it is not effective in learning long-term dependencies due to the vanishing gradient problem. LSTM uses memory cells to overcome the vanishing gradient problem and consists of an input layer, hidden layer, cell state, and output layer. The key component of the LSTM architecture is the cell state that runs through the entire chain with only linear interactions, keeping the information flow unchanged.
[0027] Specifically, the LSTM-based neural network architecture includes an input layer, a hidden layer, and an output layer; wherein the input of the hidden layer at the current moment includes the subsequence corresponding to the current moment , the output of the hidden layer at the previous moment and the state information of the hidden layer at the previous moment; the output of the hidden layer at the current moment includes the output of the hidden layer at the current moment and the state information of the hidden layer at the current moment; the output result of the hidden layer at the last moment passes through the fully connected layer, and then outputs the predicted average delay time of the data packet through the output layer.
[0028] The structure of the hidden layer is as follows Figure 3 As shown in the figure, it includes input gate, forget gate, output gate and change gate. The gating mechanism of LSTM is used to delete or modify the unit state information, which is a method of selectively transmitting information. Among them: The functions of the input gate include controlling the flow of information, identifying updated information, and combining the output of the change gate. The main task of the input gate in LSTM is to selectively control the update of information to ensure that the network can effectively learn and remember long-term and short-term dependencies. By identifying which information needs to be updated, the input gate helps the model perform well in time series tasks. The implementation of the input gate is as follows: ; represents the output of the input gate at time t, represents the weight matrix of the input gate, represents the bias matrix of the input gate, Represents the output of the hidden layer at the previous moment when the input gate acts on it The weight matrix on Represents the sigmoid activation operation; The forget gate determines the degree to which the current hidden layer forgets the information of the previous hidden layer, that is, the subsequence from the input and the output of the hidden layer at the previous moment Get information from it, and generate an output between 0 and 1 through the sigmoid activation function, and then determine the state information of the hidden layer from the previous moment What information should be discarded in the process: When the output value of the forget gate is 1, all information is stored in the hidden layer at the current moment, and when the output value of the forget gate is 0, all information from the hidden layer at the previous moment is forgotten. The process can be expressed as: ; represents the output of the forget gate at time t, represents the weight matrix of the forget gate, represents the bias matrix of the forget gate, Represents the output of the hidden layer at the previous moment when the forget gate acts The weight matrix on ; The change gate determines the state information of the hidden layer at the current moment according to the information of the forget gate and the input gate, namely: ; represents the output of the change gate at time t, represents the weight matrix of the change gate, represents the bias matrix of the change gate, Represents the output of the hidden layer at the previous moment when the change gate acts on it The weight matrix on Represents the hyperbolic tangent activation operation; the state information of the hidden layer at the current moment is obtained by the following formula for: ; represents element-by-element matrix multiplication, Represents the state information of the hidden layer at the previous moment; The functions of the output gate include controlling the output information and combining the cell state. The main task of the output gate in LSTM is to selectively output information based on the current cell state to generate the hidden state at the current moment. The output gate helps LSTM maintain and transmit important time series data features by controlling which information is output, ensuring that the model can effectively handle long-term and short-term dependencies, making LSTM perform well in many sequence modeling tasks. The implementation of the output gate is as follows: ; represents the output of the output gate at time t, represents the weight matrix of the output gate, represents the bias matrix of the output gate, Represents the output gate acting on the output of the hidden layer at the previous moment The weight matrix on the current hidden layer is obtained by the following formula for: .
[0029] The data processing process of the hidden layer at the current moment can also be expressed by the following formula: ; Represents the data processing process of the hidden layer at the current moment, Indicates all the parameters that the hidden layer needs to train and learn at the current moment.
[0030] In the embodiment of the present invention, the optimizer in the training process of the neural network architecture is set to Adam. The Adam optimizer dynamically adjusts the learning rate during the training process and has a good convergence speed and effect. The default parameters of the Adam optimizer include: learning rate lr=0.001, exponential decay rate of the first-order moment estimate of momentum , the exponential decay rate of the second moment estimate of momentum (Exponential decay rate and The weight used to adjust the momentum), the numerical stability term ϵ=1e-7 (used to prevent zero division errors). The time step (Time Step) of the neural network architecture training process is 10; the batch size (BatchSize) is 64; the training round (Epochs) is 100. The loss function during the training process is the mean absolute error ,Right now: ; in, represents the i-th predicted value, represents the ith actual value, Represents the total number of samples or records.
[0031] S3: Input the time series data to be tested into the network model obtained in step S2 for prediction, and adjust the neural network architecture according to the prediction results; repeat step S2 to train the adjusted neural network architecture until the training is completed and the optimal model is obtained.
[0032] In step S3, the time series data to be tested is input into the network model for prediction to obtain the predicted average delay time of the data packets. Combined with the actual average delay time of the data packets corresponding to the time series data to be tested, the predicted average delay time of the data packets is evaluated, and the hyperparameters of the neural network architecture (including learning rate, batch size, number of hidden layer units, etc.) are adjusted according to the evaluation results. In an embodiment of the present invention, the evaluation indicators used to evaluate the predicted average delay time of the data packets include root mean square error (RMSE), correlation coefficient (R) and mean absolute error (MAE), where: The root mean square error RMSE measures the error between the predicted value and the true value, paying special attention to the larger error. It is the square root of the sum of the squares of the errors, thus emphasizing the importance of the larger errors. The specific formula is: ; The correlation coefficient R measures the strength of the linear relationship between the predicted value and the true value. R=1 indicates a perfect positive correlation, and the model predicted value is completely consistent with the true value; R=0 indicates no correlation, and there is no linear relationship between the model predicted value and the true value; R=-1 indicates a perfect negative correlation.
[0033] The specific formula is: ; in, and Represent the mean of the true value and the predicted value respectively; the mean absolute error MAE measures the average value of the absolute error between the predicted value and the true value, which represents the average accuracy of the model prediction. The specific formula is: .
[0034] S4: deploying the optimal model obtained in step S3 to an actual one-way data transmission system. The one-way transmission system predicts the transmission delay time of the data packet according to the optimal model, and adjusts and sends the data packet according to the predicted transmission delay time.
[0035] The process of step S4 is as follows Figure 4 As shown in the figure, the one-way transmission system includes the first thread Thread1 and the second thread Thread2. The first thread Thread1 is responsible for data transmission, that is, data packetization through UDP (User Datagram Protocol), and data adjustment and transmission according to the current transmission strategy. The second thread Thread2 is responsible for performance monitoring, that is, periodic monitoring of I / O parameters P (p1, p2, ..., p 18 ), such as network and hardware performance indicators (such as network throughput, latency, etc.); the second thread Thread2 uses the best model to intelligently infer and predict the transmission delay time of the data packet based on the I / O parameter P ( ), the predicted transmission delay time ( ) is passed to the first thread Thread1, and then the parameters of data transmission (such as data packet size and transmission delay) are adjusted in real time. The sender periodically predicts the average delay time and adjusts the transmission parameters such as data packet size and delay time in real time to ensure the high efficiency of the one-way transmission system.
[0036] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the disclosure of the present invention can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and this document does not limit this.
[0037] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An intelligent control method for a one-way data transmission system based on LSTM prediction analysis, characterized in that: The following steps are involved: S1: collecting time series data that affects the data transmission rate and the data transmission success rate, and preprocessing the time series data to obtain a training set; S2: construct a neural network architecture based on LSTM, input the training set obtained in step S1 into the neural network architecture, train the neural network architecture, and obtain a network model; S3: input the time series data to be tested into the network model obtained in step S2 for prediction, and adjust the neural network architecture according to the prediction result; repeat step S2 to train the adjusted neural network architecture until the training is completed and the optimal model is obtained; S4: deploying the optimal model obtained in step S3 to an actual one-way data transmission system, wherein the one-way transmission system predicts the transmission delay time of the data packet according to the optimal model, and adjusts and sends the data packet according to the predicted transmission delay time.
2. According to claim 1, the intelligent control method for one-way data transmission system based on LSTM prediction analysis is characterized in that: In step S1, the time series data includes network I / O performance data, hardware I / O performance data and data packet size of the sending end.
3. The intelligent control method for one-way data transmission system based on LSTM prediction analysis according to claim 1 is characterized in that: The preprocessing in step S1 includes the following steps: S11: normalizing the time series data; S12: Arrange the normalized time series data into sequences according to time , and then create the feature sequence X as: ; The corresponding average delay time of the data packet , represents the average delay time of the data packet at time t, t represents the time, and T represents the total time; The characteristic sequence Each element in Contains K features, namely: ; S13: The feature sequence Further divide according to the time step n to obtain the training feature sequence : ; ; Wherein, m represents the training feature sequence Neutron sequence The index of Represents the training feature sequence Neutron sequence The total number of each subsequence ; S14: The training feature sequence And the corresponding average packet delay time Constitute the training set, the training feature sequence subsequence in The average delay time of the data packet corresponding to time n+m .
4. The intelligent control method for one-way data transmission system based on LSTM prediction analysis according to claim 3 is characterized in that: The neural network architecture includes an input layer, a hidden layer and an output layer; wherein the input of the hidden layer at the current moment includes the subsequence corresponding to the current moment , the output of the hidden layer at the previous moment and the state information of the hidden layer at the previous moment; the output of the hidden layer at the current moment includes the output of the hidden layer at the current moment and the state information of the hidden layer at the current moment; the output result of the hidden layer at the last moment passes through the fully connected layer, and the predicted average delay time of the data packet is output through the output layer.
5. The intelligent control method for one-way data transmission system based on LSTM prediction analysis according to claim 4 is characterized in that: In step S2, the hidden layer includes an input gate, a forget gate, an output gate and a change gate; the input gate determines the information input into the hidden layer at the current moment, and the forget gate determines the degree to which the hidden layer at the current moment forgets the information of the hidden layer at the previous moment; the change gate determines the state information of the hidden layer at the current moment according to the information of the forget gate and the input gate; and the output gate outputs the output of the hidden layer at the current moment according to the state information of the hidden layer at the current moment.
6. The intelligent control method for one-way data transmission system based on LSTM prediction analysis according to claim 1 is characterized in that: In step S4, the unidirectional transmission system includes a first thread and a second thread. In the second thread, the optimal model predicts the transmission delay time of the data packet and passes the predicted transmission delay time to the first thread; the first thread packages the data and adjusts and sends the data packet according to the predicted transmission delay time.
Citation Information
Patent Citations
Push-type information transmission device, push-type information transmission method, and program
CN105339915A
Wind speed prediction method and system based on long-term and short-term memory time neural network
CN111222677A
Sales prediction optimization method based on LSTM deep learning model
CN112381591A
Parameter optimization method and system for high-speed rail filler vibration compaction
CN115203839A
Prediction method for generation power of wind turbine generator
CN115496264A