Real-time classification method, device, storage medium and electronic device for spike signal

By using correlation coefficients to classify spike signals, the problems of large resource consumption and long processing time in the prior art are solved, and efficient real-time classification is achieved, which is suitable for portable low-power applications.

CN115146671BActive Publication Date: 2025-04-18GUANGDONG MEDICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210667279.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-13
Publication Date
2025-04-18
Estimated Expiration
2042-06-13

AI Technical Summary

Technical Problem

The prior art consumes a lot of resources and takes a long processing time in the real-time classification of spike signals, making it difficult to meet the requirements of real-time processing and low power consumption.

Method used

Using correlation coefficients as classification criteria, by calculating the correlation coefficient between the spike signal and the group center, determining the group to which the signal belongs and updating the group center, avoiding the generation of intermediate state groups, thereby reducing the consumption of storage and computing resources.

Benefits of technology

It realizes efficient real-time classification of spike signals, saves storage resources, reduces computing processes, simplifies the implementation architecture, and is suitable for portable low-power application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115146671B_ABST
    Figure CN115146671B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a real-time classification method, device, storage medium and electronic device for spike signals, which relates to the field of signal classification. The present application uses correlation coefficients to classify spike signals, and the classification process does not generate intermediate state groups, thereby saving storage resources and reducing the calculation process, while streamlining the implementation architecture, laying the foundation for portable and low-power application scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of signal classification, and in particular to a real-time classification method, device, storage medium and electronic device for spike signals. Background Art

[0002] The brain is the control center of our body and the center for exchanging information with the outside world. The smallest functional unit in the brain is the neuron, which is responsible for the transmission and processing of information in the brain. The information transmitted and processed by the neuron is the action potential, also known as the spike. The recording of neuronal information is mainly done by extracellular recording, especially for in vivo, multi-channel neuronal information recording systems, where extracellular recording is almost the only practical recording technology. Extracellular recording is to place the recording electrode close to the cell to capture the discharge information of the neuron. Since the cell is very small and often sticks together, the same electrode will record the discharge information of several surrounding neurons. The method of classifying the recorded neuronal information (spike) into which neuron it is generated is the spike sorting algorithm. Through spike sorting, we can accurately obtain the discharge information of a single neuron, thus laying the foundation for decoding the function of neural circuits or neural networks.

[0003] With the development of neuron recording technology, especially the use of silicon electrodes, neuron information recording systems have developed to thousands of channels. Using these systems, one hour of recording will generate TByte-level signals. Using traditional spike signal classification algorithms, it takes weeks or even months to do spike sorting, while real-time spike sorting systems or hardware accelerators can speed up this data analysis process. At the same time, a more important class of applications, such as closed-loop control systems for neurons (such as the treatment of common neurological diseases), requires millisecond-level processing of spike information. These practical applications have shown a strong demand for real-time classification systems for neuron information.

[0004] For the real-time classification system of neuronal spike potential, Osorter is a commonly used real-time classification algorithm and has been implemented in different forms of hardware architecture to complete real-time spike sorting. The workflow of Osorter includes: the input spike is first compared with all group centers by distance D. If the minimum distance (min(D)) is greater than T c(Spike classification threshold), the distance is far and it is not close to any group, indicating that this spike does not belong to any group. At this time, a new group is created. If min(D) < Tc, this spike will be classified into the group where min(D) is located. Since a new spike enters, the center of the min(D) group needs to be updated. Then, calculate the distance D between the updated group center and other group centers. all , if there exists D all less than T m (Merger threshold between classification groups), indicating that there are two classification groups with very close centers. At this time, the algorithm will merge these very close groups into a new group and update the center of the new group. Then, continue to calculate the distance between the new group center and the remaining group centers, and repeat this process until the distances between all group centers are greater than T. c . After completion, the algorithm then classifies the next input spike and continues this process until all spikes have been classified.

[0005] From the description of the Osorter algorithm, we can see that during the operation of the algorithm, an uncertain number of intermediate state groups will be generated, and these intermediate state groups will eventually converge to the final several groups through merging. However, under different levels of noise, the number of intermediate state groups generated during the classification process is different. A large number of intermediate state groups will be generated under a small number of classification results. The existence of intermediate state groups not only requires storage resources to save them, but also during the classification process, the input spike needs to calculate distances with all intermediate state groups to determine the classification group. After the classification group is determined, all intermediate state groups also need to be calculated to merge the groups with relatively close distances to each other, and each input spike has to go through these calculation processes. Therefore, the existence of intermediate state groups makes the entire classification process require a large amount of storage and computing resources, occupies a large amount of computing time, and is not friendly to the implementation of portable, low-power, and strong real-time requirements.

[0006] Application Contents

[0007] The embodiments of the present application provide a real-time classification method, device, storage medium, and electronic device for spike signals, which can solve the problems of large resource consumption and long processing time in the prior art during the real-time classification of spike signals. The technical solutions are as follows:

[0008] In a first aspect, the embodiments of the present application provide a real-time classification method for spike signals, and the method includes:

[0009] Collect the current spike signal through a spike detection device;

[0010] Counting the sequence number of the current spike signal;

[0011] Calculating the correlation coefficients between the current spike signal and the group centers of the m groups respectively to obtain m correlation coefficients; wherein m is an integer greater than 1;

[0012] determining a maximum value among the m correlation coefficients;

[0013] Determining whether the maximum value is greater than a correlation coefficient threshold;

[0014] If yes, put the current spike signal into the group corresponding to the maximum value, update the group center of the group and increase the number of spike signals of the group by 1;

[0015] Determine whether the sequence number is an integer multiple of a first cycle number threshold;

[0016] If yes, query whether there is a group in the m groups whose number of spike signals is less than the first number threshold;

[0017] If yes, delete the spike signal in the queried group, clear the number of spike signals in the queried group to zero, and delete the group center of the queried group;

[0018] Determine whether the sequence number is an integer multiple of a second cycle number threshold; wherein the first cycle number threshold is less than the second cycle number threshold;

[0019] If yes, query whether there is a group in the m groups whose number of spike signals is less than a second number threshold; wherein the first number threshold is less than the second number threshold;

[0020] If yes, delete the spike signal in the queried group, clear the number of spike signals in the queried group, and delete the group center of the queried group.

[0021] In a second aspect, an embodiment of the present application provides a real-time classification device for spike signals, the device comprising:

[0022] A collection unit, used for collecting the current spike signal through a spike detection device;

[0023] A statistical unit, used for counting the sequence number of the current spike signal;

[0024] A classification unit is used to respectively calculate the correlation coefficient between the current spike signal and the group center of m groups to obtain m correlation coefficients; wherein m is an integer greater than 1; determine a maximum value among the m correlation coefficients; determine whether the maximum value is greater than a correlation coefficient threshold; if yes, put the current spike signal into the group corresponding to the maximum value, update the group center of the group and increase the number of spike signals of the group by 1; determine whether the sequence number is an integer multiple of a first cycle number threshold; if yes, query whether there is a group in the m groups whose number of spike signals is less than the first number threshold; if yes if yes, delete the spike signal in the queried group, clear the number of spike signals in the queried group, and delete the group center of the queried group; determine whether the sequence number is an integer multiple of a second cycle number threshold; wherein the first cycle number threshold is less than the second cycle number threshold; if yes, query whether there is a group in the m groups whose number of spike signals is less than the second number threshold; wherein the first number threshold is less than the second number threshold; if yes, delete the spike signal in the queried group, clear the number of spike signals in the queried group, and delete the group center of the queried group.

[0025] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.

[0026] In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.

[0027] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:

[0028] This application uses correlation coefficients to classify spike signals. The classification process does not generate intermediate state groups, thereby saving storage resources and reducing the calculation process. At the same time, it simplifies the implementation architecture and lays the foundation for portable and low-power application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0030] Figure 1is a schematic diagram of the structure of a spike signal classification system provided in an embodiment of the present application;

[0031] Figure 2 It is a flowchart of a real-time classification method of spike signals provided in an embodiment of the present application;

[0032] Figure 3 It is a structural diagram of a real-time classification device for spike signals provided in an embodiment of the present application;

[0033] Figure 4 is another structural schematic diagram of a real-time classification device for spike signals provided by the present application;

[0034] Figure 5 It is a structural schematic diagram of an electronic device provided by this application. DETAILED DESCRIPTION

[0035] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0036] It should be noted that the real-time classification method of spike signals provided in the present application is generally performed by an electronic device, and accordingly, the real-time classification device of spike signals is generally arranged in the electronic device.

[0037] See also Figure 1 The present application provides a schematic diagram of the structure of a spike signal classification system according to an embodiment, the system comprising: a collection electrode 1, an amplification circuit 2, an analog-to-digital conversion circuit 3 and a real-time classification device 4.

[0038] The collecting electrode 1 is connected to the amplifying circuit 2 , the amplifying circuit 2 is connected to the analog-to-digital conversion circuit 3 , and the analog-to-digital conversion circuit 3 is connected to the real-time classification device 4 .

[0039] Among them, the acquisition circuit 1 is used to collect the neuron signal of the test object, which is an analog signal. The amplification circuit 2 amplifies the neuron signal. The analog-to-digital conversion circuit 3 performs analog-to-digital conversion on the amplified neuron signal to obtain a spike signal in digital form. The real-time classification device 4 classifies the spike signal based on a classification algorithm of the correlation coefficient.

[0040] The following will be combined with the attached Figure 2 , the real-time classification method of spike signals provided in the embodiment of the present application is described in detail. Among them, the real-time classification device of spike signals in the embodiment of the present application can be Figure 1 Electronic equipment shown.

[0041] See also Figure 2, which is a flowchart of a real-time classification method for spike signals provided in an embodiment of the present application. Figure 2 As shown, the method of the embodiment of the present application may include the following steps:

[0042] S201. Collect the current spike signal through a spike detection device.

[0043] The spike detection device periodically collects spike signals from neurons, which are digital signals, and the real-time classification device obtains the current spike signals.

[0044] S202: Count the sequence number of the current spike signal.

[0045] The real-time classification device counts the spike signals collected each time, and the count value is the sequence number. The real-time classification device counts the sequence number of the current spike signal, set as N total .

[0046] S203 , respectively calculating correlation coefficients between the current spike signal and the group centers of the m groups to obtain m correlation coefficients.

[0047] Among them, the spike signals emitted from the same neuron belong to the same category and need to be divided into the same group. Therefore, the number of groups m can be determined according to the number of neurons, where m is an integer greater than 1. Each group has a group center, which is the clustering center of the group. The group center can be obtained by weighted average of each member in the group. The real-time classification device calculates the correlation coefficient between the current spike signal and the group centers of m groups to obtain m correlation coefficients.

[0048] S204. Determine the maximum value among the m correlation coefficients.

[0049] The real-time classification device sorts the m correlation coefficients and determines the maximum value among the m correlation coefficients.

[0050] S205: Determine whether the maximum value is greater than the correlation coefficient threshold.

[0051] Among them, the real-time classification device is pre-configured with a correlation coefficient threshold ρ th , let max(ρ) be the maximum value determined in S204. If max(ρ)>ρ th , execute S206, if max(ρ)≤ρ th , execute S212.

[0052] S206: Add the current spike signal to the group corresponding to the maximum value, update the group center of the group, and increase the number of spike signals in the group by 1.

[0053] For example: assuming that the number of neurons is 4, then m=4, and a total of 4 groups need to be divided, namely group 1, group 2, group 3 and group 4. Assuming that the group corresponding to the maximum value is group 2, and the number of spike signals in group 2 is 20, then after adding the current spike signal to group 2, the number of spike signals in group 2 increases to 21. Since the members in group 2 are updated, the group center of group 2 is also updated accordingly.

[0054] S207: Determine whether the sequence number of the current spike signal is an integer multiple of the first cycle number threshold.

[0055] The real-time classification device is pre-configured with a first cycle number threshold. The real-time classification device performs modulo calculation on the sequence number of the current spike signal and the first cycle number threshold to obtain a modulus value. Suppose the sequence number of the current spike signal is N total , the first cycle number threshold is N loop1 , if N total %N loop1 =0, execute S208, if N total %N loop1 ≠0, continue to execute S201, that is, obtain the next spike signal through the spike detection device, and count the sequence number of the next spike signal as N total +1, and then continue to execute S202 to S216.

[0056] S208 , query whether there is a group among the m groups whose number of spike signals is less than a first number threshold.

[0057] The real-time classification device is pre-configured with a first quantity threshold, which is set to G size1 , the real-time classification device traverses the number N of spike signals in each group in m groups. If N is less than G size1 , execute S209, otherwise, execute S201, that is, obtain the next spike signal through the spike detection device, and count the sequence number of the next spike signal as N total +1, and then continue to execute S202 to S216.

[0058] S209: Delete the spike signals in the queried group, clear the number of spike signals in the queried group to zero, and delete the group center of the queried group.

[0059] The number of the queried groups may be one or more, and the real-time classification device deletes the spike signals in the queried group, clears the number of spike signals of the queried group to zero, and deletes the group center of the group.

[0060] S210: Determine whether the sequence number of the spike signal is an integer multiple of a second cycle number threshold.

[0061] The real-time classification device is pre-configured with a second cycle number threshold, which is greater than the first cycle number threshold. The second cycle number threshold is set to N loop2 , N total %N loop2 =0, execute S211; if N total %N loop2 ≠0, execute S201, obtain the next spike signal through the spike detection device, and configure the sequence number of the next spike signal to N total +1.

[0062] S211 , query whether there is a group among the m groups whose number of spike signals is less than a second number threshold.

[0063] The real-time classification device is pre-configured with a second quantity threshold G size2 , the second quantity threshold is greater than the first quantity threshold. The real-time classification device traverses the number N of spike signals in m groups. If N<G size2 , execute S208; if N ≥ G size2 , execute S201. The number of the queried groups may be one or more.

[0064] S212 , query whether there is a group with a spike signal quantity of 0 among the m groups.

[0065] The real-time classification device traverses the number of spike signals of m groups, and checks whether there is a group with a spike signal number of 0, if yes, executes S213, if not, executes S214. The number of the queried groups may be one or more.

[0066] S213: adding the current spike signal to any queried group, taking the current spike signal as the center of the group, and increasing the number of spike signals in the group by 1.

[0067] S214: discard the current spike signal, and count the number of discarded spike signals.

[0068] S215: Determine whether the number of discarded spike signals is greater than a discarded number threshold.

[0069] The real-time classification device is pre-configured with a discard quantity threshold D size , let D be the number of discarded spike signals, if D>D size , execute S216, if D≤D size , execute S201.

[0070] S216, deleting the spike signals and group centers in the m groups, and clearing the number of spikes in each group, the number of discarded spike signals, and the sequence number of the spike signals. In this way, the number of spike signals in the m groups is 0, the discarded spike signal is 0, and when the real-time classification device takes the next spike signal, the sequence number of the spike signal is 1.

[0071] This application uses correlation coefficients to classify neuron peak potentials (spike signals), because the correlation coefficient measures the shape of the spike signal rather than the distance; and the spike signal generated by the same neuron is generally considered to be relatively unchanged in shape. Although the recorded spike signal amplitude may change due to the influence of recording noise, the shapes of the spike signals in the same group are highly similar, so there will be a large correlation coefficient value; and the shapes of the spike signals between different groups are different, and their correlation coefficients are low or even negative. Under the guidance of the correlation coefficient, the classification process may produce correct groupings, and even if there are interference groups, they will be removed in the cycle detection, so there will not be a large number of intermediate state groups, which greatly simplifies the hardware implementation and lays the foundation for the future development of portable, low-power brain neuron signal analysis equipment.

[0072] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0073] See also Figure 3 Shown is a schematic diagram of the structure of a real-time classification device for spike signals.

[0074] The real-time classification device of spike signals of the present application is used for real-time classification of spike signals of brain neurons. The neuron recording system is used to record brain neuron signals and convert them into digital signals; the spike detection device is used to extract spike signals from the received digital neuron signals; the real-time classification device of spike signals classifies the extracted spike signals into different groups. The real-time classification device of spike signals in the present application includes various units and the connection relationship between the various units. Figure 3As shown, no further details will be given here. The three modules involved in this application can be presented in different hardware forms such as field-programmable gate array (FPGA) or integrated circuit design (IC) to reduce processing delay.

[0075] Among them, ρ thr G size1 G size2 N loop1 N loop2 D size The meaning of Figure 2 As explained in the flowchart, these parameters are implemented in the form of registers and can be adjusted according to the actual working conditions to achieve optimized performance. The number of classification groups is implemented as a fixed value in the hardware design. For a single-channel recording system, generally 4-6 groups can meet most recording situations (i.e., a single electrode can record 4-6 neuron signals). The implementation of multiple channels can be expanded based on this base. In the description of this application, 4 groups are used as an example to illustrate the workflow of the hardware system. The hardware implementation of other numbers of classification groups also follows the process Figure 2 .

[0076] When the spike signal real-time classification device (spike Sorting System) starts working, the received spike signal enters two modules: the correlation coefficient calculation module (ComputingCorrelationCoefficient) and the input spike counting module (Input spike Counter). The correlation coefficient calculation module calculates the correlation coefficient ρ between the input spike and the four groups of spike centers, and then Comparator 1 (Comparator 1) outputs the largest of the four correlation coefficients (Max(ρ)). At the same time, Max(ρ) and ρ th Compare the size in Comparator 2. If Max(ρ)>ρ th , indicating that the spike shapes of the input spike and the spike center of the Max(ρ) group are highly similar. At this time, the Update spike Center and Counter module can be enabled. The specific implementation is to recalculate the spike center of the group where Max(ρ) is located: spike Center1-4 (because the input spike is classified into this group, the group center will change); at the same time, add 1 to the spike counter (Counter1-4) of the group where Max(ρ) is located, and finally output the spike classification result sortingresult (the ID of the group where Max(ρ) is located). If Max(ρ)<ρth , indicating that the shape of the input spike is not similar to that of any group center spike. At this time, determine whether there is a vacancy in the group center: that is, whether the corresponding counter 1 to counter 4 values ​​are 0. If there is a vacancy (counter1-4 values ​​are 0), create a new group and put the input spike into the center of the new group. The counter value corresponding to the new group is increased by 1, and the ID of the new group, i.e., sortingresult, is output. If the corresponding counter 1 to counter 4 values ​​are not 0, the input spike does not belong to any existing group, and the spike is discarded. At the same time, enable counter 5 plus 1 to count the number of discarded spikes. The hardware will also compare whether the number of discarded spikes (counter5 value) exceeds D size , if counter5 is greater than D size , indicating that the system discards too many spikes. At this time, it is necessary to reset all spike group centers (spike Center1-4), center group counters (counter1-counter4) and input spike counting modules (Input spike Counter), and restart the entire classification process.

[0077] The input spike counting module (InputspikeCounter) calculates the total number of spikes entering the classification system N total , the hardware simultaneously calculates N total Is it divisible by N? loop1 and N loop2 . Set N loop1 To set each input N loop1 If there are spikes, we can detect the number of spikes in the four groups. Set N loop2 The same purpose is achieved every N loop2 Spikes are counted to detect the number of spikes in the four groups. In actual use, N is usually configured. loop1 Smaller, and N loop1 <N loop2 . Set a relatively small N loop1 The purpose is to find as early as possible some spikes that appear earlier but in abnormal circumstances occupy the spike classification group center (spike Center1-4): such as occasional interference, or abnormal recording noise (this kind of interference spike usually appears in small numbers and does not last, and because it appears earlier, it mistakenly occupies a limited spike group center position and is thus regarded as a valid classification group). When the input spike number is N loop1When the value is an integer multiple, check whether the value of counter1 to counter4 is less than G. size1 If it is less than , it means that the number of spikes in the corresponding group is too small, and there may be an interference group. At this time, it is necessary to remove the interference group from the classification group, so as to give the position of the spike center to the spike group of neurons that discharge normally. The process of removing the interference group is to reset the value of the spike center and the corresponding counter to 0. When the number of input spikes is N loop2 When the value is an integer multiple, the number of spikes in the four classification groups (counter1 to counter4) is also tested. The purpose is to eliminate the interference of the interference group on the final classification result. The detection threshold G is appropriately enlarged. size2 The purpose of this is to identify those that appear by chance but go beyond G size1 The interference group is cleared. After two rounds of cyclic detection (N loop1 and N loop2 ), the final result of this application is a classification result with a relatively stable discharge rate and full utilization of the 4 groups of hardware spike centers.

[0078] From the above implementation process, it can be seen that the method proposed in this application has only four classification groups working in the entire working process, and no other intermediate state groups are generated, so no additional storage is required to process the intermediate state groups. This not only saves memory requirements, but also reduces the calculation process required in the classification and merging process of the intermediate state groups, thereby simplifying the implementation architecture and speeding up the classification speed.

[0079] See also Figure 4 , which shows a schematic diagram of the structure of a real-time classification device for spike signals provided by an exemplary embodiment of the present application, hereinafter referred to as device 4. The device 4 can be implemented as all or part of an electronic device through software, hardware or a combination of both. The device 4 includes: a collection unit 401, a statistics unit 402, and a classification unit 403.

[0080] A collection unit 401 is used to collect the current spike signal through a spike detection device;

[0081] A statistical unit 402, used for counting the sequence number of the current spike signal;

[0082] The classification unit 403 is used to respectively calculate the correlation coefficient between the current spike signal and the group center of the m groups to obtain m correlation coefficients; wherein m is an integer greater than 1; determine a maximum value among the m correlation coefficients; determine whether the maximum value is greater than a correlation coefficient threshold; if so, put the current spike signal into the group corresponding to the maximum value, update the group center of the group and increase the number of spike signals of the group by 1; determine whether the sequence number is an integer multiple of a first cycle number threshold; if so, query whether there is a group in the m groups whose number of spike signals is less than the first number threshold; if If yes, delete the spike signals in the queried group, clear the number of spike signals in the queried group, and delete the group center of the queried group; determine whether the sequence number is an integer multiple of a second cycle number threshold; wherein the first cycle number threshold is less than the second cycle number threshold; if yes, query whether there is a group in the m groups whose number of spike signals is less than the second number threshold; wherein the first number threshold is less than the second number threshold; if yes, delete the spike signals in the queried group, clear the number of spike signals in the queried group, and delete the group center of the queried group.

[0083] In one or more possible embodiments, the classification unit 403 is further configured to:

[0084] If the maximum value is less than or equal to the correlation coefficient threshold, query whether there is a group with a spike signal number of 0 in the m groups;

[0085] If yes, add the current spike signal to any queried group, take the current spike signal as the group center of the group, and increase the number of spike signals of the group by 1;

[0086] The next spike signal is collected by the spike detection device,

[0087] The sequence number of the current spike signal is increased by 1 to obtain the sequence number of the next spike signal.

[0088] In one or more possible embodiments, the classification unit 403 is further configured to:

[0089] If there is no group with a spike signal number of 0 in the m groups, discard the current spike signal, and count the number of discarded spike signals;

[0090] Determine whether the number of discarded spike signals is greater than a discarded number threshold;

[0091] If yes, delete the spike signals and group centers in the m groups, and clear the number of spikes in each group and the number of discarded spike signals;

[0092] collecting the next spike signal by the spike detection device;

[0093] The sequence number of the next spike signal is reset to 1.

[0094] In one or more possible embodiments, the classification unit 403 is further configured to:

[0095] If the number of discarded spike signals is less than or equal to the discarded number threshold;

[0096] The next spike signal is collected by the spike detection device,

[0097] The sequence number of the current spike signal is increased by 1 to obtain the sequence number of the next spike signal.

[0098] In one or more possible embodiments, the classification unit 403 is further configured to:

[0099] If the sequence number of the current spike signal is not an integer multiple of the first cycle number threshold, the next spike signal is collected by the spike detection device,

[0100] The sequence number of the current spike signal is increased by 1 to obtain the sequence number of the next spike signal.

[0101] In one or more possible embodiments, the classification unit 403 is further configured to:

[0102] If there is no group in the m groups whose number of spike signals is less than the first number threshold, collecting the next spike signal by the spike detection device,

[0103] The sequence number of the current spike signal is increased by 1 to obtain the sequence number of the next spike signal.

[0104] In one or more possible embodiments, the classification unit 403 is further configured to:

[0105] If the current spike signal is not an integer multiple of the second cycle number threshold or there is no group in the m groups whose number of spike signals is less than the second number threshold, the next spike signal is collected by the spike detection device,

[0106] The sequence number of the current spike signal is increased by 1 to obtain the sequence number of the next spike signal.

[0107] It should be noted that, when the device 4 provided in the above embodiment executes the real-time classification method of spike signals, only the division of the above-mentioned functional modules is used as an example. In practical applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above-mentioned functions. In addition, the real-time classification device for spike signals provided in the above embodiment and the real-time classification method embodiment of spike signals belong to the same concept, and the embodiment and implementation process thereof are detailed in the method embodiment, which will not be repeated here.

[0108] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0109] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 2 The method steps of the embodiment shown in the figure can be found in the specific implementation process. Figure 2 The specific description of the illustrated embodiment will not be repeated here.

[0110] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the real-time classification method of spike signals described in the above embodiments.

[0111] See also Figure 5 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown, the electronic device 500 may include: at least one processor 501 , at least one network interface 504 , a user interface 503 , a memory 505 , and at least one communication bus 502 .

[0112] The communication bus 502 is used to realize the connection and communication between these components.

[0113] The user interface 503 may include a display screen (Display) and a camera (Camera), and the optional user interface 503 may also include a standard wired interface and a wireless interface.

[0114] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0115] Among them, the processor 501 may include one or more processing cores. The processor 501 uses various interfaces and lines to connect various parts within the entire electronic device 500, and executes various functions and processes data of the electronic device 500 by running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and calling data stored in the memory 505. Optionally, the processor 501 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 501 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 501, and it can be implemented separately through a chip.

[0116] Among them, the memory 505 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 505 may also be optionally at least one storage device located away from the aforementioned processor 501. As Figure 5 As shown, the memory 505 as a computer storage medium may include an operating system, a network communication module, a user interface module and an application program.

[0117] exist Figure 5In the electronic device 500 shown, the user interface 503 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 501 can be used to call the application stored in the memory 505 and specifically execute the following steps: Figure 2 The specific process can be referred to Figure 2 As shown, no further description is given here.

[0118] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0119] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A real-time classification method for spike signals, characterized in that: include: Collect the current spike signal through the spike detection device; Counting the sequence number of the current spike signal; Calculating the correlation coefficients between the current spike signal and the group centers of the m groups respectively to obtain m correlation coefficients; wherein m is an integer greater than 1; determining a maximum value among the m correlation coefficients; Determine whether the maximum value is greater than a correlation coefficient threshold; If yes, put the current spike signal into the group corresponding to the maximum value, update the group center of the group and increase the number of spike signals of the group by 1; Determine whether the sequence number is an integer multiple of a first cycle number threshold; If yes, query whether there is a group in the m groups whose number of spike signals is less than the first number threshold; If yes, delete the spike signal in the queried group, clear the number of spike signals in the queried group to zero, and delete the group center of the queried group; Determine whether the sequence number is an integer multiple of a second cycle number threshold; wherein the first cycle number threshold is less than the second cycle number threshold; If yes, query whether there is a group in the m groups whose number of spike signals is less than a second number threshold; wherein the first number threshold is less than the second number threshold; If yes, delete the spike signal in the queried group, clear the number of spike signals in the queried group, and delete the group center of the queried group.

2. The method according to claim 1, characterized in that Also includes: If the maximum value is less than or equal to the correlation coefficient threshold, query whether there is a group with a spike signal number of 0 in the m groups; If yes, add the current spike signal to any queried group, take the current spike signal as the group center of the group, and increase the number of spike signals of the group by 1; The next spike signal is collected by the spike detection device, The sequence number of the current spike signal is increased by 1 to obtain the sequence number of the next spike signal.

3. The method according to claim 2, characterized in that Also includes: If there is no group with a spike signal number of 0 in the m groups, discard the current spike signal, and count the number of discarded spike signals; Determine whether the number of discarded spike signals is greater than a discarded number threshold; If yes, delete the spike signals and group centers in the m groups, and clear the number of spikes in each group and the number of discarded spike signals; collecting the next spike signal by the spike detection device; The sequence number of the next spike signal is reset to 1.

4. The method according to claim 3, characterized in that Also includes: If the number of discarded spike signals is less than or equal to the discarded number threshold; The next spike signal is collected by the spike detection device, The sequence number of the current spike signal is increased by 1 to obtain the sequence number of the next spike signal.

5. The method according to claim 1, characterized in that Also includes: If the sequence number of the current spike signal is not an integer multiple of the first cycle number threshold, the next spike signal is collected by the spike detection device, The sequence number of the current spike signal is increased by 1 to obtain the sequence number of the next spike signal.

6. The method according to claim 1, characterized in that Also includes: If there is no group in the m groups whose number of spike signals is less than the first number threshold, collecting the next spike signal by the spike detection device, The sequence number of the current spike signal is increased by 1 to obtain the sequence number of the next spike signal.

7. The method according to claim 1, characterized in that Also includes: If the current spike signal is not an integer multiple of the second cycle number threshold or there is no group in the m groups whose number of spike signals is less than the second number threshold, the next spike signal is collected by the spike detection device, The sequence number of the current spike signal is increased by 1 to obtain the sequence number of the next spike signal.

8. A real-time classification device for spike signals, characterized in that: include: A collection unit, used for collecting the current spike signal through a spike detection device; A statistical unit, used for counting the sequence number of the current spike signal; A classification unit is used to respectively calculate the correlation coefficient between the current spike signal and the group center of m groups to obtain m correlation coefficients; wherein m is an integer greater than 1; determine a maximum value among the m correlation coefficients; determine whether the maximum value is greater than a correlation coefficient threshold; if yes, put the current spike signal into the group corresponding to the maximum value, update the group center of the group and increase the number of spike signals of the group by 1; determine whether the sequence number is an integer multiple of a first cycle number threshold; if yes, query whether there is a group in the m groups whose number of spike signals is less than the first number threshold; if yes if yes, delete the spike signal in the queried group, clear the number of spike signals in the queried group, and delete the group center of the queried group; determine whether the sequence number is an integer multiple of a second cycle number threshold; wherein the first cycle number threshold is less than the second cycle number threshold; if yes, query whether there is a group in the m groups whose number of spike signals is less than the second number threshold; wherein the first number threshold is less than the second number threshold; if yes, delete the spike signal in the queried group, clear the number of spike signals in the queried group, and delete the group center of the queried group.

9. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Real-time spike potential detection and classification method suitable for hardware realization

    CN106709467A

  • Peak potential classification system and method for neural signals

    CN112971813A