Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a game control device in a hardware operating environment according to an embodiment of the present invention.
The game control device of the embodiment of the invention can be a PC, and can also be a mobile terminal device with a display function, such as a smart phone, a tablet computer, an electronic book reader, an MP3(Moving Picture Experts Group Audio Layer III, motion Picture Experts compression standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, motion Picture Experts compression standard Audio Layer 4) player, a portable computer and the like.
As shown in fig. 1, the game control apparatus may include: aprocessor 1001, such as a CPU, anetwork interface 1004, auser interface 1003, amemory 1005, acommunication bus 1002. Wherein acommunication bus 1002 is used to enable connective communication between these components. Theuser interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and theoptional user interface 1003 may also include a standard wired interface, a wireless interface. Thenetwork interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). Thememory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). Thememory 1005 may alternatively be a storage device separate from theprocessor 1001.
Optionally, the game control device may further include a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that turns off the display screen and/or backlight when the game control device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the game control device is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of the game control device; of course, the game control device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the game control arrangement shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, amemory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a game control program.
In the game control apparatus shown in fig. 1, thenetwork interface 1004 is mainly used for connecting with a background server and performing data communication with the background server; theuser interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and theprocessor 1001 may be used to invoke a game control program stored in thememory 1005.
In this embodiment, the game control apparatus includes: amemory 1005, aprocessor 1001 and a game control program stored in thememory 1005 and operable on theprocessor 1001, wherein when theprocessor 1001 calls the game control program stored in thememory 1005, the following operations are performed:
when a terminal is in a game scene, acquiring a first electroencephalogram signal acquired by an electroencephalogram acquisition device corresponding to the terminal in real time and a first heart rate signal currently acquired by a heart rate acquisition device, and storing the acquired first electroencephalogram signal and the acquired first heart rate signal to a preset storage area;
acquiring first electroencephalogram data acquired by the electroencephalogram acquisition device within a preset time before the current time based on a first electroencephalogram currently stored in the preset storage area;
determining whether the first electroencephalogram data is matched with preset electroencephalogram data;
when the first electroencephalogram data are matched with preset electroencephalogram data, determining whether the first heart rate data collected by the heart rate collecting device at the current moment are within a preset heart rate range corresponding to the preset electroencephalogram data matched with the first electroencephalogram signal;
when the first heart rate data is within the preset heart rate range, acquiring game control operation based on preset electroencephalogram data matched with the first electroencephalogram data and the preset heart rate range;
executing the game control operation in the game scene.
Further, theprocessor 1001 may call the game control program stored in thememory 1005, and also perform the following operations:
sampling the first electroencephalogram data based on a preset time window to obtain a first sampling signal;
calculating a first wavelet entropy in the preset time window according to the first sampling signal;
and determining whether the first electroencephalogram data is matched with preset electroencephalogram data or not based on the first wavelet entropy.
Further, theprocessor 1001 may call the game control program stored in thememory 1005, and also perform the following operations:
calculating a difference value between the first wavelet entropy and a preset wavelet entropy corresponding to the preset electroencephalogram data;
and determining whether the difference is smaller than a preset difference, wherein when the difference is smaller than the preset difference, the first electroencephalogram data is determined to be matched with preset electroencephalogram data.
Further, theprocessor 1001 may call the game control program stored in thememory 1005, and also perform the following operations:
when the game control operation is finished, acquiring a first weight value corresponding to the first wavelet entropy and a second weight value corresponding to the preset wavelet entropy;
and calculating a target wavelet entropy based on the first weight value, the first wavelet entropy, the second weight value and the preset wavelet entropy, and setting the target wavelet entropy as the preset wavelet entropy.
Further, theprocessor 1001 may call the game control program stored in thememory 1005, and also perform the following operations:
when a terminal is in a game scene, acquiring a second electroencephalogram signal acquired by an electroencephalogram acquisition device corresponding to the terminal in real time and a second heart rate signal currently acquired by a heart rate acquisition device, and storing the acquired second electroencephalogram signal and the acquired second heart rate signal to a preset storage area;
when the control operation corresponding to the game scene executed by the terminal is detected, second electroencephalogram data acquired by the electroencephalogram acquisition device within a preset time length before the current moment and second heart rate data acquired by the heart rate acquisition device at the current moment are acquired based on a second electroencephalogram signal and a second heart rate signal stored in the preset storage area;
and determining preset electroencephalogram data based on the second electroencephalogram data, determining a preset heart rate range based on the second heart rate data, and storing the determined preset electroencephalogram data, the preset heart rate range and the control operation in an associated manner.
Further, theprocessor 1001 may call the game control program stored in thememory 1005, and also perform the following operations:
when the control operation corresponding to the game scene is detected to exist at present, updating the operation times of the control operation;
and when the updated operation times are larger than the preset times, acquiring second electroencephalogram data acquired by the electroencephalogram acquisition device within a preset time before the control time corresponding to each control operation based on the second electroencephalogram signal stored in the preset storage area, and acquiring second heart rate data corresponding to the control time corresponding to each control operation.
Further, theprocessor 1001 may call the game control program stored in thememory 1005, and also perform the following operations:
respectively sampling each electroencephalogram data in the second electroencephalogram data based on a preset time window to obtain a second sampling signal;
calculating a second wavelet entropy of each of the second sampling signals within the preset time window;
and determining a preset wavelet entropy based on each second wavelet entropy, and taking the preset wavelet entropy as the preset electroencephalogram data.
Further, theprocessor 1001 may call the game control program stored in thememory 1005, and also perform the following operations:
determining maximum heart rate data and minimum heart rate data in the second heart rate data;
determining the preset heart rate range based on the maximum heart rate data and the minimum heart rate data.
The invention also provides a game control method, and referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the game control method of the invention.
The method comprises the steps that S100, when a terminal is in a game scene, a first electroencephalogram signal acquired by an electroencephalogram acquisition device corresponding to the terminal and a first heart rate signal currently acquired by a heart rate acquisition device are acquired in real time, and the acquired first electroencephalogram signal and the acquired first heart rate signal are stored in a preset storage area;
the terminal is a terminal capable of running a game application, and when the terminal is in a game scene, the terminal currently runs a corresponding game application.
In this embodiment, when detecting that the terminal is in a game scene, the sending is collected and executed to the electroencephalogram acquisition device and the heart rate acquisition device, so that the electroencephalogram acquisition device acquires electroencephalogram signals of a user and heart rate signals of the user currently acquired by the heart rate acquisition device, and acquires first electroencephalogram signals acquired by the electroencephalogram acquisition device corresponding to the terminal and first heart rate signals acquired by the heart rate acquisition device currently.
Step S200, acquiring first electroencephalogram data acquired by the electroencephalogram acquisition device within a preset time before the current time based on a first electroencephalogram currently stored in the preset storage area;
in this embodiment, within a preset time period before the current time, the first electroencephalogram data acquired by the electroencephalogram acquisition device, that is, within the first electroencephalogram signal stored in the preset storage area, the electroencephalogram signal within the preset time period before the current time is acquired, and the acquired electroencephalogram signal is taken as the first electroencephalogram data.
Specifically, when the duration of the first electroencephalogram signal of the user acquired by the electroencephalogram acquisition device in real time is longer than a preset duration, the first electroencephalogram data acquired by the electroencephalogram acquisition device in the preset duration before the current time can be acquired based on the first electroencephalogram signal currently stored in the preset storage area.
Wherein, the preset duration can be reasonably set.
Step S300, determining whether the first electroencephalogram data is matched with preset electroencephalogram data;
in this embodiment, when first electroencephalogram data is acquired, whether the first electroencephalogram data is matched with preset electroencephalogram data is determined, specifically, wavelet transformation processing may be performed on the first electroencephalogram signal to obtain a wavelet entropy corresponding to the first electroencephalogram data, whether the wavelet entropy corresponding to the first electroencephalogram data is matched with a preset wavelet entropy corresponding to the preset electroencephalogram data is determined, and further, whether the first electroencephalogram data is matched with the preset electroencephalogram data is determined.
Step S400, when the first electroencephalogram data are matched with preset electroencephalogram data, determining whether the first heart rate data collected by the heart rate collecting device at the current moment are within a preset heart rate range corresponding to the preset electroencephalogram data matched with the first electroencephalogram signal;
in this embodiment, if the first electroencephalogram data is matched with the preset electroencephalogram data, it is determined whether the first heart rate data collected by the heart rate collecting device at the current moment is within a preset heart rate range corresponding to the preset electroencephalogram data matched with the first electroencephalogram signal.
Different preset electroencephalogram data can be set for executing different operations through electroencephalograms and heart rate signals of users, and each preset electroencephalogram data corresponds to different preset heart rate ranges.
Step S500, when the first heart rate data is within the preset heart rate range, acquiring game control operation based on preset electroencephalogram data matched with the first electroencephalogram data and the preset heart rate range;
step S600, executing the game control operation in the game scene
In this embodiment, if the first heart rate data is within the preset heart rate range, a game control operation is acquired based on preset electroencephalogram data matched with the first electroencephalogram data and the preset heart rate range, and the game control operation is executed in the game scene. The method comprises the steps that a plurality of preset electroencephalogram data are acquired, wherein each preset electroencephalogram data respectively corresponds to a game control operation, and when target electroencephalogram data matched with first electroencephalogram data exist in the preset electroencephalogram data, the game control operation corresponding to the target electroencephalogram data is acquired.
The game control method provided by this embodiment includes acquiring, in real time, a first electroencephalogram signal acquired by an electroencephalogram acquisition device corresponding to a terminal and a first heart rate signal currently acquired by a heart rate acquisition device when the terminal is in a game scene, storing the acquired first electroencephalogram signal and the acquired first heart rate signal in a preset storage area, acquiring, based on the first electroencephalogram signal currently stored in the preset storage area, first electroencephalogram data acquired by the electroencephalogram acquisition device within a preset duration before a current time, then determining whether the first electroencephalogram data matches preset electroencephalogram data, and then determining, when the first electroencephalogram data matches the preset electroencephalogram data, whether the first heart rate data acquired by the heart rate acquisition device at the current time is within a preset heart rate range corresponding to the preset electroencephalogram data matching the first electroencephalogram signal, and finally, when the first heart rate data is in the preset heart rate range, acquiring game control operation based on the preset electroencephalogram data matched with the first electroencephalogram data and the preset heart rate range, executing the game control operation in the game scene, and executing the corresponding game control operation in the game scene according to the electroencephalogram signals and the heart rate signals of the user, so that touch-free operation of the game is realized, and user experience is improved.
A second embodiment of the game control method of the present invention is proposed based on the first embodiment, and in this embodiment, step S300 includes:
step S310, sampling the first electroencephalogram data based on a preset time window to obtain a first sampling signal;
step S320, calculating a first wavelet entropy in the preset time window according to the first sampling signal;
step S330, whether the first electroencephalogram data are matched with preset electroencephalogram data is determined based on the first wavelet entropy.
In this embodiment, the first electroencephalogram data is sampled according to a preset time window to obtain a first sampling signal, a first wavelet entropy in the preset time window is calculated based on the first sampling signal by adopting an existing calculation method, whether the first electroencephalogram data is matched with the preset electroencephalogram data or not is determined based on the first wavelet entropy, specifically, the first wavelet entropy and a preset wavelet entropy corresponding to the preset electroencephalogram data can be compared, and whether the first electroencephalogram data is matched with the preset electroencephalogram data or not is determined.
The preset wavelet entropy can be set reasonably, for example, before executing game control operation through electroencephalogram signals, the preset wavelet entropy is obtained by processing electroencephalogram signals during control operation when the user operates a game. The preset time window may be equal to the preset time length, or the preset time window is smaller than the preset time length, or the preset time length is an integral multiple of the preset time window
According to the game control method provided by the embodiment, the first electroencephalogram data are sampled based on the preset time window to obtain the first sampling signal, then the first wavelet entropy in the preset time window is calculated according to the first sampling signal, and then whether the first electroencephalogram data are matched with the preset electroencephalogram data or not is determined based on the first wavelet entropy, so that the current corresponding game control operation can be accurately determined according to the first wavelet entropy, the game control operation can be executed in a game scene according to the electroencephalogram signals and the heart rate signals of the user, the touch-free operation of the game is realized, and the user experience is further improved.
Based on the second embodiment, a third embodiment of the game control method of the present invention is proposed, in this embodiment, step S330 includes:
step S331, calculating a difference value between the first wavelet entropy and a preset wavelet entropy corresponding to the preset electroencephalogram data;
step S332, determining whether the difference is smaller than a preset difference, wherein when the difference is smaller than the preset difference, it is determined that the first electroencephalogram data is matched with preset electroencephalogram data.
In this embodiment, when obtaining the first wavelet entropy, calculating a difference value between the first wavelet entropy and a preset wavelet entropy corresponding to preset electroencephalogram data, where the difference value is an absolute value of a difference between the first wavelet entropy and the preset wavelet entropy, and determining whether the difference value is smaller than a preset difference value; if the difference is smaller than the preset difference, the first electroencephalogram data is judged to be matched with the preset electroencephalogram data, whether the first electroencephalogram data is matched with the preset electroencephalogram data or not can be further determined according to the difference between the first wavelet entropy and the preset wavelet entropy, accuracy of executing game control operation through electroencephalogram signals is improved, and user experience is further improved.
Wherein, it can rationally set up to predetermine the difference.
According to the game control method provided by the embodiment, the difference value between the first wavelet entropy and the preset wavelet entropy corresponding to the preset electroencephalogram data is calculated, and then whether the difference value is smaller than the preset difference value or not is determined, wherein when the difference value is smaller than the preset difference value, the first electroencephalogram data is determined to be matched with the preset electroencephalogram data, whether the first electroencephalogram data is matched with the preset electroencephalogram data or not can be determined according to the difference value between the first wavelet entropy and the preset wavelet entropy, the accuracy of executing game control operation through electroencephalogram signals and heart rate signals is improved, and user experience is further improved.
Based on the third embodiment, a fourth embodiment of the game control method of the present invention is proposed, in this embodiment, after step S600, the game control method further includes:
step S601, when the game control operation is finished, acquiring a first weight value corresponding to the first wavelet entropy and a second weight value corresponding to the preset wavelet entropy;
in this embodiment, if the game control operation is completed, a first weight value corresponding to the first wavelet entropy and a second weight value corresponding to the preset wavelet entropy are obtained, where the first weight value and the second weight value may be reasonably set, for example, both the first weight value and the second weight value may be set to 0.5, or the first weight value and the second weight value may be obtained by calculating according to the execution times of the game control operation corresponding to the preset wavelet entropy.
Step S602, a target wavelet entropy is obtained by calculation based on the first weight value, the first wavelet entropy, the second weight value, and the preset wavelet entropy, and the target wavelet entropy is set as the preset wavelet entropy.
When a first weight value and a second weight value are obtained, a target wavelet entropy is obtained through calculation based on the first weight value, the first wavelet entropy, the second weight value and the preset wavelet entropy, and the target wavelet entropy is set as the preset wavelet entropy, specifically, the target wavelet entropy is the first weight value and the first wavelet entropy plus the second weight value and the preset wavelet entropy. By resetting the preset wavelet entropy according to the first wavelet entropy, the accuracy of the preset wavelet entropy can be improved, and the accuracy of the subsequent execution of the game control operation can be further improved.
In other embodiments, the number of execution times of the game control operation corresponding to the preset wavelet entropy may be obtained, and the first weight value and the second weight value may be calculated based on the number of execution times.
Specifically, the first weight value is 1/(execution times +1), the second weight value is execution times/(execution times +1), and then the first weight value and the second weight value can be reasonably set according to the execution times, so as to recalculate the preset wavelet entropy according to the first weight value and the second weight value, thereby improving the accuracy of the preset wavelet entropy, further improving the accuracy of the subsequent execution of the game control operation, and further improving the user experience.
After the first weight value and the second weight value are calculated through the execution times, the execution times are updated, namely the execution times are added by one to be used as new execution times.
According to the game control method provided by the embodiment, when the game control operation is completed, the first weight value corresponding to the first wavelet entropy and the second weight value corresponding to the preset wavelet entropy are obtained, then the target wavelet entropy is obtained through calculation based on the first weight value, the first wavelet entropy, the second weight value and the preset wavelet entropy, and the target wavelet entropy is set as the preset wavelet entropy, so that the preset wavelet entropy is reset through the first wavelet entropy, the accuracy of the preset wavelet entropy can be improved, the accuracy of the subsequent execution of the game control operation is improved, and the user experience is further improved.
Based on the above embodiment, a fifth embodiment of the game control method of the present invention is proposed, in this embodiment, before step S100, the game control method further includes:
step S700, when a terminal is in a game scene, acquiring a second electroencephalogram signal acquired by an electroencephalogram acquisition device corresponding to the terminal and a second heart rate signal currently acquired by a heart rate acquisition device in real time, and storing the acquired second electroencephalogram signal and the acquired second heart rate signal to a preset storage area;
in this embodiment, when the user wears the electroencephalogram acquisition device, if the terminal is in a game scene, the second heart rate signal currently acquired by the heart rate acquisition device is acquired, and the acquired second electroencephalogram signal and the acquired second heart rate signal are stored in a preset storage area.
Step S800, acquiring second electroencephalogram data acquired by the electroencephalogram acquisition device within a preset time length before the current time and second heart rate data acquired by the heart rate acquisition device at the current time based on a second electroencephalogram signal and a second heart rate signal stored in the preset storage area;
in this embodiment, when it is detected that the terminal executes the control operation corresponding to the game scene at present, that is, when it is detected that the terminal executes the control operation in the game scene, the second electroencephalogram data acquired by the electroencephalogram acquisition device within the preset time before the present time, that is, the electroencephalogram signal within the preset time before the present time is acquired from the second electroencephalogram signal stored in the preset storage area, is acquired, and the acquired electroencephalogram signal is used as the second electroencephalogram data; meanwhile, second heart rate data collected by the heart rate collecting device at the current moment are obtained.
Specifically, after the duration of the second electroencephalogram signal of the user acquired by the electroencephalogram acquisition device is acquired in real time and is longer than the preset duration, if it is detected that the terminal executes the control operation in the game scene, the second electroencephalogram data acquired by the electroencephalogram acquisition device and the second heart rate data acquired by the heart rate acquisition device at the current moment are acquired within the preset duration before the current moment based on the second electroencephalogram signal currently stored in the preset storage area.
And S900, determining preset electroencephalogram data based on the second electroencephalogram data, determining a preset heart rate range based on the second heart rate data, and storing the determined preset electroencephalogram data, the preset heart rate range and the control operation in an associated manner.
In this embodiment, when the second electroencephalogram data is acquired, the preset electroencephalogram data is determined based on the second electroencephalogram data, the preset heart rate range is determined based on the second heart rate data, and the determined preset electroencephalogram data, the preset heart rate range and the control operation are stored in an associated manner.
Specifically, a second wavelet entropy corresponding to the second electroencephalogram data can be calculated, and the second wavelet entropy is set as a preset wavelet entropy corresponding to preset electroencephalogram data. If the second electroencephalogram data comprise electroencephalogram data corresponding to the control operation for multiple times, respectively obtaining an average value of wavelet entropies corresponding to the electroencephalogram data, setting the average value as a preset wavelet entropy, and meanwhile, determining a preset heart rate range according to heart rate data corresponding to the control operation for multiple times, for example, the preset heart rate range is a range between a maximum value and a minimum value in the multiple heart rate data, or the preset heart rate range is (the minimum value-the preset value in the second heart rate data, the maximum value + the preset value in the heart rate data), wherein the preset value can be reasonably set. If the second electroencephalogram data only comprises electroencephalogram data corresponding to the current control operation, the wavelet entropy of the electroencephalogram data corresponding to the current control operation is the preset wavelet entropy, and the preset heart rate range is (electroencephalogram data-preset value corresponding to the current control operation, electroencephalogram data + preset value corresponding to the current control operation).
According to the game control method provided by the embodiment, when a terminal is in a game scene, a second electroencephalogram signal acquired by an electroencephalogram acquisition device corresponding to the terminal and a second heart rate signal acquired by a heart rate acquisition device at present are acquired in real time, the acquired second electroencephalogram signal and the acquired second heart rate signal are stored in a preset storage area, then when the control operation corresponding to the game scene executed by the terminal at present is detected, second electroencephalogram data acquired by the electroencephalogram acquisition device within a preset time before the present moment and second heart rate data acquired by the heart rate acquisition device at the present moment are acquired based on the second electroencephalogram signal and the second heart rate signal stored in the preset storage area, then preset electroencephalogram data are determined based on the second electroencephalogram data, a preset heart rate range is determined based on the second brain rate data, and the determined preset electroencephalogram data are stored in an associated manner, The method comprises the steps of presetting a heart rate range and control operation, further realizing that electroencephalogram data are preset according to electroencephalogram data setting of a user when the control operation corresponding to the game scene is executed by a terminal, and presetting a psychological range according to current heart rate data setting, further obtaining accurate preset electroencephalogram data and presetting the psychological range, improving accuracy of subsequent execution of the game control operation, and further improving user experience.
A sixth embodiment of the game control method of the present invention is proposed based on the fifth embodiment, and in this embodiment, step S800 includes:
step S810, when detecting that the current terminal executes the control operation corresponding to the game scene, updating the operation times of the control operation;
and S820, when the updated operation times are larger than the preset times, acquiring second electroencephalogram data acquired by the electroencephalogram acquisition device within a preset time before the control time corresponding to each control operation based on the second electroencephalogram signal stored in the preset storage area, and acquiring second heart rate data corresponding to the control time corresponding to each control operation.
In this embodiment, when detecting that the terminal currently executes the control operation corresponding to the game scene, i.e., detects that the terminal performs a control operation in a game scene, updates the number of operations (number of executions) of the control operation, namely, the current operation times is added with one to be used as the updated operation times, if the updated operation times is more than the preset times, acquiring electroencephalogram data acquired by the electroencephalogram acquisition device within a preset time before a control time corresponding to each control operation based on the second electroencephalogram signal stored in the preset storage area, namely, the electroencephalogram data collected by the electroencephalogram collection device within the preset time before the control time of executing the control operation each time are respectively obtained, and the acquired electroencephalogram data are used as second electroencephalogram data, and second heart rate data corresponding to the control time corresponding to each control operation are acquired at the same time.
Further, in an embodiment, after step S810, the method further includes: and when the operation times are less than or equal to the preset times, continuously executing the steps of acquiring a second electroencephalogram signal acquired by the electroencephalogram acquisition device corresponding to the terminal and a second heart rate signal currently acquired by the heart rate acquisition device in real time when the terminal is in a game scene, and storing the acquired second electroencephalogram signal and the acquired second heart rate signal into a preset storage area.
In the game control method provided by this embodiment, when it is detected that the control operation corresponding to the game scene currently exists, the operation times of the control operation are updated, then when the updated operation times are greater than the preset times, second electroencephalogram data acquired by the electroencephalogram acquisition device within a preset time before the control time corresponding to each control operation is acquired based on the second electroencephalogram signal stored in the preset storage area, and second heart rate data corresponding to the control time corresponding to each control operation is acquired, so that the second electroencephalogram data and the second heart rate data are accurately acquired according to the control operation corresponding to the game scene executed by the terminal, and thus accurate preset electroencephalogram data can be acquired according to the second electroencephalogram data, a reasonable preset heart rate range is acquired according to the second heart rate data, and the accuracy of the subsequent execution of the game control operation is improved, the user experience is further improved.
Based on the sixth embodiment, a seventh embodiment of the game control method of the present invention is proposed, in this embodiment, step S900 includes:
step S910, sampling each electroencephalogram data in the second electroencephalogram data based on a preset time window to obtain a second sampling signal;
step S920, calculating a second wavelet entropy of each of the second sampling signals within the preset time window;
step S930, determining a preset wavelet entropy based on each second wavelet entropy, and using the preset wavelet entropy as the preset electroencephalogram data.
In this embodiment, the preset electroencephalogram data includes a preset wavelet entropy, when the second electroencephalogram data is acquired, each electroencephalogram data in the second electroencephalogram data is sampled according to a preset time window, a sampling signal corresponding to each electroencephalogram data is obtained and serves as a second sampling signal, the wavelet entropy of each sampling signal in the preset time window is calculated based on the second sampling signal in an existing calculation mode and serves as the second wavelet entropy, the preset wavelet entropy is determined based on each second wavelet entropy, the preset wavelet entropy is used as the preset electroencephalogram data, specifically, the mean value of all wavelet entropies in the second wavelet entropy is used as the preset wavelet entropy, the preset electroencephalogram data and the preset wavelet entropy can be accurately set, accuracy of subsequent execution of the game control operation is improved, and user experience is further improved.
In the game control method provided by the embodiment, each piece of electroencephalogram data in the second electroencephalogram data is sampled based on a preset time window to obtain a second sampling signal, then, a second wavelet entropy of each piece of sampling signal in the second sampling signal in the preset time window is calculated, then, a preset wavelet entropy is determined based on each second wavelet entropy, and the preset wavelet entropy is used as the preset electroencephalogram data, so that the preset electroencephalogram data and the preset wavelet entropy can be accurately set, the accuracy of subsequent execution of the game control operation is improved, and the user experience is further improved.
Based on the sixth embodiment, an eighth embodiment of the game control method of the present invention is proposed, in this embodiment, step S900 includes:
step S940, determining the maximum heart rate data and the minimum heart rate data in the second heart rate data;
step S950, determining the preset heart rate range based on the maximum heart rate data and the minimum heart rate data.
In this embodiment, the heart rate data in the second heart rate data are compared to obtain the maximum heart rate data and the minimum heart rate data in the second heart rate data, and the preset heart rate range is determined according to the maximum heart rate data and the minimum heart rate data, specifically, the preset heart rate range is [ the minimum heart rate data, the maximum heart rate data ], or the preset heart rate range is (the minimum heart rate data — the preset value, the maximum heart rate data + the preset value).
According to the game control method provided by the embodiment, the preset psychological range is reasonably set according to the second psychological data by determining the maximum heart rate data and the minimum heart rate data in the second cardiac rate data and then determining the preset heart rate range based on the maximum heart rate data and the minimum heart rate data, so that the accuracy of the subsequent execution of the game control operation is improved, and the user experience is further improved.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where a game control program is stored on the computer-readable storage medium, and when executed by a processor, the game control program implements the following operations:
when a terminal is in a game scene, acquiring a first electroencephalogram signal acquired by an electroencephalogram acquisition device corresponding to the terminal in real time and a first heart rate signal currently acquired by a heart rate acquisition device, and storing the acquired first electroencephalogram signal and the acquired first heart rate signal to a preset storage area;
acquiring first electroencephalogram data acquired by the electroencephalogram acquisition device within a preset time before the current time based on a first electroencephalogram currently stored in the preset storage area;
determining whether the first electroencephalogram data is matched with preset electroencephalogram data;
when the first electroencephalogram data are matched with preset electroencephalogram data, determining whether the first heart rate data collected by the heart rate collecting device at the current moment are within a preset heart rate range corresponding to the preset electroencephalogram data matched with the first electroencephalogram signal;
when the first heart rate data is within the preset heart rate range, acquiring game control operation based on preset electroencephalogram data matched with the first electroencephalogram data and the preset heart rate range;
executing the game control operation in the game scene.
Further, the game control program when executed by the processor further performs the following operations:
sampling the first electroencephalogram data based on a preset time window to obtain a first sampling signal;
calculating a first wavelet entropy in the preset time window according to the first sampling signal;
and determining whether the first electroencephalogram data is matched with preset electroencephalogram data or not based on the first wavelet entropy.
Further, the game control program when executed by the processor further performs the following operations:
calculating a difference value between the first wavelet entropy and a preset wavelet entropy corresponding to the preset electroencephalogram data;
and determining whether the difference is smaller than a preset difference, wherein when the difference is smaller than the preset difference, the first electroencephalogram data is determined to be matched with preset electroencephalogram data.
Further, the game control program when executed by the processor further performs the following operations:
when the game control operation is finished, acquiring a first weight value corresponding to the first wavelet entropy and a second weight value corresponding to the preset wavelet entropy;
and calculating a target wavelet entropy based on the first weight value, the first wavelet entropy, the second weight value and the preset wavelet entropy, and setting the target wavelet entropy as the preset wavelet entropy.
Further, the game control program when executed by the processor further performs the following operations:
when a terminal is in a game scene, acquiring a second electroencephalogram signal acquired by an electroencephalogram acquisition device corresponding to the terminal in real time and a second heart rate signal currently acquired by a heart rate acquisition device, and storing the acquired second electroencephalogram signal and the acquired second heart rate signal to a preset storage area;
when the control operation corresponding to the game scene executed by the terminal is detected, second electroencephalogram data acquired by the electroencephalogram acquisition device within a preset time length before the current moment and second heart rate data acquired by the heart rate acquisition device at the current moment are acquired based on a second electroencephalogram signal and a second heart rate signal stored in the preset storage area;
and determining preset electroencephalogram data based on the second electroencephalogram data, determining a preset heart rate range based on the second heart rate data, and storing the determined preset electroencephalogram data, the preset heart rate range and the control operation in an associated manner.
Further, the game control program when executed by the processor further performs the following operations:
when the control operation corresponding to the game scene is detected to exist at present, updating the operation times of the control operation;
and when the updated operation times are larger than the preset times, acquiring second electroencephalogram data acquired by the electroencephalogram acquisition device within a preset time before the control time corresponding to each control operation based on the second electroencephalogram signal stored in the preset storage area, and acquiring second heart rate data corresponding to the control time corresponding to each control operation.
Further, the game control program when executed by the processor further performs the following operations:
respectively sampling each electroencephalogram data in the second electroencephalogram data based on a preset time window to obtain a second sampling signal;
calculating a second wavelet entropy of each of the second sampling signals within the preset time window;
and determining a preset wavelet entropy based on each second wavelet entropy, and taking the preset wavelet entropy as the preset electroencephalogram data.
Further, the game control program when executed by the processor further performs the following operations:
determining maximum heart rate data and minimum heart rate data in the second heart rate data;
determining the preset heart rate range based on the maximum heart rate data and the minimum heart rate data.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.