IP Library Granted Patent US 12661071
Granted Patent B2
US 12661071 · App. 17/969,177 · Granted Jun 23, 2026

Method and apparatus for classifying electroencephalogram signal, method and apparatus for training classification model, and electronic device and computer-readable storage medium

Inventors: Luyan Liu (Shenzhen, CN); Xiaolin Hong (Shenzhen, CN); Kai Ma (Shenzhen, CN); Yefeng Zheng (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
A61B5/7267A61B5/369A61B5/7275
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12661071
App. No.
17/969,177
Filed
Oct 19, 2022
Granted
Jun 23, 2026
Kind
B2
Art Unit
3796
USPC
600/301
Abstract

A method and an apparatus for classifying an electroencephalogram signal, a device and a computer-readable storage medium. The method includes: obtaining an electroencephalogram signal; performing feature extraction on the electroencephalogram signal to obtain a signal feature corresponding to the electroencephalogram signal; obtaining a difference distribution ratio, the difference distribution ratio being used for representing impacts of difference distributions of different types on distributions of the signal feature and a source domain feature in a feature domain, the source domain feature being a feature corresponding to a source domain electroencephalogram signal; aligning the signal feature with the source domain feature according to the difference distribution ratio to obtain an aligned signal feature; and classifying the aligned signal feature to obtain a motor imagery type corresponding to the electroencephalogram signal.

Claims (106)

1 . A method for classifying an electroencephalogram signal, performed by a computer device, the method comprising:

obtaining, via an electroencephalogram signal device and configured to connect to a terminal executing a game application, an electroencephalogram signal associated with the game application, the electroencephalogram signal device establishing a brain computer interface (BCI) between the electroencephalogram signal device and a user wearing the electroencephalogram signal device to acquire motor imagery of the user;

performing feature extraction on the electroencephalogram signal to obtain a signal feature corresponding to the electroencephalogram signal;

obtaining a difference distribution ratio, the difference distribution ratio being used for representing impacts of difference distributions of different types on distributions of the signal feature and a source domain feature in a feature domain, the source domain feature being a feature corresponding to a source domain electroencephalogram signal;

aligning the signal feature with the source domain feature according to the difference distribution ratio to obtain an aligned signal feature;

classifying the aligned signal feature to obtain a motor imagery type of the motor imagery of the user corresponding to the electroencephalogram signal; and

executing control of the game application based on at least the motor imagery type.

2 . The method according to claim 1 , wherein the difference distribution ratio comprises a first distribution ratio corresponding to a marginal distribution difference and a second distribution ratio corresponding to a conditional distribution difference; and

the aligning comprises:

obtaining the marginal distribution difference and the conditional distribution difference between the source domain feature and the signal feature in the feature domain;

scaling down the marginal distribution difference according to the first distribution ratio, and scaling down the conditional distribution difference according to the second distribution ratio;

obtaining a signal feature with a scaled-down distribution difference according to a scaled-down marginal distribution difference and a scaled-down conditional distribution difference; and

determining the signal feature with the scaled-down distribution difference as the aligned signal feature.

3 . The method according to claim 2 , wherein the obtaining the marginal distribution difference and the conditional distribution difference between the source domain feature and the signal feature in the feature domain comprises:

obtaining first classification accuracy of a margin discriminator and second classification accuracy of a condition discriminator, the margin discriminator being configured to determine a domain signal to which the electroencephalogram signal belongs, the condition discriminator being configured to determine a domain signal to which electroencephalogram signals of different types belong, and the domain signal comprising at least one of the source domain electroencephalogram signal or an inputted electroencephalogram signal;

obtaining a first distribution distance between the signal feature and the source domain feature according to the first classification accuracy, and obtaining a second distribution distance between the signal feature and the source domain feature according to the second classification accuracy; and

determining the first distribution distance as the marginal distribution difference, and determining the second distribution distance as the conditional distribution difference.

4 . The method according to claim 1 , wherein the difference distribution ratio comprises the first distribution ratio corresponding to the marginal distribution difference and the second distribution ratio corresponding to the conditional distribution difference; and

the obtaining a difference distribution ratio comprises:

obtaining the first distribution distance and the second distribution distance between the signal feature and the source domain feature, the first distribution distance being used for representing the marginal distribution difference between the signal feature and the source domain feature, and the second distribution distance being used for representing the conditional distribution difference between the signal feature and the source domain feature;

obtaining a type quantity of motor imagery types; and

obtaining the first distribution ratio corresponding to the marginal distribution difference and the second distribution ratio corresponding to the conditional distribution difference according to the first distribution distance, the second distribution distance, and the type quantity.

5 . The method according to claim 1 , wherein the classifying comprises:

invoking a classifier to process the aligned signal feature, to obtain a prediction probability of the motor imagery type corresponding to the electroencephalogram signal;

invoking the condition discriminator to process the aligned signal feature, to obtain prediction probabilities that the electroencephalogram signals of different types belong to the domain signal, the domain signal comprising at least one of the source domain electroencephalogram signal or the inputted electroencephalogram signal;

invoking the margin discriminator to process the aligned signal feature, to obtain a prediction probability that the electroencephalogram signal belongs to the domain signal; and

obtaining the motor imagery type corresponding to the electroencephalogram signal according to the prediction probability of the motor imagery type corresponding to the electroencephalogram signal, the prediction probabilities that the electroencephalogram signals of different types belong to the domain signal, and the prediction probability that the electroencephalogram signal belongs to the domain signal.

6 . The method according to claim 1 , wherein the performing comprises:

invoking a temporal convolutional layer to perform feature extraction on the electroencephalogram signal, to obtain a first signal feature corresponding to the electroencephalogram signal;

invoking a spatial convolutional layer to perform feature extraction on the first signal feature, to obtain a second signal feature corresponding to the electroencephalogram signal;

invoking a batch normalization layer to perform feature extraction on the second signal feature to obtain a third signal feature corresponding to the electroencephalogram signal;

invoking a square activation layer to perform feature extraction on the third signal feature, to obtain a fourth signal feature corresponding to the electroencephalogram signal;

invoking an average pooling layer to perform feature extraction on the fourth signal feature, to obtain a fifth signal feature corresponding to the electroencephalogram signal; and

invoking a dropout layer to perform feature extraction on the fifth signal feature to obtain a sixth signal feature corresponding to the electroencephalogram signal, and determining the sixth signal feature as the signal feature corresponding to the electroencephalogram signal.

7 . The method according to claim 2 , wherein the marginal distribution difference and the conditional distribution difference are scaled down simultaneously.

8 . An apparatus for classifying an electroencephalogram signal comprising:

at least one memory configured to store program code; and

at least one processor configured to read the program code and operate as instructed by the program code, the program code comprising:

first obtaining code configured to cause the at least one processor to obtain, via an electroencephalogram signal acquisition device and configured to connect to a terminal executing a game application, an electroencephalogram signal associated with the game application, the electroencephalogram signal device establishing a brain computer interface (BCI) between the electroencephalogram signal device and a user wearing the electroencephalogram signal device to acquire motor imagery of the user;

first feature extraction code configured to cause the at least one processor to perform feature extraction on the electroencephalogram signal, to obtain a signal feature corresponding to the electroencephalogram signal;

the first obtaining code being configured to cause the at least one processor to obtain a difference distribution ratio, the difference distribution ratio being used for representing impacts of difference distributions of different types on distributions of the signal feature and a source domain feature in a feature domain, the source domain feature being a feature corresponding to a source domain electroencephalogram signal;

first processing code configured to cause the at least one processor to align the signal feature with the source domain feature according to the difference distribution ratio, to obtain an aligned signal feature;

classification code configured to cause the at least one processor to classify the aligned signal feature to obtain a motor imagery type of the motor imagery of the user corresponding to the electroencephalogram signal; and

control code configured to cause the at least one processor to execute control of the game application based on at least the motor imagery type.

9 . The apparatus according to claim 8 , wherein the difference distribution ratio comprises a first distribution ratio corresponding to a marginal distribution difference and a second distribution ratio corresponding to a conditional distribution difference; and

the first processing code is further configured to cause the at least one processor to:

obtain the marginal distribution difference and the conditional distribution difference between the source domain feature and the signal feature in the feature domain;

scale down the marginal distribution difference according to the first distribution ratio, and scale down the conditional distribution difference according to the second distribution ratio;

obtain a signal feature with a scaled-down distribution difference according to a scaled-down marginal distribution difference and a scaled-down conditional distribution difference; and

determine the signal feature with the scaled-down distribution difference as the aligned signal feature.

10 . The apparatus according to claim 9 , wherein the first processing code is further configured to cause the at least one processor to:

obtain first classification accuracy of a margin discriminator and second classification accuracy of a condition discriminator, the margin discriminator being configured to determine a domain signal to which the electroencephalogram signal belongs, the condition discriminator being configured to determine a domain signal to which electroencephalogram signals of different types belong, and the domain signal comprising at least one of the source domain electroencephalogram signal or an inputted electroencephalogram signal;

obtain a first distribution distance between the signal feature and the source domain feature according to the first classification accuracy, and obtain a second distribution distance between the signal feature and the source domain feature according to the second classification accuracy; and

determine the first distribution distance as the marginal distribution difference, and determine the second distribution distance as the conditional distribution difference.

11 . The apparatus according to claim 8 , wherein the difference distribution ratio comprises the first distribution ratio corresponding to the marginal distribution difference and the second distribution ratio corresponding to the conditional distribution difference; and

the first obtaining code is further configured to cause the at least one processor to:

obtain the first distribution distance and the second distribution distance between the signal feature and the source domain feature, the first distribution distance being used for representing the marginal distribution difference between the signal feature and the source domain feature, and the second distribution distance being used for representing the conditional distribution difference between the signal feature and the source domain feature;

obtain a type quantity of motor imagery types; and

obtain the first distribution ratio corresponding to the marginal distribution difference and the second distribution ratio corresponding to the conditional distribution difference according to the first distribution distance, the second distribution distance, and the type quantity.

12 . The apparatus according to claim 8 , wherein the clarification code is further configured to cause the at least one processor to:

invoke a classifier to process the aligned signal feature to obtain a prediction probability of the motor imagery type corresponding to the electroencephalogram signal;

invoke the condition discriminator to process the aligned signal feature to obtain prediction probabilities that the electroencephalogram signals of different types belong to the domain signal, the domain signal comprising at least one of the source domain electroencephalogram signal or the inputted electroencephalogram signal;

invoke the margin discriminator to process the aligned signal feature to obtain a prediction probability that the electroencephalogram signal belongs to the domain signal; and

obtain the motor imagery type corresponding to the electroencephalogram signal according to the prediction probability of the motor imagery type corresponding to the electroencephalogram signal, the prediction probabilities that the electroencephalogram signals of different types belong to the domain signal, and the prediction probability that the electroencephalogram signal belongs to the domain signal.

13 . The apparatus according to claim 8 , wherein the first feature extraction code is further configured to cause the at least one processor to:

invoke a temporal convolutional layer to perform feature extraction on the electroencephalogram signal to obtain a first signal feature corresponding to the electroencephalogram signal;

invoke a spatial convolutional layer to perform feature extraction on the first signal feature to obtain a second signal feature corresponding to the electroencephalogram signal;

invoke a batch normalization layer to perform feature extraction on the second signal feature to obtain a third signal feature corresponding to the electroencephalogram signal;

invoke a square activation layer to perform feature extraction on the third signal feature to obtain a fourth signal feature corresponding to the electroencephalogram signal;

invoke an average pooling layer to perform feature extraction on the fourth signal feature to obtain a fifth signal feature corresponding to the electroencephalogram signal; and

invoke a dropout layer to perform feature extraction on the fifth signal feature to obtain a sixth signal feature corresponding to the electroencephalogram signal, and determine the sixth signal feature as the signal feature corresponding to the electroencephalogram signal.

14 . The apparatus according to claim 9 , wherein the marginal distribution difference and the conditional distribution difference are scaled down simultaneously.

15 . A non-transitory computer-readable storage medium, storing computer program code that when executed by at least one processor causes the at least one processor to:

obtain, via an electroencephalogram signal device and configured to connect to a terminal executing a game application, an electroencephalogram signal associated with the game application, the electroencephalogram signal device establishing a brain computer interface (BCI) between the electroencephalogram signal device and a user wearing the electroencephalogram signal device to acquire motor imagery of the user;

perform feature extraction on the electroencephalogram signal to obtain a signal feature corresponding to the electroencephalogram signal;

obtain a difference distribution ratio, the difference distribution ratio being used for representing impacts of difference distributions of different types on distributions of the signal feature and a source domain feature in a feature domain, the source domain feature being a feature corresponding to a source domain electroencephalogram signal;

align the signal feature with the source domain feature according to the difference distribution ratio to obtain an aligned signal feature;

classify the aligned signal feature to obtain a motor imagery type of the motor imagery of the user corresponding to the electroencephalogram signal; and

execute control of the game application based on at least the motor imagery type.

16 . The non-transitory computer-readable storage medium according to claim 15 , wherein the difference distribution ratio comprises a first distribution ratio corresponding to a marginal distribution difference and a second distribution ratio corresponding to a conditional distribution difference; and

the aligning comprises:

obtaining the marginal distribution difference and the conditional distribution difference between the source domain feature and the signal feature in the feature domain;

scaling down the marginal distribution difference according to the first distribution ratio, and scaling down the conditional distribution difference according to the second distribution ratio;

obtaining a signal feature with a scaled-down distribution difference according to a scaled-down marginal distribution difference and a scaled-down conditional distribution difference; and

determining the signal feature with the scaled-down distribution difference as the aligned signal feature.

17 . The non-transitory computer-readable storage medium according to claim 16 , wherein the obtain the marginal distribution difference and the conditional distribution difference between the source domain feature and the signal feature in the feature domain comprises:

obtaining first classification accuracy of a margin discriminator and second classification accuracy of a condition discriminator, the margin discriminator being configured to determine a domain signal to which the electroencephalogram signal belongs, the condition discriminator being configured to determine a domain signal to which electroencephalogram signals of different types belong, and the domain signal comprising at least one of the source domain electroencephalogram signal or an inputted electroencephalogram signal;

obtaining a first distribution distance between the signal feature and the source domain feature according to the first classification accuracy, and obtaining a second distribution distance between the signal feature and the source domain feature according to the second classification accuracy; and

determining the first distribution distance as the marginal distribution difference, and determining the second distribution distance as the conditional distribution difference.

18 . The non-transitory computer-readable storage medium according to claim 15 , wherein the difference distribution ratio comprises the first distribution ratio corresponding to the marginal distribution difference and the second distribution ratio corresponding to the conditional distribution difference; and

the obtain a difference distribution ratio comprises:

obtaining the first distribution distance and the second distribution distance between the signal feature and the source domain feature, the first distribution distance being used for representing the marginal distribution difference between the signal feature and the source domain feature, and the second distribution distance being used for representing the conditional distribution difference between the signal feature and the source domain feature;

obtaining a type quantity of motor imagery types; and

obtaining the first distribution ratio corresponding to the marginal distribution difference and the second distribution ratio corresponding to the conditional distribution difference according to the first distribution distance, the second distribution distance, and the type quantity.

19 . The non-transitory computer-readable storage medium according to claim 15 , wherein the classifying comprises:

invoking a classifier to process the aligned signal feature, to obtain a prediction probability of the motor imagery type corresponding to the electroencephalogram signal;

invoking the condition discriminator to process the aligned signal feature, to obtain prediction probabilities that the electroencephalogram signals of different types belong to the domain signal, the domain signal comprising at least one of the source domain electroencephalogram signal or the inputted electroencephalogram signal;

invoking the margin discriminator to process the aligned signal feature, to obtain a prediction probability that the electroencephalogram signal belongs to the domain signal; and

obtaining the motor imagery type corresponding to the electroencephalogram signal according to the prediction probability of the motor imagery type corresponding to the electroencephalogram signal, the prediction probabilities that the electroencephalogram signals of different types belong to the domain signal, and the prediction probability that the electroencephalogram signal belongs to the domain signal.

20 . The non-transitory computer-readable storage medium according to claim 15 , wherein the performing comprises:

invoking a temporal convolutional layer to perform feature extraction on the electroencephalogram signal, to obtain a first signal feature corresponding to the electroencephalogram signal;

invoking a spatial convolutional layer to perform feature extraction on the first signal feature, to obtain a second signal feature corresponding to the electroencephalogram signal;

invoking a batch normalization layer to perform feature extraction on the second signal feature, to obtain a third signal feature corresponding to the electroencephalogram signal;

invoking a square activation layer to perform feature extraction on the third signal feature, to obtain a fourth signal feature corresponding to the electroencephalogram signal;

invoking an average pooling layer to perform feature extraction on the fourth signal feature, to obtain a fifth signal feature corresponding to the electroencephalogram signal; and

invoking a dropout layer to perform feature extraction on the fifth signal feature, to obtain a sixth signal feature corresponding to the electroencephalogram signal, and determining the sixth signal feature as the signal feature corresponding to the electroencephalogram signal.