Mouse control method and system based on electroencephalogram signal and inertial sensor

By combining EEG signals and inertial sensors, high-precision mouse control without hand operation has been achieved, solving the problems of strong hand dependence and unstable control in existing technologies, and improving the naturalness and usability of interaction.

CN121785480APending Publication Date: 2026-04-03HAINAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-23
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing mouse control and human-computer interaction technologies rely heavily on hand movement capabilities, making it difficult to perform precise control when space is limited or during prolonged use. Furthermore, control methods based on single EEG signals suffer from unstable intent recognition and frequent false triggers, while methods based on inertial sensors are prone to pointer jitter and trajectory drift.

Method used

By combining EEG signals with inertial sensors, stable EEG features are extracted through bandpass filtering and sliding window processing. A machine learning model is constructed to recognize blinking behavior and generate click commands. High-pass filtering and smoothing are applied to head posture data, and the posture angle increment is calculated to realize pointer movement, thus achieving decoupling and complementarity between clicking and movement.

Benefits of technology

It improves the accuracy and robustness of mouse control, reduces accidental touches and drift, and enhances the naturalness and usability of human-computer interaction, making it suitable for scenarios where hand movement is limited or contactless interaction is not possible.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121785480A_ABST
    Figure CN121785480A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of mouse control, in particular to a mouse control method and system based on electroencephalogram signals and an inertial sensor. The method comprises the steps that firstly, electroencephalogram signal data and head posture data of a user are collected, band-pass filtering and sliding window processing are conducted on electroencephalogram signals to extract stable electroencephalogram features, an electroencephalogram signal recognition model is constructed based on the electroencephalogram features, the electroencephalogram features are classified and recognized, and a corresponding mouse click control instruction is generated; meanwhile, high-pass filtering, abnormal value suppression and smoothing processing are carried out on the head posture data, posture angle increments at adjacent sampling moments are calculated, a preset sensitivity coefficient is combined, head posture changes are mapped into the moving speed of a mouse pointer, and finally moving and clicking operation of the mouse pointer is achieved. According to the invention, high-precision, low-mistaken-touch and high-robustness mouse movement and click interaction without hand operation is realized, so that the naturalness and availability of man-machine interaction are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of mouse control technology, and in particular to a mouse control method and system based on electroencephalogram (EEG) signals and inertial sensors. Background Technology

[0002] In related technologies, with the continuous development of computer technology, wearable devices, and smart terminals, human-computer interaction technology has become an important technical means to improve information processing efficiency and user experience. The mouse, as one of the most commonly used pointer input devices, is widely used in office, industrial control, and information interaction scenarios, typically relying on the physical movement of the user's hand to complete cursor positioning and clicking operations. However, this traditional input method is highly dependent on the user's physical abilities and the operating environment. In situations where space is limited, prolonged use is required, or the user's physical functions are restricted, it can easily lead to inconvenience and fatigue.

[0003] Existing mouse control and human-computer interaction technologies primarily rely on hand mechanical operations or single-modal human signal input, which still have significant drawbacks and limitations in practical applications. On the one hand, traditional input methods such as mice, touchpads, or touchscreens heavily depend on hand movement capabilities. For scenarios with limited hand function, prolonged device use, or the need for contactless interaction, it is difficult to consistently and stably achieve precise control. Furthermore, prolonged repetitive hand operations can easily lead to fatigue and even operational burden, reducing interaction comfort. On the other hand, some existing control methods based on single EEG signals are susceptible to problems such as unstable intent recognition, frequent false triggers, and response delays due to factors like low signal-to-noise ratios, significant individual differences, and substantial environmental interference. These issues make it difficult to meet the requirements for accuracy and reliability in click control. In addition, existing pointer control methods based on inertial sensors often employ direct attitude mapping strategies, failing to adequately handle low-frequency drift, high-frequency jitter, and abnormal sampling points in attitude data. This can easily cause pointer jitter, accumulated trajectory drift, or decreased control accuracy, affecting the smoothness and controllability of continuous operations.

[0004] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention

[0005] The main objective of this application is to propose a mouse control method and system based on electroencephalogram (EEG) signals and inertial sensors, so as to achieve high-precision, low-misclick, and robust mouse movement and click interaction without the need for hand operation, thereby significantly improving the naturalness and usability of human-computer interaction.

[0006] To achieve the above objectives, one aspect of this application proposes a mouse control method based on electroencephalogram (EEG) signals and an inertial sensor, the method comprising the following steps:

[0007] Acquire electroencephalogram (EEG) signal data and head posture data; The EEG signal data is subjected to bandpass filtering and sliding window processing to extract EEG feature data; Based on the aforementioned EEG feature data, a machine learning algorithm is used to construct an EEG signal recognition model; Based on the EEG signal recognition model, the EEG feature data is classified and recognized to generate mouse click control commands; The head pose data is subjected to high-pass filtering, outlier suppression and smoothing, and the pose angle increment at adjacent sampling times is calculated; Based on the attitude angle increment and the preset sensitivity coefficient, the head attitude change is mapped to the pointer movement speed of the mouse pointer; The mouse pointer is moved and clicked according to the mouse click control command and the pointer movement speed.

[0008] In some embodiments, the EEG signal data includes EEG signals collected from the prefrontal cortex region, and the head posture data includes posture information such as pitch angle and yaw angle.

[0009] In some embodiments, the step of performing bandpass filtering and sliding window processing on the EEG signal data to extract EEG feature data includes: The EEG signal data is preprocessed to obtain the target EEG signal; the preprocessing includes removing low-frequency drift components and high-frequency noise components using a bandpass filter with a preset frequency band. Based on the target EEG signal, the signal is segmented into multiple time-series signal segments according to a preset window length. Based on the multiple time-series signal segments, multidimensional EEG feature parameters are extracted to form corresponding EEG feature vectors; the multidimensional EEG feature parameters include time-domain statistical features and frequency-domain features. The EEG feature vectors are output as EEG feature data to characterize blinking behavior.

[0010] In some embodiments, constructing an EEG signal recognition model based on the EEG feature data using a machine learning algorithm includes: Based on the aforementioned EEG feature data, a feature sample set is constructed that includes blinking behavior samples and non-blinking behavior samples; Based on the aforementioned feature sample set, a machine learning algorithm is used to train the model in order to learn the mapping relationship between different EEG feature data and corresponding blinking behavior categories; The model parameters obtained during training are optimized to generate an EEG signal recognition model that can distinguish between blinking and non-blinking behaviors.

[0011] In some embodiments, the step of classifying and recognizing the EEG feature data based on the EEG signal recognition model to generate mouse click control commands includes: The real-time acquired EEG feature data is input into the EEG signal recognition model, and the corresponding blinking behavior recognition result is output. Based on the blinking behavior recognition results, it is determined whether the target double blinking behavior has been detected; When two consecutive target blinking behaviors are detected within a preset time window, and the time interval between the two adjacent target blinking behaviors meets the preset double blinking judgment condition, it is determined that the target double blinking behavior has occurred. After determining that the target double blinking behavior has occurred, a corresponding mouse click control command is generated and the mouse click operation is triggered; After the mouse click control command is generated, a preset cooling period is entered, during which the recognition results of subsequent blinking behavior are blocked.

[0012] In some embodiments, performing high-pass filtering, outlier suppression, and smoothing on the head pose data, and calculating the pose angle increment between adjacent sampling times, includes: The head posture data is subjected to high-pass filtering to remove low-frequency drift components and obtain filtered posture angle data. Based on the filtered attitude angle data, outlier detection is performed using a sliding window method, and the detected outliers are suppressed. The attitude angle data after outlier suppression is smoothed to obtain the attitude angle sequence; Based on the attitude angle sequence, the attitude angle difference between adjacent sampling times is calculated to obtain the attitude angle increment.

[0013] In some embodiments, the formula for calculating the attitude angle sequence is as follows: ; in, This represents the smoothed attitude angle value at the nth sampling time, used to construct the attitude angle sequence; Indicates the first The attitude angle data value at each sampling time; n represents the time index of the current sampling time; i represents the index offset of the sampling point within the sliding window; W represents the width of the sliding window used for smoothing.

[0014] In some embodiments, mapping the head posture change to the pointer movement speed of the mouse pointer based on the posture angle increment and a preset sensitivity coefficient includes: Based on the attitude angle increment, the attitude angle increment in the pitch direction and the attitude angle increment in the yaw direction are obtained respectively; The attitude angle increment in the pitch direction is weighted and mapped with the first sensitivity coefficient to obtain the movement speed of the mouse pointer in the vertical direction. The attitude angle increment in the yaw angle direction is weighted and mapped with the second sensitivity coefficient to obtain the horizontal movement speed of the mouse pointer. Based on the vertical movement speed and the horizontal movement speed, a movement speed vector of the mouse pointer is generated; The position of the mouse pointer in the current display interface is updated based on the movement speed vector to achieve real-time mapping between head posture changes and mouse pointer movement.

[0015] To achieve the above objectives, another aspect of this application proposes a mouse control system based on electroencephalogram (EEG) signals and an inertial sensor, the system comprising: The data acquisition module is used to acquire electroencephalogram (EEG) signal data and head posture data; The EEG feature extraction module is used to perform bandpass filtering and sliding window processing on the EEG signal data to extract EEG feature data; The model building module is used to build an EEG signal recognition model based on the EEG feature data using machine learning algorithms; The EEG signal recognition module is used to classify and recognize the EEG feature data based on the EEG signal recognition model and generate mouse click control commands. The attitude data processing module is used to perform high-pass filtering, outlier suppression and smoothing on the head attitude data, and to calculate the attitude angle increment between adjacent sampling times. The pointer speed mapping module is used to map the head posture change into the pointer movement speed of the mouse pointer based on the posture angle increment and the preset sensitivity coefficient. The mouse control execution module is used to execute the movement and clicking operations of the mouse pointer according to the mouse click control command and the pointer movement speed.

[0016] To achieve the above objectives, another aspect of this application proposes a mouse control system based on electroencephalogram (EEG) signals and inertial sensors. The electronic device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0017] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0018] To achieve the above objectives, another aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0019] The embodiments of this application include at least the following beneficial effects: This application provides a mouse control method and system based on electroencephalogram (EEG) signals and inertial sensors. This scheme achieves decoupling and complementarity between the two control dimensions of "click-move" by co-modeling and controlling the intention information reflected by EEG signals and the head posture information collected by inertial sensors. By using bandpass filtering and sliding window processing to extract stable EEG features and constructing an EEG recognition model based on machine learning to output mouse click control commands, the influence of power frequency interference, electromyography artifacts and transient noise in EEG signals on the recognition results can be effectively suppressed, improving the accuracy and consistency of click intention recognition. At the same time, high-pass filtering, outlier suppression and smoothing processing of head posture data and calculation of posture angle increments at adjacent sampling times can weaken the influence of posture drift, sudden jitter and outlier sampling on pointer trajectory, making the estimation of posture change more stable and reliable. Furthermore, based on the posture angle increment and preset sensitivity coefficient, the mapping from head posture to pointer movement speed is completed, which can achieve speed adaptation and fine-tuning of operation under different users and different operating scenarios, thereby reducing accidental touches and drift while ensuring pointer response sensitivity. This invention enables pointer movement and click control without the need for hand operation, which improves the naturalness, continuity and usability of human-computer interaction. It is especially suitable for scenarios with limited hand movement, contactless interaction and immersive operation, and can improve the robustness of overall control and user experience. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating a mouse control method based on electroencephalogram (EEG) signals and an inertial sensor, as provided in an embodiment of this application. Figure 2 This is a schematic diagram of the "Blink area" setting provided in the embodiments of this application; Figure 3 This is a schematic diagram of a sliding window provided in an embodiment of this application; Figure 4 This is a schematic diagram of the single-click and double-click triggering logic provided in the embodiments of this application; Figure 5 This is a schematic diagram of a mouse control system based on electroencephalogram (EEG) signals and inertial sensors provided in an embodiment of this application. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0022] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”

[0023] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0025] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.

[0026] Electroencephalogram (EEG) refers to the weak electrical signals generated by the activity of neuronal groups in the human brain, which are collected through electrodes. It is usually represented in time series form and is used to reflect the characteristics of neural activity in different cognitive or behavioral states.

[0027] The prefrontal cortex EEG signal refers to the EEG signal collected in the prefrontal cortex region of the human body. This region is more sensitive to potential changes caused by eye movements such as blinking, and is suitable for extracting EEG features related to blinking behavior.

[0028] EEG feature data refers to the feature representation obtained after bandpass filtering, sliding window segmentation and feature extraction of the raw EEG signal. It is used to characterize the statistical or spectral characteristics of the EEG signal within a specific time window.

[0029] The cool-down period refers to a time interval set after the mouse click control command is generated. During this time interval, the recognition results of subsequent blinking behavior are blocked to reduce the probability of false triggering.

[0030] Inertial sensors are sensors used to measure the motion state of an object. They typically include accelerometers and gyroscopes, and are used to acquire information about changes in the user's head posture.

[0031] Head attitude data refers to angular information collected and calculated by inertial sensors to characterize the spatial attitude of the head, including at least pitch and yaw angles.

[0032] Pitch is the attitude angle formed by the head rotating around its horizontal axis, used to characterize the head's tendency to rotate vertically.

[0033] Yaw is the attitude angle formed by the head rotating around its vertical axis, used to characterize the head's tendency to rotate in the left and right directions.

[0034] Attitude angle increment refers to the difference in attitude angle between adjacent sampling times, which is used to reflect the magnitude of change in head attitude over a short period of time.

[0035] The Blink region refers to a pre-defined time interval on the time axis during the sliding window processing and sample labeling of EEG signals. This interval is used to label blinking behavior samples and distinguish non-blinking samples, thereby improving the accuracy and stability of EEG signal recognition.

[0036] Label refers to the time segment annotation set in the Blink area during the EEG signal sliding window processing to identify the target blinking behavior. It is used to mark the EEG feature samples generated by the corresponding sliding window as blinking behavior samples for use in the training and recognition of EEG signal recognition models.

[0037] This application provides a mouse control method and system based on EEG signals and inertial sensors. This approach achieves decoupling and complementarity between the "click-move" control dimensions by collaboratively modeling and controlling the intention information reflected in the EEG signals and the head posture information collected by the inertial sensors. Stable EEG features are extracted using bandpass filtering and sliding window processing, and a machine learning-based EEG recognition model is used to output mouse click control commands. This effectively suppresses the influence of power frequency interference, electromyography artifacts, and transient noise in the EEG signals on the recognition results, improving the accuracy and consistency of click intention recognition. Simultaneously, high-pass filtering, outlier suppression, and smoothing are applied to the head posture data, and the posture angle increment at adjacent sampling times is calculated. This weakens the influence of posture drift, sudden jitter, and outlier sampling on the pointer trajectory, making the estimation of posture changes more stable and reliable. Furthermore, based on the posture angle increment and a preset sensitivity coefficient, a mapping from head posture to pointer movement speed is completed, enabling speed adaptation and fine-tuned control under different users and operating scenarios, thereby reducing accidental touches and drift while ensuring pointer response sensitivity. This invention enables pointer movement and click control without the need for hand operation, which improves the naturalness, continuity and usability of human-computer interaction. It is especially suitable for scenarios with limited hand movement, contactless interaction and immersive operation, and can improve the robustness of overall control and user experience.

[0038] This application provides a mouse control method based on electroencephalogram (EEG) signals and inertial sensors, relating to the field of mouse control technology. This mouse control method based on EEG signals and inertial sensors can be applied to terminals, servers, or software running on either terminal or server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or in-vehicle terminal, but is not limited to these. The server can be configured as 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, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing a mouse control method based on EEG signals and inertial sensors, but is not limited to the above forms.

[0039] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0040] Figure 1 This is an optional flowchart of a mouse control method based on electroencephalogram (EEG) signals and inertial sensors provided in an embodiment of this application. Figure 1 The method may include, but is not limited to, steps S1 to S7: S1: Acquire EEG signal data and head posture data; wherein, the EEG signal data includes EEG signals collected from the prefrontal cortex region, and the head posture data includes posture information of pitch angle and yaw angle.

[0041] In this embodiment, the user wears an integrated brain-computer interface (BCI) acquisition device, which integrates a prefrontal EEG acquisition unit and an inertial measurement unit (IMU). The prefrontal EEG acquisition unit acquires EEG signals through at least one EEG electrode that contacts the user's forehead skin. The electrodes can be dry or semi-dry electrodes to reduce wearing complexity and improve daily use comfort. The IMU is fixedly mounted on the head-mounted device, and its coordinate system is consistent with the user's head posture, thus accurately reflecting changes in head posture relative to the spatial coordinate system. Through this wearing method, simultaneous acquisition of EEG signals and head posture information can be achieved without affecting the user's normal vision and head movements.

[0042] The prefrontal cortex EEG acquisition unit deploys single-channel or multi-channel electrodes in the user's prefrontal cortex to acquire prefrontal EEG signals. The prefrontal cortex is highly sensitive to potential changes caused by blinking, and the signal amplitude is significant, enabling stable acquisition of blink-related EEG features with relatively low hardware complexity. The EEG signal sampling frequency is set to 250 Hz, allowing the system to fully capture the transient characteristics of blinking while also considering the power consumption and real-time processing requirements of portable devices. During acquisition, the EEG signal data is continuously output in the form of raw time-domain waveforms, accompanied by precise timestamp information.

[0043] Simultaneously, the IMU samples the user's head posture at another preset sampling frequency, preferably 30Hz to 100Hz, such as 50Hz, to meet the real-time control requirements of continuous mouse pointer movement. Internally, the IMU performs attitude fusion calculations based on accelerometer and gyroscope data, outputting attitude angle information representing the head's spatial posture, including at least pitch and yaw angles. The pitch angle reflects the head's vertical rotation trend, and the yaw angle reflects the head's horizontal rotation trend. The system also assigns a timestamp to each frame of attitude angle data and writes it to the attitude data buffer to form a continuous attitude angle time series.

[0044] In this embodiment, a unified control cycle is used to schedule and read EEG signal data and head posture data. Within each control cycle, the most recent segment of EEG sampling data meeting the window length requirement is read from the EEG data buffer, and the latest frame or several recent frames of posture angle data are read from the posture data buffer, with logical alignment performed based on timestamps. This ensures that in subsequent processing, the EEG signal data used for blink recognition and the head posture data used for pointer movement control correspond to the same time interval.

[0045] S2: Perform bandpass filtering and sliding window processing on EEG signal data to extract EEG feature data; This involves bandpass filtering and sliding window processing of the EEG signal data to extract EEG feature data, including: The EEG signal data is preprocessed to obtain the target EEG signal; the preprocessing includes removing low-frequency drift components and high-frequency noise components using a bandpass filter with a preset frequency band. Based on the target EEG signal, the signal is segmented into multiple time-series signal segments according to a preset window length. Based on multiple time-series signal segments, multidimensional EEG feature parameters are extracted to form corresponding EEG feature vectors; among them, multidimensional EEG feature parameters include time-domain statistical features and frequency-domain features; The EEG feature vectors are output as EEG feature data to characterize blinking behavior.

[0046] In this embodiment, the EEG signal data is first preprocessed to obtain the target EEG signal for subsequent feature extraction. During the preprocessing, a bandpass filter with a preset frequency band is used to filter the original EEG signal. By filtering out low-frequency drift components below a preset lower limit frequency and high-frequency noise components above a preset upper limit frequency, the processed EEG signal mainly retains the signal components related to blinking behavior, thereby improving the signal-to-noise ratio and stability of the signal.

[0047] After bandpass filtering, the target EEG signal is used as the input signal, and a sliding window segmentation process is performed on the target EEG signal according to a preset window length. Specifically, the continuously acquired target EEG signal is segmented along the time axis, so that each signal segment corresponds to a time series signal segment of fixed length. By using a continuous sliding window, the long-term EEG signal is divided into multiple independent time series signal segments to analyze the local features of the EEG signal in different time periods.

[0048] After obtaining multiple time-series signal segments, feature extraction processing is performed on each time-series signal segment to extract multidimensional EEG feature parameters used to characterize blinking behavior. Multidimensional EEG feature parameters include time-domain statistical features reflecting the amplitude changes and waveform distribution characteristics of EEG signals, and frequency-domain features reflecting the spectral distribution characteristics of EEG signals. By extracting the corresponding multidimensional feature parameters for each time series signal segment, a feature representation that can comprehensively describe the characteristics of EEG signals within that time period is formed. The multidimensional EEG feature parameters specifically include mean, variance, peak-to-peak value, maximum slope, minimum slope, signal energy, median, absolute mean, zero-crossing rate, waveform length, kurtosis, skewness, entropy, power spectral density, Hjorth activity, Hjorth complexity, and Hjorth mobility.

[0049] Subsequently, the EEG feature parameters corresponding to the same time-series signal segment are combined to form an EEG feature vector that corresponds one-to-one with that time-series signal segment. This EEG feature vector is then output as EEG feature data to characterize blinking behavior. This EEG feature data serves as input data for subsequent EEG signal recognition processing, distinguishing between blinking and non-blinking behaviors, thus providing a reliable data foundation for generating subsequent mouse click control commands.

[0050] Specifically, for blink signal features in electroencephalograms (EEGs), traditional annotation methods may result in problems such as repeated sampling of the same signal during window stepping or the window only containing a portion of the blink. Therefore, this embodiment sets up a "Blink area". (Reference) Figure 2As shown, manual annotation is performed using "Blink regions" to ensure that negative samples are generated during non-blinking periods and that positive samples (blinking) do not overlap.

[0051] For offline EEG data annotation, the window width W is set to 150 data points (0.6 seconds), and the stride H is also equal to 150 samples; the left and right boundary indices of the "Blink region" are... , ,and , It can only be an integer multiple of the step size H. When labeling the "Blink region," both indices are rounded down to the nearest integer multiple of H (rounding down and rounding up). A label covering the blink feature signal is then marked within the left and right boundaries of the "Blink region" as a positive sample for subsequent training. The left and right boundaries are respectively... , The width of the Label is set to 150 data points, the same as the window width W, and the Label is positioned on the left and right boundaries of the "Blink area". , The label can move freely within the range, which avoids the problem that the target blink signal area cannot be well covered when only the label boundary is set to an integer multiple of the step size, and provides higher quality positive samples for model training.

[0052] To address the unique situation where negative samples outnumber positive samples during training, and to prevent the recurrence of identical negative sample features, a "sliding window width aligned with step size" strategy is adopted. The average blink duration for a normal person is between 100 and 400 milliseconds. Therefore, in this embodiment, the window width W is set to 150 data points (0.6 seconds), and the step size H is also equal to 150 samples, i.e., "window width = step size" setting. This design ensures that during the non-blinking phase, each sliding window generates a new negative sample, and there is no overlap between windows, thus avoiding the problem of identical negative samples appearing multiple times in the training set and enhancing sample diversity.

[0053] For the current sliding window The right boundary ( The left boundary of the "blink region" is equal to the set boundary. Then the next window Specify that the label set in the "blink region" is a positive sample, that is, record it. , The coordinates are set and labeled as positive samples. Then, the entire "Blink region" is skipped, and the next window is opened. The left boundary ( Align to the right boundary of the "blink area" Continue sliding to the right. If the right boundary of the window exceeds the total sample range after the jump alignment, discard the window.

[0054] In this embodiment, the step size H is set to 75 data points (0.3 seconds). This is because when the step size H equals the window width W, only a portion of the target blink signal may be located in the samples taken by the sliding window. Figure 3 As shown, in case 1 and As shown, a situation arises where the target blink signal cannot be detected. Therefore, setting the step size H to half the window width W ensures the capture of the complete target blink signal. However, this may result in the same waveform being detected repeatedly in two adjacent windows. Figure 3 In case 2, this embodiment further sets the current window... Skip to the next window when a blink signal from the target is detected. From the second window Continuing to slide prevents the same target's blink signal from being captured by two consecutive windows. This solves the problem of not being able to identify blink signals where only part of the target is within the window, and also solves the problem of the same target signal being detected repeatedly due to the inconsistency between the step size and the width of the sliding window.

[0055] S3: Based on EEG feature data, a machine learning algorithm is used to construct an EEG signal recognition model; Among them, based on EEG feature data, a machine learning algorithm is used to construct an EEG signal recognition model, including: Based on EEG feature data, a feature sample set containing blinking behavior samples and non-blinking behavior samples was constructed; Based on the feature sample set, machine learning algorithms are used to train the model in order to learn the mapping relationship between different EEG feature data and corresponding blinking behavior categories; The model parameters obtained during training are optimized to generate an EEG signal recognition model that can distinguish between blinking and non-blinking behaviors.

[0056] In this embodiment, based on EEG feature data, a feature sample set for model training is first constructed. Specifically, prefrontal EEG signal data collected from multiple subjects in a relaxed sitting position with their heads relatively still are selected, and time segments containing blinking features are manually labeled. The feature vectors corresponding to blinking behavior are labeled as blinking behavior samples, and the feature vectors corresponding to non-blinking time segments are labeled as non-blinking behavior samples, thus forming a feature sample set that simultaneously contains blinking behavior samples and non-blinking behavior samples. To ensure sample quality, the labeling process aims to ensure that blinking features fall completely within the corresponding time segments and avoids the same blinking event being repeatedly counted in training samples in adjacent segments.

[0057] After obtaining the feature sample set, machine learning algorithms are used to train the model on the samples to learn the mapping relationship between EEG feature data and blinking behavior categories. Specifically, the feature sample set is divided into training data and validation data. Supervised learning methods such as random forest or lightweight gradient boosting are selected. Each set of EEG feature vectors is used as input, and the corresponding blinking / non-blinking labels are used as output. Through iterative training, the model can be enabled to recognize blinking patterns under the EEG feature distribution of different subjects and different time segments. During the training process, the number of training rounds, the scope of feature usage, and the classification threshold can be adjusted according to the recognition effect of the validation data to avoid overfitting the model to individual samples and improve the generalization ability.

[0058] Furthermore, the model parameters obtained during training are optimized to generate an EEG signal recognition model that can distinguish between blinking and non-blinking behaviors. Specifically, model hyperparameters are searched and screened using cross-validation, and the optimal parameter combination is selected based on accuracy, precision, recall, or F1 score. For models requiring standardization, the feature scale parameters from the offline stage are simultaneously fixed to ensure that the subsequent real-time input features remain consistent with those from the training stage. Finally, the optimized model is stored so that it can be directly loaded and output blinking behavior judgment results in the online recognition stage.

[0059] S4: Based on the EEG signal recognition model, classify and recognize EEG feature data to generate mouse click control commands; Among them, based on the EEG signal recognition model, EEG feature data is classified and processed to generate mouse click control commands, including: The real-time acquired EEG feature data is input into the EEG signal recognition model, and the corresponding blinking behavior recognition result is output. Based on the blinking behavior recognition results, determine whether the target double blinking behavior has been detected; When two consecutive target blinking behaviors are detected within a preset time window, and the time interval between the two adjacent target blinking behaviors meets the preset double blinking judgment condition, it is determined that the target double blinking behavior has occurred. Once the target double blinking behavior is detected, the corresponding mouse click control command is generated and the mouse click operation is triggered; After the mouse click control command is generated, a preset cooling period is entered, during which the recognition results of subsequent blinking behavior are blocked.

[0060] In this embodiment, real-time EEG signals are continuously acquired, and corresponding EEG feature data is generated according to the same processing flow as the training phase. Specifically, each time the sliding window meets the preset conditions, the EEG feature vector for the current time period is extracted, and the EEG feature vector is input into the EEG signal recognition model to obtain the blinking behavior recognition result corresponding to the current time window, thereby realizing real-time classification and recognition processing of EEG feature data.

[0061] After obtaining the blinking behavior recognition result, the recognition result is judged at the event level to determine whether the target blinking behavior exists. When the recognition result of the current time window indicates that the target blinking behavior has been detected, the time information corresponding to this recognition is recorded, and a preset confirmation waiting state is entered; in the confirmation waiting state, the blinking recognition results of subsequent time windows are continuously monitored to determine whether they can constitute the target double blinking behavior.

[0062] Furthermore, within the preset time window corresponding to the confirmation waiting state, if the target blinking behavior is detected again and the time interval between the two target blinking behaviors meets the preset double blinking judgment condition, then the target double blinking behavior is determined to have occurred; if the target blinking is not detected again before the end of the preset time window, it is considered that the target double blinking behavior has not occurred, and the confirmation waiting state is cleared, thereby avoiding misjudging the single blinking or occasional noise recognition result as a double blinking event.

[0063] After confirming the occurrence of the target double blinking behavior, a mouse click control instruction corresponding to the target double blinking behavior is generated, and the corresponding mouse click operation is executed according to the mouse click control instruction to realize click control based on blinking behavior; the triggering time of the click operation is consistent with the confirmation result of the target double blinking behavior, thereby ensuring the accuracy and controllability of the click behavior.

[0064] After the mouse click control command is generated and executed, a preset cooldown period is entered. During the cooldown period, subsequent blink behavior recognition results are masked. That is, even if the target blink behavior is recognized again during the cooldown period, no new mouse click control command will be generated. After the cooldown period ends, the normal judgment and response to blink behavior recognition results are restored, thereby effectively reducing the risk of repeated triggering caused by continuous or rapid blinking and improving the stability of the overall click control process.

[0065] Specifically, for single-click and double-click events, it is impractical to use a single blink as the target signal due to the existence of normal blinking physiological phenomena. Therefore, in the following determination logic, this embodiment uses a double blink signal as the target signal.

[0066] refer to Figure 4 As shown, the specific process is as follows: First, check if we are currently in a cooldown period (by variables). Record the last trigger time. Indicates the current moment, if If the system is in a cooling state, this decision will be ignored.

[0067] If it is not during the cooling period ( And there are currently no double blinks to be confirmed. When a double blink signal is detected, then... Record the current moment ( The device is marked as entering the "awaiting confirmation" state and a 600ms confirmation timer is started. Clicking is not triggered immediately during this time.

[0068] In the "Waiting for Confirmation" state, if a double blink is detected again within the 600ms confirmation period, a double-click operation is immediately triggered: two consecutive left mouse button presses and releases are sent sequentially, executing the system-level double-click behavior. After triggering, Update to the current time, clear the "Waiting for confirmation" flag, and enter a 300ms cooldown period during which all new decisions are ignored.

[0069] If no second double blink is detected by the end of the 600ms confirmation period, a single click operation will be triggered immediately upon the end of the timer: a single left mouse button press and release will be sent to achieve a single click. After triggering, the following will also be... Update to the trigger time, clear the "Waiting for confirmation" flag, and enter a 300ms cooldown period. After the cooldown period ends, resume the normal judgment process.

[0070] S5: Perform high-pass filtering, outlier suppression, and smoothing on the head pose data, and calculate the pose angle increment between adjacent sampling times; The process includes high-pass filtering, outlier suppression, and smoothing of the head pose data, and calculating the pose angle increment between adjacent sampling times, including: The head pose data is subjected to high-pass filtering to remove low-frequency drift components and obtain filtered pose angle data. Based on the filtered attitude angle data, an outlier detection is performed using a sliding window method, and the detected outliers are suppressed. The attitude angle data after outlier suppression is smoothed to obtain the attitude angle sequence; Based on the attitude angle sequence, the attitude angle difference between adjacent sampling times is calculated to obtain the attitude angle increment.

[0071] Specifically, the formula for calculating the attitude angle sequence is as follows: ; in, This represents the smoothed attitude angle value at the nth sampling time, used to construct the attitude angle sequence; Indicates the first The attitude angle data value at each sampling time; n represents the time index of the current sampling time; i represents the index offset of the sampling point within the sliding window; W represents the width of the sliding window used for smoothing.

[0072] In this embodiment, the acquired head attitude data includes pitch and yaw angles, with a sampling frequency of approximately 50Hz, forming a continuous attitude angle data stream in chronological order. First, high-pass filtering is applied to both pitch and yaw angles to remove low-frequency drift components introduced by factors such as sensor bias, slow attitude drift, and changes in wearing tightness, resulting in filtered attitude angle data. The high-pass filter parameters are preset during offline testing, and the same parameters are directly used to process the real-time attitude angle data during online operation, ensuring better stability and repeatability of the attitude data used for subsequent pointer control.

[0073] After high-pass filtering, outlier detection and suppression are performed using a sliding window approach based on the filtered attitude angle data. When receiving the nth frame of attitude angle data, a sliding window containing data from the most recent few frames is constructed. The statistical characteristics of the attitude angles within the window are calculated, and the current frame is compared with the window statistics. If the current frame shows abrupt changes, spikes, or significant deviations from the normal fluctuation range within the window, it is identified as an outlier. For attitude angle data identified as outliers, suppression is performed using replacement or peak clipping methods. For example, the outlier points are corrected using interpolation results from adjacent valid sampling points or the mean of neighboring frames to eliminate the impact of abnormal peak values ​​caused by instantaneous jitter, collision interference, or communication jitter on subsequent control.

[0074] Specifically, even after high-pass filtering, instantaneous jitter and noise peaks still exist in the pitch and yaw sequences. The sliding window algorithm uses a fixed-length sliding window (10 frames), receiving the data in the nth frame. At that time, construct the angle segments of the 10 most recent frames within the window and calculate their average value. with standard deviation .

[0075] The difference between the angle of the current frame and the window average exceeds three times the standard deviation, i.e.: If the frame is deemed abnormal, then the preceding and following frames are used. and Replace the average value as follows: ; in, Indicates the first The attitude angle data obtained after smoothing at each sampling time point is the head attitude angle output by the inertial measurement unit (IMU), which can be either pitch or yaw. It is used for subsequent attitude angle increment calculation and mouse pointer movement control. Indicates the first The attitude angle data value at each sampling moment, that is, the attitude angle at the previous moment of the current sampling point, is used to reflect the historical trend of head attitude changes. Indicates the first The attitude angle data value at each sampling time, i.e. the attitude angle of the next time step after the current sampling point, is used to incorporate information from adjacent future sampling points to improve the smoothing effect.

[0076] Furthermore, unintentional hand tremors and random noise generated by the sensor itself can also introduce unpredictable noise signals into the captured motion data, potentially leading to incorrect motion recognition. To remove noise from the original data without affecting motion recognition, after the outlier detection and replacement operations described above, we use a moving average filter algorithm to process the outlier-suppressed data.

[0077] After outlier suppression, the attitude angle data is further smoothed to obtain a stable and continuous attitude angle sequence. Specifically, a moving average method can be used to smooth the suppressed attitude angles, weighting or averaging the current attitude angle with the attitude angles from several previous moments. This reduces high-frequency noise while maintaining the true head movement trend. Furthermore, smoothing is performed independently in the pitch and yaw directions to ensure that attitude changes in different directions are continuous in time and controllable in amplitude, thus providing stable input for incremental calculations.

[0078] Finally, the attitude angle difference between adjacent sampling times is calculated based on the smoothed attitude angle sequence to obtain the attitude angle increment. Specifically, adjacent difference operations are performed on the pitch angle sequence and yaw angle sequence in chronological order. The attitude angle at the current sampling time is compared with the attitude angle at the previous sampling time to obtain the attitude angle increment in the corresponding direction. The attitude angle increment is used to characterize the small movement amplitude of the head within a unit sampling period and serves as the input data for pointer movement speed mapping in subsequent steps to achieve smooth and continuous movement control of the mouse pointer.

[0079] Specifically, let the pitch angle of the current frame n after smoothing using the sliding window algorithm be... The previous frame was The smoothed yaw angle for the current frame is: The previous frame was Calculate the increments in both directions: ; ; The increment and It reflects the minute head movements of the user within one frame (20ms).

[0080] Increments often contain noise due to incomplete filtering or minor jitter. Therefore, a noise threshold is set to address this. Define the pitch noise threshold. and yaw noise threshold ,like Then let ;like Then let This avoids cursor jittering caused by slight vibrations, while retaining valid motion information above a certain threshold.

[0081] S6: Based on the attitude angle increment and preset sensitivity coefficient, the head attitude change is mapped to the pointer movement speed of the mouse pointer; Among them, based on the attitude angle increment and a preset sensitivity coefficient, the head attitude change is mapped to the pointer movement speed of the mouse pointer, including: Based on the attitude angle increment, the attitude angle increments in the pitch direction and the attitude angle increments in the yaw direction are obtained respectively; The attitude angle increment in the pitch direction is weighted and mapped with the first sensitivity coefficient to obtain the movement speed of the mouse pointer in the vertical direction. The attitude angle increment in the yaw direction is weighted and mapped with the second sensitivity coefficient to obtain the horizontal movement speed of the mouse pointer. Generate a mouse pointer movement speed vector based on the vertical and horizontal movement speeds. The position of the mouse pointer in the current display interface is updated based on the movement velocity vector to achieve real-time mapping between head posture changes and mouse pointer movement.

[0082] In this embodiment, attitude angle increments in the pitch and yaw directions are used to characterize the instantaneous movement trends of the head in the vertical and horizontal directions, respectively. Specifically, the attitude angle increments in the pitch and yaw directions are read in each sampling period and used as the basic input for pointer speed calculation to ensure that pointer movement can respond in real time to minute changes in head attitude.

[0083] To achieve a controllable mapping between attitude changes and pointer speed, this embodiment presets a first sensitivity coefficient and a second sensitivity coefficient. The first sensitivity coefficient adjusts the influence of pitch angle increments on the vertical movement of the pointer, while the second sensitivity coefficient adjusts the influence of yaw angle increments on the horizontal movement of the pointer. Specifically, the attitude angle increments in the pitch direction are weighted and mapped to the first sensitivity coefficient to obtain the vertical movement speed of the mouse pointer; the attitude angle increments in the yaw direction are weighted and mapped to the second sensitivity coefficient to obtain the horizontal movement speed of the mouse pointer. The sensitivity coefficients can initially use default values ​​obtained from offline experiments, and users can fine-tune them based on screen size, operating distance, and head movement range to balance movement efficiency and positioning accuracy.

[0084] After obtaining the vertical and horizontal movement velocities, these are combined to generate a mouse pointer movement velocity vector, which uniformly describes the pointer's two-dimensional motion trend within the current sampling period. Subsequently, the mouse pointer's position in the current display interface is updated based on the movement velocity vector: using the current pointer coordinates as a reference, the velocity vector is converted into corresponding displacement increments according to the sampling period and then superimposed to obtain the pointer's target position at the next moment. During the position update process, clipping can be performed in conjunction with display boundaries to prevent the pointer from going out of bounds and to maintain continuous updates, resulting in smooth, stable pointer movement that is synchronized with changes in head posture.

[0085] Furthermore, to avoid pointer jitter caused by minute vibrations, this embodiment introduces a minimum motion threshold strategy during the speed generation stage: when the attitude angle increment is within a preset noise range, the movement speed in the corresponding direction is limited to zero or reduced to a preset minimum value; only when the increment exceeds the noise threshold is an effective speed output. By combining sensitivity coefficient adjustment with threshold suppression, a stable, adjustable, and real-time mapping relationship is established between head posture changes and mouse pointer movement, thereby improving the usability of pointer control and user experience.

[0086] Specifically, for the retained incremental portion, an adjustable first sensitivity coefficient is introduced. Second sensitivity coefficient The angle difference is mapped to the pointer's movement speed using the following formula: ; ; in, Indicates the speed in the horizontal direction (screen X-axis). This represents the velocity in the vertical direction (screen Y-axis). Sensitivity coefficient. and The initial value is determined during the experimental phase, and users can fine-tune it based on their own head movement range and display device parameters. A smaller coefficient improves accuracy and is suitable for scenarios requiring precise clicks; a larger coefficient speeds up cursor movement and reduces the time required for large movements.

[0087] When the device starts up, the pointer is moved to the center of the screen based on the screen pixels, and then the current speed value is appended to the current pointer position. , ), thus obtaining new coordinates ( , ): ; ; To prevent the pointer from going beyond the screen display area, boundary clipping is necessary. If, then set to 0; if If the width is greater than the screen width, set it to the maximum width; similarly, for... The pointer is cropped within the screen area. After cropping, the coordinates are updated to the screen via the operating system API (SetCursorPos), completing one full pointer movement operation.

[0088] S7: Execute mouse pointer movement and click operations based on mouse click control commands and pointer movement speed.

[0089] In this embodiment, after obtaining the pointer movement speed, the screen coordinates where the current mouse pointer is located are used as the initial position. The displacement of the pointer in the horizontal and vertical directions is calculated within one sampling period based on the pointer movement speed. The displacement is then superimposed with the current pointer coordinates to obtain the updated pointer target position, thereby realizing the continuous pointer movement process based on head posture changes.

[0090] During the pointer position update process, boundary judgment processing is performed on the target position. When the calculated pointer target position exceeds the effective display range of the screen, the excess part is clipped so that the updated pointer position is always limited to the boundary range of the screen. This avoids the pointer from going out of bounds or abnormal jumping due to excessive changes in posture, thereby ensuring the stability and controllability of pointer movement.

[0091] Meanwhile, during pointer movement, the system determines whether a click operation needs to be performed based on the mouse click control command. When the mouse click control command is a single click, the system performs a left mouse button press and release operation once. When the mouse click control command is a double click, the system performs a left mouse button press and release operation twice in sequence within a preset time interval to complete the corresponding double click behavior. The execution of the click operation does not affect the continuous update of the pointer position.

[0092] After any click operation is completed, a preset cooldown time is entered. During the cooldown time, new click control command input is ignored to prevent accidental triggering caused by continuous blinking. After the cooldown time ends, the pointer movement and click operation are executed again according to the subsequently acquired mouse click control command and pointer movement speed, thereby realizing a mouse pointer movement and click method that combines head posture control and EEG signal control.

[0093] Please see Figure 5 This application also provides a mouse control system based on electroencephalogram (EEG) signals and an inertial sensor, the system comprising: The data acquisition module is used to acquire electroencephalogram (EEG) signal data and head posture data; The EEG feature extraction module is used to perform bandpass filtering and sliding window processing on EEG signal data to extract EEG feature data; The model building module is used to build EEG signal recognition models based on EEG feature data and machine learning algorithms. The EEG signal recognition module is used to classify and recognize EEG feature data based on the EEG signal recognition model and generate mouse click control commands. The attitude data processing module is used to perform high-pass filtering, outlier suppression and smoothing on the head attitude data, and to calculate the attitude angle increment between adjacent sampling times. The pointer speed mapping module is used to map head posture changes to the pointer movement speed of the mouse pointer based on the attitude angle increment and the preset sensitivity coefficient. The mouse control execution module is used to execute mouse pointer movement and click operations based on mouse click control commands and pointer movement speed.

[0094] This application also provides a mouse control system based on electroencephalogram (EEG) signals and inertial sensors. The system includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This system can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0095] It is understood that the content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0096] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0097] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0098] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0099] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0100] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0101] This application provides a mouse control method and system based on EEG signals and inertial sensors. This approach achieves decoupling and complementarity between the "click-move" control dimensions by collaboratively modeling and controlling the intention information reflected in the EEG signals and the head posture information collected by the inertial sensors. Stable EEG features are extracted using bandpass filtering and sliding window processing, and a machine learning-based EEG recognition model is used to output mouse click control commands. This effectively suppresses the influence of power frequency interference, electromyography artifacts, and transient noise in the EEG signals on the recognition results, improving the accuracy and consistency of click intention recognition. Simultaneously, high-pass filtering, outlier suppression, and smoothing are applied to the head posture data, and the posture angle increment at adjacent sampling times is calculated. This weakens the influence of posture drift, sudden jitter, and outlier sampling on the pointer trajectory, making the estimation of posture changes more stable and reliable. Furthermore, based on the posture angle increment and a preset sensitivity coefficient, a mapping from head posture to pointer movement speed is completed, enabling speed adaptation and fine-tuned control under different users and operating scenarios, thereby reducing accidental touches and drift while ensuring pointer response sensitivity. This invention enables pointer movement and click control without the need for hand operation, which improves the naturalness, continuity and usability of human-computer interaction. It is especially suitable for scenarios with limited hand movement, contactless interaction and immersive operation, and can improve the robustness of overall control and user experience.

[0102] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0103] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0104] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0105] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0106] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A mouse control method based on electroencephalogram (EEG) signals and an inertial sensor, characterized in that, The method includes the following steps: Acquire electroencephalogram (EEG) signal data and head posture data; The EEG signal data is subjected to bandpass filtering and sliding window processing to extract EEG feature data; Based on the aforementioned EEG feature data, a machine learning algorithm is used to construct an EEG signal recognition model; Based on the EEG signal recognition model, the EEG feature data is classified and recognized to generate mouse click control commands; The head pose data is subjected to high-pass filtering, outlier suppression and smoothing, and the pose angle increment at adjacent sampling times is calculated; Based on the attitude angle increment and the preset sensitivity coefficient, the head attitude change is mapped to the pointer movement speed of the mouse pointer; The mouse pointer is moved and clicked according to the mouse click control command and the pointer movement speed.

2. The method according to claim 1, characterized in that, The EEG signal data includes EEG signals collected from the prefrontal cortex region, and the head posture data includes posture information such as pitch angle and yaw angle.

3. The method according to claim 1, characterized in that, The step of performing bandpass filtering and sliding window processing on the EEG signal data to extract EEG feature data includes: The EEG signal data is preprocessed to obtain the target EEG signal; the preprocessing includes removing low-frequency drift components and high-frequency noise components using a bandpass filter with a preset frequency band. Based on the target EEG signal, the signal is segmented into multiple time-series signal segments according to a preset window length. Based on the multiple time-series signal segments, multidimensional EEG feature parameters are extracted to form corresponding EEG feature vectors; the multidimensional EEG feature parameters include time-domain statistical features and frequency-domain features. The EEG feature vectors are output as EEG feature data to characterize blinking behavior.

4. The method according to claim 1, characterized in that, The step of constructing an EEG signal recognition model based on the EEG feature data using machine learning algorithms includes: Based on the aforementioned EEG feature data, a feature sample set is constructed that includes blinking behavior samples and non-blinking behavior samples; Based on the aforementioned feature sample set, a machine learning algorithm is used to train the model in order to learn the mapping relationship between different EEG feature data and corresponding blinking behavior categories; The model parameters obtained during training are optimized to generate an EEG signal recognition model that can distinguish between blinking and non-blinking behaviors.

5. The method according to claim 1, characterized in that, The step of classifying and recognizing the EEG feature data based on the EEG signal recognition model to generate mouse click control commands includes: The real-time acquired EEG feature data is input into the EEG signal recognition model, and the corresponding blinking behavior recognition result is output. Based on the blinking behavior recognition results, it is determined whether the target double blinking behavior has been detected; When two consecutive target blinking behaviors are detected within a preset time window, and the time interval between the two adjacent target blinking behaviors meets the preset double blinking judgment condition, it is determined that the target double blinking behavior has occurred. After determining that the target double blinking behavior has occurred, a corresponding mouse click control command is generated and the mouse click operation is triggered; After the mouse click control command is generated, a preset cooling period is entered, during which the recognition results of subsequent blinking behavior are blocked.

6. The method according to claim 1, characterized in that, The process of performing high-pass filtering, outlier suppression, and smoothing on the head pose data, and calculating the pose angle increment between adjacent sampling times, includes: The head posture data is subjected to high-pass filtering to remove low-frequency drift components and obtain filtered posture angle data. Based on the filtered attitude angle data, outlier detection is performed using a sliding window method, and the detected outliers are suppressed. The attitude angle data after outlier suppression is smoothed to obtain the attitude angle sequence; Based on the attitude angle sequence, the attitude angle difference between adjacent sampling times is calculated to obtain the attitude angle increment.

7. The method according to claim 6, characterized in that, The formula for calculating the attitude angle sequence is as follows: ; in, This represents the smoothed attitude angle value at the nth sampling time, used to construct the attitude angle sequence; Indicates the first The attitude angle data value at each sampling time; n represents the time index of the current sampling time; i represents the index offset of the sampling point within the sliding window; W represents the width of the sliding window used for smoothing.

8. The method according to claim 1, characterized in that, The process of mapping head posture changes to mouse pointer movement speed based on the posture angle increment and a preset sensitivity coefficient includes: Based on the attitude angle increment, the attitude angle increment in the pitch direction and the attitude angle increment in the yaw direction are obtained respectively; The attitude angle increment in the pitch direction is weighted and mapped with the first sensitivity coefficient to obtain the movement speed of the mouse pointer in the vertical direction. The attitude angle increment in the yaw angle direction is weighted and mapped with the second sensitivity coefficient to obtain the horizontal movement speed of the mouse pointer. Based on the vertical movement speed and the horizontal movement speed, a movement speed vector of the mouse pointer is generated; The position of the mouse pointer in the current display interface is updated based on the movement speed vector to achieve real-time mapping between head posture changes and mouse pointer movement.

9. A mouse control system based on electroencephalogram (EEG) signals and inertial sensors, characterized in that, The system includes: The data acquisition module is used to acquire electroencephalogram (EEG) signal data and head posture data; The EEG feature extraction module is used to perform bandpass filtering and sliding window processing on the EEG signal data to extract EEG feature data; The model building module is used to build an EEG signal recognition model based on the EEG feature data using machine learning algorithms; The EEG signal recognition module is used to classify and recognize the EEG feature data based on the EEG signal recognition model and generate mouse click control commands. The attitude data processing module is used to perform high-pass filtering, outlier suppression and smoothing on the head attitude data, and to calculate the attitude angle increment between adjacent sampling times. The pointer speed mapping module is used to map the head posture change into the pointer movement speed of the mouse pointer based on the posture angle increment and the preset sensitivity coefficient. The mouse control execution module is used to execute the movement and clicking operations of the mouse pointer according to the mouse click control command and the pointer movement speed.

10. A mouse control system based on electroencephalogram (EEG) signals and inertial sensors, characterized in that, include: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method as described in any one of claims 1-8.