Smart campus security assessment method based on Internet of Things

By constructing a random forest model and calculating information entropy, screening out important features, and building a weighted decision matrix, the problems of insufficient information utilization and unreliable assessment in traditional smart campus safety assessment methods are solved, and a more efficient and accurate safety assessment is achieved.

CN120675732APending Publication Date: 2025-09-19CHONGQING COLLEGE OF ELECTRONICS ENG +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510580137.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Traditional smart campus security assessment methods cannot fully utilize the potential information in the data, miss important nonlinear features, have poor generalization ability, fail to effectively consider the degree of discreteness in the indicator weight calculation, have strong volatility, cannot handle the redundant relationship between features, and the security assessment does not have the ability to be updated in real time, resulting in unreliable assessment results.

Method used

A random forest model was constructed, and subsample sets were generated by the bagging method for feature screening. The discreteness and redundancy of the information entropy measurement indicators were calculated. A weighted decision matrix was constructed for comprehensive evaluation, and the TOPSIS method was used for sorting and decision making.

Benefits of technology

It improves the generalization ability and computational efficiency, scientificity and accuracy of safety assessment, ensures that important indicators play a role in the assessment, and provides a reliable basis for safety improvement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120675732A_ABST
    Figure CN120675732A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of safety assessment, and particularly discloses a smart campus safety assessment method based on the Internet of Things, and the method comprises the steps: data collection and processing, safety index selection, evaluation matrix construction, index weight calculation, index comprehensive evaluation and result decision. According to the scheme, the random forest is constructed, the feature set is screened out through split bagging ensemble learning, the new random forest model is constructed based on the feature set for training, and it is ensured that the finally selected features have high importance in all data; the information entropy is calculated, the dispersion degree of each safety index is measured, the scientificity of weight evaluation is improved, the weight of each safety index is quantified, the redundancy is calculated, and the effectiveness of the indexes is better understood; the weighted decision matrix is calculated to enhance the accuracy of security assessment, so that more important indexes play a greater role in assessment, the relative advantages and disadvantages of each index are quantified, subsequent sorting and decision making are facilitated, and a reliable basis is provided for security improvement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of security assessment technology, and in particular to a smart campus security assessment method based on the Internet of Things. Background Art

[0002] In the construction of smart campuses, IoT devices are often used for campus security management. Providing real-time security status assessments to campus administrators is crucial. Traditional security indicator selection methods, often based on experience or relying on simple linear selection, fail to fully utilize the potential information in the data, resulting in the omission of important nonlinear features, poor generalization, and impacted assessment performance. Conventional indicator weight calculation methods fail to effectively account for the discreteness of indicators, exhibit high volatility, and are unable to effectively address redundant relationships between features. Conventional security assessment methods are unable to effectively comprehensively consider multiple interrelated indicators when handling multi-objective assessments, and security assessments lack the ability to update in real time, resulting in unreliable assessment results. Summary of the Invention

[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a smart campus security assessment method based on the Internet of Things. The traditional security indicator selection method is usually carried out according to experience or relies on simple linear selection, which cannot fully utilize the potential information in the data, resulting in the omission of important nonlinear features, poor generalization ability, and affecting the evaluation performance. This solution constructs a random forest, generates a subsample set by adopting the bagging method, trains the subsamples multiple times to reduce the bias and overfitting risk of the random forest, adopts split bagging ensemble learning to screen out a feature set, and constructs a new random forest model based on the feature set for training, thereby improving the generalization ability and computational efficiency of the model, and ensuring that the final selected features are equally important on all data; the general indicator weight calculation method is not It can effectively consider the discreteness of indicators, has strong volatility, and cannot effectively deal with the redundant relationship between features. This solution measures the discreteness of each safety indicator by calculating information entropy, improves the scientific nature of weight evaluation, quantifies the weight of each safety indicator and calculates redundancy, better understands the effectiveness of the indicator, and provides a clearer basis for subsequent comprehensive evaluation. In view of the general safety assessment method, when dealing with multi-objective assessment, it cannot effectively consider multiple interrelated indicators, and the safety assessment does not have the ability to update in real time, resulting in unreliable assessment results. This solution calculates the weighted decision matrix to enhance the accuracy of safety assessment, so that more important indicators play a greater role in the assessment, quantifies the relative advantages and disadvantages of each indicator, facilitates subsequent sorting and decision-making, and provides a reliable basis for safety improvement.

[0004] The technical solution adopted by the present invention is as follows: The present invention provides a smart campus security assessment method based on the Internet of Things, which includes the following steps:

[0005] Step S1: Data collection and processing: select monitoring indicators from the IoT devices on campus, collect device monitoring data for each monitoring indicator, and standardize the device monitoring data;

[0006] Step S2: Security indicator selection, constructing a random forest to extract data features from all device monitoring data and screen out the most relevant security indicators;

[0007] Step S3: construct an evaluation matrix using the selected safety indicators. The rows of the matrix represent different monitoring areas, and the columns represent the specific safety indicators to be evaluated.

[0008] Step S4: Calculate the indicator weight, use the entropy method to calculate the information entropy of each security indicator, and calculate the weight of each security indicator based on the entropy value;

[0009] Step S5: Comprehensive evaluation of indicators. The TOPSIS (top-to-bottom solution distance ranking) method is used to comprehensively analyze each safety indicator and obtain the relative proximity of each monitoring area to the optimal solution.

[0010] Step S6: Result decision, sort all monitoring areas in descending order according to the size of relative proximity, and obtain the comprehensive safety evaluation ranking of each monitoring area. The higher the ranking, the higher the safety level, and propose safety improvement suggestions for the low-ranking areas.

[0011] Furthermore, in step S2, the security indicator selection specifically includes the following steps:

[0012] Step S21: Data division: randomly select 70% of the equipment monitoring data of all monitoring indicators as a training set and 30% as a validation set;

[0013] Step S22: Subsample extraction: a bagging method is used to generate multiple subsamples from the training set. The number of subsamples is M, and the size of each subsample is 70% of the training set.

[0014] Step S23: Random forest construction, setting the number and maximum depth of decision trees in the random forest;

[0015] Step S24: Random forest training: training a random forest on each subsample to screen monitoring indicators and generate a feature set;

[0016] Step S25: Feature confirmation: Use the feature set to train a new random forest model on the entire training set data, input the validation set into the trained random forest model to further verify the accuracy of the feature set. The monitoring indicators in the final feature set are the relevant safety indicators.

[0017] Furthermore, in step S4, the calculation of the indicator weights specifically includes the following steps:

[0018] Step S41: Matrix standardization, standardizing all safety indicators in the evaluation matrix;

[0019] Step S42: Calculate the proportion of the monitoring area based on the processed normalized value. The formula used is as follows: ;

[0020] Where, Indicates the The monitoring area is Standardized values ​​on safety indicators, Indicates the The monitoring area is The proportion of safety indicators, Indicates the total number of monitoring areas;

[0021] Step S43: Calculate the information entropy of each security indicator. The higher the information entropy, the greater the dispersion of the security indicator and the lower its importance. The formula used is as follows: ; ;

[0022] Where, Indicates the The information entropy of the security indicators, Indicates the normalized value of entropy;

[0023] Step S44: Calculate the redundancy of information entropy using the following formula: ;

[0024] Where, Indicates the The information entropy redundancy of each security indicator;

[0025] Step S45: Calculate the weight of each security indicator. The weight of the security indicator is calculated based on the redundancy of information entropy. The formula used is as follows: ;

[0026] Where, Indicates the The weight of a safety indicator.

[0027] Furthermore, in step S5, the comprehensive evaluation of the indicators specifically includes the following steps:

[0028] Step S51: Construct a weighted decision matrix. Multiply the standardized data in the evaluation matrix by the weights of each safety indicator to generate a weighted decision matrix. The formula used is as follows: ;

[0029] Where, Indicates the The monitoring area is Weighted normalized values ​​of safety indicators;

[0030] Step S52: Calculate the maximum value to determine the optimal solution and the worst solution of each safety index, indicating the best and worst states of campus safety;

[0031] Step S53: distance calculation, respectively calculating the distance between each monitoring area and the optimal solution and the worst solution;

[0032] Step S54: Calculate the relative proximity of each monitoring area to the optimal solution. The formula used is as follows: ;

[0033] Where, represents the relative proximity of each monitoring area, and Respectively represent The distance between each monitoring area and the optimal solution and the worst solution.

[0034] The beneficial effects achieved by the present invention using the above scheme are as follows:

[0035] (1) In view of the problem that traditional security indicator selection methods are usually based on experience or rely on simple linear selection, which cannot fully utilize the potential information in the data, resulting in the omission of important nonlinear features, poor generalization ability, and affecting the evaluation performance, this solution constructs a random forest, generates subsample sets by using the bagging method, trains the subsamples multiple times to reduce the bias and overfitting risk of the random forest, uses split bagging ensemble learning to screen out feature sets, and constructs a new random forest model based on the feature set for training, thereby improving the generalization ability and computational efficiency of the model and ensuring that the features finally selected are equally important on all data.

[0036] (2) In view of the problem that the general indicator weight calculation method fails to effectively consider the discrete degree of the indicator, has strong volatility, and cannot effectively deal with the redundant relationship between features, this scheme calculates the information entropy, measures the discrete degree of each safety indicator, improves the scientific nature of the weight assessment, quantifies the weight of each safety indicator and calculates the redundancy, better understands the effectiveness of the indicator, and provides a clearer basis for subsequent comprehensive evaluation.

[0037] (3) In view of the problem that general safety assessment methods cannot effectively and comprehensively consider multiple interrelated indicators when dealing with multi-objective assessments, and the safety assessment does not have the ability to be updated in real time, resulting in unreliable assessment results, this solution calculates a weighted decision matrix to enhance the accuracy of safety assessments, allowing more important indicators to play a greater role in the assessment, quantifying the relative advantages and disadvantages of each indicator, facilitating subsequent sorting and decision-making, and providing a reliable basis for safety improvements. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 This is a flow chart of a smart campus security assessment method based on the Internet of Things proposed by the present invention;

[0039] Figure 2 Schematic diagram of the process of step S2;

[0040] Figure 3 Schematic diagram of the process of step S4;

[0041] Figure 4 is a flow chart of step S5.

[0042] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION

[0043] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0044] Example 1, see Figure 1 The present invention provides a smart campus security assessment method based on the Internet of Things, which includes the following steps:

[0045] Step S1: Data collection and processing: select monitoring indicators from the IoT devices on campus, collect device monitoring data for each monitoring indicator, and standardize the device monitoring data;

[0046] Step S2: Security indicator selection, constructing a random forest to extract data features from all device monitoring data and screen out the most relevant security indicators;

[0047] Step S3: construct an evaluation matrix using the selected safety indicators. The rows of the matrix represent different monitoring areas, and the columns represent the specific safety indicators to be evaluated.

[0048] Step S4: Calculate the indicator weight, use the entropy method to calculate the information entropy of each security indicator, and calculate the weight of each security indicator based on the entropy value;

[0049] Step S5: Comprehensive evaluation of indicators, using the TOPSIS method to conduct a comprehensive analysis of each safety indicator to obtain the relative proximity of each monitoring area to the optimal solution;

[0050] Step S6: Result decision, sort all monitoring areas in descending order according to the size of relative proximity, and obtain the comprehensive safety evaluation ranking of each monitoring area. The higher the ranking, the higher the safety level, and propose safety improvement suggestions for the low-ranking areas.

[0051] Example 2, see Figure 1 This embodiment is based on the above embodiment. In step S1, the monitoring indicators include: monitoring coverage, equipment failure rate, emergency response time, access control security, and personnel behavior monitoring data.

[0052] Example 3, see Figure 1 and Figure 2 This embodiment is based on the above embodiment. In step S2, the security indicator is selected, which specifically includes the following steps:

[0053] Step S21: Data division: randomly select 70% of the equipment monitoring data of all monitoring indicators as a training set and 30% as a validation set;

[0054] Step S22: Subsample extraction: a bagging method is used to generate multiple subsamples from the training set. The number of subsamples is M, and the size of each subsample is 70% of the training set.

[0055] Step S23: Random forest construction, setting the number and maximum depth of decision trees in the random forest;

[0056] Step S24: Random forest training: training a random forest on each subsample to screen monitoring indicators and generate a feature set. The specific steps are as follows:

[0057] Step S241: Setting the target variable and category. The target variable is set to whether a security event has occurred. Security events include equipment failure, system anomalies, and potential safety hazards. The target variable is classified using binary classification: category 1 indicates that a security event has occurred, and category 0 indicates that no security event has occurred.

[0058] Step S242: training a random forest on each subsample;

[0059] Step S243: Node splitting: Use each monitoring indicator to split the nodes in the decision tree. Calculate the purity of the nodes before and after the split based on Gini importance. Record the importance score of each category to the target variable in the subsample. The formula used is as follows: ;

[0060] Where, represents a node of a decision tree, Representation node The Gini impurity value, Representation category The proportion in the current node, Indicates the sum of all categories;

[0061] Step S244: Calculate the reduction in impurity after each node is split. The formula used is as follows: ;

[0062] Where, Representation node The reduction in impurity after splitting, Indicates the impurity before splitting, Indicates the impurity after splitting;

[0063] Step S245: Accumulating the importance score: on each decision tree of the random forest, accumulating the reduction of impurity of each monitoring indicator in all splitting processes to form the importance score of the monitoring indicator;

[0064] Step S246: average score, calculate the average importance score of all decision trees in the random forest to obtain the final importance score of each monitoring indicator;

[0065] Step S247: setting an importance threshold, retaining monitoring indicators with scores higher than the importance threshold to generate a feature set, which is used to represent the most relevant monitoring indicators in the sub-sample;

[0066] Step S25: Feature confirmation: Use the feature set to train a new random forest model on the entire training set data, input the validation set into the trained random forest model to further verify the accuracy of the feature set. The monitoring indicators in the final feature set are the relevant safety indicators.

[0067] By performing the above operations, the traditional security indicator selection method is usually based on experience or relies on simple linear selection, which cannot fully utilize the potential information in the data, resulting in the omission of important nonlinear features, poor generalization ability, and affecting the evaluation performance. In this solution, a random forest is constructed, and subsample sets are generated by using a bagging method. The subsamples are trained multiple times to reduce the bias and overfitting risk of the random forest. Split bagging ensemble learning is used to screen out a feature set, and a new random forest model is constructed based on the feature set for training. This improves the generalization ability and computational efficiency of the model, and ensures that the features finally selected are equally important on all data.

[0068] Example 4, see Figure 1 and Figure 2 This embodiment is based on the above embodiment. In step S22, a bagging method is used to generate multiple subsamples from the training set. Each subsample contains a random sampling of a portion of the data in the training set by sampling with replacement. In this embodiment, it is assumed that the training set contains 1000 pieces of equipment monitoring data. 70% of the data in the training set is randomly sampled to form a subsample. Then, 700 pieces of data are randomly sampled for each subsample. The sampling is repeated 20 times to generate subsamples, that is, the number of subsamples is . , where each subsample is independent of each other.

[0069] Example 5, see Figure 1 and Figure 2 This embodiment is based on the above embodiment. In step S23, the number of decision trees is selected to be 100, and the maximum depth of each decision tree is 10.

[0070] Example 6, see Figure 1 and Figure 3 This embodiment is based on the above embodiment. In step S4, the indicator weight is calculated, which specifically includes the following steps:

[0071] Step S41: Matrix standardization: standardize all safety indicators in the evaluation matrix using range standardization. The formula used is as follows: ;

[0072] Where, Indicates the The monitoring area is Standardized values ​​on safety indicators, Indicates the The monitoring area is The value of the safety index, and Respectively represent The maximum and minimum values ​​of the safety indicators;

[0073] Step S42: Calculate the proportion of the monitoring area based on the processed normalized value. The formula used is as follows: ;

[0074] Where, Indicates the The monitoring area is Standardized values ​​on safety indicators, Indicates the The monitoring area is The proportion of safety indicators, Indicates the total number of monitoring areas;

[0075] Step S43: Calculate the information entropy of each security indicator. The higher the information entropy, the greater the dispersion of the security indicator and the lower its importance. The formula used is as follows: ; ;

[0076] Where, Indicates the The information entropy of the security indicators, Indicates the normalized value of entropy;

[0077] Step S44: Calculate the redundancy of information entropy using the following formula: ;

[0078] Where, Indicates the The information entropy redundancy of each security indicator;

[0079] Step S45: Calculate the weight of each security indicator. The weight of the security indicator is calculated based on the redundancy of information entropy. The formula used is as follows: ;

[0080] Where, Indicates the The weight of a safety indicator.

[0081] By performing the above operations, the general indicator weight calculation method fails to effectively consider the discrete degree of the indicator, has strong volatility, and cannot effectively handle the redundant relationship between features. This solution calculates the information entropy to measure the discrete degree of each safety indicator, improves the scientific nature of the weight assessment, quantifies the weight of each safety indicator and calculates the redundancy, thus better understanding the effectiveness of the indicator and providing a clearer basis for subsequent comprehensive evaluation.

[0082] Example 7, see Figure 1 and Figure 4This embodiment is based on the above embodiment. In step S5, comprehensive evaluation of indicators is performed, specifically including the following steps:

[0083] Step S51: Construct a weighted decision matrix. Multiply the standardized data in the evaluation matrix by the weights of each safety indicator to generate a weighted decision matrix. The formula used is as follows: ;

[0084] Where, Indicates the The monitoring area is Weighted normalized values ​​of safety indicators;

[0085] Step S52: Calculate the maximum value. All security indicators are divided into benefit indicators and cost indicators. Monitoring coverage and access control security are benefit indicators, and equipment failure rate, emergency response time, and personnel behavior monitoring data are cost indicators. Determine the optimal and worst solutions for each security indicator to represent the best and worst states of campus security. The formula used is as follows: ; ;

[0086] Where, and represent the optimal solution and the worst solution respectively, Represents a set of profit indicators, Represents a set of cost-type indicators;

[0087] Step S53: Distance calculation: calculate the Euclidean distance between each monitoring area and the optimal solution and the worst solution respectively. The formula used is as follows: ; ;

[0088] Where, and Respectively represent The optimal and worst solutions for each safety index, and Respectively represent The Euclidean distance between each monitoring area and the optimal solution and the worst solution;

[0089] Step S54: Calculate the relative proximity of each monitoring area to the optimal solution. The formula used is as follows: ;

[0090] Where, Indicates the relative proximity of each monitoring area.

[0091] By performing the above operations, this solution calculates a weighted decision matrix to enhance the accuracy of safety assessments, allowing more important indicators to play a greater role in the assessment. This quantifies the relative merits of each indicator, facilitates subsequent sorting and decision-making, and provides a reliable basis for safety improvements. This addresses the problem that general safety assessment methods are unable to effectively and comprehensively consider multiple interrelated indicators when handling multi-objective assessments, and the safety assessment lacks the ability to update in real time, resulting in unreliable assessment results.

[0092] Example 8, see Figure 1 This embodiment is based on the above embodiment. In step S6, the security improvement suggestions include: increasing monitoring coverage, strengthening equipment maintenance and management, optimizing the emergency response system, improving access control level, and strengthening personnel behavior monitoring and management.

[0093] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.

[0094] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

[0095] The present invention and its embodiments are described above. This description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if a person skilled in the art is inspired by this and, without departing from the purpose of the present invention, designs structures and embodiments similar to this technical solution without inventiveness, they shall fall within the scope of protection of the present invention.

Claims

1. A smart campus security assessment method based on the Internet of Things, characterized by: The method comprises the following steps: Step S1: Data collection and processing: select monitoring indicators from the IoT devices on campus, collect device monitoring data for each monitoring indicator, and standardize the device monitoring data; Step S2: Security indicator selection, constructing a random forest to extract data features from all device monitoring data and screen out the most relevant security indicators; Step S3: construct an evaluation matrix using the selected safety indicators. The rows of the matrix represent different monitoring areas, and the columns represent the specific safety indicators to be evaluated. Step S4: Calculate the indicator weight, use the entropy method to calculate the information entropy of each security indicator, and calculate the weight of each security indicator based on the entropy value; Step S5: Comprehensive evaluation of indicators, using the TOPSIS method to conduct a comprehensive analysis of each safety indicator to obtain the relative proximity of each monitoring area to the optimal solution; Step S6: Result decision, sort all monitoring areas in descending order according to the size of relative proximity, and obtain the comprehensive safety evaluation ranking of each monitoring area. The higher the ranking, the higher the safety level, and propose safety improvement suggestions for the low-ranking areas.

2. The method for security assessment of a smart campus based on the Internet of Things according to claim 1, wherein: In step S2, the security indicator selection includes the following steps: Step S21: Data division: randomly select 70% of the equipment monitoring data of all monitoring indicators as a training set and 30% as a validation set; Step S22: Subsample extraction: a bagging method is used to generate multiple subsamples from the training set. The number of subsamples is M, and the size of each subsample is 70% of the training set. Step S23: Random forest construction, setting the number and maximum depth of decision trees in the random forest; Step S24: Random forest training: training a random forest on each subsample to screen monitoring indicators and generate a feature set; Step S25: Feature confirmation: Use the feature set to train a new random forest model on the entire training set data, input the validation set into the trained random forest model to further verify the accuracy of the feature set. The monitoring indicators in the final feature set are the relevant safety indicators.

3. The method for security assessment of a smart campus based on the Internet of Things according to claim 2, characterized in that: In step S4, the calculation of indicator weights is specifically as follows: all safety indicators in the evaluation matrix are standardized; the proportion of the monitoring area and the information entropy of each safety indicator are calculated based on the processed standardized values, and the higher the information entropy, the greater the degree of dispersion of the safety indicator and the lower its importance; the redundancy of the information entropy is calculated, and the weight of each safety indicator is obtained according to the redundancy of the information entropy.

4. The method for security assessment of a smart campus based on the Internet of Things according to claim 3, wherein: In step S5, the comprehensive evaluation of the indicators includes the following steps: Step S51: constructing a weighted decision matrix, multiplying the standardized data in the evaluation matrix with the weights of each safety indicator to generate a weighted decision matrix; Step S52: Calculate the maximum value to determine the optimal solution and the worst solution of each safety index, indicating the best and worst states of campus safety; Step S53: distance calculation, respectively calculating the distance between each monitoring area and the optimal solution and the worst solution; Step S54: Calculate the relative proximity of each monitoring area to the optimal solution. The formula used is as follows: ; Where, represents the relative proximity of each monitoring area, and Respectively represent The distance between each monitoring area and the optimal solution and the worst solution.