Internet-based campus security management system and method
By designing an Internet-based campus security management system, using trajectory data mining and Markov chain model to identify students' abnormal behavior patterns and dynamic changes, the problem that existing systems cannot detect and deal with potential security risks in a timely manner, and achieve more efficient and accurate campus security management.
Patent Information
- Application Number
- CN202510167982.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2045-02-17
AI Technical Summary
The existing campus safety management system cannot identify students' abnormal behavior patterns, lacks quantitative analysis of the probability of state transfer, and cannot accurately reveal the trend of dynamic changes in students' behavior, making it difficult to detect and deal with potential security risks in a timely manner.
Design an Internet-based campus security management system, including data acquisition module, data processing module, threat prediction module, threat diagnosis module and emergency response module. Through trajectory data mining and Markov chain modeling, feature extraction and pattern modeling of student behavior data are used to identify abnormal behavior patterns and predict potential threats.
By identifying students' abnormal behavior patterns and dynamic changes, the system can promptly discover and deal with potential safety risks, improve the efficiency and accuracy of campus safety management, and ensure students' safety.
Smart Images

Figure CN119622613A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of campus safety technology, and more specifically, to an Internet-based campus safety management system and method. Background Art
[0002] The patent with patent announcement number CN115311824A discloses an Internet-based campus safety management system and management method, including a safety monitoring module: used to connect to the network through a wireless network and a pre-set monitoring device, and monitor the campus according to the monitoring device to obtain monitoring data; a safety judgment module: used to judge campus accidents based on the monitoring data and obtain judgment results; an alarm processing module: when the judgment result shows that a campus accident has occurred, a linkage alarm operation is executed. The campus monitoring network constructed by the present invention can quickly transmit abnormal campus situations, thereby saving a lot of alarm time. The set joint alarm can not only save alarm time, but also ensure sufficient and rapid police dispatch, thereby more comprehensively ensuring campus safety.
[0003] The existing campus safety management systems and methods mainly have the following problems: Failure to identify students' abnormal behavior patterns, such as staying in inactive areas for a long time or abnormally frequent movement, will make it difficult to detect potential safety risks in time; lack of quantitative analysis of state transition probability will not accurately reveal the trend of dynamic changes in students' behavior, which may miss the opportunity to prevent safety accidents; failure to detect irregular state transitions in students' behavior, such as moving directly from the teaching building to an unsafe area, increases safety hazards; the system is difficult to effectively screen abnormal trajectories, resulting in limited abnormal behavior detection capabilities of the system; it is unable to automatically adapt to the trajectory patterns of different students, reducing the accuracy and versatility of the analysis results; campus management efficiency is low, and it is difficult to formulate effective management measures for different behavior patterns; failure to timely detect and intervene in potential safety hazards will directly affect students' safety and may lead to safety accidents; Without the support of dynamic adjustment factors, the trajectory alignment algorithm may not be able to accurately respond to the differences in time span and shape of students' behavior trajectories, resulting in inaccurate alignment results, which will directly affect the subsequent behavior pattern analysis and safety hazard identification; without the support of automatic adjustment factors, the system may require frequent manual intervention and manual parameter adjustment to cope with changes in trajectory data, which not only increases management costs, but also may introduce human errors and reduce the overall performance of the system; the lack of dynamic limiting factors limits the system's ability to automatically optimize the trajectory alignment algorithm according to changes in student behavior data, reducing the intelligence level of the system; inaccurate trajectory alignment may affect the ability to identify safety hazards.
[0004] In view of this, the present invention proposes an Internet-based campus safety management system and method to solve the above problems. Summary of the invention
[0005] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solution: an Internet-based campus safety management system, comprising: Data acquisition module, used to obtain campus security monitoring data; The data processing module is used to pre-process the campus security monitoring data to obtain a comprehensive characteristic data set of campus security; The threat prediction module is used to obtain a campus security threat prediction model based on the campus security comprehensive feature data set training, and predict campus security threat factors based on the campus security threat prediction model; based on the predicted campus security threat factors, determine whether there is a threat to campus security; Threat diagnosis module, if there is a threat to campus security, obtains campus security threat data, inputs the campus security threat data into the trained security threat diagnosis model, and predicts the type of campus security threat; The emergency response module is used to formulate corresponding emergency plans and generate different alarm information according to the type of campus security threats; send alarm information to relevant personnel through the campus security management terminal and automatically start the emergency plan; The modules are connected to each other via wired and / or wireless means to achieve data transmission between modules.
[0006] Furthermore, the campus safety monitoring data includes student behavior data, campus environment data and campus video data; student behavior data includes student movement trajectory data and violent conflict data; campus environment data includes building structure status data, power equipment status data and fire equipment status data; campus video data includes campus public area videos, campus activity videos and individual behavior monitoring videos.
[0007] Furthermore, the method of preprocessing the campus safety monitoring data to obtain a campus safety comprehensive feature data set includes: Trajectory data mining and Markov chain are used to extract features from student behavior data to obtain a student behavior feature data set; the K-Means clustering algorithm is used to identify and remove outliers in the campus environment data and campus video data included in the campus security monitoring data to obtain a campus environment feature data set and a campus video feature data set; Performing standard deviation normalization processing on the student behavior feature dataset, the campus environment feature dataset, and the campus video feature dataset, converting them into standard normal distribution, and obtaining normalized student behavior feature datasets, campus environment feature datasets, and campus video feature datasets; The normalized student behavior feature dataset, campus environment feature dataset and campus video feature dataset are weighted fused to obtain a comprehensive feature dataset.
[0008] Furthermore, the method of extracting features from student behavior data using trajectory data mining and Markov chain to obtain a student behavior feature data set includes: S41. Preset the student movement trajectory data as a set of spatial position coordinate points in a time series: ;in, A trajectory for students to move; For students in The position coordinates of each time point; For students in The position coordinates of each time point; For students in The horizontal coordinate of the position of each time point; For students in The vertical coordinate of the position of each time point; For students in The timestamp of the location coordinates recorded at each time point; The total number of time points in the student's movement trajectory data; is the index of the time point in the student's movement trajectory data, The value range is from 1 to ; S42, another trajectory of the preset student movement is , the similarity of the two student movement trajectories is calculated by the Frechet distance measurement formula; the Frechet distance measurement formula is: ;in, Move tracks for two students and The Frechet distance between is the alignment path function; is the set of all alignment paths; Indicates that all alignment paths are confirmed; Indicates that the supremum operation is performed on all time points; is the Euclidean distance; Mobile Tracks for Students At the point in time The location coordinates of S43, dynamically designing the alignment path function by introducing the total number of time points in the student movement trajectory data; the alignment path function is: ;in, Represents the student movement trajectory In the The location of a point in time; Represents the student movement trajectory In the The location of a point in time; Adjustment factor for alignment paths; is the normalization factor; the adjustment factor for the alignment path Perform dynamic constraints and automatically adjust the value of the constraint alignment path adjustment factor; S44, grouping all students' movement trajectories through DBSCAN clustering algorithm, and dividing students' movement trajectories into different behavior patterns; S45. Based on trajectory data mining, different behavior patterns are modeled using Markov chains, the state space of student behavior is defined, and the behavior of students at different locations is divided into different states. The state space of student behavior is: ;in, For students a behavior pattern; An index of behavior patterns; is the total number of behavior patterns; S46. Define the state sequence in the student behavior trajectory as , then the state transfer matrix is expressed as: ;in, represents the state transfer matrix; Indicates from the state Transfer to state probability; Represents the number of rows and columns in the state transition matrix; and An index representing the state; S47, using Markov chain, extracting student behavior feature data set, student behavior features include state transition probability and residence time; preset from state Transfer to state The number of times is , then the state transition probability is expressed as: ;in, Indicates from the state Transfer to state probability; To indicate status Transfer to state The number of times; Indicates from the state The total number of transitions to all states; For each state , define the dwell time The length of time that the student stays in the state is calculated using the residence time evaluation formula. The residence time evaluation formula is: ;in, Status The length of stay; A specific point in time in the student's movement trajectory; is the indicator function; For at time point The status of students; S48. Combine the extracted student behavior features to obtain a student behavior feature dataset.
[0009] Furthermore, the alignment path adjustment factor Methods for dynamic limiting include: Adjust the alignment path factor using the adjustment factor restriction formula Perform dynamic restriction and adjust the restriction formula as follows: ;in, To control the alignment path adjustment factor Constant factor of maximum value; Adjustment factor for alignment paths to control trajectory time span changes The weighting factor of the impact degree; Adjustment factor for alignment paths to control trajectory shape differences The weighting factor of the impact degree; It is the change in the total number of time points in the student movement trajectory data.
[0010] Furthermore, the training method of the campus security threat prediction model includes: The data set is divided into training set, validation set and test set, and the model is trained and the model performance is evaluated; a danger probability prediction model is constructed, and the sample set is a subset of the data set. Each sample set includes a historical campus safety comprehensive feature data set and the corresponding campus safety threat factors; The campus security threat prediction model includes an input layer, a hidden layer and an output layer; the hidden layer uses a ReLU activation function; the input layer of the model is used to input a historical campus security comprehensive feature data set; the output layer of the model is used to output campus security threat factors; the campus security threat prediction model is a multimodal neural network model; The mean square error is used as the loss function to measure the error between the model's predicted value and the actual value; the hazard probability prediction model is trained using the training set, and the model parameters are updated through the back propagation algorithm and the gradient descent method to minimize the loss function; the performance of the campus safety threat prediction model is evaluated by calculating the determination coefficient using the validation set, and the hyperparameters of the model are tuned; The Adam optimization algorithm is selected as the optimizer, and the hyperparameters of the model are adjusted until the performance no longer improves or the preset number of iterations is reached. The test set is used to evaluate the performance of the model in the prediction task, and the trained campus safety threat prediction model is used to predict the current campus safety comprehensive feature data set to obtain the campus safety threat factor.
[0011] Furthermore, the method for judging whether there is a threat to campus security based on the predicted campus security threat factors includes: Preset a campus security threat factor threshold, and compare the predicted campus security threat factor with the preset campus security threat factor threshold; If the predicted campus security threat factor is greater than or equal to the preset campus security threat factor threshold, it is determined that there is a threat to campus security; If the predicted campus safety threat factor is less than the preset campus safety threat factor threshold, it is determined that there is no threat to campus safety.
[0012] Furthermore, the training method of the security threat diagnosis model includes: The dataset is divided into training set, validation set and test set to train the model and evaluate the model performance; the sample set is a subset of the dataset, and each sample contains historical campus security threat data and the corresponding campus security threat type; Construct a security threat diagnosis model, which includes an input layer, an encoding layer, a multimodal fusion layer, a decoding layer and an output layer; the input layer is used to input historical campus security threat data, and the output layer is used to output campus security threat types; the output layer is set with neurons equal to the number of campus security threat types, and each neuron corresponds to the predicted probability of a campus security threat type; the softmax function is used as the activation function; the security threat diagnosis model is a multimodal Transformer model; Use multi-classification cross entropy as the model's loss function to measure the difference between the model's predicted value and the actual value; use the training set to train the security threat diagnosis model, and update the model parameters through the back propagation algorithm to minimize the loss function; use the mini-batch gradient descent method to update the model once per batch; use the validation set to evaluate the performance of the security threat diagnosis model by calculating the recall rate indicator; The SGD optimization algorithm is selected as the optimizer, and the model is tuned according to the performance feedback of the validation set. The model parameters are adjusted until the performance no longer improves or the preset stopping condition is reached. The test set is used to evaluate the performance of the model in the prediction task, and the trained security threat diagnosis model is used to predict the current campus security threat data to obtain the campus security threat type.
[0013] Furthermore, the method of formulating corresponding emergency plans and generating different alarm information according to the types of campus security threats includes: The types of campus safety threats include violent incidents, self-harming behaviors, fire safety threats, threats from outsiders on campus, network security threats, public safety incidents, traffic safety accidents, public health emergencies, and terrorist activities on campus; In case of violent incidents, we will initiate security patrols on campus and call the security guard or police station; in case of self-harm, we will initiate intervention at the psychological counseling center and notify the mental health teacher; in case of fire safety threats, we will initiate the fire emergency plan, broadcast emergency evacuation instructions and call the fire department; in case of threats from outsiders on campus, we will track the movements of outsiders through cameras, and security personnel on campus will set up checkpoints and strengthen patrols, and strengthen identity verification at the school gate; in case of network security threats, we will monitor abnormal network behavior through firewalls, and promptly detect and handle network attacks; For public safety incidents, security personnel will cooperate with on-site persons in charge to conduct guidance and dissuasion. If violence or other dangerous behaviors occur, they will immediately report to the relevant law enforcement agencies for intervention and coordinate police forces to disperse them. For traffic safety accidents, the causes of the accidents will be analyzed through cameras, and traffic police and emergency personnel will be dispatched. For public health emergencies, the public health emergency plan will be immediately activated, and the school clinic and health department will be notified to conduct on-site inspections, block the source of epidemic transmission, and isolate them. For terrorist activities on campus, the police and special police will be notified for support, blockades will be implemented, and strict searches will be conducted. Different alarm information will be generated according to different types of campus security threats, indicating different alarm levels for relevant personnel.
[0014] A campus safety management method based on the Internet, comprising: S1. Obtain campus security monitoring data; S2. Preprocess the campus security monitoring data to obtain a comprehensive campus security feature data set; S3. A danger probability prediction model is obtained by training the campus safety comprehensive feature data set. Based on the danger probability prediction model, campus safety threat factors are predicted; based on the predicted campus safety threat factors, whether there is a threat to campus safety is determined; S4. If there is a threat to campus security, obtain campus security threat data, input the campus security threat data into the trained security threat diagnosis model, and predict the type of campus security threat; S5. According to the type of campus security threat, formulate corresponding emergency plans and generate different alarm information; send alarm information to relevant personnel through the campus security management terminal and automatically start the emergency plan.
[0015] The technical effects and advantages of the Internet-based campus safety management system and method of the present invention are as follows: Through trajectory data mining and clustering algorithms, the present invention can identify students' abnormal behavior patterns (such as staying in an inactive area for a long time or moving abnormally frequently), thereby improving the ability to discover potential risks; quantify the law of students' transition from one behavior pattern (such as location or activity) to another behavior pattern through state transition probability, revealing the trend of dynamic changes in behavior; evaluate the activity intensity of students in a specific location or state through residence time, providing a basis for analyzing students' learning and life behaviors; use Markov chains to model behavior patterns, and discover irregular state transitions in student behavior (such as moving directly from a teaching building to an unsafe area), which helps to quickly identify safe areas. hidden dangers; Frechet distance measures the similarity of trajectories, which can effectively screen abnormal trajectories and further enhance the system's abnormal behavior detection capabilities; by dynamically designing the alignment path function and dynamically limiting the adjustment factors, the system can automatically adapt to the trajectory patterns of different students to ensure the accuracy and universality of the analysis results; the clustering algorithm groups student behaviors and identifies different behavior patterns (such as ordinary commuting trajectories and collective activity trajectories), which can analyze individual behaviors and monitor group behaviors to meet the diverse needs of campus management; by extracting and analyzing students' behavioral characteristics, potential safety hazards can be discovered and intervened in a timely manner, providing students with a safer campus environment; Dynamically restricting the alignment path adjustment factor can optimize the accuracy of trajectory alignment. In trajectory comparison, students' behavioral trajectories may have differences in time span and shape. Using adjustment factors to fine-tune can ensure the accuracy of the alignment path, thereby better capturing behavioral patterns; by introducing influencing factors of trajectory time span changes and trajectory shape differences, this method can adapt to the differences in time and space between different trajectories. For example, when students' activities occur in different time periods, the dynamic restriction factor can be flexibly adjusted to ensure the rationality and stability of trajectory alignment; reducing the need for manual intervention and manual parameter adjustment, the system automatically optimizes the trajectory alignment algorithm according to changes in student behavior data, improving the degree of automation and the intelligence level of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of the structure of an Internet-based campus security management system of the present invention; Figure 2 The present invention is a flow chart of a campus safety management method based on the Internet. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] Example 1 See also Figure 1 As shown, this embodiment is an Internet-based campus safety management system, including: Data acquisition module, used to obtain campus security monitoring data; The data processing module is used to pre-process the campus security monitoring data to obtain a comprehensive characteristic data set of campus security; The threat prediction module is used to obtain a campus security threat prediction model based on the campus security comprehensive feature data set training, and predict campus security threat factors based on the campus security threat prediction model; based on the predicted campus security threat factors, determine whether there is a threat to campus security; Threat diagnosis module, if there is a threat to campus security, obtains campus security threat data, inputs the campus security threat data into the trained security threat diagnosis model, and predicts the type of campus security threat; The emergency response module is used to formulate corresponding emergency plans and generate different alarm information according to the type of campus security threats; send alarm information to relevant personnel through the campus security management terminal and automatically start the emergency plan; The modules are connected to each other via wired and / or wireless means to achieve data transmission between modules.
[0019] Campus safety monitoring data includes student behavior data, campus environment data and campus video data; student behavior data includes student movement trajectory data and violent conflict data; campus environment data includes building structure status data, power equipment status data and fire equipment status data; campus video data includes campus public area videos, campus activity videos and individual behavior monitoring videos.
[0020] The method of preprocessing campus safety monitoring data to obtain a comprehensive campus safety feature data set includes: Trajectory data mining and Markov chain are used to extract features from student behavior data to obtain a student behavior feature data set; the K-Means clustering algorithm is used to identify and remove outliers in the campus environment data and campus video data included in the campus security monitoring data to obtain a campus environment feature data set and a campus video feature data set; Performing standard deviation normalization processing on the student behavior feature dataset, the campus environment feature dataset, and the campus video feature dataset, converting them into standard normal distribution, and obtaining normalized student behavior feature datasets, campus environment feature datasets, and campus video feature datasets; The normalized student behavior feature dataset, campus environment feature dataset and campus video feature dataset are weighted fused to obtain a comprehensive feature dataset.
[0021] Methods for extracting features from student behavior data using trajectory data mining and Markov chains to obtain student behavior feature datasets include: S41. Preset the student movement trajectory data as a set of spatial position coordinate points in a time series: ;in, A trajectory for students to move; For students in The position coordinates of each time point; For students in The position coordinates of each time point; For students in The horizontal coordinate of the position of each time point; For students in The vertical coordinate of the position of each time point; For students in The timestamp of the location coordinates recorded at each time point; The total number of time points in the student's movement trajectory data; is the index of the time point in the student's movement trajectory data, The value range is from 1 to ; S42, another trajectory of the preset student movement is , the similarity of the two students' movement trajectories is calculated by the Frechet distance measurement formula; by calculating the trajectory similarity, students with similar behavior patterns can be classified together to find out whether their behaviors are regular or detect whether there are abnormal behaviors; the Frechet distance measurement formula is: ;in, Move tracks for two students and The Frechet distance between them is used to measure the shape difference of two students' movement trajectories. It measures the shape similarity of two students' movement trajectories. The smaller the distance, the higher the similarity of the trajectories. is the alignment path function, indicating the time point Function to align corresponding points of two student movement trajectories; is the set of all alignment paths; It means to perform the next determination operation on all alignment paths, that is, to find an optimal alignment path so that the maximum spatial distance between the two student movement trajectories is minimized; Indicates that the supremum operation is performed on all time points, that is, the interval is found All time points The maximum value of is the Euclidean distance, used to calculate the alignment path function and trajectory At the point in time distance; Mobile Tracks for Students At the point in time The location coordinates of S43. The alignment path function is dynamically designed by introducing the total number of time points in the student movement trajectory data to improve the alignment capability of complex student movement trajectories; the alignment path function is: ;in, Represents the student movement trajectory In the The location of a point in time; Represents the student movement trajectory In the The location of a point in time; Adjustment factor for alignment path, used to control student movement trajectory and student movement trajectories The proportion of influence on the alignment path; is the normalization factor used to index the time points Convert to a value in the range [0,1] to align between two tracks; adjust the factor for the alignment path Perform dynamic constraints and automatically adjust the value of the constraint alignment path adjustment factor; When the time When it approaches 0, the normalization factor The proportion will be very small, and the student movement trajectory The position has a greater impact; when the time point Approaching When The ratio will be close to 1, at this time the student movement trajectory The position has a greater impact; For example, there are two student movement trajectories and , respectively represent the positions of student 1 and student 2 at different time points; Student 1's movement trajectory Contains 5 time points ; Student 2's movement trajectory Contains 5 time points ; Alignment path adjustment factor 0.5, indicating the student's moving trajectory and The effect on the alignment path is the same, the normalization factor at the first time point , the normalization factor at the second time point , the normalization factor at the third time point , the normalization factor at the 4th time point , the normalization factor at the 5th time point ; Compute the aligned trajectory for each time point: ; ; ; ; ; The coordinate points corresponding to the final alignment path are: , , ; ; ; S44. All student movement trajectories are grouped through the DBSCAN clustering algorithm, and the student movement trajectories are divided into different behavior patterns (such as classes, meals, rest, gathering activities, etc.), which helps campus managers understand the daily activity patterns of students; detect abnormal trajectories that deviate from normal behavior patterns (such as frequent wandering in restricted areas, long-term stay in inactive areas, etc.), and provide early warning for campus safety.
[0022] S45. Based on trajectory data mining, different behavior patterns are modeled using Markov chains, the state space of student behavior is defined, and the behavior of students at different locations is divided into different states. The state space of student behavior is: ;in, For students a behavior pattern; An index of behavior patterns; is the total number of behavior patterns; S46. Define the state sequence in the student behavior trajectory as , then the state transfer matrix is expressed as: ;in, represents the state transfer matrix; Indicates from the state Transfer to state probability; Represents the number of rows and columns in the state transition matrix, that is, the state sequence The total number of states in and An index representing the state; S47, using Markov chain, extracting student behavior feature data set, student behavior features include state transition probability and residence time; preset from state Transfer to state The number of times is , then the state transition probability is expressed as: ;in, Indicates from the state Transfer to state probability; To indicate status Transfer to state The number of times; Indicates from the state The total number of transitions to all states; the total number of behavior patterns Less than state sequence The total number of states , because a behavior pattern may contain multiple states; a behavior pattern may be extracted from the combination or analysis of multiple states, such as "learning mode" and "leisure mode"; For each state , define the dwell time The length of time that the student stays in the state is calculated using the residence time evaluation formula. The residence time evaluation formula is: ;in, Status The duration of stay of students in a certain state Total length of stay; A specific point in time in the student's movement trajectory; is an indicator function used to determine at a time point Is the student in the state ,when hour, Take 1, otherwise 0; For at time point The status of students; S48. Combine the extracted student behavior features to obtain a student behavior feature dataset.
[0023] Adjustment factor for alignment paths Methods for dynamic limiting include: Adjust the alignment path factor using the adjustment factor restriction formula Perform dynamic restriction and adjust the restriction formula as follows: ;in, To control the alignment path adjustment factor Constant factor of maximum value; Adjustment factor for alignment paths to control trajectory time span changes The weighting factor of the impact degree; Adjustment factor for alignment paths to control trajectory shape differences The weighting factor of the impact degree; is the change in the total number of time points in the student movement trajectory data, that is, the difference in the number of time points of the movement trajectories of the two students;
[0024] The number of time points of two student movement trajectories may be different. If the number of time points of two student movement trajectories is very different, using the same alignment strategy may lead to errors, because the difference in time span may affect the alignment of the trajectories. In order to avoid over-reliance on trajectories with more time points, the adjustment factor restriction formula is passed (difference in the number of time points) to adjust the factor Specifically, the greater the difference in the number of time points, the greater the factor Will be reduced accordingly, thereby reducing the excessive bias towards trajectories with more time points. This adjustment can prevent too many time points from affecting the final trajectory alignment results; the adjustment factor restriction formula can reduce the alignment weight when the trajectory shapes are very different, thereby avoiding unreasonable alignment results. This ensures that when the shapes between trajectories are very different, the trajectories will not be excessively aligned by linear interpolation, but make the alignment process more flexible and reasonable; For example, student movement trajectories Number of time points , student movement trajectory Number of time points ; Two student movement trajectories and Frechet distance between is 5, which is the change in the total number of time points in the student's movement trajectory data , total time points ,so: , controls the alignment path adjustment factor Constant factor of maximum value 1; Control the adjustment factor of the alignment path by the change of trajectory time span Weight factor of influence 1; Controls the adjustment factor of the trajectory shape difference to the alignment path Weight factor of influence is 0.2; then the alignment path adjustment factor after dynamic restriction ; Generally, the number of time points in a trajectory has a greater impact on the alignment process, especially when the number of time points in two trajectories differs greatly. The difference in the number of time points directly affects the temporal resolution of the trajectory and may cause a large deviation in the alignment path. Therefore, if the difference in the number of time points is large, a larger weight factor should be given. Generally speaking, setting 1 is more appropriate; The trajectory shape difference reflects the difference in spatial distribution of two trajectories. Usually, the trajectory shape difference plays a small role in alignment, because the adjustment of spatial difference usually depends on the influence of time difference. However, if the trajectory shape difference is large, it may have a greater impact on the alignment, especially when the time points of the trajectory are very close. The weight factor for shape difference is generally small, such as 0.2 or less, to avoid excessively affecting the alignment process; In order to obtain reasonable alignment results, multiple experiments are required. For example, if the experimental data shows that the difference in the number of time points is much greater than the effect of the shape difference on the alignment result, then the weight factor of the number of time points can be increased. to make its impact more prominent.
[0025] The training methods of the campus security threat prediction model include: The data set is divided into training set, validation set and test set, and the model is trained and the model performance is evaluated; a danger probability prediction model is constructed, and the sample set is a subset of the data set. Each sample set includes a historical campus safety comprehensive feature data set and the corresponding campus safety threat factors; The campus security threat prediction model includes an input layer, a hidden layer, and an output layer; the hidden layer uses the ReLU activation function; the input layer of the model is used to input the historical campus security comprehensive feature data set; the output layer of the model is used to output the campus security threat factor; the campus security threat prediction model is a multimodal neural network model; The mean square error is used as the loss function to measure the error between the model's predicted value and the actual value; the hazard probability prediction model is trained using the training set, and the model parameters are updated through the back propagation algorithm and the gradient descent method to minimize the loss function; the performance of the campus safety threat prediction model is evaluated by calculating the determination coefficient using the validation set, and the hyperparameters of the model are tuned; The Adam optimization algorithm is selected as the optimizer, and the hyperparameters of the model are adjusted until the performance no longer improves or the preset number of iterations is reached. The test set is used to evaluate the performance of the model in the prediction task, and the trained campus safety threat prediction model is used to predict the current campus safety comprehensive feature data set to obtain the campus safety threat factor.
[0026] Based on the predicted campus security threat factors, the methods for judging whether there is a threat to campus security include: Preset a campus security threat factor threshold, and compare the predicted campus security threat factor with the preset campus security threat factor threshold; If the predicted campus security threat factor is greater than or equal to the preset campus security threat factor threshold, it is determined that there is a threat to campus security; If the predicted campus safety threat factor is less than the preset campus safety threat factor threshold, it is determined that there is no threat to campus safety.
[0027] The training methods of the security threat diagnosis model include: The dataset is divided into training set, validation set and test set to train the model and evaluate the model performance; the sample set is a subset of the dataset, and each sample contains historical campus security threat data and the corresponding campus security threat type; Construct a security threat diagnosis model, which includes an input layer, an encoding layer, a multimodal fusion layer, a decoding layer, and an output layer; the input layer is used to input historical campus security threat data, and the output layer is used to output campus security threat types; the output layer is set with neurons equal to the number of campus security threat types, and each neuron corresponds to the predicted probability of a campus security threat type; the softmax function is used as the activation function; the security threat diagnosis model is a multimodal Transformer model; Use multi-classification cross entropy as the model's loss function to measure the difference between the model's predicted value and the actual value; use the training set to train the security threat diagnosis model, and update the model parameters through the back propagation algorithm to minimize the loss function; use the mini-batch gradient descent method to update the model once per batch; use the validation set to evaluate the performance of the security threat diagnosis model by calculating the recall rate indicator; The SGD optimization algorithm is selected as the optimizer, and the model is tuned according to the performance feedback of the validation set. The model parameters are adjusted until the performance no longer improves or the preset stopping condition is reached. The test set is used to evaluate the performance of the model in the prediction task, and the trained security threat diagnosis model is used to predict the current campus security threat data to obtain the campus security threat type.
[0028] According to the type of campus security threat, formulate corresponding emergency plans and generate different alarm information methods including: Campus safety threat types include violent incidents, self-harm behaviors, fire safety threats, threats from outsiders on campus, cybersecurity threats, public safety incidents, traffic safety accidents, public health emergencies, and terrorist activities on campus; In case of violent incidents, we will initiate security patrols on campus and call the security guard or police station; in case of self-harm, we will initiate intervention at the psychological counseling center and notify the mental health teacher; in case of fire safety threats, we will initiate the fire emergency plan, broadcast emergency evacuation instructions and call the fire department; in case of threats from outsiders on campus, we will track the movements of outsiders through cameras, and security personnel on campus will set up checkpoints and strengthen patrols, and strengthen identity verification at the school gate; in case of network security threats, we will monitor abnormal network behavior through firewalls, and promptly detect and handle network attacks; For public safety incidents, security personnel will cooperate with the on-site person in charge to conduct guidance and dissuasion. If violence or other dangerous behaviors occur, they will be reported immediately to the relevant law enforcement agencies for intervention and coordination of police forces to disperse them. For traffic safety accidents, the cause of the accident will be analyzed through cameras, and traffic police and emergency personnel will be dispatched to keep traffic smooth and the injured treated in time. For public health emergencies, the public health emergency plan will be immediately activated, and the school clinic and health department will be notified to conduct on-site inspections, block the source of the epidemic, and isolate them. For terrorist activities on campus, the police and special police will be notified for support, blockades will be implemented, and strict searches will be conducted to ensure the safe evacuation of teachers and students on campus and the protection of key facilities. Generate different alarm messages according to different campus security threat types, and indicate different alarm levels to relevant personnel; For example, create a set of standardized alert message templates for each threat type, including the following: Threat Type: Clearly indicate the type of incident (e.g., violent incident, fire, safety incident, etc.).
[0029] Threat Level: Defines the alert level based on the urgency of the threat (e.g., Emergency, Warning, Information).
[0030] Time and place: The time and specific location (such as building, area, class, etc.) when the incident occurred.
[0031] Event Description: Briefly describe the occurrence and nature of the threat event.
[0032] Emergency measures: Emergency plans, measures or actions recommended for this type of threat.
[0033] Alarm Level: Indicates the alarm level to systems and personnel to determine response speed and staffing (e.g., red, orange, yellow).
[0034] Example of alarm information content: Violence: Threat Type: Violence; Threat Level: Urgent; Time and place: January 20, 2025, Teaching Building A101; Brief description of the incident: Students were found fighting in A101 of the teaching building; Emergency measures: Initiate on-campus security patrols, call the security guards or police station, and conduct on-site intervention; Alarm level: red.
[0035] Self-harming behaviors: Threat Type: Self-harm; Threat Level: Urgent; Time and place: January 20, 2025, Student Dormitory Building B; Brief description of the incident: Students were found to be engaging in self-harming behavior; Emergency measures: notify the psychological counseling center and immediately notify the mental health teacher to intervene; Alarm level: orange.
[0036] Fire safety threats: Threat Type: Fire safety threat; Threat Level: Urgent; Time and location: January 20, 2025, Teaching Building C; Brief description of the incident: A fire broke out in teaching building C, which was filled with smoke; Emergency measures: activate the fire emergency plan, broadcast emergency evacuation instructions, call the fire department, and evacuate people in time; Alarm level: red.
[0037] Cybersecurity Threats: Threat type: Cyber attack; Threat Level: Warning; Time and place: January 20, 2025, campus network; Brief description of the incident: It was discovered that the campus network was under a DDoS attack.
[0038] Emergency measures: Isolate the attacked network through firewall monitoring, immediately fix the vulnerability, and notify the IT department; Alarm level: yellow.
[0039] Public safety incidents: Threat Type: Public safety incident; Threat Level: Warning; Time and location: January 20, 2025, Campus Square; Brief description of the incident: It was discovered that there were people gathering in the campus square and there was a large-scale demonstration.
[0040] Emergency measures: Security personnel will conduct counseling and if violence escalates, call the police.
[0041] Alarm level: orange.
[0042] Traffic safety accidents: Threat type: Traffic accident; Threat Level: Warning; Time and location: January 20, 2025, at the east gate of the campus; Brief description of the incident: A traffic accident occurred, resulting in traffic congestion on campus.
[0043] Emergency measures: dispatch traffic police and ambulances, direct traffic, and treat the wounded.
[0044] Alarm level: yellow.
[0045] Public Health Emergencies: Threat Type: Public Health Emergency; Threat Level: Urgent; Time and place: January 20, 2025, student dormitory area; Brief description of the incident: A food poisoning incident occurred, and several students suffered from vomiting and abdominal pain; Emergency measures: Activate the public health emergency plan, immediately notify the medical office to handle the situation, block the source of contamination and isolate the victims; Alarm level: red.
[0046] Terrorist activities on campus: Threat Type: Terrorism; Threat Level: Urgent; Date and location: January 20, 2025, campus administration building; Brief description of the incident: A report was received of a suspicious person carrying suspicious items on campus; Emergency measures: notify the police and special police for support, implement blockade and search, and ensure safe evacuation; Alarm level: red.
[0047] The preset campus security threat factor threshold is set by the staff, and different campus security threat factors are obtained through the campus security management terminal, and the average value of multiple campus security threat factors is taken as the preset campus security threat factor threshold.
[0048] In this embodiment, through trajectory data mining and clustering algorithms, students' abnormal behavior patterns (such as staying in an inactive area for a long time or abnormally frequent movement) can be identified, thereby improving the ability to discover potential risks; the law of students' transition from one behavior pattern (such as location or activity) to another behavior pattern can be quantified through state transition probability, revealing the trend of dynamic changes in behavior; the activity intensity of students in a specific location or state can be evaluated through residence time, providing a basis for analyzing students' learning and living behaviors; using Markov chains to model behavior patterns, it is possible to discover irregular state transitions in student behavior (such as moving directly from a teaching building to an unsafe area), which helps to quickly identify safe areas. The system can detect all hidden dangers; the Frechet distance measures the similarity of trajectories, which can effectively screen abnormal trajectories and further enhance the system's abnormal behavior detection capability; through dynamic design of the alignment path function and dynamic restriction of the adjustment factor, the system can automatically adapt to the trajectory patterns of different students to ensure the accuracy and universality of the analysis results; the clustering algorithm groups student behaviors and identifies different behavior patterns (such as ordinary commuting trajectories and collective activity trajectories), which can analyze individual behaviors and monitor group behaviors to meet the diverse needs of campus management; by extracting and analyzing students' behavioral characteristics, it can timely discover and intervene in potential safety hazards, providing students with a safer campus environment; Dynamically restricting the alignment path adjustment factor can optimize the accuracy of trajectory alignment. In trajectory comparison, students' behavioral trajectories may have differences in time span and shape. Using adjustment factors to fine-tune can ensure the accuracy of the alignment path, thereby better capturing behavioral patterns; by introducing influencing factors of trajectory time span changes and trajectory shape differences, this method can adapt to the differences in time and space between different trajectories. For example, when students' activities occur in different time periods, the dynamic restriction factor can be flexibly adjusted to ensure the rationality and stability of trajectory alignment; reducing the need for manual intervention and manual parameter adjustment, the system automatically optimizes the trajectory alignment algorithm according to changes in student behavior data, improving the degree of automation and the intelligence level of the system.
[0049] Example 2 See also Figure 2 As shown, the part not described in detail in this embodiment is described in Example 1, which provides an Internet-based campus safety management method, including: S1. Obtain campus security monitoring data; S2. Preprocess the campus security monitoring data to obtain a comprehensive campus security feature data set; S3. A danger probability prediction model is obtained by training the campus safety comprehensive feature data set. Based on the danger probability prediction model, campus safety threat factors are predicted; based on the predicted campus safety threat factors, whether there is a threat to campus safety is determined; S4. If there is a threat to campus security, obtain campus security threat data, input the campus security threat data into the trained security threat diagnosis model, and predict the type of campus security threat; S5. According to the type of campus security threat, formulate corresponding emergency plans and generate different alarm information; send alarm information to relevant personnel through the campus security management terminal and automatically start the emergency plan.
[0050] Since the electronic device introduced in the present embodiment is an electronic device used for implementing a campus security management system and method based on the Internet in the embodiment of the present application, based on a campus security management system and method based on the Internet introduced in the embodiment of the present application, a person skilled in the art can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as a person skilled in the art implements an electronic device used for a campus security management system and method based on the Internet in the embodiment of the present application, it belongs to the scope protected by the present application.
[0051] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0052] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A campus safety management system based on the Internet, characterized in that: include: Data acquisition module, used to obtain campus security monitoring data; The data processing module is used to pre-process the campus security monitoring data to obtain a comprehensive characteristic data set of campus security; The threat prediction module is used to obtain a campus security threat prediction model based on the campus security comprehensive feature data set training, and predict campus security threat factors based on the campus security threat prediction model; based on the predicted campus security threat factors, determine whether there is a threat to campus security; Threat diagnosis module, if there is a threat to campus security, obtains campus security threat data, inputs the campus security threat data into the trained security threat diagnosis model, and predicts the type of campus security threat; The emergency response module is used to formulate corresponding emergency plans and generate different alarm information according to the type of campus security threats; send alarm information to relevant personnel through the campus security management terminal and automatically start the emergency plan; The modules are connected to each other via wired and / or wireless means to achieve data transmission between the modules.
2. The Internet-based campus safety management system according to claim 1 is characterized in that: The campus security monitoring data includes student behavior data, campus environment data and campus video data; student behavior data includes student movement trajectory data and violent conflict data; campus environment data includes building structure status data, power equipment status data and fire equipment status data; campus video data includes campus public area videos, campus activity videos and individual behavior monitoring videos.
3. The Internet-based campus safety management system according to claim 2 is characterized in that: The method for preprocessing campus safety monitoring data to obtain a campus safety comprehensive feature data set includes: Trajectory data mining and Markov chain are used to extract features from student behavior data to obtain a student behavior feature data set; the K-Means clustering algorithm is used to identify and remove outliers in the campus environment data and campus video data included in the campus security monitoring data to obtain a campus environment feature data set and a campus video feature data set; Performing standard deviation normalization processing on the student behavior feature dataset, the campus environment feature dataset, and the campus video feature dataset, converting them into standard normal distribution, and obtaining normalized student behavior feature datasets, campus environment feature datasets, and campus video feature datasets; The normalized student behavior feature dataset, campus environment feature dataset and campus video feature dataset are weighted fused to obtain a comprehensive campus safety feature dataset.
4. The Internet-based campus safety management system according to claim 3 is characterized in that: The method of extracting features from student behavior data using trajectory data mining and Markov chain to obtain a student behavior feature data set includes: S41. Preset the student movement trajectory data as a set of spatial position coordinate points in a time series: ;in, A trajectory for students to move; For students in The position coordinates of each time point; For students in The position coordinates of each time point; For students in The horizontal coordinate of the position of each time point; For students in The vertical coordinate of the position of each time point; For students in The timestamp of the location coordinates recorded at each time point; The total number of time points in the student's movement trajectory data; is the index of the time point in the student's movement trajectory data, The value range is from 1 to ; S42, another trajectory of the preset student movement is , the similarity of the two student movement trajectories is calculated by the Frechet distance measurement formula; the Frechet distance measurement formula is: ;in, Move tracks for two students and The Frechet distance between is the alignment path function; is the set of all alignment paths; Indicates that all alignment paths are confirmed; Indicates that the supremum operation is performed on all time points; is the Euclidean distance; Mobile Tracks for Students At the point in time The location coordinates of S43, dynamically designing the alignment path function by introducing the total number of time points in the student movement trajectory data; the alignment path function is: ;in, Represents the student movement trajectory In the The location of a point in time; Represents the student movement trajectory In the The location of a point in time; Adjustment factor for alignment paths; is the normalization factor; the adjustment factor for the alignment path Perform dynamic constraints and automatically adjust the value of the constraint alignment path adjustment factor; S44, grouping all students' movement trajectories through DBSCAN clustering algorithm, and dividing students' movement trajectories into different behavior patterns; S45. Based on trajectory data mining, different behavior patterns are modeled using Markov chains, the state space of student behavior is defined, and the behavior of students at different locations is divided into different states. The state space of student behavior is: ;in, For students a behavior pattern; An index of behavior patterns; is the total number of behavior patterns; S46. Define the state sequence in the student behavior trajectory as , then the state transfer matrix is expressed as: ;in, represents the state transfer matrix; Indicates from the state Transfer to state The probability of Represents the number of rows and columns in the state transition matrix; and An index representing the state; S47, using Markov chain, extracting student behavior feature data set, student behavior features include state transition probability and residence time; preset from state Transfer to state The number of times is , then the state transition probability is expressed as: ;in, Indicates from the state Transfer to state The probability of To indicate status Transfer to state The number of times; Indicates from the state The total number of transitions to all states; For each state , define the dwell time The length of time that the student stays in the state is calculated using the residence time evaluation formula. The residence time evaluation formula is: ;in, Status The length of stay; A specific point in time in the student's movement trajectory; is the indicator function; For at time point The status of students; S48. Combine the extracted student behavior features to obtain a student behavior feature dataset.
5. The Internet-based campus safety management system according to claim 4 is characterized in that: The alignment path adjustment factor Methods for dynamic limiting include: Adjust the alignment path factor using the adjustment factor restriction formula Perform dynamic restriction and adjust the restriction formula as follows: ;in, To control the alignment path adjustment factor Constant factor of maximum value; Adjustment factor for alignment paths to control trajectory time span changes The weighting factor of the impact degree; Adjustment factor for alignment paths to control trajectory shape differences The weighting factor of the impact degree; It is the change in the total number of time points in the student movement trajectory data.
6. The Internet-based campus safety management system according to claim 5 is characterized in that: The training method of the campus security threat prediction model includes: The data set is divided into training set, validation set and test set, and the model is trained and the model performance is evaluated; a danger probability prediction model is constructed, and the sample set is a subset of the data set. Each sample set includes a historical campus safety comprehensive feature data set and the corresponding campus safety threat factors; The campus security threat prediction model includes an input layer, a hidden layer and an output layer; the hidden layer uses a ReLU activation function; the input layer of the model is used to input a historical campus security comprehensive feature data set; the output layer of the model is used to output campus security threat factors; the campus security threat prediction model is a multimodal neural network model; The mean square error is used as the loss function to measure the error between the model's predicted value and the actual value; the hazard probability prediction model is trained using the training set, and the model parameters are updated through the back propagation algorithm and the gradient descent method to minimize the loss function; the performance of the campus safety threat prediction model is evaluated by calculating the determination coefficient using the validation set, and the hyperparameters of the model are tuned; The Adam optimization algorithm is selected as the optimizer, and the hyperparameters of the model are adjusted until the performance no longer improves or the preset number of iterations is reached. The test set is used to evaluate the performance of the model in the prediction task, and the trained campus safety threat prediction model is used to predict the current campus safety comprehensive feature data set to obtain the campus safety threat factor.
7. The Internet-based campus safety management system according to claim 6 is characterized in that: The method for judging whether there is a threat to campus security based on the predicted campus security threat factors includes: Preset a campus security threat factor threshold, and compare the predicted campus security threat factor with the preset campus security threat factor threshold; If the predicted campus security threat factor is greater than or equal to the preset campus security threat factor threshold, it is determined that there is a threat to campus security; If the predicted campus safety threat factor is less than the preset campus safety threat factor threshold, it is determined that there is no threat to campus safety.
8. The Internet-based campus safety management system according to claim 7 is characterized in that: The training method of the security threat diagnosis model includes: The dataset is divided into training set, validation set and test set to train the model and evaluate the model performance; the sample set is a subset of the dataset, and each sample contains historical campus security threat data and the corresponding campus security threat type; Construct a security threat diagnosis model, which includes an input layer, an encoding layer, a multimodal fusion layer, a decoding layer and an output layer; the input layer is used to input historical campus security threat data, and the output layer is used to output campus security threat types; the output layer is set with neurons equal to the number of campus security threat types, and each neuron corresponds to the predicted probability of a campus security threat type; the softmax function is used as the activation function; the security threat diagnosis model is a multimodal Transformer model; Use multi-classification cross entropy as the model's loss function to measure the difference between the model's predicted value and the actual value; use the training set to train the security threat diagnosis model, and update the model parameters through the back propagation algorithm to minimize the loss function; use the mini-batch gradient descent method to update the model once per batch; use the validation set to evaluate the performance of the security threat diagnosis model by calculating the recall rate indicator; The SGD optimization algorithm is selected as the optimizer, and the model is tuned according to the performance feedback of the validation set. The model parameters are adjusted until the performance no longer improves or the preset stopping condition is reached. The test set is used to evaluate the performance of the model in the prediction task, and the trained security threat diagnosis model is used to predict the current campus security threat data to obtain the campus security threat type.
9. The Internet-based campus safety management system according to claim 8, characterized in that: The method of formulating corresponding emergency plans and generating different alarm information according to the types of campus security threats includes: The types of campus safety threats include violent incidents, self-harming behaviors, fire safety threats, threats from outsiders on campus, network security threats, public safety incidents, traffic safety accidents, public health emergencies, and terrorist activities on campus; In case of violent incidents, we will initiate security patrols on campus and call the security guard or police station; in case of self-harm, we will initiate intervention at the psychological counseling center and notify the mental health teacher; in case of fire safety threats, we will initiate the fire emergency plan, broadcast emergency evacuation instructions and call the fire department; in case of threats from outsiders on campus, we will track the movements of outsiders through cameras, and security personnel on campus will set up checkpoints and strengthen patrols, and strengthen identity verification at the school gate; in case of network security threats, we will monitor abnormal network behavior through firewalls, and promptly detect and handle network attacks; For public safety incidents, security personnel will cooperate with on-site persons in charge to conduct guidance and dissuasion. If violence or other dangerous behaviors occur, they will immediately report to the relevant law enforcement agencies for intervention and coordinate police forces to disperse them. For traffic safety accidents, the causes of the accidents will be analyzed through cameras, and traffic police and emergency personnel will be dispatched. For public health emergencies, the public health emergency plan will be immediately activated, and the school clinic and health department will be notified to conduct on-site inspections, block the source of epidemic transmission, and isolate them. For terrorist activities on campus, the police and special police will be notified for support, blockades will be implemented, and strict searches will be conducted. Different alarm information will be generated according to different types of campus security threats, indicating different alarm levels for relevant personnel.
10. An Internet-based campus safety management method, applied to the Internet-based campus safety management system as claimed in any one of claims 1 to 9, characterized in that: include: S1. Obtain campus security monitoring data; S2. Preprocess the campus security monitoring data to obtain a comprehensive campus security feature data set; S3. A danger probability prediction model is obtained by training the campus safety comprehensive feature data set. Based on the danger probability prediction model, campus safety threat factors are predicted; based on the predicted campus safety threat factors, whether there is a threat to campus safety is determined; S4. If there is a threat to campus security, obtain campus security threat data, input the campus security threat data into the trained security threat diagnosis model, and predict the type of campus security threat; S5. According to the type of campus security threat, formulate corresponding emergency plans and generate different alarm information; send alarm information to relevant personnel through the campus security management terminal and automatically start the emergency plan.
Citation Information
Patent Citations
Internet-based campus security management system and management method
CN115311824A
Campus network public safety management method and system based on big data
CN116192510A
Campus behavior comprehensive early warning system
CN116895128A
Smart park data security management method and system
CN117675384A
Smart park multi-source data dynamic monitoring and real-time analysis system and method
CN118072255A
Cited By
Smart campus management system
CN120258574A