CN109771940B - Game control method, device and computer readable storage medium - Google Patents

Game control method, device and computer readable storage medium Download PDF

Info

Publication number
CN109771940B
CN109771940B CN201910094470.1A CN201910094470A CN109771940B CN 109771940 B CN109771940 B CN 109771940B CN 201910094470 A CN201910094470 A CN 201910094470A CN 109771940 B CN109771940 B CN 109771940B
Authority
CN
China
Prior art keywords
preset
electroencephalogram
game control
electroencephalogram data
wavelet entropy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910094470.1A
Other languages
Chinese (zh)
Other versions
CN109771940A (en
Inventor
韩璧丞
程翼
张胜男
高远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Qiangnao Technology Co ltd
Original Assignee
Zhejiang Qiangnao Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Qiangnao Technology Co ltd filed Critical Zhejiang Qiangnao Technology Co ltd
Priority to CN201910094470.1A priority Critical patent/CN109771940B/en
Publication of CN109771940A publication Critical patent/CN109771940A/en
Application granted granted Critical
Publication of CN109771940B publication Critical patent/CN109771940B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a game control method, which comprises the following steps: 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, acquiring game control operation corresponding to the preset electroencephalogram data matched with the first electroencephalogram data; executing the game control operation in the game scene. The invention also discloses a game control device and a computer readable storage medium. The invention can execute the corresponding game control operation in the game scene according to the electroencephalogram signals of the user, thereby realizing the touch-free operation of the game and improving the user experience.

Description

Game control method, device and computer readable storage medium
Technical Field
The invention relates to the technical field of brain waves, in particular to a game control method, a game control device and a computer readable storage medium.
Background
In the prior art, mobile terminals (such as mobile phones, tablet computers, etc.) have become electronic devices preferred and most frequently used by users. Along with the popularization of smart phones, the interaction between people and the smart phones is more and more diversified, such as voice, fingerprints, irises, human faces, images and the like, but the information sent by the engine brain of a human body is not related at present. The existing game scene realizes the control of the game based on the press control of the user on the touch screen, and the non-touch operation of the game cannot be realized, so that the experience degree of the user on the game is influenced.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a game control method, a game control device and a computer readable storage medium, and aims to solve the technical problem that the touchless operation of a game cannot be realized at present.
In order to achieve the above object, the present invention provides a game control method including the steps of:
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 storing the acquired first electroencephalogram signal into 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, acquiring game control operation corresponding to the preset electroencephalogram data matched with the first electroencephalogram data;
executing the game control operation in the game scene.
In an embodiment, the step of determining whether the first electroencephalogram data matches preset electroencephalogram data includes:
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.
In an embodiment, the step of determining whether the first electroencephalogram data matches preset electroencephalogram data based on the first wavelet entropy includes:
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 the preset electroencephalogram data.
In one embodiment, after the step of performing the game control operation in the game scene, the game control method further includes:
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.
In an embodiment, before the step of acquiring, in real time, a first electroencephalogram signal acquired by an electroencephalogram acquisition device corresponding to a terminal when the terminal is in a game scene, the game control method further includes:
when the 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 storing the acquired second electroencephalogram signal into 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 before the current moment are acquired based on a second electroencephalogram signal stored in the preset storage area;
and determining preset electroencephalogram data based on the second electroencephalogram data, and storing the determined preset electroencephalogram data and the control operation in an associated manner.
In an embodiment, when it is detected that the terminal executes the control operation corresponding to the game scene at present, the step of acquiring, based on the second electroencephalogram signal stored in the preset storage area, second electroencephalogram data acquired by the electroencephalogram acquisition device within a preset time period before the present time includes:
when the control operation corresponding to the game scene executed by the terminal is detected, updating the operation times of the control operation;
and when the updated operation times are greater than the preset times, acquiring electroencephalogram data acquired by the electroencephalogram acquisition device in 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 taking the acquired electroencephalogram data as second electroencephalogram data.
In one embodiment, the step of determining the preset electroencephalogram data based on the second electroencephalogram data includes:
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.
In one embodiment, after the step of updating the number of operations of the control operation, the game control method further includes:
and when the operation times are less than or equal to the preset times, continuously acquiring a second electroencephalogram signal acquired by the electroencephalogram acquisition device corresponding to the terminal in real time, and storing the acquired second electroencephalogram signal into a preset storage area.
Further, in order to achieve the above object, the present invention provides a game control device including: a memory, a processor and a game control program stored on the memory and executable on the processor, the game control program when executed by the processor implementing the steps of the game control method of any of the above.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium having a game control program stored thereon, the game control program, when executed by a processor, implementing the steps of the game control method described in any one of the above.
The invention acquires the first electroencephalogram signal acquired by the electroencephalogram acquisition device corresponding to the terminal in real time when the terminal is in a game scene, and stores the acquired first electroencephalogram signal to a preset storage area, then, based on the first electroencephalogram signal currently stored in the preset storage area, whether the first electroencephalogram data acquired by the electroencephalogram acquisition device is matched with the preset electroencephalogram data within a preset time before the current moment is determined, then when the first electroencephalogram signal is matched with the preset electroencephalogram data, the game control operation corresponding to the preset electroencephalogram data matched with the first electroencephalogram signal is obtained, and then, the game control operation is executed in the game scene, and the corresponding game control operation can be executed in the game scene according to the electroencephalogram signals of the user, so that the touch-free operation of the game is realized, and the user experience is improved.
Drawings
Fig. 1 is a schematic structural diagram of a game control apparatus in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a game control method according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not 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: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 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, a memory 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, the network interface 1004 is mainly used for connecting with a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be used to invoke a game control program stored in the memory 1005.
In this embodiment, the game control apparatus includes: a memory 1005, a processor 1001 and a game control program stored in the memory 1005 and operable on the processor 1001, wherein when the processor 1001 calls the game control program stored in the memory 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 storing the acquired first electroencephalogram signal into 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, acquiring game control operation corresponding to the preset electroencephalogram data matched with the first electroencephalogram data;
executing the game control operation in the game scene.
Further, the processor 1001 may call the game control program stored in the memory 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, the processor 1001 may call the game control program stored in the memory 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, the processor 1001 may call the game control program stored in the memory 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, the processor 1001 may call the game control program stored in the memory 1005, and also perform the following operations:
when the 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 storing the acquired second electroencephalogram signal into 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 before the current moment are acquired based on a second electroencephalogram signal stored in the preset storage area;
and determining preset electroencephalogram data based on the second electroencephalogram data, and storing the determined preset electroencephalogram data and the control operation in an associated manner.
Further, the processor 1001 may call the game control program stored in the memory 1005, and also perform the following operations:
when the control operation corresponding to the game scene executed by the terminal is detected, updating the operation times of the control operation;
and when the updated operation times are greater than the preset times, acquiring electroencephalogram data acquired by the electroencephalogram acquisition device in 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 taking the acquired electroencephalogram data as second electroencephalogram data.
Further, the processor 1001 may call the game control program stored in the memory 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, the processor 1001 may call the game control program stored in the memory 1005, and also perform the following operations:
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 an electroencephalogram acquisition device corresponding to the terminal in real time and storing the acquired second electroencephalogram signal into a preset storage area
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.
In this embodiment, the game control method includes:
the method comprises the steps that S100, when a terminal is in a game scene, a first electroencephalogram signal collected by an electroencephalogram collection device corresponding to the terminal is obtained in real time, and the obtained first electroencephalogram signal is 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, a collection button/key may be set in the electroencephalogram collection device, and when the terminal is in a game scene, if the user wears the electroencephalogram collection device and receives a collection instruction triggered by the collection button/key set in the electroencephalogram collection device, a first electroencephalogram signal collected by the electroencephalogram collection device corresponding to the terminal is obtained in real time, and the obtained first electroencephalogram signal is stored in a preset storage area. Or, triggering an acquisition instruction through a game application operated by the terminal, specifically, sending acquisition execution to the electroencephalogram acquisition device when detecting that the terminal is in a game scene, so that the electroencephalogram acquisition device acquires an electroencephalogram signal of a user, and acquires a first electroencephalogram signal acquired by the electroencephalogram acquisition device corresponding to the terminal in real time.
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 duration before the current time, the first electroencephalogram data acquired by the electroencephalogram acquisition device, that is, the electroencephalograms in the preset duration before the current time are acquired from the first electroencephalograms stored in the preset storage area, and the acquired electroencephalograms are used 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, obtaining game control operation corresponding to the preset electroencephalogram data matched with the first electroencephalogram data;
step S500, executing the game control operation in the game scene.
In this embodiment, if the first electroencephalogram data is matched with the preset electroencephalogram data, the game control operation corresponding to the preset electroencephalogram data matched with the first electroencephalogram data is acquired, and the game control operation is executed in the game scene. The game control method comprises the steps of setting a plurality of preset electroencephalogram data, wherein each preset electroencephalogram data corresponds to a game control operation, and when target electroencephalogram data matched with first electroencephalogram data exists in the preset electroencephalogram data, obtaining the game control operation corresponding to the target electroencephalogram data.
The game control method provided by this embodiment is implemented by acquiring a first electroencephalogram signal acquired by an electroencephalogram acquisition device corresponding to a terminal in real time when the terminal is in a game scene, storing the acquired first electroencephalogram signal in a preset storage area, determining whether first electroencephalogram data acquired by the electroencephalogram acquisition device matches preset electroencephalogram data within a preset time before the current time based on the first electroencephalogram signal currently stored in the preset storage area, acquiring a game control operation corresponding to the preset electroencephalogram data matching the first electroencephalogram signal when the first electroencephalogram signal matches the preset electroencephalogram data, and executing the game control operation in the game scene, so that a corresponding game control operation can be executed in the game scene according to an electroencephalogram signal of a user, thereby implementing a touch-free operation of a game, the 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 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 of a user, the touch-free operation of a 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 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 S500, the game control method further includes:
step S501, 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 S502, a target wavelet entropy is calculated 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, improve the accuracy of the preset wavelet entropy, further improve the accuracy of the subsequent execution of the game control operation, and further improve 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 S600, 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 storing the acquired second electroencephalogram signal to a preset storage area;
in this embodiment, when a user wears the electroencephalogram acquisition device, if a terminal is in a game scene, a second electroencephalogram signal acquired by the electroencephalogram acquisition device corresponding to the terminal is acquired in real time, and the acquired second electroencephalogram signal is stored in a preset storage area.
Step S700, when it is detected that the terminal executes the control operation corresponding to the game scene at present, second electroencephalogram data acquired by the electroencephalogram acquisition device within a preset time before the present moment are acquired based on a second electroencephalogram 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 electroencephalogram data acquired by the electroencephalogram acquisition device, that is, the electroencephalogram signal in the preset duration before the present time is acquired from the second electroencephalogram signal stored in the preset storage area, which is acquired from the electroencephalogram acquisition device in the preset duration before the present time, is detected, and the acquired electroencephalogram signal is used as the second electroencephalogram data.
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 within the preset duration before the current time is acquired based on the second electroencephalogram signal currently stored in the preset storage area.
Step S800, determining preset electroencephalogram data based on the second electroencephalogram data, and storing the determined preset electroencephalogram data 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, and the determined preset electroencephalogram data and the control operation are stored in an associated manner, specifically, the second wavelet entropy corresponding to the second electroencephalogram data can be calculated, and the second wavelet entropy is set as the preset wavelet entropy corresponding to the preset electroencephalogram data.
The game control method provided by this embodiment is implemented by acquiring a second electroencephalogram signal acquired by an electroencephalogram acquisition device corresponding to a terminal in real time when the terminal is in a game scene, storing the acquired second electroencephalogram signal in a preset storage area, then acquiring second electroencephalogram data acquired by the electroencephalogram acquisition device within a preset time period before a current moment based on the second electroencephalogram signal stored in the preset storage area when it is detected that the current terminal executes a control operation corresponding to the game scene, then determining preset electroencephalogram data based on the second electroencephalogram data, and storing the determined preset electroencephalogram data and the control operation in association with each other, thereby setting the preset electroencephalogram data according to electroencephalogram data of a user when the terminal executes the control operation corresponding to the game scene, and further obtaining accurate preset electroencephalogram data, the accuracy of the subsequent execution of the game control operation is improved, and the user experience is further improved.
A sixth embodiment of the game control method of the present invention is proposed based on the fifth embodiment, and in this embodiment, step S700 includes:
step S710, when detecting that the current terminal executes the control operation corresponding to the game scene, updating the operation times of the control operation;
and S720, when the updated operation times are larger than the preset times, acquiring electroencephalogram data acquired by the electroencephalogram acquisition device in 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 taking the acquired electroencephalogram data as second electroencephalogram data.
In this embodiment, when it is detected that the current terminal executes the control operation corresponding to the game scene, that is, when it is detected that the terminal executes the control operation in the game scene, the operation frequency (execution frequency) of the control operation is updated, that is, the current operation frequency plus one is used as the updated operation frequency, if the updated operation frequency is greater than the preset frequency, the electroencephalogram data acquired by the electroencephalogram acquisition device, that is, the electroencephalogram data acquired by the electroencephalogram acquisition device in the preset duration before the control time corresponding to each control operation is acquired based on the second electroencephalogram signal stored in the preset storage area, that is, the electroencephalogram data acquired by the electroencephalogram acquisition device in the preset duration before the control time at which each control operation is executed is acquired, are acquired, and each acquired electroencephalogram data is used as the second electroencephalogram data.
Further, in an embodiment, after the step S710, the method further includes: and when the operation times are less than or equal to the preset times, continuously executing the step of acquiring a second electroencephalogram signal acquired by the electroencephalogram acquisition device corresponding to the terminal in real time when the terminal is in a game scene, and storing the acquired second electroencephalogram signal into a preset storage area.
In other embodiments, if the updated operation times are less than or equal to the preset times, the step of acquiring a second electroencephalogram signal acquired by the electroencephalogram acquisition device corresponding to the terminal in real time when the terminal is in a game scene, and storing the acquired second electroencephalogram signal into a preset storage area is continuously executed.
According to the game control method provided by the embodiment, when the control operation corresponding to the game scene executed by the terminal is detected, the operation times of the control operation are updated, and then when the operation times are larger than the preset times, the electroencephalogram data acquired by the electroencephalogram acquisition device are acquired within the preset time before the control time corresponding to each control operation based on the second electroencephalogram signal stored in the preset storage area, and the acquired electroencephalogram data are used as the second electroencephalogram data, so that the second electroencephalogram data can be accurately acquired according to the control operation corresponding to the game scene executed by the terminal, the accurate preset electroencephalogram data can be acquired according to the second electroencephalogram data, the accuracy of the subsequent execution of the game control operation is improved, and the user experience is further improved.
A seventh embodiment of the game control method of the present invention is proposed based on the sixth embodiment, and in this embodiment, step S800 includes:
step S810, sampling each electroencephalogram data in the second electroencephalogram data based on a preset time window to obtain a second sampling signal;
step S820, calculating a second wavelet entropy of each of the second sampling signals within the preset time window;
step S830, a preset wavelet entropy is determined based on each second wavelet entropy, and the preset wavelet entropy is used 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.
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 storing the acquired first electroencephalogram signal into 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, acquiring game control operation corresponding to the preset electroencephalogram data matched with the first electroencephalogram data;
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 operations of:
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 the 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 storing the acquired second electroencephalogram 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 before the current moment are acquired based on a second electroencephalogram signal stored in the preset storage area;
and determining preset electroencephalogram data based on the second electroencephalogram data, and storing the determined preset electroencephalogram data 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 executed by the terminal is detected, updating the operation times of the control operation;
and when the updated operation times are greater than the preset times, acquiring electroencephalogram data acquired by the electroencephalogram acquisition device in 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 taking the acquired electroencephalogram data as second electroencephalogram data.
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:
and when the operation times are less than or equal to the preset times, continuously acquiring a second electroencephalogram signal acquired by the electroencephalogram acquisition device corresponding to the terminal in real time, and storing the acquired second electroencephalogram signal into a preset storage area.
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.

Claims (8)

1. A game control method, characterized by comprising the steps of:
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 storing the acquired first electroencephalogram signal into 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, acquiring game control operation corresponding to the preset electroencephalogram data matched with the first electroencephalogram data;
executing the game control operation in the game scene;
the step of determining whether the first electroencephalogram data is matched with preset electroencephalogram data or not comprises the following steps of:
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;
determining whether the first electroencephalogram data is matched with preset electroencephalogram data or not based on the first wavelet entropy;
when the game control operation is executed, acquiring the execution times of the game control operation corresponding to a preset wavelet entropy corresponding to the preset electroencephalogram data, and calculating a first weight value and a second weight value based on the execution times, wherein the first weight value = 1/(execution times +1), and the second weight value = execution times/(execution times + 1);
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, wherein the target wavelet entropy = the first weight value plus the first wavelet entropy plus the second weight value plus the preset wavelet entropy.
2. The game control method of claim 1, wherein the step of determining whether the first brain electrical data matches preset brain electrical data based on the first wavelet entropy comprises:
calculating a difference value between the first wavelet entropy and a preset wavelet entropy;
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 the preset electroencephalogram data.
3. The game control method according to any one of claims 1 to 2, wherein before the step of acquiring the first electroencephalogram signal acquired by the electroencephalogram acquisition device corresponding to the terminal in real time when the terminal is in a game scene, the game control method further comprises:
when the 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 storing the acquired second electroencephalogram 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 before the current moment are acquired based on a second electroencephalogram signal stored in the preset storage area;
and determining preset electroencephalogram data based on the second electroencephalogram data, and storing the determined preset electroencephalogram data and the control operation in an associated manner.
4. The game control method of claim 3, wherein the step of acquiring, based on the second electroencephalogram signal stored in the preset storage area, second electroencephalogram data acquired by the electroencephalogram acquisition device within a preset duration before the current time when it is detected that the current terminal executes the control operation corresponding to the game scene comprises:
when the control operation corresponding to the game scene executed by the current terminal is detected, updating the operation times of the control operation;
and when the updated operation times are greater than the preset times, acquiring electroencephalogram data acquired by the electroencephalogram acquisition device in 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 taking the acquired electroencephalogram data as second electroencephalogram data.
5. The game control method of claim 4, wherein the step of determining the preset brain electrical data based on the second brain electrical data comprises:
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.
6. The game control method according to claim 4, wherein after the step of updating the number of operations of the control operation, the game control method further comprises:
and when the operation times are less than or equal to the preset times, continuously acquiring a second electroencephalogram signal acquired by the electroencephalogram acquisition device corresponding to the terminal in real time, and storing the acquired second electroencephalogram signal into a preset storage area.
7. A game control apparatus, characterized in that the game control apparatus comprises: memory, a processor and a game control program stored on the memory and executable on the processor, the game control program when executed by the processor implementing the steps of the game control method of any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that a game control program is stored thereon, which when executed by a processor implements the steps of the game control method according to any one of claims 1 to 6.
CN201910094470.1A 2019-01-30 2019-01-30 Game control method, device and computer readable storage medium Active CN109771940B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910094470.1A CN109771940B (en) 2019-01-30 2019-01-30 Game control method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910094470.1A CN109771940B (en) 2019-01-30 2019-01-30 Game control method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109771940A CN109771940A (en) 2019-05-21
CN109771940B true CN109771940B (en) 2022-06-07

Family

ID=66503742

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910094470.1A Active CN109771940B (en) 2019-01-30 2019-01-30 Game control method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109771940B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116158944B (en) * 2023-04-11 2023-07-14 深圳市景创科技电子股份有限公司 Control method, terminal equipment and medium for modal custom mapping rehabilitation assistance

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106580319A (en) * 2016-12-20 2017-04-26 广州视源电子科技股份有限公司 Electroencephalogram relaxation recognition method and apparatus based on wavelet transform

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100306295B1 (en) * 1999-07-24 2001-09-24 박병운 Game machine using brain waves and method therefor
CN104545901B (en) * 2015-01-29 2016-09-21 中国科学院电子学研究所 Brain electricity detecting system
CN106445155A (en) * 2016-09-29 2017-02-22 珠海市魅族科技有限公司 Controlling method and virtual reality equipment based on electroencephalogram eeg
CN107463792B (en) * 2017-09-21 2023-11-21 北京大智商医疗器械有限公司 Nerve feedback device, system and method
CN108279777B (en) * 2018-02-11 2021-06-25 Oppo广东移动通信有限公司 Brain wave control method and related equipment
CN108339267B (en) * 2018-02-13 2022-01-04 Oppo广东移动通信有限公司 Game menu control method based on brain wave and related product

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106580319A (en) * 2016-12-20 2017-04-26 广州视源电子科技股份有限公司 Electroencephalogram relaxation recognition method and apparatus based on wavelet transform

Also Published As

Publication number Publication date
CN109771940A (en) 2019-05-21

Similar Documents

Publication Publication Date Title
CN109567797B (en) Epilepsy early warning method and device and computer readable storage medium
CN109246360B (en) Prompting method and mobile terminal
EP3637290B1 (en) Unlocking control method and related product
CN106921791B (en) Multimedia file storage and viewing method and device and mobile terminal
CN109005336B (en) Image shooting method and terminal equipment
CN107749046B (en) Image processing method and mobile terminal
CN107741814B (en) Display control method and mobile terminal
CN108874906B (en) Information recommendation method and terminal
CN107783747B (en) Interface display processing method and mobile terminal
CN110187771B (en) Method and device for interaction of air gestures, wearable equipment and computer storage medium
CN109618218B (en) Video processing method and mobile terminal
CN107832067B (en) Application updating method, mobile terminal and computer readable storage medium
CN109669710B (en) Note processing method and terminal
CN110944056A (en) Interaction method, mobile terminal and readable storage medium
CN108959585B (en) Expression picture obtaining method and terminal equipment
CN111797148A (en) Data processing method, data processing device, storage medium and electronic equipment
CN109771940B (en) Game control method, device and computer readable storage medium
CN107967086B (en) Icon arrangement method and device for mobile terminal and mobile terminal
CN107809515B (en) Display control method and mobile terminal
CN111310165B (en) Account switching or registering method and electronic equipment
CN110166621B (en) Word processing method and terminal equipment
CN108563940B (en) Control method and mobile terminal
CN107728919B (en) Image display method and mobile terminal
CN107844203B (en) Input method candidate word recommendation method and mobile terminal
CN107730030B (en) Path planning method and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant