Breakdown tendency identification method and device based on electroencephalogram signals, electronic equipment and storage medium
By acquiring and analyzing EEG signal data and combining demographic characteristics, a hybrid neural network model is constructed, which solves the problems of low efficiency and poor accuracy of violence tendency recognition in the existing technology, and achieves efficient and accurate violence tendency recognition.
Patent Information
- Application Number
- CN202411312490.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art is difficult to identify the tendency of violence objectively and efficiently, and relies on manual observation and subjective judgment, resulting in low judgment efficiency and easy to make mistakes and miss judgments.
By acquiring EEG signal data, preprocessing and feature extraction, and combining demographic feature data, a hybrid neural network model is constructed to identify violence tendencies.
Efficient and accurate recognition of violent tendency is achieved, the dependence on manual recognition is reduced, and the recognition efficiency and success rate are improved.
Smart Images

Figure CN119441899A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence research, and more specifically, to a method, device, electronic device and storage medium for identifying violent tendencies based on electroencephalogram signals. Background Art
[0002] Violence is a specific psychological and behavioral trait, which refers to the tendency of individuals to use violence to solve problems or express emotions when faced with conflicts or challenges. People with violent tendencies tend to be emotionally unstable and easily angered or impulsive over trivial matters. When they are emotionally excited, they may not be able to control their behavior and resort to beating, scolding, throwing things, disrupting public order and safety, affecting normal business and economic activities, and may even cause more serious crimes. Therefore, how to predict whether someone has a violent tendency in advance has positive significance for preventing potential harm, reducing violent crimes and early education guidance.
[0003] Currently, the identification and prediction of people's violent tendencies are still at the stage of behavioral observation, investigation of past history of violence and family environment, as well as psychological testing and consultation. However, these methods require a lot of manpower, and their judgment results are highly dependent on people's subjective experience and judgment, which can easily lead to misjudgments and missed judgments, and the judgment efficiency is extremely low.
[0004] Therefore, how to objectively and efficiently identify violent tendencies has become a problem that needs to be solved in this field. Summary of the invention
[0005] In view of this, in a first aspect, the present application proposes a method for identifying violent tendencies based on EEG signals, comprising:
[0006] Obtaining EEG signal data of the test group and EEG signal data of the control group;
[0007] Feature extraction was performed on the two groups of EEG signal data respectively, and the signal feature data of the two groups of EEG signal data were compared and combined with the demographic feature data to obtain a violent tendency feature data set;
[0008] Training a hybrid neural network model based on the violent tendency feature dataset;
[0009] The trained hybrid neural network model is used to identify violent tendencies in the subjects' EEG signals.
[0010] Preferably, before extracting features from the two sets of EEG signal data respectively, the method further comprises:
[0011] The EEG signals of the test group and the control group are preprocessed.
[0012] Further preferably, the preprocessing includes: one or more steps of notch filtering, bandpass filtering and independent component analysis.
[0013] Further preferably, the feature extraction includes: performing power spectral density feature extraction on the preprocessed EEG signal using the Welch method.
[0014] Preferably, the extracting power spectral density features of the EEG signal using the Welch method comprises:
[0015] The EEG signal is segmented into multiple segments, and the calculation formula is:
[0016] x i (n)=x(n+iM-M),0≤n≤M,1≤i≤K;
[0017] Wherein, i is used to identify each of the segments, n is used to represent the index variable of the current segmentation position, K represents the number of segmentations, and M represents the number of sampling points of the segment;
[0018] Each of the fragments is subjected to windowing processing, and the calculation formula is:
[0019]
[0020] Among them, R N represents a rectangular window, and π represents pi;
[0021] The periodogram of each segment is obtained according to the windowed data, and the calculation formula is:
[0022]
[0023]
[0024] Among them, I i (w) represents a periodogram, U represents the number of segments, e represents the base of the natural logarithm, j represents an imaginary unit, and ω represents an angular frequency variable;
[0025] The power spectrum density is obtained according to the periodogram, and the calculation formula is:
[0026]
[0027] Among them, P XX represents the power spectral density.
[0028] Further preferably, before combining the demographic characteristic data, the method further comprises:
[0029] Collecting demographic characteristic data of the test group and the control group respectively;
[0030] The comparing of the signal feature data of the two groups of EEG signal data and combining the demographic feature data includes:
[0031] Combining the signal characteristic data of the test group with the demographic characteristic data of the test group to obtain comprehensive characteristic data of the test group;
[0032] Combining the signal characteristic data of the control group with the demographic characteristic data of the control group to obtain comprehensive characteristic data of the control group;
[0033] The comprehensive feature data of the test group and the comprehensive feature data of the control group are compared to obtain the violence tendency feature data set.
[0034] Preferably, the hybrid neural network model includes: a one-dimensional convolution module, a multi-head attention module and a long short-term memory network module.
[0035] Further preferably, the training of the hybrid neural network model according to the violent tendency feature data set includes:
[0036] Using the one-dimensional convolution module to extract local features from the violence tendency feature data set;
[0037] Using the multi-head attention module to perform global feature extraction on the violence tendency feature dataset;
[0038] The long short-term memory network module is used to learn the dependencies between the time series of data in the violence tendency feature dataset.
[0039] Further preferred:
[0040] The hybrid neural network model includes: a fully connected processing module;
[0041] After learning the dependency relationship between the time series of data in the violence tendency feature data set using the long short-term memory network module, the method further includes:
[0042] The hybrid neural network model is subjected to L2 regularization processing by utilizing the fully connected processing module.
[0043] Preferably, the training of the hybrid neural network model according to the violent tendency feature data set further includes:
[0044] The violent tendency feature data set is divided into a training set and a test set; the test set includes a verification set;
[0045] Training the hybrid neural network model using the violent tendency feature data in the training set;
[0046] Using the violent tendency feature data in the validation set to update the weights and biases in the hybrid neural network model;
[0047] The performance of the hybrid neural network model is evaluated using the test set.
[0048] In a second aspect, an embodiment of the present invention further provides a device for identifying violent tendencies based on EEG signals, comprising:
[0049] An acquisition module, used to acquire EEG signal data of a test group and EEG signal data of a control group;
[0050] A feature extraction module is used to extract features from the two sets of EEG signal data respectively, compare the signal feature data of the two sets of EEG signal data and combine them with the demographic feature data to obtain a violent tendency feature data set;
[0051] A training module, used for training a hybrid neural network model according to the violent tendency feature data set;
[0052] The recognition module is used to use the trained hybrid neural network model to identify the violent tendency of the subject's EEG signal.
[0053] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the method disclosed in the first aspect above.
[0054] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the method disclosed in the first aspect above.
[0055] The method for identifying violent tendencies provided in the present application first obtains EEG signal data of a test group and EEG signal data of a control group, performs feature extraction on the two groups of EEG signal data respectively, compares the signal feature data of the two groups of EEG signal data and combines them with demographic feature data to obtain a violent tendency feature data set, then trains a hybrid neural network model based on the violent tendency feature data set, and finally uses the trained hybrid neural network model to identify violent tendencies from the EEG signals of the subjects. The method is a completely new method for identifying violent tendencies based on EEG signals, has high recognition efficiency and success rate, effectively reduces dependence on manual recognition, and expands a new direction for identifying violent tendencies.
[0056] Other features and advantages of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings constituting a part of the present application are used to provide a further understanding of the present application, and the schematic implementation modes and descriptions of the present application are used to explain the present application. In the accompanying drawings:
[0058] Figure 1 A flowchart of a method for identifying violent tendencies based on EEG signals according to a preferred embodiment of the application;
[0059] Figure 2 A schematic diagram of a device for identifying violent tendencies based on EEG signals according to a preferred embodiment of the application;
[0060] Figure 3 A schematic diagram of the structure of an electronic device according to a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0061] The technical solution of the present application will be described in detail below with reference to the accompanying drawings and in combination with the implementation modes.
[0062] At present, some studies have shown that the structure of the human brain is the biological basis for whether a person has violent behavior. The brain of a person with violent tendencies may have a different brain structure from that of a person without violent tendencies. In addition, when someone has violent emotions at a certain moment, the state of their brain activity is also different from the state of their brain activity when they do not have violent tendencies. Therefore, this application designs a method for identifying violent tendencies based on EEG signals. By recording and analyzing EEG signals, the functional state of the brain can be understood and violent tendencies can be evaluated.
[0063] First, this application proposes a method for identifying violent tendencies based on EEG signals, such as Figure 1 As shown, the steps include: 110-140:
[0064] Step 110, obtaining EEG signal data of the test group and EEG signal data of the control group;
[0065] Specifically, an electroencephalogram (EEG) is a signal that reflects brain activity by measuring changes in electrical potential on the user's scalp through a device worn on the user's brain. This application needs to obtain the EEG signal data of the test group and the EEG signal data of the control group separately, and set group labels. Among them, the data in the test group are all marked as EEG data with violent tendencies, and the data in the control group are all marked as EEG data without violent tendencies.
[0066] Preferably, the EEG signal is a weak physiological signal, which is easily affected by endogenous noise and exogenous noise during the acquisition process. Therefore, before analyzing the EEG signal, the EEG signals of the two groups need to be preprocessed. Among them, the preprocessing includes: one or more steps of notch filtering, bandpass filtering and independent component analysis. Specifically, it can be: first perform a 50Hz notch filter on the EEG signal data of the test group and the control group to remove the power frequency interference. Then perform a 0.5-50Hz bandpass filter on the EEG signal data of the test group and the control group to remove high-frequency noise. Finally, perform independent component analysis on the EEG signal data of the test group and the control group to remove artifacts such as electrooculography and electromyography.
[0067] Step 120, extracting features from the two sets of EEG signal data respectively, comparing the signal feature data of the two sets of EEG signal data and combining them with the demographic feature data to obtain a violent tendency feature data set;
[0068] Specifically, the feature of the EEG signal extracted by the present application is the power spectral density (PSD) feature, and when extracting the PSD feature, the Welch method can be used to extract the PSD feature of the preprocessed EEG signal. Among them, the principle of the Welch method is to divide the signal into several segments, each segment has an overlapping part, calculate the power spectrum after windowing each segment, and finally average the estimated results of all segments. This method can reduce the variance and improve the accuracy of the estimate.
[0069] In a specific embodiment, the Welch method is used to extract the PSD of 16 channels and 5 bands of the EEG signal as frequency domain features. Among them, the channel can be understood as the different settings of the electrodes of the EEG signal in the brain space position, and the data set is divided into different channels according to the region. The 5 bands of the EEG signal specifically include the bands of delta, theta, alpha, beta and gamma waves.
[0070] For a piece of EEG signal x(n), first divide it into K overlapping or non-overlapping segments. The length of each segment is usually a power of 2 to facilitate the calculation of fast Fourier transform. Each segment has M sampling points, and the calculation formula for the i-th segment is shown in formula (1).
[0071] x i (n)=x(n+iM-M),0≤n≤M,1≤i≤K (1)
[0072] Among them, i is used to identify the segment of the time period extracted from the EEG signal, n is used to represent the index variable of the current segmentation position, K represents the number of segmentations, and M represents the number of sampling points in each segment.
[0073] Then, each segment is windowed. This application uses the Hanning window as the window function of the Welch method, and its window function w(n) is expressed as formula (2). The Hanning window can be understood as a special case of the raised cosine window, which is the sum of the spectra of three rectangular time windows, R N Represents a rectangular window.
[0074]
[0075] Then, the periodogram I of each segment is obtained based on the windowed data. i The calculation formula of (w) is as follows:
[0076]
[0077] Where U represents the number of segments, e represents the base of the natural logarithm, j represents the imaginary unit, and ω represents the angular frequency variable.
[0078] Finally, the power spectral density P is obtained according to the above periodogram XX The calculation formula is shown in formula (5):
[0079]
[0080] After extracting features from the EEG signal data of the test group and the control group, the signal feature data of the test group and the control group can be obtained. However, these signal feature data usually contain large individual differences, such as age, gender, etc. These differences may affect the subsequent identification of violent tendencies. Therefore, in this application, it is necessary to combine the signal feature data with the demographic feature data to identify violent tendencies.
[0081] Specifically, before combining the demographic feature data, the present application also needs to collect the demographic feature data of the test group and the control group respectively, and set group labels. Then, the signal feature data of the test group and the demographic feature data of the test group are combined to obtain the comprehensive feature data of the test group, and the signal feature data of the control group and the demographic feature data of the control group are combined to obtain the comprehensive feature data of the control group. Finally, the comprehensive feature data of the test group and the comprehensive feature data of the control group are compared to obtain the violent tendency feature data set.
[0082] In a specific embodiment, the comparison method can be: each comprehensive feature data in the test group is set to a flag with a violent tendency, and each comprehensive feature data in the control group is set to a flag without a violent tendency. The comprehensive feature data in the test group and the control group are compared, and the same or similar comprehensive feature data in the two groups are set to have a violent tendency flag corresponding to the test group or the control group, so that the comprehensive feature data in the test group and the control group both correspond to clear violent tendency flags. Then the comprehensive feature data and the corresponding violent tendency flags in the two groups are used as violent tendency feature data sets for model training.
[0083] Preferably, the marker of violent tendency is a sign having a tendency gradient representation.
[0084] Thus, when identifying violent tendencies, the present application not only refers to the PSD features of the EEG signal, but also refers to the demographic feature information corresponding to the EEG signal, so that the subsequent identification of violent tendencies is more accurate.
[0085] Preferably, the demographic characteristic data includes, but is not limited to, age, gender, occupation, income, medical history, marital status and other information.
[0086] Step 130, training a hybrid neural network model based on the violent tendency feature data set;
[0087] Specifically, after obtaining the violent tendency characteristic data set, a comprehensive risk assessment model needs to be constructed to identify violent tendencies.
[0088] The risk assessment model in this application is a hybrid neural network model, and can be specifically a 1DCNN-MultiHeadAttention-LSTM neural network model, which includes: a one-dimensional convolution (1D ConvolutionalNeural Network, 1DCNN) module, a multi-head attention (MultiHeadAttention) module and a long short-term memory network (Long Short-Term Memory, LSTM) module. Among them, the one-dimensional convolution module is used to extract local features of the data in the violent tendency feature data set, the multi-head attention module is used to extract global features of the data in the violent tendency feature data set, and the long short-term memory network module is used to learn the dependencies between the time series of features in the violent tendency feature data set. The features here refer to comprehensive features including demographic features and PSD features.
[0089] It is understandable that global feature extraction is conducive to extracting the overall properties of the entire data set, while local feature extraction is conducive to extracting the characteristics of a small part or local area of the data. The present application includes the extraction of global features and local features at the same time. After extraction, the global features and local features can be fused to obtain more accurate EEG signal features that can be used to identify violent tendencies. In addition, the use of long short-term memory network modules can also extract more valuable information to achieve model prediction, classification, recognition, anomaly detection and other tasks.
[0090] Preferably, in order to reduce the overfitting phenomenon of the model, the hybrid neural network model in the present application also includes: a fully connected processing module, which can be specifically set as a Dense layer. After using the long short-term memory network module to learn the dependencies between the time series corresponding to the violent tendency feature data set, the hybrid neural network model is subjected to L2 regularization processing using the fully connected processing module. Among them, the fully connected processing module is used to flatten the output of the previous layer, which can be specifically a convolutional layer or a pooling layer, and connect it to the output layer or the next hidden layer. Its purpose is to convert the high-dimensional feature representation into a one-dimensional vector, and use these features for the final prediction and recognition tasks. L2 regularization can be specifically as follows: the sum of the squares of each element in the weight vector and then taking the square root, and the regularization strength is controlled by introducing a regularization coefficient to reduce the complexity of the model.
[0091] It is understandable that when training a neural network model, the violent tendency feature dataset can be divided into a training set and a test set. The training set is used to train the model, and the test set is used to evaluate the performance indicators of the trained model, such as accuracy and recall. In addition, some data can be randomly selected from the test set as a validation set to reversely update the weights and biases in the model to make the weights and biases in the model more accurate.
[0092] Preferably, the data volume ratio of the training set and the test set is 8:2.
[0093] In a specific embodiment, the violent tendency feature data in the training set is first input into the 1DCNN-MultiHeadAttention-LSTM hybrid neural network model that has been constructed but has not yet completed the training to train the model. During the training, the weights, biases and other parameters in the model are tuned, and it is confirmed whether the number of training rounds is greater than the required number of rounds. If the number of training rounds is not greater than the required number of rounds, the cross entropy function is used for back propagation, the weights and biases in the model are updated and the next round of training is performed, and / or the violent tendency feature data in the validation set is used to directly update the weights and biases in the model and perform the next round of training, until the number of training rounds is greater than the required number of rounds, the model is saved, and the violent tendency feature data in the test set is used to calculate the classification accuracy, recall rate and F1 score of the model. In addition, during the training process, a linear rectification function (Linear rectification function, RELU) activation function can also be used to enable the hybrid neural network model to solve problems such as linear inseparability and gradient disappearance; at the same time, a root mean square back propagation (Root Mean Square Propagation, RMSprop) optimizer can also be used to adaptively adjust the learning rate to solve the gradient disappearance and explosion problems.
[0094] Step 140, using the trained hybrid neural network model to identify the violent tendency of the subject's EEG signal;
[0095] Specifically, after obtaining a usable hybrid neural network model, the trained hybrid neural network model can be used to identify the violent tendency of the subject's EEG signal. Of course, the identification here is only the identification of the EEG signal, and the final confirmation of whether the subject has a violent tendency still requires analysis of the identification results.
[0096] The method for identifying violent tendencies provided in the present application first obtains EEG signal data of a test group and EEG signal data of a control group, performs feature extraction on the two groups of EEG signal data respectively, compares the signal feature data of the two groups of EEG signal data and combines them with demographic feature data to obtain a violent tendency feature data set, then trains a hybrid neural network model based on the violent tendency feature data set, and finally uses the trained hybrid neural network model to identify violent tendencies from the EEG signals of the subjects. The present application is a completely new method for identifying violent tendencies based on EEG signals, with high recognition efficiency and success rate, which effectively reduces dependence on manual recognition and expands a new direction for identifying violent tendencies.
[0097] In addition, the present application also provides a device for identifying violent tendencies based on EEG signals, which is used to implement the above-mentioned method for identifying violent tendencies. The device includes:
[0098] An acquisition module 210 is used to acquire EEG signal data of a test group and EEG signal data of a control group;
[0099] A feature extraction module 220 is used to extract features from the two sets of EEG signal data respectively, compare the signal feature data of the two sets of EEG signal data and combine them with the demographic feature data to obtain a violent tendency feature data set;
[0100] A training module 230, for training a hybrid neural network model according to a violent tendency feature data set;
[0101] The identification module 240 is used to identify the violent tendency of the subject's EEG signal using the trained hybrid neural network model.
[0102] The effect of the device for identifying violent tendencies based on EEG signals disclosed in the present application is the same as that of the method for identifying violent tendencies based on EEG signals, which will not be described in detail here.
[0103] Below, reference Figure 3 The electronic device 11 according to an embodiment of the present application is described. Figure 3 A block diagram of an electronic device according to an embodiment of the present application is shown.
[0104] like Figure 3 As shown, the electronic device 11 includes one or more processors 111 and a memory 112 .
[0105] The processor 111 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 11 to perform desired functions.
[0106] The memory 112 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 111 may run the program instructions to implement the test methods of the various embodiments of the present application described above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.
[0107] In one example, the electronic device 11 may further include: an input device 113 and an output device 114 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0108] The input device 113 may include, for example, a keyboard, a mouse, etc.
[0109] The output device 114 can output various information to the outside, including determined distance information, direction information, etc. The output device 114 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0110] Of course, to simplify, Figure 3 Only some of the components related to the present application in the electronic device 11 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 11 may also include any other appropriate components.
[0111] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the testing method according to various embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.
[0112] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0113] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the testing method according to various embodiments of the present application described in the above “Exemplary Method” section of this specification.
[0114] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0115] The preferred embodiments of the present application are described in detail above; however, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, a variety of simple modifications can be made to the technical solution of the present application, and these simple modifications all fall within the protection scope of the present application.
[0116] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, this application will not further describe various possible combinations.
[0117] In addition, the various implementation modes of the present application may be arbitrarily combined, and as long as they do not violate the concept of the present application, they should also be regarded as the contents disclosed by the present invention.
Claims
1. A method for identifying violent tendencies based on EEG signals, characterized in that: The method comprises: Obtaining EEG signal data of the test group and EEG signal data of the control group; Feature extraction was performed on the two groups of EEG signal data respectively, and the signal feature data of the two groups of EEG signal data were compared and combined with the demographic feature data to obtain a violent tendency feature data set; Training a hybrid neural network model based on the violent tendency feature dataset; The trained hybrid neural network model is used to identify violent tendencies in the subjects' EEG signals.
2. The method according to claim 1, characterized in that Before extracting features from the two sets of EEG signal data respectively, the method further includes: The EEG signals of the test group and the control group are preprocessed.
3. The method according to claim 2, characterized in that The preprocessing includes one or more steps of notch filtering, bandpass filtering and independent component analysis.
4. The method according to claim 1, characterized in that: The feature extraction includes: using the Welch method to extract power spectrum density features of the EEG signal.
5. The method according to claim 4, characterized in that The method of extracting power spectral density features of the EEG signal using the Welch method includes: The EEG signal is segmented into multiple segments, and the calculation formula is: x i (n)=x(n+iM-M),0≤n≤M,1≤i≤K Wherein, i is used to identify each of the segments, n is used to represent the index variable of the current segmentation position, K represents the number of segmentations, and M represents the number of sampling points of the segment; Each of the fragments is subjected to windowing processing, and the calculation formula is: Among them, R N represents a rectangular window, and π represents pi; The periodogram of each segment is obtained according to the windowed data, and the calculation formula is: Among them, I i (w) represents a periodogram, U represents the number of segments, e represents the base of the natural logarithm, j represents an imaginary unit, and ω represents an angular frequency variable; The power spectrum density is obtained according to the periodogram, and the calculation formula is: Among them, P XX represents the power spectral density.
6. The method according to claim 1, characterized in that Prior to combining the demographic characteristic data, the method further includes: Collecting demographic characteristic data of the test group and the control group respectively; The comparing of the signal feature data of the two groups of EEG signal data and combining the demographic feature data includes: Combining the signal characteristic data of the test group with the demographic characteristic data of the test group to obtain comprehensive characteristic data of the test group; Combining the signal characteristic data of the control group with the demographic characteristic data of the control group to obtain comprehensive characteristic data of the control group; The comprehensive feature data of the test group and the comprehensive feature data of the control group are compared to obtain the violence tendency feature data set.
7. The method according to claim 1, characterized in that The hybrid neural network model includes: a one-dimensional convolution module, a multi-head attention module and a long short-term memory network module.
8. The method according to claim 7, characterized in that The step of training the hybrid neural network model according to the violent tendency feature data set includes: Using the one-dimensional convolution module to extract local features from the violence tendency feature data set; Using the multi-head attention module to perform global feature extraction on the violence tendency feature dataset; The long short-term memory network module is used to learn the dependencies between the time series of data in the violence tendency feature dataset.
9. The method according to claim 8, characterized in that: The hybrid neural network model includes: a fully connected processing module; After learning the dependency relationship between the time series of data in the violence tendency feature data set using the long short-term memory network module, the method further includes: The hybrid neural network model is subjected to L2 regularization processing by utilizing the fully connected processing module.
10. The method according to claim 1, characterized in that The step of training the hybrid neural network model according to the violent tendency feature data set also includes: The violent tendency feature data set is divided into a training set and a test set; the test set includes a verification set; Training the hybrid neural network model using the violent tendency feature data in the training set; Using the violent tendency feature data in the validation set to update the weights and biases in the hybrid neural network model; The performance of the hybrid neural network model is evaluated using the test set.
11. A device for identifying violent tendencies based on EEG signals, characterized in that: The device comprises: An acquisition module, used to acquire EEG signal data of a test group and EEG signal data of a control group; A feature extraction module is used to extract features from the two sets of EEG signal data respectively, compare the signal feature data of the two sets of EEG signal data and combine them with the demographic feature data to obtain a violent tendency feature data set; A training module, used for training a hybrid neural network model according to the violent tendency feature data set; The recognition module is used to use the trained hybrid neural network model to identify the violent tendency of the subject's EEG signal.
12. An electronic device comprising: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1 to 10.
13. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Portable electroencephalogram depression detection system in combination with demographic attention mechanism
CN111568446A
Feature selection and feature fusion method based on EEG sensitive lead
CN115804599A
EEG signal analysis method and device, electronic equipment and storage medium
CN118614937A