Efficient focal epilepsy early warning method and device, electronic equipment and storage medium

By deploying electrodes in the brain to construct monitoring channels and building an adjacency matrix, and combining graph neural networks and visual Transformer modules for signal processing, the problem of low accuracy in epilepsy early warning in existing technologies has been solved, and efficient early warning for focal epilepsy has been achieved.

CN121606255APending Publication Date: 2026-03-06IPENGZHIYUAN BRAIN SCIENCE & TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511857977.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-10
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing technologies using graph neural network models cannot effectively capture potential brainwave fluctuations in epilepsy, resulting in low accuracy in epilepsy early warning.

Method used

By deploying reference electrodes and acupoint electrodes in the brain to construct monitoring channels, channel signals are acquired and an adjacency matrix is ​​constructed. Information is aggregated using a graph neural network module and classified for early warning using a visual Transformer module, including signal cropping, splicing, and temporal enhancement.

Benefits of technology

It improves the accuracy of focal epilepsy early warning, achieving expert-level early warning classification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121606255A_ABST
    Figure CN121606255A_ABST
Patent Text Reader

Abstract

The invention discloses an efficient focal epilepsy early warning method and system, electronic equipment and a storage medium, and the method comprises the steps: constructing a plurality of monitoring channels through employing an acupoint electrode and a reference electrode, and obtaining a channel signal of each monitoring channel; constructing an adjacency matrix according to the adjacency weight, performing preliminary information aggregation on channel signals of different monitoring channels by using the adjacency matrix, performing information aggregation by using a graph neural network module, and outputting a second feature matrix; cutting and splicing the plurality of signal samples to obtain a third feature matrix, and performing time sequence enhancement on the third feature matrix to obtain a fourth feature matrix; and inputting the fourth feature matrix into a visual Transform module to carry out early warning classification. By constructing the monitoring channel and the adjacent matrix and considering the brain region positions of different electroencephalogram channels and the exponential attenuation of the Euclidean distance, potential electroencephalogram motion of epilepsy can be more effectively captured, and by cutting and splicing a plurality of signal samples, the early warning accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of epilepsy early warning technology, and in particular to an efficient method, device, electronic device, and storage medium for early warning of focal epilepsy. Background Technology

[0002] Focal epilepsy refers to epilepsy that occurs and spreads only in one hemisphere of the brain. In one hemisphere, it spreads along the epileptogenic network and brain pathways, and may affect different brain regions, but it will not spread to the other hemisphere.

[0003] Currently, many algorithms are starting to use scalp EEG signals for early warning. Scalp EEG collects brain signals using electrodes placed in different brain regions on the scalp. Neuronal activity in the brain is accompanied by the movement of electrical charges between cell membranes; changes in these charge distributions affect the brain's electric field, thereby further altering the voltage at the electrode locations. These voltage changes are the EEG signals. Scalp EEG signals can reflect the strength of neuronal activity in the brain. Before an epileptic seizure, scalp EEG characteristics show changes in nonlinear dynamics, such as shifts in time-frequency complexity and L-power exponent characteristics. Algorithm models for predicting epilepsy using scalp EEG all follow the same process: first, feature extraction is performed on the EEG signals, and then the extracted features are input into the decision model.

[0004] Graph Neural Networks (GNNs) are a class of deep learning models specifically designed to process graph-structured data. Their core principle is to transform the node and edge information of a graph into learnable vector representations (embeddings) and capture the dependencies between nodes through a message passing mechanism.

[0005] However, current feature extraction algorithms using graph neural network models do not have an adaptive design for their adjacency matrices, thus failing to effectively capture potential brainwave fluctuations and resulting in low accuracy in epilepsy prediction. Summary of the Invention

[0006] This application proposes an efficient method, device, electronic device, and storage medium for early warning of focal epilepsy to solve the problems of the prior art's inability to effectively capture potential brain electrical fluctuations in epilepsy and the low accuracy of epilepsy early warning.

[0007] Firstly, to address the aforementioned issues, a highly efficient method for early warning of focal epilepsy is proposed, including:

[0008] Step 100: Obtain the reference electrode and acupoint electrode, deploy corresponding acupoint electrodes at multiple acupoints in the brain, connect the reference electrode to the user's earlobe, construct multiple monitoring channels using the acupoint electrode and the reference electrode, and obtain the channel signal of each monitoring channel.

[0009] Step 200: Obtain the adjacency weights between the graph neural network module and any two monitoring channels, construct an adjacency matrix based on the adjacency weights, use the adjacency matrix to perform preliminary information aggregation on the channel signals of different monitoring channels, generate a first feature matrix, use the first feature matrix as the input of the graph neural network module for information aggregation, and output a second feature matrix.

[0010] Step 300: Obtain multiple signal samples of the second feature matrix, crop and splice the multiple signal samples to obtain the third feature matrix, perform time-series enhancement on the third feature matrix, and perform one-dimensional convolution on the channel signal features of each monitoring channel according to the time dimension to obtain the fourth feature matrix.

[0011] Step 400: Obtain the visual Transformer module and input the fourth feature matrix into the visual Transformer module for early warning classification.

[0012] Furthermore, step 100 includes:

[0013] Step 110: Construct a monitoring channel using electrodes from adjacent acupoints;

[0014] Step 120: Obtain the first coordinate point and the second coordinate point of the adjacent acupoint electrodes, and obtain the channel coordinates of the monitoring channel based on the first coordinate point and the second coordinate point.

[0015] Furthermore, after step 120, step 100 also includes:

[0016] Step 130: Obtain earlobe signals using the reference electrode, and acquire signals from two adjacent acupoints using two adjacent acupoint electrodes;

[0017] Step 140: Obtain the channel signal of the monitoring channel based on the earlobe signal and the signals of the two adjacent acupoints.

[0018] Furthermore, step 200 includes:

[0019] Step 210: Obtain the coordinates of the first channel and the second channel of any two monitoring channels;

[0020] Step 220: Calculate and obtain the Euclidean distance between the coordinates of the first channel and the coordinates of the second channel;

[0021] Step 230: Obtain the hemispherical mask value and calculate the adjacency weight based on the hemispherical mask value and the Euclidean distance.

[0022] Furthermore, after step 230, step 200 also includes:

[0023] Step 240: Obtain the coordinates of the first channel and the second channel of any two monitoring channels;

[0024] Step 250: If the coordinates of the first channel and the coordinates of the second channel are located in different hemispherical regions, then set the hemispherical mask value to zero so that the adjacency weight is always zero.

[0025] Furthermore, after step 250, step 200 also includes:

[0026] Step 260: Obtain the adjacency matrix and activation function;

[0027] Step 270: Aggregate information from the first feature matrix based on the adjacency matrix and activation function, and output the second feature matrix.

[0028] Furthermore, step 300 includes:

[0029] Step 310: Trim the signal sample: Take the signal segment of the signal sample at a specified time to obtain the trimmed signal;

[0030] Step 320: Repeat the cropping operation on the signal sample a specified number of times to obtain multiple cropped signals;

[0031] Step 330: Concatenate the multiple cropping signals to obtain the third feature matrix.

[0032] To address the aforementioned problems, a highly efficient focal epilepsy early warning system is provided, employing the aforementioned highly efficient focal epilepsy early warning method, comprising:

[0033] The first feature extraction module is used to obtain the adjacency weight between any two monitoring channels by the graph neural network module, and according to the adjacency weight, perform preliminary information aggregation on the channel signals of different monitoring channels using the adjacency matrix to generate a first feature matrix. The first feature matrix is ​​used as the input layer of the graph neural network module for information aggregation and outputs a second feature matrix.

[0034] The second feature extraction module is used to obtain multiple signal samples of the second feature matrix, and to crop and splice the multiple signal samples to obtain the third feature matrix.

[0035] The early warning classification module is used to perform temporal enhancement on the third feature matrix, and to perform one-dimensional convolution on the channel signal features of each monitoring channel according to the time dimension to obtain the fourth feature matrix. The fourth feature matrix is ​​then input into the visual Transformer module for early warning classification.

[0036] To address the aforementioned technical problems, embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the efficient focal epilepsy early warning method as described in the first aspect.

[0037] To address the aforementioned technical problems, embodiments of this application also provide a computer-readable storage medium storing computer-readable instructions, which, when executed by a processor, implement the steps of the efficient focal epilepsy early warning method as described in the first aspect.

[0038] Compared with the prior art, the embodiments of this application have the following main technical effects: By constructing monitoring channels and adjacency matrices, EEG information from different brain regions is aggregated. The adjacency weights between channels are determined by considering the brain region location of different EEG channels and the exponential decay of Euclidean distance. This allows for more effective capture of potential EEG fluctuations in epilepsy. By cropping and splicing multiple signal samples, a third feature matrix is ​​obtained and time-series signal enhancement is performed, improving the accuracy of early warning. This enables the model's early warning classification accuracy to reach expert level. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 This is a schematic diagram of the acupoint electrode layout in this invention;

[0041] Figure 2 This is a schematic diagram of the Euclidean distance between the two monitoring channels in this invention;

[0042] Figure 3 This is a schematic diagram of the overall structure of the monitoring channel in this invention;

[0043] Figure 4 This is a schematic diagram of the adjacency matrix in this invention;

[0044] Figure 5 This is a schematic diagram of the structure of the first feature matrix in this invention;

[0045] Figure 6 This is a schematic diagram of the convolution process of the graph neural network module in this invention;

[0046] Figure 7 This is a schematic diagram of the clipping of signal samples for the second feature matrix in this invention;

[0047] Figure 8 This is a schematic diagram of the splicing of signal segments of the signal samples of the second feature matrix in this invention;

[0048] Figure 9 This is a schematic diagram of the process of generating a fourth feature matrix using a third feature matrix in this invention;

[0049] Figure 10 This is a schematic diagram of the federated learning algorithm in this invention;

[0050] Figure 11 This is a schematic diagram illustrating a specific embodiment of an efficient method for early warning of focal epilepsy according to the present invention;

[0051] Figure 12 for Figure 11 A schematic diagram of a specific implementation of step 100 in the diagram;

[0052] Figure 13 for Figure 12 A schematic diagram of a specific implementation method following step 120;

[0053] Figure 14 for Figure 11 A schematic diagram of a specific implementation of step 200 in the diagram;

[0054] Figure 15 for Figure 14 A schematic diagram of a specific implementation method following step 230;

[0055] Figure 16 for Figure 15 A schematic diagram of a specific implementation method following step 250;

[0056] Figure 17 for Figure 11 A schematic diagram of a specific implementation of step 300 in the process;

[0057] Figure 18 This is a schematic diagram of the structure of a highly efficient focal epilepsy early warning system according to the present invention;

[0058] Figure 19 This is a schematic diagram of the structure of an embodiment of an electronic device according to this application. Detailed Implementation

[0059] The technical solutions of this invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are all within the scope of protection of this invention.

[0060] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings of this application are intended to cover non-exclusive inclusion.

[0062] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0063] This application proposes an efficient method, device, equipment, and medium for early warning of focal epilepsy to solve the problems of the prior art being unable to effectively capture potential brain electrical fluctuations in epilepsy and having low accuracy in epilepsy early warning.

[0064] Firstly, to address the aforementioned problems, a highly efficient method for early warning of focal epilepsy is proposed, such as... Figure 11 , Figure 11 This is a schematic diagram illustrating a specific embodiment of a highly efficient focal epilepsy early warning method according to the present invention; including:

[0065] Step 100: Obtain the reference electrode and acupoint electrodes, and place corresponding acupoint electrodes at multiple acupoints in the brain, such as... Figure 1 , Figure 1 This is a schematic diagram of the acupoint electrode layout in this invention; a reference electrode is connected to the user's earlobe, and multiple monitoring channels are constructed using the acupoint electrodes and the reference electrode to obtain the channel signal of each monitoring channel.

[0066] In one possible implementation, such as Figure 12 , Figure 12 for Figure 11 A schematic diagram of a specific implementation of step 100; step 100 includes:

[0067] Step 110: Construct a monitoring channel using electrodes from adjacent acupoints, such as... Figure 3 , Figure 3 This is a schematic diagram of the overall structure of the monitoring channel in this invention; Step 120: Obtain the first coordinate point and the second coordinate point of the adjacent acupoint electrode, and obtain the channel coordinates of the monitoring channel based on the first coordinate point and the second coordinate point.

[0068] In this embodiment, as Figure 2 , Figure 2 This is a schematic diagram of the Euclidean distance between the two monitoring channels in this invention; the coordinates of the midpoint of the line connecting the two electrodes at the beginning and end of each channel are the coordinates of that channel. For example, the coordinates of channel 1 are the coordinates of the midpoint of the line connecting electrodes FP1 and F7. The distance between the two channels is defined as the Euclidean geometric distance between the coordinates of the two channels.

[0069] In one possible implementation, such as Figure 13 , Figure 13 for Figure 12 A schematic diagram of a specific implementation following step 120; after step 120, step 100 further includes:

[0070] Step 130: Obtain the earlobe signal using the reference electrode, and obtain the signals of two adjacent acupoints using the two adjacent acupoint electrodes; Step 140: Obtain the channel signal of the monitoring channel based on the earlobe signal and the signals of the two adjacent acupoints.

[0071] In this embodiment, the electrodes are placed on the patient's head in accordance with the international 10-20 standard lead configuration, and the earlobe (LE) is used as the reference electrode.

[0072] First, the voltage signal of each acupoint electrode relative to the reference electrode is calculated. Then, the voltage amplitudes of each pair of electrodes are subtracted sequentially to obtain 20 monitoring channels for the acquired signals. These 20 monitoring channels can fully monitor the electroencephalogram (EEG) signals of the frontal, temporal, occipital, and parietal lobes of the brain, thus enabling comprehensive monitoring of focal and generalized epilepsy. The formula for acquiring the channel signals of the 20 monitoring channels is as follows:

[0073] Channel 0, FP1-F7: EEGFP1-LE--EEGF7-LE,

[0074] Channel 1, F7-T3:EEGF7-LE--EEGT3-LE,

[0075] Channel 2, T3-T5:EEGT3-LE--EEGT5-LE,

[0076] Channel 3, T5-O1:EEGT5-LE--EEGO1-LE,

[0077] Channel 4, FP2-F8: EEGFP2-LE--EEGF8-LE,

[0078] Channel 5, F8-T4:EEGF8-LE--EEGT4-LE,

[0079] Channel 6, T4-T6: EEGT4-LE--EEGT6-LE,

[0080] Channel 7, T6-O2:EEGT6-LE--EEGO2-LE,

[0081] Channel 8, T3-C3:EEGT3-LE--EEGC3-LE,

[0082] Channel 9, C3-CZ:EEGC3-LE--EEGCZ-LE,

[0083] Channel 10, CZ-C4:EEGCZ-LE--EEGC4-LE,

[0084] Channel 11, C4-T4:EEGC4-LE--EEGT4-LE,

[0085] Channel 12, FP1-F3: EEGFP1-LE--EEGF3-LE,

[0086] Channel 13, F3-C3:EEGF3-LE--EEGC3-LE,

[0087] Channel 14, C3-P3:EEGC3-LE--EEGP3-LE,

[0088] Channel 15, P3-O1:EEGP3-LE--EEGO1-LE,

[0089] Channel 16, FP2-F4: EEGFP2-LE--EEGF4-LE,

[0090] Channel 17, F4-C4: EEGF4-LE--EEGC4-LE,

[0091] Channel 18, C4-P4:EEGC4-LE--EEGP4-LE,

[0092] Channel 19, P4-O2:EEGP4-LE--EEGO2-LE,

[0093] The received channel signal is filtered and denoised using a Butterworth bandpass filter to remove 60Hz power frequency noise. The channel signal is resampled / downsampled to 256Hz. The channel signal is sliced ​​into segments every 5 seconds, with no overlap between samples. The filter uses second-order section (SOS) coefficients to improve numerical stability and portability. In unidirectional mode (real-time), there is a frequency-dependent group delay, suitable for online / block processing. The Butterworth filter bandwidth is:

[0094]

[0095] Step 200: Obtain the adjacency weights between the graph neural network module and any two monitoring channels. Construct an adjacency matrix based on the adjacency weights. Use the adjacency matrix to perform preliminary information aggregation on the channel signals of different monitoring channels to generate a first feature matrix. Use the first feature matrix as the input of the graph neural network module to perform information aggregation and output a second feature matrix.

[0096] In one possible implementation, such as Figure 14 , Figure 14 for Figure 11 A schematic diagram of a specific implementation of step 200; step 200 includes:

[0097] Step 210: Obtain the coordinates of the first channel and the second channel of any two monitoring channels; Step 220: Calculate the Euclidean distance between the obtained first channel coordinates and the second channel coordinates; Step 230: Obtain the hemispherical mask value and calculate the adjacency weight based on the hemispherical mask value and the Euclidean distance.

[0098] In this embodiment, the elements in the adjacency matrix A have an adjacency weight A. ij for:

[0099] A ij =exp(-α·d(i,j))·M ij (2)

[0100] Where the exponential decay coefficient α>0, d(i,j) is the Euclidean distance between nodes, and M ij ∈{0,1} represents the hemispherical mask value. It represents the exponentially decaying Euclidean distance, obtained by normalizing the adjacency matrix A. The normalized adjacency matrix... for:

[0101]

[0102] Where D = diag((A+I)1), D represents the degree matrix, which is a diagonal matrix, and I represents the identity matrix, which has the same dimensions as the adjacency matrix (e.g., 20×20). Its function is to ensure that each channel retains its own information in the graph convolution.

[0103] In this embodiment, as Figure 4 , Figure 4 This is a schematic diagram of the adjacency matrix structure in this invention; the dimension of adjacency matrix A is (20, 20), and the adjacency weight Aij represents the correlation between the i-th monitoring channel and the j-th monitoring channel, measured by distance, calculated as shown in formula (2). The elements of the adjacency matrix of the monitoring channels between the left and right brain regions are 0. Adjacency matrix A only aggregates channel information within the same brain region. Because focal epilepsy only occurs in unilateral brain regions, the diagonal elements of adjacency matrix A are also 0. Then, adjacency matrix A is normalized to obtain the normalized adjacency matrix.

[0104] In this embodiment, as Figure 4 As shown, changes in color depth represent changes in numerical value; the darker the color, the smaller the numerical value.

[0105] In one possible implementation, such as Figure 15 , Figure 15 for Figure 14 A schematic diagram of a specific implementation following step 230; after step 230, step 200 further includes:

[0106] Step 240: Obtain the coordinates of the first channel and the second channel of any two monitoring channels; Step 250: If the coordinates of the first channel and the second channel are located in different hemispherical regions, set the hemispherical mask value to zero so that the adjacency weight is always zero.

[0107] In this embodiment, the coordinates are used to determine the left and right hemispheres; if the acupoint electrode nodes of the two monitoring channels belong to the left and right hemispheres respectively, the adjacency weight is always 0; and the element A on the diagonal of the adjacency matrix is ​​set to... ii =0.

[0108] like Figure 5 , Figure 5 This is a schematic diagram of the structure of the first feature matrix in this invention; the first feature matrix F1 is initially generated through adjacency matrix A, and the dimension of F1 is (20, 256*5), where 20 refers to the channel signals of 20 monitoring channels, and 256*5 refers to the length of each channel signal being a 256Hz sampling rate signal with a length of 5 seconds. Figure 4 As shown, changes in color depth represent changes in numerical value; the darker the color, the smaller the numerical value.

[0109] In one possible implementation, such as Figure 16 , Figure 16 for Figure 15 A schematic diagram of a specific implementation following step 250; after step 250, step 200 further includes:

[0110] Step 260: Obtain the adjacency matrix and activation function; Step 270: Aggregate information from the first feature matrix based on the adjacency matrix and activation function, and output the second feature matrix.

[0111] In this embodiment, a graph neural network module is used, employing the σ(x) activation function and a normalized adjacency matrix. Information aggregation is performed on the first feature matrix F1. The aggregation formula for each layer of the graph neural network is shown in formula (4). The graph neural network module consists of two convolutional layers. The first layer has an input dimension of (20, 1280) and an output dimension of (20, 640). The second layer has an input dimension of (20, 640) and an output second feature matrix F2 of (20, 1280), as shown in formula (4). Figure 6 , Figure 6 This is a schematic diagram of the convolution process of the graph neural network module in this invention.

[0112]

[0113] Here, parameters W and b are the learnable parameters of the graph neural network. W is the learnable weight matrix, which is responsible for mapping the features of each channel from the input dimension to the output dimension. b is the bias term, which is a scalar and is shared by each channel.

[0114] Step 300: Obtain multiple signal samples from the second feature matrix F2, crop and splice the multiple signal samples to obtain the third feature matrix F3, perform time-series enhancement on the third feature matrix F3, and perform one-dimensional convolution on the channel signal features of each monitoring channel according to the time dimension to obtain the fourth feature matrix F4.

[0115] In one possible implementation, such as Figure 17 , Figure 17 for Figure 11 A schematic diagram of a specific implementation of step 300; step 300 includes:

[0116] Step 310: Prune the signal sample: Take the signal segment at a specified time from the signal sample to obtain the pruned signal; Step 320: Repeat the pruning operation on the signal sample a specified number of times to obtain multiple pruned signals; Step 330: Concatenate the multiple pruned signals to obtain the third feature matrix.

[0117] In this embodiment, the second feature matrix F2 output by the graph neural network module is sliced ​​and concatenated, so that each signal sample becomes a third feature matrix F3 with dimensions of (512, 512). Figure 7 , Figure 7This is a schematic diagram of signal sample clipping for the second feature matrix in this invention; each signal sample is a 20-channel segment, 5 seconds long, with a sampling frequency of 256Hz, i.e., a signal sample dimension is (20, 1280). The 5th second signal in a signal sample is discarded, and the 3rd and 4th second signal segments are merged to obtain a signal block with a dimension of (20, 512). Figure 8 , Figure 8 This is a schematic diagram of the signal segment splicing of the signal sample of the second feature matrix in this invention. The signal block is repeated 25 times along the vertical direction to splice it into a signal matrix with dimensions of (500, 512). Then, the first 16 channels are spliced ​​along the vertical direction to form a third feature matrix F3 (input sample) of size (512, 512). In this embodiment, the third feature matrix F3 with dimensions of (512, 512) is subjected to one-dimensional convolution along the time dimension on the signal of each monitoring channel to extract multi-scale features of different frequency components, resulting in a fourth feature matrix F4.

[0118] Step 400: Obtain the visual Transformer module and input the fourth feature matrix F4 into the visual Transformer module for early warning classification.

[0119] In one implementation, such as Figure 10 , Figure 10 This is a schematic diagram of the federated learning algorithm in this invention; the federated learning algorithm is applied to the model to achieve a personalized early warning model for each patient. The specific steps are as follows:

[0120] a: Each patient device downloads the latest model from the server; b: Each patient device trains its model using local data, encrypts the gradients, and uploads them to the server. The server aggregates the gradients from all patients to update the model parameters; c: The server returns the updated model to each patient device; d: Each patient device updates its own model. By introducing federated learning, cross-patient collaboration and individualized adaptation are achieved while protecting privacy.

[0121] In this embodiment, by constructing monitoring channels and adjacency matrices, EEG information from different brain regions is aggregated. The adjacency weights between channels are determined by considering the brain region locations of different EEG channels and the exponential decay of Euclidean distance. This allows for more effective capture of potential EEG fluctuations in epilepsy. By cropping and splicing multiple signal samples, a third feature matrix is ​​obtained and time-series signal enhancement is performed, improving the accuracy of early warning. This enables the model to achieve expert-level accuracy in early warning classification.

[0122] To address the aforementioned issues, a highly efficient early warning system for focal epilepsy is provided, such as... Figure 18 , Figure 18This is a schematic diagram of the structure of a highly efficient focal epilepsy early warning system according to the present invention; the method for highly efficient focal epilepsy early warning includes:

[0123] The first feature extraction module 501 is used to obtain the adjacency weights between the graph neural network module and any two monitoring channels. Based on the adjacency weights and the adjacency matrix, the module performs preliminary information aggregation on the channel signals of different monitoring channels using the adjacency matrix to generate a first feature matrix. The first feature matrix is ​​used as the input of the graph neural network module for information aggregation, and a second feature matrix is ​​output.

[0124] The second feature extraction module 502 is used to obtain multiple signal samples of the second feature matrix, crop and splice the multiple signal samples to obtain the third feature matrix, perform time-series enhancement on the third feature matrix, and perform one-dimensional convolution on the channel signal features of each monitoring channel according to the time dimension to obtain the fourth feature matrix.

[0125] The early warning classification module 503 is used to obtain the visual Transformer module and input the fourth feature matrix into the visual Transformer module for early warning classification.

[0126] To address the aforementioned technical problems, this application also provides an electronic device, including a memory and a processor. The memory stores computer-readable instructions, and the processor, when executing the computer-readable instructions, implements the steps of the efficient focal epilepsy early warning method as described in the first aspect. The technical solution adopted includes a processor, a network module, and a memory, with the processor and memory interconnected via the network module.

[0127] This electronic device can be a computer, server, workstation, or other similar device; it can also be a mobile device such as a mobile phone, tablet, or in-vehicle mobile terminal; or other devices with program execution capabilities. Its internal structure diagram can be as follows: Figure 19 As shown, Figure 19 This is a schematic diagram of an embodiment of an electronic device according to this application. The electronic device includes a processor, a memory, and a network module. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores an operating system, instructions, or code. The internal memory provides an environment for the operation of the operating system and instructions or code in the non-volatile storage media. When the instructions or code are executed by the processor, they implement the functions or steps of the aforementioned efficient focal epilepsy early warning method. The network module of the electronic device may include a network interface and / or a wireless network module, allowing the electronic device to communicate with other devices or service platforms. Furthermore, the electronic device may also include a display screen and an input system, etc.

[0128] The memory is used to store computer programs, which include program instructions. The processor is configured to call the program instructions, and the processor executes the instructions or code to implement the steps of the above-mentioned efficient focal epilepsy early warning method.

[0129] To address the aforementioned technical problems, embodiments of this application also provide a computer-readable storage medium storing computer-readable instructions, which, when executed by a processor, implement the steps of the efficient focal epilepsy early warning method as described in the first aspect.

[0130] The aforementioned computer-readable storage medium can be an internal storage unit of the system of the efficient focal epilepsy early warning method provided in any of the foregoing embodiments, or the terminal device described above, such as a hard disk or memory of an electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device.

[0131] Furthermore, the computer-readable storage medium may include both internal storage units and external storage devices of the electronic device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

[0132] However, it should be understood that it is not required to implement all the components shown; more or fewer components may be implemented instead. Those skilled in the art will understand that the electronic device described herein is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0133] Electronic devices can be computing devices such as desktop computers, laptops, PDAs, and cloud servers. Electronic devices can interact with users through methods such as keyboards, mice, remote controls, touchpads, or voice-activated devices.

[0134] Compared with the prior art, the embodiments of this application have the following main technical effects: By constructing monitoring channels and adjacency matrices, EEG information from different brain regions is aggregated. The adjacency weights between channels are determined by considering the brain region location of different EEG channels and the exponential decay of Euclidean distance. This allows for more effective capture of potential EEG fluctuations in epilepsy. By cropping and splicing multiple signal samples, a third feature matrix is ​​obtained and time-series signal enhancement is performed, improving the accuracy of early warning. This enables the model's early warning classification accuracy to reach expert level.

[0135] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An efficient focal epilepsy early warning method, characterized in that, comprising: Step 100, obtaining a reference electrode and an acupoint electrode, arranging corresponding acupoint electrodes at multiple acupoints of the brain, connecting the reference electrode on the user's earlobe, using the acupoint electrode and the reference electrode to construct multiple monitoring channels, and obtaining the channel signal of each monitoring channel; Step 200, obtaining a graph neural network module and an adjacency weight between any two monitoring channels, constructing an adjacency matrix according to the adjacency weight, using the adjacency matrix to preliminarily aggregate information of the channel signals of different monitoring channels, generating a first feature matrix, using the first feature matrix as the input of the graph neural network module to aggregate information, and outputting a second feature matrix; Step 300, obtaining multiple signal samples of the second feature matrix, cropping and splicing the multiple signal samples to obtain a third feature matrix, performing time series enhancement on the third feature matrix, and performing one-dimensional convolution on the channel signal features of each monitoring channel according to the time dimension to obtain a fourth feature matrix; Step 400, obtaining a visual Transformer module, inputting the fourth feature matrix into the visual Transformer module for early warning classification.

2. The efficient focal epilepsy warning method according to claim 1, characterized in that, The step 100 comprises: Step 110, constructing a monitoring channel using adjacent acupoint electrodes; Step 120, obtaining a first coordinate point and a second coordinate point of the adjacent acupoint electrodes, and obtaining a channel coordinate of the monitoring channel according to the first coordinate point and the second coordinate point.

3. The efficient focal epilepsy warning method according to claim 2, characterized in that, After the step 120, the step 100 further comprises: Step 130, obtaining an earlobe signal using the reference electrode, and obtaining two adjacent acupoint signals using two adjacent acupoint electrodes; Step 140, obtaining a channel signal of a monitoring channel according to the earlobe signal and the two adjacent acupoint signals.

4. The efficient focal epilepsy warning method of claim 1, wherein, The step 200 comprises: Step 210, obtaining a first channel coordinate and a second channel coordinate of any two monitoring channels; Step 220, calculating the Euclidean distance of the first channel coordinate and the second channel coordinate; Step 230, obtaining a hemispherical mask value, and calculating the adjacency weight according to the hemispherical mask value and the Euclidean distance.

5. The efficient focal epilepsy warning method according to claim 4, characterized in that, After the step 230, the step 200 further comprises: Step 240, obtaining a first channel coordinate and a second channel coordinate of any two monitoring channels; Step 250, if the first channel coordinate and the second channel coordinate are located in different hemispherical regions respectively, setting the hemispherical mask value to zero, so that the adjacency weight is always zero.

6. The efficient focal epilepsy warning method of claim 5, wherein, After the step 250, the step 200 further comprises: Step 260, obtaining the adjacency matrix and an activation function; Step 270, aggregating information of the first feature matrix according to the adjacency matrix and the activation function, and outputting a second feature matrix.

7. The efficient focal epilepsy warning method of claim 1, wherein, The step 300 comprises: Step 310, cropping the signal sample: taking a signal segment at a specified time of the signal sample to obtain a cropped signal; Step 320, repeating the cropping operation a specified number of times to obtain multiple cropped signals; Step 330, splicing the plurality of clipping signals to obtain the third feature matrix.

8. A high-efficient focal epilepsy warning system, using the high-efficient focal epilepsy warning method of any one of claims 1-7, characterized in that, Comprise: The first feature extraction module is used for acquiring a graph neural network module, acquiring the adjacency weight between any two monitoring channels, and generating a first feature matrix by using the adjacency matrix to preliminarily aggregate the channel signals of different monitoring channels according to the adjacency matrix according to the adjacency matrix according to the adjacency weight; the first feature matrix is used as the input layer of the graph neural network module for information aggregation, and a second feature matrix is output; The second feature extraction module is used for acquiring a plurality of signal samples of the second feature matrix, and obtaining a third feature matrix by clipping and splicing the plurality of signal samples; The early warning classification module is used for time sequence enhancement of the third feature matrix, one-dimensional convolution of the channel signal features of each monitoring channel according to the time dimension, obtaining of a fourth feature matrix, input of the fourth feature matrix into a visual Transformer module for early warning classification.

9. An electronic device, comprising: The computer readable storage medium stores computer readable instructions, and the processor executes the computer readable instructions to realize the steps of the efficient focal epilepsy early warning method in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer readable instructions, and the processor executes the computer readable instructions to realize the steps of the efficient focal epilepsy early warning method in any one of claims 1 to 7.