Personalized reaction training method, device and medium based on electroencephalogram signal
Through EEG signal analysis and multimodal stimulation design, adaptive optimization of personalized reactive force training is achieved, and the problems of teaching students in accordance with the aptitude of traditional training methods and the complexity of EEG data processing are solved, improving the training effect and efficiency.
Patent Information
- Application Number
- CN202411433468.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-10-15
AI Technical Summary
Traditional reactive force training methods are difficult to teach according to their aptitude and cannot effectively utilize individual differences, resulting in poor training results. Applying EEG signals to reactive force training faces high noise, high dimensions and high complexity data processing challenges. How to design personalized training The mode and closed-loop feedback optimization process are also a major problem.
By acquiring and segmenting EEG data, extracting pattern feature information, performing multi-scale time window segmentation, feature extraction and frequent pattern selection, forming initial and fine reaction pattern mapping sequence vectors, matching similar prototypes, designing personalized training plans, and using multiple Modal stimulation and adjustment of parameter intensity to achieve adaptive optimization training.
It has achieved targeted and efficient improvements in personalized responsiveness training, and can dynamically restore user concentration status, improve current concentration and cognitive ability, and optimize concentration management ability.
Smart Images

Figure CN118949219B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of brain-computer interface technology, and in particular to a personalized reaction training method, device and medium based on electroencephalogram signals. Background Art
[0002] As one of the important cognitive abilities of human beings, reaction ability has been widely used in many fields, such as athlete reaction training, driver alertness training, emergency response ability training of military personnel, etc. Traditional reaction ability training methods mainly rely on theories such as psychology and education, and design a series of general training tasks and stimuli, but because individual differences are ignored, it is difficult to teach students in accordance with their aptitude, and the training effect is often unsatisfactory.
[0003] In recent years, with the development of brain science and artificial intelligence technology, EEG analysis and cognitive computing have gradually entered the field of reaction training. EEG signals can directly reflect the state of neural activity in the human body and have a strong ability to explain the individual's cognitive process.
[0004] However, it is not easy to apply EEG analysis technology to reaction training. First of all, the high noise, high dimensionality and high complexity of EEG signals pose great challenges to data processing. Technical personnel in this field need to design effective denoising, feature extraction and pattern recognition algorithms to extract valuable cognitive pattern information from massive amounts of raw data. Secondly, how to reasonably design reaction stimuli based on the extracted cognitive patterns, and further use the subjects' new feedback data to optimize the training plan to form a closed-loop feedback and adaptive optimization process is also a major problem. In addition, due to individual differences, it is difficult for us to design a universal and effective training model for all subjects. We must conduct personalized analysis, modeling and optimization for each subject to truly achieve the optimal training effect. Summary of the invention
[0005] The embodiments of the present application provide a personalized reaction training method, device and medium based on EEG signals, which can apply EEG analysis technology to reaction training. The provided method forms a closed-loop adaptive optimization process, fully utilizes individual EEG information for accurate modeling and training, and greatly improves the pertinence and efficiency of reaction training.
[0006] In a first aspect, the present application provides a personalized reaction training method based on EEG signals, comprising:
[0007] Obtaining original EEG data of the user to be trained, segmenting the original EEG data, and obtaining multiple EEG data segments;
[0008] Acquire pattern feature information of each EEG data segment, and determine a response pattern feature vector corresponding to each EEG data segment according to the pattern feature information;
[0009] Connecting multiple reaction pattern feature vectors according to the time corresponding to each reaction pattern feature vector to obtain an initial reaction pattern mapping sequence vector, matching the initial reaction pattern mapping sequence vector with multiple pattern prototypes in a preset reaction pattern knowledge base to obtain multiple similar prototypes;
[0010] Preprocessing multiple EEG data segments to obtain the number of response patterns corresponding to each EEG data segment; wherein the preprocessing includes multi-scale time window segmentation, feature extraction, response pattern combination and frequent pattern selection;
[0011] If the EEG data segment corresponds to multiple response modes, the EEG data segment is determined to be a target data segment, and a single response mode mapping vector corresponding to the target data segment is obtained;
[0012] In the initial reaction pattern mapping sequence vector, the reaction pattern feature vector corresponding to the target data segment is replaced according to each single reaction pattern mapping vector to obtain a refined reaction pattern mapping sequence vector;
[0013] The refined reaction pattern mapping sequence vector is matched with multiple similar prototypes to obtain at least one target prototype, and the corresponding training plan for the user is determined according to the target prototype to complete the personalized reaction training for the user.
[0014] In a second aspect, the present application also provides a personalized reaction training device, comprising:
[0015] A data segmentation module is used to obtain the original EEG data of the user to be trained, segment the original EEG data, and obtain multiple EEG data segments;
[0016] A feature acquisition module is used to acquire pattern feature information of each EEG data segment, and determine a response pattern feature vector corresponding to each EEG data segment according to the pattern feature information;
[0017] A prototype acquisition module is used to connect multiple reaction pattern feature vectors according to the time corresponding to each reaction pattern feature vector, obtain an initial reaction pattern mapping sequence vector, match the initial reaction pattern mapping sequence vector with multiple pattern prototypes in a preset reaction pattern knowledge base, and obtain multiple similar prototypes;
[0018] A data processing module is used to pre-process multiple EEG data segments to obtain the number of reaction patterns corresponding to each EEG data segment; wherein the pre-processing includes multi-scale time window segmentation, feature extraction, reaction pattern combination and frequent pattern selection;
[0019] A single acquisition module, used for determining the EEG data segment as a target data segment if the EEG data segment corresponds to multiple reaction modes, and acquiring a single reaction mode mapping vector corresponding to the target data segment;
[0020] A fine acquisition module, used to replace the reaction pattern feature vector corresponding to the target data segment according to each single reaction pattern mapping vector in the initial reaction pattern mapping sequence vector, and obtain a fine reaction pattern mapping sequence vector;
[0021] The training completion module is used to match the fine reaction pattern mapping sequence vector with multiple similar prototypes, obtain at least one target prototype, determine the training plan corresponding to the user according to the target prototype, and complete the personalized reaction training for the user.
[0022] In a third aspect, the present application also provides a computer device, including a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the personalized reaction training method based on EEG signals as described in the first aspect is implemented.
[0023] In a fourth aspect, the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the personalized reaction training method based on EEG signals as described in the first aspect.
[0024] The invented method realizes all-round, closed-loop optimization and adjustment of user attention by designing multi-modal stimulations such as vision (font, color, animation, etc.), hearing (volume, pitch, speech speed, etc.), and touch (vibration intensity), and dynamically adjusting the parameter intensity of each modal stimulation based on the adjustment coefficient. The system will automatically select the appropriate stimulation mode (such as visual prompts, voice broadcasts, etc.) and the corresponding stimulation intensity according to the current concentration status, and guide the user to refocus on the cognitive training task. During the training process, the intelligent system forms an adaptive optimization closed loop with the user, continuously perceives and analyzes the user's concentration state, and conducts targeted adjustment interventions to dynamically restore the concentration to the optimal range, ensuring that the training task is completed efficiently. Long-term use of this method can not only improve the user's current concentration, but also play a role in cognitive ability training and habit formation, and gradually optimize their concentration management ability.
[0025] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram of a process flow of a personalized reaction training method based on EEG signals according to an embodiment of the present application;
[0027] Figure 2This is a schematic diagram of the structure of a personalized reaction training device shown in an embodiment of the present application;
[0028] Figure 3 A schematic diagram of the structure of a computer device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0030] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0031] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0032] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0033] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0034] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0035] The technical solution of the embodiment of the present application is introduced below.
[0036] Please refer to Figure 1 , Figure 1 The flowchart of a personalized reaction training method based on EEG signals provided in the embodiment of the present application is shown in FIG. The personalized reaction training method based on EEG signals in the embodiment of the present application can be applied to computer devices, including but not limited to smart phones, laptops, tablet computers, desktop computers, physical servers, cloud servers and other devices. Figure 1 As shown, the personalized reaction force training method based on EEG signals of this embodiment includes steps S101 to S107, which are described in detail as follows:
[0037] Step S101, obtaining the original EEG data of the user to be trained, segmenting the original EEG data, and obtaining a plurality of EEG data segments.
[0038] Specifically, the user's original EEG signals are obtained by using EEG equipment (such as EEG helmets). These signals reflect the user's EEG activities in different time periods. The continuous original EEG signals are divided into multiple independent EEG data segments, each of which corresponds to a certain time window. This provides a basis for fine-grained analysis of the original EEG signals. Data redundancy is eliminated, making subsequent processing more efficient and accurate.
[0039] Step S102, obtaining pattern feature information of each EEG data segment, and determining a reaction pattern feature vector corresponding to each EEG data segment according to the pattern feature information.
[0040] Specifically, feature information such as frequency, amplitude, phase, etc. is extracted from each EEG data segment. The extracted feature information is mapped into a standard feature vector for subsequent calculation and comparison. The key pattern information in the EEG signal is retained, providing a basis for identifying the user's response pattern. This makes the data comparable and computationally friendly.
[0041] Step S103, connecting multiple reaction pattern feature vectors according to the time corresponding to each reaction pattern feature vector to obtain an initial reaction pattern mapping sequence vector, matching the initial reaction pattern mapping sequence vector with multiple pattern prototypes in a preset reaction pattern knowledge base to obtain multiple similar prototypes.
[0042] Specifically, multiple reaction pattern feature vectors are connected into an initial reaction pattern mapping sequence vector in chronological order. The initial sequence vector is matched with the existing pattern prototypes in the reaction pattern knowledge base to find similar pattern prototypes. This provides a global reaction pattern view that can understand the user's reaction characteristics as a whole. By matching the existing pattern prototypes, historical data and experience can be used to improve the accuracy of the analysis.
[0043] Step S104, preprocessing the multiple EEG data segments to obtain the number of reaction patterns corresponding to each EEG data segment; wherein the preprocessing includes multi-scale time window segmentation, feature extraction, reaction pattern combination and frequent pattern selection.
[0044] Specifically, the EEG data segments are segmented into different time scales to capture features at different time scales. EEG features are extracted from each segmented time window. The extracted features are combined to form different response patterns. The patterns with higher frequency of occurrence are selected from all combinations as a reference for the number of response patterns. This provides multi-scale feature analysis and increases the ability to identify complex response patterns. Frequent pattern selection ensures that the selected patterns are representative and universal.
[0045] Step S105: if the EEG data segment corresponds to multiple reaction modes, the EEG data segment is determined to be a target data segment, and a single reaction mode mapping vector corresponding to the target data segment is obtained.
[0046] Specifically, by analyzing each EEG data segment, the corresponding multiple response patterns are determined. The multiple response patterns are further analyzed to determine the most obvious and important pattern, which is used as the target data segment. The target data segment is mapped to a single response pattern feature vector. This ensures that the response pattern of each data segment is clear and unambiguous, improving the accuracy of subsequent analysis. It can identify multiple patterns and improve the comprehensiveness of response pattern recognition.
[0047] Step S106: In the initial reaction pattern mapping sequence vector, the reaction pattern feature vector corresponding to the target data segment is replaced according to each single reaction pattern mapping vector to obtain a refined reaction pattern mapping sequence vector.
[0048] Specifically, the identified single reaction pattern mapping vector replaces the corresponding complex feature vector in the initial sequence to form a more refined and clear new reaction pattern mapping sequence vector. This improves the clarity and accuracy of the reaction pattern sequence, simplifies the data structure, and makes subsequent processing more convenient.
[0049] Step S107, matching the refined reaction pattern mapping sequence vector with multiple similar prototypes to obtain at least one target prototype, determining a training program corresponding to the user according to the target prototype, and completing personalized reaction training for the user.
[0050] Specifically, the refined reaction pattern mapping sequence vector is matched in detail with multiple similar prototypes in the knowledge base. According to the matching results, one or more target prototypes that are closest to the user's reaction pattern are selected. A personalized reaction training plan is formulated for the user based on the target prototype. A training plan tailored to the individual characteristics of the user is provided to improve the effectiveness of the training. Historical data and experience are used to provide users with more scientific and effective training content. In summary, the personalized reaction training method based on EEG signals can tailor an accurate training plan for each user through sophisticated signal processing and pattern recognition, which helps to improve the user's reaction ability and brain health.
[0051] In some embodiments, obtaining raw EEG data of a user to be trained includes: collecting raw EEG data when the user performs a specified reaction task; performing a preset denoising operation on the raw EEG data to remove environmental noise and physiological artifacts from the raw EEG data; the preset denoising operation includes one or more of bandpass filtering, wavelet denoising and artifact correction; performing impedance balance correction on the denoised raw EEG data; performing a preset suppression operation on the raw EEG data to remove high-amplitude spikes and baseline drifts from the raw EEG data; the preset suppression operation includes one or more of weighted sliding average and notch filtering; and performing spatial filtering on the raw EEG data to improve the quality of the raw EEG data.
[0052] Collect raw EEG data when the user performs a specified reaction task to ensure that the data is task-relevant. Bandpass filtering removes noise outside a specific frequency range. Wavelet denoising uses wavelet transform to separate the noise component in the signal. Artifact correction corrects signal distortion caused by physiological artifacts such as eye movement and electromyography. Impedance balance correction corrects the impedance between the electrode and the skin to improve signal quality. Weighted sliding average smoothes EEG signals and reduces high-frequency noise. Notch filtering suppresses noise at a specific frequency (such as power supply frequency). Spatial filtering improves the signal-to-noise ratio in EEG signals and enhances the characteristics of target signals. It can effectively reduce environmental noise and physiological artifacts, making raw EEG data cleaner and more reliable. Improve signal quality and provide a high-quality data foundation for subsequent analysis.
[0053] In some embodiments, the original EEG data is segmented to obtain multiple EEG data segments, including: normalizing the EEG data matrix corresponding to the original EEG data to obtain a standardized matrix corresponding to the original EEG data to eliminate the amplitude scale difference of the original EEG data; calculating the similarity weights of a preset time point in the original EEG data and each remaining time point in the original EEG data according to the standardized matrix, and constructing a similarity matrix according to multiple similarity weights; constructing an undirected weighted graph according to the similarity matrix, and dividing the undirected weighted graph based on a spectral clustering algorithm to obtain multiple sub-graphs; obtaining multiple channel data of the time point corresponding to each sub-graph, and constructing an EEG data segment according to the channel data corresponding to each sub-graph.
[0054] Normalize the original EEG data matrix to eliminate amplitude differences. Calculate the similarity weights between the determined time point and the rest of the time points to form a similarity matrix. Construct an undirected weighted graph based on the similarity matrix and use the spectral clustering algorithm to divide multiple subgraphs. Construct EEG data segments based on the time point and channel data corresponding to each subgraph. By achieving reasonable data segmentation, improve the ability to capture the temporal local features of EEG signals. And accurately capture the significant change moments in the reaction task.
[0055] In some embodiments, pattern feature information of each EEG data segment is obtained, including: performing multi-layer wavelet packet decomposition on each EEG data segment to obtain multiple wavelet packet decomposition coefficient matrices; reconstructing each wavelet packet decomposition coefficient matrix to obtain a time series corresponding to each wavelet packet decomposition coefficient matrix; obtaining the scale energy corresponding to each time series, and obtaining a time scale energy representation based on the multiple scale energies; and obtaining pattern feature information corresponding to the scale energy representation in a preset reaction pattern template library.
[0056] By performing wavelet packet decomposition on the EEG data segment, the decomposition coefficient matrix is obtained. The time series is reconstructed according to the decomposition coefficient matrix. The scale energy is calculated and obtained through the time series. The corresponding pattern feature information is matched in the reaction pattern template library. By providing multi-scale and multi-frequency feature descriptions, the comprehensive description capability of EEG signal features is improved. The energy scale feature makes the pattern feature extraction more physically meaningful and explanatory.
[0057] Exemplarily, obtaining pattern feature information corresponding to the scale energy representation includes: calculating the correlation coefficient between the time scale energy representation and each pattern template information in the reaction pattern template library; determining the pattern feature information corresponding to the scale energy representation in multiple pattern template information according to multiple correlation coefficients; determining the reaction pattern feature vector corresponding to each EEG data segment according to the pattern feature information, including: constructing the reaction pattern feature vector corresponding to each EEG data segment according to the correlation coefficient corresponding to the pattern feature information.
[0058] By calculating the correlation coefficient between the time scale energy representation and the pattern template information, the feature information is determined by matching the correlation coefficients. The corresponding reaction pattern feature vector is constructed according to the correlation coefficients. An effective mapping from the scale energy representation to the pattern feature vector is provided. By matching the correlation coefficients, the high correlation and matching degree between the pattern features and the data segments are ensured.
[0059] In some embodiments, obtaining a single reaction pattern mapping vector corresponding to a target data segment includes: obtaining a reaction pattern feature vector corresponding to each pattern feature information corresponding to the target data segment; and fusing multiple reaction pattern feature vectors to obtain a single reaction pattern mapping vector.
[0060] By obtaining the reaction pattern feature vector corresponding to each pattern feature information of the target data segment, multiple reaction pattern feature vectors are fused to generate a single reaction pattern mapping vector. Multiple feature vectors are fused to improve the comprehensive description ability of a single vector for multiple patterns. A unified description is provided to make subsequent processing simpler and more efficient.
[0061] In some embodiments, a refined reaction pattern mapping sequence vector is matched with multiple similar prototypes to obtain at least one target prototype, including: calculating an association score between the refined reaction pattern mapping sequence vector and each similar prototype; the association score includes time similarity and reaction pattern relevance; and determining a target prototype among multiple similar prototypes based on multiple association scores.
[0062] By calculating the correlation score (temporal similarity and reaction pattern correlation) between the refined reaction pattern mapping sequence vector and each similar prototype, the target prototype closest to the user's reaction pattern is selected based on the correlation score. A full range of multi-dimensional matching measures are provided to ensure the accuracy of target prototype selection. Matching accuracy is improved through temporal similarity and reaction pattern correlation.
[0063] In some embodiments, determining a training plan corresponding to a user according to a target prototype includes: obtaining a set of associated stimuli with the target prototype in a preset reaction stimulus library; the associated stimulus set includes at least one or more of visual stimulation, sensory stimulation, and auditory stimulation; obtaining the corresponding presentation method and presentation order of each associated stimulus in the associated stimulus set; and generating a training plan according to the associated stimulus set, the corresponding presentation method and presentation order of each associated stimulus.
[0064] By obtaining a set of stimuli related to the target prototype from the preset reaction stimulus library, obtaining the presentation method and presentation order of each stimulus, and generating a training plan, a training stimulus that highly matches the user's reaction pattern is provided. Personalized training plans can improve training effects and user experience.
[0065] The following is a detailed description of the method provided by the present application:
[0066] 1. In response to acquiring the EEG data of the subject, the data is segmented to obtain multiple data segments.
[0067] Data collection and preprocessing: In personalized reaction training, it is first necessary to select a targeted reaction task as a benchmark to evaluate the subject's initial reaction ability level, and then develop a personalized training plan based on this. According to the training purpose and actual needs, the reaction task can be flexibly set. Common task forms include key reactions under visual stimulation, voice reports under sound stimulation, and compound reactions under multi-sensory stimulation. Taking the key reaction task under visual stimulation as an example, a series of graphical visual cues (such as arrows, letters, symbols, etc.) can be designed and randomly presented on the computer screen, requiring the subject to make the corresponding key reaction (such as pressing the left and right arrow keys) as quickly as possible when identifying specific target cues (such as left and right arrows). By recording the subject's reaction time and accuracy, the basic level of multiple cognitive function dimensions such as visual attention, information processing speed, and motor control ability can be evaluated.
[0068] While the subjects complete the designated response tasks, they need to wear EEG acquisition equipment throughout the process to record their neural electrical activity in real time. EEG acquisition devices usually consist of EEG caps, electrodes, leads and other components. Among them, multiple electrodes are embedded in the EEG cap and fixed in different areas of the scalp according to a certain spatial layout. The number of electrodes should be selected to take into account both signal quality and ease of wearing, usually between 16 and 128 leads. Commonly used electrode arrangement schemes such as the international 10-20 system use anatomical landmarks such as the root of the nose and the mandibular prominence as references to distribute the electrodes equidistantly on the midsagittal and frontotemporal planes of the scalp. Lead wires connect each electrode to the EEG amplifier, which can adjust the gain and frequency band parameters as needed to adapt to EEG signals with different amplitudes and frequency characteristics. At the same time, reference electrodes need to be set at the earlobe or mastoid to provide common-mode noise suppression and baseline drift correction. The entire acquisition process is required to be carried out in a quiet shielded room, and the subjects should remain relaxed and alert, and minimize facial muscle movements, eye movements and other behaviors that may introduce artifacts.
[0069] After the original EEG signal is sampled by the EEG amplifier, it needs to be preprocessed immediately to remove environmental noise and physiological artifacts. The preprocessing process usually includes several steps such as bandpass filtering, wavelet denoising, and artifact correction. First, the original signal is filtered in the frequency domain using a bandpass filter, and the appropriate passband range (such as 0.5100Hz) is set to effectively suppress 50Hz power frequency interference and extremely low frequency drift, while retaining rhythmic components such as δ (0.54Hz), θ (48Hz), α (813Hz), β (13~30Hz), and γ (>30Hz) to the greatest extent. The filter type can be selected from Chebyshev type I, elliptical, etc. to obtain the steepest roll-off characteristics. Then, the instantaneous high-frequency noise is further removed from the filtered EEG signal using time-frequency analysis methods such as wavelet transform. The selection of wavelet basis function should match the non-stationary characteristics of the EEG signal, and commonly used ones include Daubechies, Symlet, Coiflet, etc. By performing wavelet multi-scale decomposition on the EEG signal and then thresholding the wavelet coefficients, the spike waveforms caused by electromyography, electrooculography, etc. can be effectively detected and suppressed to obtain a smooth and stable EEG waveform.
[0070] In order to eliminate impedance fluctuations caused by head movement, loose electrodes, etc., the EEG signal needs to be corrected for impedance balance. The common method is to calculate the mutual correlation coefficient between the electrodes, determine the electrodes with correlation below a certain threshold as poor contact, remove their data, and then replace them with the average data of adjacent electrodes to avoid the instability of individual electrodes affecting the overall data quality. At the same time, some high-amplitude spikes and baseline drift may still remain in the corrected EEG signal, which needs to be further suppressed by weighted sliding average, notch filtering and other methods to improve the signal-to-noise ratio.
[0071] Finally, the preprocessed multi-channel EEG signals are spatially filtered to highlight the unique activation patterns of local brain regions. Common spatial filtering methods include common mean reference (CAR) and topographic mapping. CAR eliminates the noise components common to all electrodes by subtracting the mean of all channels moment by moment, highlighting the specific activation of each electrode. Topographic mapping uses an interpolation algorithm to convert discrete multi-channel EEG signals into continuous scalp distribution maps, which intuitively reflect the energy distribution dynamics of each brain region and provide an intuitive basis for subsequent brain function positioning and feature extraction. After these steps of screening and purification, EEG signals with good quality and stable features can be obtained.
[0072] Data segmentation: This application proposes an adaptive segmentation algorithm based on graph segmentation, which can automatically determine the optimal segmentation point according to the actual characteristics of the EEG data without pre-setting a fixed window size or event marker. Compared with the traditional segmentation method, this algorithm has the following innovations: First, by constructing a graph structure to characterize the local and global characteristics of the EEG data, the segmentation rigidity caused by the fixed window is avoided; second, the number of segmentation points K is adaptively determined to automatically process different EEG patterns under different experimental tasks; third, the results of the spectral clustering algorithm can be directly used as a preliminary reaction pattern mapping. Specific steps:
[0073] (1) The preprocessed EEG data matrix X is normalized so that the data distribution mean of each channel is 0 and the variance is 1, which is recorded as the standardized matrix X'. This step is to eliminate the amplitude scale differences between different channels so that the data of each channel have the same statistical characteristics, so as to better calculate the similarity weight. Specifically, the mean μ(i) and standard deviation σ(i) of the time series {x(i,1), x(i,2),..., x(i,T)} of each channel are calculated, and then the mean is subtracted and divided by the standard deviation to obtain the standardized sequence {(x(i,1)-μ(i)) / σ(i), (x(i,2)-μ(i)) / σ(i),..., (x(i,T)-μ(i)) / σ(i)}. The standardized sequences of all channels are spliced row by row to obtain the standardized matrix X'. After this processing, the data mean of each channel in X' is 0 and the variance is 1, which not only eliminates the scale differences between channels, but also facilitates the robustness of subsequent similarity calculations.
[0074] (2) Calculate the similarity weight between time points t and t', usually using the Pearson correlation coefficient or Gaussian kernel function: w(t,t')=exp(-(||x(t)-x(t')||^2) / (2σ^2)), where x(t) is the vector of all channel data at time point t, and σ is the bandwidth parameter. This step is the key to constructing the graph G, and it is necessary to define the similarity measurement method between nodes. This application adopts the widely used Gaussian kernel similarity, which is a parameter-free, smooth and bounded similarity function. Where ||x(t)-x(t')|| represents the Euclidean distance between the multi-channel data vectors at time points t and t', and σ is the bandwidth parameter of the Gaussian kernel, which controls the smoothness of the similarity. When σ is large, even if there is a large difference between the two vectors, the similarity will not drop to 0, reflecting the smoothness; when σ is small, the similarity will be more sensitive to smaller differences. The bandwidth σ is a hyperparameter that needs to be tuned according to the actual data distribution. In addition to the Gaussian kernel, the present application may also use the Pearson correlation coefficient to measure the linear correlation between two vectors as the similarity, and the formula is w(t, t') = ∑i = 1 to N[(x(i, t) - μ(i)) * (x(i, t') - μ(i))] / [σ(i) * σ(i')]. Regardless of the similarity measure used, the purpose is to give a larger weight to the time point t and its adjacent highly correlated time point t', and a smaller weight to the time point that is farther away and has a larger difference, so as to reflect the local correlation and global difference in the graph G.
[0075] (3) Construct an undirected weighted graph G = (V, E), where V is NT nodes, each time point t corresponds to a node on N channels, and the edge E is assigned by the similarity weight w(t, t'). Based on the similarity matrix W (size is TT) calculated in step (2), the present application can now construct the weighted graph G. There are a total of N*T nodes in the graph G, and each node v(i, t) corresponds to the data x(i, t) of the i-th channel at time point t. The weight of the undirected edge between any two nodes v(i, t) and v(j, t') is w(t, t'), which is the similarity between the two time points. In this way, the present application converts the original multidimensional time series data matrix X into a weighted graph G, and the edge weights in the graph characterize the similarity relationship between different time points. It is worth noting that in order to reduce the computational and storage overhead, the present application can threshold or sparsely process W, retaining only sufficiently large weights, so that the graph G presents a sparsely connected topological structure.
[0076] (4) Run the spectral clustering algorithm to partition the graph G and obtain K subgraphs C1, C2, ..., CK. Spectral clustering is a commonly used unsupervised graph partitioning method that achieves the optimal partitioning of the graph by optimizing the normalized segmentation correlation value of the eigenvector (corresponding to the eigenvector of the graph Laplacian matrix). Specifically, the present application first calculates the Laplacian matrix L = DW of the graph G, where D is the degree matrix, i.e., D(i,i) = ∑jw(i,j). Then, the eigenvectors {u1,u2,...,uK} corresponding to the first K smallest non-zero eigenvalues of L are solved, and the eigenvectors [u1(v),u2(v),...,uK(v)] of each node v are regarded as the coordinates of the node in the K-dimensional space, and these coordinates are clustered using traditional clustering algorithms such as K-Means. Each cluster obtained corresponds to a subgraph on the graph G. The eigenvector actually reflects the position of the node on the graph and its role in the global topological structure, while the Laplacian matrix encodes the overall manifold geometric information of the graph. By clustering these feature vectors, the present application can maintain the close connectivity of the nodes within each subgraph to the greatest extent, while minimizing the cut construction between subgraphs. In this way, the optimal unsupervised partitioning of the graph G is achieved. It should be pointed out that the number of partitions K obtained by the spectral clustering algorithm is a hyperparameter that needs to be pre-set or automatically estimated. Different K will result in different numbers of subgraphs. How to adaptively determine the optimal K value is a problem that needs further exploration in algorithm design.
[0077] (5) For each subgraph Ck, take all the channel data x(t) at the corresponding time point t to form a data segment X(k). That is, X(k)={x(t)|v(i,t)∈Ck}. Through the spectral clustering algorithm, the present application has divided the graph G into K subgraphs, and each subgraph Ck is a tightly connected set of nodes. Since each node v(i,t) corresponds to the data x(i,t) of the i-th channel at the time point t, the present application only needs to traverse all the nodes in the subgraph Ck, take out their corresponding time points t, and splice all the channel data at these time points to form a time period X(k). The length of this time period depends on the number of nodes (i.e., the number of time points) contained in the subgraph Ck. Since the nodes within the subgraph have a high degree of similarity, X(k) naturally captures a segment of internally consistent EEG patterns. After this step, the present application finally automatically mines a series of internally consistent data segments {X(1), X(2),..., X(K)} from the original EEG data matrix X.
[0078] 2. Assign a preliminary reaction pattern mapping vector to each data segment obtained by segmentation in step 1.
[0079] This application adopts a time-scale energy mapping method based on wavelet packet reconstruction, which can effectively capture the pattern characteristics of EEG data at different time scales. Specifically, for each data segment X(m)=x(t), t=1,2,...,T(m), this application first performs J-layer wavelet packet decomposition to obtain J-layer wavelet packet decomposition coefficient matrices C(j), j=1,2,...,J, where the dimension of each C(j) is N×T(j), N is the number of channels, and T(j)=T(m) / 2^j is the length of the j-th layer time dimension. Then, this application performs wavelet packet reconstruction on each layer of coefficient matrix C(j) to reconstruct the time series X(j)(t), t=1,2,...,T(j) corresponding to this layer. These reconstructed sequences reflect the components of the data segment X(m) at the j-th layer scale. Next, the application calculates the scale energy E(j)(t)=|X(j)(t)|^2 of each reconstructed sequence X(j)(t) and obtains a scale energy curve E(j)={E(j)(1),E(j)(2),...,E(j)(T(j))}. The scale energy curves of all layers are spliced into a matrix, and the application obtains the time-scale energy representation TSR(m)=[E(1);E(2);...;E(J)] of the data segment.
[0080] TSR(m) is a three-dimensional matrix, the first dimension corresponds to time, the second dimension corresponds to scale, and the third dimension corresponds to channel. Each element TSR(m, t, j, n) reflects the energy value at time point t, scale j, and channel n, and can well describe the energy distribution of the signal at different times and scales as a whole. This application uses this TSR(m) as a preliminary mapping representation of the data segment X(m) in the reaction pattern space. In order to obtain the mapping vector, this application needs to construct a reaction pattern template library, which contains M reaction patterns p1, p2, ..., pM, and each pattern consists of L time-scale energy templates, that is, pi={TSRi1, TSRi2, ..., TSRiL}. These templates can be obtained by clustering analysis of a large amount of experimental data, and each template corresponds to a typical reaction pattern in the time-scale energy space.
[0081] Next, the application calculates the similarity s(m,i,j) between TSR(m) and each template TSRij in the time-scale energy space as the mapping score of TSR(m) on the pattern pi. The similarity is calculated using the weighted Pearson correlation coefficient: s(m,i,j)=sum(sum(sum(w(t,j,n)(TSR(m,t,j,n)-muTSR(m))(TSRij(t,j,n)-muTSRij)))) / (sqrt(sum(sum(sum(w(t,j,n)*(TSR(m,t,j,n)-muTSR(m))^2))))sqrt(sum(sum(sum(w(t,j,n)(TSRij(t,j,n)-muTSRij)^2))))).
[0082] Where muTSR(m) and muTSRij are the means of TSR(m) and TSRij, respectively, and w(t, j, n) is a time-scale-channel weighting function used to adjust the importance of different time points, scales and channels in similarity calculation. For example, the present application can give greater weights to low-scale and intermediate time points to highlight that the energy distribution at these positions has more important indicative significance for the application. The weighted correlation coefficient can overcome the defect that the Pearson correlation coefficient is more sensitive to outliers to a certain extent, and obtain a more robust similarity estimate. For each pattern pi, the present application takes the maximum similarity between TSR(m) and all templates in the pattern as its mapping value on the pattern: v(m,i) = max(s(m,i,1),s(m,i,2),...,s(m,i,L)). In this way, the present application finally obtains the mapping vector of the data segment X(m) on M reaction patterns: v(m) = [v(m,1),v(m,2),...,v(m,M)].
[0083] The larger component values in the vector correspond to those response modes that X(m) is more likely to belong to. A major innovation of this mapping method is that this application constructs a time-scale energy feature that can comprehensively characterize the energy distribution characteristics of EEG signals in both time and frequency dimensions from a multi-resolution perspective. Compared with using only a single perspective such as time domain waveform or frequency domain power spectrum, this multi-scale representation more completely describes the time-frequency behavior of the signal, thereby providing richer clues for subsequent pattern matching.
[0084] 3. Connect the multiple reaction pattern mapping vectors corresponding to each data segment in step 2 in chronological order to obtain the initial reaction pattern mapping sequence vector.
[0085] The purpose of this step is to integrate the previously obtained independent data segment mapping vectors into a sequence representation to reflect the evolution trajectory of the reaction pattern over the entire time process. Specifically, assume that step 2 obtains K mapping vectors {v(1), v(2), ..., v(K)}, where v(m) = [v(m, 1), v(m, 2), ..., v(m, M)] is the mapping score vector of the mth data segment on M reaction patterns. This application concatenates these vectors according to the temporal order of the original data segments to form a sequence matrix: V = [v(1), v(2), ..., v(K)].
[0086] This matrix V of dimension M×K is the initial mapping sequence of the entire EEG data in the reaction pattern space, where the mth column corresponds to the mapping vector v(m) of the mth data segment. From the perspective of rows, each row V(i,:) is a K-dimensional sequence vector, describing the evolution trajectory of the i-th reaction pattern over the entire time process. It should be pointed out that different data segments may have different time lengths, so this application uses vector splicing rather than matrix splicing when splicing to retain the independence of each vector.
[0087] To better understand this mapping sequence, this application will take a look at a specific example. Assuming there is a template library containing M=5 reaction modes, in step 2 this application obtains the mapping vectors of K=8 data segments:
[0088] v(1)=[0.2,0.8,0.1,0.3,0.6]^T. v(2)=[0.7,0.4,0.3,0.1,0.2]^T. v(3)=[0.1,0.9,0.6,0.2,0.3]^T. v(4)=[0.5,0.2,0.8,0.7,0.1]^T. v(5)=[0.3,0.6,0.7,0.2,0.4]^T. v(6)=[0.8,0.1,0.4,0.5,0.3]^T. v(7)=[0.2,0.7,0.5,0.4,0.6]^T. v(8)=[0.6,0.3,0.1,0.8,0.2]^T. Then the mapping sequence matrix after splicing in chronological order is: V = [0.2, 0.7, 0.1, 0.5, 0.3, 0.8, 0.2, 0.6; 0.8, 0.4, 0.9, 0.2, 0.6, 0.1, 0.7, 0.3; 0.1, 0.3, 0.6, 0.8, 0.7, 0.4, 0.5, 0.1; 0.3, 0.1, 0.2, 0.7, 0.2, 0.5, 0.4, 0.8; 0.6, 0.2, 0.3, 0.1, 0.4, 0.3, 0.6, 0.2].
[0089] From this, the present application can observe that each row is a sequence of length 8, depicting the dynamic change curve of the corresponding reaction mode over the entire time process. For example, the first row 0.2, 0.7, 0.1, 0.5, 0.3, 0.8, 0.2, 0.6 reflects the change of the score of the first reaction mode at different time points. And each column corresponds to a data segment mapping vector, such as the first column [0.2; 0.8; 0.1; 0.3; 0.6] is v(1). Through this matrix representation, the present application combines the time dimension and the reaction mode dimension, making subsequent sequence analysis and pattern matching more convenient and efficient.
[0090] 4. Use the initial reaction pattern mapping sequence vector obtained in step 3 to perform a preliminary matching query in the reaction pattern knowledge base to obtain preliminary matching results.
[0091] The purpose of this step is to find the most similar pattern prototypes in the existing reaction pattern knowledge base based on the previously obtained mapping sequence, so as to pave the way for subsequent precise matching. Specifically, it is assumed that the reaction pattern knowledge base K of this application contains N pattern prototypes {P1, P2, ..., PN}, and each prototype Pi consists of a mapping sequence vector, that is, Pi=[pi1, pi2, ..., piK], where pij (j=1, 2, ..., K) is the mapping vector at the jth time point, and K is the length of the sequence. These pattern prototypes can come from a priori knowledge base, or they can be typical patterns obtained by clustering analysis of a large amount of labeled sample data.
[0092] In step 3, the present application obtains the initial reaction pattern mapping sequence V of the EEG data to be analyzed. In order to find the pattern prototypes that are most similar to V in the knowledge base K, the present application needs to define a sequence similarity metric to measure the degree of match between V and each pattern prototype Pi. Commonly used sequence similarity measurement methods include dynamic time warping (DTW) distance, longest common subsequence (LCS) distance, kernel similarity, etc. Here, the present application adopts a weighted kernel similarity method based on edit distance.
[0093] Specifically, for a mapping sequence V and any pattern prototype Pi, this application first calculates the kernel similarity k(V(j), Pi(j)) between their mapping vectors at each time point j, usually using a Gaussian kernel or a polynomial kernel, etc.:
[0094] k(V(j),Pi(j))=exp(-γ||V(j)-Pi(j)||^2) or k(V(j),Pi(j))=(V(j)^TPi(j)+c)^d.
[0095] Among them, γ, c, and d are all kernel parameters and need to be tuned according to the actual situation. Next, this application calculates the edit distance D(V,Pi) between V and Pi, that is, the minimum cost required to transform one sequence into another sequence through insertion, deletion, and substitution operations. Specifically, let V=[v1,v2,...,vK], Pi=[p1,p2,...,pK], and this application defines the following recursive formula:
[0096] D(j,l)=min{D(j-1,l)+wi,D(j,l-1)+wd,D(j-1,l-1)+k(vj,pl)*wr}.
[0097] Where D(j,l) represents the minimum editing cost of converting the first j elements of V to the first l elements of Pi, wi, wd, and wr are the weight coefficients of insertion, deletion, and replacement operations, respectively, and need to be set according to the actual task. Through this formula, this application can calculate D(K,K), which is the minimum editing cost of converting the entire V sequence to the Pi sequence. With the edit distance D(V,Pi), this application can define the kernel similarity between V and Pi as: S(V,Pi) = exp(-D(V,Pi) / (K*σ^2)).
[0098] Where σ is the similarity bandwidth parameter, which is used to adjust the smoothness of the similarity. The innovation of this similarity measurement method is that it organically combines the kernel function (used to measure vector similarity) and the edit distance (used to measure sequence similarity), and can take into account both local and global similarities. At the same time, by assigning different weights to editing operations such as insertion and deletion, this application can adjust the sensitivity of similarity to sequence length according to specific needs.
[0099] With the above similarity measurement method, the present application can calculate the similarity S(V, Pi) between the mapping sequence V to be analyzed and the pattern prototype Pi in each knowledge base. By sorting these similarity values, the present application obtains a preliminary matching result, that is, a sorted list of the top N pattern prototypes most similar to V.
[0100] 5. For each data segment obtained in step 1, use multi-scale time window segmentation, feature extraction, reaction pattern combination, frequent pattern selection and other methods to obtain a new and more refined reaction pattern mapping vector.
[0101] Specifically, for each data segment X(m), the present application first uses a multi-scale time window segmentation method to perform multi-level segmentation on the two dimensions of time and frequency, and obtains a series of time-frequency small blocks S(m)={s1,s2,...,sL}. This segmentation strategy draws on the multi-resolution analysis idea of wavelet decomposition and can effectively capture the local pattern characteristics of the signal at different scales. The scale range of the segmentation can be set separately in the two dimensions of time and frequency according to actual needs, such as the scale in the time dimension can be set to [0.1,0.5,1,2] seconds, etc., and the scale in the frequency dimension can be set to [0-4,4-8,8-12,12-30]Hz, etc. For each small block si, the present application extracts its time domain features (such as mean, variance, peak, etc.) and frequency domain features (such as power spectrum, bandpass energy, etc.) to construct a feature vector f(si).
[0102] Next, the present application takes all small feature vectors f(si) as input, applies the reaction pattern combination algorithm, and automatically finds the feature subset that can best characterize the reaction pattern of X(m). Here, the present application adopts an innovative frequent pattern mining algorithm FCP-Miner based on fuzzy dense areas. The basic idea of the algorithm is: first define a fuzzy membership function μ(f(si), C) to measure the degree of membership of the feature vector f(si) to a candidate pattern C, and the membership value is between [0,1]. A dense area is defined as a set of feature vectors whose corresponding membership sum exceeds a certain threshold δ. The goal of this application is to find all dense areas and use them as the constituent feature vectors of the reaction pattern C.
[0103] Specifically, the algorithm includes the following steps:
[0104] (1) Calculate the membership of each eigenvector to each pattern C, μ(f(si), C), as the probability score of f(si) being included in C. This step is the basis of the entire algorithm, and it is necessary to define a suitable membership function to quantify the degree to which a eigenvector belongs to a certain reaction pattern. The design of the membership function can draw on the concepts of fuzzy logic and fuzzy set theory, and by assigning different weights to different dimensional components of the eigenvector, it reflects the importance of certain dimensions to the pattern. For example, for a three-dimensional eigenvector f(si) = [f1, f2, f3], the present application can define the Gaussian kernel function membership:
[0105] μ(f(si),C) = w1exp(-(f1-c1)^2 / σ1^2) + w2exp(-(f2-c2)^2 / σ2^2) + w3*exp(-(f3-c3)^2 / σ3^2).
[0106] Among them, w1, w2, w3 are feature weights, c1, c2, c3 are typical values of mode C in each dimension, and σ1, σ2, σ3 control the width of the Gaussian kernel. Through this nonlinear combination, the application can flexibly characterize complex mode affiliations.
[0107] (2) Enumerate all possible patterns C, and for each C calculate the sum of the membership degrees of all its subordinate feature vectors S(C) = ∑μ(f(si), C). If S(C)>δ, C is considered to be a dense region. The purpose of this step is to discover pattern prototypes that are supported by a large number of feature vectors, namely the so-called dense regions. By setting a threshold δ, the present application can control the lower limit of the density and only retain sufficiently dense patterns. For each enumerated pattern C, the present application calculates the sum of the membership degrees S(C) of all the feature vectors f(si) it contains. If it exceeds δ, C is judged to be a dense region. This ensures that the final output pattern is supported by most of the instances in the data set and is very representative and typical.
[0108] (3) For all dense regions C, sort and prune according to the size of S(C), and only retain the top N with the highest scores as frequent patterns. Since there are a large number of potential dense region patterns, this application needs to further screen these patterns and only retain the top N frequently occurring patterns as the final output. This application can easily achieve this goal by sorting the S(C) values. At the same time, this application can also set other pruning strategies, such as minimum support, maximum pattern length, etc., to control the number and complexity of output patterns.
[0109] (4) Output the feature vector subset corresponding to each frequent pattern as a new reaction pattern mapping vector. After the first three steps, the present application has obtained a series of frequently occurring dense patterns C, each of which corresponds to a feature vector subset {f(sj)|μ(f(sj),C)>0}. The present application directly outputs this subset as a new reaction pattern mapping vector to replace the original mapping vector.
[0110] This mining method based on fuzzy dense regions has many innovative features. First, it draws on the concepts of fuzzy set theory and can handle the inherent ambiguity and uncertainty in EEG data well. Second, through the design of membership functions, this application can flexibly integrate prior knowledge or manual experience into the pattern mining process. Furthermore, the concept of dense regions can well discover frequent and representative patterns, avoiding problems such as combinatorial explosion.
[0111] 6. For the case in step 5 where a data segment is found to correspond to multiple possible reaction modes, multiple reaction mode mapping vectors are assigned to the segment.
[0112] In step 5, the present application discovers a series of frequent reaction patterns for each data segment X(m) through the fuzzy dense region mining algorithm FCP-Miner. Due to the complexity and ambiguity of EEG data itself, it is not uncommon for a data segment to correspond to multiple possible reaction patterns. When encountering this situation, the present application needs to assign multiple reaction pattern mapping vectors to the data segment instead of only assigning a single mapping vector as before. The specific steps are as follows:
[0113] First, the present application sorts all the frequent patterns found in step 5 from large to small according to their support S(C), and obtains an ordered pattern list {C1, C2, ..., CM}. Among them, pattern C1 has the highest support, and CM has the lowest support. The present application sets a support threshold λ, and only retains those frequent patterns whose support is not less than λ, and the remaining patterns will be filtered out.
[0114] For data segment X(m), let its corresponding frequent pattern set be {Ck1, Ck2, ..., Ckr}, where r≥1. If r=1, it means that X(m) corresponds to only one pattern Ck1, and this application only needs to use those feature subsets corresponding to pattern Ck1 as a single mapping vector of X(m), without any other processing. However, if r>1, it means that X(m) corresponds to multiple possible reaction patterns, and this application needs to assign r mapping vectors to X(m).
[0115] Specifically, the present application defines a mapping vector generation function φ(X(m), C) for generating a mapping vector corresponding to mode C for X(m). For each Cki(i=1,2,...,r), the present application uses φ(X(m), Cki) as the mapping vector of X(m) on the i-th mode, thereby obtaining the following r mapping vector groups:
[0116] {v1(m),v2(m),...,vr(m)} = {φ(X(m),Ck1),φ(X(m),Ck2),...,φ(X(m),Ckr)}.
[0117] The design of the mapping vector generation function φ needs to consider two goals at the same time: one is to retain the key features corresponding to the pattern C so that the mapping vector can well characterize the pattern; the other is to use the information of X(m) itself so that the mapping vector can also better characterize the actual characteristics of the data segment. Therefore, the φ function needs to make an appropriate trade-off between the pattern C and the data X(m). This application can use the following weighted formula:
[0118] φ(X(m),C) = α*fC + (1-α)*fX(m).
[0119] Where fC is the reference mapping vector corresponding to mode C, which only contains the key feature dimensions belonging to C, and the value of each dimension is equal to the typical value of C on this feature; fX(m) is the mapping vector of the data X(m) itself, which can be calculated using standard mapping methods (such as time-scale energy mapping); α∈[0,1] is a tuning parameter used to control the weights of mode C and data X(m) in the mapping vector. When α=1, the mapping vector is completely equal to the reference vector of mode C; when α=0, the mapping vector is completely equal to the mapping representation of X(m) itself. By properly selecting the α value, the mapping vector generated by this application can achieve a good balance between mode C and data X(m).
[0120] For example, suppose that after mining with the FCP-Miner algorithm, the present application finds that the data segment X(6) corresponds to two possible reaction modes C2 and C5, where C2 is composed of the feature subset {f1, f3, f7}, and the typical value in these three feature dimensions is c2=[0.2, 0.6, 0.4]; while C5 is composed of the feature subset {f2, f5, f7}, and the typical value in these three dimensions is c5=[0.7, 0.1, 0.4]. At the same time, the present application knows that the standard mapping vector of X(6) is fX(6)=[0.3, 0.5, 0.1, 0.7, 0.2, 0.6, 0.4]. Then, for α=0.7, the present application can calculate the mapping vector of X(6) on C2 and C5 as:
[0121]
[0122]
[0123] It can be seen that v1(6) retains more of the characteristics of the C2 mode, while v2(6) reflects more of the characteristics of the C5 mode, but both incorporate some information of X(6) itself. In this way, the application successfully generates two mode mapping vectors for the data segment X(6), corresponding to the two possible reaction modes of C2 and C5 respectively.
[0124] 7. The multiple mapping vectors assigned to a data segment in step 6 are fused to obtain a single reaction mode mapping vector for the segment.
[0125] In step 6, the present application generates a set of multiple reaction mode mapping vectors {v1(m), v2(m), ..., vr(m)} for each data segment X(m). These mapping vectors correspond to the r reaction modes {Ck1, Ck2, ..., Ckr} to which X(m) may belong. Although this multiple mapping vector representation solves the problem that a single mapping vector is difficult to deal with ambiguity, it also brings new challenges: the present application needs to synthesize a single reaction mode representation from these different mapping vectors to provide a unique input for the subsequent matching and classification process. Therefore, the goal of step 7 is to fuse the multiple mapping vectors generated in step 6 to obtain the final single reaction mode mapping vector for each data segment X(m).
[0126] When designing the fusion strategy π, this application needs to balance two goals: one is to retain the information contained in the original mapping vector to the greatest extent possible to avoid information loss; the other is to assign different weights according to the importance of the corresponding pattern of each mapping vector. In order to achieve these two goals, this application uses a weighted average method to fuse multiple mapping vectors into a single mapping vector. The specific formula is as follows:
[0127] u(m) = (w1(m)*v1(m) + w2(m)*v2(m) + ... + wr(m)*vr(m)) / (w1(m) + w2(m) + ... + wr(m)).
[0128] Where vi(m) represents the i-th mapping vector, wi(m) is the weight function corresponding to the mapping vector, and r is the total number of mapping vectors. By adjusting the weight wi(m) of each mapping vector, the application can control its contribution to the final fusion vector u(m), reflecting the importance of different modes.
[0129] For the design of the weight function wi(m), a simple method is to directly use the support S(Cki) of the pattern Cki calculated in step 5 as the weight of the corresponding mapping vector vi(m), that is:
[0130] wi(m) = S(Cki).
[0131] Where S(Cki) represents the support of pattern Cki, that is, the frequency of the pattern in the data set. The higher the support, the more typical and representative the pattern is, so it should be given a greater weight. In this way, the application can ensure that those high-support and high-frequency patterns occupy a larger proportion in the fused mapping vector u(m), so that u(m) can better reflect the dominant pattern characteristics of the data.
[0132] 8. Use the refined single mapping vector of each data segment obtained in step 7 to replace the initial mapping vector at the corresponding position in step 3 and construct a new refined reaction pattern mapping sequence vector.
[0133] In step 3, the present application obtains an initial reaction mode mapping sequence vector V by splicing the initial mapping vectors v(m) of each data segment X(m) on M reaction modes in chronological order:
[0134] V = [v(1), v(2), ..., v(K)]^T.
[0135] Where K is the total number of data segments, and each column v(m) corresponds to the initial M-dimensional mapping vector of the m-th data segment X(m).
[0136] In step 7, the present application performs fine modeling on each data segment X(m) to obtain a single fine mapping vector u(m) that integrates multiple possible pattern features.
[0137] Now, this application needs to replace the initial mapping vector v(m) at the corresponding position in V in step 3 with the refined mapping vectors u(m) obtained in step 7, so as to construct a new refined reaction pattern mapping sequence vector U. The specific method is:
[0138] For each data segment X(m) and its corresponding initial mapping vector v(m) and refined mapping vector u(m), this application uses u(m) to directly replace v(m) in the mth column of V, that is:
[0139] U(:,m) = u(m).
[0140] Here U(:,m) represents the mth column of the U matrix. Through this replacement operation, the application finally obtains a new mapping sequence matrix:
[0141] U = [u(1), u(2), ..., u(K)]^T.
[0142] This matrix U of dimension M×K is the refined reaction pattern mapping sequence vector constructed in this application. From the perspective of rows, each row U(i,:) depicts the evolution trajectory of the i-th reaction pattern over the entire time process. Since each mapping vector u(m) integrates multiple pattern features, U(i,:) is more refined and accurate than the initial V(i,:). From the perspective of columns, each column U(:,m) corresponds to the reaction pattern mapping vector of the data segment X(m). Compared with v(m) which only reflects the dominant pattern, u(m) has richer pattern fusion information.
[0143] It is worth noting that since the length of the data segment X(m) may be different, the length of the initial mapping vector v(m) and the refined mapping vector u(m) may also be different. However, when replacing u(m) into U, the present application does not need to make any adjustments to its length, and only needs to ensure that u(m) and v(m) are consistent in the dimension M of the mapping vector. This is because, whether it is the initial mapping or the refined mapping, the length of the mapping vector is equal to the number of reaction patterns M, that is, the dimension of the pattern space. The difference is that the initial mapping vector v(m) usually has only one component with a larger value (corresponding to the dominant mode to which the data segment may belong), while the refined mapping vector u(m) combines the characteristics of multiple modes and may have multiple larger component values.
[0144] For example, assuming that there are a total of M=5 reaction modes in this application, the initial mapping vector v(3)=[0.1, 0.2, 0.7, 0.3, 0.4]^T of the data segment X(3), where the third component value is the largest, indicating that X(3) is most likely to belong to the third reaction mode. After the fine modeling in step 7, this application obtains a fine mapping vector u(3)=[0.3, 0.5, 0.4, 0.6, 0.2]^T for X(3) that integrates information from multiple modes. When constructing U, this application only needs to directly replace the third column v(3) of V with u(3), that is:
[0145] U = [..., u(3), ...] = [..., [0.3,0.5,0.4,0.6,0.2]^T, ...].
[0146] It can be seen that although the lengths of u(3) and v(3) may be different, since they are both 5-dimensional vectors, they can be directly replaced without any other adjustments. Through this one-by-one replacement in units of data segments, the present application successfully updates the original single reaction pattern mapping vector v(m) to a refined mapping vector u(m) that integrates multiple pattern features, while also retaining the time dimension structure of the sequence, making full preparations for the subsequent pattern matching process.
[0147] Since each mapping vector in U incorporates all the pattern features that may correspond to the current data segment, the pattern prototype that matches it will inevitably be able to capture the real pattern of the data to the maximum extent, thereby achieving the purpose of high-precision matching. At the same time, the sequence structure of U also well preserves the time evolution information in the original mapping sequence, providing strong support for analyzing the time dynamics of the reaction pattern.
[0148] 9. Use the refined mapping sequence vector obtained in step 8 to perform an exact match within the scope of the preliminary matching results in step 4, calculate the association score between each pattern and the sequence vector, and accurately match the reaction pattern that best fits the sequence vector as the final query result.
[0149] Specifically, assume that in step 4, the present application has found N most similar pattern prototypes {P1, P2, ..., PN} in the reaction pattern knowledge base based on the initial mapping sequence V as the preliminary matching result, where each Pi is a mapping sequence vector that describes the evolution of the pattern prototype in the time dimension. In step 9, the present application compares the refined mapping sequence U with the N candidate pattern prototypes Pi one by one, calculates the correlation score between them, and finds the pattern prototype that best matches U as the final matching result of the EEG data.
[0150] In order to calculate the correlation score between U and the pattern prototype Pi, this application designs an innovative sequence correlation measurement method, which comprehensively considers the similarity in the time dimension and the correlation in the reaction pattern dimension. First, the time similarity sim_t(U, Pi) is defined as:
[0151] sim_t(U, Pi)=∑k=1 to K(u(:,k)^T * pi(:,k)) / sqrt(∑k=1 to K(u(:,k)^T * u(:,k)) *(pi(:,k)^T * pi(:,k))).
[0152] Where u(:, k) and pi(:, k) represent the mapping vectors of U and Pi at the kth time point, respectively, and K is the total number of time points. This similarity is actually a time point-level similarity accumulation based on cosine similarity, which can better reflect the overall fit between U and Pi at each time point.
[0153] Next, this application defines the reaction pattern correlation rel_m(U, Pi) as: rel_m(U, Pi) = ∑i=1 to M[corr(U(i,:), Pi(i,:)) * wi].
[0154] Among them, U(i,:) and Pi(i,:) are the time series of U and Pi in the i-th reaction mode dimension, corr(.,.) is the Pearson correlation coefficient function, and wi is the weight coefficient of the i-th reaction mode, which can be assigned different importance levels to different modes according to actual conditions. This correlation reflects the linear correlation between U and Pi in different reaction mode dimensions, and to some extent reflects the consistency of the two sequences in the trajectory of mode evolution.
[0155] With the temporal similarity and response pattern correlation, this application can combine them and define the comprehensive correlation score between U and Pi as: score(U, Pi) = λ * sim_t(U, Pi) + (1-λ) * rel_m(U, Pi).
[0156] Among them, λ (0≤λ≤1) is an adjustment coefficient used to control the weight of time similarity and response pattern relevance in the comprehensive score. When λ is close to 1, time similarity plays a dominant role; when λ is close to 0, response pattern relevance plays a dominant role. By adjusting the λ value, this application can flexibly balance the matching accuracy in the two dimensions of time and response pattern according to specific task requirements.
[0157] Specifically, the present application calculates the correlation score score(U, Pi) between U and each candidate pattern prototype Pi, sorts these scores from large to small, and selects the largest one as the final matching result. That is, if the pattern prototype Pk satisfies:
[0158] score(U, Pk) = max{score(U, P1), score(U, P2), ..., score(U, PN)}. Then this application determines Pk as the response pattern that best matches the fine mapping sequence U, and outputs it as the final query and analysis result of the EEG data.
[0159] 10. Based on the reaction pattern results obtained in step 9, design reaction stimuli and present them to the subjects, collect the subjects' reaction time data, and evaluate and optimize the reaction training effect.
[0160] According to the reaction pattern results obtained by querying in step 9, the present application can design highly personalized and targeted reaction stimuli and present them to the subjects to collect and evaluate their reaction time data, thereby optimizing their reaction training effect. Specifically, if the final matching reaction pattern is P, the present application first needs to select a set of stimuli C(P)={s1,s2,...,sn} that is highly associated with P in the existing reaction stimulus library R. These stimuli can be visual stimuli (such as rapidly flashing images, texts or symbol sequences), auditory stimuli (such as sudden sound signals), or a combination of multiple sensory stimuli, etc., as long as they are highly consistent with the definition characteristics of pattern P. For example, if P corresponds to a visual recognition mode, then C(P) can include a rapidly flashing image sequence and require the subject to press the corresponding key as quickly as possible; if P corresponds to an auditory alertness mode, then C(P) can include a sudden sound stimulus and require the subject to make a specific response quickly, etc. Once no stimulus highly correlated with P can be found in the reaction stimulus library R, the present application can also refer to the definition of P to automatically generate a set of targeted new stimuli seq(P)={s1',s2',...,sm'}.
[0161] Next, this application needs to design an iterative strategy π(iter) to control the presentation method and presentation order of the stimulus set C(P) / seq(P). Specifically, in the iterth iteration, π(iter) selects a subset from C(P) / seq(P) according to a certain principle and presents it to the subject, which is recorded as S(iter). After presenting each stimulus si in S(iter), this application collects the subject's reaction time ti and gives a corresponding reward score based on the pre-designed instant reward function r(si,ti). The design of the reward function r(si,ti) needs to comprehensively consider multiple factors such as reaction time, the matching degree of stimulus and pattern P, and a feasible form is:
[0162] r(si,ti) = α * exp(-β(ti-tmin)^2) + γ * match(si,P).
[0163] Where tmin is the theoretical minimum reaction time, and α, β, and γ are adjustable parameters that control the weighted proportion of the reaction time score and the proportion of the matching degree with pattern P match(si,P) in the total score. When the subject's reaction time ti is close to the theoretical minimum tmin, the exp term value is close to 1, and the reaction time score is the highest; when ti is far away from tmin, the value of this term will be greatly reduced. The design of the match(si,P) term can be inspired by the calculation of text similarity, such as using the intersection ratio of the feature set associated with pattern P and stimulus si as the matching score. By linearly combining these two terms, r(si,ti) can take into account both reaction time and pattern matching, and more comprehensively evaluate the contribution of the current stimulus si to the subject's reaction training.
[0164] During the stimulus presentation process, π(iter) will collect the following statistics in real time: the mean μti of the reaction time under each stimulus si, the variance σ^2ti of the reaction time, the optimal reaction time best(ti), the expected value of the immediate reward E[r(si,ti)], etc. Based on these statistics, π(iter) can dynamically adjust the selection strategy for the next round S(iter+1). A feasible adaptive adjustment method is:
[0165] (1) Sort E[r(si,ti)] from large to small, select the first M stimuli si_top with the largest expected reward value as the positive sample set Pos; select the last N stimuli si_neg with the smallest expected reward value as the negative sample set Neg.
[0166] (2) Under the Pos and Neg sample sets, respectively fit the regression functions of reward value and stimulus features: E[r(si,ti)] = w1f1(si) + w2f2(si) + ... + wn*fn(si) + b where f1, f2, ... fn are the characteristic factors that affect the reward value (such as stimulus presentation duration, content complexity, etc.), w1, w2, ... wn are the characteristic weights, and b is the bias term. This application can use machine learning methods such as generalized linear models, decision trees or neural networks to fit the two regression functions in Pos and Neg respectively, and obtain weight coefficients wPos and wNeg, so as to analyze the characteristic factors that are crucial to increasing or decreasing the reward value.
[0167] (3) Based on the regression results, a new set of candidate stimuli Candidates(P) is generated in the original stimulus set C(P) / seq(P) or through combined transformation, so that the scores of these new stimuli on the important positive influencing factors fPos are maximized and the scores on the important negative influencing factors fNeg are minimized. For example, given the regression results of wPos and wNeg, when generating Candidates(P), the present application can:
[0168] 1. Shorten the duration, increase the contrast, and maximize the positive influencing factors;
[0169] 2. Appropriately reduce complexity to minimize negative impacts;
[0170] 3. Combine and transform the two key positive factors of duration and contrast to find the optimal combination.
[0171] (4) Replace some or all of the stimuli in the optimized Candidates(P) into S(iter+1), enter the next iteration, and repeat steps (1)-(3). After multiple rounds of iterative optimization, the application can finally obtain a set of high-quality stimulus subsets Sbest with the best expected reward value in C(P) / seq(P).
[0172] (5) For Sbest, its generalization ability needs to be evaluated. The specific approach is to test it on other sample subjects who have not participated in the training. If a high reward score can be obtained on these new subjects, it means that Sbest has good universality; otherwise, further optimization is needed to expand the training samples in order to pursue a stronger generalization effect.
[0173] Through the above strategy, the present application continuously adjusts the stimulation scheme according to the reaction time feedback signal of the subject in a closed optimization loop. After multiple rounds of iterations, a highly personalized, efficient and generalizable reaction training stimulation set and training scheme can be tailored for each subject. This closed-loop optimization based on brain reaction patterns will in turn enhance the subject's brain cognitive function, forming a self-reinforcing positive feedback mechanism and maximizing the effect of reaction training.
[0174] Furthermore, the above embodiments correspond to the following beneficial effects:
[0175] 1. Personalized training, teaching students in accordance with their aptitude: The invented method analyzes and optimizes the individual EEG response patterns of the subjects, which can fully consider individual cognitive differences and tailor the optimal reaction training program for each subject, thus avoiding the inefficiency of the "one-size-fits-all" general program and truly realizing personalized teaching in accordance with their aptitude.
[0176] 2. Closed-loop optimization and continuous improvement: The entire method constructs a closed optimization loop: first, the reaction pattern representation is obtained based on the subject's EEG data, and then the stimulus set is optimized based on the representation. After the subject gives new EEG and behavioral feedback data, the system can update the pattern representation in time and re-optimize the training plan, forming a process of continuous iteration and continuous improvement. This closed-loop optimization design makes full use of all the data information generated during the human-computer interaction process, greatly improving the training accuracy and convergence speed.
[0177] 3. Multimodal fusion and comprehensive analysis: The invented method not only utilizes the results of EEG data analysis, but also integrates multimodal information such as behavioral data (such as reaction time) and stimulation data. It can comprehensively analyze the various factors affecting reaction ability from different levels and dimensions, and provide more comprehensive and systematic support for the optimization of training programs.
[0178] 4. Strong self-explanatory and explainable: Compared with the common black box model, the optimization decision-making process established by the invention method is highly self-explanatory. The system can output the key factors that affect the reward value (i.e., reaction time), and generate a new set of optimized stimuli on this basis. The entire decision-making chain is clear and explainable, which is more conducive to knowledge output and technology promotion.
[0179] In order to implement the personalized reaction force training method based on EEG signals corresponding to the above method embodiment, so as to achieve the corresponding functions and technical effects. Figure 2 , Figure 2 The structure block diagram of a personalized reaction training device 200 provided in an embodiment of the present application is shown. For the convenience of description, only the parts related to the present embodiment are shown. The personalized reaction training device 200 provided in an embodiment of the present application includes:
[0180] The data segmentation module 201 is used to obtain the original EEG data of the user to be trained, segment the original EEG data, and obtain multiple EEG data segments;
[0181] A feature acquisition module 202 is used to acquire pattern feature information of each EEG data segment, and determine a response pattern feature vector corresponding to each EEG data segment according to the pattern feature information;
[0182] The prototype acquisition module 203 is used to connect multiple reaction pattern feature vectors according to the time corresponding to each reaction pattern feature vector, obtain an initial reaction pattern mapping sequence vector, match the initial reaction pattern mapping sequence vector with multiple pattern prototypes in a preset reaction pattern knowledge base, and obtain multiple similar prototypes;
[0183] The data processing module 204 is used to pre-process the multiple EEG data segments to obtain the number of reaction patterns corresponding to each EEG data segment; wherein the pre-processing includes multi-scale time window segmentation, feature extraction, reaction pattern combination and frequent pattern selection;
[0184] A single acquisition module 205 is used to determine that the EEG data segment is a target data segment if the EEG data segment corresponds to multiple reaction modes, and to acquire a single reaction mode mapping vector corresponding to the target data segment;
[0185] A fine acquisition module 206 is used to replace the reaction pattern feature vector corresponding to the target data segment according to each single reaction pattern mapping vector in the initial reaction pattern mapping sequence vector to obtain a fine reaction pattern mapping sequence vector;
[0186] The training completion module 207 is used to match the fine reaction pattern mapping sequence vector with multiple similar prototypes, obtain at least one target prototype, determine the training plan corresponding to the user according to the target prototype, and complete the personalized reaction training for the user.
[0187] The personalized reaction force training device 200 described above can implement the personalized reaction force training method based on EEG signals of the above method embodiment. The options in the above method embodiment are also applicable to this embodiment and will not be described in detail here. The rest of the contents of the embodiment of the present application can refer to the contents of the above method embodiment, and will not be repeated in this embodiment.
[0188] Figure 3 This is a schematic diagram of the structure of a computer device provided in one embodiment of the present application. Figure 3 As shown, the computer device 3 of this embodiment includes: at least one processor 30 ( Figure 3Only one is shown in the figure), a memory 31 and a computer program 32 stored in the memory 31 and executable on the at least one processor 30, wherein the processor 30 implements the steps of any of the above method embodiments when executing the computer program 32.
[0189] The computer device 3 may be a computing device such as a smart phone, a tablet computer, a desktop computer, a cloud server, etc. The computer device may include but is not limited to a processor 30 and a memory 31. Those skilled in the art will understand that Figure 3 It is only an example of computer device 3 and does not constitute a limitation on computer device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it may also include input and output devices, network access devices, etc.
[0190] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0191] In some embodiments, the memory 31 may be an internal storage unit of the computer device 3, such as a hard disk or memory of the computer device 3. In other embodiments, the memory 31 may also be an external storage device of the computer device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the computer device 3. The memory 31 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 31 may also be used to temporarily store data that has been output or is to be output.
[0192] In addition, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0193] An embodiment of the present application provides a computer program product. When the computer program product is run on a computer device, the computer device implements the steps in the above-mentioned method embodiments when executing the computer device.
[0194] In several embodiments provided in the present application, it is understood that each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.
[0195] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0196] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims
1. A personalized reaction training method based on EEG signals, characterized in that: include: Acquire original EEG data of a user to be trained, segment the original EEG data, and acquire multiple EEG data segments; Acquire pattern feature information of each of the EEG data segments, and determine a response pattern feature vector corresponding to each of the EEG data segments according to the pattern feature information; Connecting a plurality of the reaction pattern feature vectors according to the time corresponding to each of the reaction pattern feature vectors to obtain an initial reaction pattern mapping sequence vector, and matching the initial reaction pattern mapping sequence vector with a plurality of pattern prototypes in a preset reaction pattern knowledge base to obtain a plurality of similar prototypes; Preprocessing the plurality of EEG data segments to obtain the number of reaction patterns corresponding to each EEG data segment; wherein the preprocessing includes multi-scale time window segmentation, feature extraction, reaction pattern combination and frequent pattern selection; If the EEG data segment corresponds to multiple reaction modes, determining the EEG data segment as a target data segment, and obtaining a single reaction mode mapping vector corresponding to the target data segment; In the initial reaction pattern mapping sequence vector, the reaction pattern feature vector corresponding to the target data segment is replaced according to each of the single reaction pattern mapping vectors to obtain a refined reaction pattern mapping sequence vector; Matching the refined reaction pattern mapping sequence vector with a plurality of similar prototypes to obtain at least one target prototype, determining a training program corresponding to the user according to the target prototype, and completing personalized reaction training for the user; The acquiring of pattern feature information of each EEG data segment comprises: Performing multi-layer wavelet packet decomposition on each of the EEG data segments to obtain multiple wavelet packet decomposition coefficient matrices; Reconstructing each of the wavelet packet decomposition coefficient matrices to obtain a time series corresponding to each of the wavelet packet decomposition coefficient matrices; Acquire the scale energy corresponding to each of the time series, and acquire the time scale energy representation according to the multiple scale energies; In a preset reaction pattern template library, obtaining pattern feature information corresponding to the scale energy representation; The obtaining of pattern feature information corresponding to the scale energy representation includes: Calculating the correlation coefficient between the time scale energy representation and each pattern template information of the reaction pattern template library; Determining pattern feature information corresponding to the scale energy representation in the plurality of pattern template information according to the plurality of correlation coefficients; The step of determining the reaction pattern feature vector corresponding to each EEG data segment according to the pattern feature information includes: A reaction pattern feature vector corresponding to each EEG data segment is constructed according to the correlation coefficient corresponding to the pattern feature information.
2. The method according to claim 1, characterized in that The step of obtaining the original EEG data of the user to be trained includes: Collecting the raw EEG data when the user performs a specified reaction task; Performing a preset denoising operation on the raw EEG data to remove environmental noise and physiological artifacts of the raw EEG data; the preset denoising operation includes one or more of bandpass filtering, wavelet denoising and artifact correction; Perform impedance balance correction on the denoised raw EEG data; Performing a preset suppression operation on the raw EEG data to remove high-amplitude spikes and baseline drifts of the raw EEG data; the preset suppression operation includes one or more of weighted sliding average and notch filtering; The raw EEG data is spatially filtered to improve the quality of the raw EEG data.
3. The method according to claim 1, characterized in that: The step of segmenting the original EEG data to obtain a plurality of EEG data segments includes: Normalizing the EEG data matrix corresponding to the original EEG data to obtain a standardized matrix corresponding to the original EEG data to eliminate the amplitude scale difference of the original EEG data; Calculating the similarity weights of the preset time point in the original EEG data and each of the remaining time points in the original EEG data according to the standardized matrix, and forming a similarity matrix according to the multiple similarity weights; constructing an undirected weighted graph according to the similarity matrix, and dividing the undirected weighted graph based on a spectral clustering algorithm to obtain a plurality of subgraphs; A plurality of channel data at a time point corresponding to each of the sub-graphs is obtained, and one of the EEG data segments is formed according to the channel data corresponding to each of the sub-graphs.
4. The method according to claim 1, characterized in that: The obtaining of a single reaction mode mapping vector corresponding to the target data segment includes: Obtaining a reaction pattern feature vector corresponding to each pattern feature information corresponding to the target data segment; The single reaction pattern mapping vector is obtained by fusing the plurality of reaction pattern feature vectors.
5. The method according to claim 1, characterized in that The step of matching the refined reaction pattern mapping sequence vector with a plurality of similar prototypes to obtain at least one target prototype comprises: Calculating the association score between the refined reaction pattern mapping sequence vector and each of the similar prototypes; the association score includes time similarity and reaction pattern correlation; The target prototype is determined from among the multiple similar prototypes according to the multiple association scores.
6. The method according to claim 1, characterized in that Determining the training program corresponding to the user according to the target prototype includes: Acquire a set of associated stimuli with the target prototype from a preset reaction stimulus library; the set of associated stimuli includes at least one or more of visual stimulation, sensory stimulation, and auditory stimulation; Acquire the corresponding presentation mode and presentation order of each associated stimulus in the associated stimulus set; The training scheme is generated according to the associated stimulus set, the corresponding presentation method and presentation order of each associated stimulus.
7. A personalized reaction training device, used to implement the method according to any one of claims 1 to 6, characterized in that: include: A data segmentation module, used to obtain the original EEG data of the user to be trained, segment the original EEG data, and obtain multiple EEG data segments; A feature acquisition module, used to acquire pattern feature information of each EEG data segment, and determine a reaction pattern feature vector corresponding to each EEG data segment according to the pattern feature information; A prototype acquisition module, used to connect multiple reaction pattern feature vectors according to the time corresponding to each reaction pattern feature vector, obtain an initial reaction pattern mapping sequence vector, match multiple pattern prototypes in a preset reaction pattern knowledge base according to the initial reaction pattern mapping sequence vector, and obtain multiple similar prototypes; A data processing module, used for preprocessing the plurality of EEG data segments to obtain the number of reaction patterns corresponding to each EEG data segment; wherein the preprocessing includes multi-scale time window segmentation, feature extraction, reaction pattern combination and frequent pattern selection; A single acquisition module, used for determining the EEG data segment as a target data segment if the EEG data segment corresponds to multiple reaction modes, and acquiring a single reaction mode mapping vector corresponding to the target data segment; A fine acquisition module, used for replacing the reaction pattern feature vector corresponding to the target data segment in the initial reaction pattern mapping sequence vector according to each of the single reaction pattern mapping vectors, to obtain a fine reaction pattern mapping sequence vector; The training completion module is used to match the refined reaction pattern mapping sequence vector with multiple similar prototypes, obtain at least one target prototype, determine the training plan corresponding to the user according to the target prototype, and complete the personalized reaction training for the user.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to implement the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Device for regulating a depressed mood through musical feedback based on an electroencephalogram signal.
CH717003A2
Emotion recognition method based on electroencephalogram signals, computer equipment and storage medium
CN117562542A