Teenager crime probability prediction method based on deep learning and neural network

Through a deep learning and neural network-based method, juvenile crime prediction data is divided into dynamic and static features. Using LSTM and FC processing, the problems of insufficient prediction accuracy and efficiency in the existing technology are solved, and more accurate and efficient prediction of juvenile crime probability is achieved.

CN119670931APending Publication Date: 2025-03-21CHINA CRIMINAL POLICE UNIV

Patent Information

Application Number
CN202411519419.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

In the prediction of juvenile crime probability, the existing technology has problems such as single data dimensions, insufficient model generalization ability, ignoring individual differences, data update lag, and imbalance in algorithm complexity and efficiency.

Method used

Using deep learning and neural network methods, data is divided into dynamic and static features, and long and short-term memory networks (LSTMs) and full-connection layer (FCs) are used for processing. Through multi-source data fusion, automatic feature extraction and representation learning, personalized prediction model construction, and real-time data processing and prediction, the accuracy and efficiency of prediction are improved.

Benefits of technology

It has achieved a more comprehensive reflection of the risk characteristics of juvenile crime, and can accurately predict individual differences, which has increased support for preventing and handling juvenile crime.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119670931A_ABST
    Figure CN119670931A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of crime probability prediction, and particularly provides a teenager crime probability prediction method based on deep learning and a neural network algorithm, and the method comprises the steps: dividing data into dynamic and static features, and flexibly employing a long short-term memory (LSTM) network and a full connection layer for processing. The LSTM can capture the time dependency relationship in the data, and is helpful for the model to understand and predict the trend of teenager behaviors changing along with time. And the static characteristics are processed by using the full connection layer because the static characteristics are not influenced by time and have relative stability. The dynamic and static characteristics are comprehensively processed, so that the dynamic change and static characteristics of the teenager behaviors can be more accurately captured, and the adaptability and generalization ability of the model are improved. Through continuous offline training, the model continuously updates the weight value and bias of the neural network, the prediction accuracy and reliability of teenager behaviors are improved, and a more powerful theoretical basis is provided for behavior intervention and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of crime probability prediction, and in particular relates to a method for predicting the probability of juvenile crime based on deep learning and neural network algorithms. Background Art

[0002] With the development of society and the advancement of information technology, the problem of juvenile crime has increasingly attracted people's attention. At present, the problem of juvenile crime poses a threat to social stability and personal development. Although some scholars have explored the field of juvenile crime prediction using algorithms and models, there are still obvious limitations. Traditional methods are mainly based on statistical and psychological theories, which are limited by the single data dimension, insufficient model generalization ability, and neglect of individual differences, resulting in the need to improve the accuracy of prediction. In addition, the lag in data update and the balance between algorithm complexity and efficiency are also urgent problems to be solved. In response to these shortcomings, the present invention proposes an innovative juvenile crime probability prediction method, which is based on deep learning and neural network algorithms, and aims to improve the accuracy and efficiency of prediction through strategies such as multi-source data fusion, automatic feature extraction and representation learning, personalized prediction model construction, and real-time data processing and prediction. This method can not only more comprehensively reflect the characteristics of juvenile crime risk, but also make accurate predictions based on individual differences, providing strong support for the prevention and treatment of juvenile crime.

[0003] Although some scholars have used algorithms and models to conduct research on crime prediction, there are still some shortcomings:

[0004] (1) Currently, there are few studies on the prediction of juvenile crime probability. Most studies only predict the number of crimes. For example, the invention patent with application number CN202310643203.1 proposed a "method and system for predicting the number of crimes based on interpretable machine learning". This technical solution adopts a crime prediction method based on the XGBoost machine learning model and combines it with the SHAP interpretable machine learning framework to predict the number of crimes. The invention patent with application number CN202311497123.6 proposed a "method and system for predicting the number of criminal incidents in multiple regions". This technical solution uses the deepAr model to process the prediction data, and then uses the trained model to predict the number of criminal incidents in the predicted area after the predetermined time point.

[0005] (2) When the data set contains complex nonlinear relationships or highly variable features, the traditional linear regression algorithm may not be able to fully capture the potential relationship between the data, resulting in insufficient model fit. In this case, the model may not be able to effectively predict or explain changes in the data, thereby limiting its accuracy and reliability in practical applications. For example, the invention patent with application number CN202011188193.X proposed a "Method for Predicting the Number of Crimes Based on a Linear Regression Algorithm". This technical solution uses a linear regression algorithm to predict the number of crimes after dimensionally screening historical crime data and constructing feature vectors, but it cannot effectively process the characteristics of nonlinear relationships.

[0006] (3) It does not take into account the important information that static feature data sets that are independent of time may carry. This information may include genetic factors, personality traits, etc., which have a long-term and stable impact on the crime rate. If we rely solely on historical crime data and time series features for prediction, these important static features may be ignored. For example, the invention patent with application number CN202210919633.7 proposes a "crime data prediction method and device based on time characteristics". This technical solution uses ARIMA and LSTM to predict data, combining the advantages of ARIMA model and LSTM model, and providing scientific decision-making for urban crime prevention and intervention based on time characteristics, but does not take into account static characteristics that are independent of time. Summary of the invention

[0007] In view of the above problems, the present invention provides a method for predicting the probability of juvenile crime based on deep learning and neural network, comprising the following steps:

[0008] Step 1: Based on the characteristics of the input data, the collected data related to juvenile delinquency is divided into a dynamic feature data set that changes over time and a static feature data set that is independent of time;

[0009] Step 2: Preprocess the above two types of feature data sets, including cleaning the data, normalizing it, implementing serialization processing, and splitting the two types of feature data sets into training sets and test sets;

[0010] Step 3: Use the long short-term memory network model LSTM to process the preprocessed dynamic feature dataset. By inputting these features into the LSTM model, the time series data in the dataset is deeply modeled and learned to capture its intrinsic dependencies and dynamic characteristics, and then extract dynamic features;

[0011] Step 4: Use the fully connected layer FC to process the static feature data set, and input these features into the fully connected layer for feature extraction and learning to capture their intrinsic associations and static characteristics, and then extract static features;

[0012] Step 5: Concatenate the extracted dynamic and static features to form fusion features, learn the nonlinear combination of fusion features through the fully connected layer of the neural network used to predict crime, and continuously update the weight value and bias of the neural network through offline training to obtain a neural network model that can predict the crime probability of teenagers;

[0013] Step 6: Determine the threshold for judging whether a teenager will commit a crime through the ROC curve, and compare the threshold with the crime probability predicted in step 5 to predict whether the teenager will commit a crime.

[0014] Furthermore, in step 1, the classification rules of the dynamic feature data set and the static feature data set are as follows:

[0015] The dynamic feature dataset includes but is not limited to the following categories: (1) Mental health status: including stress level, depressive symptoms, anxiety symptoms and self-esteem level; (2) Social relationships: whether there are friends with criminal tendencies; (3) School performance: including grades, attendance records and school discipline problems; (4) Family situation: including changes in family structure (such as divorce, moving), family economic situation, and the level of supervision by parents or guardians; (5) Major life events: death of family members, serious illness and domestic violence; (6) Substance use: smoking, drinking or drug use; (7) Environmental influences: changes in crime rates in residential areas and changes in school or educational environments;

[0016] Static feature data sets include but are not limited to the following categories: (1) Basic demographic information: including gender, birthplace, and ethnic background; (2) Genetic factors: family criminal history, genetic susceptibility to specific behavioral problems (such as impulsivity and aggression); (3) Personality traits: such as impulsivity and aggressive tendencies; (4) Intelligence: basic intelligence level or cognitive ability; (5) Birth conditions: such as premature birth and low birth weight; (6) Mother's environment during pregnancy: including the mother's eating habits, smoking and drinking behaviors during pregnancy, and even exposure to harmful environments; (7) Basic health status: such as early development indicators - early development levels of language, cognitive and social skills; (8) Chronic health problems: such as asthma and diabetes, which are chronic diseases that may affect an individual's daily activities and mental state.

[0017] Furthermore, the MinMaxScaler method is used to normalize the data, and the formula is as follows:

[0018]

[0019] X scaled =X std *(max-min)+min

[0020] Among them, X.min(axis=0) represents the row vector composed of the minimum value in each column, X·max(axis=0) represents the row vector composed of the maximum value in each column, max represents the maximum value of the interval to be mapped, the default is 1, min represents the minimum value of the interval to be mapped, the default is 0; X std represents the standardized result, X scaled Represents the normalized result.

[0021] Furthermore, the collected data sets related to juvenile crime are serialized. For different juvenile individuals, the input data are represented as follows:

[0022] X={t1,a1,b1,c1,d1,e1,f1,g1},{t2,a2,b2,c2,d2,e2,f2,g2},...,{t n ,a n ,b n ,c n ,d n ,e n ,f n ,g n}

[0023] Among them, t n represents the number of years that have passed since the initial assessment, a n ,b n ,c n ,d n ,e n ,f n ,g n They represent the mental health score, social relationship score, school performance score, family situation score, major life event score, substance use score and environmental impact score respectively; if a certain feature contains multiple influencing factors, the score of each influencing factor will be quantified and weighted averaged.

[0024] Furthermore, the process of in-depth modeling and learning of time series data through the LSTM model to capture its dependencies and temporal dynamic characteristics is as follows:

[0025] The training set of the dynamic feature data set after LSTM input preprocessing at time t is x t , the output value is h t ,c t is the memory state; the LSTM memory unit is updated as follows:

[0026] (1) Forget gate f t Calculation

[0027] f t =σ(w f ×[h t-1,x t ]+b f )

[0028] Among them, f is the forget gate f at time t t The weight matrix, b f is the bias, and σ adopts the Sigmoid function.

[0029] (2) Input gate i t Calculation

[0030] i t =σ(w i ×[h t-1 ,x t ]+b i )

[0031] Among them, w i is the input gate i at time t t The weight matrix, b i is the offset.

[0032] (3) Candidate states of memory cells Calculation

[0033]

[0034] Among them, w c is the candidate state at time t The weight matrix, b c is the offset.

[0035] (4) Memory unit state value c t Update calculation of

[0036]

[0037] (5) Output gate o t Calculation

[0038] o t =σ(w0×[h t-1 ,x t ]+b0)

[0039] Among them, w0 is the output gate o at time t t The weight matrix of , b0 is the bias.

[0040] (6) Hidden layer output value h t calculate

[0041] h t =o t ×tanh(c t )

[0042] The Dropout technology is introduced to solve the possible overfitting problem.

[0043] The formula for the cross entropy loss function used in the back propagation process is as follows:

[0044] L = -[ylogy^+(1-y)log(1-y^)]

[0045] Among them, y is the true sample label, which takes the value of 0 or 1. y^ is the probability that the model predicts that the sample is a positive class.

[0046] During the back propagation process, the intermediate variables and gradient parameters of the neural network are calculated and stored, and the relevant parameters are updated on the neurons.

[0047] Furthermore, the process of processing the static feature data set using the fully connected layer FC is as follows:

[0048] Construct a single fully connected layer with a total of m neuron nodes and calculate the output of the neurons;

[0049] y m =w m1 X1+w m2 X2+w m3 X3,…,w mn X n

[0050] Z m =f(y m )

[0051] Among them, w m is the weight coefficient, f is the activation function sigmoid;

[0052] Construct an output layer U:

[0053] U=Z1w′1+Z2w′2+Z3w′3,…,Z m w′ m

[0054] Among them, w′ m is the weight coefficient;

[0055] After nonlinear changes, the final result G is:

[0056] G=f(U)

[0057] Among them, f is the activation function sigmoid;

[0058] The error E is calculated by the mean-square error (MSE):

[0059]

[0060] Where t is the expected value;

[0061] Adjust the weights to reduce the error by using the gradient descent method:

[0062] w new =w old -αΔw

[0063] Among them, w new is the updated weight parameter, w old is the weight parameter before updating, α is the learning rate, and Δw is the gradient of each weight parameter;

[0064] For Δw′ m The gradient is:

[0065]

[0066] For Δw m The gradient is:

[0067]

[0068] Furthermore, the dynamic and static features are concatenated and passed through multiple fully connected layers to learn the nonlinear combination of these fused features. The process of continuously updating the weights and biases of the neural network through offline training is as follows:

[0069] When stacking fully connected layers, each layer performs a series of linear and nonlinear transformations on the input data; the Sigmoid function is used as the activation function of the last fully connected layer;

[0070]

[0071] For the fully connected layers of other hidden layers, the ReLU activation function is selected to introduce nonlinearity;

[0072] ReLU(x)=max(x,0)

[0073] The Adam (Adaptive Moment Estimation) optimizer is used during training; the update rules of the Adam optimizer are as follows:

[0074] m t =β1m t-1 +(1-β1)g t

[0075]

[0076] Among them, g t is the gradient of the parameter, β1 and β2 are the decay coefficients of the two exponentially weighted averages, and is the bias-corrected moving average of the gradient, θ t+1 is the updated parameter, η is the learning rate, and ∈ is a small constant used to avoid division by zero.

[0077] Furthermore, the threshold determination process for judging whether a teenager will commit a crime is as follows:

[0078] The vertical coordinate TPR of the ROC curve represents the proportion of correct judgments, that is, the probability that the juvenile offender is correctly judged to be a criminal:

[0079]

[0080] Among them, TP is true positive, which means that the prediction is true and the data is actually true; FN is

[0081] False negatives, which are data predicted to be false but are actually true;

[0082] The horizontal axis FPR of the ROC curve represents the proportion of wrong judgments, that is, the probability of misjudging a non-criminal teenager as a criminal:

[0083]

[0084] Among them, FP is false positive, that is, data predicted to be true but actually false; TN is true negative, that is, data predicted to be false and actually false;

[0085] Select the point on the ROC curve closest to the upper left corner (0, 1) of the coordinate graph as the optimal threshold;

[0086] When the predicted probability is greater than or equal to the optimal threshold, it corresponds to category 1, which means that a crime will be committed; conversely, when the predicted probability is less than the optimal threshold, it corresponds to category 0, which means that a crime will not be committed.

[0087] The present invention provides a method for predicting the probability of juvenile crime based on deep learning and neural network algorithms, which divides the data into dynamic and static features, and flexibly uses long short-term memory networks (LSTM) and fully connected layers (FC) for processing. LSTM can capture the time dependency in the data, which helps the model understand and predict the trend of adolescent behavior over time. The fully connected layer is used to process static features because static features are not affected by time and have relative stability. The processing of combined dynamic and static features enables us to more accurately capture the dynamic changes and static characteristics of adolescent behavior, thereby improving the adaptability and generalization ability of the model. Through continuous offline training, our model continuously updates the weight values ​​and biases of the neural network, improves the accuracy and reliability of predicting adolescent behavior, and provides a more powerful theoretical basis for behavioral intervention. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] Figure 1 A flowchart of a method for predicting the probability of juvenile crime based on deep learning and a neural network algorithm and an LSTM and fully connected neural network model according to an embodiment of the present invention;

[0089] Figure 2 A schematic diagram of the process of dividing, extracting and fusing data features according to an embodiment of the present invention;

[0090] Figure 3 A schematic diagram of a dropout method for avoiding data overfitting according to an embodiment of the present invention. DETAILED DESCRIPTION

[0091] The following is a clear and complete description of the technical solutions in the embodiments of the invention in conjunction with the drawings in the embodiments of the invention. Obviously, the described embodiments are only part of the embodiments of the invention, not all of the embodiments. Based on the embodiments of the invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the invention.

[0092] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0093] like Figure 1 As shown, a method for predicting the probability of juvenile crime based on deep learning and neural network includes the following steps:

[0094] Step 1: Based on the characteristics of the input data, the collected data related to juvenile delinquency is divided into a dynamic feature data set that changes over time and a static feature data set that is independent of time;

[0095] Step 2: Preprocess the above two types of feature data sets, including cleaning the data, normalizing it, implementing serialization processing, and splitting the two types of feature data sets into training sets and test sets;

[0096] Step 3: Use the long short-term memory network model LSTM to process the preprocessed dynamic feature dataset. By inputting these features into the LSTM model, the time series data in the dataset is deeply modeled and learned to capture its intrinsic dependencies and dynamic characteristics, and then extract dynamic features;

[0097] Step 4: Use the fully connected layer FC to process the static feature data set, and input these features into the fully connected layer for feature extraction and learning to capture their intrinsic associations and static characteristics, and then extract static features;

[0098] Step 5: Concatenate the extracted dynamic and static features to form fusion features, learn the nonlinear combination of fusion features through the fully connected layer of the neural network used to predict crime, and continuously update the weight value and bias of the neural network through offline training to obtain a neural network model that can predict the crime probability of teenagers;

[0099] Step 6: Determine the threshold for judging whether a teenager will commit a crime through the ROC curve, and compare the threshold with the crime probability predicted in step 5 to predict whether the teenager will commit a crime.

[0100] In step 1, based on the characteristics of the input data, the process of dividing the data into two categories is as follows. The data-related processing flow chart is as follows: Figure 2 As shown:

[0101] Dynamic feature dataset: (1) Mental health status: including stress level, depression symptoms, anxiety symptoms and self-esteem level. (2) Social relationships: whether there are friends with criminal tendencies. (3) School performance: including grades, attendance records and school discipline problems. (4) Family situation: including changes in family structure (such as divorce, moving), family economic situation, parental or guardian supervision level, etc. (5) Major life events: death of family members, serious illness and domestic violence. (6) Substance use: smoking, drinking or drug use. (7) Environmental impact: changes in crime rates in residential areas and changes in school or educational environment.

[0102] Static feature data set: (1) Basic demographic information: including gender, birthplace, ethnic background, etc. (2) Genetic factors: criminal history in the family, genetic susceptibility to specific behavioral problems (such as impulsivity, aggression). (3) Personality traits: such as impulsivity, aggressive tendencies, etc. (4) Intelligence: basic intelligence level or cognitive ability. (5) Birth conditions: such as premature birth, low birth weight, etc. (6) Mother's environment during pregnancy: including the mother's eating habits, smoking and drinking behaviors during pregnancy, and even exposure to harmful environments. (7) Basic health status: such as early development indicators - early development levels of language, cognitive and social skills. (8) Chronic health problems: such as asthma, diabetes and other chronic diseases that may affect an individual's daily activities and mental state.

[0103] In step 2, the data set is preprocessed, including cleaning the data, normalizing it, serializing it, and dividing the data into a training set and a test set. The process is as follows:

[0104] Missing value processing: According to the characteristics of the data set, the impact of missing values ​​in the data set on the analysis is reduced by deleting features containing missing values, and then interpolation is used to replace the missing values ​​with appropriate estimates of known data.

[0105] Outlier detection: Standard deviation and scatter plots are used to identify outliers that are inconsistent with the majority of data in the dataset. Cluster analysis-based anomaly detection methods are used to detect and process these outliers to ensure the quality and reliability of the data.

[0106] Normalization: In order to make the features have the same measurement scale, we use the MinMaxScaler method to normalize the data. The formula is as follows:

[0107]

[0108] X xcaled= Xs td *(max-min)+min

[0109] Among them, X.min(axis=0) represents the row vector composed of the minimum value in each column, X·max(axis=0) represents the row vector composed of the maximum value in each column, max represents the maximum value of the interval to be mapped, the default is 1, min represents the minimum value of the interval to be mapped, the default is 0. std represents the standardized result, X xcaled Indicates the normalization result. MinMaxScaler essentially maps data points to the interval [0,1], but in actual use, you can also specify the parameter feature_range to map to other intervals as needed.

[0110] Serialization: For dynamic features, they need to be organized into the form of time series data. Considering the periodicity and trend of the data and the time range to be predicted, a continuous time period of a certain length is selected as the observation window. The data is segmented and processed using the sliding window method to capture the time series characteristics and dynamic changes of the data, so that the model can better learn the long-term dependencies and time series characteristics of the data.

[0111] For example, for an individual, the dynamic characteristics of the individual are evaluated starting from the age of 10. A time series with a length of 3 years (10 years old, 11 years old, 12 years old) is constructed, which contains data from 10 years old to the predicted age (12 years old). For different predicted ages, the length of the time series is generally different, but it can be processed to the same length by padding.

[0112] Set the size of each time window to a continuous year, and then slide forward one time step (such as a quarter) at the end of each year to cover the entire range of the time series. In this way, we can extract features from historical dynamic data and predict future dynamic features.

[0113] The input data includes the elapsed time and the quantification of seven dynamic features: mental health status, social relationships, school performance, family situation, major life events, substance use, and environmental influences, so the feature vector length at each time point is 8.

[0114] For different youth individuals, the input data may be as follows:

[0115] X={t1,a1,b1,c1,d1,e1,f1,g1},{t2,a2,b2,c2,d2,e2,f2,g2},...,{t n ,a n ,b n ,c n ,d n ,e n ,f n ,g n}

[0116] Among them, t n represents the number of years that have passed since the initial assessment, a n ,b n ,c n ,d n ,e n ,f n ,g n They represent mental health score, social relationship score, school performance score, family situation score, major life event score, substance use score and environmental impact score. If a feature contains multiple influencing factors, each influencing factor will be scored and quantified and weighted averaged.

[0117] Split: Use the train_test_split method to randomly divide the sample set into 80% training set and 20% test set, and return the divided training set and test set data. Here, 80% of the training set refers to the proportion put into model training, and then 33% of it is used as a validation set to verify the loss.

[0118] In step 3, the dynamic features are processed using a long short-term memory network (LSTM). By inputting these features into the LSTM model, the time series data is deeply modeled and learned to capture its dependencies and time dynamic characteristics. The process is as follows:

[0119] The processed dynamic feature data is input into the LSTM model to filter the individual's past information, thereby completing the long-term memory of effective information.

[0120] Each LSTM memory unit contains three control gates, namely the forget gate f t , input gate i t and output gate o t , whose structure is as follows Figure 1 As shown. The input data of LSTM at time t is x t , the output value is h t ,c t is the memory state. The LSTM memory unit is updated as follows.

[0121] Forget Gate t It mainly depends on how much information is forgotten from the state of the memory unit, which is determined by the input value x at time t. t and the hidden layer output h at time t-1 t-1 Joint decision. Forget gate f t The calculation formula is:

[0122] f t =σ(w f ×[h t-1 ,x t ]+b f )

[0123] Among them, f is the forget gate f at time t t The weight matrix, b f is the bias, and σ adopts the Sigmoid function.

[0124] Input Gate i t It mainly determines how much of the current input data is input into the memory unit, which is determined by the input value x at time t. t and the hidden layer output h at time t-1 t-1 Joint decision. Input gate i t The calculation formula is:

[0125] i t =σ(w i ×[h t-1 ,x t ]+b i )

[0126] Among them, w i is the input gate i at time t t The weight matrix, b i is the offset.

[0127] Candidate states of memory cells Input value x at time t t and the hidden layer output h at time t-1t-1 Jointly determine the candidate states of memory cells The calculation formula is:

[0128]

[0129] Among them, w c is the candidate state at time t The weight matrix, b c is the offset.

[0130] Memory cell state value c t Through the input gate i t and forget gate f t For its own status c t-1 and the current candidate memory state value Adjust to update the memory cell state. The memory cell state value c t The update calculation formula is:

[0131]

[0132] Output gate o t It is mainly used to control how much memory cell state value needs to be output, based on the input value x at time t t and the hidden layer output h at time t-1 t-1 Joint decision. Output gate o t The calculation formula is:

[0133] o t =σ(w0×[h t-1 ,x t ]+b0)

[0134] Among them, w0 is the output gate o at time t t The weight matrix of , b0 is the bias.

[0135] Hidden layer output value h t Output value o at time t t and the memory cell state value c t The hidden layer output value h t The calculation formula is:

[0136] h t =o t ×tanh(c t )

[0137] In the process of information transmission, LSTM adds or deletes information in the cell state through the current moment input, the hidden layer state of the previous moment, the cell state of the previous moment and the gate structure, thereby simulating the seven types of dynamic features that affect the behavior of individuals over time. The gate structure is used to control the degree of adding or deleting information. LSTM updates the cell state based on the output of the forget gate and the input gate. The updated cell state consists of two parts: the old cell state information from the previous moment (i.e., the dynamic characteristics of the previous individual) and the newly generated information from the current input (i.e., the dynamic characteristics of the current individual). Finally, based on the updated cell state, the hidden state (i.e., the predicted dynamic characteristics of the individual) is output.

[0138] We stack four LSTM layers, and the number of hidden units in each layer is adjusted during the training process to find the best configuration. In addition, since increasing the number of LSTM layers and hidden units may increase the risk of overfitting, we introduce the Dropout technology, the principle diagram of which is shown in the following figure. Figure 3 shown.

[0139] In the LSTM neural network with Dropout technology, the specific working steps are:

[0140] (1) Setting random probability P: First, a random probability P is set, which determines that each layer of neurons is inactivated with a probability of P. Inactivated neurons do not participate in forward propagation during training, but their inputs and outputs remain unchanged, that is, neurons that stop working do not participate in the forward propagation process in network training.

[0141] (2) Forward propagation and back propagation: X is input into the LSTM model with Dropout, and forward propagation is performed from the input layer to the output layer. During the forward propagation process, the intermediate variables of the neural network are calculated and stored. Then, back propagation is performed in the order from the output layer to the input layer according to the cross entropy loss function. The formula of the cross entropy loss function is as follows:

[0142] L = -[ylogy^+(1-y)log(1-y^)]

[0143] Among them, y is the true sample label, which takes the value of 0 or 1. y^ is the probability that the model predicts that the sample is a positive class.

[0144] During the back propagation process, the intermediate variables and gradient parameters of the neural network are calculated and stored, and the relevant parameters are updated on the neurons that are not inactivated.

[0145] (3) Restore inactivated neurons: After completing a round of forward propagation and back propagation, restore the inactivated neurons. At this time, the neurons that have been restored to activity remain the same, while the parameters of the neurons that have not been inactivated in the previous round have been updated. Then, repeat steps 1 to 2 to continue training the model.

[0146] In this way, during training, the Dropout technique can randomly discard a portion of neurons, thereby reducing the complexity of the model and reducing the risk of overfitting. During the testing phase, the Dropout technique is not applied, but the output of all neurons is retained to maintain the stability of the model.

[0147] In step 4, the fully connected layer (FC) is used to process static features, and these features are input into the fully connected layer for feature extraction and learning to capture their intrinsic associations and static characteristics. The process is as follows:

[0148] Construct a single fully connected layer, whose structure is as follows Figure 1 As shown, there are m neuron nodes in total. Each neuron consists of two parts: the first part y m It is the sum of the product of the input value and the weight coefficient. The second part is the input y m After being processed by the sigmoid activation function, Z m is the output of a neuron.

[0149] y m =w m1 X1+w m2 X2+w m3 X3,…,w mn X n

[0150] Z m =f(y m )

[0151] Among them, w m is the weight coefficient, and f is the activation function sigmoid.

[0152] Construct an output layer U:

[0153] U=Z1w′1+Z2w′2+Z3w′3,…,Z m w′ m

[0154] Among them, w′ m is the weight coefficient.

[0155] After nonlinear changes, the final result G is:

[0156] G=f(U)

[0157] Among them, f is the activation function sigmoid.

[0158] The error E is calculated by the mean-square error (MSE):

[0159]

[0160] Where t is the expected value.

[0161] Adjust the weights to reduce the error by using the gradient descent method:

[0162] w new =w old -αΔw

[0163] Among them, w new is the updated weight parameter, w old is the weight parameter before updating, α is the learning rate, and Δw is the gradient of each weight parameter.

[0164] For Δw′ m The gradient is:

[0165]

[0166] For Δw m The gradient is:

[0167]

[0168] In step 5, the dynamic and static features are concatenated and then the nonlinear combination of these fused features is learned through a fully connected layer. The weight value and bias of the neural network are continuously updated through offline training as follows:

[0169] After concatenating the two types of features, they are input into the fully connected layer to learn the complex relationship between the features.

[0170] When stacking fully connected layers, each layer performs a series of linear and nonlinear transformations on the input data. The Sigmoid function is used as the activation function of the last fully connected layer. The Sigmoid function expression is as follows:

[0171]

[0172] For the fully connected layers of other hidden layers, the ReLU activation function is selected to introduce nonlinearity, accelerate the convergence of the network, and reduce the gradient vanishing problem. The ReLU function expression is as follows:

[0173] ReLU(x)=max(x,0)

[0174] The fully connected layers work together through the back-propagation algorithm, and the gradient of each layer is passed to the previous layer, so that the parameters are adjusted to minimize the loss function. Through back-propagation, each layer can adjust its own parameters according to the gradient of the loss function, so that the entire model gradually converges to the optimal solution.

[0175] The Adam (Adaptive Moment Estimation) optimizer is used during training. The Adam optimizer defines two exponentially weighted averages: the first exponentially weighted average is the exponentially weighted average of the gradient, and the second exponentially weighted average is the exponentially weighted average of the square of the gradient. These two weighted averages are used to adjust the learning rate of each parameter to achieve the effect of adaptive learning rate. The update rules of the Adam optimizer are as follows:

[0176] m t =β1m t-1 +(1-β1)g t

[0177]

[0178] Among them, g t is the gradient of the parameter, β1 and β2 are the decay coefficients of the two exponentially weighted averages, and is the bias-corrected moving average of the gradient, θ t+1 is the updated parameter, η is the learning rate, and ∈ is a small constant used to avoid division by zero.

[0179] In step 6, the process of calculating the crime probability of the teenager and predicting whether the teenager will commit a crime based on the crime probability, and providing a certain theoretical basis for behavioral intervention, etc., is as follows:

[0180] To determine whether a teenager will commit a crime, a probability threshold needs to be set based on the actual situation. We use the data in the training set to determine the optimal threshold through the ROC curve.

[0181] Introduce several concepts:

[0182] True Positive (TP) refers to data that is predicted to be true and is actually true.

[0183] False Positive (FP) refers to data that is predicted to be true but is actually false.

[0184] False Negative (FN) refers to data that is predicted to be false but is actually true.

[0185] True Negative (TN) refers to data that is expected to be false and is actually false.

[0186] The ordinate of the ROC curve is defined as the True Positive Ratio (TPR), which represents the proportion of correct judgments, that is, the probability that the juvenile offender is correctly judged to be likely to commit a crime.

[0187]

[0188] The horizontal axis of the ROC curve is defined as the false positive rate (FPR), which represents the proportion of incorrect judgments, that is, the probability of incorrectly judging a teenager who has not committed a crime as someone who will commit a crime.

[0189]

[0190] The ROC curve describes the relative changes of TPR and FPR from the minimum threshold to the maximum threshold. According to the TPR and FPR calculated under different thresholds, these points are connected to obtain the ROC curve. The higher the TPR and the lower the FPR, the better the predictive ability of the model. We select the point on the ROC curve closest to the upper left corner (0, 1) of the coordinate graph as the optimal threshold.

[0191] When the predicted probability is greater than or equal to the optimal threshold, it corresponds to category 1, which means that a crime will be committed; conversely, when the predicted probability is less than the optimal threshold, it corresponds to category 0, which means that a crime will not be committed.

[0192] Take appropriate intervention measures for teenagers who may commit crimes. By analyzing the weight values ​​of the model, we can understand which characteristics have a greater impact on predicting whether a teenager will commit a crime. Based on this, we can make targeted behavioral intervention suggestions to help prevent the occurrence of juvenile crimes. For example, if the model finds that mental health factors have a great impact on the prediction results, the following suggestions can be made:

[0193] Mental Health Counseling and Support: Provide mental health counseling and support services to young people to help them solve psychological problems and enhance their mental health.

[0194] Mental health education and publicity: Carry out mental health education and publicity activities to enhance young people’s awareness and attention to mental health issues.

[0195] Follow up and evaluate the youth who have received behavioral intervention recommendations to understand their subsequent behavior and crimes, and adjust and optimize the intervention measures based on the feedback information. Through continuous monitoring and evaluation, the effectiveness of crime prevention work can be continuously improved, and the accuracy and credibility of the prediction model can be improved.

Claims

1. A method for predicting the probability of juvenile crime based on deep learning and neural network, characterized in that: The following steps are involved: Step 1: Based on the characteristics of the input data, the collected data related to juvenile delinquency is divided into a dynamic feature data set that changes over time and a static feature data set that is independent of time; Step 2: Preprocess the above two types of feature data sets, including cleaning the data, normalizing it, implementing serialization processing, and splitting the two types of feature data sets into training sets and test sets; Step 3: Use the long short-term memory network model LSTM to process the preprocessed dynamic feature dataset. By inputting these features into the LSTM model, the time series data in the dataset is deeply modeled and learned to capture its intrinsic dependencies and dynamic characteristics, and then extract dynamic features; Step 4: Use the fully connected layer FC to process the static feature data set, and input these features into the fully connected layer for feature extraction and learning to capture their intrinsic associations and static characteristics, and then extract static features; Step 5: Concatenate the extracted dynamic and static features to form fusion features, learn the nonlinear combination of fusion features through the fully connected layer of the neural network used to predict crime, and continuously update the weight value and bias of the neural network through offline training to obtain a neural network model that can predict the crime probability of teenagers; Step 6: Determine the threshold for judging whether a teenager will commit a crime through the ROC curve, and compare the threshold with the crime probability predicted in step 5 to predict whether the teenager will commit a crime.

2. A method for predicting the probability of juvenile crime based on deep learning and neural network as claimed in claim 1, characterized in that: In step 1, the classification rules of dynamic feature datasets and static feature datasets are as follows: The dynamic feature dataset includes but is not limited to the following categories: (1) Mental health status: including stress level, depressive symptoms, anxiety symptoms and self-esteem level; (2) Social relationships: whether there are friends with criminal tendencies; (3) School performance: including grades, attendance records and school discipline problems; (4) Family situation: including changes in family structure (such as divorce, moving), family economic situation, and the level of supervision by parents or guardians; (5) Major life events: death of family members, serious illness and domestic violence; (6) Substance use: smoking, drinking or drug use; (7) Environmental influences: changes in crime rates in residential areas and changes in school or educational environments; Static feature data sets include but are not limited to the following categories: (1) Basic demographic information: including gender, birthplace, and ethnic background; (2) Genetic factors: family criminal history, genetic susceptibility to specific behavioral problems (such as impulsivity and aggression); (3) Personality traits: such as impulsivity and aggressive tendencies; (4) Intelligence: basic intelligence level or cognitive ability; (5) Birth conditions: such as premature birth and low birth weight; (6) Mother's environment during pregnancy: including the mother's eating habits, smoking and drinking behaviors during pregnancy, and even exposure to harmful environments; (7) Basic health status: such as early development indicators - early development levels of language, cognitive and social skills; (8) Chronic health problems: such as asthma and diabetes, which are chronic diseases that may affect an individual's daily activities and mental state.

3. A method for predicting the probability of juvenile crime based on deep learning and neural network as claimed in claim 1, characterized in that: The MinMaxScaler method is used to normalize the data, and the formula is as follows: X scaled =X std *(max-min)+min Among them, X.min(axis=0) represents the row vector composed of the minimum value in each column, X·max(axis=0) represents the row vector composed of the maximum value in each column, max represents the maximum value of the interval to be mapped, the default is 1, min represents the minimum value of the interval to be mapped, the default is 0; X std represents the standardized result, X scaled Represents the normalized result.

4. A method for predicting the probability of juvenile crime based on deep learning and neural network as claimed in claim 1, characterized in that: The collected data sets related to juvenile crime are serialized. For different juvenile individuals, the input data are expressed as follows: X={t1,a1,b1,c1,d1,e1,f1,g1},{t2,a2,b2,c2,d2,e2,f2,g2},...,{t n ,a n ,b n ,c n ,d n ,e n ,f n ,g n } Among them, t n represents the number of years that have passed since the initial assessment, a n ,b n ,c n ,d n ,e n ,f n ,g n They represent the mental health score, social relationship score, school performance score, family situation score, major life event score, substance use score and environmental impact score respectively; if a certain feature contains multiple influencing factors, the score of each influencing factor will be quantified and weighted averaged.

5. A method for predicting juvenile crime probability based on deep learning and neural network as claimed in claim 1, characterized in that: Through the LSTM model, the process of deeply modeling and learning time series data to capture its dependencies and time dynamic characteristics is as follows: The training set of the dynamic feature data set after LSTM input preprocessing at time t is x t , the output value is h t ,c t is the memory state; the LSTM memory unit is updated as follows: (1) Forget gate f t Calculation f t =σ(w f ×[h t-1 ,x t ]+b f ) Among them, f is the forget gate f at time t t The weight matrix, b f is the bias, σ adopts Sigmoid function; (2) Input gate i t Calculation i t =σ(w i ×[h t-1 ,x t ]+b i ) Among them, w i is the input gate i at time t t The weight matrix, b i is the offset; (3) Candidate states of memory cells Calculation Among them, w c is the candidate state at time t The weight matrix, b c is the offset; (4) Memory unit state value c t Update calculation of (5) Output gate o t Calculation about t =σ(w0×[h t-1 ,x t ]+b0) Among them, w0 is the output gate o at time t t The weight matrix of , b0 is the bias; (6) Hidden layer output value h t calculate h t =o t ×tanh(c t ) Introduce Dropout technology to solve the overfitting problem; The formula for the cross entropy loss function used in the back propagation process is as follows: L = -[ylogy^+(1-y)log(1-y^)] Among them, y is the true sample label, which takes the value of 0 or 1; y^ is the probability that the model predicts that the sample is a positive class; During the back propagation process, the intermediate variables and gradient parameters of the neural network are calculated and stored, and the relevant parameters are updated on the neurons.

6. A method for predicting the probability of juvenile crime based on deep learning and neural network as claimed in claim 1, characterized in that: The process of processing static feature data sets using the fully connected layer FC is as follows: Construct a single fully connected layer with a total of m neuron nodes and calculate the output of the neurons; y m =w m1 X1+w m2 X2+w m3 X3,...,w mn X n Z m =f(y m ) Among them, w m is the weight coefficient, f is the activation function sigmoid; Construct an output layer U: U=Z1w′1+Z2w′2+Z3w′3,...,Z m w′ m Among them, w′ m is the weight coefficient; After nonlinear changes, the final result G is: G=f(U) Among them, f is the activation function sigmoid; The error E is calculated by the mean-square error (MSE): Where t is the expected value; Adjust the weights to reduce the error by using the gradient descent method: w new =w old -αΔw Among them, w new is the updated weight parameter, w old is the weight parameter before updating, α is the learning rate, and Δw is the gradient of each weight parameter; For Δw′ m The gradient is: For Δw m The gradient is: 。 7. The method for predicting the probability of juvenile crime based on deep learning and neural network according to claim 1 is characterized in that: After concatenating dynamic and static features, the nonlinear combination of these fused features is learned through multiple fully connected layers. The process of continuously updating the weights and biases of the neural network through offline training is as follows: When stacking fully connected layers, each layer performs a series of linear and nonlinear transformations on the input data; the Sigmoid function is used as the activation function of the last fully connected layer; For the fully connected layers of other hidden layers, the ReLU activation function is selected to introduce nonlinearity; ReLU(x)=max(x,0) The Adam (Adaptive Moment Estimation) optimizer is used during training; the update rules of the Adam optimizer are as follows: m t =β1m t-1 +(1-β1)g t Among them, g t is the gradient of the parameter, β1 and β2 are the decay coefficients of the two exponentially weighted averages, and is the bias-corrected moving average of the gradient, θ t+1 is the updated parameter, η is the learning rate, and ∈ is a small constant used to avoid division by zero.

8. The method for predicting the probability of juvenile crime based on deep learning and neural network according to claim 1 is characterized in that: The process of determining the threshold for judging whether a teenager will commit a crime is as follows: The vertical coordinate TPR of the ROC curve represents the proportion of correct judgments, that is, the probability that the juvenile offender is correctly judged to be a criminal: Among them, TP is true positive, which means the data predicted to be true is actually true; FN is false negative, which means the data predicted to be false but actually true; The horizontal axis FPR of the ROC curve represents the proportion of wrong judgments, that is, the probability of misjudging a non-criminal teenager as a criminal: Among them, FP is false positive, that is, data predicted to be true but actually false; TN is true negative, that is, data predicted to be false and actually false; Select the point on the ROC curve closest to the upper left corner (0, 1) of the coordinate graph as the optimal threshold; When the predicted probability is greater than or equal to the optimal threshold, it corresponds to category 1, which means that a crime will occur; conversely, when the predicted probability is less than the optimal threshold, it corresponds to category 0, which means that a crime will not occur.

Citation Information

Patent Citations

  • Crime quantity prediction method based on linear regression algorithm

    CN112308316A

  • Crime data prediction method and device based on time characteristics

    CN115238585A

  • Crime number prediction method and system based on interpretable machine learning

    CN117033923A

  • Method and system suitable for predicting number of criminal events in multiple regions

    CN117744853A

Cited By

  • Intelligent control method for pickling process

    CN120848429A

  • An intelligent control method for pickling process

    CN120848429B

  • Deep learning-combined teenager physical measurement data health risk prediction and early warning method

    CN121439230A

  • A health risk prediction and early warning method for youth physical fitness data combined with deep learning

    CN121439230B