Electrical brain stimulation method, apparatus, device and readable storage medium

By setting up multi-frame-rate video groups and neural network models, and collecting and analyzing EEG signals, the problems of visual fatigue and epileptic seizures caused by traditional EEG stimulation methods have been solved, achieving higher user comfort and recognition accuracy, and expanding the applicable population.

CN117653148BActive Publication Date: 2026-06-02SUZHOU NIANJI INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUZHOU NIANJI INTELLIGENT TECH CO LTD
Filing Date
2023-12-01
Publication Date
2026-06-02

Smart Images

  • Figure CN117653148B_ABST
    Figure CN117653148B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, and readable storage medium for brain stimulation. The brain stimulation method includes: setting up a video group containing multiple videos with different frame rates but the same duration; collecting brain signals generated when a user views the videos in the video group; and inputting the brain signals into a pre-trained brain-matching model to obtain the frame rate of the video viewed by the user. Based on the brain stimulation method provided by this invention, compared with traditional brain stimulation methods, the user experience is more comfortable and less prone to visual fatigue. It avoids the pitfalls of traditional stimulation methods, preventing changes in light or graphics in a short period that could cause brain nerve contraction and abnormal discharge, potentially inducing epileptic seizures. Correspondingly, it expands the applicable population of the brain stimulation device to a certain extent and improves the adaptability of brain stimulation. Based on a neural network model trained with a large amount of data, the analysis of brain signals is more accurate and the error is smaller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of biomedical engineering, and in particular to a method, apparatus, device, and readable storage medium for electroencephalography (EEG). Background Technology

[0002] Brain-computer interfaces (BCIs) establish a direct information channel between the brain and external devices. In recent years, with technological advancements and in-depth research, BCIs have been applied in fields such as medical rehabilitation and device control, enabling applications such as prosthetic limb control and keyboard input. In the medical field, for patients whose mobility is impaired or who have lost motor function due to certain diseases, BCIs can help enhance their ability to communicate with the outside world.

[0003] To achieve fast and accurate systems, many existing studies have chosen to use EEG-based brain-computer interface (BCI) solutions. SSVEP (Special Stimulus-Symptom Episode) is used as a stimulation paradigm to elicit EEG responses. SSVEP mainly has three frequency bands: low-frequency, mid-frequency, and high-frequency. Low-frequency stimulation elicits the best EEG response, but it is prone to causing visual fatigue and discomfort, which is detrimental to system application. Currently, there are two common LCD flickering stimulation methods used to induce SSVEP: one is the appearance and disappearance of a single graphic stimulus (such as a rectangle, square, or arrow) on the computer screen at a specified speed; the other is the pattern flipping of a black-and-white checkerboard or grid. These traditional SSVEP induction methods have good application value in BCI systems, but these stimulation methods are prone to causing visual fatigue and even have the risk of inducing seizures in users, ultimately affecting the performance of the BCI system.

[0004] Therefore, in view of the above-mentioned technical problems, it is necessary to provide a brain stimulation method, device, equipment and readable storage medium.

[0005] The information disclosed in this background section is intended only to enhance the understanding of the overall background of the invention and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention

[0006] The purpose of this invention is to provide a brain stimulation method, device, equipment, and readable storage medium that can encode video information at different frame rates to activate the brain's response while improving user comfort and ensuring recognition accuracy.

[0007] To achieve the above objectives, the technical solution provided by the present invention is as follows:

[0008] In a first aspect, the present invention provides a method for electroencephalography (EEG), comprising:

[0009] Set up a video group, which contains multiple videos with different frame rates but the same duration;

[0010] The brainwave signals generated when the user watches the videos in the video group are collected;

[0011] The EEG signal is input into a pre-trained EEG matching model to obtain the frame rate of the video being gazed at by the user. The EEG matching model is a neural network model used to obtain the mapping relationship between the frame rate of the video being gazed at by the user and the EEG signal.

[0012] In one or more embodiments, the training process of the EEG matching model includes:

[0013] Construct the EEG matching model and set the relevant parameters;

[0014] A training sample set is obtained, which includes a target frame rate and a sampling signal. The target frame rate is the frame rate of the video that the user is watching, and the sampling signal is the sampling data of the EEG signal of the user when watching the video at the target frame rate.

[0015] The EEG matching model is trained based on the training sample set, and relevant parameters are corrected to obtain the mapping relationship between video frame rate and EEG signal.

[0016] In one or more embodiments, obtaining the training sample set includes:

[0017] While the user is watching a video at a certain frame rate, the user's electroencephalogram (EEG) information is collected;

[0018] The EEG information and its corresponding frame rate are labeled to establish a mapping relationship between the EEG information and its corresponding frame rate;

[0019] Multiple sets of labeled EEG information and their corresponding frame rates are used as training sample sets.

[0020] In one or more embodiments, the setting of a video group, the video group containing multiple videos with different frame rates but the same duration, includes:

[0021] Set the first video and sampling time;

[0022] At each sampling time interval, the frame of the first video is upsampled;

[0023] Each extracted frame from the first video is repeatedly refreshed to form the second video.

[0024] In one or more embodiments, the step of repeatedly playing each extracted frame of the first video to form the second video includes:

[0025] If the product of the refresh count of each frame of the first video and the frame rate of the first video is divisible by the number of frames extracted from the first video, then the number of times each extracted frame of the first video is refreshed is:

[0026] N = F * T / n

[0027] Wherein, N is the number of times each extracted frame of the first video is repeated, F is the frame rate of the first video, T is the number of times each frame in the first video is refreshed, and n is the number of extracted frames of the first video.

[0028] In one or more embodiments, the step of repeatedly playing each extracted frame of the first video to form the second video includes:

[0029] Based on the stimulus signal formula of the frame rate of the second video, a sampling square wave is set, and the frame rate of the second video is the quotient of the number of extracted frames of the first video and the duration of the first video.

[0030] The duration of each cycle of the sampling square wave corresponds sequentially to the playback duration of each extracted frame of the first video. The quotient of the playback duration of each extracted frame of the first video and the refresh cycle of the first video frame is the number of times each extracted frame of the first video is refreshed.

[0031] In one or more embodiments, the stimulus signal formula for the frame rate is:

[0032]

[0033] Where i is the frame index, RefreshRate is the refresh rate, and f is the frequency of the sampling square wave, which is also the frame rate of the second video.

[0034] In a second aspect, the present invention provides a brain stimulation device, comprising:

[0035] The settings module is used to set a video group, which contains multiple videos with different frame rates but the same duration.

[0036] The sampling module is used to collect the electroencephalogram (EEG) signals generated when the user watches the videos in the video group;

[0037] The analysis module is used to input the EEG signal into a pre-trained EEG matching model to obtain the frame rate of the video being gazed at by the user. The EEG matching model is a neural network model used to obtain the mapping relationship between the frame rate of the video being gazed at by the user and the EEG signal.

[0038] Thirdly, the present invention provides a computer device comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the brain stimulation method by executing the computer instructions.

[0039] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the described electroencephalography (EEG) method.

[0040] Compared with existing technologies, the brain stimulation method provided by this invention involves setting up a video group containing multiple videos with different frame rates but the same duration; collecting brain signals generated when a user views the videos in the video group; and inputting the brain signals into a pre-trained brainwave matching model to obtain the frame rate of the video being viewed by the user. This brain stimulation method has the following advantages:

[0041] (1) Compared with traditional brain stimulation methods, it makes the user experience more comfortable and less likely to cause visual fatigue.

[0042] (2) It avoids traditional stimulation methods and prevents changes in light or graphics in a short period of time from causing brain nerve contraction and abnormal discharge, which could induce epileptic seizures. In contrast, it expands the applicable population of brain stimulation devices to a certain extent and improves the adaptability of brain stimulation.

[0043] (3) The neural network model trained on a large amount of data is more accurate in analyzing EEG signals and has smaller errors. Attached Figure Description

[0044] Figure 1 This is a schematic diagram illustrating an application scenario of the electroencephalography (EEG) method according to one embodiment of the present invention.

[0045] Figure 2 This is a schematic diagram of the brain stimulation process in one embodiment of the present invention;

[0046] Figure 3 This is a structural block diagram of a brain stimulation device according to one embodiment of the present invention;

[0047] Figure 4 This is a structural block diagram of an electronic device according to one embodiment of the present invention;

[0048] Figure 5 This is a square wave image generated by a stimulus signal formula in one embodiment of the present invention;

[0049] Figure 6 This is a schematic diagram of the interface of a 12-target spelling system based on video encoding in one embodiment of the present invention. Detailed Implementation

[0050] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings, but it should be understood that the scope of protection of the present invention is not limited to the specific embodiments.

[0051] Unless otherwise expressly stated, throughout the specification and claims, the term "comprising" or its variations such as "including" or "comprises" shall be understood to include the stated elements or components without excluding other elements or other components.

[0052] To facilitate understanding of the technical solutions of this application, the technical terms that may appear in this invention will be explained in detail below.

[0053] SSVEP (steady-state visual evoked potential): This refers to the continuous, frequency-dependent (at the fundamental or harmonic frequency of the stimulus) response produced by the visual cortex of the brain in response to a visual stimulus of a fixed frequency. It can be reliably applied to brain-computer interface (BCI) systems. Compared to BCIs that transmit other signals, SSVEP-BCIs typically have higher information transfer rates, simpler system and experimental designs, and require fewer training iterations.

[0054] TDCA (Task-Discriminant Component Analysis): Provides an integrated approach for multi-class spatial filters. TDCA significantly outperforms ensemble TRCA and other competing methods.

[0055] A neural network model is a complex network system formed by the extensive interconnection of a large number of simple processing units (called neurons). It reflects many fundamental characteristics of human brain function and is a highly complex nonlinear dynamic learning system. Neural networks possess massive parallelism, distributed storage and processing, self-organization, self-adaptation, and self-learning capabilities, making them particularly suitable for handling imprecise and fuzzy information processing problems that require simultaneous consideration of many factors and conditions. The foundation of neural networks lies in neurons. Neurons are biological models based on the nerve cells of the biological nervous system. When studying biological nervous systems to explore the mechanisms of artificial intelligence, neurons were mathematized, resulting in the mathematical model of neurons. A large number of neurons with the same form connected together constitute a neural network.

[0056] Existing EEG methods typically employ flickering stimulation, which, depending on the hardware, is further categorized into LED flickering stimulation and LCD flickering stimulation. Common flickering stimulation methods include: 1) a single graphic stimulus (such as a rectangle, square, or arrow) appearing and disappearing at a specified speed on a computer screen; and 2) a black-and-white checkerboard or grid pattern flipping. However, traditional EEG methods inevitably lead to visual fatigue in users. Since EEG is frequently used in clinical medicine to assist patients with disabilities (such as disability, paralysis, epilepsy, ALS, etc.) who have limited or lost motor abilities, and to enhance their communication skills, traditional EEG methods, in susceptible populations, can easily induce epilepsy, exacerbate visual impairment, and cause secondary harm.

[0057] The inventors of this invention have identified the main shortcomings of existing technologies and, based on these shortcomings, proposed a new technical approach: training a neural network model based on the changes in a person's electroencephalogram (EEG) response when viewing videos at different frame rates. In practical applications, only the user's EEG signal needs to be input; the neural network model can then determine the frame rate of the video the user is viewing, and further, pinpoint the region the user is looking at. Compared to traditional EEG stimulation methods, EEG stimulation with videos at different frame rates reduces user discomfort and lowers the probability of aggravating or causing other conditions, effectively improving user comfort while ensuring recognition accuracy.

[0058] Please refer to Figure 1 The diagram illustrates an application scenario of the brain stimulation method provided by this invention. Figure 1 The implementation scenario shown includes an EEG signal acquisition device 101, a server 102, and a user terminal 103 connected via communication.

[0059] It should be noted that the communication network may include various connection types, including but not limited to wired connections, wireless connections, or fiber optic cable connections. Furthermore, the communication network may be a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), or any combination of these. This embodiment of the invention does not limit the above-mentioned aspects.

[0060] The EEG signal acquisition device 101 directly connects the human brain to external devices by acquiring signals from the brain, enabling interaction between human thought and computers or other devices. The EEG signal acquisition device 101 includes, but is not limited to: an electroencephalogram (EEG) sensor for recording electrical activity of the cerebral cortex and capturing neuronal electrical signals; a functional magnetic resonance imaging (fMRI) device for locating and identifying specific brain regions; a skin conduction sensor for detecting human skin parameters and muscle electrical activity; and an electromyography (EMG) sensor. Furthermore, because bioelectrical signals are very weak, the EEG signal acquisition device is also equipped with modules for filtering, noise reduction, and amplification of the acquired EEG signals.

[0061] The server 102 establishes a communication connection with the EEG signal acquisition device 101, and can acquire the user's EEG signals collected by the EEG signal acquisition device 101. Furthermore, the server 102 is configured with a trained neural network model, which can analyze and identify the type of stimulus received by the user when the EEG signal was generated based on the information in the EEG signal. In embodiments of the present invention, the server 102 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. This embodiment of the present invention does not limit this specific type of service.

[0062] The user terminal 103 is used to configure the video group for inducing EEG stimulation, and also to display videos at a target frame rate when training the neural network model. The user terminal may include, but is not limited to, portable electronic devices or wearable electronic devices such as desktop computers (PCs), smartphones, handheld computers, tablets, and personal digital assistants (PDAs), wherein the user terminal is equipped with computer software programs compatible with the EEG stimulation device provided by this method; the user terminal can be connected to a communication network via wired or wireless means, wherein the communication network includes a combination of a local area network (LAN) or a wide area network (WAN) communicating with the Internet. This embodiment of the invention does not limit the above content.

[0063] It should be noted that the EEG method of this embodiment can be applied to the EEG stimulation device of this embodiment. This EEG stimulation device can be configured on a terminal. The terminal may include, but is not limited to, a PC (Personal Computer), a PDA (Tablet PC), a smartphone, a smart wearable device, etc.

[0064] Please refer to Figure 2The diagram shown is a flowchart of brain stimulation according to one embodiment of the present invention. The brain stimulation method specifically includes the following steps:

[0065] S201: Set up a video group, which contains multiple videos with different frame rates but the same duration;

[0066] It should be noted that excessively high video frame rates can, to some extent, weaken the EEG response when the user is watching the video. Therefore, the preferred frame rate of the videos in the video group is greater than or equal to 3Hz and less than or equal to 15Hz; the preferred frame rate interval between each video is greater than or equal to 0.2Hz and less than or equal to 1Hz. Based on the above preferred scheme, the collected EEG signals of the user watching the videos in the video group can be clearer, improving the accuracy of subsequent analysis and recognition operations. On the other hand, by adjusting the frame rate and frame rate interval of each video, the user experience can be further improved.

[0067] In an exemplary embodiment, setting a video group, which includes multiple videos with different frame rates but the same duration, includes: setting a first video and a sampling time; upsampling the frames of the first video at intervals of the sampling time; and repeatedly refreshing each extracted frame of the first video to form a second video.

[0068] It should be noted that frame rate is the frequency at which a bitmap image, measured in frames, appears continuously on a display. Relatedly, screen refresh rate refers to the number of times an electron beam scans the image on the screen. A higher refresh rate results in better image stability. In practical applications, the refresh rate of the screen displaying the videos in the video group is fixed. To encode the first video to obtain a second video with a lower frame rate, one implementation involves sampling the frames of the first video and repeatedly refreshing the sampled frames to form a second video with the same refresh rate but a lower frame rate. The number of refreshes for each frame of the first video should be stable.

[0069] Specifically, in one embodiment, if the product of the refresh count of each frame of the first video and the frame rate of the first video is divisible by the number of frames extracted from the first video, then the number of times each extracted frame of the first video is refreshed is:

[0070] N = F * T / n

[0071] Wherein, N is the number of times each extracted frame of the first video is repeated, F is the frame rate of the first video, T is the number of times each frame in the first video is refreshed, and n is the number of extracted frames of the first video.

[0072] For example, the user terminal uses a screen with a refresh rate of 60Hz to display the videos in the video group; the first video has a frame rate of 15Hz and a duration of 1s. Based on the definitions of refresh rate and video frame rate, the first video has 15 different frames within 1s, and the screen refreshes 60 times within 1s, meaning each frame of the first video refreshes 4 times within 1s. Now, the sampling time is set to 0.2s. Every 0.2s, the frames of the first video are upsampled, resulting in 5 different frames from the first video. The quotient of the product of the refresh count of each frame of the first video and the frame rate of the first video, plus the number of extracted frames of the first video, is 4*15 / 5 = 12. Since the quotient has no remainder, each extracted frame of the first video is refreshed 12 times to obtain the second video with a duration of 1s. The frame rate of the second video is 5Hz.

[0073] It should be noted that in the previous embodiment, this only applies when the user terminal screen refresh rate is divisible by the number of frames obtained by upsampling the first video. When it is not divisible, the formula itself means that each sampled frame needs to be refreshed a fraction of the time. This is meaningless. Therefore, this invention provides another embodiment for obtaining the refresh count of each frame obtained by upsampling the first video.

[0074] In another implementation, based on the stimulus signal formula for the frame rate of the second video, a sampling square wave is set, where the frame rate of the second video is the quotient of the number of extracted frames from the first video and the duration of the first video; the duration of each cycle of the sampling square wave corresponds sequentially to the playback duration of each extracted frame from the first video, and the quotient of the playback duration of each extracted frame from the first video and the refresh cycle of the first video frame is the number of times each extracted frame from the first video is refreshed. The stimulus signal formula for the frame rate is:

[0075]

[0076] Where i is the frame index, RefreshRate is the refresh rate, and f is the frequency of the sampling square wave, which is also the frame rate of the second video.

[0077] For example, if the first video has a frame rate of 60Hz and a duration of 1 second, corresponding to a screen refresh rate of 60Hz for the user terminal display, and the sampling time is set to 0.1 seconds, then 10 different frames can be sampled from the first video. Substituting these frames into the stimulus signal formula, a square wave pattern is obtained as follows: Figure 5As shown in the figure, the duration of each cycle of the square wave represents the refresh duration of that frame. As can be seen from the figure, each cycle is 0.1s. Therefore, in this embodiment, each extracted frame is refreshed 0.1 / 1 / 60 = 6 times to obtain the second video with a duration of 1s. At this time, the frame rate of the second video is 10Hz.

[0078] In another embodiment, using some conditions from the previous embodiment, the first video has a frame rate of 60Hz and a duration of 1s, corresponding to a screen refresh rate of 60Hz on the user terminal display. With a sampling time of 0.09s, 11 different frames can be sampled from the first video. In this case, the quotient of the user terminal screen refresh rate and the number of frames sampled from the first video is 60 / 11 = 5.4545, which is not divisible. Therefore, the stimulus signal formula can only be applied to obtain a square wave pattern as shown below. Figure 5 As shown in the figure, the square wave undergoes adaptive switching, with each "cycle" exhibiting a different duration. At this point, the quotient of the playback duration of each extracted frame of the first video and the refresh cycle of the first video frame represents the number of times each extracted frame of the first video is repeatedly refreshed.

[0079] S202: Collect the electroencephalogram (EEG) signals generated when the user watches the videos in the video group;

[0080] It should be noted that bioelectricity refers to the changes in electrical potential and polarity that occur in the organs, tissues, and cells of living organisms during their life activities. It is a fundamental characteristic of life activities; from whales to cells, all exhibit bioelectric phenomena of varying strengths. Electroencephalography (EEG) is essentially a type of bioelectricity, representing electrical signals (voltages) generated by brain activity recorded on the scalp. It is characterized by rapid changes (ms), small amplitude (μV), and susceptibility to interference. Therefore, corresponding EEG recording equipment should possess features such as high sampling rate, signal amplification, noise reduction, and digitization.

[0081] The process of collecting EEG signals generated by the user watching the videos in the video group specifically includes: having the user wear the EEG signal collection device, displaying a video group containing the first video and the second video on the user terminal, having the user watch any video in the video group, having the EEG signal collection device collect EEG signals for the corresponding time period, and further filtering, noise reduction, and amplification of the EEG signals based on the corresponding modules in the EEG collection device, and transmitting the processed EEG signals to the server.

[0082] S203: Input the EEG signal into a pre-trained EEG matching model to obtain the frame rate of the video being watched by the user.

[0083] It should be noted that the preferred EEG model algorithm is the TDCA algorithm. After collecting EEG data for a target each time, the target is identified using the previously generated EEG model, the correlation with each template is analyzed, and the classification result of the current EEG data is given.

[0084] In one exemplary embodiment, training the EEG matching model specifically includes: constructing the EEG matching model and setting relevant parameters; obtaining a training sample set, the training sample set including a target frame rate and sampling signals, wherein the target frame rate is the frame rate of the video being viewed by the user, and the sampling signals are sampling data of the EEG signals when the user is viewing the video at the target frame rate. The EEG matching model is trained based on the training sample set, and the relevant parameters are corrected to obtain the mapping relationship between the video frame rate and the EEG signals.

[0085] The acquisition of the training sample set includes: collecting the user's electroencephalogram (EEG) information while the user is watching a video at a certain frame rate; labeling the EEG information and its corresponding frame rate to establish a mapping relationship between the EEG information and its corresponding frame rate; and using multiple sets of labeled EEG information and their corresponding frame rates as a training sample set.

[0086] For example, such as Figure 6 The diagram shows a schematic of the interface of a 12-target spelling system based on video encoding according to an embodiment of the present invention. Twelve videos with different frame rates are arranged sequentially, ranging from 6.5Hz to 12Hz, with an interval of 0.5Hz. Each video is illuminated for 2 seconds. The user wears the EEG signal acquisition device and gazes at the video whose edges are illuminated. The EEG signal acquisition device collects the user's EEG signals in real time and marks the EEG signals based on time to obtain the mapping relationship between the EEG signals and the frame rate of the video the user is gazing at.

[0087] Please refer to Figure 3 As shown, based on the same inventive concept as the aforementioned brain stimulation method, one embodiment of the present invention provides a brain stimulation device 300, which includes a setting module 301, a sampling module 302, and an analysis module 303.

[0088] Specifically, the setting module 301 is used to set a video group, which contains multiple videos with different frame rates but the same duration; the sampling module 302 is used to collect the EEG signals generated when the user watches the videos in the video group; and the analysis module 303 is used to input the EEG signals into a pre-trained EEG matching model to obtain the frame rate of the video watched by the user.

[0089] It should be noted that the EEG stimulation device 300 further includes a training module, which is used to construct the EEG matching model and set relevant parameters; acquire a training sample set, which includes a target frame rate and sampled signals, wherein the target frame rate is the frame rate of the video viewed by the user, and the sampled signals are the sampled data of the EEG signals when the user views the video at the target frame rate. The EEG matching model is trained based on the training sample set, and the relevant parameters are corrected to obtain the mapping relationship between the video frame rate and the EEG signals.

[0090] The training module is also used to collect the user's EEG information when the user is watching a video at a certain frame rate; to label the EEG information and its corresponding frame rate to establish a mapping relationship between the EEG information and its corresponding frame rate; and to use multiple sets of labeled EEG information and their corresponding frame rates as a training sample set.

[0091] The setting module 301 is also used to set the first video and the sampling time; upsample the frame of the first video at intervals of the sampling time; and repeatedly refresh each extracted frame of the first video to form the second video.

[0092] Specifically, the setting module 301 is further configured to calculate the number of times each frame of the first video is refreshed when the product of the refresh count of each frame of the first video and the frame rate of the first video is divisible by the number of frames extracted from the first video, wherein the number of refreshes is:

[0093] N = F * T / n

[0094] Wherein, N is the number of times each extracted frame of the first video is repeated, F is the frame rate of the first video, T is the number of times each frame in the first video is refreshed, and n is the number of extracted frames of the first video.

[0095] In another embodiment, the setting module is further configured to set a sampling square wave based on the stimulus signal formula of the frame rate of the second video, wherein the frame rate of the second video is the quotient of the number of extracted frames of the first video and the duration of the first video; the duration of each period of the sampling square wave corresponds sequentially to the playback duration of each extracted frame of the first video, and the quotient of the playback duration of each extracted frame of the first video and the refresh period of the first video frame is the number of times each extracted frame of the first video is refreshed.

[0096] Please refer to Figure 4As shown, embodiments of the present invention also provide an electronic device 400, which includes at least one processor 401, a memory 402 (e.g., non-volatile memory), a main memory 403, and a communication interface 404, wherein the at least one processor 401, the memory 402, the main memory 403, and the communication interface 404 are connected together via a bus 405. The at least one processor 401 is configured to invoke at least one program instruction stored or encoded in the memory 402 to cause the at least one processor 401 to perform various operations and functions of the brain stimulation methods described in the various embodiments of this specification.

[0097] In the embodiments of this specification, electronic device 400 may include, but is not limited to: personal computer, server computer, workstation, desktop computer, laptop computer, notebook computer, mobile electronic device, smartphone, tablet computer, cellular phone, personal digital assistant (PDA), handheld device, messaging device, wearable electronic device, consumer electronic device, etc.

[0098] This invention also provides a computer-readable medium carrying computer-executable instructions, which, when executed by a processor, can be used to implement various operations and functions of the electroencephalography (EEG) methods described in the various embodiments of this specification.

[0099] The computer-readable medium in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0100] In this invention, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.

[0101] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0102] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus, systems, and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0103] The foregoing description of specific exemplary embodiments of the invention is for illustrative and explanatory purposes. These descriptions are not intended to limit the invention to the precise forms disclosed, and it will be apparent that many changes and variations can be made in accordance with the foregoing teachings. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application, thereby enabling those skilled in the art to implement and utilize various different exemplary embodiments of the invention, as well as various different choices and variations. The scope of the invention is intended to be defined by the claims and their equivalents.

Claims

1. A brain stimulation method, characterized in that, include: Set up a video group, which contains multiple videos with different frame rates but the same duration; The brainwave signals generated when the user watches the videos in the video group are collected; The EEG signal is input into a pre-trained EEG matching model to obtain the frame rate of the video being gazed at by the user. The EEG matching model is a neural network model used to obtain the mapping relationship between the frame rate of the video being gazed at by the user and the EEG signal. The step of setting a video group, which contains multiple videos with different frame rates but the same duration, includes: setting a first video and a sampling time; upsampling the frames of the first video at intervals of the sampling time; and repeatedly refreshing each extracted frame of the first video to form a second video. The step of repeatedly refreshing each extracted frame of the first video to form the second video includes: setting a sampling square wave based on the stimulus signal formula of the frame rate of the second video, wherein the frame rate of the second video is the quotient of the number of extracted frames of the first video and the duration of the first video; the duration of each period of the sampling square wave corresponds sequentially to the playback duration of each extracted frame of the first video, and the quotient of the playback duration of each extracted frame of the first video and the refresh period of the first video frame is the number of times each extracted frame of the first video is repeatedly refreshed; The formula for the stimulus signal at the frame rate is: ; Where i is the frame index. f is the refresh rate, and f is the frequency of the sampling square wave, which is also the frame rate of the second video.

2. The brain stimulation method as described in claim 1, characterized in that, The training process of the EEG matching model includes: Construct the EEG matching model and set the relevant parameters; A training sample set is obtained, which includes a target frame rate and a sampling signal. The target frame rate is the frame rate of the video that the user is watching, and the sampling signal is the sampling data of the EEG signal of the user when watching the video at the target frame rate. The EEG matching model is trained based on the training sample set, and the relevant parameters are corrected.

3. The brain stimulation method as described in claim 2, characterized in that, The acquisition of the training sample set includes: While the user is watching a video at a certain frame rate, the user's electroencephalogram (EEG) information is collected; The EEG information and its corresponding frame rate are labeled to establish a mapping relationship between the EEG information and its corresponding frame rate; Multiple sets of labeled EEG information and their corresponding frame rates are used as training sample sets.

4. The brain stimulation method as described in claim 1, characterized in that, The step of repeatedly refreshing each extracted frame of the first video to form the second video includes: If the product of the refresh count of each frame of the first video and the frame rate of the first video is divisible by the number of frames extracted from the first video, then the number of times each extracted frame of the first video is refreshed is: ; Where N is the number of times each extracted frame of the first video is refreshed, F is the frame rate of the first video, T is the number of times each frame in the first video is refreshed, and n is the number of extracted frames of the first video.

5. A brain stimulation device, employing the brain stimulation method as described in any one of claims 1-4, characterized in that, include: The settings module is used to set a video group, which contains multiple videos with different frame rates but the same duration. The sampling module is used to collect the electroencephalogram (EEG) signals generated when the user watches the videos in the video group; The analysis module is used to input the EEG signal into a pre-trained EEG matching model to obtain the frame rate of the video being gazed at by the user. The EEG matching model is a neural network model used to obtain the mapping relationship between the frame rate of the video being gazed at by the user and the EEG signal.

6. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the brain stimulation method of any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the brain stimulation method according to any one of claims 1-4.