Attention detection method and system

文档序号:1724130 发布日期:2019-12-20 浏览:12次 中文

阅读说明:本技术 一种注意力检测方法及系统 (Attention detection method and system ) 是由 倪刚 杨晖 查钧 唐卫东 李皓 于 2019-03-15 设计创作,主要内容包括:本申请提供了一种用户注意力检测方法及系统,通过耳侧佩戴装置,从耳侧采集用户的脑电信号;并当判断所述耳侧佩戴装置能够从所述用户的左耳道和右耳道均能采集到脑电信号时,对所述用户的左耳道和右耳道的脑电信号进行差分处理,得到脑电信号;基于所述脑电信号检测所述用户的注意力类型。可应用于自动驾驶领域用于对驾驶员的注意力进行智能检测,并基于检测结果对用户进行预警或者进行驾驶模式的切换。实施本申请的方案,能够通过耳道更加方便快捷的获取到用户的脑电信号,并能够随时随地的对用户的注意力情况进行检测。(The application provides a user attention detection method and system, wherein an ear side wearing device is used for collecting electroencephalogram signals of a user from the ear side; when the ear side wearing device is judged to be capable of collecting electroencephalogram signals from the left auditory canal and the right auditory canal of the user, difference processing is carried out on the electroencephalogram signals of the left auditory canal and the right auditory canal of the user to obtain electroencephalogram signals; detecting a type of attention of the user based on the brain electrical signal. The method can be applied to the field of automatic driving and used for intelligently detecting the attention of a driver and early warning a user or switching the driving mode based on a detection result. According to the scheme, the electroencephalogram signals of the user can be acquired more conveniently and rapidly through the auditory meatus, and the attention condition of the user can be detected anytime and anywhere.)

1. A method for detecting attention of a user, the method comprising:

acquiring a user bioelectrical signal from the ear side of the user by wearing the device on the ear side;

acquiring a user electroencephalogram signal from the user bioelectrical signal;

obtaining the attention type of the user based on a machine learning model according to the electroencephalogram signal of the user;

wherein wear the device through the ear side, gather user's bioelectricity signal specifically including from user's ear side:

the ear-side wearing device comprises a plurality of ear-side signal measuring units; judging whether the impedance between two ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two ear side signal measuring units is lower than a preset threshold value, collecting bioelectric signals from the two ear side signal measuring units; and acquiring the bioelectrical signals of the user according to potential difference signals of the bioelectrical signals acquired by the two ear side signal measurement units.

2. The method of claim 1, wherein:

the plurality of ear side signal measuring units comprise a left ear side signal measuring unit and a right ear side signal measuring unit;

judging whether the impedance between two ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two ear side signal measuring units is lower than a preset threshold value, collecting bioelectric signals from the two ear side signal measuring units; acquiring the bioelectrical signals of the user according to potential difference signals of the bioelectrical signals acquired by the two ear side signal measurement units, specifically comprising the following steps:

judging whether the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value or not; when the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value; and acquiring the user bioelectrical signal according to the potential difference signal of the bioelectrical signal measured by the left ear side signal measuring unit and the bioelectrical signal measured by the right ear side signal measuring unit.

3. The method of claim 1, wherein:

the ear side wearing device is a single side ear side wearing device, and the plurality of ear side signal measuring units comprise a plurality of single side ear side signal measuring units;

judging whether the impedance between two ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two ear side signal measuring units is lower than a preset threshold value, collecting bioelectric signals from the two ear side signal measuring units; acquiring the bioelectrical signals of the user according to potential difference signals of the bioelectrical signals acquired by the two ear side signal measurement units, specifically comprising the following steps:

judging whether the impedance between two single-side ear-side signal measurement units is lower than a preset threshold value or not;

when the impedance between the two single-side ear-side signal measurement units is lower than a preset threshold value;

and acquiring the bioelectrical signal of the user according to the potential difference value signal of the bioelectrical signals acquired by the two unilateral ear side signal measurement units.

4. The method of claim 2, wherein the method comprises:

the number of the left ear side signal measuring units is multiple;

the number of the right ear side signal measuring units is multiple;

when the impedance between one of the left ear side signal measuring units and one of the right ear side signal measuring units is higher than a preset threshold value;

respectively judging whether the impedance between two of the left ear side signal measurement units is lower than a preset threshold value and whether the impedance between two of the right ear side signal measurement units is lower than the preset threshold value;

and acquiring the bioelectrical signal of the user according to the potential difference value signal of the bioelectrical signals measured by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold value.

5. The method according to any one of claims 1 to 4, characterized in that the method comprises:

the method comprises the following steps of obtaining a user bioelectricity signal according to a potential difference value signal of the bioelectricity signal collected by the two ear side signal measurement units, and specifically comprises the following steps:

and acquiring potential difference signals of the bioelectric signals acquired by the two ear side signal measurement units through a differential circuit, and acquiring the user bioelectric signals from the potential difference signals.

6. The method according to any one of claims 1 to 4, wherein the obtaining of the attention type of the user based on the machine learning model from the electroencephalogram of the user is specifically:

and calculating the value of the sample entropy of the electroencephalogram signal of the user, and analyzing the attention type of the user based on a machine learning model according to the value of the sample entropy.

7. The method according to any one of claims 1 to 6, wherein the detecting the attention type of the user based on the electroencephalogram signal of the user is specifically:

intercepting the user electroencephalogram signal with a preset time length, and obtaining N signal sampling points from the user electroencephalogram signal with the preset time length;

the N signal sampling points are, u (1), u (2),.., u (N); based on the N signal sampling points, sequentially intercepting m sampling points by taking u (1), u (2), … and u (N-m +1) as starting points respectively to construct N-m +1 m-dimensional vectors; for each m-dimensional vector in the N-m +1 m-dimensional vectors, calculating an average value of the number of vectors with the distance between the m-dimensional vector and each other vector being less than r, and calculating an average value of the obtained N-m +1 average values to obtain a first average value; based on the N signal sampling points, sequentially intercepting m +1 sampling points by taking u (1), u (2), … and u (N-m) as starting points respectively to construct N-m + 1-dimensional vectors; for each m + 1-dimensional vector in the N-m + 1-dimensional vectors, calculating the average value of the number of vectors with the distance between the m + 1-dimensional vector and each other vector being less than r, and calculating the average value of the obtained N-m average values to obtain a second average value; calculating a value of sample entropy (SampEn) based on a ratio of the first average to the second average.

8. The method of claim 6 or 7, wherein the machine learning model is an SVM classifier; and performing machine learning by adopting an SVM classifier to obtain a segmentation value, and judging the attention type of the user according to the segmentation value and the sample entropy value.

9. A user attention detection system, characterized in that the system comprises:

the ear side wearing device is used for acquiring a user bioelectricity signal from the ear side of the user; the device is used for acquiring a user electroencephalogram signal from the user bioelectricity signal;

attention detection means for detecting a type of attention of the user based on the user electrical brain signal;

wherein the ear-side wearable device for acquiring a user bioelectrical signal from the ear side of a user specifically comprises:

the ear-side wearing device comprises a plurality of ear-side signal measuring units; the ear side wearing device judges whether the impedance between two ear side signal measuring units is lower than a preset threshold value or not; when the impedance between the two ear side signal measuring units is lower than a preset threshold value, collecting bioelectric signals from the two ear side signal measuring units; and acquiring the bioelectrical signals of the user according to potential difference signals of the bioelectrical signals acquired by the two ear side signal measurement units.

10. The system of claim 9, wherein:

the plurality of ear side signal measuring units comprise a left ear side signal measuring unit and a right ear side signal measuring unit;

the ear side wearing device judges whether the impedance between two ear side signal measuring units is lower than a preset threshold value or not; when the impedance between the two ear side signal measuring units is lower than a preset threshold value, collecting bioelectric signals from the two ear side signal measuring units; acquiring the bioelectrical signals of the user according to potential difference signals of the bioelectrical signals acquired by the two ear side signal measurement units, specifically comprising the following steps:

the ear side wearing device judges whether the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value; when the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value; and acquiring the user bioelectrical signal according to the potential difference signal of the bioelectrical signal measured by the left ear side signal measuring unit and the bioelectrical signal measured by the right ear side signal measuring unit.

11. The system of claim 9, wherein:

the ear side wearing device is a single side ear side wearing device which comprises a plurality of single side ear side signal measuring units;

the ear side wearing device judges whether the impedance between two ear side signal measuring units is lower than a preset threshold value or not; when the impedance between the two ear side signal measuring units is lower than a preset threshold value, collecting bioelectric signals from the two ear side signal measuring units; acquiring the bioelectrical signals of the user according to potential difference signals of the bioelectrical signals acquired by the two ear side signal measurement units, specifically comprising the following steps:

the ear side wearing device judges whether the impedance between two single-side ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two single-side ear-side signal measurement units is lower than a preset threshold value; and acquiring the bioelectrical signal of the user according to the potential difference value signal of the bioelectrical signals acquired by the two unilateral ear side signal measurement units.

12. The system of claim 10,

the number of the left ear side signal measuring units is multiple;

the number of the right ear side signal measuring units is multiple;

when the impedance between one of the left ear side signal measuring units and one of the right ear side signal measuring units is higher than a preset threshold value;

the ear side wearing device judges whether the impedance between two of the left ear side signal measuring units is lower than a preset threshold value or not and whether the impedance between two of the right ear side signal measuring units is lower than a preset threshold value or not; and acquiring the bioelectrical signal of the user according to the potential difference value signal of the bioelectrical signals measured by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold value.

13. The system according to any one of claims 9 to 12, wherein the attention detection device obtains the attention type of the user based on a machine learning model according to the electroencephalogram of the user specifically:

the attention detection device calculates a value of sample entropy of the user electroencephalogram signal, and analyzes the attention type of the user based on a machine learning model according to the value of the sample entropy.

14. An ear-side worn device, the device comprising:

a plurality of ear-side signal measuring units for collecting user bioelectric signals from an ear side;

the first judgment unit is used for judging whether the impedance between two ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two ear side signal measurement units is lower than a preset threshold value; taking a potential difference signal of bioelectric signals acquired by the bioelectric signals measured by the two ear side signal measuring units as the user bioelectric signal;

the characteristic decomposition unit is used for obtaining an electroencephalogram signal from the user bioelectricity signal;

and the attention detection unit is used for obtaining the attention type of the user based on a machine learning model according to the electroencephalogram signal.

15. The apparatus of claim 14,

the plurality of ear side signal measuring units comprise a left ear side signal measuring unit and a right ear side signal measuring unit;

the first disconnection unit is used for judging whether the impedance between the left ear side signal measurement unit and the right ear side signal measurement unit is lower than a preset threshold value or not; when the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value; and acquiring the user bioelectrical signal according to the potential difference signal of the bioelectrical signal measured by the left ear side signal measuring unit and the bioelectrical signal measured by the right ear side signal measuring unit.

16. The apparatus of claim 14,

the ear side wearing device is a single side ear side wearing device;

the plurality of ear side signal measurement units comprises a plurality of single side ear side signal measurement units;

the first disconnection unit is used for judging whether the impedance between two ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two ear side signal measurement units is lower than a preset threshold value, taking a potential difference value signal of a bioelectric signal acquired by the bioelectric signal measured by the two ear side signal measurement units as the user bioelectric signal, specifically:

the first judging unit is used for judging whether the impedance between the two single-side ear side signal measuring units is lower than a preset threshold value or not, and when the impedance between the two single-side ear side signal measuring units is lower than the preset threshold value, the potential difference value signal of the bioelectricity signals collected by the two single-side ear side signal measuring units is used as the bioelectricity signal of the user.

17. The apparatus of claim 15,

the number of the left ear-side signal measuring units is multiple;

the number of the right ear-side signal measuring units is multiple;

the ear side wearing device further comprises a second judgment unit;

when the first judging unit judges that the impedance between one of the left ear side signal measuring units and one of the right ear side signal measuring units is higher than a preset threshold, the second judging unit respectively judges whether the impedance between two of the left ear side signal measuring units is lower than the preset threshold and whether the impedance between two of the right ear side signal measuring units is lower than the preset threshold; and taking a potential difference value signal of the bioelectrical signals collected by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold value as the bioelectrical signal of the user.

18. The apparatus according to any one of claims 14 to 17, wherein the attention detection unit obtains the attention type of the user based on a machine learning model from the electroencephalogram of the user specifically:

the attention detection unit calculates a value of sample entropy of the user electroencephalogram signal, and analyzes the attention type of the user based on a machine learning model according to the value of the sample entropy.

19. An ear-side worn device, the device comprising:

a plurality of ear-side signal measuring units for collecting user bioelectric signals from an ear side;

the first judgment unit is used for judging whether the impedance between two ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two ear side signal measurement units is lower than a preset threshold value; taking a potential difference signal of bioelectric signals acquired by the bioelectric signals measured by the two ear side signal measuring units as the user bioelectric signal;

the characteristic decomposition unit is used for obtaining an electroencephalogram signal from the user bioelectricity signal;

and the sending unit is used for sending the electroencephalogram signals to a signal analysis device.

20. The apparatus of claim 19,

the plurality of ear side signal measuring units comprise a left ear side signal measuring unit and a right ear side signal measuring unit;

the first disconnection unit is used for judging whether the impedance between the left ear side signal measurement unit and the right ear side signal measurement unit is lower than a preset threshold value or not; when the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value; and acquiring the user bioelectrical signal according to the potential difference signal of the bioelectrical signal measured by the left ear side signal measuring unit and the bioelectrical signal measured by the right ear side signal measuring unit.

21. The apparatus of claim 19,

the ear side wearing device is a single side ear side wearing device;

the plurality of ear side signal measurement units comprises a plurality of single side ear side signal measurement units;

the first disconnection unit is used for judging whether the impedance between two ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two ear side signal measurement units is lower than a preset threshold value, taking a potential difference value signal of a bioelectric signal acquired by the bioelectric signal measured by the two ear side signal measurement units as the user bioelectric signal, specifically:

the first judging unit is used for judging whether the impedance between the two single-side ear side signal measuring units is lower than a preset threshold value or not, and when the impedance between the two single-side ear side signal measuring units is lower than the preset threshold value, the potential difference value signal of the bioelectricity signals collected by the two single-side ear side signal measuring units is used as the bioelectricity signal of the user.

22. The apparatus of claim 20,

the number of the left ear-side signal measuring units is multiple;

the number of the right ear-side signal measuring units is multiple;

the ear side wearing device further comprises a second judgment unit;

when the first judging unit judges that the impedance between one of the left ear side signal measuring units and one of the right ear side signal measuring units is higher than a preset threshold, the second judging unit respectively judges whether the impedance between two of the left ear side signal measuring units is lower than the preset threshold and whether the impedance between two of the right ear side signal measuring units is lower than the preset threshold; and taking a potential difference value signal of the bioelectrical signals collected by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold value as the bioelectrical signal of the user.

23. An attention detection device, characterized in that the device comprises:

the receiving unit is used for receiving the electroencephalogram signals of the user from the ear side wearing device;

and the attention detection unit is used for obtaining the attention type of the user based on a machine learning model according to the electroencephalogram signal of the user.

24. The apparatus of claim 23, wherein the attention detection unit is specifically configured to calculate a value of sample entropy of the electroencephalogram signal of the user, and analyze the type of attention of the user based on a machine learning model according to the value of the sample entropy.

25. The apparatus according to claim 24, wherein the attention detection unit is specifically configured to intercept the user electroencephalogram signal of a preset time length, and obtain N signal sampling points from the user electroencephalogram signal of the preset time length;

the N signal sampling points are, u (1), u (2),.., u (N); based on the N signal sampling points, sequentially intercepting m sampling points by taking u (1), u (2), … and u (N-m +1) as starting points respectively to construct N-m +1 m-dimensional vectors; for each m-dimensional vector in the N-m +1 m-dimensional vectors, calculating an average value of the number of vectors with the distance between the m-dimensional vector and each other vector being less than r, and calculating an average value of the obtained N-m +1 average values to obtain a first average value; based on the N signal sampling points, sequentially intercepting m +1 sampling points by taking u (1), u (2), … and u (N-m) as starting points respectively to construct N-m + 1-dimensional vectors; for each m + 1-dimensional vector in the N-m + 1-dimensional vectors, calculating the average value of the number of vectors with the distance between the m + 1-dimensional vector and each other vector being less than r, and calculating the average value of the obtained N-m average values to obtain a second average value; calculating a value of sample entropy (SampEn) based on a ratio of the first average to the second average.

26. The apparatus of any of claims 23-25, wherein the machine learning model is an SVM classifier; performing machine learning by adopting an SVM classifier to obtain a segmentation value;

the attention detection unit judges the type of attention of the user according to the segmentation value and the sample entropy value.

Technical Field

The application relates to the field of data processing, in particular to a method and a system for detecting attention of a driver in safe driving and auxiliary driving processes.

Background

With the development of society and the popularization of automobiles, safe driving becomes one of important concerns for ensuring traffic safety, wherein the state of a driver is one of important factors influencing safe driving. Inattentive driving includes any driving activity that distracts the driver's attention, such as taking a car, eating, talking to passengers, adjusting entertainment or navigation systems, and making a call, as well as changes in the driver's mental state or awareness, such as momentarily approaching sleep due to fatigue, etc. Studies have shown that up to 30% of traffic accidents are caused by driver inattention. When a vehicle is traveling at a high speed, an accident inevitably occurs if a driver who is distracted cannot sufficiently recognize timely changes in conditions including a route, traffic, obstacles, and even the vehicle.

In the grades of L1 and L2 of automatic driving, since the driver is always responsible for the driving process and vehicle control, the vehicle system can accurately and timely detect and detect the state of the driver, and when the attention of the driver is not focused, the appropriate time is selected for auxiliary reminding, so that the system has a very important position for ensuring safe driving.

In the prior art, according to signals of a driver fixation point, a sight line, rest time, eye jump, a motion state of a surrounding object along a driving path and the like acquired by an automobile system, the driving attention type of the driver is judged through an intelligent computer system. Due to the complexity and diversity of the driving environment, deviation with certain probability exists in the driving attention state of the driver obtained through intelligent calculation, and safe driving is influenced.

In recent years, with the great development of brain wave signal acquisition and analysis technology, a vehicle system accurately judges the driving attention type of a driver by acquiring Electroencephalogram and Electroencephalogram (EEG) signals of the driver, realizes accurate and timely detection and detection of the state of the driver, performs auxiliary reminding on the driving behavior of the driver, and provides another effective technology realization choice for ensuring safe driving.

However, how to more conveniently and accurately acquire the electroencephalogram signal of the driver, and how to accurately determine the state of the driver through the electroencephalogram signal becomes a research focus in safe driving.

Disclosure of Invention

The embodiment of the application provides an attention detection method and system, which can be applied to the attention detection of a driver, and can acquire electroencephalogram signals through ear sides, so that the acquisition of the electroencephalogram signals in the driving process is more convenient and feasible, the measurement cost is reduced, and meanwhile, the accuracy of the acquisition of the electroencephalogram signals can be ensured.

In a first aspect, an embodiment of the present application provides a method for detecting attention of a user, where the method includes: acquiring a user bioelectrical signal from the ear side of the user by wearing the device on the ear side; acquiring a user electroencephalogram signal from the user bioelectrical signal; obtaining the attention type of the user based on a machine learning model according to the electroencephalogram signal of the user; wherein wear the device through the ear side, gather user's bioelectricity signal specifically including from user's ear side: the ear-side wearing device comprises a plurality of ear-side signal measuring units; judging whether the impedance between two ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two ear side signal measuring units is lower than a preset threshold value, collecting bioelectric signals from the two ear side signal measuring units; and acquiring the bioelectrical signals of the user according to potential difference signals of the bioelectrical signals acquired by the two ear side signal measurement units.

According to the method, the electroencephalogram signals are acquired through the ear side, the method is more convenient and faster, the ear side wearing device is convenient to carry and is arranged on the ear side, the device is not easy to fall off in the wearing process, the electroencephalogram signals of a user can be measured more conveniently and more feasible in the driving process, meanwhile, the collected bioelectricity signals of the user are processed in a potential difference processing mode aiming at the characteristics of the bioelectricity signals collected on the ear side, noise in the electroencephalogram signals can be effectively removed, the reason that the user may not be worn correctly is considered, or one side equipment fails or the condition that the signals are not received well is considered, the collected bioelectricity signals need to be judged before the potential difference processing is carried out, and the problem that the results are inaccurate due to the fact that the ear side wearing device still carries out signal collection and.

In certain implementations of the first aspect, the plurality of ear side signal measurement units includes a left ear side signal measurement unit and a right ear side signal measurement unit; judging whether the impedance between two ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two ear side signal measuring units is lower than a preset threshold value, collecting bioelectric signals from the two ear side signal measuring units; acquiring the bioelectrical signals of the user according to potential difference signals of the bioelectrical signals acquired by the two ear side signal measurement units, specifically comprising the following steps:

judging whether the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value or not; when the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value; and acquiring the user bioelectrical signal according to the potential difference signal of the bioelectrical signal measured by the left ear side signal measuring unit and the bioelectrical signal measured by the right ear side signal measuring unit.

That is, the ear-side wearing device may acquire bioelectric signals from both the left and right ears, and acquire a bioelectric signal of the user from the bioelectric signals acquired from the left and right ears when it is determined that wearing is normal.

In certain implementations of the first aspect, the ear-worn device is a single-sided ear-worn device, and the plurality of ear-side signal measurement units includes a plurality of single-sided ear-side signal measurement units; judging whether the impedance between two ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two ear side signal measuring units is lower than a preset threshold value, collecting bioelectric signals from the two ear side signal measuring units; acquiring the bioelectrical signals of the user according to potential difference signals of the bioelectrical signals acquired by the two ear side signal measurement units, specifically comprising the following steps:

judging whether the impedance between two single-side ear-side signal measurement units is lower than a preset threshold value or not; when the impedance between the two single-side ear-side signal measurement units is lower than a preset threshold value; and acquiring the bioelectrical signal of the user according to the potential difference value signal of the bioelectrical signals acquired by the two unilateral ear side signal measurement units.

According to the mode, the ear side wearing device can be a single ear wearing device, and whether the single ear is worn normally or not is judged directly according to the impedance between the two measuring units.

In certain implementations of the first aspect, the left-ear side signal measuring unit is plural; the number of the right ear side signal measuring units is multiple; when the impedance between one of the left ear side signal measuring units and one of the right ear side signal measuring units is higher than a preset threshold value; respectively judging whether the impedance between two of the left ear side signal measurement units is lower than a preset threshold value and whether the impedance between two of the right ear side signal measurement units is lower than the preset threshold value; and acquiring the bioelectrical signal of the user according to the potential difference value signal of the bioelectrical signals measured by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold value.

According to the mode, if only one ear canal can acquire the electroencephalogram signal, whether one ear canal is worn normally or not can be continuously judged, and if one ear canal is worn normally, the bioelectricity signal of the user can still be acquired correctly under the embodiment.

In some implementation manners of the first aspect, the obtaining the user bioelectrical signal according to a potential difference signal of the bioelectrical signals acquired by the two ear side signal measurement units specifically includes: and acquiring potential difference signals of the bioelectric signals acquired by the two ear side signal measurement units through a differential circuit, and acquiring the user bioelectric signals from the potential difference signals.

In some implementation manners of the first aspect, the obtaining, according to the user electroencephalogram signal, the attention type of the user based on a machine learning model specifically includes: and calculating the value of the sample entropy of the electroencephalogram signal of the user, and analyzing the attention type of the user based on a machine learning model according to the value of the sample entropy.

In some implementations of the first aspect, the detecting the attention type of the user based on the user electroencephalogram signal is specifically: intercepting the user electroencephalogram signal with a preset time length, and obtaining N signal sampling points from the user electroencephalogram signal with the preset time length; the N signal sampling points are, u (1), u (2),.., u (N); based on the N signal sampling points, sequentially intercepting m sampling points by taking u (1), u (2), … and u (N-m +1) as starting points respectively to construct N-m +1 m-dimensional vectors; for each m-dimensional vector in the N-m +1 m-dimensional vectors, calculating an average value of the number of vectors with the distance between the m-dimensional vector and each other vector being less than r, and calculating an average value of the obtained N-m +1 average values to obtain a first average value; based on the N signal sampling points, sequentially intercepting m +1 sampling points by taking u (1), u (2), … and u (N-m) as starting points respectively to construct N-m + 1-dimensional vectors; for each m + 1-dimensional vector in the N-m + 1-dimensional vectors, calculating the average value of the number of vectors with the distance between the m + 1-dimensional vector and each other vector being less than r, and calculating the average value of the obtained N-m average values to obtain a second average value; calculating a value of sample entropy (SampEn) based on a ratio of the first average to the second average.

In certain implementations of the first aspect, the machine learning model is an SVM classifier; and performing machine learning by adopting an SVM classifier to obtain a segmentation value, and judging the attention type of the user according to the segmentation value and the sample entropy value.

Through the method, the attention type of the user is obtained through the machine learning model according to the value of the sample entropy, the sample entropy characteristics of the electroencephalogram signals under different attention types can be analyzed more accurately through the machine learning mode, and therefore the attention type of the user retaining wall is determined based on the sample entropy value of the acquired electroencephalogram signals.

In a second aspect, an embodiment of the present invention provides a user attention detection system, where the system includes: the ear side wearing device is used for acquiring a user bioelectricity signal from the ear side of the user; the device is used for acquiring a user electroencephalogram signal from the user bioelectricity signal; attention detection means for detecting a type of attention of the user based on the user electrical brain signal; wherein the ear-side wearable device for acquiring a user bioelectrical signal from the ear side of a user specifically comprises: the ear-side wearing device comprises a plurality of ear-side signal measuring units; the ear side wearing device judges whether the impedance between two ear side signal measuring units is lower than a preset threshold value or not; when the impedance between the two ear side signal measuring units is lower than a preset threshold value, collecting bioelectric signals from the two ear side signal measuring units; and acquiring the bioelectrical signals of the user according to potential difference signals of the bioelectrical signals acquired by the two ear side signal measurement units.

In certain implementations of the second aspect, the plurality of ear side signal measurement units includes a left ear side signal measurement unit and a right ear side signal measurement unit; the ear side wearing device judges whether the impedance between two ear side signal measuring units is lower than a preset threshold value or not; when the impedance between the two ear side signal measuring units is lower than a preset threshold value, collecting bioelectric signals from the two ear side signal measuring units; acquiring the bioelectrical signals of the user according to potential difference signals of the bioelectrical signals acquired by the two ear side signal measurement units, specifically comprising the following steps: the ear side wearing device judges whether the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value; when the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value; and acquiring the user bioelectrical signal according to the potential difference signal of the bioelectrical signal measured by the left ear side signal measuring unit and the bioelectrical signal measured by the right ear side signal measuring unit.

In certain implementations of the second aspect, the ear-worn device is a single-sided ear-worn device that includes a plurality of single-sided ear-worn signal measurement units; the ear side wearing device judges whether the impedance between two ear side signal measuring units is lower than a preset threshold value or not; when the impedance between the two ear side signal measuring units is lower than a preset threshold value, collecting bioelectric signals from the two ear side signal measuring units; acquiring the bioelectrical signals of the user according to potential difference signals of the bioelectrical signals acquired by the two ear side signal measurement units, specifically comprising the following steps: the ear side wearing device judges whether the impedance between two single-side ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two single-side ear-side signal measurement units is lower than a preset threshold value; and acquiring the bioelectrical signal of the user according to the potential difference value signal of the bioelectrical signals acquired by the two unilateral ear side signal measurement units.

In certain implementations of the second aspect, the left-ear side signal measuring unit is plural; the number of the right ear side signal measuring units is multiple; when the impedance between one of the left ear side signal measuring units and one of the right ear side signal measuring units is higher than a preset threshold value; the ear side wearing device judges whether the impedance between two of the left ear side signal measuring units is lower than a preset threshold value or not and whether the impedance between two of the right ear side signal measuring units is lower than a preset threshold value or not; and acquiring the bioelectrical signal of the user according to the potential difference value signal of the bioelectrical signals measured by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold value.

In some implementations of the second aspect, the obtaining, by the attention detection device, the type of attention of the user based on a machine learning model according to the electroencephalogram of the user is specifically: the attention detection device calculates a value of sample entropy of the user electroencephalogram signal, and analyzes the attention type of the user based on a machine learning model according to the value of the sample entropy.

In a third aspect, an embodiment of the present invention provides an ear-side worn device, including: a plurality of ear-side signal measuring units for collecting user bioelectric signals from an ear side; the first judgment unit is used for judging whether the impedance between two ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two ear side signal measurement units is lower than a preset threshold value; taking a potential difference signal of bioelectric signals acquired by the bioelectric signals measured by the two ear side signal measuring units as the user bioelectric signal; the characteristic decomposition unit is used for obtaining an electroencephalogram signal from the user bioelectricity signal; and the attention detection unit is used for obtaining the attention type of the user based on a machine learning model according to the electroencephalogram signal.

In certain implementations of the third aspect, the plurality of ear side signal measurement units includes a left ear side signal measurement unit and a right ear side signal measurement unit; the first disconnection unit is used for judging whether the impedance between the left ear side signal measurement unit and the right ear side signal measurement unit is lower than a preset threshold value or not; when the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value; and acquiring the user bioelectrical signal according to the potential difference signal of the bioelectrical signal measured by the left ear side signal measuring unit and the bioelectrical signal measured by the right ear side signal measuring unit.

In certain implementations of the third aspect, the ear-worn device is a single-sided ear-worn device; the plurality of ear side signal measurement units comprises a plurality of single side ear side signal measurement units; the first disconnection unit is used for judging whether the impedance between two ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two ear side signal measurement units is lower than a preset threshold value, taking a potential difference value signal of a bioelectric signal acquired by the bioelectric signal measured by the two ear side signal measurement units as the user bioelectric signal, specifically: the first judging unit is used for judging whether the impedance between the two single-side ear side signal measuring units is lower than a preset threshold value or not, and when the impedance between the two single-side ear side signal measuring units is lower than the preset threshold value, the potential difference value signal of the bioelectricity signals collected by the two single-side ear side signal measuring units is used as the bioelectricity signal of the user.

In certain implementations of the third aspect, the left ear-to-ear signal measurement unit is plural; the number of the right ear-side signal measuring units is multiple; the ear side wearing device further comprises a second judgment unit; when the first judging unit judges that the impedance between one of the left ear side signal measuring units and one of the right ear side signal measuring units is higher than a preset threshold, the second judging unit respectively judges whether the impedance between two of the left ear side signal measuring units is lower than the preset threshold and whether the impedance between two of the right ear side signal measuring units is lower than the preset threshold; and taking a potential difference value signal of the bioelectrical signals collected by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold value as the bioelectrical signal of the user.

In some implementation manners of the third aspect, the obtaining, by the attention detection unit, the type of attention of the user based on a machine learning model according to the electroencephalogram of the user is specifically: the attention detection unit calculates a value of sample entropy of the user electroencephalogram signal, and analyzes the attention type of the user based on a machine learning model according to the value of the sample entropy.

In a fourth aspect, an embodiment of the present invention provides an ear-side wearable device, where the device includes: a plurality of ear-side signal measuring units for collecting user bioelectric signals from an ear side; the first judgment unit is used for judging whether the impedance between two ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two ear side signal measurement units is lower than a preset threshold value; taking a potential difference signal of bioelectric signals acquired by the bioelectric signals measured by the two ear side signal measuring units as the user bioelectric signal; the characteristic decomposition unit is used for obtaining an electroencephalogram signal from the user bioelectricity signal; and the sending unit is used for sending the electroencephalogram signals to a signal analysis device.

In certain implementations of the fourth aspect, the plurality of ear side signal measurement units includes a left ear side signal measurement unit and a right ear side signal measurement unit; the first disconnection unit is used for judging whether the impedance between the left ear side signal measurement unit and the right ear side signal measurement unit is lower than a preset threshold value or not; when the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value; and acquiring the user bioelectrical signal according to the potential difference signal of the bioelectrical signal measured by the left ear side signal measuring unit and the bioelectrical signal measured by the right ear side signal measuring unit.

In certain implementations of the fourth aspect, the ear-worn device is a one-sided ear-worn device; the plurality of ear side signal measurement units comprises a plurality of single side ear side signal measurement units; the first disconnection unit is used for judging whether the impedance between two ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two ear side signal measurement units is lower than a preset threshold value, taking a potential difference value signal of a bioelectric signal acquired by the bioelectric signal measured by the two ear side signal measurement units as the user bioelectric signal, specifically: the first judging unit is used for judging whether the impedance between the two single-side ear side signal measuring units is lower than a preset threshold value or not, and when the impedance between the two single-side ear side signal measuring units is lower than the preset threshold value, the potential difference value signal of the bioelectricity signals collected by the two single-side ear side signal measuring units is used as the bioelectricity signal of the user.

In certain implementations of the fourth aspect, the left ear-to-ear signal measurement unit is plural; the number of the right ear-side signal measuring units is multiple; the ear side wearing device further comprises a second judgment unit; when the first judging unit judges that the impedance between one of the left ear side signal measuring units and one of the right ear side signal measuring units is higher than a preset threshold, the second judging unit respectively judges whether the impedance between two of the left ear side signal measuring units is lower than the preset threshold and whether the impedance between two of the right ear side signal measuring units is lower than the preset threshold; and taking a potential difference value signal of the bioelectrical signals collected by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold value as the bioelectrical signal of the user.

In a fifth aspect, an embodiment of the present invention provides an attention detection apparatus, including: the receiving unit is used for receiving the electroencephalogram signals of the user from the ear side wearing device; and the attention detection unit is used for obtaining the attention type of the user based on a machine learning model according to the electroencephalogram signal of the user.

In certain implementations of the fifth aspect, the attention detection unit is specifically configured to calculate a value of sample entropy of the electroencephalogram signal of the user, and analyze the type of attention of the user based on a machine learning model according to the value of the sample entropy.

In some implementations of the fifth aspect, the attention detection unit is specifically configured to intercept the user electroencephalogram signal of a preset time length, and obtain N signal sampling points from the user electroencephalogram signal of the preset time length; the N signal sampling points are, u (1), u (2),.., u (N); based on the N signal sampling points, sequentially intercepting m sampling points by taking u (1), u (2), … and u (N-m +1) as starting points respectively to construct N-m +1 m-dimensional vectors; for each m-dimensional vector in the N-m +1 m-dimensional vectors, calculating an average value of the number of vectors with the distance between the m-dimensional vector and each other vector being less than r, and calculating an average value of the obtained N-m +1 average values to obtain a first average value; based on the N signal sampling points, sequentially intercepting m +1 sampling points by taking u (1), u (2), … and u (N-m) as starting points respectively to construct N-m + 1-dimensional vectors; for each m + 1-dimensional vector in the N-m + 1-dimensional vectors, calculating the average value of the number of vectors with the distance between the m + 1-dimensional vector and each other vector being less than r, and calculating the average value of the obtained N-m average values to obtain a second average value; calculating a value of sample entropy (SampEn) based on a ratio of the first average to the second average.

In certain implementations of the fifth aspect, the machine learning model is an SVM classifier; performing machine learning by adopting an SVM classifier to obtain a segmentation value; the attention detection unit judges the type of attention of the user according to the segmentation value and the sample entropy value.

In a sixth aspect, embodiments of the present invention provide an ear-side worn device, the device comprising: a plurality of ear-side signal measuring units for collecting user bioelectric signals from an ear side; the processor is used for judging whether the impedance between the two ear side signal measuring units is lower than a preset threshold value or not; when the impedance between the two ear side signal measurement units is lower than a preset threshold value; taking a potential difference signal of bioelectric signals acquired by the bioelectric signals measured by the two ear side signal measuring units as the user bioelectric signal; the characteristic decomposition unit is used for obtaining an electroencephalogram signal from the user bioelectricity signal; and the attention detection unit is used for obtaining the attention type of the user based on a machine learning model according to the electroencephalogram signal.

In certain implementations of the sixth aspect, the plurality of ear side signal measurement units includes a left ear side signal measurement unit and a right ear side signal measurement unit; the processor is used for judging whether the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value or not; when the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value; and acquiring the user bioelectrical signal according to the potential difference signal of the bioelectrical signal measured by the left ear side signal measuring unit and the bioelectrical signal measured by the right ear side signal measuring unit.

In certain implementations of the sixth aspect, the ear-worn device is a one-sided ear-worn device; the plurality of ear side signal measurement units comprises a plurality of single side ear side signal measurement units; the processor is used for judging whether the impedance between the two ear side signal measuring units is lower than a preset threshold value or not; when the impedance between the two ear side signal measurement units is lower than a preset threshold value, taking a potential difference value signal of a bioelectric signal acquired by the bioelectric signal measured by the two ear side signal measurement units as the user bioelectric signal, specifically: the processor is used for judging whether the impedance between the two unilateral ear side signal measurement units is lower than a preset threshold value or not, and when the impedance between the two unilateral ear side signal measurement units is lower than the preset threshold value, the potential difference value signal of the bioelectricity signals collected by the two unilateral ear side signal measurement units is used as the bioelectricity signal of the user.

In certain implementations of the sixth aspect, the left ear-to-ear signal measurement unit is plural; the number of the right ear-side signal measuring units is multiple; the processor is further configured to, when the first determining unit determines that the impedance between one of the left ear-side signal measuring units and one of the right ear-side signal measuring units is higher than a preset threshold, respectively determine whether the impedance between two of the left ear-side signal measuring units is lower than the preset threshold, and whether the impedance between two of the right ear-side signal measuring units is lower than the preset threshold; and taking a potential difference value signal of the bioelectrical signals collected by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold value as the bioelectrical signal of the user.

In some implementation manners of the sixth aspect, the obtaining, by the attention detection unit, the type of attention of the user based on a machine learning model according to the electroencephalogram of the user is specifically: the attention detection unit calculates a value of sample entropy of the user electroencephalogram signal, and analyzes the attention type of the user based on a machine learning model according to the value of the sample entropy.

In a seventh aspect, an embodiment of the present invention provides an ear-side wearable device, where the device includes: a plurality of ear-side signal measuring units for collecting user bioelectric signals from an ear side; the processor is used for judging whether the impedance between the two ear side signal measuring units is lower than a preset threshold value or not; when the impedance between the two ear side signal measurement units is lower than a preset threshold value; taking a potential difference signal of bioelectric signals acquired by the bioelectric signals measured by the two ear side signal measuring units as the user bioelectric signal; the characteristic decomposition unit is used for obtaining an electroencephalogram signal from the user bioelectricity signal; and the sending unit is used for sending the electroencephalogram signals to a signal analysis device.

In certain implementations of the seventh aspect, the plurality of ear side signal measurement units includes a left ear side signal measurement unit and a right ear side signal measurement unit; the processor is used for judging whether the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value or not; when the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value; and acquiring the user bioelectrical signal according to the potential difference signal of the bioelectrical signal measured by the left ear side signal measuring unit and the bioelectrical signal measured by the right ear side signal measuring unit.

In certain implementations of the seventh aspect, the ear-worn device is a single-sided ear-worn device; the plurality of ear side signal measurement units comprises a plurality of single side ear side signal measurement units; the processor is used for judging whether the impedance between the two ear side signal measuring units is lower than a preset threshold value or not; when the impedance between the two ear side signal measurement units is lower than a preset threshold value, taking a potential difference value signal of a bioelectric signal acquired by the bioelectric signal measured by the two ear side signal measurement units as the user bioelectric signal, specifically: the processor judges whether the impedance between the two single-side ear-side signal measurement units is lower than a preset threshold value or not, and when the impedance between the two single-side ear-side signal measurement units is lower than the preset threshold value, the potential difference value signal of the bioelectricity signals collected by the two single-side ear-side signal measurement units is used as the bioelectricity signal of the user.

In certain implementations of the seventh aspect, the left ear-to-ear signal measurement unit is plural; the number of the right ear-side signal measuring units is multiple; the processor is further configured to, when the first determining unit determines that the impedance between one of the left ear-side signal measuring units and one of the right ear-side signal measuring units is higher than a preset threshold, respectively determine whether the impedance between two of the left ear-side signal measuring units is lower than the preset threshold, and whether the impedance between two of the right ear-side signal measuring units is lower than the preset threshold; and taking a potential difference value signal of the bioelectrical signals collected by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold value as the bioelectrical signal of the user.

In an eighth aspect, an embodiment of the present invention provides an attention detection apparatus, including: the receiving unit is used for receiving the electroencephalogram signals of the user from the ear side wearing device; and the processor is used for obtaining the attention type of the user based on a machine learning model according to the electroencephalogram signals of the user.

In certain implementations of the eighth aspect, the processor is specifically configured to calculate a value of sample entropy of the electroencephalogram signal of the user, and analyze the type of attention of the user based on a machine learning model according to the value of the sample entropy.

In some implementations of the eighth aspect, the processor is specifically configured to intercept the user electroencephalogram signal with a preset time length, and obtain N signal sampling points from the user electroencephalogram signal with the preset time length; the N signal sampling points are, u (1), u (2),.., u (N); based on the N signal sampling points, sequentially intercepting m sampling points by taking u (1), u (2), … and u (N-m +1) as starting points respectively to construct N-m +1 m-dimensional vectors; for each m-dimensional vector in the N-m +1 m-dimensional vectors, calculating an average value of the number of vectors with the distance between the m-dimensional vector and each other vector being less than r, and calculating an average value of the obtained N-m +1 average values to obtain a first average value; based on the N signal sampling points, sequentially intercepting m +1 sampling points by taking u (1), u (2), … and u (N-m) as starting points respectively to construct N-m + 1-dimensional vectors; for each m + 1-dimensional vector in the N-m + 1-dimensional vectors, calculating the average value of the number of vectors with the distance between the m + 1-dimensional vector and each other vector being less than r, and calculating the average value of the obtained N-m average values to obtain a second average value; calculating a value of sample entropy (SampEn) based on a ratio of the first average to the second average.

In certain implementations of the eighth aspect, the machine learning model is an SVM classifier; performing machine learning by adopting an SVM classifier to obtain a segmentation value; the attention detection unit judges the type of attention of the user according to the segmentation value and the sample entropy value.

In a ninth aspect, an embodiment of the present invention provides an electroencephalogram signal detection method, including acquiring a user bioelectric signal from an ear side by a plurality of ear side signal measurement units; judging whether the impedance between two ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two ear side signal measurement units is lower than a preset threshold value; taking a potential difference signal of bioelectric signals acquired by the bioelectric signals measured by the two ear side signal measuring units as the user bioelectric signal; obtaining an electroencephalogram signal from the user bioelectric signal; and sending the electroencephalogram signals to a signal analysis device.

In certain implementations of the ninth aspect, the plurality of ear side signal measurement units includes a left ear side signal measurement unit and a right ear side signal measurement unit; the judging step is specifically to judge whether the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value; when the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value; and acquiring the user bioelectrical signal according to the potential difference signal of the bioelectrical signal measured by the left ear side signal measuring unit and the bioelectrical signal measured by the right ear side signal measuring unit.

In certain implementations of the ninth aspect, the ear-worn device is a one-sided ear-worn device; the plurality of ear side signal measurement units comprises a plurality of single side ear side signal measurement units; the determining step is specifically to determine whether impedance between two of the single-side ear-side signal measuring units is lower than a preset threshold, and when the impedance between the two single-side ear-side signal measuring units is lower than the preset threshold, a potential difference signal of the bioelectric signals acquired by the two single-side ear-side signal measuring units is used as the user bioelectric signal.

In certain implementations of the ninth aspect, the left ear-to-ear signal measurement unit is plural; the number of the right ear-side signal measuring units is multiple; when the first judging unit judges that the impedance between one of the left ear side signal measuring units and one of the right ear side signal measuring units is higher than a preset threshold value, respectively judging whether the impedance between two of the left ear side signal measuring units is lower than the preset threshold value and whether the impedance between two of the right ear side signal measuring units is lower than the preset threshold value; and taking a potential difference value signal of the bioelectrical signals collected by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold value as the bioelectrical signal of the user.

In a tenth aspect, an embodiment of the present invention provides an attention detection method, where the method includes: receiving a user electroencephalogram signal from an ear-side worn device; and obtaining the attention type of the user based on a machine learning model according to the electroencephalogram signal of the user.

In some implementation manners of the tenth aspect, obtaining the attention type of the user based on the machine learning model according to the electroencephalogram signal of the user specifically includes calculating a value of a sample entropy of the electroencephalogram signal of the user, and analyzing the attention type of the user based on the machine learning model according to the value of the sample entropy.

In some implementation manners of the tenth aspect, calculating the sample entropy of the user electroencephalogram signal specifically includes intercepting the user electroencephalogram signal of a preset time length, and obtaining N signal sampling points from the user electroencephalogram signal of the preset time length; the N signal sampling points are, u (1), u (2),.., u (N); based on the N signal sampling points, sequentially intercepting m sampling points by taking u (1), u (2), … and u (N-m +1) as starting points respectively to construct N-m +1 m-dimensional vectors; for each m-dimensional vector in the N-m +1 m-dimensional vectors, calculating an average value of the number of vectors with the distance between the m-dimensional vector and each other vector being less than r, and calculating an average value of the obtained N-m +1 average values to obtain a first average value; based on the N signal sampling points, sequentially intercepting m +1 sampling points by taking u (1), u (2), … and u (N-m) as starting points respectively to construct N-m + 1-dimensional vectors; for each m + 1-dimensional vector in the N-m + 1-dimensional vectors, calculating the average value of the number of vectors with the distance between the m + 1-dimensional vector and each other vector being less than r, and calculating the average value of the obtained N-m average values to obtain a second average value; calculating a value of sample entropy (SampEn) based on a ratio of the first average to the second average.

In certain implementations of the tenth aspect, the machine learning model is an SVM classifier; performing machine learning by adopting an SVM classifier to obtain a segmentation value; the attention detection unit judges the type of attention of the user according to the segmentation value and the sample entropy value.

In certain implementations of the above aspects, the ear-side worn device is an earbud or an earpiece.

In some implementations of the above aspect, the type of attention of the user may specifically be that the state of attention of the user is focused or distracted.

In certain implementations of the above aspect, the plurality of ear-side signal measurement units is two or more.

In some implementations of the above aspect, the determining whether the impedance between two of the ear-side signal measurement units is lower than a preset threshold may be selecting two ear-side signal measurement units from a plurality of ear-side signal measurement units based on a preset setting, or selecting two ear-side signal measurement units for comparison based on a set order of priorities, and in a case that the impedance is lower than the preset threshold all the time, the comparison may be terminated by comparing a preset number of times, or the comparison may be terminated after all the cases are traversed.

In some implementations of the above aspect, the determining whether the impedance between the left ear-side signal measurement unit and the right ear-side signal measurement unit is lower than a preset threshold may be that both the left ear-side signal measurement unit and the right ear-side signal measurement unit are used, and the comparison is directly performed; the left ear side signal measuring unit and the right ear side signal measuring unit may be multiple, two of the left ear side signal measuring unit and the right ear side signal measuring unit are respectively selected based on preset setting, or two of the ear side signal measuring units are selected based on a setting sequence of priority to be compared, and when impedance is always lower than a preset threshold value, the comparison may be terminated by comparing preset times, or the comparison may be terminated after all conditions are traversed.

In some implementations of the above aspect, the determining whether the impedance between the single-side ear-side signal measurement units is lower than a preset threshold may be that there are two single-side ear-side signal measurement units, and the comparison is directly performed; two of the single-side ear-side signal measuring units may be selected based on a preset setting, or two ear-side signal measuring units may be selected based on a priority setting order for comparison, and when the impedance is always lower than a preset threshold, the comparison may be terminated by comparing a preset number of times, or the comparison may be terminated after traversing all cases.

In some implementations of the above aspect, when it is determined that the impedance between one of the left ear-side signal measurement units and one of the right ear-side signal measurement units is higher than a preset threshold, it is determined whether the impedance between two of the left ear-side signal measurement units is lower than the preset threshold, and whether the impedance between two of the right ear-side signal measurement units is lower than the preset threshold, where the impedance may be two of the left ear-side signal measurement unit and the impedance between the two of the right ear-side signal measurement units, and the comparison is directly performed; two of the left and right ear-side signal measuring units may be selected based on a predetermined setting; or for the left ear side signal measurement units, selecting two left ear side signal measurement units for comparison based on the set sequence of priority, and under the condition that the impedance is always lower than a preset threshold value, comparing for a preset number of times to terminate the comparison, or terminating the comparison after traversing all the conditions; for the right ear side signal measuring units, two right ear side signal measuring units are selected for comparison based on the set sequence of the priority, and the comparison can be terminated by comparing preset times or terminating the comparison after traversing all the conditions under the condition that the impedance is always lower than a preset threshold value.

It can be seen that, implement the technical scheme of this application embodiment, can solve current technical attention and judge inconveniently to and judge the easy unsafe problem of attention result in the mobile state, gather driver EEG signal through the ear for user EEG signal's collection is convenient feasible more, simultaneously because the requirement of electrode laminating degree, this scheme can judge whether wear at present normally, and guarantee to carry out the collection and subsequent analysis of signal under the normal circumstances of gathering, guarantees the accuracy of testing result. Meanwhile, the electroencephalogram signals collected by the left ear canal and the right ear canal are processed in a potential difference processing mode, the accuracy of the collected electroencephalogram signals can be guaranteed, the sample entropy calculation is carried out on the collected and processed electroencephalogram signals, the consistency state of the electroencephalogram signals on the time domain is obtained, the attention is judged through an SVM classification algorithm, the current driving attention type of a driver can be accurately judged, and the method can be used for accurately giving follow-up operation in the driving process, such as reminding the driver or taking corresponding emergency operation.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present application, the drawings required to be used in the embodiments or the background art of the present application will be described below.

Fig. 1 shows a schematic diagram of an application scenario in an embodiment of the present application;

FIG. 2a is a schematic flowchart illustrating a method for detecting attention of a user according to an embodiment of the present application;

fig. 2b shows a schematic flow chart of detecting whether the ear-side wearing device is worn normally in the user electroencephalogram signal acquisition process provided by the embodiment of the application;

fig. 2c is a schematic flow chart illustrating a process of detecting whether a single-side ear-side wearing device is worn normally in a user electroencephalogram signal acquisition process according to an embodiment of the present application;

FIG. 3 shows a schematic diagram of alpha, beta, gamma, theta, delta brain waveforms produced by the brain;

FIG. 4 is a flowchart illustrating a method for detecting attention of a user according to an embodiment of the present application;

FIG. 5 shows a differential circuit implementation manner in a user electroencephalogram signal acquisition method provided by an embodiment of the present application;

fig. 6 shows a schematic diagram of differential processing of left and right ear electroencephalograms in an attention detection method provided by an embodiment of the present application;

fig. 7 shows a schematic diagram of difference processing of left and right ear electroencephalograms in an attention detection method provided by an embodiment of the present application;

figure 8a shows neck joint action producing myoelectrical artefacts;

figure 8b shows ocular artefacts resulting from blinking;

FIG. 9a shows a schematic diagram of SVM classification;

FIG. 9b shows a schematic diagram of SVM classification;

FIG. 10 is a schematic diagram illustrating a system architecture for attention detection provided by an embodiment of the present application;

FIG. 11a is a schematic diagram of an ear-side worn device according to an embodiment of the present application;

FIG. 11b is a schematic diagram of another ear-side worn device according to an embodiment of the present application;

FIG. 11c is a schematic diagram of another ear-side worn device according to an embodiment of the present application;

FIG. 11d is a schematic diagram of another ear-side worn device according to an embodiment of the present application;

FIG. 12 is a schematic diagram illustrating an implementation of an ear-worn device according to an embodiment of the present application;

fig. 13 is a schematic view showing a wearing position of an ear-side wearing device according to an embodiment of the present application;

fig. 14 is a schematic structural diagram illustrating an attention detection device according to an embodiment of the present application;

FIG. 15a is a schematic diagram of an ear-side worn device according to an embodiment of the present application;

fig. 15b is a schematic structural diagram of an attention analysis device provided in an embodiment of the present application;

fig. 16 is a flowchart illustrating a method for measuring a user-related signal according to an embodiment of the present application;

fig. 17 shows a flowchart of an attention detection method provided in an embodiment of the present application.

Detailed Description

Specific implementations of the present application are described below by way of example with reference to the accompanying drawings in the embodiments of the present application. Implementations of the present application may also include combining these embodiments, such as with other embodiments and making structural changes, without departing from the spirit or scope of the present application. The following detailed description of the embodiments is, therefore, not to be taken in a limiting sense. The terminology used in the examples section of this application is for the purpose of describing particular embodiments of the application only and is not intended to be limiting of the application.

One or more structural components of functions, modules, features, units, etc. mentioned in the specific embodiments of the present application may be understood as being implemented in any way by any physical or tangible component (e.g., software running on a computer device, hardware (e.g., a processor or chip implemented logical function), etc.), and/or any other combination. In some embodiments, the illustrated separation of various devices in the figures into different modules or units may reflect the use of corresponding different physical and tangible components in an actual implementation. Alternatively, a single module in the drawings of the embodiments of the present application may be implemented by a plurality of actual physical components. Likewise, any two or more of the modules depicted in the drawings may also reflect different functions performed by a single actual physical component.

With regard to the method flow diagrams of embodiments of the present application, certain operations are described as different steps performed in a certain order. Such flow diagrams are illustrative and not restrictive. Certain steps described herein may be grouped together and performed in a single operation, may be divided into multiple sub-steps, and may be performed in an order different than that shown herein. The various steps shown in the flowcharts may be implemented in any way by any circuit structure and/or tangible mechanism (e.g., by software running on a computer device, hardware (e.g., logical functions implemented by a processor or chip), etc., and/or any combination thereof).

The following description may identify one or more features as "optional". This type of statement should not be construed as an exhaustive indication of features that may be considered optional; that is, other features may be considered optional, although not explicitly identified in the text. Moreover, any description of a single entity is not intended to exclude the use of a plurality of such entities; similarly, the description of multiple entities is not intended to preclude the use of a single entity. Finally, the term "exemplary" refers to one implementation among potentially many implementations.

The embodiment of the application is mainly used for detecting the attention of the user, and particularly can be applied to detecting the attention of the driver in the driving process and judging whether the attention of the driver is concentrated or not, so that instant prompt can be performed according to the judgment result, and the embodiment of the application can also be applied to other scenes in which the attention of the user needs to be detected.

Fig. 1 is a typical application scenario of an embodiment of the present invention, in which an ear-side wearing device 101 (specifically, an earphone or an earplug) is worn on an ear of a user, collects a driver bioelectric signal from the ear side, and sends the driver bioelectric signal to a user attention detecting device 102, where the operation of the ear-side wearing device 101 may optionally further include collecting the ear-side bioelectric signal by an ear-side signal measuring unit, and obtaining a potential difference of the bioelectric signal collected by the measuring unit, so as to enhance a signal and simultaneously eliminate interference of an external disturbing signal; and performing artifact removal processing, filtering non-electroencephalogram frequency signals (for example, filtering waveforms larger than 32 Hz) through a filter circuit, extracting waveform characteristics by using wavelet analysis, and performing subsequent digital coding. The attention detection device 102 (which may be a handheld terminal, such as a mobile phone, a PDA, a pad, or a vehicle-mounted terminal device) analyzes the electroencephalogram of the user. When the attention distraction is found, corresponding follow-up operations are carried out, if the driver is reminded through an alarm device in time, driving safety is ensured, wherein the attention analysis mode can be calculation of the sample entropy value of the electroencephalogram signal, classification of the sample entropy is carried out through an SVN algorithm, and the attention state is determined.

Meanwhile, in order to ensure that the ear side wearing device 101 can collect accurate bioelectricity signals, the ear side wearing device 101 can also perform pre-judgment on whether the ear side wearing device can normally collect signals, and judge whether the ear side signal measuring unit is attached to the skin according to impedance values between the ear side signal measuring units, so that different signal collection strategies are selected according to different conditions.

The ear side in the embodiment of the present invention refers to a region on and near the ear of a human body where a bioelectrical signal can be measured, such as the inner side of the ear canal, the auricle, the auricular sulcus, the back of the ear, and the periphery of the ear. Bioelectric signals are acquired by disposing an ear-side signal measuring unit on a human ear region and in the vicinity of the human ear.

Fig. 13 shows an exemplary wearing, i.e., signal acquisition mode of the ear-worn device according to the embodiment of the present invention, and an exemplary signal acquisition mode for acquiring a bioelectric signal from the inner side of the ear canal. Where 401 is a human ear canal, 403 is an ear-side signal measuring unit, 402 is a main body of the ear-side worn device, and 404 is a pinna of a user.

Fig. 2a is a schematic flow chart of a method for acquiring a user electroencephalogram signal provided in an embodiment of the present application, where the specific flow chart includes:

s101: acquiring a user bioelectrical signal from an ear side of a user by an ear side wearing device;

specifically include, wear the ear side and wear the device after, the electroencephalogram signal acquisition function of opening equipment wears the device through the ear side and gathers user's electroencephalogram signal from the ear side. The wearing manner has been described above, and is not described herein again, and the manner of turning on the device may be multiple, where an entity button on the earphone is pressed, or the device is triggered (for example, a virtual button in the APP is touched to start driving) by a corresponding APP on the user attention detection device (which may be a mobile phone or a vehicle-mounted terminal, etc.), so that the ear-side wearing device enters a working state.

Because the ear side wearing device may appear, drop, or not wear correctly in the wearing process, directly acquire the signal collected by the ear side wearing device for processing, there may be a problem that the measurement result is inaccurate because the device drops, or does not wear correctly, so that the attention type of the user cannot be correctly analyzed, and therefore the embodiment of the application judges the wearing condition of the ear side wearing device, and determines whether to collect data according to the judgment result, or whether to use the collected data for analyzing the attention type of the user.

The ear wearing device comprises a plurality of ear signal measuring units; judging whether the impedance between two ear side signal measurement units is lower than a preset threshold value or not; when the impedance between the two ear side signal measurement units is lower than a preset threshold value; and taking the potential difference value signal of the bioelectrical signals measured by the two ear side signal measuring units as the user bioelectrical signal.

The ear-side wearable device is a bilateral ear canal measurement device, that is, the ear-side wearable device includes a left ear-side signal measurement unit and a right ear-side signal measurement unit, and the acquisition mode of acquiring the bioelectrical signal from the ear side can be further as shown in fig. 2b, and includes:

s201: whether the ear side wearing device can normally measure or not is judged by judging whether the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value or not.

And judging whether the impedance between the left ear-side signal measuring unit and the right ear-side signal measuring unit is lower than a preset threshold value or not so as to judge whether the ear-side wearing device can normally carry out measurement (namely normal wearing).

Specifically, the left ear-side signal measuring unit and the right ear-side signal measuring unit may be one or more, and the left/right ear-side signal measuring unit may be in the form of an electrode in the implementation process, and the bioelectrical signal of the user on the ear side is measured by the electrode. Whether the left ear side signal measuring unit and the right ear side signal measuring unit of the ear side wearing device are attached to the auditory canal or not is judged by judging the impedance value between the left ear side signal measuring unit and the right ear side signal measuring unit, namely whether the ear side wearing device is worn correctly or not is judged. When the left and right ear side signal measuring units are attached to the auditory canal, the impedance value between the left and right ear side signal measuring units is lower, usually lower than the ear side surface impedance value, and when the left and right ear side signal measuring units have one side or both sides not attached to the auditory canal, the impedance value between the left and right ear side signal measuring units is higher, usually higher than the ear side surface impedance value. Therefore, a preset threshold value can be set for determining the wearing condition of the ear-side wearing device, and alternatively, the preset impedance determination threshold value can be the impedance value of the ear-side surface.

When the left ear-side signal measuring unit and the right ear-side signal measuring unit are one, the impedance value between the two measuring units is directly obtained for judgment.

When there are a plurality of left-ear-side signal measurement units and right-ear-side signal measurement units, there may be a plurality of measurement strategies. If one left ear side signal measuring unit and one right ear side signal measuring unit are selected arbitrarily to obtain the impedance value, the impedance value between the left ear side signal measuring unit at the preset position and the right ear side signal measuring unit at the preset position can be obtained, only the impedance value is obtained once, and whether the left ear and the right ear are worn normally or not is judged according to the obtained impedance value. Or the priority order can be set to carry out measurement matched one by one, the measurement and judgment are terminated after the measurement is carried out for a preset number of times under the condition that the preset threshold value is not met, or the measurement is carried out one by one until the impedance lower than the preset value is measured, which indicates that the ear side wearing device can normally measure, otherwise, the ear side wearing device cannot normally work. The specific measurement method in the case of multiple measurement units is not limited herein.

S202: when the ear side wearing device is judged to be capable of normally measuring, the bioelectricity signals of the user are obtained according to the bioelectricity signals collected by the left ear side signal measuring unit and the bioelectricity signals collected by the right ear side signal measuring unit.

When the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value, the user bioelectric signal is obtained according to the potential difference value signal of the bioelectric signal collected by the left ear side signal measuring unit and the bioelectric signal collected by the right ear side signal measuring unit.

Specifically, when the ear-side signal measurement unit is one of the left and right ear-side signal measurement units, it is determined that the ear-side wearing device can normally perform measurement when the impedance measured between the left ear-side signal measurement unit and the right ear-side signal measurement unit is lower than a preset threshold value; and acquiring the user bioelectricity signal according to the potential difference value signal of the bioelectricity signal acquired by the left ear side signal measurement unit and the bioelectricity signal acquired by the right ear side signal measurement unit.

The specific manner of acquiring the user bioelectric signal according to the potential difference signal between the bioelectric signal acquired by the left ear-side signal measurement unit and the bioelectric signal acquired by the right ear-side signal measurement unit may include directly acquiring the user bioelectric signal from the bioelectric signal acquired by the left ear-side signal measurement unit and the potential difference signal between the bioelectric signals acquired by the right ear-side signal measurement unit; the ear side wearing device can be further provided with a reference electrode, the bioelectricity signal acquired by the left ear side signal measuring unit and the first potential difference signal of the reference electrode are acquired, the bioelectricity signal acquired by the right ear side signal measuring unit and the second potential difference signal of the reference electrode are acquired, and then the difference signal of the first potential difference signal and the second potential difference signal is acquired.

Under the condition that the ear side signal measuring unit is multiple and the measuring times can be multiple, when the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is measured to be lower than a preset threshold value, the auditory canals corresponding to the two measured measuring units can be normally measured. And taking the potential difference value signal of the bioelectricity signal collected by the left ear side signal measuring unit and the bioelectricity signal collected by the right ear side signal measuring unit which are judged to be capable of normally measuring after measurement as the user bioelectricity signal.

Under the condition that the ear side signal measuring units are multiple and the measuring times are once, when the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is lower than a preset threshold value, the auditory canals corresponding to the two measured measuring units can be judged to be normally measured. And after measurement, the potential difference signal of the bioelectricity signal collected by the left ear side signal measurement unit and the potential difference signal of the bioelectricity signal collected by the right ear side signal measurement unit which are judged to be capable of normally measuring are used as the user bioelectricity signal, or the potential difference signal of the bioelectricity signal collected by the ear side wearing device can be selected as the user bioelectricity signal based on the measurement result, and any one of the left ear side signal measurement unit and the right ear side signal measurement unit is selected, or the left ear side signal measurement unit and the right ear side signal measurement unit which are specified in advance are used for obtaining the potential difference signal of the bioelectricity signal as the user bioelectricity signal.

And further when the ear side wearing device is judged to be incapable of normally measuring, the steps of signal acquisition and attention detection can be selected to be omitted.

Alternatively, when it is determined that the ear-side worn device is not normally worn, it may be further determined that there is normal wear on the left side or the right side, respectively, and thus, optionally, step S50103 may be included.

S203: and when the judgment result is that the ear side wearing device can not normally carry out measurement, respectively judging whether the impedance between two of the left ear side signal measurement units is lower than a preset threshold value and whether the impedance between two of the right ear side signal measurement units is lower than the preset threshold value. And taking a potential difference value signal of the bioelectrical signals collected by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold value as the bioelectrical signal of the user.

In this step, the left-ear-side signal measurement unit and the right-ear-side signal measurement unit need to be plural.

Under the condition that the ear side signal measuring units are multiple and the measuring times can be multiple, when the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is measured for multiple times and is higher than a preset threshold value, it is judged that at least one ear canal corresponding to the two measured measuring units cannot be normally measured.

Under the condition that the ear side signal measuring units are multiple and the measuring times are one time, when the impedance between the left ear side signal measuring unit and the right ear side signal measuring unit is measured to be higher than a preset threshold value, it is judged that at least one ear canal corresponding to the two measured measuring units cannot be normally measured. That is, when the impedance between one of the left ear-side signal measuring units and one of the right ear-side signal measuring units is higher than the preset threshold, it is determined that at least one of the ear canals corresponding to the two measured measuring units cannot normally perform measurement.

After at least one ear canal corresponding to the two measured measuring units cannot be measured normally, whether the impedance between two of the left ear side signal measuring units is lower than a preset threshold value or not and whether the impedance between two of the right ear side signal measuring units is lower than the preset threshold value or not are respectively judged. There are also a number of measurement strategies possible. If two left/right ear side signal measurement units are selected arbitrarily to obtain the impedance value, the impedance value between the two left/right ear side signal measurement units at the preset position can be obtained, the impedance value is obtained only once, and whether the left/right ear wearing is normal or not is judged according to the obtained impedance value. Or the priority order can be set to carry out measurement between two left/right ear side signal measurement units, the measurement and judgment are terminated after a preset number of times of measurement is carried out under the condition that a preset threshold value is not met, or the measurement is carried out in pairs until the impedance lower than the preset value is measured, the ear side wearing device can normally measure, otherwise, when the impedance lower than the preset value is not measured in all the conditions, the ear side wearing device cannot normally measure. The same sample application does not limit the specific measurement method under the condition of single-side multi-measurement unit.

Taking potential difference signals of bioelectrical signals acquired by two bioelectrical measuring devices of the auditory canal at one side with impedance lower than the preset threshold as the bioelectrical signals of the user:

the potential difference signal between the bioelectric signal collected by the left ear-side signal measuring unit and the bioelectric signal collected by the right ear-side signal measuring unit, which is determined to be normally measurable after measurement, may be used as the user bioelectric signal.

The specific mode of taking the potential difference signal of the bioelectric signal acquired by the left ear-side signal measuring unit and the bioelectric signal acquired by the right ear-side signal measuring unit, which are determined to be capable of normally performing measurement after measurement, as the bioelectric signal of the user may include directly obtaining the bioelectric signal of the user from the potential difference signal of the bioelectric signals acquired by the two ear-side signal measuring units capable of normally measuring one side; the ear side wearing device can be further provided with a reference electrode, the bioelectricity signal acquired by one ear side signal measurement unit and the third potential difference signal of the reference electrode are acquired, the bioelectricity signal acquired by the other ear side signal measurement unit and the fourth potential difference signal of the reference electrode are acquired, and then the difference signal of the third potential difference signal and the fourth potential difference signal is acquired.

The ear side signal measurement unit can be selected for various transmissions, for example, two measurement units for impedance value judgment are directly selected to obtain a potential difference signal, or the measurement units are selected according to preset settings, or the measurement units are selected randomly.

The manner of acquiring the potential difference signal in the present application may be specifically realized by software instructions, or may be realized by a hardware circuit.

In this embodiment, the left ear side signal measuring unit or the right ear side signal measuring unit needs to be plural, that is, the single side ear side signal measuring unit needs to be plural. The acquisition mode of acquiring the bioelectrical signal from the ear side can also be as shown in fig. 2c, and further includes:

s211: and judging whether the ear side wearing device can normally measure or not by judging whether the impedance between two signal measurement units in the single-side ear side signal measurement unit is lower than a preset threshold value or not.

And judging whether the impedance between two signal measurement units in the single-side ear-side signal measurement unit is lower than a preset threshold value or not so as to judge whether the ear-side wearing device can normally carry out measurement (namely normal wearing).

Specifically, there may be a plurality of measurement strategies, such as arbitrarily selecting two unilateral ear-side signal measurement units to obtain an impedance value, or obtaining an impedance value between two unilateral ear-side signal measurement units at a preset position, obtaining the impedance value only once, and determining whether the unilateral ear canal is worn normally according to the obtained impedance value. Judging whether the impedance between two single-side ear-side signal measurement units is lower than a preset threshold value or not; if the value is lower than the threshold value, the wearing is judged to be normal.

Or the priority order can be set to carry out measurement between two single-side ear-side signal measurement units, the measurement and judgment are terminated after a preset number of times of measurement is carried out under the condition that a preset threshold value is not met, or the measurement is carried out in pairs until the impedance lower than the preset value is measured, the ear-side wearing device can normally measure, otherwise, when all the conditions are traversed, the impedance lower than the preset value is not measured, and the ear-side wearing device cannot normally measure. The present application also does not limit the specific measurement method in the case of a single-sided multi-measurement unit.

S212: and when the ear side wearing device is judged to be capable of normally measuring, taking potential difference value signals of the bioelectricity signals collected by two of the single-side ear side signal measurement units as the bioelectricity signals of the user.

When the single ear-side signal measuring unit is multiple and the number of times of measurement can be multiple, the ear-side wearing device is judged to be capable of normally measuring when the impedance between the two single-side ear-side signal measuring units is measured to be lower than a preset threshold value. And taking the potential difference value signal of the bioelectrical signals collected by the two single-side ear-side signal measurement units which are judged to be capable of normally measuring after measurement as the user bioelectrical signal.

The specific mode of taking the potential difference signal of the bioelectric signal acquired by the two single-side ear-side signal measurement units which are judged to be capable of normally performing measurement after measurement as the bioelectric signal of the user may include directly acquiring the potential difference signal of the bioelectric signal acquired by the two single-side ear-side signal measurement units which are capable of normally measuring the bioelectric signal of the user; the ear wearing device may further include a reference electrode for acquiring the bioelectrical signal acquired by the one ear signal measuring unit and a fifth potential difference signal of the reference electrode, and acquiring the bioelectrical signal acquired by the other ear signal measuring unit and a sixth potential difference signal of the reference electrode, respectively, and then acquiring a difference signal between the fifth potential difference signal and the sixth potential difference signal.

Under the condition that the number of the single-side ear-side signal measuring units is multiple and the number of the measuring times is one, when the impedance between the single-side ear-side signal measuring units is measured to be lower than a preset threshold value, the auditory canals corresponding to the two measured measuring units can be judged to be capable of normally measuring. And after measurement, the potential difference signal of the bioelectrical signals collected by the two single-side ear-side signal measurement units which are judged to be capable of normally measuring is used as the user bioelectrical signal, or the ear-side wearing device is considered to be capable of normally measuring based on the measurement result, and any two single-side ear canal measurement units are selected, or two pre-specified single-side ear canal measurement units are used for obtaining the potential difference signal of the collected bioelectrical signals to be used as the user bioelectrical signal.

The processing for finding the potential difference mentioned in the above embodiment may specifically be to perform differential processing on the acquired bioelectric signals, because it is difficult to acquire electroencephalogram signals from the ear side, especially the ear canal, and the acquired electroencephalogram signals are relatively weak in strength, and may have a large influence on subsequent judgment of the signals when disturbed by noise, so in order to ensure the implementability of acquiring the bioelectric signals from the ear side and the accuracy of subsequent conclusions about the user attention analysis, targeted denoising processing needs to be performed on the bioelectric signals acquired from the ear canal, and the differential circuit may remove noise in the acquired bioelectric signals. The ear side wearing device belongs to an electronic product, in the operation process, although the circuit is subjected to electromagnetic shielding design, the ear side wearing device can be influenced by electric signals on the circuit board and electromagnetic waves in the air under a certain special scene, so that waveform distortion is caused, electrodes are attached to two ears by adopting a differential technology, signals are collected from the two auditory canals, and the correctness of the signals is ensured.

The specific schematic diagram is shown in fig. 6, and is a signal receiving circuit model on two ear canals, when external noise is on the line, interference is eliminated through a differential circuit, so as to facilitate subsequent extraction of correct waveforms, where 601 is a left ear canal bioelectric signal, 602 is a right ear canal bioelectric signal, 603 is a noise signal, 601a is a left ear canal bioelectric signal doped with noise, 602a is a right ear canal bioelectric signal doped with noise, and 604 is a bioelectric signal obtained after differential processing, that is, a first bioelectric signal. Fig. 6 is an example of only one case, and the bioelectric signal may be 601 and 602, respectively, of the right ear canal and the left ear canal.

In the current differential circuit design, the differential circuit is generally directly implemented by using a chip, and the circuit implemented by the embodiment of the invention is shown in fig. 5, wherein 501 and 502 are inputs of bioelectric signals collected by left and right ear canals, and 503 is a first bioelectric signal output after differential processing by the differential circuit. The waveform is shown in FIG. 7, where V + is the bioelectric signal of the left ear canal, V-is the bioelectric signal of the right ear canal, and (V +) - (V-) is the bioelectric signal after differential processing. Similarly, FIG. 7 is merely an example of one case, and V + may be a right ear canal bioelectric signal and V-may be a left ear canal bioelectric signal.

For the bioelectric signal of the user obtained in S101 in fig. 2a, the electroencephalogram signal can be extracted according to the specific application requirements.

S102: acquiring an electroencephalogram signal of a user from the bioelectrical signal of the user;

the bioelectric signals include one or more of various characteristic signals of the human body, such as ECG signals, EOG signals, EMG signals and EEG signals. There are various methods for extracting different types of biological characteristic signals by performing characteristic decomposition, extraction can be performed according to different frequency spectrums of different types of signals, components of a plurality of biological characteristic signals are obtained by performing Independent Component Analysis (ICA) decomposition by using a blind signal source separation algorithm, and electroencephalogram signals are extracted by the method.

Except for extracting the brain electrical signals. And the electroencephalogram signals can be selectively processed in a certain conventional way. The processing can comprise one or more of conventional bioelectric signal processing operations such as artifact removal, wavelet analysis, digital coding and the like, and is used for obtaining an electroencephalogram signal which can reflect the electroencephalogram characteristics of the user more accurately and truly. Or the electroencephalogram signal may be subjected to other denoising processing and digital conversion, which is not limited herein. The processing mode and the action of various processing operations are as follows:

removing artifacts: in the human body, there are many places where electrical phenomena occur, the most common is nerve conduction, one neuron receives stimulation and then transmits bioelectricity to the next neuron, the electrical phenomena occur all the time along with the survival of human beings, and each tiny expression of human beings is closely related to the conduction of nerve current. Not only nerve cells are the same, but also organs in a human body can generate bioelectricity signals with different degrees and different strengths, however, other bioelectricity signals are also mixed in the measurement of electroencephalogram, and because the initial electroencephalogram original signals cannot be completely extracted, different bioelectricity from the human body are basically mixed, and the influence is more or less. Besides, human expression and limb movement can also greatly affect the electroencephalogram signals, such as heartbeat, muscle movement, blink movement, deep breathing, skin perspiration and the like. Meanwhile, the difference of the temperature can also make the noise bioelectric signals change in strength and weakness in different degrees, and if the environmental temperature is low, the noise bioelectric signals can cause cold tremor and shaking of a few people, and the action amplitudes are large, so that interference can be caused to electroencephalogram. Fig. 8a shows myoelectric artifacts due to neck joint movement and fig. 8b shows ocular artifacts due to blinking. The artifacts are mixed with the useful electroencephalogram signals, which increases the difficulty of data processing, so that the artifacts in the electroencephalogram signals need to be removed after the electroencephalogram signals are acquired. Wavelet analysis: the electroencephalogram signal is an unsteady signal, the traditional Fourier transform cannot extract details (only frequency information can be extracted, and time information cannot be extracted), the wavelet transform is a signal analysis method, the time characteristic of the signal can be well reflected on a frequency domain, and the local characteristic of the signal can be well represented through wavelet analysis.

Digital coding: the electroencephalogram signals are digitally encoded and converted into digital signals.

The artifact removing processing can be carried out on the bioelectricity signals or the afterbrain signals of the feature extraction.

The acquired electroencephalogram signals can be used for analyzing and judging the attention of the user, and the step S103 can be executed on the extracted electroencephalogram signals of the user.

S103: and obtaining the attention type of the user based on a machine learning model according to the electroencephalogram signal of the user. The method specifically comprises the following steps:

the attention type of the user is analyzed according to the acquired electroencephalogram signals, and the common processing mode is to extract attention characteristics of the acquired electroencephalogram signals. Electroencephalogram signals, i.e., electroencephalogram egg (electroencephalogram) signals, are external manifestations of brain activities, and different brain activities are represented as electroencephalogram signals with different characteristics. Research shows that the state of a human can be clearly detected through the detected electroencephalogram signals.

In normal human activities, α, β, γ, θ, and δ wave bands are generated, and the waveform is as shown in fig. 3.

Delta wave: the frequency is distributed between 1Hz and 4Hz, the wave amplitude is between 20uv and 200uv, the performance of the Ding industry and pituitary is obvious in the period of infants or the period of immature intelligence development, and the slow wave belongs to the same theta wave. Normally, the delta wave is present only in states of extreme lack of oxygen, deep sleep, or presence of brain lesions.

θ wave: the frequency distribution is between 4Hz and 7Hz, the amplitude is between 20uf and 40uf, the slow wave belongs to slow waves, mainly appears in the occipital part and the top occipital part, is symmetrical on the left side and the right side, can be generally detected when a person is sleepy or sleepy, and has common connection with the psychological state of the person. This wave occurs with the central nerve in a state of depression, usually at a depressed mood, frustration, or drowsiness.

Alpha wave: the frequency distribution is between 8Hz and 12Hz, the amplitude is between 25uf and 75uf, and occurs primarily in the occipital region, and bilateral substantial synchrony is maintained, which is what normal human EEG has. The wave-modifying effect is more obvious when the individual is in thinking and resting state, and when the individual has targeted activity, opens eyes or receives other stimulation, the wave disappears and the beta wave replaces the beta wave.

Beta wave: the frequency is distributed between 14Hz and 30Hz, the wave amplitude is about half of delta wave, the wave frequency is mainly appeared in the forehead and the central area, the wave frequency is obviously represented by the hyperexcitability of cerebral cortex, and the individual can appear in the waking state and the sleeping period.

Therefore, the current attention state of the user, whether the user is awake or asleep, and whether the user is attentive or inattentive can be judged by analyzing the waveform characteristics of the acquired brain electrical signals.

In the embodiment of the present application, the step S103 can be further divided as shown in fig. 4:

s1031: sample entropy is obtained based on the brain electrical signal.

The acquisition process for acquiring the sample entropy based on the electroencephalogram signal comprises the following steps:

a: intercepting the electroencephalogram signal with a preset time length, and obtaining N signal sampling points, u (1), u (2),. and u (N), from the electroencephalogram signal with the preset time length.

Usually, the sampling points are sampling points with equal time intervals, and the preset time length intercepted in the sampling points is selectable.

B: based on the N signal sampling points, sequentially intercepting m sampling points by taking u (1), u (2), … and u (N-m +1) as starting points respectively to construct N-m +1 m-dimensional vectors;

the constructed N-m +1 m-dimensional vectors are X (1), X (2),.. times, X (N-m +1), where X (i) ═ u (i), u (i +1),.. times, u (i + m-1) ], 1 ≦ i ≦ N-m + 1; m < N;

c: and aiming at each m-dimensional vector in the N-m +1 vectors, calculating the average value of the number of the vectors with the distance between the m-dimensional vector and each other vector being less than r, and calculating the average value of the obtained N-m +1 average values to obtain a first average value.

For each m-dimensional vector in the N-m +1 vectors, counting the number of vectors meeting the following conditions:

Bi(r)=(number of X(j)such that d[X(i),X(j)]r is less than or equal to r)/(N-m), i is not equal to j, and the value range of i is [1, N-m + 1%]J has a value in the range of [1, N-m +1 ] except for i]And r is a preset value, for example, the value of r can be related to the value of the standard deviation δ of the sampling point, and the value can be between 0.1 δ and 0.3 δ. Wherein,d[X(i),X(j)]Is defined as d [ X (i), X (j)]Max | u (a) -u ≠ j; u (a) is an element of vector X (i), u X (a) is an element of corresponding dimension of vector X (j), d represents a distance between vector X (i) and X (j), and the distance between vector X (i) and X (j) is determined by the maximum difference in the difference between corresponding elements, e.g. X (1) ═ 2, 3, 4, 6],X(2)=[4,5,7,10]The maximum difference of the corresponding elements is |6-10| ═ 4, so d [ X (1), X (2)]4. Calculating the average value of Bi (r) to all the values of i, namely Bm (r)

D: based on the N signal sampling points, sequentially intercepting m +1 sampling points by taking u (1), u (2), … and u (N-m) as starting points respectively to construct N-m + 1-dimensional vectors;

the constructed N-m + 1-dimensional vectors are Y (1), Y (2),.. and Y (N-m), wherein x (i) ([ u (i)), u (i +1),.. and u (i + m) ], and 1 ≦ i ≦ N-m; m < N;

e: and aiming at each m + 1-dimensional vector in the N-m vectors, calculating the average value of the number of the vectors with the distance between the m + 1-dimensional vector and each other vector being less than r, and calculating the average value of the obtained N-m average values to obtain a second average value.

For each m + 1-dimensional vector in the N-m vectors, counting the number of vectors meeting the following conditions:

Ai(r)=(number of Y(j)such that d[Y(i),Y(j)]r is less than or equal to)/(N-m-1), i is not equal to j, and the value range of i is [1, N-m]J has a value in the range of [1, N-m ] except for i]And r is a preset value, for example, the value of r can be related to the value of the standard deviation δ of the sampling point, and the value can be between 0.1 δ and 0.3 δ. Wherein d [ Y (i), Y (j)]Is defined as d [ Y (i), Y (j)]Max | u (a) -u ≠ j; u (a) is the element of vector Y, d represents the distance between vector Y (i) and Y (j), and is determined by the maximum difference of the corresponding elements. Calculating the average value of ai (r) to all the values of i, namely am (r)

F: a value of sample entropy (SampEn) is calculated based on a ratio of the first average to the second average.

SampEn=lim(N→∞){-ln[Am(r)/Bm(r)]}。

Where the order of a-F is not fixed, such as B, C and D, E are not implemented in a fixed sequential order, D, E may be implemented before B, C, simultaneously, or partially overlapping in time.

S1032: and judging the attention state of the user based on the value of the sample entropy obtained by the acquired electroencephalogram signal.

And judging the attention condition of the user according to the obtained sample entropy. For example, the user or the product developer may set one or more preset values according to historical experience, such as a segmentation value for distinguishing whether the user is awake or asleep, and a segmentation value for distinguishing whether the user is attentive or distractive. For example, for a division value for distinguishing whether attention is focused or distracted, a division value equal to or greater than this indicates concentration, and a division value equal to or less than this indicates distraction. The size and number of the segmentation values are determined according to the number of the attention states to be distinguished and the type of the attention states.

In addition, a segmentation value can also be obtained by an SVM classifier in a mode of training a machine learning model, and the attention type of the user is judged according to the segmentation value and the sample entropy value.

The model training mode is to adopt a plurality of electroencephalogram signal samples with different attention types and a certain time length, calculate and acquire a sample entropy value of the electroencephalogram signal sample, and train the SVM model through the sample entropy value and a sample constructed by the corresponding attention type. And then using the trained model for subsequent attention analysis, namely inputting the sample entropy of the corresponding electroencephalogram signal and outputting the corresponding attention type or the probability of the attention type.

The SVM is a discriminant classifier defined by a classification hyperplane, and by giving a group of training samples with labels, an algorithm outputs an optimal hyperplane to classify new samples (test samples). Fig. 9a and 9b are schematic diagrams of an optimal hyperplane acquisition, where dots and squares represent two different types of data, and for a linear separable set of two-dimensional coordinate points, if a parting line can be found as far as possible from both types of sample points, the optimal hyperplane in the two-dimensional coordinate space is considered, i.e., the solid line in fig. 9 b. The purpose of SVM machine learning is to find a hyperplane, and the distance between two types of data and the nearest training sample is maximized. I.e. optimal segmentation hyperplane maximization training sample boundary.

Through an SVM machine learning mode, after a plurality of sample entropy values and corresponding attention states are input, the SVM classifier outputs one or more segmentation values for judging the attention states corresponding to the sample entropies of the electroencephalogram signals of the user. The segmentation value may be one or more, such as a segmentation value for distinguishing between concentration and distraction, or a segmentation value for distinguishing between waking and sleeping. For example, for a division value for distinguishing whether attention is focused or distracted, a division value equal to or greater than this indicates concentration, and a division value equal to or less than this indicates distraction. The sample entropy analysis method can obtain a steady estimated value only by short data, and is an attention analysis method with better anti-noise and anti-interference capabilities.

Fig. 10 is a diagram of an exemplary attention detection system in accordance with an embodiment of the present invention. The method comprises the following steps:

wherein the ear side wearing means 11000 for collecting user bioelectric signals from the ear side; obtaining an electroencephalogram signal from the user bioelectric signal;

the ear-side wearing device 11000 can be specifically classified as single-side or double-side measurement, wherein the ear-side wearing device 11000 is a single-side measurement structure as shown in fig. 11a, and the single-side ear-side signal measuring unit 1011 is used for acquiring a user bioelectric signal from a left ear canal or a right ear canal.

The ear-side wearing device 11000 is a bilateral measurement device, the structure of which is shown in fig. 11b, wherein the left ear-side signal measuring unit 101a is used for obtaining the bioelectric signal of the user from the left ear canal, and the right ear-side signal measuring unit 101b is used for obtaining the bioelectric signal of the user from the right ear canal.

Corresponding to the ear wearing device 11000 for bilateral measurement, that is, the ear wearing device includes a left ear and ear side signal measuring unit 101a and a right ear and ear side signal measuring unit 101b, the ear wearing device 11000 judges whether the ear wearing device can normally perform measurement by judging whether the impedance between the left ear and ear side signal measuring unit 101a and the right ear and ear side signal measuring unit 101b is lower than a preset threshold, when the ear wearing device can normally perform measurement, acquires the user bioelectric signal according to the bioelectric signal collected by the left ear and ear side signal measuring unit and the potential difference signal of the bioelectric signal collected by the right ear and ear side signal measuring unit, and when the judgment result is that the ear wearing device cannot normally perform measurement, respectively judges whether the impedance between two of the left ear and ear side signal measuring units is lower than the preset threshold, and whether an impedance between two of the plurality of right ear-side signal measurement units is below a preset threshold. And acquiring the bioelectrical signal of the user according to a potential difference value signal of the bioelectrical signals acquired by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold. The specific determination method may be as in steps S201-S6203.

In this embodiment, the left ear-side signal measuring unit or the right ear-side signal measuring unit needs to be plural, that is, the single-side ear-side signal measuring unit needs to be plural. The ear side wearing device 11000 judges whether the ear side wearing device can normally perform measurement by judging whether the impedance between two signal measurement units in the single side ear side signal measurement unit is lower than a preset threshold value, and when the ear side wearing device is judged to normally perform measurement, acquires the user bioelectricity signal according to a potential difference value signal of the bioelectricity signals acquired by two of the plurality of single side ear side signal measurement units. The specific judgment method refers to steps S211 to S212. The attention detection device 1200 detects the type of attention of the user according to the electroencephalogram signal.

Details of the ear wearing device 11000 for acquiring the electroencephalogram signal are described in detail in S101 and S102 of fig. 2, and details of the technique for detecting the attention of the user by the attention detecting device 1200 are also described in S102 of fig. 2 and in fig. 4, which are not described herein again.

Fig. 11c is a block diagram of an exemplary ear-side wearable device 11000 with attention detection capability according to an embodiment of the present invention, and in some embodiments of the present invention, the attention detection device and the ear-side wearable device may be integrated together, as shown in fig. 11, corresponding to an ear-side wearable device 1100 with attention detection function integrated according to an embodiment of the present application. The device comprises:

an ear side signal measuring unit 111 for a user bioelectric signal collected from the ear side. Alternatively, the ear-side signal measuring unit 111 may include a left ear-side signal measuring unit 111a and a right ear-side signal measuring unit 111 b. When the ear-side worn device 1100 is a one-sided measuring device, the ear-side signal measuring unit 111 may include only the one-sided ear-side signal measuring unit 111 c.

And the characteristic decomposition unit 112 is used for extracting an electroencephalogram signal from the user bioelectricity signal.

An attention detection unit 113 for obtaining an attention classification result of the user based on a machine learning model from the electroencephalogram signal. The specific analysis method may refer to the above specific embodiments, and will not be described herein again.

A first judging unit 114 for judging whether the impedance between two of the ear-side signal measuring units is lower than a preset threshold; when the impedance between the two ear side signal measurement units is lower than a preset threshold value; and taking a potential difference value signal of the bioelectrical signals collected by the bioelectrical signals measured by the two ear side signal measuring units as the user bioelectrical signal.

The ear side wearing device may further optionally comprise a second determination unit corresponding to a bilateral measurement situation.

A first disconnection unit 114, configured to determine whether an impedance between the left ear-side signal measurement unit and the right ear-side signal measurement unit is lower than a preset threshold (the specific determination method is described above, and is not described here again); when the impedance between the left ear-side signal measuring unit and the right ear-side signal measuring unit is lower than a preset threshold value; and taking the potential difference value signal of the bioelectricity signal collected by the left ear-side signal measuring unit and the bioelectricity signal collected by the right ear-side signal measuring unit as the user bioelectricity signal.

A second determining unit 115, configured to, when the first determining unit 114 determines that the ear-side wearable device cannot normally measure (the specific determination method has been described above, and is not described herein again), respectively determine whether the impedance between two of the left ear-side signal measuring units is lower than a preset threshold, and whether the impedance between two of the right ear-side signal measuring units is lower than a preset threshold by the second determining unit 115; and taking a potential difference value signal of the bioelectrical signals collected by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold value as the bioelectrical signal of the user. The second determining unit 115 is an optional unit, and the second determining unit 115 is applied to the left-ear-side signal measuring unit and the right-ear-side signal measuring unit.

Corresponding to the one-sided measurement, the ear-side wearable device includes a first determining unit 114, configured to determine whether impedance between two of the one-sided ear-side signal measuring units is lower than a preset threshold (the specific determining manner is described above, and is not described here again), and when the impedance between the two one-sided ear-side signal measuring units is lower than the preset threshold, the potential difference signal of the bioelectrical signals collected by two of the plurality of one-sided ear-side signal measuring units is used as the user bioelectrical signal.

The embodiment of the invention also discloses a method for measuring the electroencephalogram signals of the user, which is shown in figure 16: wherein, steps S1601, S1602 are the same as fig. 2, and S1603 is to send the electroencephalogram signal to a signal analysis device, which may be specifically an attention detection device in the embodiment of the present application.

The corresponding embodiment of the present invention also discloses an ear-side wearing device for measuring the user-related signal, as shown in fig. 11d, an ear-side signal measuring unit 121 for collecting the user bioelectrical signal from the ear side. Alternatively, the ear-side signal measuring unit 121 may include a left ear-side signal measuring unit 121a and a right ear-side signal measuring unit 121 b. When the ear-side worn device 120 is a one-sided measuring device, the ear-side signal measuring unit 121 may include only the one-sided ear-side signal measuring unit 121 c.

And the characteristic decomposition unit 122 is used for acquiring an electroencephalogram signal from the user bioelectrical signal.

A transmitting unit 123 for transmitting the biometric signal to a signal analysis device; the signal analysis means may in the embodiments of the present application be in particular attention detection means.

A first judging unit 124 for judging whether the impedance between two of the ear-side signal measuring units is lower than a preset threshold; when the impedance between the two ear side signal measurement units is lower than a preset threshold value; and taking a potential difference value signal of the bioelectrical signals collected by the bioelectrical signals measured by the two ear side signal measuring units as the user bioelectrical signal.

The ear side wearing apparatus may further optionally include a second determination unit 125 corresponding to a bilateral measurement situation.

A first disconnection unit 124, configured to determine whether an impedance between the left ear-side signal measurement unit and the right ear-side signal measurement unit is lower than a preset threshold (the specific determination method is described above, and is not described here again); when the impedance between the left ear-side signal measuring unit and the right ear-side signal measuring unit is lower than a preset threshold value; and taking the potential difference value signal of the bioelectricity signal collected by the left ear-side signal measuring unit and the bioelectricity signal collected by the right ear-side signal measuring unit as the user bioelectricity signal.

A second determining unit 125, configured to determine whether the impedance between two of the left ear-side signal measuring units is lower than a preset threshold and whether the impedance between two of the right ear-side signal measuring units is lower than a preset threshold, respectively, when the first determining unit 124 determines that the ear-side wearing device cannot normally measure (the specific determination method has been described above, and is not described herein again); and taking a potential difference value signal of the bioelectrical signals collected by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold value as the bioelectrical signal of the user. The second determining unit 125 is an optional unit, and the second determining unit 125 is applied to the left-ear-side signal measuring unit and the right-ear-side signal measuring unit.

Corresponding to the one-sided measurement situation, the first determining unit 124 of the ear-side wearing device is configured to determine whether impedance between two of the one-sided ear-side signal measuring units is lower than a preset threshold (the specific determining manner is described above, and is not described here again), and when the impedance between the two one-sided ear-side signal measuring units is lower than the preset threshold, the potential difference signal of the bioelectrical signals collected by two of the plurality of one-sided ear-side signal measuring units is used as the user bioelectrical signal.

Fig. 12 is a schematic diagram of a specific product structure of the ear-side wearing device in fig. 11, the ear-side wearing device may have various forms, such as an earphone form and an earplug form, and the ear-side wearing device in this example is an earplug form, but not limited in this application, and includes an earplug body 301, a flexible electrode carrier 302 and a plurality of surface flexible electrodes 303. The flexible electrode carrier 302 provides a support with enough elasticity to ensure that the plurality of flexible electrodes 303 attached to the surface of the flexible electrode carrier 302 form a close fit with the ear-side surface of the user, and to ensure that the brain wave signals of the user are stably collected. Section 310 illustratively presents a configuration of surface flexible electrodes 303, including biosensing flexible electrodes 303A, 303B, which exhibit a equiangular 120 degree distribution, and grounded common flexible electrodes 303G, 304 are ear plugs. For other possible embodiments, the bio-sensing flexible electrodes 303 attached to the surface of the flexible electrode carrier 302 may be only 1 or 2, while the ear plug body 301 is connected to the grounded common flexible electrode. Or in other possible embodiments, the grounded common flexible electrode can be realized by an electrode contact on the auricle support. Fig. 13 shows a wearing diagram of the ear-side wearing device in the form of the ear plug in fig. 12, wherein 401 is an ear canal of a user, 402 is an ear-in type ear plug for measuring electroencephalogram, 403 is a flexible electrode, and 404 is an auricle of the user. As can be seen in fig. 3, the plurality of flexible electrodes 403 on the surface of the flexible electrode carrier form a close fit with the inner surface of the ear canal 401 of the user when worn, and form a measurement system with the user's head. Although not shown in the figure, the ear-side wearable device may further include a communication module for receiving or transmitting the electroencephalogram signal, and may further optionally include an attention detection unit for analyzing the type of attention of the user through the electroencephalogram signal.

In which the ear-side signal measuring unit in fig. 11a-d can alternatively be realized by means of flexible electrodes.

The embodiment of the invention also discloses a method for analyzing the user-related signals, which is shown in figure 17: where step S1702 is the same as S603 in fig. 7, and S1701 is receiving an electroencephalogram signal from the ear-worn device.

Correspondingly, the embodiment of the invention also discloses an attention detection device 130, as shown in fig. 14. The device comprises:

a receiving unit 131 for receiving an electroencephalogram signal from the ear-side wearable device;

an attention detection unit 132 for obtaining the attention type of the user according to the electroencephalogram signal.

Correspondingly, the attention detection unit 132 analyzes the attention type of the user according to the electroencephalogram signal, and the attention detection unit may be a terminal device of the user, such as a mobile phone, or other wearable or portable terminal, or may be a server disposed in a cloud.

The attention detection unit comprises a sample entropy acquisition module and an attention identification module.

The sample entropy acquisition module is used for acquiring sample entropy based on the electroencephalogram signals;

the acquisition process for acquiring the sample entropy based on the electroencephalogram signal comprises the following steps:

a: intercepting the electroencephalogram signal with a preset time length, and obtaining N signal sampling points, u (1), u (2),. and u (N), from the electroencephalogram signal with the preset time length.

Usually, the sampling points are sampling points with equal time intervals, and the preset time length intercepted from the electroencephalogram signal can be set according to the analysis requirement.

B: based on the N signal sampling points, sequentially intercepting m sampling points by taking u (1), u (2), … and u (N-m +1) as starting points respectively to construct N-m +1 m-dimensional vectors;

the constructed N-m +1 m-dimensional vectors are X (1), X (2),.. times, X (N-m +1), where X (i) ═ u (i), u (i +1),.. times, u (i + m-1) ], 1 ≦ i ≦ N-m + 1; m < N;

c: and aiming at each m-dimensional vector in the N-m +1 vectors, calculating the average value of the number of the vectors with the distance between the m-dimensional vector and each other vector being less than r, and calculating the average value of the obtained N-m +1 average values to obtain a first average value.

For each m-dimensional vector in the N-m +1 vectors, counting the number of vectors meeting the following conditions:

Bi(r)=(number of X(j)such that d[X(i),X(j)]r is less than or equal to r)/(N-m), i is not equal to j, and the value range of i is [1, N-m + 1%]J has a value in the range of [1, N-m +1 ] except for i]And r is a preset value, for example, the value of r can be related to the value of the standard deviation δ of the sampling point, and the value can be between 0.1 δ and 0.3 δ. Wherein d [ X (i), X (j)]Is defined as d [ X (i), X (j)]Max | u (a) -u ≠ j; u (a) is an element of vector X (i), u X (a) is an element of corresponding dimension of vector X (j), d represents a distance between vector X (i) and X (j), and the distance between vector X (i) and X (j) is determined by the maximum difference in the difference between corresponding elements, e.g. X (1) ═ 2, 3, 4, 6],X(2)=[4,5,7,10]The maximum difference of the corresponding elements is |6-10| ═ 4, so d [ X (1), X (2)]4. Calculating the average value of Bi (r) to all the values of i, namely Bm (r)

D: based on the N signal sampling points, sequentially intercepting m +1 sampling points by taking u (1), u (2), … and u (N-m) as starting points respectively to construct N-m + 1-dimensional vectors;

the constructed N-m + 1-dimensional vectors are Y (1), Y (2),.. and Y (N-m), wherein x (i) ([ u (i)), u (i +1),.. and u (i + m) ], and 1 ≦ i ≦ N-m; m < N;

e: and aiming at each m + 1-dimensional vector in the N-m vectors, calculating the average value of the number of the vectors with the distance between the m + 1-dimensional vector and each other vector being less than r, and calculating the average value of the obtained N-m average values to obtain a second average value.

For each m + 1-dimensional vector in the N-m vectors, counting the number of vectors meeting the following conditions:

Ai(r)=(number of Y(j)such that d[Y(i),Y(j)]r is less than or equal to)/(N-m-1), i is not equal to j, and the value range of i is [1, N-m]J has a value in the range of [1, N-m ] except for i]And r is a preset value, for example, the value of r can be related to the value of the standard deviation δ of the sampling point, and the value can be between 0.1 δ and 0.3 δ. Wherein d [ Y (i), Y (j)]Is defined as d [ Y (i), Y (j)]Max | u (a) -u ≠ j; u (a) is the element of vector Y, d represents the distance between vector Y (i) and Y (j), and is determined by the maximum difference of the corresponding elements. Calculating the average value of ai (r) to all the values of i, namely am (r)

F: a value of sample entropy (SampEn) is calculated based on a ratio of the first average to the second average.

SampEn=lim(N→∞){-ln[Am(r)/Bm(r)]}。

Where the order of a-F is not fixed, such as B, C and D, E are not implemented in a fixed sequential order, D, E may be implemented before B, C, simultaneously, or partially overlapping in time.

And the attention identification module is used for judging the attention state of the user based on the value of the sample entropy obtained by the acquired electroencephalogram signal.

Wherein the attention recognition module may include:

an SV classifier for obtaining a segmentation value by machine learning; specifically, after a plurality of sample entropy values and corresponding attention states are input through an SVM machine learning mode, the SVM classifier outputs one or more segmentation values for judging the attention states corresponding to the sample entropies of the electroencephalograms of the user.

The SVM classifier can be set in the attention recognition module, or set in other devices to be trained to obtain a segmentation value, and then the segmentation value is sent to the attention recognition module, or set manually by a user or a developer according to a training result.

And the judging module is used for judging the attention type of the user according to the segmentation value and the sample entropy value.

The segmentation value may be one or more, such as a segmentation value for distinguishing between concentration and distraction, or a segmentation value for distinguishing between waking and sleeping. For example, for a division value for distinguishing whether attention is focused or distracted, a division value equal to or greater than this indicates concentration, and a division value equal to or less than this indicates distraction.

Wherein the specific technical implementation details can be implemented by using the related description in fig. 2.

The attention detection device 130 may be implemented in a handheld terminal, a vehicle-mounted terminal, or other devices for calculating and analyzing electroencephalogram signals.

Fig. 15a is a schematic structural diagram of a processor corresponding to the ear-side worn device according to the embodiment of the present application.

The ear-side worn device 1400 with integrated attention detection functionality as shown in fig. 15a may comprise one or more processors 1406, one or more memories 1401, a feature decomposition unit 1403. In a specific implementation, the ear-side worn device may further include a communication unit 1405. The processor 1406 may be connected to the memory 1401, the measuring electrode 1402, the feature decomposition circuit 1403, and the like, respectively, through a bus. Described below, respectively:

processor 1406 is the control center for the ear-worn device, and various components of the ear-worn device are connected using various interfaces and lines, and in a possible embodiment, processor 1406 may also include one or more processing cores. The processor 1400 may determine whether the measurement electrode can be measured normally (whether the ear-worn device can be measured normally) by executing program instructions, and perform user attention analysis based on the measurement signal. When the processor 1406 may be a special purpose processor or a general purpose processor, the processor 1406 operates or executes software programs (instructions) and/or modules stored in the memory 1401 when the processor 1406 is a general purpose processor.

The memory 1401 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1401 may also include a memory controller to provide access to the memory 1401 by the processor 1400 and the input unit. The memory 1401 may be specifically configured to store software programs (instructions), as well as collected user bioelectrical signals.

An ear-side signal measuring unit 1402 for a user bioelectric signal collected from the ear side. Alternatively, the ear-side signal measuring unit 1402 may include a left ear-side signal measuring unit and a right ear-side signal measuring unit. When the ear-side worn device 1400 is a one-sided measuring device, the ear-side signal measuring unit 1402 may include only a one-sided ear-side signal measuring unit. The ear-side signal measurement unit 1402 is typically implemented by hardware, for example, the ear-side signal measurement unit 1402 may be an electrode, and the ear-side signal measurement unit 1402 may be one or more.

A feature decomposition unit 1403, configured to obtain an electroencephalogram signal from the user bioelectric signal. The feature decomposition unit 1403 is typically implemented by hardware, e.g. a feature decomposition circuit, an ICA component.

The communication unit 1405 is used for making communication connection with the ear-side worn device and other apparatuses by wireless or wired communication technology, such as cellular mobile communication technology, WLAN, bluetooth, and the like.

It will be appreciated by those skilled in the art that the ear-side worn device of the embodiments of the present application may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. For example, the ear wearing device may further include a speaker, a camera, and the like, which are not described in detail herein.

Specifically, the processor 1406 may determine whether the measurement electrode can be normally measured (whether the ear-side worn device can be normally measured) by reading and analyzing the measurement signal stored in the memory 1401, and perform user attention analysis based on the measurement signal. The method comprises the following steps:

corresponding to the two-sided measurement, the processor 1406 is configured to determine whether the impedance between the left ear-side signal measurement unit and the right ear-side signal measurement unit is lower than a preset threshold (the specific determination method is introduced above, and is not described here again); when the impedance between the left ear-side signal measuring unit and the right ear-side signal measuring unit is lower than a preset threshold value; acquiring the bioelectrical signal of the user according to the potential difference signal of the bioelectrical signal acquired by the left ear-side signal measuring unit and the bioelectrical signal acquired by the right ear-side signal measuring unit; when it is determined that the ear-side wearable device cannot normally measure (the specific determination method is described above and is not described herein), respectively determining whether the impedance between two of the left ear-side signal measurement units is lower than a preset threshold, and whether the impedance between two of the right ear-side signal measurement units is lower than a preset threshold; and acquiring the bioelectrical signal of the user according to a potential difference value signal of the bioelectrical signals acquired by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold, wherein the potential difference value signal can be acquired by executing an instruction by the processor 1406 and also realized by a potential difference value acquiring unit, namely a hardware circuit.

Corresponding to the one-sided measurement, the processor 1406 is configured to determine whether the impedance between two of the one-sided ear-side signal measurement units is lower than a preset threshold (the specific determination method has been described above, and is not described here again), and when the impedance between the two one-sided ear-side signal measurement units is lower than the preset threshold, obtain the user bioelectric signal according to a potential difference signal of two collected bioelectric signals in the plurality of one-sided ear-side signal measurement units.

The processor 1406 is further configured to obtain a type of attention of the user from the brain electrical signal. The specific analysis method may refer to the above specific embodiments, and will not be described herein again.

It should also be noted that although fig. 14 is only one implementation of the present invention in an ear-worn device in which the processor 1406 and memory 1401 are located, in a possible embodiment, they may be integrally disposed.

Fig. 14 is also an ear-worn device for measuring brain electrical signals of a user according to an embodiment of the present invention, which may include one or more processors 1406, one or more memories 1401, an ear-worn signal measuring unit 1402, and a feature decomposition unit 1403. In a specific implementation, the ear-side worn device may further include a communication unit 1405 (including a transmitting unit and a receiving unit). The processor 1406 may be connected to the memory 1401, the measuring electrode 1402, the feature decomposition circuit 1403, and the like, respectively, through a bus. Described below, respectively:

processor 1406 is the control center for the ear-worn device, and various components of the ear-worn device are connected using various interfaces and lines, and in a possible embodiment, processor 1406 may also include one or more processing cores. The processor 1400 may determine whether the measurement electrodes can be measured normally (whether the ear-worn device can be measured normally) by executing program instructions. When the processor 1406 may be a special purpose processor or a general purpose processor, the processor 1406 operates or executes software programs (instructions) and/or modules stored in the memory 1401 when the processor 1406 is a general purpose processor.

The memory 1401 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1401 may also include a memory controller to provide access to the memory 1401 by the processor 1400 and the input unit. The memory 1401 may be specifically configured to store software programs (instructions), as well as collected user bioelectrical signals.

An ear-side signal measuring unit 1402 for a user bioelectric signal collected from the ear side. Alternatively, the ear-side signal measuring unit 1402 may include a left ear-side signal measuring unit and a right ear-side signal measuring unit. When the ear-side worn device 1400 is a one-sided measuring device, the ear-side signal measuring unit 1402 may include only a one-sided ear-side signal measuring unit. The ear-side signal measurement unit 1402 is typically implemented by hardware, for example, the ear-side signal measurement unit 1402 may be an electrode, and the ear-side signal measurement unit 1402 may be one or more.

Optionally, in some embodiments, a feature decomposition unit 1403 is further included for obtaining the electroencephalogram signal from the user bioelectric signal. The feature decomposition unit 1403 is typically implemented by hardware, e.g. a feature decomposition circuit, an I CA component.

The communication unit 1405 is used for performing communication connection with the ear wearing device and other devices through a wireless or wired communication technology, such as a cellular mobile communication technology, WLAN, bluetooth, etc., and sending the bioelectric signals or the acquired and processed electroencephalogram signals to the signal analysis device; the signal analysis means may in the embodiments of the present application be in particular attention detection means. Besides the attention detection device, the acquired electroencephalogram signal can also be applied to analysis of other characteristics of the user, such as sleep state and emotion state identification, so that the signal analysis device can also be a sleep detection device, an emotion detection device and other devices which need to obtain information through electroencephalogram signal analysis.

It will be appreciated by those skilled in the art that the ear-side worn device of the embodiments of the present application may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. For example, the ear wearing device may further include a speaker, a camera, and the like, which are not described in detail herein.

Specifically, the processor 1406 may determine whether the measurement electrode can normally measure (whether the ear-side worn device can normally measure) by reading and analyzing the measurement signal stored in the memory 1401, and perform analysis of the type of attention of the user based on the measurement signal. The method comprises the following steps:

corresponding to the two-sided measurement, the processor 1406 is configured to determine whether the impedance between the left ear-side signal measurement unit and the right ear-side signal measurement unit is lower than a preset threshold (the specific determination method is introduced above, and is not described here again); when the impedance between the left ear-side signal measuring unit and the right ear-side signal measuring unit is lower than a preset threshold value; acquiring the bioelectrical signal of the user according to the potential difference signal of the bioelectrical signal acquired by the left ear-side signal measuring unit and the bioelectrical signal acquired by the right ear-side signal measuring unit; when it is determined that the ear-side wearable device cannot normally measure (the specific determination method is described above and is not described herein), respectively determining whether the impedance between two of the left ear-side signal measurement units is lower than a preset threshold, and whether the impedance between two of the right ear-side signal measurement units is lower than a preset threshold; and acquiring the bioelectrical signal of the user according to a potential difference value signal of the bioelectrical signals acquired by the two bioelectrical measuring devices of the auditory canal at the side with the impedance lower than the preset threshold, wherein the potential difference value signal can be acquired by executing an instruction by the processor 1406 and also realized by a potential difference value acquiring unit, namely a hardware circuit.

Corresponding to the one-sided measurement, the processor 1406 is configured to determine whether the impedance between two of the one-sided ear-side signal measurement units is lower than a preset threshold (the specific determination method has been described above, and is not described here again), and when the impedance between the two one-sided ear-side signal measurement units is lower than the preset threshold, obtain the user bioelectric signal according to a potential difference signal of two collected bioelectric signals in the plurality of one-sided ear-side signal measurement units.

Also, FIG. 14 is merely one implementation of an ear-worn device of the present application in which processor 1406 and memory 1401, and in possible embodiments, may also be integrally disposed.

Fig. 15b is a schematic structural diagram of another terminal form of an attention detection apparatus according to an embodiment of the present application, and as shown in fig. 15, the attention detection apparatus may include one or more processors 1500 and one or more memories 1501. In a specific implementation, the attention detection device may further include an input unit 1506, a display unit 1503, a communication unit 1502, and the like, and the processor 2011 may be connected to the memory 1501, the communication unit 1502, the input unit 1506, the display unit 1503, and the like through a bus. Described below, respectively:

the processor 1500 is the control center for the attention detection device, and various interfaces and lines are used to connect the various components of the attention detection device, and in possible embodiments, the processor 1500 may further include one or more processing cores. The processor 1500 may perform attention detection of the brain electrical signal by executing program instructions. When the processor 1500 may be a special purpose processor or a general purpose processor, the processor 1500 executes or executes software programs (instructions) and/or modules stored in the memory 1501 when the processor 1500 is a general purpose processor.

The memory 1501 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1501 may also include a memory controller to provide the processor 1500 and the input unit 1506 access to the memory 1501. The memory 1501 may be specifically used to store software programs (instructions), as well as brain electrical signals.

The input unit 1506 may be used to receive numeric or character information input by a user and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 1506 may include a touch sensitive surface 1505 as well as other input devices 1507. The touch sensitive surface 1505, also known as a touch screen or touch pad, may collect touch operations by a user on or near the touch sensitive surface and drive the corresponding connecting device according to a predetermined program. In particular, other input devices 1507 may include, but are not limited to, one or more of a physical keyboard, function keys, a trackball, a mouse, a joystick, and the like.

The display unit 1503 may be used to display a search request input by a user or a search result provided to the user by the search apparatus, and various graphical user interfaces of the search apparatus, which may be configured by graphics, text, icons, video, and any combination thereof. Specifically, the Display unit 1503 may include a Display panel 1504, and optionally, the Display panel 1504 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-emitting diode (OLED), or the like. Although in FIG. 15, touch-sensitive surface 1505 is shown as being two separate components from display panel 1504, in some embodiments touch-sensitive surface 1505 may be integrated with display panel 1504 to implement input and output functions. For example, the touch-sensitive surface 1505 may overlay the display panel 1504 when a touch operation is detected on or near the touch-sensitive surface 1505, which is then communicated to the processor 1500 to determine the type of touch event, and the processor 1500 then provides a corresponding visual output on the display panel 1504 in accordance with the type of touch event.

The communication unit 1502 is used for communication connection with ear-side wearable devices and other devices through wireless or wired communication technologies, such as cellular mobile communication technologies, WLAN, bluetooth, and the like. The prompting device is used for receiving the electroencephalogram signals sent by the ear side wearing device, and possibly returning prompting signals to the ear side wearing device according to the judgment result, or directly prompting through a loudspeaker, or displaying a prompting interface through the display unit 1503.

Those skilled in the art will appreciate that the retrieval means in the embodiments of the present application may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components may be used. For example, the retrieving device may further include a speaker, a camera, etc., which are not described herein.

Specifically, the processor 1500 may detect the attention type of the user based on the electroencephalogram signal in step S103 of the embodiment of the present application by reading and analyzing and judging the electroencephalogram signal stored in the memory 1501. The method comprises the following steps:

the sample entropy is obtained based on the electroencephalogram signal, and the obtaining process of the sample entropy is described in detail above, so that the detailed description is omitted here.

And judging the attention state of the user based on the value of the sample entropy obtained by the acquired electroencephalogram signal.

And judging the attention type of the user according to the segmentation value obtained by the SVM classifier through machine learning and the sample entropy value.

For the specific implementation process of the method for the processor 1500 to perform the user attention analysis, reference may be made to the foregoing method embodiments, which are not described herein again.

It should also be noted that although fig. 15b is only one implementation of the retrieval apparatus of the present application, the processor 1500 and the memory 1501 in the retrieval apparatus may be integrally disposed in a possible embodiment.

In the above embodiments, all or part may be implemented by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions that when loaded and executed on a computer cause a process or function according to an embodiment of the application to be performed, in whole or in part. The processor may be a general purpose processor or a special purpose processor. The retrieval device may be one or a computer network composed of a plurality of retrieval devices. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one network site, computer, server, or data center to another network site, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer and can be a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The available media may be magnetic media (e.g., floppy disks, hard disks, tapes, etc.), optical media (e.g., DVDs, etc.), or semiconductor media (e.g., solid state drives), among others.

For example, according to the scheme of the embodiment of the application, the execution main body may be an ASIC, an FPGA, a CPU, a GPU, or the like, and is implemented in a hardware or software manner, and the memory may be a volatile or nonvolatile storage device such as a DDR, an SRAM, an HDD, or an SSD. The data retrieval device can be applied to various scenes, such as a server for a video monitoring system, and can be in the form of a PCIe expansion card for example.

The ASIC and the FPGA belong to hardware realization, namely, the method of the application is grounded in a hardware description language mode during hardware design; the CPU and the GPU belong to software implementation, namely the method of the application is grounded through a software program code mode during software design.

In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

45页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种用于经颅电刺激和迷走神经刺激的脑电采集系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!