Brain-computer interface-based command output method, device, medium and electronic device
By encoding and decoding the probability vector of EEG signals in the brain-computer interface system, the problem that existing systems can only output a single instruction is solved, effective response to complex user intentions and multiple instruction output are achieved, and the application potential of the system is broadened.
Patent Information
- Application Number
- CN202411866587.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-12-18
AI Technical Summary
The existing brain-computer interface control system can only process and output a single instruction at each refresh point, which limits the system's ability to handle complex user intentions, especially in application scenarios that require complex operations.
By encoding the EEG signals over a fixed time length at each refresh point, an encoded probability vector is generated, and an instruction output probability vector is generated based on the vector decoding. This method allows the system to determine the output of multiple instructions based on the execution probability, and realize real-time control of external devices.
It realizes effective response to complex user intentions, broadens the practicality and effectiveness of the EEG control system in various application scenarios, and improves the flexibility and response speed of the system.
Smart Images

Figure CN119336174B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of brain-computer interface, and relates to a method, device, medium and electronic device for outputting instructions based on brain-computer interface. Background Art
[0002] Brain-Computer Interface (BCI) is a technology that establishes direct communication between the human brain and external devices. It achieves communication between the human brain and external devices by directly monitoring and analyzing the signals generated by brain activity. This technology allows individuals to bypass the traditional neuromuscular conduction pathway and directly use brain signals to control devices such as computers, prostheses, wheelchairs, or interact with virtual environments. The application range of brain-computer interfaces is wide, from helping people with disabilities restore their communication and motor skills to providing healthy people with new ways of interaction, such as controlling game characters or operating smart home systems.
[0003] Current brain-computer interface control systems face a technical challenge: these systems can only process and output a single instruction at each refresh point, which creates obvious limitations in scenarios where multiple instructions are executed simultaneously. Especially in applications that require complex operations, such as game control, this single output limits the system's ability to handle complex user intentions, resulting in relatively limited application scenarios. This not only affects the user experience, but also limits the application potential of brain-computer interface technology in a wider range of fields. Summary of the invention
[0004] The present application provides a command output method, device, medium and electronic device based on a brain-computer interface, which are used to solve the technical problem that existing brain-computer interface devices cannot respond to complex user intentions and output multiple commands at the same time.
[0005] In the first aspect, the present application provides a command output method based on a brain-computer interface, comprising: obtaining the EEG signal of the subject based on the brain-computer interface; at each refresh point, encoding the EEG signal within a fixed time length to generate a coding probability vector of the EEG signal at the refresh point; based on the coding probability vector, decoding and generating an instruction output probability vector; wherein each element of the instruction output probability vector represents the execution probability of a preset instruction; the instruction output probability vector is a set of execution probabilities of each preset instruction corresponding to the EEG signal at the refresh point; based on the execution probability of each preset instruction in the instruction output probability vector, determining the preset instructions and the number of instructions for discrete output.
[0006] In this implementation, by real-time analysis of the continuously input coding probability vector, it is possible to quickly respond to changes in EEG signals and timely update the execution probability of instructions, thereby achieving real-time control of external devices. Not only can a single instruction be output, but the output of multiple instructions can also be determined based on the execution probability, which can more effectively respond to complex user intentions and broaden the practicality and effectiveness of EEG control systems in various application scenarios.
[0007] In an implementation of the first aspect, it also includes: setting an output threshold of the preset instruction; determining the output preset instructions and the number of instructions based on the output threshold of the preset instruction and the execution probability of each preset instruction in the instruction output probability vector.
[0008] In this implementation, by setting the output threshold of the preset instructions and combining the execution probability of each preset instruction in the encoding probability vector, the preset instructions to be output and their quantity are accurately determined. The accuracy of instruction recognition and the response speed of the system are improved, ensuring that instructions are executed only when the user's intention is clear enough, thereby enhancing the reliability of the system and the user's control experience.
[0009] In an implementation method of the first aspect, a slope control parameter of each of the preset instructions is set; based on the slope control parameter of each of the preset instructions, the coding probability vector generated at the current generation refresh point and the instruction output probability vector generated at the previous generation refresh point are iteratively calculated to obtain the instruction output probability vector at the current generation refresh point; wherein each element in the instruction output probability vector represents the output probability of a preset instruction; the instruction output probability vector at the first generation refresh point is a preset value; based on the instruction output probability vector at the current generation refresh point, the preset instructions and the number of instructions output at the current generation refresh point are determined.
[0010] In this implementation, by setting the slope control parameters, dynamic iterative update of the EEG signal encoding probability vector is achieved, so that the command output probability vector can accurately reflect the user's immediate intention, improve the accuracy of command recognition and the response speed of the system, thereby optimizing the interaction efficiency and user experience of the brain-computer interface.
[0011] In an implementation method of the first aspect, a slope control parameter is set for each of the preset instructions, including: the slope control parameter includes an ascending control parameter and a descending control parameter; the ascending control parameter and the descending control parameter are set for each of the preset instructions, wherein the ascending control parameter is used to control the delay duration of the execution of the corresponding preset instruction, and the descending control parameter is used to control the exit duration of the execution of the corresponding preset instruction; during the iterative calculation process, the increase in the execution probability of the corresponding preset instruction is adjusted based on the ascending control parameter; and the decrease in the execution probability of the corresponding preset instruction is adjusted based on the descending control parameter.
[0012] In this implementation, by accurately setting the ascending and descending control parameters, sensitive adjustment of the probability of executing the preset instructions is achieved, effectively shortening the delay of instruction execution and speeding up the exit process. This dynamic adjustment mechanism improves the response speed of the brain-computer interface system and the accuracy of instruction recognition, and can further match the actual control scenario of the external controlled device. It can be flexibly configured according to the actual situation of the external controlled device, and has stronger versatility.
[0013] In an implementation method of the first aspect, it also includes: setting an output threshold of the preset instruction; determining the preset instruction and the number of instructions output at the current generation refresh point based on the output threshold of the preset instruction and the instruction output probability vector at the current generation refresh point.
[0014] In this implementation, the output command is evaluated and determined during each iteration. Compared with the traditional fixed step size setting, this dynamic determination mechanism significantly improves the sensitivity and accuracy of the system. By analyzing the command output probability vector of the current refresh point in real time and comparing it with the preset output threshold, it can accurately identify the user's clear intention and respond to the command output in a timely manner.
[0015] In an implementation of the first aspect, the iterative calculation process includes: constructing a pseudo output vector based on the encoding probability vector at the current generation refresh point to obtain the pseudo output vector at the current generation refresh point; wherein each element of the pseudo output vector corresponds to each element in the encoding probability vector one by one; the pseudo output vector element corresponding to the element with the highest probability in the encoding probability vector is set to 1, and the pseudo output vector elements corresponding to other elements with not the highest probability in the encoding probability vector are set to 0; adjusting the values of each element in the instruction output probability vector generated at the previous generation refresh point based on the pseudo output vector at the current generation refresh point to obtain the instruction output probability vector at the current generation refresh point; wherein the execution probability of the preset instruction corresponding to the pseudo output vector element with a value of 1 in the pseudo output vector at the current generation refresh point in the instruction output probability vector generated at the previous generation refresh point is increased, and the execution probability of the corresponding preset instruction in the instruction output probability vector at the current generation refresh point is obtained; the execution probability of the preset instruction corresponding to the pseudo output vector element with a value of 0 in the pseudo output vector at the current generation refresh point in the instruction output probability vector generated at the previous generation refresh point is reduced, and the execution probability of the corresponding preset instruction in the instruction output probability vector at the current generation refresh point is obtained.
[0016] In this implementation, by marking the instruction with the highest probability at the current refresh point as 1 in the pseudo output vector and the rest as 0, and adjusting the output probability of the previous generation of instructions accordingly, the system can quickly focus on the instructions that the user is most likely to execute, while reducing the interference of non-priority instructions, thereby optimizing the output efficiency and response speed of the instructions.
[0017] In an implementation manner of the first aspect, it further includes: when there are multiple preset instructions output at one refresh point, the multiple preset instructions are combined and output simultaneously.
[0018] In this implementation, multiple preset instructions are allowed to be output simultaneously at a single refresh point, achieving efficient execution of complex tasks. This ability to output multiple instructions in combination significantly improves the flexibility and response speed of the system, especially in scenarios that require rapid and continuous actions, such as game control or emergency operations, providing users with a smoother and more intuitive interactive experience.
[0019] In the second aspect, the present application provides an instruction output device based on a brain-computer interface, including: an input interface module, used to obtain the EEG signal of the subject based on the brain-computer interface; an encoding module, used to encode the EEG signal within a fixed time length at each refresh point, and generate an encoding probability vector of the EEG signal at the refresh point; a decoding module, used to decode and generate an instruction output probability vector based on the encoding probability vector; wherein each element of the instruction output probability vector represents the execution probability of a preset instruction; the instruction output probability vector is a set of execution probabilities of each preset instruction corresponding to the EEG signal at the refresh point; an output interface module, used to determine the preset instructions and the number of instructions for discrete output based on the execution probability of each preset instruction in the instruction output probability vector.
[0020] In a third aspect, the present application provides an electronic device comprising: one or more processors; and one or more memories, wherein the memories store computer-readable codes, and when the computer-readable codes are executed by the one or more processors, the brain-computer interface-based instruction output method as described above is implemented.
[0021] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements the brain-computer interface-based instruction output method as described above. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 Shown is a schematic diagram of an exemplary application scenario of the brain-computer interface-based command output method described in an embodiment of the present application.
[0023] Figure 2Shown is an exemplary flow chart of the command output method based on brain-computer interface described in an embodiment of the present application.
[0024] Figure 3 Shown is a schematic diagram of the encoded EEG signal described in the embodiment of the present application.
[0025] Figure 4 Shown is a schematic diagram of the instruction output described in an embodiment of the present application.
[0026] Figure 5 Shown is a schematic diagram of the iterative calculation process of the instruction output method described in an embodiment of the present application.
[0027] Figure 6 Shown is a schematic diagram of constructing a pseudo output vector according to an embodiment of the present application.
[0028] Figure 7 Shown is a schematic diagram of instruction output probability after iterative calculation as described in an embodiment of the present application.
[0029] Figure 8 Shown is a flowchart of the game control embodiment of the present application.
[0030] Fig. 9 Shown is an exemplary structural diagram of a command output device based on a brain-computer interface as described in an embodiment of the present application.
[0031] Fig.10 Shown is an exemplary structural diagram of an electronic device described in an embodiment of the present application.
[0032] Component number description
[0033] 110 external stimulation module; 120 brain signal acquisition module; 130 brain signal processing module; 140 command output module; 150 external controlled device; 900 command output device; 901 input interface module; 902 encoding module; 903 decoding module; 904 output interface module; 100 electronic device; steps S210 to S240; steps S310 to S330. DETAILED DESCRIPTION
[0034] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0035] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0036] Brain-Computer Interface (BCI) technology is a technology that establishes communication directly between the human brain and external devices. It achieves control of devices by capturing and decoding neural signals generated by the brain without going through the conventional output path of muscles or nerves. The core of this technology lies in the real-time monitoring and analysis of EEG activity, which is an electrical signal generated by the activity of brain neurons and can reflect an individual's thoughts, emotions, and intentions. The principle of brain-computer interface technology is mainly based on the acquisition, processing, and decoding of EEG signals. First, through a non-invasive electrode array placed on the scalp, the system is able to capture the electrical activity of the cerebral cortex. These signals are then amplified, filtered, and digitized for further analysis. Using signal processing techniques such as Fourier transform and machine learning algorithms, the system is able to extract useful information from the complex EEG background noise and identify signal features associated with specific thinking patterns. Once these features are identified, the system can convert them into control commands to operate external devices.
[0037] In the current brain-computer interface control system, only a single instruction can be output at each refresh point. This results in that in actual operation, especially in scenarios where multiple instructions need to be executed simultaneously, such as when executing complex combos in electronic games, this single output limits the system's ability to handle complex user intentions. Therefore, the present disclosure provides a technical solution to overcome the single output problem and achieve the simultaneous output of multiple instructions at the same refresh point, namely "combined instructions", broadening the practicality and effectiveness of the system in various application scenarios.
[0038] The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the embodiments of the present application.
[0039] like Figure 1 As shown, it shows a schematic diagram of an application scenario of the present application. The command output scenario based on the brain-computer interface includes: an external stimulation module 110, a brain signal acquisition module 120, a brain signal processing module 130, a command output module 140 and an external controlled device 150.
[0040] The external stimulation module 110 is the primary link for the entire brain-computer interface system to interact with the user, and is responsible for providing specific external stimulation to the subject. The external stimulation module 110 is intended to induce the subject to produce recognizable EEG signal responses, which will be used by subsequent modules for instruction decoding and output. The external stimulation module 110 may include but is not limited to a visual stimulation device, an auditory stimulation device, or a tactile stimulation device, and can accurately control the type, intensity, frequency, and duration of stimulation according to the experimental design or application requirements.
[0041] In the case of visual stimulation, module 110 may include LED lights, screen displays or projection systems for displaying specific images, patterns or video sequences to induce steady-state visual evoked potentials (SSVEPs) or other vision-related EEG activities. In the case of auditory stimulation, the module may integrate speakers or headphones to play sounds of specific frequencies to stimulate auditory-related EEG responses. Tactile stimulation may be achieved through a vibration device or other tactile feedback device to generate corresponding EEG signals.
[0042] The brain signal acquisition module 120 is responsible for capturing EEG signals from the subject's brain. The EEG signal acquisition module 120 is usually composed of a plurality of non-invasive electrodes, which are arranged according to the International EEG Standards. Figure 10-2 0 system or other standard arrangement to ensure comprehensive coverage of different areas of the brain. The module is equipped with high-performance amplifiers and filters to improve the signal-to-noise ratio and filter out interference from non-EEG signals such as myoelectric interference, electrooculographic interference and power supply noise.
[0043] The EEG signal acquisition module 120 also includes an analog-to-digital converter (ADC) for converting analog EEG signals into digital signals for subsequent digital signal processing. The module is designed with a high sampling rate and high resolution to ensure that rapidly changing EEG waveforms can be captured, thereby providing accurate EEG activity data. In addition, the module may also be integrated with real-time monitoring software to monitor signal quality and provide feedback when the signal is interfered with, so as to facilitate timely adjustment of electrode positions or environmental conditions. In order to improve the usability and comfort of the system, the EEG signal acquisition module 120 is designed to be lightweight, easy to wear, and can be adjusted according to the head shape of different users.
[0044] The brain signal processing module 130 is responsible for further processing and analyzing the EEG signals acquired by the EEG signal acquisition module 120. The main functions of the EEG signal processing module 130 include signal amplification, filtering, feature extraction and classification. First, the module enhances the amplitude of the EEG signal through a high-sensitivity amplifier for subsequent processing. Then, a bandpass filter is used to remove irrelevant low-frequency and high-frequency noise, retaining specific frequency band signals related to EEG activity. In addition, advanced algorithms are used to extract features from the filtered signal to identify key EEG features that reflect the user's intentions, such as event-related potentials (ERPs), power spectral density changes, etc.
[0045] The instruction output module 140 is responsible for converting the processed EEG signals into specific control instructions and outputting them to the external controlled device. The instruction output module 140 receives the output from the EEG signal processing module 130, i.e., a series of execution probabilities associated with preset instructions. The instruction output module 140 can choose to output a single instruction or a combination of instructions according to the system configuration and user needs to achieve complex control tasks.
[0046] The external controlled device 150 is an execution unit in the brain-computer interface system, which receives control signals from the instruction output module 140 and performs corresponding operations according to these signals. The device can be various types of devices, including but not limited to medical rehabilitation equipment, smart home systems, computer input devices, game controllers, industrial robots or any other mechanical or electronic systems that can be controlled by electronic signals. The external controlled device 150 has an interface for communicating with the brain-computer interface system, and can parse and respond to control instructions issued by the instruction output module 140. These instructions may be simple on / off signals, continuous control signals, or complex command sequences for performing specific tasks or operations. The design of the device takes into account compatibility with the brain-computer interface system to ensure the accuracy and real-time performance of signal transmission to meet the needs of different application scenarios.
[0047] like Figure 2 As shown, an embodiment of the present application provides a command output method based on a brain-computer interface, including the following steps S210~S240.
[0048] S210, obtaining the EEG signal of the subject based on the brain-computer interface.
[0049] Specifically, a series of electrodes are deployed on the subject's scalp to non-invasively obtain the subject's EEG signals. These electrodes are arranged according to the international 10-20 system or other standardized layouts to ensure comprehensive coverage of key areas of the brain. The electrodes are used to capture the spontaneous electrical activity of the cerebral cortex, namely electroencephalogram (EEG), which reflects the synchronous discharge activity of brain neurons.
[0050] The acquisition of EEG signals is completed through a hardware device connected to an electroencephalogram (EEG) machine, which has an analog-to-digital converter (ADC) to convert analog EEG signals into digital format for subsequent digital signal processing. During the acquisition process, EEG signals are continuously recorded at a certain sampling rate (usually between 100 Hz and several thousand Hz) to ensure that rapidly changing EEG activities can be captured.
[0051] S220, at each refresh point, encode the EEG signal within a fixed time length to generate an encoding probability vector of the EEG signal at the refresh point.
[0052] Specifically, at each refresh point, continuous EEG signals received from the brain-computer interface device are first intercepted. These signals are collected within a fixed refresh step, which defines the time window for processing the signal. The intercepted EEG signals will go through a series of preprocessing steps to improve signal quality and reduce noise. Preprocessing may include filtering, amplification, artifact removal and other operations to ensure that the signal can accurately reflect the user's EEG activity.
[0053] The preprocessed signal will be further analyzed to extract features related to the preset instructions. These features may include frequency domain features (such as power spectral density), time domain features (such as waveform pattern), or spatial domain features (such as coherence between electrodes). Using the extracted features and the preset algorithm model, the EEG signal is converted into a coded probability vector. Each element of the coded probability vector represents the brain response intensity corresponding to the preset instruction within the current refresh step.
[0054] For example, Figure 3 As shown, a coding probability vector of an EEG signal in an embodiment is shown, wherein each color represents a row in the coding probability vector, and its height is the value of the corresponding row in the coding probability vector.
[0055] S230, based on the encoded probability vector, decode and generate an instruction output probability vector; wherein each element of the instruction output probability vector represents the execution probability of a preset instruction; the instruction output probability vector is a set of execution probabilities of each preset instruction corresponding to the EEG signal at the refresh point.
[0056] Specifically, each element in the encoded probability vector is first analyzed to identify the EEG activity patterns associated with the user's intention. By applying algorithms such as Task-Discriminant Component Analysis (TDCA) and Task-related Component Analysis (TRCA), the system can decode these EEG signals and calculate the execution probability of each preset instruction. These probability values reflect the user's intention strength for each instruction at the current refresh point.
[0057] Then, the instruction output probability vector is constructed, in which each element corresponds to a preset instruction, indicating the probability of the preset instruction being executed at the current refresh point. The instruction output probability vector forms a collection of the EEG signal at the current refresh point and the execution probability of each preset instruction, providing an important basis for subsequent instruction decisions.
[0058] S240, determining the preset instructions and the number of instructions for discrete output based on the execution probability of each preset instruction in the instruction output probability vector.
[0059] In this implementation, by real-time analysis of the continuously input coding probability vector, it is possible to quickly respond to changes in EEG signals and timely update the execution probability of instructions, thereby achieving real-time control of external devices. Not only can a single instruction be output, but the output of multiple instructions can also be determined based on the execution probability, which can more effectively respond to complex user intentions and broaden the practicality and effectiveness of EEG control systems in various application scenarios.
[0060] In one embodiment of the present application, the step S240 further includes steps S241 - S242 .
[0061] S241, setting an output threshold of the preset instruction.
[0062] S242, determining the preset instructions to be output and the number of instructions based on the output threshold of the preset instructions and the execution probability of each preset instruction in the instruction output probability vector.
[0063] Specifically, the instruction output probability vector in step S230 is first received, and each element in the vector represents the execution probability of the corresponding preset instruction. Subsequently, each element is compared with a preset threshold. The threshold is a key parameter, which determines at what level of execution probability the corresponding instruction is considered to be the user's explicit intention and should be output.
[0064] If the execution probability of a preset instruction exceeds a set threshold, the instruction is considered valid and is added to the output queue. The system can be configured to output only the single instruction with the highest probability, or in some cases, to output multiple instructions that exceed the threshold at the same time. Finally, these preset instructions are then sent to the external controlled device for execution.
[0065] It is understandable that in application scenarios with higher stability requirements, the system sets the threshold higher. This high threshold setting ensures that instructions are output only when the user's intention is very clear, thereby reducing the possibility of misoperation and improving the stability and safety of the system. For example, in wheelchair control, a higher threshold can prevent accidental movement caused by weak or uncertain EEG signals and ensure user safety.
[0066] In contrast, in application scenarios that require higher response speed and flexibility, the system sets the threshold lower. This low threshold setting enables the system to respond faster to changes in the user's EEG signals, providing a more sensitive and dynamic interactive experience. For example, in games, a lower threshold can help the system capture the player's instant reactions and complex operations, achieving smoother and more precise game control.
[0067] For example, Figure 4 As shown, the black dotted line indicates the output threshold set in this example. At the position shown by arrow 1, only the execution probability of the instruction represented by purple exceeds the threshold, indicating that the instruction has obtained sufficient brain response support, so the specific operation represented by purple will be output. In contrast, at the position shown by arrow 2, the execution probability of the preset instructions represented by purple and orange both exceed the set threshold, indicating that both instructions have been fully confirmed by brain response. In this case, the two operations represented by the purple and orange instructions will be output.
[0068] Furthermore, in an embodiment of the present application, step S250 is also included.
[0069] S250, when there are multiple preset instructions to be output, the multiple preset instructions are combined and output simultaneously.
[0070] Specifically, when the values of multiple elements in the instruction output probability vector exceed the set threshold, the preset instructions corresponding to these elements are considered to be intended to be executed by the user at the same refresh point. These instructions are identified as a combined command and prepared to be output simultaneously. After identifying the instructions that need to be output in combination, the corresponding control signals will be generated and sent to the external controlled device as a combined command. This output method allows external devices to perform multiple actions at the same time, such as performing combos in complex game controls or controlling multiple devices simultaneously in a multi-tasking environment.
[0071] In this way, the application can flexibly handle complex user intentions and provide richer and more efficient control command output, which is particularly suitable for application scenarios that require fast and continuous actions. This ability to output multiple commands significantly improves the practicality and flexibility of the brain-computer interface system and provides users with a more intuitive and natural interactive experience.
[0072] In one embodiment of the present application, Figure 5 As shown, the command output method based on brain-computer interface can also include steps S310~S330.
[0073] S310, setting the slope control parameters of each of the preset instructions.
[0074] Specifically, specific slope control parameters are configured for each preset instruction, which directly affect the iterative update process of the instruction output probability vector.
[0075] In one embodiment of the present application, the slope control parameter includes an ascending control parameter and a descending control parameter, which are respectively used to adjust the rate of increase and decrease of the execution probability associated with a specific preset instruction. The ascending control parameter determines the increase in the execution probability when the system detects an enhanced EEG signal response to a certain instruction, that is, the delay time of the corresponding preset instruction execution; while the descending control parameter determines the decrease in the execution probability when the response weakens, that is, the exit time of the corresponding preset instruction execution.
[0076] The slope control parameters of each preset command can be personalized according to the characteristics of the command and the needs of the application scenario. For example, in applications that require fast response (such as game control), a higher rising slope may be required to quickly capture the user's intention; while in applications where stability is more critical (such as wheelchair control), a lower rising slope may be required to avoid misoperation.
[0077] S320, based on the slope control parameters of each of the preset instructions, iteratively calculate the encoding probability vector generated at the current generation refresh point and the instruction output probability vector generated at the previous generation refresh point to obtain the instruction output probability vector at the current generation refresh point; wherein each element in the instruction output probability vector represents the output probability of a preset instruction; the instruction output probability vector at the first generation refresh point is a preset value.
[0078] Specifically, the instruction output probability vector is iteratively updated by the slope control parameter of the preset instruction, thereby dynamically adjusting the probability of each preset instruction being executed. The process starts at system initialization, where the instruction output probability vector at the first generation refresh point is assigned preset values, which can be probability values based on prior knowledge, user configuration or default settings.
[0079] At each subsequent refresh point, first, the encoding probability vector generated at the current refresh point is obtained, which reflects the execution probability associated with each preset instruction at the current moment of the EEG signal. For each preset instruction, the corresponding rising control parameter and falling control parameter are used to adjust the execution probability, where the rising control parameter affects the increase in the execution probability, and the falling control parameter affects the decrease in the execution probability.
[0080] Then, the encoding probability vector at the current generation refresh point is combined with the instruction output probability vector at the previous generation refresh point, and the slope control parameter is applied for iterative calculation. This calculation takes into account the changing trend of the EEG signal and the persistence of the user's intention, thereby updating the execution probability of each instruction. Through iterative calculation, the instruction output probability vector at the current generation refresh point is obtained. Each element in this vector represents the output probability of the corresponding preset instruction, reflecting the system's latest estimate of the user's intention. The updated instruction output probability vector is stored and participates in subsequent iterative calculations.
[0081] In one embodiment of the present application, in order to quickly focus on the instructions that the user is most likely to execute and reduce the interference of non-priority instructions, the step S320 also includes steps S321-S322.
[0082] S321, construct a pseudo output vector based on the coding probability vector at the current generation refresh point to obtain the pseudo output vector at the current generation refresh point; wherein each element of the pseudo output vector corresponds one-to-one to each element in the coding probability vector; the pseudo output vector element corresponding to the element with the highest probability in the coding probability vector is set to 1, and the pseudo output vector elements corresponding to other elements in the coding probability vector whose probabilities are not the highest are set to 0.
[0083] For example, Figure 6 As shown, in the schematic diagram provided, two different arrow positions can be observed, indicating the EEG response strength of different preset instructions. Specifically, the arrow 1 position shows that the preset instruction represented by blue has the deepest EEG response, which corresponds to the element with the highest probability value in the encoding probability vector. Based on this highest response, the constructed pseudo output vector is set to [1, 0, 0, 0, 0, ...] accordingly, where 1 indicates that the execution probability of the preset instruction is the highest, and the subsequent 0 indicates that the execution probability of other instructions is relatively low.
[0084] Similarly, the arrow 2 position shows that the preset instruction represented by orange has the most significant EEG response in the subsequent refresh point, which also corresponds to the highest probability value in the encoded probability vector. Accordingly, the pseudo output vector is updated to [0,1,0,0,0,…], where the position change of 1 reflects the instruction that is most likely to be executed at present, and the 0 in other positions indicates that the execution probability of the remaining instructions has not reached a significant level.
[0085] S322, based on the pseudo output vector at the current generation refresh point, adjust the value of each element in the instruction output probability vector generated at the previous generation refresh point to obtain the instruction output probability vector at the current generation refresh point; wherein, the execution probability of the preset instruction corresponding to the pseudo output vector element with a value of 1 in the pseudo output vector at the current generation refresh point in the instruction output probability vector generated at the previous generation refresh point is increased, and the execution probability of the corresponding preset instruction in the instruction output probability vector at the current generation refresh point is obtained; the execution probability of the preset instruction corresponding to the pseudo output vector element with a value of 0 in the pseudo output vector at the current generation refresh point in the instruction output probability vector generated at the previous generation refresh point is reduced, and the execution probability of the corresponding preset instruction in the instruction output probability vector at the current generation refresh point is obtained.
[0086] For example, Figure 6 , the pseudo output vector constructed based on the first refresh point is [1,0,0,0,0,…], at this time, the instruction output probability vector generated at the previous generation refresh point will be adjusted. Assuming that the instruction output probability vector of the previous generation is [0.2, 0.1, 0.1, 0.1, 0.1,…], the execution probability of the element corresponding to the value of 1 in the pseudo output vector (i.e., the first element) will be increased. The magnitude of the increase is determined by the rising control parameter of the blue instruction. Assuming it is 0.15, the execution probability increases to 0.35. At the same time, the execution probabilities of other elements will be reduced according to their falling control parameters. Assuming that all are 0.07, the execution probability is reduced to 0.03. Therefore, the adjusted instruction output probability vector becomes [0.35, 0.03, 0.03,0.03, 0.03,…].
[0087] Similarly, the pseudo output vector constructed based on the second refresh point is [0,1,0,0,0,…]. Based on the instruction output probability vector [0.35, 0.03, 0.03, 0.03, 0.03,…] adjusted at the previous refresh point, the execution probability of the element corresponding to the value of 1 in the pseudo output vector (i.e., the second element) will be increased. The increase is determined by the rising control parameter of the orange instruction. Assuming it is 0.20, the execution probability increases to 0.23. At the same time, the execution probabilities of other elements will be reduced according to their falling control parameters. Assuming that they are all 0.05, the execution probability decreases to 0.01. Therefore, the adjusted instruction output probability vector is updated to [0.01, 0.23, 0.01, 0.01, 0.01,…].
[0088] S330, determining the preset instructions and the number of instructions output at the current generation refresh point based on the instruction output probability vector at the current generation refresh point.
[0089] For example, Figure 7Shown, displayed Figure 3 The encoded probability vector is the output probability vector of some instructions after iterative calculation, where each color represents a preset instruction.
[0090] In one embodiment of the present application, the step S330 specifically includes steps S331 - S332 .
[0091] S331, setting an output threshold of the preset instruction.
[0092] Specifically, in this step, an output threshold is set for the preset instruction. These thresholds are predefined parameters used to determine whether the value in the instruction output probability vector is high enough to consider the user's intention to be clear. The output threshold can be adjusted according to different application scenarios and user needs to balance the responsiveness and accuracy of the system.
[0093] S332, determining the preset instruction and the number of instructions output at the current generation refresh point based on the output threshold of the preset instruction and the instruction output probability vector at the current generation refresh point.
[0094] Specifically, in this step, the instruction output probability vector at the current refresh point is compared with the output threshold of the preset instruction. For each element in the instruction output probability vector that exceeds its corresponding output threshold, it is identified as a clear user intention and the instruction is output. At the same time, the number of elements exceeding the threshold is calculated to determine the total number of preset instructions output at the current refresh point.
[0095] If the execution probability of multiple instructions exceeds their output threshold, it will be decided whether to output these instructions at the same time based on the configuration and application requirements. In some cases, it is designed to output only the single instruction with the highest probability; in other cases, all instructions that exceed the threshold are output to achieve more complex control tasks.
[0096] In this implementation, the user's EEG control commands can be accurately identified and output, which improves the practicality and reliability of brain-computer interface technology. This decision-making mechanism based on probability and threshold enables the system to flexibly adapt to different application environments while ensuring the accuracy of command output and the faithful expression of user intentions.
[0097] In order to better illustrate the technical solution of this application, a detailed game control example is listed below. Figure 8 illustrate.
[0098] In an immersive virtual reality (VR) gaming environment, players are equipped with an EEG cap, which is used to monitor the player's brain electrical activity in real time. The system accurately encodes the collected EEG signals at each refresh point and generates a coded probability vector, which contains multiple elements, each of which corresponds to the execution probability of a preset instruction (for example: forward, jump, attack).
[0099] At the current refresh point, the player focuses on executing the "attack" command. Through advanced EEG signal processing, this intention is identified and a pseudo output vector [0, 1, 0] is constructed, where "1" indicates that the EEG response intensity of the "attack" command is the highest.
[0100] Based on the pseudo output vector, the instruction output probability vector of the current generation refresh point is adjusted, that is, the execution probability of the "attack" instruction is increased, and the execution probability of the "forward" and "jump" instructions is correspondingly reduced. After iterative calculations of multiple refresh points, the instruction output probability vector is continuously updated until the execution probability of the "attack" instruction exceeds the preset threshold.
[0101] When the execution probability of the "attack" command reaches the threshold, the command is output, triggering the character in the game to start attacking the enemy.
[0102] While the attack command is being executed, the player thinks about "jumping" to avoid the enemy's counterattack. After capturing this change, iterate at the current refresh point, increase the execution probability of the "jump" command accordingly, and reduce the execution probability of the "attack" and "advance" commands at the same time. After this iteration, the execution probability of the "jump" command exceeds the preset output threshold. At the same time, although the execution probability of the "attack" command has decreased, because its value is still higher than the output threshold, the "jump" and "attack" commands are output at the same time at this refresh point. At this point, the character is able to smoothly execute the complex combo action of "jump attack".
[0103] In one implementation of the present application, the present application embodiment provides a command output device based on a brain-computer interface, such as Fig. 9As shown, the command output device 900 based on brain-computer interface includes an input interface module 901, an encoding module 902, a decoding module 903 and an output interface module 904. The input interface module 901 is used to obtain the EEG signal of the subject based on the brain-computer interface; the encoding module 902 is used to encode the EEG signal within a fixed time length at each refresh point to generate the encoding probability vector of the EEG signal at the refresh point; the decoding module is used to decode and generate the command output probability vector based on the encoding probability vector; wherein each element of the command output probability vector represents the execution probability of a preset command; the command output probability vector is a set of execution probabilities of each preset command corresponding to the EEG signal at the refresh point; the output interface module 904 is used to determine the preset command and the number of commands of the discrete output based on the execution probability of each preset command in the command output probability vector.
[0104] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present application. For example, the functional modules / units in the various embodiments of the present application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.
[0105] In one implementation of the present application, an embodiment of the present application provides an electronic device, such as Fig.10 As shown, the electronic device includes one or more processors and one or more memories; the memory stores a computer-readable code, and when the computer-readable code is executed by the one or more processors, the command output method based on the brain-computer interface as described above is implemented. In addition, the electronic device may also include conventional electronic devices such as an I / O interface and a communication module, which will not be elaborated here.
[0106] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0107] In one implementation of the present application, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the brain-computer interface-based instruction output method as described above is implemented.
[0108] A person of ordinary skill in the art can understand that all or part of the steps in the method for implementing the above embodiment can be completed by instructing a processor through a program, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.
[0109] In one implementation of the present application, the embodiment of the present application may also provide a computer program product, which includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer or data center to another website, computer or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). When the computer program product is executed by a computer, the computer executes the method described in the aforementioned method embodiment. The computer program product may be a software installation package. When the aforementioned method is required, the computer program product may be downloaded and executed on a computer.
[0110] In the several embodiments provided in the present application, it should be understood that the disclosed system, device or method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules / units is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules or units, which can be electrical, mechanical or other forms.
[0111] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0112] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A command output method based on brain-computer interface, characterized in that: include: Obtaining the EEG signals of the subjects based on the brain-computer interface; At each refresh point, the EEG signal within a fixed time length is encoded to generate an encoding probability vector of the EEG signal at the refresh point; Based on the encoded probability vector, decoding and generating an instruction output probability vector; wherein each element of the instruction output probability vector represents the execution probability of a preset instruction; the instruction output probability vector is a set of execution probabilities of each preset instruction corresponding to the EEG signal at the refresh point; Determining the preset instructions and the number of instructions for discrete output based on the execution probability of each preset instruction in the instruction output probability vector; Setting the slope control parameters of each of the preset instructions; Based on the slope control parameters of each of the preset instructions, the encoding probability vector generated at the current generation refresh point and the instruction output probability vector generated at the previous generation refresh point are iteratively calculated to obtain the instruction output probability vector at the current generation refresh point; wherein the instruction output probability vector at the first generation refresh point is a preset value; Based on the instruction output probability vector at the current generation refresh point, the preset instructions and the number of instructions output at the current generation refresh point are determined.
2. The command output method based on brain-computer interface according to claim 1 is characterized in that: Also includes: Setting an output threshold of the preset instruction; Based on the output threshold of the preset instruction and the execution probability of each preset instruction in the instruction output probability vector, the preset instruction to be output and the number of instructions are determined.
3. The method for outputting instructions based on a brain-computer interface according to claim 1, characterized in that: Also includes: Setting an output threshold of the preset instruction; Based on the output threshold of the preset instruction and the instruction output probability vector at the current generation refresh point, the preset instruction and the number of instructions output at the current generation refresh point are determined.
4. The method for outputting instructions based on a brain-computer interface according to claim 1, characterized in that: Setting the slope control parameters of each of the preset instructions includes: The slope control parameters include an ascending control parameter and a descending control parameter; Setting an ascending control parameter and a descending control parameter of each of the preset instructions, wherein the ascending control parameter is used to control the delay time of the corresponding preset instruction execution, and the descending control parameter is used to control the exit time of the corresponding preset instruction execution; During the iterative calculation process, the increase range of the execution probability of the corresponding preset instruction is adjusted based on the rising control parameter, and the decrease range of the execution probability of the corresponding preset instruction is adjusted based on the falling control parameter.
5. The method for outputting instructions based on a brain-computer interface according to claim 1 or 4, characterized in that: The iterative calculation process includes: Construct a pseudo output vector based on the coding probability vector at the current generation refresh point to obtain the pseudo output vector at the current generation refresh point; wherein each element of the pseudo output vector corresponds one-to-one to each element in the coding probability vector; the pseudo output vector element corresponding to the element with the highest probability in the coding probability vector is set to 1, and the pseudo output vector elements corresponding to other elements with not the highest probability in the coding probability vector are set to 0; Based on the pseudo output vector at the current generation refresh point, the value of each element in the instruction output probability vector generated at the previous generation refresh point is adjusted to obtain the instruction output probability vector at the current generation refresh point; wherein, the execution probability of the preset instruction corresponding to the pseudo output vector element with a value of 1 in the pseudo output vector at the current generation refresh point in the instruction output probability vector generated at the previous generation refresh point is increased to obtain the execution probability of the corresponding preset instruction in the instruction output probability vector at the current generation refresh point; the execution probability of the preset instruction corresponding to the pseudo output vector element with a value of 0 in the pseudo output vector at the current generation refresh point in the instruction output probability vector generated at the previous generation refresh point is reduced to obtain the execution probability of the corresponding preset instruction in the instruction output probability vector at the current generation refresh point.
6. The method for outputting instructions based on a brain-computer interface according to claim 1, characterized in that: Also includes: When there are multiple preset instructions to be output, the multiple preset instructions are combined and output simultaneously.
7. A command output device based on a brain-computer interface, characterized in that: include: An input interface module, used to obtain the EEG signal of the subject based on the brain-computer interface; An encoding module, used for encoding the EEG signal within a fixed time length at each refresh point to generate an encoding probability vector of the EEG signal at the refresh point; A decoding module, for decoding and generating an instruction output probability vector based on the encoded probability vector; wherein each element of the instruction output probability vector represents an execution probability of a preset instruction; and the instruction output probability vector is a set of execution probabilities of each preset instruction corresponding to the EEG signal at the refresh point; An output interface module is used to determine the preset instructions and the number of instructions for discrete output based on the execution probability of each preset instruction in the instruction output probability vector; set the slope control parameters of each preset instruction; based on the slope control parameters of each preset instruction, iteratively calculate the coding probability vector generated at the current generation refresh point and the instruction output probability vector generated at the previous generation refresh point to obtain the instruction output probability vector at the current generation refresh point; wherein the instruction output probability vector at the first generation refresh point is a preset value; based on the instruction output probability vector at the current generation refresh point, determine the preset instructions and the number of instructions output at the current generation refresh point.
8. An electronic device, characterized in that: include: one or more processors; and One or more memories, wherein the memories store computer-readable codes, and when the computer-readable codes are executed by the one or more processors, the brain-computer interface-based instruction output method is implemented as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, it implements the instruction output method based on the brain-computer interface as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Equipment control method, terminal and system
CN113655884A
Human-computer interaction command method and device based on brain-computer interface
CN114201041A