A risk data detection method and system based on edge computing
By deploying sensors at the edge device layer to collect risk data and constructing a deep forest algorithm detection model, combined with large-scale parallel training and hyperparameter optimization in the cloud, the problem of real-time accurate risk data detection in the edge computing environment is solved, and efficient and accurate risk detection is achieved.
Patent Information
- Application Number
- CN202411833300.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-13
AI Technical Summary
In an edge computing environment, it is difficult for the prior art to achieve real-time and accurate risk data detection, mainly due to factors such as resource limitations and network delays.
By deploying sensors at the edge device layer to collect risk data, perform data cleaning, denoising and feature extraction, a risk data detection model based on deep forest algorithm is built, and large-scale parallel training and hyperparameter optimization are carried out in the cloud computing center.
Real-time acquisition and detection of risk data is realized, which reduces cloud computing overhead, improves system response speed, and ensures that the risk detection model on edge devices is high performance and robust.
Smart Images

Figure CN119293785B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of risk data detection based on edge computing, and in particular to a risk data detection method based on edge computing and a risk data detection system based on edge computing. Background Art
[0002] Risk data generally refers to data generated, transmitted or stored in an edge computing environment that may pose a potential threat or adverse impact to the system, network, equipment or business. These data may have the following characteristics and manifestations: Abnormal data traffic patterns: such as sudden large amounts of data transmission, or abnormal changes in traffic direction, frequency, etc. Incorrect or incomplete data: may lead to system processing errors, wrong decisions or business process interruptions. Leakage or unauthorized access to sensitive information: such as personal identity information, trade secrets, etc. Data from untrusted sources: data provided by data sources with unknown origins or that are considered to have potential risks. Data related to known security threat patterns: such as data characteristics related to virus and malware activities. Data operations that do not comply with preset rules or policies: such as data modification and deletion that exceed permissions.
[0003] The data in edge computing is generated quickly, and risk data needs to be detected in a timely manner. However, due to factors such as resource limitations and network delays, real-time and accurate detection may not be possible. Summary of the invention
[0004] The main purpose of the present invention is to provide a risk data detection method based on edge computing, aiming to solve the technical problems in the prior art.
[0005] The present invention proposes a risk data detection method based on edge computing, comprising:
[0006] S1. Build an edge device layer to collect risk data through different types of sensors.
[0007] S2. Clean, denoise and extract features from the collected data.
[0008] S3. Build a risk data detection model based on the deep forest algorithm, and use the stochastic gradient descent method to update the parameters of each decision tree in the risk data detection model.
[0009] S4. Use a large-scale labeled data set to train the model in the cloud computing center, and use a pruning strategy to optimize the hyperparameters of the risk data detection model. The specific steps include:
[0010] S41. Obtain a large amount of labeled data from public data sets or within the industry, covering various types of risk scenarios, and clean and preprocess the data to ensure data quality, and divide the preprocessed data set into training set, validation set and test set.
[0011] S42. Use cloud computing resources to perform large-scale parallel training of the risk data detection model, use the validation set to tune the model, and use pruning strategies to optimize the hyperparameters of the risk data detection model.
[0012] S43. Evaluate the performance of the trained model on the test set, calculate the accuracy, recall, and F1 value indicators, and further optimize the model structure and training strategy based on the evaluation results until the expected performance target is achieved.
[0013] S5. Deploy the trained risk data detection model to the edge server as the core component of risk detection.
[0014] S6. The edge server regularly uploads the detection results and newly collected data to the cloud computing center to provide a reliable data source for big data analysis.
[0015] Preferably, in step S1, collecting risk data includes:
[0016] S11. Various sensor devices are deployed at the edge device layer to collect raw data. The sensors include temperature sensors, humidity sensors, pressure sensors, and current sensors, which are used to collect corresponding physical quantities of the device's operating status. Video image data is collected through cameras.
[0017] S12. According to the characteristics of the monitored object, use the Nyquist sampling theorem to set the data sampling frequency. The formula is:
[0018] ;
[0019] In the formula, is the sampling frequency, is the highest frequency of the signal.
[0020] S13. Select the corresponding data format according to the risk data type.
[0021] S14. Transmit the risk data according to a preset data transmission protocol.
[0022] Preferably, in step S2, it includes:
[0023] S21. Data cleaning, including: using the z-score standardization method to check for outliers in the data, removing data points that are beyond a reasonable range and obvious erroneous data, etc. Filling missing values with the average value. Eliminating duplicates in the data and reducing redundancy, wherein the z-score standardization formula is:
[0024] ;
[0025] In the formula, x is the data point, is the sample mean, is the sample standard deviation. When |z| is greater than the set threshold, the data point is considered an outlier.
[0026] The mean value filling formula is:
[0027] ;
[0028] Where m is the number of non-missing values in the dataset.
[0029] S22, data denoising, using Fourier transform to perform frequency domain analysis on data, identify and remove noise components, continuous time signal The Fourier transform of is defined as:
[0030] ;
[0031] In the formula, yes The spectrum of is the angular frequency, j is the imaginary unit, is a complex exponential function.
[0032] S23. Use entropy as a data feature indicator to extract important features of the data.
[0033] Preferably, the calculation formula of the entropy value is:
[0034] ;
[0035] In the formula, Take the value of the random variable Y probability.
[0036] Preferably, in step S3, building a risk data detection model based on a deep forest algorithm includes:
[0037] S31. According to the feature extraction results, select features with high correlation with risk detection as model input and use the correlation coefficient index to evaluate and screen the features. The expression of the correlation coefficient is:
[0038] ;
[0039] In the formula, and are the i-th observation values of the two variables, and are the means of a and b respectively, n is the number of observations, and the correlation coefficient r ranges from -1 to 1.
[0040] S32. Divide the preprocessed data set into a training set, a validation set, and a test set.
[0041] S33. Build multiple deep decision tree models, each of which has the following structure:
[0042] ;
[0043] In the formula, is the detection result of the tth decision tree.
[0044] Integrate all decision tree models to form a risk data detection model:
[0045] ;
[0046] In the formula, K is the number of decision trees.
[0047] S34. Use stochastic gradient descent to update the parameters of each decision tree of the risk data detection model.
[0048] S35. Evaluate the detection performance of the model on the test set, including accuracy, recall, and F1 value indicators.
[0049] As a preference, the stochastic gradient descent formula is:
[0050] ;
[0051] In the formula, is the model parameter at the tth iteration, are the updated model parameters, is the learning rate, which controls the step size of parameter updates, is the loss function L with respect to the parameters The gradient of Calculate on.
[0052] As a preferred method, the accuracy formula is:
[0053] ;
[0054] The formula for recall is:
[0055] ;
[0056] The formula for the F1 value is:
[0057] ;
[0058] in,
[0059] ;
[0060] In the formula, TP represents the number of samples correctly detected as positive examples, TN represents the number of samples correctly detected as negative examples, FP represents the number of samples falsely detected as positive examples, and FN represents the number of samples falsely detected as negative examples.
[0061] Preferably, the process of risk data detection model hyperparameters includes:
[0062] S421. The pruning goal is to reduce the complexity of the model, avoid overfitting, and improve the generalization ability of the model.
[0063] S422. Measure the importance of nodes in the decision tree according to the information gain evaluation index brought by node splitting.
[0064] S423. Weigh the model complexity, generalization ability, and importance calculation results, and set the pruning threshold.
[0065] S424: Delete nodes whose importance is lower than the pruning threshold and their related branches.
[0066] S425. After pruning, fine-tune the model, including retraining and adjusting other hyperparameters.
[0067] Preferably, the formula of information entropy is:
[0068] ;
[0069] Where I is information entropy, is the ratio of category k in the node.
[0070] The formula for information gain is:
[0071] ;
[0072] Where N is the number of samples of the parent node, is the number of samples of child node i, I(P) represents the information entropy of the parent node, Represents the information entropy of the i-th child node.
[0073] The present application also provides a risk data detection system based on edge computing, including:
[0074] The data acquisition module is used to collect risk data. It includes temperature sensors, humidity sensors, pressure sensors, current sensors and cameras, which are used to collect temperature, humidity, pressure, current and video image data of the equipment's operating status.
[0075] The data preprocessing module is used to clean, denoise and extract features from the collected data.
[0076] The risk data detection module is used to build a risk data detection model based on the deep forest algorithm and use the stochastic gradient descent method to update the parameters of each decision tree of the risk data detection model.
[0077] The model training optimization module is used to train the detection model using a large-scale labeled data set in the cloud computing center, and use a pruning strategy to optimize the hyperparameters of the risk data detection model.
[0078] The edge deployment module is used to deploy the optimized risk data detection model to the edge server as the core component of risk detection.
[0079] The data upload module is used to upload the detection results and newly collected data from the edge server to the cloud computing center regularly, providing a reliable data source for big data analysis.
[0080] The beneficial effects of the present invention are as follows: by deploying various sensors at the edge device layer, various physical quantity data related to risks can be collected in real time, and by deploying cameras, video image data can be obtained, so as to fully perceive the operating status of the environment and equipment, and provide high-quality original data support for subsequent data analysis and risk detection; various interference factors in the data are eliminated through data preprocessing to improve the signal-to-noise ratio of the data; through feature extraction technology, key features related to risk detection are extracted from the original data, the redundancy of the data is reduced, and more effective input is provided for subsequent model training; thereby greatly reducing the computing overhead in the cloud and improving the response speed of the entire system; a risk data detection model is constructed using a deep forest algorithm, which has stronger expression ability and generalization performance; the model parameters are updated using the stochastic gradient descent method, which can improve the convergence speed and prediction accuracy of the detection model, and can ensure that the risk detection model on the edge device has high performance and robustness; the hyperparameters of the model are tuned using a pruning strategy, which can further improve the generalization ability of the model and the accuracy of detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] Figure 1 A schematic diagram of a method flow chart of an embodiment of the present invention;
[0082] Figure 2 An embodiment of the present invention is based on Figure 1 A structural diagram of a risk data detection system based on an edge computing risk data detection method;
[0083] Figure 3 A schematic diagram of the internal structure of a computer device according to an embodiment of the present application.
[0084] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0085] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0086] like Figure 1 As shown, the present application provides a risk data detection method based on edge computing, including:
[0087] S1. Build an edge device layer to collect risk data through different types of sensors.
[0088] S11. Various sensor devices are deployed at the edge device layer to collect raw data. The sensors include temperature sensors, humidity sensors, pressure sensors, current sensors, etc., which are used to collect various physical quantities of the device's operating status. At the same time, cameras are included to collect video image data.
[0089] S12. According to the characteristics of the monitored object, select appropriate sensors and arrange them reasonably to obtain high-quality raw data; use the Nyquist sampling theorem to set the data sampling frequency to ensure the time resolution of the data and avoid generating too much redundant data. The Nyquist sampling theorem is expressed as:
[0090] ;
[0091] In the formula, is the sampling frequency, is the highest frequency of the signal. For example, =50Hz, then according to the formula: ≥2*50Hz=100Hz, that is, in order to correctly sample this signal, the sampling frequency should be greater than or equal to 100Hz. Setting the sampling frequency in this way can ensure that the signal is sampled according to the Nyquist sampling theorem and avoid the problem of frequency aliasing.
[0092] S13. Select appropriate data format according to the risk data type and use data compression technology to reduce data transmission load.
[0093] S14. Select an appropriate data transmission protocol to ensure the security, reliability and real-time requirements of data transmission.
[0094] In this embodiment, by deploying various sensors at the edge device layer, various physical quantity data related to risks can be collected in real time. At the same time, the deployed cameras can also obtain video image data, so as to fully perceive the environment and the operating status of the equipment, and provide high-quality original data support for subsequent data analysis and risk detection.
[0095] S2. Clean, denoise and extract features from the collected data to reduce data redundancy and improve data quality.
[0096] S21. Data cleaning, including: using the z-score standardization method to check for outliers in the data, removing data points that are beyond a reasonable range and obvious erroneous data, etc.; using the average value to fill in missing values; and eliminating duplicates in the data to reduce redundancy. The z-score standardization formula is:
[0097] ;
[0098] In the formula, x is the data point, is the sample mean, is the sample standard deviation. When |z| is greater than the set threshold, the data point is considered an outlier. For example, a set of data: [10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105], where
[0099] ;
[0100] ;
[0101] Then use the z-score formula to calculate the standard score z for each data point:
[0102] For the first 20 data points, the calculated z-scores are as follows:
[0103] [1.78, 1.26, 0.75, 0.23, -0.28, -0.79, -1.30, -1.82, -2.33, -2.84, -3.36, -3.87, -4.38, -4.90, -5.41, -5.92, -6.44, -6.95, -7.46, -7.97].
[0104] If the outlier threshold is set to |z|>7, then the last two data points are considered outliers and need to be removed. Through the above steps, we have completed the cleaning of this set of data and are ready for subsequent analysis and modeling.
[0105] The mean value filling formula is:
[0106] ;
[0107] Where m is the number of non-missing values in the data set. Suppose there is the following set of data: [10, 15, 20, 25, 30, N, Na, 45, 50, 55, 60, 65, 70, 75, NaN]. Calculate the average value of this set of data. The number of non-missing values m=13, and the average value μ=(10+15+20+25+30+45+50+55+60+65+70+75) / 13=42.31. Use the average filling formula to fill in the missing values. The complete data set after filling is: [10, 15, 20, 25, 30, 42.31, 42.31, 45, 50, 55, 60, 65, 70, 75, 42.31].
[0108] S22, data denoising, using Fourier transform to perform frequency domain analysis on data, identify and remove noise components, continuous time signal The Fourier transform of is defined as:
[0109] ;
[0110] In the formula, yes The spectrum of is the angular frequency, j is the imaginary unit, is a complex exponential function. Suppose there is the following set of continuous time signal data: [1.2, 1.5, 1.8, 2.0, 2.1, 2.0, 1.8, 1.5, 1.2, 0.9, 0.6, 0.4, 0.2, 0.1, 0.0, -0.1, -0.2, -0.4, -0.6, -0.8], calculate the Fourier transform of this set of data, and get the spectrum. Using discrete Fourier transform calculation, we can get the spectrum sequence: [2.0+0j, 1.5+0.5j, 1.0+0.5j, 0.5+0.3j, 0.0+0.1j, -0.5-0.1j, -1.0-0.3j, -1.5-0.5j, -2.0-0.5j]. It can be observed from the spectrum sequence that there is a higher amplitude in the low frequency band and a lower amplitude in the high frequency band, which indicates that there is a certain noise component in the original signal. Set a suitable threshold to remove the noise, for example, set the part of the spectrum value less than the threshold to 0, and then perform inverse Fourier transform to obtain the filtered signal: [1.2, 1.5, 1.8, 2.0, 2.1, 2.0, 1.8, 1.5, 1.2, 0.9, 0.6, 0.4, 0.2, 0.1, 0.0, -0.1, -0.2, -0.4, -0.6, -0.8]. Through such frequency domain analysis and filtering, the noise component in the original signal can be removed and a smoother signal can be obtained.
[0111] S23. Taking entropy as a data feature indicator, extract the important features of the data. The calculation formula of entropy is:
[0112] ;
[0113] In the formula, Take the value of the random variable Y Suppose there is the following set of data: [1, 2, 3, 1, 2, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4], count the frequency of each value: 1 appears 4 times, 2 appears 4 times, 3 appears 3 times, 4 appears 4 times, 5 appears 1 time, and then calculate the probability of each value: P(1) = 4 / 15, P(2) = 4 / 15, P(3) = 3 / 15, P(4) = 4 / 15, P(5) = 1 / 15, finally, use the entropy formula to calculate the entropy of the data: -(4 / 15*log(4 / 15)+4 / 15*log(4 / 15)+3 / 15*log(3 / 15)+4 / 15*log(4 / 15)+1 / 15*log(1 / 15)) = 1.459, this entropy value 1.459 represents the uncertainty or information content of this set of data. The larger the entropy value, the more information the data contains, and the more valuable it is.
[0114] In this embodiment, various interference factors in the data are eliminated through denoising and other technologies to improve the signal-to-noise ratio of the data; secondly, through feature extraction technology, key features related to risk detection are extracted from the original data to reduce data redundancy and provide more effective input for subsequent model training. This can greatly reduce the computing overhead of the cloud and improve the response speed of the entire system.
[0115] S3. Build a risk data detection model based on the deep forest algorithm.
[0116] S31. According to the feature extraction results, select the features with higher correlation with risk detection as model input and use the correlation coefficient index to evaluate and screen the features. The expression of the correlation coefficient is:
[0117] ;
[0118] In the formula, and are the i-th observation values of the two variables, and are the means of a and b respectively, n is the number of observations, and the correlation coefficient r ranges from -1 to 1. Suppose there are the following two sets of data: Risk detection data (a): [10, 15, 20, 25, 30, 35, 40, 45, 50, 55],
[0119] Feature data (b): [5, 10, 15, 20, 25, 30, 35, 40, 45, 50],
[0120] First, calculate the mean of the two sets of data:
[0121] =(10+15+20+25+30+35+40+45+50+55) / 10=32.5
[0122] =(5+10+15+20+25+30+35+40+45+50) / 10=27.5
[0123] Then, the correlation coefficient formula is used to calculate the correlation coefficient of the two sets of data: r=0.98. From the calculation results, it can be seen that the correlation coefficient of the two sets of data is 0.98, which indicates that there is a strong positive correlation between them.
[0124] S32. Divide the preprocessed data set into a training set, a validation set, and a test set. The training set is used to train model parameters, the validation set is used for model tuning, and the test set is used for final model evaluation.
[0125] S33. Build multiple deep decision tree models, each of which has the following structure:
[0126] ;
[0127] In the formula, is the detection result of the tth decision tree.
[0128] Integrate all decision tree models to form a risk data detection model:
[0129] ;
[0130] In the formula, K is the number of decision trees.
[0131] S34. Use the stochastic gradient descent method to update the parameters of each decision tree of the risk data detection model. The formula is:
[0132] ;
[0133] In the formula, is the model parameter at the tth iteration, are the updated model parameters, is the learning rate, which controls the step size of parameter updates, is the loss function L with respect to the parameters The gradient of Calculate on.
[0134] S35. Evaluate the detection performance of the model on the test set, including accuracy, recall, and F1 value indicators. The formula for accuracy is:
[0135] ;
[0136] In the formula, TP represents the number of samples correctly detected as positive examples, TN represents the number of samples correctly detected as negative examples, FP represents the number of samples falsely detected as positive examples, and FN represents the number of samples falsely detected as negative examples.
[0137] The formula for recall is:
[0138] ;
[0139] The formula for the F1 value is:
[0140] ;
[0141] in,
[0142] ;
[0143] Suppose there is the following set of data: true labels: [0, 1, 0, 1, 0, 1, 0, 1], predicted labels: [0, 1, 0, 0, 1, 1, 0, 1, 0].
[0144] The number of correctly predicted samples = 5, the total number of samples = 10, the accuracy rate = 5 / 10 = 0.5 = 50%, the number of samples correctly predicted as positive examples = 4, the number of actual positive examples = 5, the recall rate = 4 / 5 = 0.8 = 80%, the precision rate = 4 / 6 = 0.667 = 66.7%, the recall rate = 0.8 = 80%, F1 = 2*(0.667*0.8) / (0.667+0.8)=0.727=72.7%.
[0145] In summary, the accuracy is 50%, the recall is 80%, and the F1 value is 72.7%. These indicators can comprehensively evaluate the performance of the model. The accuracy focuses on the overall prediction accuracy, the recall focuses on the model's ability to identify positive examples, and the F1 value balances the two and is a comprehensive indicator.
[0146] In this embodiment, by constructing a risk data detection model, the advantages of the decision tree can be fully utilized to improve the detection performance and robustness of the model, providing strong support for risk detection tasks.
[0147] In this embodiment, a deep forest algorithm is used to construct a risk data detection model. Compared with the traditional single decision tree model, the deep forest has stronger expressive power and generalization performance. At the same time, the stochastic gradient descent method is used to update the model parameters, which can improve the convergence speed and prediction accuracy of the detection model, thereby ensuring that the risk detection model on the edge device has high performance and robustness.
[0148] S4. Use large-scale labeled data sets to train the model in the cloud computing center.
[0149] S41. Obtain a large amount of labeled data from public data sets or within the industry, covering various types of risk scenarios, and clean and preprocess the data to ensure data quality, and divide the preprocessed data set into training set, validation set and test set.
[0150] S42. Use cloud computing resources to conduct large-scale parallel training of the risk data detection model, use the validation set to tune the model, and use the pruning strategy to optimize the hyperparameters of the risk data detection model. The process is as follows:
[0151] S421. The pruning goal is to reduce the complexity of the model, avoid overfitting, and improve the generalization ability of the model.
[0152] S422. The importance of nodes in the decision tree is measured according to the information gain evaluation index brought by node splitting. The formula of information entropy is:
[0153] ;
[0154] Where I is information entropy, is the ratio of category k in the node.
[0155] The formula for information gain is:
[0156] ;
[0157] Where N is the number of samples of the parent node, is the number of samples of child node i, I(P) represents the information entropy of the parent node, Represents the information entropy of the i-th child node.
[0158] S423. Weigh the model complexity, generalization ability, and importance calculation results, and set the pruning threshold.
[0159] S424: Delete nodes whose importance is lower than the pruning threshold and their related branches.
[0160] S425. After pruning, fine-tune the model, including retraining and adjusting other hyperparameters.
[0161] S43. Evaluate the performance of the trained model on the test set, calculate the accuracy, recall, and F1 value indicators, and further optimize the model structure and training strategy based on the evaluation results until the expected performance target is achieved.
[0162] In this embodiment, the cloud computing center has powerful computing resources and can use large-scale labeled data sets to centrally train and optimize the risk data detection model; at the same time, pruning strategies can be used to tune the hyperparameters of the model to further improve the generalization ability of the model; this can ensure that a risk detection model with excellent performance is obtained, laying a good foundation for subsequent deployment and application.
[0163] S5. Deploy the trained risk data detection model to the edge server as the core component of risk detection.
[0164] In this embodiment, the optimized risk data detection model is deployed on the edge server as the core component of risk detection. In this way, the computing resources of the edge device can be fully utilized to achieve real-time data processing and risk detection. At the same time, since the model has been fully trained and optimized in the cloud, a high detection performance can be maintained on the edge device.
[0165] S6. The edge server regularly uploads the detection results and newly collected data to the cloud computing center to provide a reliable data source for big data analysis.
[0166] In this embodiment, the edge server regularly uploads the detection results and newly collected data to the cloud computing center, providing a reliable data source for big data analysis in the cloud; the cloud can further optimize the detection model based on these data, and form global risk monitoring and early warning decisions; at the same time, these data also provide valuable information support for subsequent system upgrades and maintenance.
[0167] In summary, the present invention provides a risk data detection method based on edge computing. By real-time collection of various physical quantity data related to risks, the operating status of the environment and equipment can be fully perceived, providing high-quality original data support for subsequent data analysis and risk detection; through data preprocessing, more effective input is provided for subsequent model training; thereby greatly reducing the computing overhead in the cloud and improving the response speed of the entire system; a deep forest algorithm is used to construct a risk data detection model with stronger expression ability and generalization performance; the stochastic gradient descent method is used to update the model parameters, which can improve the convergence speed and prediction accuracy of the detection model, and ensure that the risk detection model on the edge device has high performance and robustness; the pruning strategy is used to tune the hyperparameters of the model, which can further improve the generalization ability of the model and the accuracy of detection.
[0168] The present invention also provides a risk data detection system based on edge computing, including: a data acquisition module, a data preprocessing module, a risk data detection module, a model training optimization module, an edge deployment module and a data upload module.
[0169] The data acquisition module is used to collect risk data through different types of sensors. The data acquisition module includes temperature sensors, humidity sensors, pressure sensors, current sensors and cameras, which are used to collect temperature, humidity, pressure, current and video image data of the equipment's operating status.
[0170] The data preprocessing module is used to clean, denoise and extract features from the collected data, reduce data redundancy and improve data quality.
[0171] The risk data detection module is used to build a risk data detection model based on the deep forest algorithm, and uses the stochastic gradient descent method to update the parameters of each decision tree of the risk data detection model.
[0172] The model training optimization module is used to train the detection model using large-scale labeled data sets in the cloud computing center, and use pruning strategies to optimize the hyperparameters of the risk data detection model.
[0173] The edge deployment module is used to deploy the optimized risk data detection model to the edge server as the core component of risk detection.
[0174] The data upload module is used to regularly upload the detection results and newly collected data from the edge server to the cloud computing center, providing a reliable data source for big data analysis.
[0175] In summary, the present invention provides a risk data detection system based on edge computing, which collects risk data through a data acquisition module, and provides comprehensive data support for subsequent risk detection; the data preprocessing module cleans, denoises and extracts features for the collected raw data, reduces redundant data, improves data quality, and provides a more reliable data basis for subsequent model training and risk detection; a risk data detection model based on a deep forest algorithm is adopted, and the model parameters are dynamically updated using the stochastic gradient descent method to improve the accuracy and robustness of detection, and the model is centrally trained and optimized using a large-scale annotated data set in a cloud computing center to further improve the detection performance; the optimized risk detection model is deployed to the edge server to realize real-time detection of risk data at the proximal end, and the detection results and newly collected data are transmitted back to the cloud through the data upload module to provide data support for big data analysis; the system makes full use of modern sensing technology, data processing algorithms, edge computing and other technologies to realize comprehensive risk data collection, efficient data preprocessing, intelligent risk detection, and a cloud-edge collaborative system architecture, which can provide strong support for equipment monitoring and fault warning in industrial production.
[0176] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned risk data detection method based on edge computing when executing the computer program.
[0177] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned risk data detection method based on edge computing are implemented.
[0178] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0179] In summary, the present invention provides a risk data detection method and system based on edge computing, which fully utilizes the respective advantages of edge devices and cloud computing centers, deploys various sensor devices at the edge device layer, collects risk-related data in real time, and performs preliminary data preprocessing, which not only improves data quality but also reduces the computing pressure on the cloud. The risk detection model is centrally trained and optimized using powerful computing resources in the cloud to ensure that the model has high performance. The optimized model is deployed on the edge server to realize real-time data processing and risk detection. At the same time, the edge server will regularly upload the detection results and newly collected data to the cloud, providing reliable data support for big data analysis and overall decision-making in the cloud. Such an architecture not only improves the real-time and accuracy of risk detection, but also fully utilizes computing resources through edge-cloud collaboration, greatly improving the performance and reliability of the entire system.
[0180] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0181] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A risk data detection method based on edge computing, characterized in that: include: S1. Build an edge device layer to collect risk data through different types of sensors; S2, cleaning, denoising and feature extraction of the collected data; S3. Build a risk data detection model based on the deep forest algorithm, and use the stochastic gradient descent method to update the parameters of each decision tree in the risk data detection model; S4. Use a large-scale labeled data set to train the model in the cloud computing center, and use a pruning strategy to optimize the hyperparameters of the risk data detection model. The specific steps include: S41. Obtain a large amount of annotated data from public data sets or within the industry, covering various types of risk scenarios, and clean and preprocess the data to ensure data quality, and divide the preprocessed data sets into training sets, validation sets, and test sets; S42. Use cloud computing resources to conduct large-scale parallel training of the risk data detection model, use the validation set to tune the model, and use pruning strategies to optimize the hyperparameters of the risk data detection model; S43. Evaluate the performance of the trained model on the test set, calculate the accuracy, recall, and F1 value indicators, and further optimize the model structure and training strategy based on the evaluation results until the expected performance target is achieved; S5. Deploy the trained risk data detection model to the edge server as the core component of risk detection; S6, the edge server regularly uploads the detection results and newly collected data to the cloud computing center, providing a reliable data source for big data analysis; In step S3, building a risk data detection model based on the deep forest algorithm includes: S31. According to the feature extraction results, select features with high correlation with risk detection as model input and use the correlation coefficient index to evaluate and screen the features. The expression of the correlation coefficient is: ; In the formula, and are the i-th observation values of the two variables, and are the means of a and b respectively, n is the number of observations, and the correlation coefficient r ranges from -1 to 1; S32, dividing the preprocessed data set into a training set, a validation set and a test set; S33. Build multiple deep decision tree models, each of which has the following structure: ; In the formula, is the detection result of the tth decision tree; Integrate all decision tree models to form a risk data detection model: ; Where K is the number of decision trees; S34, using stochastic gradient descent to update the parameters of each decision tree of the risk data detection model; S35. Evaluate the detection performance of the model on the test set, including accuracy, recall, and F1 value indicators.
2. The risk data detection method based on edge computing according to claim 1 is characterized in that: In step S1, collecting risk data includes: S11. Deploy various sensor devices at the edge device layer to collect raw data. The sensors include temperature sensors, humidity sensors, pressure sensors, and current sensors, which are used to collect corresponding physical quantities of the device's operating status. Collect video image data through cameras. S12. According to the characteristics of the monitored object, use the Nyquist sampling theorem to set the data sampling frequency. The formula is: ; In the formula, is the sampling frequency, is the highest frequency of the signal; S13. Select the corresponding data format according to the risk data type; S14. Transmit the risk data according to a preset data transmission protocol.
3. The risk data detection method based on edge computing according to claim 1 is characterized in that: In step S2, it includes: S21. Data cleaning, including: using the z-score standardization method to check for outliers in the data, removing data points that are beyond a reasonable range and obvious erroneous data; using the average value to fill in missing values; and eliminating duplicates in the data to reduce redundancy, wherein the z-score standardization formula is: ; In the formula, x is the data point, is the sample mean, is the sample standard deviation. When |z| is greater than the set threshold, the data point is considered an outlier. The mean value filling formula is: ; Where m is the number of non-missing values in the data set; S22, data denoising, using Fourier transform to perform frequency domain analysis on data, identify and remove noise components, continuous time signal The Fourier transform of is defined as: ; In the formula, yes The spectrum of is the angular frequency, j is the imaginary unit, is a complex exponential function; S23. Use entropy as a data feature indicator to extract important features of the data.
4. The risk data detection method based on edge computing according to claim 3 is characterized in that: The calculation formula of the entropy value is: ; In the formula, Take the value of the random variable Y probability.
5. The risk data detection method based on edge computing according to claim 4 is characterized in that: The stochastic gradient descent formula is: ; In the formula, are the model parameters at the tth iteration, are the updated model parameters, is the learning rate, which controls the step size of parameter updates, is the loss function L with respect to the parameters The gradient of Calculate on.
6. The risk data detection method based on edge computing according to claim 4 is characterized in that: The formula for the accuracy is: ; The formula for the recall rate is: ; The formula for the F1 value is: ; in, ; In the formula, TP represents the number of samples correctly detected as positive examples, TN represents the number of samples correctly detected as negative examples, FP represents the number of samples incorrectly detected as positive examples, and FN represents the number of samples incorrectly detected as negative examples.
7. The risk data detection method based on edge computing according to claim 1 is characterized in that: The hyperparameter optimization process of the risk data detection model includes: S421, reducing the complexity of the model, avoiding overfitting, and improving the generalization ability of the model are taken as pruning goals; S422, measuring the importance of nodes in the decision tree according to an information gain evaluation index brought by node splitting; S423, weighing the model complexity and generalization ability and importance calculation results, and setting the pruning threshold; S424, deleting nodes whose importance is lower than the pruning threshold and their related branches; S425. After pruning, fine-tune the model, including retraining and adjusting other hyperparameters.
8. The risk data detection method based on edge computing according to claim 7 is characterized in that: The formula of information entropy in the risk data detection model is: ; Where I is information entropy, is the ratio of category k in the node; The formula for information gain is: ; Where N is the number of samples of the parent node, is the number of samples of child node i, I(P) represents the information entropy of the parent node, Represents the information entropy of the i-th child node.
9. A risk data detection system based on edge computing, which adopts the risk data detection method based on edge computing as claimed in any one of claims 1 to 8, characterized in that: The risk data detection system comprises: A data acquisition module, which is used to collect risk data; it includes a temperature sensor, a humidity sensor, a pressure sensor, a current sensor and a camera, which are used to collect temperature, humidity, pressure, current and video image data of the equipment operation status respectively; Data preprocessing module, which is used to clean, denoise and extract features from the collected data; The risk data detection module is used to build a risk data detection model based on the deep forest algorithm and use the stochastic gradient descent method to update the parameters of each decision tree of the risk data detection model; The model training optimization module is used to train the detection model using a large-scale labeled data set in the cloud computing center and optimize the hyperparameters of the risk data detection model using a pruning strategy; The edge deployment module is used to deploy the optimized risk data detection model to the edge server as the core component of risk detection; The data upload module is used to regularly upload the detection results and newly collected data from the edge server to the cloud computing center, providing a reliable data source for big data analysis.
Citation Information
Patent Citations
Distributed reflection denial of service attack detection and defense method based on deep forest
CN108696543A
Power production operation risk early warning method, system and equipment
CN116884192A