Security activity scheme generation method and system based on machine learning
By constructing a quantitative model of psychological characteristics through machine learning and dynamically adjusting security plans based on real-time data, the subjectivity and adaptability issues of traditional security plans have been resolved. This has enabled accurate risk assessment and optimized resource allocation for large-scale events, thereby improving the scientific nature and effectiveness of security work.
Patent Information
- Application Number
- CN202511277257.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-09
- Publication Date
- 2025-12-23
AI Technical Summary
Traditional security plans rely on human experience, which is highly subjective and poorly adaptable. They are unable to cope with complex and ever-changing on-site environments and the dynamic behavior of participants, and cannot assess psychological characteristics and risks in real time. This results in delayed risk warnings, a lack of targeted response measures, unbalanced resource allocation, and low emergency response efficiency.
The machine learning-based security activity plan generation method constructs a psychological feature quantification model through data collection and preprocessing, assesses risk levels in real time, generates and dynamically adjusts security plans, and updates the model based on real-time data.
It enables accurate prediction of the psychological state of participants, dynamically adjusts security measures to match risks, improves the timeliness and effectiveness of emergency response, optimizes resource allocation, and reduces the probability of safety accidents.
Smart Images

Figure CN121189805A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of security technology, in particular to a security activity scheme generation method and system based on machine learning. BACKGROUND
[0002] With the rapid development of social economy, the frequency of holding various large-scale activities (such as sports events, concerts, exhibitions, etc.) is increasing, and the scale of activities is also expanding, which poses unprecedented challenges to the professionalism, accuracy and real-time of security work. The traditional security activity scheme relies on manual experience to formulate, which has strong subjectivity and poor adaptability, and is difficult to cope with complex and variable on-site environment and dynamic behavior of participants.
[0003] In a personnel-intensive activity scene, the psychological state of participants (such as anxiety, panic, etc.) is closely related to the evolution of on-site risks. When a sudden situation occurs, the negative emotions of individuals can quickly spread through group effect, causing secondary risks such as crowding and stampede, which pose a serious threat to life and property safety. However, the traditional scheme is often difficult to quantitatively evaluate the psychological characteristics of participants, and cannot capture their emotional changes in real time, resulting in delayed risk warning and lack of targeted response measures.
[0004] At the same time, the interaction between physical parameters of the activity site (such as area, number of exits, passage width, etc.) and behavior characteristics of personnel (such as moving trajectory, stay time, gathering behavior, etc.) further increases the complexity of risk assessment. Traditional methods mostly use static risk assessment mode, which only designs the scheme according to the inherent properties of the site and historical cases, and is difficult to dynamically adjust the strategy combined with real-time personnel data, which is prone to problems such as imbalance of security resource allocation (such as personnel redundancy or shortage), low efficiency of emergency response, etc.
[0005] In addition, with the development of big data and artificial intelligence technology, machine learning algorithms have shown great power in data mining, pattern recognition and prediction analysis, providing a possibility for solving the intelligent problem of security scheme generation. However, the application of related technologies in the security field is still in the exploratory stage, and a complete security scheme generation method based on machine learning has not yet been formed, which cannot effectively integrate multi-dimensional data such as personnel basic information, historical behavior data, psychological characteristics and site parameters, to realize accurate risk assessment and dynamic optimization of the scheme.
[0006] Therefore, there is an urgent need for a method that can integrate multi-source data, quantify personnel psychological characteristics through machine learning algorithms, real-time assess risks and dynamically generate and adjust security schemes, in order to improve the scientificity, initiative and effectiveness of large-scale activity security work, and minimize the probability of safety accidents. SUMMARY
[0007] (I) Technical problems solved
[0008] In view of the deficiencies of the prior art, the present application provides a security activity scheme generation method and system based on machine learning, which solves the problems mentioned in the background art.
[0009] (II) Technical solutions
[0010] To achieve the above object, the present application is implemented by the following technical solutions: a security activity scheme generation method based on machine learning, comprising the following steps:
[0011] Data collection and preprocessing: Collect the basic information, historical behavior data and psychological characteristic related data of the security activity participants, and perform standardization processing;
[0012] Psychological characteristic quantification model training: Based on the preprocessed data, a model is constructed through a machine learning algorithm to predict the real-time anxiety index and panic probability of the participants;
[0013] Risk assessment: Combine the output results of the psychological characteristic quantification model with the activity site parameters to calculate the secondary risk level;
[0014] Scheme generation and adjustment: Generate an initial security scheme according to the risk level, and dynamically adjust the scheme based on real-time data;
[0015] Model updating: Regularly integrate new data sets to retrain the model to optimize the prediction performance.
[0016] As a further scheme of the present application: the data collection dimensions include:
[0017] Basic information: including the age A of the participants, the gender G, wherein male: G=1, female: G=0, the physical condition H, which takes a value of 1-5 points, and the higher the score, the better the health condition, whether there is similar large-scale activity participation experience E, wherein if yes=1, if no=0;
[0018] Historical behavior data: the last 3 times of moving trajectory data, the stay duration T, the crowded area gathering behavior C, wherein if yes=1, if no=0;
[0019] Psychological characteristic data: anxiety index An, which takes a value of 0-100 points, panic threshold Pt, which takes a value of 0-100 points, group dependence Gr, which takes a value of 0-100 points.
[0020] As a further scheme of the present application: the data preprocessing step includes:
[0021] Missing value processing: continuous data is filled with average value, and discrete data is filled with mode;
[0022] Normalization: convert data to [0, 1] interval, formula is where x' is the normalized value, x is the original data, x min , x max are the minimum and maximum values of the feature, respectively;
[0023] Outlier processing: when the difference between the sample feature value and the average value μ exceeds 3 times the standard deviation σ, replace it with the average value.
[0024] As a further scheme of the present application: the psychological feature quantification model training step comprises:
[0025] Extract 12 features: including age A', gender G', physical condition H', participation experience E', average moving speed V', average stay time T', gathering behavior frequency C', anxiety index An', panic threshold Pt', group dependence Gr', activity site familiarity Fa', and the number of accompanying people N';
[0026] The data set is divided by sliding window method, the window size is 500 samples, the sliding step is 100 samples, the first 80% is the training set, and the last 20% is the validation set;
[0027] Based on the random forest algorithm, the model is constructed, containing 100 decision trees, the maximum depth is 10, and the minimum sample number of leaf node is 5.
[0028] As a further scheme of the present application: the real-time anxiety index An(Y) prediction formula is: where An i is the anxiety index prediction value output by the i-th decision tree; the real-time panic probability Pp(Y) is calculated as: where Pp i is the panic probability output by the i-th decision tree, I() is an indicator function, which satisfies the condition that Pp i ≥0.5 is 1, otherwise 0.
[0029] As a further scheme of the present application: the risk assessment step comprises:
[0030] Input site parameters: total site area S, number of safety exits Ex, maximum number of people M, average channel width W, and number of key areas K;
[0031] Calculate the real-time personnel density: where N current is the current number of participants;
[0032] Calculate the panic diffusion coefficient:
[0033] Determine the secondary risk level R: based on The results are divided into 1-5 levels, wherein 0.3 and 0.7 are the weight values of the anxiety index and the panic spread coefficient.
[0034] As a further scheme of the present application: the scheme generation rule comprises:
[0035] When R=1, the security personnel configuration ratio is 1 per 500 people, and routine patrol is adopted;
[0036] When R=2, the security personnel configuration ratio is 1 per 300 people, and safety tips are broadcast every 30 minutes;
[0037] When R=3, the security personnel configuration ratio is 1 per 200 people, and 2 additional personnel are added in key areas, and temporary isolation belts are set up and broadcast every 15 minutes;
[0038] When R=4, the security personnel configuration ratio is 1 per 100 people, and 3 safety exits are arranged, and backup channels are activated and broadcast every 5 minutes;
[0039] When R=5, the security personnel configuration ratio is 1 per 50 people, and external support is requested, and emergency evacuation is started.
[0040] As a further scheme of the present application: the scheme dynamic adjustment mechanism is: collect real-time data every 5 minutes, when the difference between the risk levels of two consecutive times exceeds 1 level, calculate the difference degree of the new and old schemes
[0041] Wherein, F is the number of elements contained in the scheme, f new is the element value of the new scheme, f old is the element value of the old scheme, when D i ≤0.3, fine-tune the numerical element, otherwise update the scheme comprehensively.
[0042] As a further scheme of the present application: the model updating step comprises:
[0043] Triggered after completing 10 activities, the new data set D recnt is fused with the historical data set D history
[0044] Retrain the model, and replace the old model when the mean square error MSE of the new model is reduced by more than 10% compared with the old model.
[0045] A security activity scheme generation system based on machine learning, which is used to execute a security activity scheme generation method based on machine learning, the system comprises:
[0046] Data acquisition and preprocessing module: used for collecting the basic information, historical behavior data and psychological characteristic related data of security activity participants, and performing standardized processing;
[0047] Psychological characteristic quantification model training module: a psychological characteristic quantification model is constructed through a machine learning algorithm to predict the real-time psychological state of the participants;
[0048] Risk assessment module: based on the output result of the psychological characteristic quantification model, the secondary risk level in the security activity is evaluated in combination with the activity site parameters;
[0049] Scheme generation and adjustment module: an initial security scheme is generated according to the risk assessment result, and the scheme content is dynamically adjusted in combination with real-time data;
[0050] Model updating module: used for periodically updating the psychological characteristic quantification model.
[0051] (Three) beneficial effects
[0052] The present application provides a security activity scheme generation method and system based on machine learning. Compared with the prior art, the following beneficial effects are possessed:
[0053] The present application, through the machine learning algorithm to construct the psychological characteristic quantification model, can accurately predict the real-time anxiety index and panic probability of the participants, and calculate the secondary risk level in combination with the activity site parameters (such as area, number of safety exits, personnel density, etc.), so that the generated security scheme is highly matched with the actual risk level from personnel configuration, patrol mode to emergency measures, avoiding the limitations of the traditional scheme "one size fits all".
[0054] The present application, relying on the real-time data collected every 5 minutes, the system can dynamically monitor the risk level change, when the risk level difference of two consecutive times exceeds 1 level, the scheme is flexibly adjusted (fine-tuning numerical elements or overall update) through the difference calculation, to ensure that the security measures can quickly respond to the changes in the field situation, and improve the timeliness and effectiveness of emergency disposal.
[0055] The present application, the data acquisition dimension covers basic information, historical behavior and psychological characteristics, the preprocessing steps (missing value, standardization, abnormal value processing) guarantee the data quality; the data set is divided by using the sliding window, the model is constructed by using the random forest algorithm, and the model is retrained by periodically fusing the new data set (every 10 activities) (when the MSE is reduced by more than 10%, the model is updated), so that the model prediction performance is continuously optimized, providing more reliable support for risk assessment and scheme generation.
[0056] The application, in combination with the risk assessment mechanism of psychological characteristics and site parameters, can identify potential crowd panic, congestion and other secondary risks in advance, and prevent and control through a grading scheme (such as security personnel allocation under different levels, broadcast frequency, channel activation, etc.), thereby minimizing the probability of safety accidents and protecting the personal safety of participants and the smooth development of activities.
[0057] The application, based on the differentiated resource allocation according to the risk level (such as 1 security personnel per 500 people when R=1 and 1 security personnel per 50 people and request for external support when R=5), avoids over-investment or insufficient resources, optimizes the use of human and material resources under the premise of ensuring safety, and reduces security costs. BRIEF DESCRIPTION OF DRAWINGS
[0058] Figure 1 is a system block diagram of a security activity scheme generation method and system based on machine learning.
[0059] Figure 2 is a flowchart of a security activity scheme generation method and system based on machine learning. DETAILED DESCRIPTION
[0060] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the application.
[0061] Please refer to Figure 1 and Figure 2 The embodiments of the application provide the following technical solutions:
[0062] As an embodiment of the application:
[0063] The application is a security activity scheme generation method and system based on machine learning, comprising:
[0064] The data acquisition and preprocessing module is used to collect basic information, historical behavior data and psychological characteristic related data of participants in security activities, and to perform standardized processing, thereby providing high-quality input data for subsequent model training.
[0065] Step 1.1, data acquisition:
[0066] Step 1.1.1, basic information: including the age A, gender G of the participants, where male: G = 1, female: G = 0, physical condition H, which is valued at 1-5 points, and the higher the score, the better the health condition, whether there is similar large-scale activity experience E, where if yes = 1, if no = 0.
[0067] Step 1.1.2, historical behavior data: the movement trajectory data of the last 3 times participating in large-scale activities, which is collected by positioning equipment, the length of stay T, whether there is crowded area gathering behavior C, where if yes = 1, if no = 0.
[0068] Step 1.1.3, psychological characteristics data: obtained through on-site questionnaire and physiological index monitoring, including anxiety index An, valued at 0-100 points, and the higher the score, the stronger the anxiety, panic threshold Pt, valued at 0-100 points, and the lower the score, the easier to panic, group dependence Gr, valued at 0-100 points, and the higher the score, the more susceptible to group behavior.
[0069] Step 1.2, data preprocessing:
[0070] Step 1.2.1, missing value processing:
[0071] For continuous data corresponding to age A and length of stay T, the average value of all samples of this feature is used for filling;
[0072] For discrete data corresponding to gender G and whether there is similar large-scale activity experience E, the value with the highest frequency of occurrence of this feature is used for filling.
[0073] Step 1.2.2, standardization processing:
[0074] Convert all feature data to the [0, 1] interval, the formula is:
[0075] Where x' is the standardized value, x is the original feature data, x min is the minimum value of the relevant original feature data, x max is the maximum value of the relevant original feature data.
[0076] Step 1.2.3, outlier processing:
[0077] Calculate the standard deviation σ of each feature, when the difference between the feature value of the relevant sample and the average value μ of the feature exceeds 3 times the standard deviation, it is determined as an outlier, and the average value of the feature is replaced.
[0078] Psychological characteristics quantification model training module, through machine learning algorithm to construct psychological characteristics quantification model, realize real-time psychological state prediction of participants.
[0079] Step 2.1, Feature Selection:
[0080] A total of 12 features were extracted from the pre-processed dataset, including age A', gender G', physical condition H', participation experience E', average moving speed V' calculated from the moving trajectory and time, average stay duration T', gathering behavior frequency C', anxiety index An', panic threshold Pt', group dependence Gr', activity site familiarity Fa' valued from 0 to 100 points obtained through a questionnaire, and the number of accompanying people N'.
[0081] Step 2.2, Training Dataset Construction:
[0082] The sliding window method was used to divide the dataset, with a window size of 500 samples and a sliding step of 100 samples.
[0083] Among them, the first 80% of samples in each window were used as the training set, and the last 20% of samples were used as the validation set.
[0084] Step 2.3, Model Selection and Training:
[0085] The random forest algorithm was selected to construct the psychological feature quantification model, which consisted of 100 decision trees, with a maximum depth of 10 for each decision tree and a minimum sample size of 5 for the leaf node.
[0086] The input of the psychological feature quantification model was 12 feature values, and the output was the real-time anxiety index prediction value An(Y) and the real-time panic probability Pp(Y).
[0087] Real-time anxiety index prediction formula:
[0088] Where An i is the anxiety index prediction value output by the ith decision tree.
[0089] Real-time panic probability calculation:
[0090] Where Pp i is the panic probability output by the ith decision tree, and I() is an indicator function, I() = 1 when Pp i ≥ 0.5, otherwise I() = 0.
[0091] Step 2.4, Model Optimization:
[0092] The 5-fold cross-validation method was used to optimize the model, adjusting the number of decision trees and the maximum depth, with the number of decision trees ranging from 50 to 200 and the maximum depth ranging from 5 to 15. The mean square error (MSE) of the validation set was used as the evaluation index, and the model parameter combination with the smallest MSE was selected.
[0093] The mean square error calculation formula is as follows:
[0094] Wherein, n is the number of verification set samples, y (Y) j is the model prediction value, y j is the actual measured value.
[0095] The risk assessment module assesses the secondary risk level in the security activity based on the output results of the psychological characteristic quantification model and the activity site parameters.
[0096] Step 3.1, site parameter input:
[0097] Including the total area of the site S, the number of safety exits Ex, the maximum number of people M, the average channel width W, and the number of key areas K, in this embodiment, the key areas refer to stages, entrances and the like.
[0098] Step 3.2, personnel density calculation:
[0099] The calculation formula of the real-time personnel density D is as follows:
[0100] Wherein, N current is the number of current activity participants.
[0101] Step 3.3, panic diffusion coefficient calculation:
[0102] The panic diffusion coefficient Sp is used to describe the propagation speed of panic emotion in the crowd, and the calculation formula is as follows:
[0103] Wherein, each coefficient is a weight value fitted through historical data.
[0104] Step 3.4, secondary risk level determination:
[0105] The secondary risk level R is divided into 5 levels, wherein, 1-5 levels, the higher the level, the greater the risk, and the determination formula is as follows:
[0106]
[0107] Wherein, 0.3 and 0.7 are the weight values of the anxiety index and the panic diffusion coefficient, in this embodiment, they are determined through multiple simulation experiments.
[0108] This embodiment ensures high-quality and standardized input data through systematic data collection and preprocessing, providing a reliable foundation for subsequent analysis. The psychological feature quantification model constructed using the random forest algorithm can accurately predict the real-time anxiety index and panic probability of participants, enabling dynamic control of their psychological state. The risk assessment combined with event venue parameters quantifies the secondary risk level through multi-dimensional index calculation, providing a scientific and quantifiable basis for risk judgment in security activities, effectively improving the pertinence and predictive ability of security work.
[0109] As a second embodiment of the present invention:
[0110] In specific implementation, compared with Embodiment 1, the only difference between the technical solution of this embodiment and Embodiment 1 is that this embodiment also includes a scheme generation and adjustment module, which generates an initial security scheme based on the risk assessment results and dynamically adjusts the scheme content in combination with real-time data.
[0111] Step 4.1, Initial Scheme Generation Rules:
[0112] When the risk level R=1:
[0113] Security personnel allocation: One security personnel per 500 people, calculated using the following formula:
[0114] Where Sf represents the number of security personnel. This indicates rounding up to the nearest integer.
[0115] Traffic control strategy: No additional traffic control measures are required; only routine patrols will be conducted.
[0116] When the risk level R=2:
[0117] Security personnel allocation: One security personnel per 300 people, calculated using the following formula:
[0118]
[0119] Traffic management strategy: Announce safety tips every 30 minutes via broadcast, including the activity flow and the location of safety exits.
[0120] When the risk level R=3:
[0121] Security personnel allocation: One security personnel per 200 people, calculated using the following formula:
[0122] In addition, two extra security personnel were added to each key area.
[0123] Traffic management strategy: Broadcast announcements will be made every 15 minutes. Security personnel will be deployed in congested areas to guide and divert traffic. The number of temporary isolation zones, Ba, will be calculated using the following formula: Where 0.5 represents the maximum number of people recommended per square meter.
[0124] When the risk level R=4:
[0125] Security personnel allocation: One security personnel per 100 people, calculated using the following formula:
[0126] Three security personnel are assigned to each safety exit.
[0127] Traffic management strategy: Broadcast a reminder every 5 minutes and activate all backup channels. The formula is as follows: , where Ex extra Ex indicates the number of backup safety exits that need to be temporarily opened in the event venue. total This represents the total number of safety exits provided at the event venue, including all regular and backup exits. normal The formula for determining the number of open safety exits and the number of psychological counseling personnel (Ps) when the activity is under normal conditions, i.e., when the risk level R ≤ 3, is as follows: ;
[0128] When the risk level R=5:
[0129] Security personnel allocation: One security personnel per 50 people, with external support requested. The formula for the number of support personnel, Su, is... .
[0130] Evacuation Strategy: Immediately activate the emergency evacuation procedure. Evacuation routes are planned according to the principle of "nearest safe exit first." The formula for the number of evacuation guides (Gu) in each passage is: At the same time, sound and light alarm devices were used to prompt people to evacuate in an orderly manner.
[0131] Step 4.2, Dynamic Adjustment Mechanism of the Plan:
[0132] Real-time data is collected every 5 minutes, including the number of people, predicted psychological characteristics, site conditions, and the risk level R is recalculated.
[0133] When the difference between two consecutive calculated R values exceeds one level, the scheme adjustment process is triggered. The specific adjustment steps are as follows:
[0134] Calculate the difference D between the old and new schemes. i :
[0135] Where F represents the number of elements included in the plan, including the number of security personnel and the types of crowd control measures.new f represents the element values of the new scheme. old These are the element values from the old scheme.
[0136] When D i When the value is ≤0.3, only the numerical elements in the plan (such as the number of security personnel) are slightly adjusted, while the type of measure remains unchanged;
[0137] When D i When the value is greater than 0.3, the entire plan content is updated, including the type of measure and numerical elements.
[0138] Step 4.3: Feedback on the effectiveness of the guidance strategy
[0139] After each adjustment to the plan, record the rate of change of the anxiety index ΔAn and the rate of change of the panic probability ΔPp:
[0140]
[0141] Among them, An(Y) before And An (Y) after Pp(Y) represents the predicted anxiety index before and after adjustment. before and Pp(Y) after These represent the panic probabilities before and after the adjustment.
[0142] When ΔAn < 0 and ΔPp < 0, it indicates that the diversion strategy is effective, and the strategy should be retained.
[0143] Otherwise, it will be replaced with an alternative strategy in the next adjustment of the plan.
[0144] Building upon the risk assessment in Example 1, this embodiment adds a scheme generation and adjustment module, extending security work from risk identification to specific response strategies. It develops differentiated security personnel allocation and evacuation strategies for different risk levels, ensuring the precision of measures. The dynamic adjustment mechanism optimizes the scheme in a timely manner based on real-time data changes, and the difference calculation enables refined adjustments. The feedback on the effectiveness of evacuation strategies verifies the effectiveness of the strategies through quantitative indicators, forming a closed loop of "assessment-scheme-feedback," significantly improving the flexibility and practical application effect of the security scheme.
[0145] As an embodiment of the present invention:
[0146] In specific implementation, compared with Embodiment 1 and Embodiment 2, the technical solution of this embodiment is to combine the solutions of Embodiment 1 and Embodiment 2. The only difference between the technical solution of this embodiment and Embodiment 1 and Embodiment 2 is that this embodiment also includes a model update module, which is used to periodically update the psychological feature quantification model to ensure the accuracy and adaptability of the model.
[0147] Step 5.1, Update Cycle:
[0148] The model update process is triggered after every 10 security events are completed.
[0149] Step 5.2, New Dataset Fusion:
[0150] After processing the newly collected activity data according to the aforementioned preprocessing steps, it is merged with the historical dataset. The proportion of new data in the merged dataset is 30%, as shown in the following formula:
[0151]
[0152] Among them, D new For the updated dataset, D recent For the newly collected dataset, D history This is a historical dataset.
[0153] Step 5.3, Model Retraining:
[0154] Using the updated dataset, the model was retrained following the steps of the psychometric model training module, and its performance was evaluated using a new validation set.
[0155] Replace the old model when the MSE of the new model is more than 10% lower than that of the old model;
[0156] Otherwise, retain the old model and only add the new data to the historical dataset.
[0157] This embodiment introduces a model update module. By setting a reasonable update cycle and new data fusion ratio, the psychological feature quantification model can continuously absorb new activity data and continuously optimize model performance. The model retraining and evaluation mechanism ensures that only new models with better performance will be adopted, which avoids invalid updates and ensures the long-term accuracy of the model and its adaptability to different scenarios, providing core technical support for the continuous and effective operation of the entire security system.
[0158] As an embodiment of the present invention:
[0159] In specific implementation, compared with Embodiment 1, Embodiment 2 and Embodiment 3, the technical solution of this embodiment is to combine the solutions of Embodiment 1, Embodiment 2 and Embodiment 3.
[0160] This embodiment integrates all the functions of Embodiments 1, 2, and 3, forming a complete closed-loop system from data acquisition and preprocessing, psychological feature prediction, risk assessment, security plan generation and dynamic adjustment to regular model updates. This system achieves intelligent management of the entire security activity process, possessing both accurate risk prediction capabilities and dynamically adaptable response strategies. Furthermore, it maintains long-term effectiveness through model iteration, comprehensively improving the intelligence level and security assurance capabilities of large-scale security activities.
[0161] It should be stated that all user data collected in this application was collected with the user's consent and authorization, and the use of user data is legal and compliant, and the use and processing of user data comply with the relevant laws, regulations and standards of the relevant regions.
[0162] Furthermore, any content not described in detail in this specification is existing technology known to those skilled in the art.
[0163] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0164] The above formulas are all dimensionless calculations. Dimensionless calculation involves introducing a reference benchmark, such as the maximum, minimum, standard deviation, or theoretical extreme value of a physical quantity, to transform the original physical quantity into a dimensionless relative value. This value is usually mapped to a specific interval, such as [0,1] or [-1,1], which eliminates the influence of units while preserving the relative size relationship of the physical quantities. The formula is derived from software simulation based on a large amount of collected data to obtain the most recent real-world results. The preset parameters and thresholds in the formulas are set by those skilled in the art according to the actual situation.
[0165] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
[0166] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for generating security activity plans based on machine learning, characterized in that, Includes the following steps: Data collection and preprocessing: Collect basic information, historical behavioral data, and psychological characteristic data of the participants in the security activities, and perform standardized processing; Training of a psychological characteristic quantification model: Based on preprocessed data, a model is built using machine learning algorithms to predict the real-time anxiety index and panic probability of participants; Risk assessment: Calculate the secondary risk level by combining the output of the psychological characteristic quantification model with the activity venue parameters; Plan generation and adjustment: Generate an initial security plan based on the risk level, and dynamically adjust the plan based on real-time data; Model updates: Regularly merge new datasets and retrain the model to optimize prediction performance.
2. The method for generating security activity plans based on machine learning according to claim 1, characterized in that: The data collection dimensions include: Basic information includes the age A and gender G of the participants, where males: G=1 and females: G=0; physical condition H, which is scored from 1 to 5, with higher scores indicating better health; and whether they have experience participating in similar large-scale events E, where if yes = 1 and if no = 0. Historical behavioral data: the last 3 movement trajectory data, the duration of stay T, and the gathering behavior in crowded areas C, where if = 1, otherwise = 0; Psychological characteristic data: Anxiety index An, with a value of 0-100; Panic threshold Pt, with a value of 0-100; Group dependence Gr, with a value of 0-100.
3. The method for generating security activity plans based on machine learning according to claim 2, characterized in that: The data preprocessing steps include: Missing value handling: Continuous data is filled with the mean, and discrete data is filled with the mode; Standardization: Transform the data to the [0,1] interval using the following formula: Where x' is the standardized value, x is the original data, and x' is the standardized value. min x max These are the minimum and maximum values of the feature, respectively. Outlier handling: When the difference between a sample feature value and the mean μ exceeds 3 times the standard deviation σ, replace it with the mean.
4. The method for generating security activity plans based on machine learning according to claim 2, characterized in that: The training steps for the psychological feature quantification model include: Twelve features were extracted: including age A', gender G', physical condition H', participation experience E', average movement speed V', average stay time T', number of group behaviors C', anxiety index An', panic threshold Pt', group dependence Gr', activity venue familiarity Fa', and number of companions N'. The dataset was divided using a sliding window method with a window size of 500 samples and a sliding step of 100 samples. The first 80% was the training set and the last 20% was the validation set. The model is built based on the random forest algorithm, containing 100 decision trees with a maximum depth of 10 and a minimum number of samples per leaf node of 5.
5. The method for generating security activity plans based on machine learning according to claim 4, characterized in that: The formula for predicting the real-time anxiety index An(Y) is as follows: An i The anxiety index prediction value output by the i-th decision tree; the real-time panic probability Pp(Y) is calculated as follows: Pp i Let I() be the panic probability output by the i-th decision tree, and let I() be the indicator function satisfying condition Pp. i The value is 1 if it is ≥0.5, otherwise it is 0.
6. The method for generating security activity plans based on machine learning according to claim 1, characterized in that: The risk assessment steps include: Input site parameters: total site area S, number of safety exits Ex, maximum capacity M, average passageway width W, number of critical areas K; Calculate real-time population density: , where N current This represents the current number of participants. Calculate the panic diffusion coefficient: Determining the secondary risk level R: based on The results are divided into 1-5 levels, where 0.3 and 0.7 are the weight values for the anxiety index and the panic diffusion coefficient.
7. The method for generating security activity plans based on machine learning according to claim 1, characterized in that: The scheme generation rules include: When R=1, the security personnel allocation ratio is 1 for every 500 people, and regular patrols are adopted; When R=2, the security personnel allocation ratio is 1 for every 300 people, and a security reminder is broadcast every 30 minutes; When R=3, the security personnel allocation ratio is 1 for every 200 people, with an additional 2 for key areas, and a broadcast is made every 15 minutes and a temporary isolation zone is set up; When R=4, the security personnel allocation ratio is 1 person per 100 people, 3 people are arranged at the safety exit, and a broadcast is made every 5 minutes to activate the backup passage; When R=5, the security personnel allocation ratio is 1 for every 50 people. Request external support and initiate emergency evacuation.
8. The method for generating security activity plans based on machine learning according to claim 1, characterized in that: The dynamic adjustment mechanism of the proposed scheme is as follows: real-time data is collected every 5 minutes, and when the difference between two consecutive risk levels exceeds one level, the difference between the old and new schemes is calculated. Where F is the number of elements included in the scheme, f new f represents the element values of the new scheme. old For the element values of the old scheme, when D i If the value is ≤0.3, make minor adjustments to the numerical features; otherwise, update the entire scheme.
9. The method for generating security activity plans based on machine learning according to claim 1, characterized in that: The model update steps include: An update is triggered after every 10 events are completed, resulting in a new dataset D. recnt With historical dataset D history according to Integration; Retrain the model, and replace the old model when the mean squared error (MSE) of the new model is more than 10% lower than that of the old model.
10. A security activity plan generation system based on machine learning, the system being used to execute the security activity plan generation method based on machine learning as described in any one of claims 1-9, characterized in that, The system includes: Data acquisition and preprocessing module: used to collect basic information, historical behavioral data, and psychological characteristic data of participants in security activities, and to perform standardized processing; Psychological Feature Quantification Model Training Module: Constructs a psychological feature quantification model through machine learning algorithms to predict the real-time psychological state of participants; Risk assessment module: Based on the output of the psychological characteristic quantification model and combined with the event venue parameters, assess the level of secondary risks in security activities; Solution generation and adjustment module: Based on the risk assessment results, an initial security plan is generated, and the plan content is dynamically adjusted in combination with real-time data; Model update module: Used to periodically update the psychological feature quantification model.
Citation Information
Patent Citations
Multi-mode security monitoring method based on deep learning image processing
CN112733819A
Psychological anxiety prediction method and system based on face video analysis
CN118717119A
Financial user emotion and psychological portrait analysis method based on large language model
CN119293251A
Crowd evacuation path planning method considering panic diffusion
CN119863006A
Intelligent security and protection dynamic risk assessment and prevention and control system based on multi-source data fusion
CN120410216A
