Signal identification method and device, storage medium and wearable equipment
By encoding biological signals and adjusting the similarity of supervectors, the problem of difficulty in realizing signal recognition when only normal samples are available is solved, signal recognition is realized in the absence of abnormal samples, and recognition flexibility and efficiency are improved.
Patent Information
- Application Number
- CN202411638669.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-07
AI Technical Summary
When the prior art recognizes biological signals through neural network models, it requires a large number of abnormal samples to be trained, making it difficult to achieve signal recognition when there are only normal samples.
By obtaining and encoding the biological signal to be identified, the target supervector to be identified is obtained; then the initial recognition result is adjusted according to the similarity between the target class supervector and the target supervector to be identified, and the final recognition result is obtained.
When there are only normal samples, signal recognition can be achieved, which avoids dependence on abnormal samples and improves the flexibility and efficiency of signal recognition.
Smart Images

Figure CN119577662A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of biological signal processing technology, and in particular to a signal recognition method, device, storage medium and wearable device. Background Art
[0002] At present, wearable devices (such as smart bracelets, etc.) generally have signal recognition functions. They collect biological signals from the wearer (such as electromyography (EMG) signals, electroencephalogram (EEG) and electrocardiogram (ECG), etc.), and recognize the biological signals through a neural network model, and complete relevant detection based on the recognition results.
[0003] When using neural network models to identify biological signals, it is generally necessary to train the model with more abnormal samples (such as abnormal heart rate signals, epilepsy detection signals, etc.) so that the model can identify normal and abnormal signals. However, since these abnormal samples are few in number and difficult to obtain, how to achieve signal recognition with only normal samples is an urgent problem to be solved. Summary of the invention
[0004] The main purpose of this application is to provide a signal recognition method, apparatus, storage medium and wearable device, aiming to solve the existing technical problem of how to achieve signal recognition when there are only normal samples.
[0005] To achieve the above object, the present invention provides a signal recognition method, which includes:
[0006] Acquire a biological signal to be identified, and encode the biological signal to be identified to obtain a super vector of a target to be identified;
[0007] Selecting a target class supervector from various supervectors according to the target supervector to be identified, wherein the class supervector is obtained by encoding a normal sample biological signal corresponding to a normal type;
[0008] The normal type corresponding to the target class supervector is used as an initial recognition result, and the initial recognition result is adjusted according to a first similarity between the target class supervector and the target supervector to be recognized to obtain a final recognition result.
[0009] In one embodiment, the step of adjusting the initial recognition result according to the first similarity between the target class supervector and the target supervector to be recognized to obtain the final recognition result includes:
[0010] Determine the current task type;
[0011] When the current task type is a classification task, obtaining a class completeness of the class supervector, and adjusting the initial recognition result based on the class completeness and a first similarity between the target class supervector and the target supervector to be recognized, to obtain a final recognition result;
[0012] When the current task type is a recognition task, the category state of the class supervector is obtained, and the initial recognition result is adjusted based on the category state and a first similarity between the target class supervector and the target supervector to be recognized to obtain a final recognition result.
[0013] In one embodiment, the step of adjusting the initial recognition result based on the category completeness and the first similarity between the target class supervector and the target supervector to be recognized to obtain the final recognition result includes:
[0014] When the category completeness is category complete, taking the initial recognition result as the final recognition result;
[0015] When the category completeness is incomplete, a first similarity between the target class supervector and the target supervector to be identified is determined, and when the first similarity is higher than a first preset similarity threshold, the initial recognition result is used as the final recognition result; when the first similarity is not higher than the first preset similarity threshold, the initial recognition result is adjusted to an irrelevant category, and the irrelevant category is used as the final recognition result.
[0016] In one embodiment, the step of adjusting the initial recognition result based on the category state and the first similarity between the target class supervector and the target supervector to be recognized to obtain a final recognition result includes:
[0017] When the category state is only a positive category state, determining a first similarity between the target class supervector and the target supervector to be identified, and when the first similarity is higher than a second preset similarity threshold, using the initial recognition result as a final recognition result; when the first similarity is not higher than the second preset similarity threshold, adjusting the initial recognition result to an abnormal category, and using the abnormal category as the final recognition result;
[0018] When the category state includes the negative category state and the positive category state, determine a first similarity between the target class supervector and the target supervector to be identified, and when the first similarity is higher than a third preset similarity threshold, use the initial recognition result as the final recognition result; when the first similarity is not higher than the third preset similarity threshold, adjust the initial recognition result to a new abnormal category, and use the new abnormal category as the final recognition result.
[0019] In one embodiment, before the step of acquiring the biological signal to be identified, encoding the biological signal to be identified, and obtaining the target supervector to be identified, the step further includes:
[0020] defining an atomic supervector corresponding to entity information of each entity, wherein the entity includes a sensor and a signal amplitude, and the entity information includes sensor information and signal amplitude information;
[0021] The step of encoding the biological signal to be identified to obtain a supervector of the target to be identified includes:
[0022] Determine first entity information involved in the biological signal to be identified, and retrieve a first atomic supervector corresponding to the first entity information involved;
[0023] The biological signal to be identified is encoded by calling the first atomic supervector to obtain the target supervector to be identified.
[0024] In one embodiment, the step of encoding the biological signal to be identified by calling the first atomic supervector to obtain the target supervector to be identified includes:
[0025] The signal value of each sampling point in the biological signal to be identified is encoded by calling the first atomic supervector to obtain a first encoded supervector;
[0026] The sensor corresponding to the biological signal to be identified is encoded by calling the first atomic supervector to obtain a second encoding supervector;
[0027] Binding each of the first coding supervectors and the corresponding second coding supervector to obtain a composite supervector;
[0028] The composite supervectors are weightedly superimposed according to the preset weights corresponding to the sensors, and the obtained first superposition result is standardized to obtain the supervector of the target to be identified.
[0029] In one embodiment, the step of encoding the signal value of each sampling point in the biological signal to be identified by calling the first atomic supervector to obtain the first encoded supervector includes:
[0030] Obtaining a node encoding supervector of a previous sampling point, and performing an arrangement operation on the node encoding supervector of the previous sampling point;
[0031] Encoding the signal value of the current sampling point in the biological signal to be identified by calling the first atomic supervector to obtain a node encoding supervector of the current node;
[0032] The arranged node coding supervector of the previous sampling point and the node coding supervector of the current node are bound, and a first coding supervector is obtained according to the binding result.
[0033] In one embodiment, after the step of defining the atomic supervector corresponding to the entity information of each entity, the method further includes:
[0034] Determine the second entity information related to the normal sample biological signal corresponding to the normal type, and retrieve the second atomic supervector corresponding to the second entity information involved;
[0035] The normal sample biological signal is encoded by the retrieved second atomic supervector to obtain a sample target supervector;
[0036] The sample target supervectors in the same category are weightedly superimposed to obtain a class supervector.
[0037] In one embodiment, the step of performing weighted superposition on the sample target supervectors in the same category to obtain a class supervector includes:
[0038] Performing weighted superposition on the sample target supervectors in the same category to obtain a second superposition result, and standardizing the second superposition result;
[0039] determining a third similarity between the sample target supervector and the normalized second superposition result;
[0040] When the third similarity reaches a preset similarity requirement, the standardized second superposition result is used as a class super vector.
[0041] In one embodiment, after the step of determining the third similarity between the sample target supervector and the standardized second superposition result, the method further includes:
[0042] When the third similarity does not meet the preset similarity requirement, determining a third superposition result to which the sample target supervector actually belongs, and standardizing the third superposition result;
[0043] Determine a learning rate corresponding to the sample supervector according to the sample target supervector, the standardized second superposition result, and the standardized third superposition result;
[0044] Retraining the second superposition result and the third superposition result based on the learning rate;
[0045] When the retraining result meets the preset retraining requirement, a class super vector is obtained according to the second superposition result after the retraining and the third superposition result after the retraining.
[0046] In one embodiment, the step of determining the learning rate corresponding to the sample supervector according to the sample target supervector, the standardized second superposition result, and the standardized third superposition result includes:
[0047] Determining a fourth similarity between the sample target supervector and the standardized second superposition result, and determining a fifth similarity between the sample target supervector and the standardized third superposition result;
[0048] Determine the learning rate corresponding to the sample supervector according to a first preset formula by presetting an adjustable parameter, the fourth similarity, and the fifth similarity;
[0049] Wherein, the first preset formula is:
[0050] lr = γ(sim_b-sim_a);
[0051] lr is the learning rate corresponding to the sample supervector, γ is the preset adjustable parameter, sim_b is the fourth similarity, and sim_a is the fifth similarity.
[0052] In one embodiment, the step of retraining the second superposition result and the third superposition result based on the learning rate includes:
[0053] Retraining the third superposition result according to a second preset formula based on the learning rate, the sample target supervector and the third superposition result to obtain a retrained third superposition result;
[0054] Retraining the second superposition result according to a third preset formula based on a preset adjustment factor, the learning rate, the sample target supervector, and the second superposition result to obtain a retrained second superposition result;
[0055] Wherein, the second preset formula is:
[0056] A′=A+lr·a;
[0057] The third preset formula is:
[0058] B ′ =B+εlr·a;
[0059] A′ is the third superposition result after the retraining, A is the third superposition result, B′ is the second superposition result after the retraining, B is the second superposition result, ε is the preset adjustment factor, lr is the learning rate, and a is the sample target supervector.
[0060] In one embodiment, the step of defining the atomic supervector corresponding to the entity information of each entity includes:
[0061] Determine the entity type of each entity;
[0062] When the entity type is a discrete entity type, the atomic supervectors corresponding to the entity information of each entity are defined according to the quasi-orthogonality principle between the atomic supervectors, and the entities corresponding to the discrete entity type include sparse electrode sensors;
[0063] When the entity type is a continuous entity type, the atomic supervectors corresponding to the entity information of each entity are defined according to the principle that there is a similarity relationship between the atomic supervectors, and the entities corresponding to the continuous entity type include dense electrode sensors and the signal amplitude.
[0064] In one embodiment, the step of defining the atomic supervectors corresponding to the entity information of each entity according to the quasi-orthogonality principle between the atomic supervectors includes:
[0065] Randomly generate an atomic supervector corresponding to entity information of the current entity, and determine whether the atomic supervector corresponding to the entity information of the current entity is quasi-orthogonal to the atomic supervector corresponding to the entity information of the defined entity;
[0066] When the atomic supervector corresponding to the entity information of the current entity is not quasi-orthogonal to the atomic supervector corresponding to the entity information of the defined entity, return to the step of randomly generating an initial atomic supervector corresponding to the entity information of the current entity until the atomic supervector corresponding to the entity information of the current entity is quasi-orthogonal to the atomic supervector corresponding to the entity information of the defined entity.
[0067] In one embodiment, the step of defining the atomic supervector corresponding to the entity information of each entity according to the principle that there is a similarity relationship between the atomic supervectors includes:
[0068] When the entity is the signal amplitude, standardizing the entity information of the entity, and binning the standardized entity information according to a preset binning rule;
[0069] Determine a target box based on each binning result, define the target box according to a preset vector dimension, and obtain an amplitude supervector corresponding to the target box;
[0070] Flipping the amplitude supervector corresponding to the target box to obtain the amplitude supervector corresponding to each binning result;
[0071] The amplitude supervector corresponding to each of the binning results is used as the atomic supervector corresponding to each of the entity information.
[0072] In one embodiment, the step of defining the atomic supervector corresponding to the entity information of each entity according to the principle that there is a similarity relationship between the atomic supervectors includes:
[0073] When the entity is the dense electrode sensor, a first sensor supervector is generated according to the horizontal axis direction, and a second sensor supervector is generated according to the vertical axis direction;
[0074] An atomic supervector corresponding to each entity information is defined based on the first sensor supervector and the second sensor supervector.
[0075] In one embodiment, the step of encoding the biological signal to be identified to obtain a supervector of the target to be identified includes:
[0076] Segmenting the biological signal to be identified to obtain signal fragments;
[0077] Performing data cleaning on the signal segment according to a preset cleaning operation, wherein the preset cleaning operation includes at least one of outlier detection, difference filling, mean filling or signal rectification;
[0078] Performing noise reduction on the cleaned signal segment according to a preset noise reduction operation, wherein the preset noise reduction operation includes at least one of bandpass filtering, mean smoothing or spectral subtraction;
[0079] Downsampling the de-noised signal segments according to a preset downsampling operation, wherein the preset downsampling operation includes at least one of interval summation, interval statistics, direct downsampling or pooling;
[0080] The downsampled signal segments are normalized, and the normalized signal segments are encoded to obtain a super vector of the target to be identified.
[0081] In addition, to achieve the above-mentioned purpose, the embodiment of the present application further proposes a signal recognition device, the device comprising:
[0082] A signal acquisition module, used to acquire a biological signal to be identified, and encode the biological signal to be identified to obtain a super vector of a target to be identified;
[0083] A supervector acquisition module, used to select a target class supervector from various supervectors according to the target supervector to be identified, wherein the class supervector is obtained by encoding a normal sample biological signal corresponding to a normal type;
[0084] The result adjustment module is used to take the normal type corresponding to the target class super vector as the initial recognition result, and adjust the initial recognition result according to the first similarity between the target class super vector and the target super vector to be recognized to obtain a final recognition result.
[0085] In addition, to achieve the above-mentioned purpose, an embodiment of the present application further proposes a storage medium, on which a signal recognition program is stored, and when the signal recognition program is executed by a processor, the steps of the signal recognition method described above are implemented.
[0086] In addition, to achieve the above-mentioned purpose, an embodiment of the present application also proposes a wearable device, which includes: a memory, a processor, and a signal recognition program stored in the memory and executable on the processor, and when the signal recognition program is executed by the processor, the steps of the signal recognition method described above are implemented.
[0087] The embodiments of the present application provide a signal recognition method, apparatus, storage medium and wearable device, the method comprising: acquiring a biological signal to be recognized, and encoding the biological signal to be recognized to obtain a target supervector to be recognized; selecting a target class supervector from various supervectors according to the target supervector to be recognized, the class supervector being obtained by encoding a normal sample biological signal corresponding to a normal type; taking the normal type corresponding to the target class supervector as an initial recognition result, and adjusting the initial recognition result according to a first similarity between the target class supervector and the target supervector to be recognized to obtain a final recognition result.
[0088] Since the present application can obtain a class supervector by encoding the normal sample biological signal corresponding to the normal type, and when the biological signal to be identified is obtained, it can be first encoded as a target supervector to be identified, and then the target supervector is selected from various supervectors according to the target supervector to be identified, and the normal type corresponding to the target supervector is used as the initial recognition result, and then the first similarity between the target class supervector and the target supervector to be identified is determined, and the initial recognition result is adjusted according to the first similarity to obtain the final recognition result. Compared with the existing model that requires abnormal samples to enable the model to have recognition ability, the present application can adjust the determined normal type through the first similarity between the target class supervector and the target supervector to be identified, obtain the final recognition result to complete the recognition, so that signal recognition can still be completed when there are only normal samples. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0090] 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0091] Figure 1 A schematic diagram of the structure of a wearable device in the hardware operating environment involved in the embodiment of the present application;
[0092] Figure 2 This is a flow chart of the first embodiment of the signal recognition method of the present application;
[0093] Figure 3 This is a schematic diagram of the preprocessing process in the first embodiment of the signal recognition method of the present application;
[0094] Figure 4 This is a flow chart of the second embodiment of the signal recognition method of the present application;
[0095] Figure 5 This is a flow chart of the third embodiment of the signal recognition method of the present application;
[0096] Figure 6 This is an overall flow chart of the third embodiment of the signal recognition method of this application;
[0097] Figure 7 This is a schematic diagram of the encoding process in the third embodiment of the signal recognition method of this application;
[0098] Figure 8 This is a flow chart of a fourth embodiment of the signal recognition method of the present application;
[0099] Fig. 9 This is a schematic diagram of the process of generating a class supervector in the fourth embodiment of the signal recognition method of the present application;
[0100] Fig.10 This is a flow chart of the fifth embodiment of the signal recognition method of the present application;
[0101] Fig.11 This is a schematic diagram of the signal recognition process in the fifth embodiment of the signal recognition method of the present application;
[0102] Fig.12 This is a structural block diagram of the first embodiment of the signal recognition device of this application.
[0103] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0104] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0105] Reference Figure 1 , Figure 1 A schematic diagram of the wearable device structure of the hardware operating environment involved in the embodiment of the present application.
[0106] like Figure 1 As shown, the wearable device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The wired interface of the user interface 1003 may be a USB interface in this application. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) or a stable memory (Non-volatile Memory, NVM), such as a disk storage. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.
[0107] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the wearable device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0108] like Figure 1 As shown, the memory 1005 identified as a computer storage medium may include an operating system, a network communication module, a user interface module, and a signal recognition program.
[0109] exist Figure 1 In the wearable device shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the user device; the wearable device calls the signal recognition program stored in the memory 1005 through the processor 1001, and executes the signal recognition method provided in the embodiment of the present application.
[0110] It should be noted that currently wearable devices (such as smart bracelets, etc.) generally have signal recognition functions. They collect biological signals from the wearer (such as electromyography (EMG) signals, electroencephalogram (EEG) and electrocardiogram (ECG), etc.), and recognize the biological signals through a neural network model, and complete relevant detection based on the recognition results.
[0111] When using neural network models to identify biological signals, it is generally necessary to train the model with more abnormal samples (such as abnormal heart rate signals, epilepsy detection signals, etc.) so that the model can identify normal and abnormal signals. However, since these abnormal samples are few in number and difficult to obtain, how to achieve signal recognition with only normal samples is an urgent problem to be solved.
[0112] Therefore, in order to solve the above defects, this embodiment provides a signal recognition method, which can obtain a class supervector by encoding the normal sample biological signal corresponding to the normal type, and when the biological signal to be recognized is obtained, it can be first encoded into a target supervector to be recognized, and then the target supervector is selected from various supervectors according to the target supervector to be recognized, and the normal type corresponding to the target supervector is used as the initial recognition result, and then the first similarity between the target class supervector and the target supervector to be recognized is determined, and the initial recognition result is adjusted according to the first similarity to obtain the final recognition result. Compared with the existing method that requires abnormal samples to enable the model to have recognition ability, this embodiment can adjust the determined normal type through the first similarity between the target class supervector and the target supervector to be recognized, obtain the final recognition result to complete the recognition, so that signal recognition can still be completed when there are only normal samples.
[0113] For ease of understanding, the following combination Figures 2 to 11 The signal recognition method provided in the embodiment of the present application is specifically introduced.
[0114] Reference Figure 2 , Figure 2 The flowchart of the first embodiment of the signal recognition method of the present application is shown in FIG. Figure 2 As shown, in this embodiment, the specific method includes:
[0115] Step S10: Acquire the biological signal to be identified, encode the biological signal to be identified, and obtain the target super vector to be identified.
[0116] It is understandable that the method of this embodiment can be applied to a wearable device, wherein the wearable device can be an edge device such as a smart wristband or a smart bracelet that can be worn on a user, or other wearable devices, and this embodiment does not limit this. The execution subject of the embodiment of this method can adopt the above-mentioned wearable device (referred to as the device), and this device is used as an example to illustrate this embodiment and the following embodiments.
[0117] It should be understood that the above-mentioned biological signal to be identified can be a signal for human-computer interaction with the user, such as the above-mentioned EMG signal, ECG signal or EEG signal, etc., and this embodiment does not limit this. In actual use, the above-mentioned EMG signal can be used for tasks such as amyotrophic lateral sclerosis (ALS) detection or motion recognition; the above-mentioned ECG signal can be used for tasks such as abnormal heart rate analysis or sleep state detection; the above-mentioned EEG signal can be used for tasks such as epilepsy detection or emotion recognition. This embodiment does not limit which specific signal is used to perform which task for the biological signal to be identified, and in this embodiment, the above-mentioned biological signal to be identified may not be only one of the above-mentioned three signals. The method provided in this embodiment can also perform signal recognition on at least two of the above-mentioned signals at the same time. Since the process is consistent, this embodiment uses signal recognition of one biological signal for illustration.
[0118] Furthermore, in order to obtain the above-mentioned biological signal to be identified, the above-mentioned device in this embodiment may be provided with a sensor for collecting the biological signal, such as a portable EEG acquisition system (which may include 4 to 8 electrodes), a standard 12-lead ECG system (which may include 4 limb electrodes and 6 chest electrodes), a wrist electromyography acquisition device (which may include 3 to 16 electrodes around the wrist), a high-density brain-computer interface (which may include 64 to 128 electrodes) or a high-density electromyography acquisition system (which may include 64 to 256 electrodes), etc. The specific sensor can be set according to the biological signal that needs to be collected, and this embodiment does not limit this.
[0119] It should be emphasized that the present embodiment can implement the above signal recognition task based on hypervector computing (HDC). Hypervector computing is a new computing paradigm in the field of brain-like computing. By simulating the processing method of the brain, processing high-dimensional vectors (hypervectors) to achieve fast and robust computing and learning, it can achieve fast learning of small samples and obtain better classification and recognition effects. The characteristics of hypervector computing are as follows:
[0120] 1. High-dimensional representation: HDC can use vectors with thousands to millions of dimensions to represent information. These vectors are usually binary or real-valued.
[0121] 2. Randomization and distributed representation: Information can be represented through randomization and distributed coding, which ensures the orthogonality or approximate orthogonality between vectors, making the system robust and able to tolerate noise and partial information loss.
[0122] 3. Holostat Computing: HDC performs calculations in high-dimensional space. These calculations include operations such as addition, multiplication, and convolution between vectors to achieve information storage, retrieval, and learning.
[0123] 4. Fast learning and reasoning: Due to the characteristics of high-dimensional vectors, HDC can achieve fast learning and reasoning, which is suitable for real-time processing and large-scale data applications.
[0124] 5. Wide range of applications: HDC can be used in various fields, including pattern recognition, natural language processing, robotic control, bioinformatics, etc.
[0125] Therefore, this embodiment realizes signal recognition based on the above HDC method. In actual use, after the above device collects the biological signal to be recognized, it can be encoded into an atomic supervector with a dimension of D (D can be greater than or equal to 10000) as the above target supervector to be recognized.
[0126] Furthermore, considering that different scenarios have different requirements for signals, this embodiment can pre-process the biological signal to be identified before subsequent encoding. Figure 3 , Figure 3 This is a schematic diagram of the preprocessing process in the first embodiment of the signal recognition method of this application, such as Figure 3 As shown, in this embodiment, the step of encoding the biological signal to be identified and obtaining the super vector of the target to be identified includes:
[0127] Step S11: segment the biological signal to be identified to obtain signal segments.
[0128] It should be noted that, considering that when performing signal recognition tasks, the length of the biological signal to be recognized needs to be consistent with that of the biological signal used during training. Therefore, in this embodiment, after the above-mentioned device collects the biological signal to be recognized, it can segment the biological signal to be recognized according to the preset window length. The preset window length can be set according to the actual situation, such as 500ms, etc., and this embodiment does not limit this. Furthermore, when training, the above-mentioned device can also segment the biological signal used during training according to the preset window length.
[0129] It is understandable that, in addition to the above-mentioned segmentation method using the preset window length, this embodiment may also use other segmentation methods, such as an activity segment detection algorithm, etc., which may be determined according to the actual tasks to be performed, and this embodiment does not limit this.
[0130] In actual use, the above device can segment the biological signal to be identified according to a preset window length or other rules to obtain signal segments (i.e. Figure 3 Step a: 1. Data segmentation (segmenting biological signal segments according to time window L or other rules).
[0131] Step S12: performing data cleaning on the signal segment according to a preset cleaning operation. The preset cleaning operation includes at least one of an outlier detection, difference filling, mean filling or signal rectification.
[0132] After segmentation, the above device can perform data cleaning on the signal segments according to the above preset cleaning operation (i.e. Figure 3 In step b: 2. Data cleaning (outlier, missing value processing, signal rectification, etc.), the preset cleaning operations may include but are not limited to: outlier detection, difference filling, mean filling or signal rectification. The specific preset cleaning operations can be determined according to the actual tasks to be performed, and this embodiment does not limit this.
[0133] Step S13: De-noise the cleaned signal segment according to a preset de-noising operation. The preset de-noising operation includes at least one of bandpass filtering, mean smoothing or spectral subtraction.
[0134] Considering that the sensor of the above-mentioned device in this embodiment generally needs to be attached to the surface of the wearer's body, it is easy to be disturbed by noise such as the external environment and motion artifacts, resulting in a low signal-to-noise ratio. Therefore, after cleaning the signal segment, this embodiment can perform noise reduction according to the above-mentioned preset noise reduction operation (i.e. Figure 3 Step c: 3. Data denoising (using filtering, smoothing, spectral subtraction and other methods to perform data denoising). The above-mentioned preset denoising operation may include but is not limited to: bandpass filtering, mean smoothing, spectral subtraction, etc., which can be determined according to the actual task to be performed, and this embodiment does not limit this.
[0135] Of course, it should be emphasized that if the signal-to-noise ratio of the sensor currently used is relatively high, there is no need to perform the noise reduction step.
[0136] Step S14: downsampling the de-noised signal segments according to a preset downsampling operation. The preset downsampling operation includes at least one of interval summation, interval statistics, direct downsampling or pooling.
[0137] Since the hyperdimensional computing algorithm has a lower requirement for the sampling rate, and the sampling rates of the above sensors are much higher than the requirements of the hyperdimensional computing algorithm, in this embodiment, after the above device performs the noise reduction operation, it is necessary to downsample the noise-reduced signal segments, and specifically, the signal segments with a higher sampling rate are downsampled according to the above preset downsampling operation (i.e. Figure 3 Step d: 4. Data downsampling (according to the application scenario, downsampling is performed by using interval summation, interval statistics and other methods). Similarly, when downsampling is performed, different downsampling methods can be selected according to the application scenario, including but not limited to: interval summation, interval statistics, direct downsampling and pooling operations.
[0138] Step S15: normalizing the downsampled signal segments, and encoding the normalized signal segments to obtain a target supervector to be identified.
[0139] After downsampling, in order to facilitate the subsequent supervector encoding of the signal, the above-mentioned device can standardize the downsampled signal fragments and standardize the downsampled signal to a floating point number between 0 and 1 (i.e. Figure 3 Step f: 6. Data normalization (normalizing all processed data to a value between 0 and 1)) to obtain the above-mentioned target super vector to be identified.
[0140] Step S20: selecting a target class supervector from various supervectors according to the target supervector to be identified, wherein the class supervector is obtained by encoding the normal sample biological signal corresponding to the normal type.
[0141] It should be noted that the above-mentioned normal sample biological signal can be a biological signal used for training under normal type. The above-mentioned class supervector can be a supervector corresponding to each signal type. The signal type can be a normal type, and the signal type can be set according to the task. For example, when performing heart rate analysis, each signal type can be defined as a heart rate type corresponding to a normal heart rate.
[0142] In actual use, the above-mentioned device can collect and obtain heart rate signals under various normal types as the above-mentioned normal sample biological signals, and mark the normal type corresponding to each normal sample biological signal; then the above-mentioned preprocessing operations (that is, the above-mentioned data segmentation, data cleaning, etc.) are also used to preprocess the normal sample biological signals. Since the preprocessing process is consistent with the above-mentioned preprocessing process of the biological signal to be identified, this embodiment will not elaborate on it.
[0143] But it should be emphasized that Figure 3As shown, considering that for the classification and recognition tasks of biological signals, there are usually fewer training samples, in order to improve the universality of the samples and enhance the generalization ability of the hyperdimensional computing method, in this embodiment, after the above-mentioned device performs downsampling, the downsampled signal segments can be data enhanced according to a preset enhancement operation. The preset enhancement operation may include but is not limited to: shifting, scaling, and amplitude enhancement methods in the time dimension (i.e. Figure 3 Step e: 5. Data enhancement (only in the training phase) (using time shift, scaling, amplitude enhancement and other methods to enhance data). The specific data enhancement method can also be set according to the actual task, and this embodiment does not limit this.
[0144] After data enhancement, the signal segments of the samples are normalized to obtain the class supervectors corresponding to the above-mentioned normal types.
[0145] Furthermore, when the device is used, after obtaining the target supervector to be identified, it can compare the target supervector to be identified with various supervectors, which can be a similarity comparison, etc., which is not limited in this embodiment. Then, according to the comparison result, the best class supervector is selected as the target class supervector.
[0146] Step S30: taking the normal type corresponding to the target class supervector as the initial recognition result, and adjusting the initial recognition result according to the first similarity between the target class supervector and the target supervector to be recognized, to obtain a final recognition result.
[0147] After obtaining the target class supervector, the device can use the normal type corresponding to the target class supervector as the initial recognition result. However, considering that when the biological signal to be recognized is of an abnormal type, the initial recognition result obtained by the device is also of a normal type, the initial recognition result needs to be adjusted.
[0148] When making adjustments, the device may calculate the similarity between the target class supervector and the target supervector to be identified as the first similarity. The similarity calculation strategy may include but is not limited to: Hamming distance, cosine similarity, dot product similarity, etc., which is not limited in this embodiment.
[0149] After obtaining the above-mentioned first similarity, the above-mentioned device can adjust the initial recognition result according to the first similarity as the final recognition result. For example, if the first similarity reaches a certain similarity threshold, it can be said that the target class supervector is similar to the target supervector to be identified, and the type corresponding to the biological signal to be identified may be a normal type, and then the normal type corresponding to the initial recognition result can be directly used as the above-mentioned final recognition result; if the first similarity does not reach a certain similarity threshold, it can be said that the target class supervector is not similar to the target supervector to be identified, and the biological signal to be identified is not similar to the target class supervector with the highest similarity, then the corresponding type may be an abnormal type, and then the initial recognition result can be adjusted to an abnormal type and used as the final recognition result. In this way, signal recognition can be completed without the need for abnormal samples.
[0150] In this embodiment, the determined normal type can be adjusted through the first similarity between the target class supervector and the target supervector to be identified, and the final identification result can be obtained to complete the identification, so that the signal identification can still be completed when there are only normal samples.
[0151] At the same time, since this embodiment performs data enhancement operations on samples during training, it is of course possible to complete signal recognition based on a very small number of abnormal samples. Through the above-mentioned preprocessing operations, the data sampling rate is reduced, data noise reduction and frequency domain enhancement are performed, and the data quality is improved. It can well combine the designed hyper-dimensional computing algorithm with the retraining method to improve the classification and recognition accuracy.
[0152] Reference Figure 4 , Figure 4 This is a flow chart of the second embodiment of the signal recognition method of the present application. Based on the above-mentioned first embodiment, the second embodiment of the signal recognition method of the present application is proposed.
[0153] like Figure 4 As shown, in order to realize the encoding of the biological signal, this embodiment may be defined in advance. Specifically, in this embodiment, before the above step S10, it also includes:
[0154] Step S01: defining the atomic supervector corresponding to the entity information of each entity, the entity includes a sensor and a signal amplitude, and the entity information includes sensor information and signal amplitude information.
[0155] It is understandable that the entity information of the above-mentioned entity may be the information corresponding to the entity required for signal recognition. In this embodiment, the entity may include a sensor and a signal amplitude, and the entity information may include sensor information and signal amplitude information. The above-mentioned sensor information may be the information corresponding to the sensor used for bio-signal acquisition. The above-mentioned signal amplitude information may be the information of the amplitude corresponding to the bio-signal acquired by the sensor. This embodiment is also additionally provided with a project memory, that is, two storage spaces may be divided in the memory (for example, it may be a read-only memory (ROM)), one of the storage spaces is used as the above-mentioned project memory, and the other storage space is used as an associated memory, and the project memory may be a memory for storing atomic supervectors corresponding to the entity information.
[0156] When defining an atomic supervector, the above device may define each sensor information and signal amplitude information as an atomic supervector with a dimension of D (D is greater than or equal to 10000), and store all atomic supervectors in a project memory.
[0157] Accordingly, the above step of encoding the biological signal to be identified to obtain the supervector of the target to be identified includes:
[0158] Step S15: determining first entity information involved in the biological signal to be identified, and retrieving a first atomic supervector corresponding to the first entity information involved;
[0159] Step S16: Encode the biological signal to be identified by calling the first atomic supervector to obtain the target supervector to be identified.
[0160] It should be understood that the first entity information may be the sensor information and amplitude information involved in the biological signal to be identified during the signal identification, that is, the information of the sensor corresponding to the biological signal to be identified and the signal amplitude information corresponding to each sensor.
[0161] In actual use, the above device can determine the sensor used to collect and obtain the biological signal to be identified, as well as the signal amplitude involved in the signal value of the biological signal to be identified, and then use the sensor information of the sensor used and the signal amplitude information involved as the above first entity information. Query the project memory, so as to obtain the supervector corresponding to the sensor used and the supervector corresponding to the signal amplitude involved as the first atomic supervector called. Then, the biological signal to be identified can be encoded by these called first atomic supervectors, so as to obtain the above target supervector to be identified.
[0162] Furthermore, when defining the atomic supervector corresponding to each entity information, in this embodiment, the step of defining the atomic supervector corresponding to the entity information of each entity includes:
[0163] Step S011: Determine the entity type of each entity.
[0164] It should be noted that this embodiment divides entity types into discrete entity types and continuous entity types, wherein the discrete entity types may be entities that are physically unrelated, and the continuous entity types may be entities that have a continuous similarity relationship.
[0165] Step S012: when the entity type is a discrete entity type, the atomic supervectors corresponding to the entity information of each entity are defined according to the quasi-orthogonality principle between the atomic supervectors, and the entities corresponding to the discrete entity type include sparse electrode sensors.
[0166] It is understandable that since the sparse electrode sensors are not related in a physical sense, the present embodiment can define the entity type of the sparse electrode sensor as the above discrete entity type. The above sparse electrode sensor can specifically include: a portable EEG acquisition system, a standard 12-lead ECG system, and a wrist-type electromyography acquisition device. When the above device detects that the sensor used for acquisition is the above sparse electrode sensor, it can be determined that its entity type is a discrete entity type.
[0167] It should be understood that the above quasi-orthogonality principle can be the principle that each atomic supervector is close to orthogonal. In actual use, after being determined as a discrete entity type, since they are not related in a physical sense, it is necessary to ensure that the atomic supervectors defined by each entity information under this type are quasi-orthogonal.
[0168] Step S013: When the entity type is a continuous entity type, the atomic supervector corresponding to the entity information of each entity is defined according to the principle that each atomic supervector has a similarity relationship. The entities corresponding to the continuous entity type include dense electrode sensors and signal amplitudes.
[0169] It should also be noted that, since the dense electrode sensor and the signal amplitude have a continuous similarity relationship, the present embodiment can define the entity types of the dense electrode sensor and the signal amplitude as the above-mentioned continuous entity type. The above-mentioned dense electrode sensor may specifically include: a high-density brain-computer interface and a high-density electromyography acquisition system, etc. Then, when the above-mentioned device detects that the sensor used for acquisition is the above-mentioned dense electrode sensor, it can be determined that its entity type is a continuous entity type, and when defining the signal amplitude, it can also be determined that its entity type is a continuous entity type.
[0170] It should be understood that the above similarity relationship principle can be a principle of association between supervectors. In actual use, after determining the continuous entity type, since there is a certain association, it is necessary to ensure that the atomic supervectors defined by each entity information under this type are mutually associated.
[0171] Furthermore, when the entity type is a discrete entity type, in order to ensure that the defined atomic supervectors are quasi-orthogonal to each other, in this embodiment, the step of defining the atomic supervectors corresponding to the entity information of each entity according to the quasi-orthogonality principle between the atomic supervectors includes:
[0172] Step S0121: randomly generate an atomic supervector corresponding to the entity information of the current entity, and determine whether the atomic supervector corresponding to the entity information of the current entity is quasi-orthogonal to the atomic supervector corresponding to the entity information of the defined entity;
[0173] Step S0122: When the atomic supervector corresponding to the entity information of the current entity is not quasi-orthogonal to the atomic supervector corresponding to the entity information of the defined entity, return to the step of randomly generating an initial atomic supervector corresponding to the entity information of the current entity until the atomic supervector corresponding to the entity information of the current entity is quasi-orthogonal to the atomic supervector corresponding to the entity information of the defined entity.
[0174] It should be noted that the entity information of the current entity may be the entity information corresponding to the entity currently being defined, and the entity information of the defined entity may be the entity information corresponding to the entity that has been defined.
[0175] In actual use, the above-mentioned device can randomly generate a D-dimensional atomic supervector for each entity information determined to be a discrete entity type, and determine whether the atomic supervector corresponding to the current entity information is quasi-orthogonal to the atomic supervector corresponding to the generated entity information; if it is quasi-orthogonal, it can be said that the atomic supervector corresponding to the current entity information meets the requirements, and it can be saved; if it is not quasi-orthogonal, it can be said that the atomic supervector corresponding to the current entity information does not meet the requirements, and the atomic supervector corresponding to the current entity information is randomly generated again until it is quasi-orthogonal.
[0176] It should be emphasized that in the randomly generated atomic supervector, each component can be distributed independently and can take the value of 1 or -1.
[0177] Furthermore, when the entity type is a continuous entity type, in order to ensure that the defined atomic supervectors have a similarity relationship, in this embodiment, the step of defining the atomic supervector corresponding to the entity information of each entity according to the principle that the atomic supervectors have a similarity relationship includes:
[0178] Step S0131: when the entity is a signal amplitude, the entity information of the entity is standardized, and the standardized entity information is binned according to a preset binning rule.
[0179] It should be noted that the above-mentioned preset binning rule may be a rule adopted when performing division, and the present embodiment may adopt the binning times as the above-mentioned preset binning rule for illustration.
[0180] In actual use, when the device determines that the entity type is a continuous entity type and the entity is a signal amplitude, the signal amplitude can be standardized and scaled to a floating point number between a preset scaling range (e.g., 0 to 1). Then, each scaled signal amplitude can be binned according to a preset binning number (i.e., B below). For example, if the binning number is 5, the signal amplitude can be divided into 0-0.2, 0.2-0.4, 0.4-0.6, 0.6-0.8, and 0.8-1, and each bin corresponds to a range.
[0181] Step S0132: determining a target box based on each binning result, and defining the target box according to a preset vector dimension to obtain an amplitude supervector corresponding to the target box;
[0182] It is understandable that the target box can be the starting box when defining the signal amplitude. The device can define a supervector for each box, but before that, due to the similarity between the boxes, a target box needs to be determined first. Based on the above example, the device can use the first box as the target box and randomly generate a D-dimensional supervector as the amplitude supervector corresponding to the target box.
[0183] Step S0133: Flip the amplitude supervector corresponding to the target box to obtain the amplitude supervector corresponding to each binning result;
[0184] After obtaining the amplitude supervector corresponding to the first box, D / 2 / (B-1) vectors can be randomly flipped, and the flipped result can be used as the amplitude supervector of the box adjacent to the first box, that is, the amplitude supervector of the second box, and so on, until the amplitude supervectors of all boxes are obtained, thereby ensuring that two adjacent boxes have similarity and that the two boxes farthest apart are quasi-orthogonal.
[0185] It should be emphasized that the number of binning times (ie, the above B) can be set according to different tasks, and can generally be 10-50, but this embodiment does not impose any limitation on this.
[0186] Step S0134: The amplitude supervector corresponding to each binning result is used as the atomic supervector corresponding to each entity information.
[0187] After obtaining the amplitude supervector corresponding to each box, the signal amplitude supervector corresponding to the entity information of each signal amplitude can be used as the atomic supervector corresponding to the signal amplitude when the entity is the signal amplitude, and stored in the above-mentioned project memory.
[0188] Furthermore, the step of defining the atomic supervector corresponding to the entity information of each entity according to the principle that the atomic supervectors have a similarity relationship includes:
[0189] Step S0135: when the entity is a dense electrode sensor, a first sensor super vector is generated according to the horizontal axis direction, and a second sensor super vector is generated according to the vertical axis direction;
[0190] In actual use, when the device determines that the entity type is a continuous entity type and the entity is a dense electrode sensor, since the dense electrode sensor is usually in the form of a matrix, for example, an X*X electrode sheet is attached to the skin, and the electrodes adjacent to the longitudinal axis and the electrodes adjacent to the transverse axis are similar, for this type of sensor, if the electrodes in the transverse axis direction are recorded as H1 to HX, and the electrodes in the longitudinal axis direction are recorded as Z1 to ZX, a supervector with a dimension of D can be randomly generated starting from the first electrode H1 in the transverse direction, and the supervector of H1 is randomly flipped by D / 2 / (X-1) vectors. At this time, the above B is replaced by X, where X is the number of channels, and the supervector obtained after the flip is used as the supervector of the next electrode (i.e., H2) in the transverse direction, and so on until the supervector of the last electrode HX is generated, and the supervectors of electrodes H1 to HX are all recorded as the above-mentioned first sensor supervector.
[0191] Then, consistent with the above process, supervectors are generated in sequence along the vertical axis, that is, electrode Z1 randomly generates a supervector with a dimension of D and then randomly flips it according to D / 2 / (X-1) vectors as the supervector of electrode Z2, and so on until the supervector of the last electrode ZX is generated, and the supervectors of electrodes Z1 to ZX are all recorded as the above-mentioned second sensor supervectors.
[0192] It should be emphasized that when performing random flipping, D / 2 / (X-1) vectors can be flipped, where X is the number of channels and D is the dimension of the above-mentioned preset super vector. At the same time, in the randomly generated vector, each component can be independently and identically distributed and take the value of -1 or 1.
[0193] Step S0136: defining an atomic supervector corresponding to each entity information based on the first sensor supervector and the second sensor supervector.
[0194] Since the first sensor supervector and the second sensor supervector in the horizontal direction are generated for the electrode at one position, the above-mentioned device can then perform binding operations on the first sensor supervector and the second sensor supervector corresponding to the electrode pair at each position, and use the bound supervector as the atomic supervector corresponding to the sensor information at the position.
[0195] Exemplarily, for the electrode at position (1, 1), the corresponding atomic supervector is H1*Z1; for the electrode at position (2, 1), the corresponding atomic supervector is H2*Z1; for the electrode at position (3, 5), the corresponding atomic supervector is H3*Z5.
[0196] It should be emphasized that the above binding operation can be implemented by an XOR operation, that is, if two elements are the same, 1 is output, and if they are different, -1 is output. For example, if A and B need to be bound, the binding operation is recorded as (*), if A = [1, -1, 1, 1, 1, 1], B = [1, -1, -1, 1, -1, 1, -1], then A and B are bound to obtain A*B = [1, 1, -1, 1, 1, 1, -1].
[0197] After the above operations, the atomic supervectors corresponding to the signal amplitude information and the atomic supervectors corresponding to the sensor information can be generated and stored in the project memory. Therefore, in subsequent use, whether in training or recognition, the project memory can be directly queried according to the corresponding biological signal to obtain the corresponding atomic supervector.
[0198] Furthermore, since this embodiment can complete the recognition using a simple calculation method locally on the device after encoding and increasing the dimension of the biological signal to be recognized, without uploading it to a cloud server, signal recognition can be achieved through the solution of this embodiment when the device is not connected to the Internet, further improving the user experience.
[0199] Reference Figure 5 , Figure 5 This is a flow chart of the third embodiment of the signal recognition method of the present application. Based on the above embodiments, the third embodiment of the signal recognition method of the present application is proposed.
[0200] Since the atomic supervectors corresponding to the entity information involved can be obtained by calling the atomic supervectors pre-defined in the project memory in both training and actual recognition, it is necessary to merge the atomic supervectors for subsequent use. Therefore, in this embodiment, Figure 5 As shown, the above step S16 includes:
[0201] Step S161: Encode the signal value of each sampling point in the biological signal to be identified by calling the first atomic supervector to obtain a first encoded supervector.
[0202] It should be noted that for ease of understanding, refer to Figure 6 To explain, Figure 6 This is the overall flow chart of the third embodiment of the signal recognition method of this application. Figure 6 As shown, in the embodiment, whether in the training phase or the recognition phase, the above-mentioned device can pre-define the atomic supervector according to the process described in the above-mentioned embodiment (ie Figure 6 Step g: 1. Initialize the HDC algorithm (initialize and check the super vectors such as signal amplitude and sensor) and use the above preprocessing operation to preprocess the normal sample biological signal during training, and use the above preprocessing operation to preprocess the biological signal to be identified during use (i.e. Figure 6 Step h: 2. Data preprocessing (data segmentation, data cleaning, data noise reduction, data enhancement, etc.);
[0203] After preprocessing, whether training or use, it can be encoded according to the atomic supervector stored in the project memory (i.e. Figure 6 Step i: 3. Target signal segment encoding (designing hyperdimensional calculations to combine atomic supervectors into target supervectors).
[0204] During encoding, when it is in the use stage, since the sensor will sample at a certain sampling rate, there will be more sampling points in the obtained biological signal. After the above preprocessing operation is divided into signal segments, the above device can use each sampling point in the signal segment as a unit, and encode the signal value corresponding to each sampling point in turn by calling the first atomic supervector obtained to obtain the above first encoded supervector.
[0205] For example, the signal value corresponding to a certain sampling point is 0.1. Since 0.1 is within the signal amplitude range of 0-0.2, the atomic supervector corresponding to the signal amplitude of 0-0.2 in the project memory can be retrieved as the first encoded supervector.
[0206] Furthermore, since there are multiple sampling points in a signal segment, it is necessary to fuse the atomic supervectors corresponding to the sampling points, and use the fusion result as the first coded supervector. In this embodiment, the step S161 includes:
[0207] Step S1611: obtaining a node coding super vector of a previous sampling point, and performing an arrangement operation on the node coding super vector of the previous sampling point;
[0208] Step S1612: encoding the signal value of the current sampling point in the biological signal to be identified by calling the first atomic supervector to obtain a node encoding supervector of the current node;
[0209] Step S1613: Bind the arranged node coding supervector of the previous sampling point and the node coding supervector of the current node, and obtain a first coding supervector according to the binding result.
[0210] It is understandable that the current sampling point may be a sampling point currently being encoded. The previous sampling point may be a sampling point before the current sampling point. The node coding supervector may be an atomic supervector corresponding to the signal value coding of the sampling point.
[0211] For the convenience of subsequent explanation, refer to Figure 7 , Figure 7 This is a schematic diagram of the encoding process in the third embodiment of the signal recognition method of this application. Figure 7 As shown, after preprocessing the biological signal, the above-mentioned device can obtain a signal segment, and the length of the signal segment is denoted as t. Then, the first sampling point in the signal segment can be encoded, and the atomic supervector of the corresponding signal amplitude is retrieved from the project memory according to the signal value of the first sampling point as the atomic supervector corresponding to the first sampling point (that is, the node encoding supervector of the first sampling point); the node encoding supervector of the first sampling point can be denoted as L_1.
[0212] Then, the node encoding supervector L_1 of the first sampling point can be permuted. The permutation operation can be a cyclic shift to the left or right by a preset number of bits. In this embodiment, a cyclic shift to the right by 1 bit is used for illustration. The permutation operation is denoted as (ρ). If A = [1, -1, 1, 1, -1, 1, 1], the permutation operation is ρ. 1 (A) = [1, 1, -1, 1, 1, -1, 1], arranged twice ρ 2 (A) = [1, 1, 1, -1, 1, 1, -1], arranged three times ρ 3 (A) = [-1, 1, 1, 1, -1, 1, 1], and so on. Then, the node encoding super vector L_1 of the first sampling point can be permuted by right cyclic shift of 1 bit, which can be recorded as ρ 1 (L_1), which can also be written as ρ(L_1).
[0213] Then, the signal value of the next sampling point, that is, the second sampling point, can be encoded. Consistent with the above, the atomic supervector corresponding to the signal value of the second sampling point can be first retrieved from the project memory, denoted as L_2, which is the node encoding supervector of the current node mentioned above; then the node encoding supervector ρ(L_1) of the first sampling point after arrangement is bound to the node encoding supervector L_2 of the second sampling point, that is, ρ(L_1)*L_2, and the bound node encoding supervector is used as the node encoding supervector of the second sampling point;
[0214] By analogy, when encoding the signal value of the third sampling point, the node coding supervector ρ(L_1)*L_2 of the second sampling point is arranged in accordance with the above, and then bound with the node coding supervector of the third sampling point, and the bound node coding supervector is used as the node coding supervector of the second sampling point, until the node coding supervector of the tth (i.e., the last sampling point of the signal segment) is obtained. If the node coding supervector obtained after binding of each sampling point is denoted as z, the above process can be expressed by the following formula: z = L_1; z = ρ(z)*L_2; z = ρ(z)*L_3; ...; z = ρ(z)*L_t.
[0215] After obtaining the node encoding supervector after binding the last sampling point, the node encoding supervector can be used as the atomic supervector obtained by encoding the signal value, that is, the first encoding supervector mentioned above.
[0216] Therefore, the biological signals collected by each sensor are encoded as above, and the first encoding supervector corresponding to the biological signal of each sensor can be obtained. Figure 7 In the sensor S1 to the sensor SN), there are corresponding signal segments L1 to LN of the biological signal (i.e. Figure 7 The processed signal segment L1 to the processed signal segment LN), the atomic supervector corresponding to each signal segment can be obtained by calling the project memory, which are respectively recorded as L1_t to Ln_t, and the atomic supervector of the first sampling point in each signal segment is respectively recorded as z1_t to zn_t. After the binding operation, the first encoding supervector corresponding to the biological signal of each sensor can be obtained, which are respectively recorded as z1 to zn.
[0217] Step S162: Encode the sensor corresponding to the biological signal to be identified by calling the first atomic supervector to obtain a second encoded supervector.
[0218] After obtaining the first encoding supervector corresponding to each sampling point, the project memory can be further queried to retrieve the atomic supervector corresponding to each sensor, thereby completing the encoding of each sensor and obtaining the corresponding second encoding supervector.
[0219] Based on the above example, if there are N sensors, which are denoted as S1 to SN respectively, then after the above encoding operation, the second encoding supervector corresponding to each sensor can be obtained, which are denoted as S1 to Sn respectively.
[0220] Step S163: Bind each first encoding supervector and the corresponding second encoding supervector to obtain a composite supervector.
[0221] After obtaining the second coding supervector corresponding to each sensor and the first coding supervector corresponding to the biological signal collected by each sensor, each first coding supervector and the corresponding second coding supervector can be bound, and the binding result is called the composite supervector corresponding to each sensor. In this embodiment, the composite supervector is denoted as H1 to Hn for illustration.
[0222] For example, based on the above examples, Figure 7 For sensor S1, the first coding supervector z1 corresponding to the biological signal collected by sensor S1 can be obtained, and the second coding supervector S1 corresponding to sensor S1 can be obtained, then the composite supervector H1 of sensor S1 is (z1*S1); similarly, the above method can also be used to bind other sensors, that is, Hn=(zn*Sn), so as to obtain the composite supervector corresponding to each sensor.
[0223] Step S164: weighted superposition is performed on each composite supervector according to the preset weight corresponding to each sensor, and the first superposition result obtained is normalized to obtain a supervector of the target to be identified.
[0224] It should be understood that after obtaining the composite supervectors corresponding to each sensor, each composite supervector can be fused. However, since the sensors used in different tasks may be different, this embodiment can set corresponding weights for each sensor according to the task currently being performed, and the specific weights are not limited in this embodiment. And after setting the corresponding preset weights, a weighted superposition operation is performed.
[0225] The above-mentioned superposition operation can be an element-by-element addition strategy. For example, if A, B and C need to be superimposed, the superposition operation is recorded as (+), where A = [1, -1, 1, 1, -1, 1, 1], B = [1, -1, -1, 1, -1, 1, -1], C = [1, -1, -1, -1, 1, 1, 1], and then A, B and C are superimposed to obtain A+B+C = [3, -3, -1, 1, -1, 3, 1]; for the weighted superposition operation, for example, if the weights α = 1 and β = 0.8 are set, then αA+αB+βC = [2.8, -2.8, -0.8, 1.2, -1.2, 2.8, 0.8].
[0226] Therefore, after the weighted superposition operation, if the obtained result is taken as the first superposition result, denoted as Hout, then Hout = α1H1 + α2H2 + ... + αnHn, α1-αn can be the preset weight of each sensor. Then the first superposition result can be standardized. If the standardization operation is denoted as Stand, then Stand(A+B+C) = [1, -1, -1, 1, -1, 1, 1]. The standardization is that when the result is greater than or equal to 0, it is set to 1, and when the result is less than 0, it is set to -1. The first superposition result after the standardization operation can be used as the above-mentioned target supervector to be identified, so as to perform subsequent signal recognition.
[0227] After the above encoding operation, not only can the problem of inconsistent lengths of signal segments from different sensors be effectively solved, but the signal segments from different sensors can also be effectively fused into a unified target supervector for subsequent use.
[0228] Reference Figure 8 , Figure 8 This is a flow chart of the fourth embodiment of the signal recognition method of the present application. Based on the above embodiments, the fourth embodiment of the signal recognition method of the present application is proposed.
[0229] Considering that during training, in order to generate various types of class super vectors, such as Figure 8 As shown, in this embodiment, after the above step of defining the atomic supervector corresponding to the entity information of each entity, the following step is further included:
[0230] Step S02: determining the second entity information related to the normal sample biological signal corresponding to the normal type, and retrieving the second atomic supervector corresponding to the related second entity information.
[0231] Step S03: Encode the normal sample biological signal by using the retrieved second atomic supervector to obtain a sample target supervector.
[0232] Reference Fig. 9 , Fig. 9 This is a schematic diagram of the process of generating a class supervector in the fourth embodiment of the signal recognition method of this application. Fig. 9 As shown, during training, consistent with the above operation, each normal sample biological signal may be preprocessed first, and each normal sample biological signal may be encoded according to the encoding method in the third embodiment, and the atomic supervector obtained by calling the project memory is recorded as the above second atomic supervector, and the normal sample biological signal is encoded by the second atomic supervector, and the obtained target supervector is recorded as the above sample target supervector. Since the specific preprocessing process and encoding process are consistent with the above, this embodiment will not be repeated.
[0233] Step S04: Perform weighted superposition on sample target supervectors in the same category to obtain a class supervector.
[0234] It should be emphasized that, since multiple biological signals are generally used for training for the same category, in this embodiment, it is also necessary to train the same category (i.e. Fig. 9 The normal sample biological signals of the same category in the signal fragments are weighted superimposed, that is, the normal sample biological signals of the same category are encoded to obtain the sample target super vector (i.e. Fig. 9 The signal data is encoded in the middle), and then the sample target super vector (i.e. Fig. 9 The target super vector of the signal segment in the Fig. 9 The superposition result is used as the above-mentioned super vector (i.e. Fig. 9 The class supervector is stored in an associative memory, which can be specially used to store various types of supervectors.
[0235] At the same time, in this embodiment, a RAM may be provided in the above device, and the RAM may store the class supervector obtained during the training process. When the training is completed, the class supervector may be stored from the RAM to the associated memory of the ROM.
[0236] Furthermore, the above step S04 includes:
[0237] Step S041: Perform weighted superposition on sample target supervectors in the same category to obtain a second superposition result, and standardize the second superposition result.
[0238] It should be noted that, when performing weighted superposition, the present embodiment may also perform weighted superposition by setting corresponding weights for each sample target supervector according to the current task. It should also be emphasized that, when performing weighted superposition, since the aforementioned embodiment has already explained that the biological signal will be enhanced during training, the present embodiment may superimpose the sample target supervectors that have not undergone the enhancement operation and the sample supervectors that have undergone the enhancement operation in the same category during superposition, and may set a larger weight for the sample target supervectors that have not undergone the enhancement operation and a smaller weight for the sample target supervectors that have undergone the enhancement operation, thereby improving the accuracy of training.
[0239] Step S042: Determine a third similarity between the sample target supervector and the standardized second superposition result.
[0240] It can be understood that the above-mentioned device can perform a superposition operation on sample target supervectors in the same category, and record the obtained result as a second superposition result, and standardize the second superposition result; then the above-mentioned device can calculate the similarity between the sample target supervector and the generated standardized second superposition result as the above-mentioned third similarity, and then judge based on the third similarity whether the standardized second superposition result obtained by training at this time meets the requirements as a class supervector, that is, whether the training is in place.
[0241] Step S043: when the third similarity reaches a preset similarity requirement, the standardized second superposition result is used as a class super vector.
[0242] It should be understood that the above-mentioned preset similarity requirement may be a requirement for determining whether the training is in place, and may be specifically a method of setting a similarity threshold, or determining whether the similarity is the highest, etc., which is not limited in this embodiment.
[0243] In actual use, when the third similarity reaches the preset similarity requirement, it can be said that the supervector meets the requirements of subsequent use, so that the standardized second superposition result can be used as the above-mentioned class supervector.
[0244] Furthermore, if the third similarity does not meet the above-mentioned preset similarity requirement, it can be explained that the generated class super vector is not accurate, so this embodiment needs to be retrained (ie Fig. 9 medium-weight training strategy).
[0245] Specifically, after the above step S042, the method further includes:
[0246] Step S044: when the third similarity does not meet the preset similarity requirement, determine the third superposition result to which the sample target supervector actually belongs, and standardize the third superposition result.
[0247] It should be noted that when the third similarity does not meet the preset similarity requirement, it can be explained that the sample target supervector does not actually belong to the category corresponding to the class supervector, and it needs to be reallocated to the class supervector to which it actually belongs. In this embodiment, the result of weighted superposition corresponding to the class supervector to which it actually belongs can be recorded as the third superposition result to which it actually belongs, and the third weighted superposition result can be standardized.
[0248] For example, if the sample target supervector a has the highest similarity with the class supervector B, but it actually belongs to the class supervector A, it is necessary to implement the operation of A=A+a; B=Ba during the retraining process, which is essentially to transfer the wrongly classified training samples to the correct group. Therefore, this embodiment is set to retrain when the similarity is not satisfactory, and after multiple iterations, it can reach convergence, stability, optimality or the set expected value.
[0249] Step S045: determining a learning rate corresponding to the sample supervector according to the sample target supervector, the standardized second superposition result, and the standardized third superposition result.
[0250] The learning rate may be a parameter to be learned during retraining. Specifically, step S045 includes:
[0251] Determining a fourth similarity between the sample target supervector and the standardized second superposition result, and determining a fifth similarity between the sample target supervector and the standardized third superposition result;
[0252] Determine a learning rate corresponding to the sample supervector according to a first preset formula by using the preset adjustable parameter, the fourth similarity, and the fifth similarity;
[0253] Among them, the first preset formula is:
[0254] lr = γ(sim_b-sim_a);
[0255] lr is the learning rate corresponding to the sample supervector, γ is a preset adjustable parameter, sim_b is the fourth similarity, and sim_a is the fifth similarity.
[0256] In actual use, the above device can first calculate the similarity between the sample target supervector and the standardized second weighted superposition result as the above fourth similarity, and calculate the similarity between the sample target supervector and the standardized third weighted superposition result as the above fifth similarity.
[0257] For example, if it is assumed that the similarity between the sample target supervector a and the standardized third weighted superposition result A (that is, the supervector A that actually belongs to the class above) is sim_a, the similarity between the sample target supervector a and the standardized second weighted superposition result B (that is, the supervector B that currently belongs to the class above) is sim_b.
[0258] Then, the learning rate is determined according to the first preset formula in combination with the preset adjustable parameters, and the preset adjustable parameters can be set according to the actual situation, and this embodiment does not limit this. And the learning rate can be understood as if the difference between the two similarities is larger, it means that a larger learning rate is needed to migrate to the correct class super vector.
[0259] Step S046: retraining the second superposition result and the third superposition result based on the learning rate.
[0260] After the learning rate is determined, retraining can be performed using the learning rate. Specifically, the above step S046 includes:
[0261] Retraining the third superposition result according to a second preset formula based on the learning rate, the sample target supervector, and the third superposition result to obtain a retrained third superposition result;
[0262] Retraining the second superposition result according to a third preset formula based on the preset adjustment factor, the learning rate, the sample target supervector, and the second superposition result to obtain a retrained second superposition result;
[0263] Among them, the second preset formula is:
[0264] A′=A+lr·a;
[0265] The third preset formula is:
[0266] B ′ =B+εlr·a;
[0267] A′ is the third superposition result after retraining, A is the third superposition result, B′ is the second superposition result after retraining, B is the second superposition result, ε is the preset adjustment factor, lr is the learning rate, a is the sample target supervector, and the above (+) is a superposition operation.
[0268] It should be noted that the above-mentioned preset adjustment factor can be a factor that causes it to perform a deletion operation. Usually, when performing a superposition operation with a negative learning rate, the learning rate should be lower than the superposition operation with a positive learning rate, so as to avoid subtracting too much useful information from the B category supervector (the reason is that although a is deployed in B, there will be a large number of overlapping components in a and other target supervectors b in B. If a is directly subtracted from B, the components in b that overlap with a will be greatly reduced). Therefore, in this embodiment, the above-mentioned preset adjustment factor can be set to a value between -1 and 0.
[0269] Step S047: when the retraining result meets the preset retraining requirement, a class super vector is obtained according to the second superposition result after the retraining and the third superposition result after the retraining.
[0270] It is understandable that the above-mentioned preset retraining requirements may be requirements for characterizing the achievement of training standards. After retraining once, the present embodiment may determine whether the various supervectors obtained (i.e., the standardized superposition results) meet the above-mentioned preset retraining requirements. For example, the error classification rate of the training sample may be lower than the preset error rate threshold, or the number of iterations may be greater than the preset number of iterations threshold, etc. If the above-mentioned preset retraining requirements are not met, a new learning rate is generated based on the second superposition result after retraining and the third superposition result after retraining for retraining; until the above-mentioned preset retraining requirements are met, after being met, the second superposition result after retraining and the third superposition result after retraining may be standardized and stored in the associated memory (i.e., the class supervector of the corresponding category) as described above. Figure 6Step j: 4. Generate category supervectors and retrain (generate highly robust category supervectors through the designed fusion strategy retraining strategy)).
[0271] This embodiment adopts weighted fusion and retraining strategy to generate class super vectors, thereby improving the robustness of the obtained class super vectors.
[0272] Reference Fig.10 , Fig.10 This is a flow chart of the fifth embodiment of the signal recognition method of the present application. Based on the above embodiments, the fifth embodiment of the signal recognition method of the present application is proposed.
[0273] Since the above embodiments use normal sample biological signals of normal type during training, in order to realize the recognition of abnormal type, such as Fig.10 As shown, in this embodiment, the step of adjusting the initial recognition result according to the first similarity between the target class supervector and the target supervector to be recognized to obtain the final recognition result includes:
[0274] Step S31: Determine the current task type.
[0275] It should be noted that the above method in this embodiment can be applied to signal recognition of different task types, specifically classification tasks and recognition tasks, and the above task types can be determined according to actual needs of users.
[0276] Step S32: When the current task type is a classification task, the class completeness of the class supervector is obtained, and the initial recognition result is adjusted based on the class completeness and the first similarity between the target class supervector and the target supervector to be recognized to obtain a final recognition result.
[0277] It is understandable that the above-mentioned category completeness can be the completeness of the categories corresponding to each type of supervector during training. The above-mentioned category completeness can be specifically set according to the user during training. For example, if when performing a certain task, the categories involved include category A, category B, and category C, and if the class supervector obtained during training only includes category A and category B, it can be said that the category is incomplete, and if the category obtained during training includes category A, category B, and category C, it can be said that the category is complete.
[0278] After the category completeness is obtained, the initial recognition result can be adjusted according to different category completeness based on the first similarity between the target supervector to be recognized and the target category supervector to obtain the final recognition result.
[0279] Furthermore, the step of adjusting the initial recognition result based on the category completeness and the first similarity between the target class supervector and the target supervector to be recognized to obtain the final recognition result includes:
[0280] Step S321: when the category completeness is category complete, the initial recognition result is used as the final recognition result;
[0281] Step S322: When the category completeness is incomplete, determine the first similarity between the target class supervector and the target supervector to be identified, and when the first similarity is higher than a first preset similarity threshold, use the initial recognition result as the final recognition result; when the first similarity is not higher than the first preset similarity threshold, adjust the initial recognition result to an irrelevant category, and use the irrelevant category as the final recognition result.
[0282] Reference Fig.11 , Fig.11 FIG. 1 is a flow chart of signal recognition in the fifth embodiment of the signal recognition method of the present application. Fig.11 As shown, it should be emphasized that, whether it is a classification task or a recognition task, the above-mentioned device first selects various supervectors (i.e. Fig.11 The super vectors of class 1 to class 3 are selected from the super vectors of the target to be identified (i.e. Fig.11 The similarity between the target super vectors to be classified in Fig.11 The class super vector with the highest similarity comparison (in the similarity comparison) is taken as the initial recognition result, and then a secondary judgment is performed.
[0283] In the secondary judgment, when the current task type is a classification task, the category completeness of each type of supervector can be obtained first; when the category completeness is category complete, it can be said that the initial recognition result is the best recognition result, and then the initial recognition result is directly used as the final recognition result;
[0284] When the category completeness is incomplete, it can be explained that the initial recognition result determined at this time may not be the best recognition result. This is because some categories may not be trained during training (for example, abnormal categories, or for example, action classification, there are only class supervectors for set actions, and there are no corresponding class supervectors for other resting states, irrelevant actions, etc.). Therefore, the above-mentioned device can first determine the first similarity between the target class supervector and the target supervector to be identified, and determine whether the first similarity is higher than a first preset similarity threshold. The first preset similarity threshold can be set according to actual conditions.
[0285] If it is higher than , it can be said that the initial recognition result at this time is the best recognition result, and then the initial recognition result is used as the final recognition result;
[0286] If it is not higher than , it can be said that the initial recognition result is not the best recognition result, and it can be determined that the actual category of the target supervector to be recognized does not exist in the previously trained category. The above device can adjust the initial recognition result to an irrelevant category, that is, a category irrelevant to the pre-trained category, and use the irrelevant category as the final recognition result (i.e. Fig.11 In the classification task, the category result corresponding to the output class super vector).
[0287] Step S33: when the current task type is a recognition task, the category state of the class supervector is obtained, and the initial recognition result is adjusted based on the category state and the first similarity between the target class supervector and the target supervector to be recognized to obtain a final recognition result.
[0288] It is understandable that the above-mentioned category states may be the categories corresponding to various types of supervectors during training. The above-mentioned category states may include positive category states and negative category states, wherein the positive category state may be a normal state, and the negative category state may be an abnormal state (such as an abnormal heart rate, etc.). The above-mentioned category states may also be set according to the user during training. Exemplarily, if during a certain task, the category involved in the training only has a normal heart rate state, it can be explained as only a positive category state, and if the category involved has a normal heart rate state and an abnormal heart rate state, it can be explained as a positive category state and a negative category state.
[0289] After the category status is obtained, the initial recognition result can be adjusted according to different category statuses based on the first similarity between the target supervector to be recognized and the target category supervector to obtain a final recognition result.
[0290] Furthermore, the step of adjusting the initial recognition result based on the category state and the first similarity between the target class supervector and the target supervector to be recognized to obtain the final recognition result includes:
[0291] Step S331: when the category state is only the positive category state, determine the first similarity between the target category supervector and the target supervector to be identified, and when the first similarity is higher than the second preset similarity threshold, use the initial recognition result as the final recognition result; when the first similarity is not higher than the second preset similarity threshold, adjust the initial recognition result to an abnormal category, and use the abnormal category as the final recognition result;
[0292] It should be noted that, during the secondary judgment, when the current task type is an identification task, the category status of each type of supervector can be obtained first; when the category status is only a normal category status, in order to ensure that the target supervector to be identified is not actually an abnormal category status, the above-mentioned device can determine the similarity between the target class supervector and the target supervector to be identified as the above-mentioned first similarity, and determine whether the first similarity is higher than a second preset similarity threshold, and the second preset similarity threshold can be set according to actual conditions;
[0293] If it is higher than , it can be said that the initial recognition result at this time is the best recognition result, and then the initial recognition result is used as the final recognition result;
[0294] If it is not higher than, it can be explained that the initial recognition result is not the best recognition result at this time, and it is an abnormal category. Then the above-mentioned device can adjust the initial recognition result to the abnormal category and use it as the final recognition result.
[0295] Step S332: When the category state includes a negative category state and a positive category state, determine a first similarity between the target category supervector and the target supervector to be identified, and when the first similarity is higher than a third preset similarity threshold, use the initial recognition result as the final recognition result; when the first similarity is not higher than the third preset similarity threshold, adjust the initial recognition result to a new abnormal category, and use the new abnormal category as the final recognition result.
[0296] When the category state includes both a normal category state and an abnormal category state (the abnormal category state may be obtained through training with very few abnormal samples), in order to ensure the accuracy of the result, the above-mentioned device may determine the similarity between the target class supervector and the target supervector to be identified as the above-mentioned first similarity, and determine whether the first similarity is higher than a third preset similarity threshold, and the third preset similarity threshold may be set according to actual conditions;
[0297] If it is higher than , it can be said that the initial recognition result at this time is the best recognition result, and then the initial recognition result is used as the final recognition result;
[0298] If it is not higher than , it can be explained that the initial recognition result is not the best recognition result at this time, and it may be an abnormal category state that was not trained during training (because the number of abnormal samples during training is small). Then the above-mentioned device can adjust the initial recognition result to a new abnormal category, that is, at this time, the biological signal to be recognized may be an abnormal category that was not trained during training, so it is output as a new abnormal category for the final recognition result (i.e. Fig.11 Identification and detection tasks: output state analogy and whether it is an abnormal state). At the same time, after the output, it can be further determined by humans to improve accuracy.
[0299] In addition, an embodiment of the present application further proposes a storage medium, on which a signal recognition program is stored. When the signal recognition program is executed by a processor, the signal recognition method described above is implemented.
[0300] In addition, refer to Fig.12 , Fig.12 : is a structural block diagram of the first embodiment of the signal recognition device of this application; Fig.12 As shown, the embodiment of the present application also proposes a signal recognition device, which includes:
[0301] The signal acquisition module 121 is used to acquire the biological signal to be identified, encode the biological signal to be identified, and obtain the target super vector to be identified;
[0302] A supervector acquisition module 122 is used to select a target class supervector from various supervectors according to the target supervector to be identified, and the class supervector is obtained by encoding the normal sample biological signal corresponding to the normal type;
[0303] The result adjustment module 123 is used to take the normal type corresponding to the target class super vector as the initial recognition result, and adjust the initial recognition result according to the first similarity between the target class super vector and the target super vector to be recognized to obtain a final recognition result.
[0304] In this embodiment, the determined normal type can be adjusted through the first similarity between the target class supervector and the target supervector to be identified, and the final identification result can be obtained to complete the identification, so that the signal identification can still be completed when there are only normal samples.
[0305] As an implementation mode, the signal acquisition module 121 is also used to segment the biological signal to be identified to obtain signal segments; perform data cleaning on the signal segments according to a preset cleaning operation, the preset cleaning operation includes at least one of outlier detection, difference filling, mean filling or signal rectification; perform denoising on the cleaned signal segments according to a preset denoising operation, the preset denoising operation includes at least one of bandpass filtering, mean smoothing or spectral subtraction; downsample the denoised signal segments according to a preset downsampling operation, the preset downsampling operation includes at least one of interval summation, interval statistics, direct downsampling or pooling; standardize the downsampled signal segments, and encode the standardized signal segments to obtain the target supervector to be identified.
[0306] Based on the above-mentioned first embodiment of the signal recognition device of the present application, a second embodiment of the signal recognition device of the present application is proposed.
[0307] In this embodiment, the signal acquisition module 121 is further used to define an atomic supervector corresponding to entity information of each entity, the entity includes a sensor and a signal amplitude, and the entity information includes sensor information and signal amplitude information;
[0308] The signal acquisition module 121 is also used to determine the first entity information involved in the biological signal to be identified, and retrieve the first atomic supervector corresponding to the first entity information involved; the biological signal to be identified is encoded by the retrieved first atomic supervector to obtain the target supervector to be identified.
[0309] As an implementation mode, the signal acquisition module 121 is also used to determine the entity type of each entity; when the entity type is a discrete entity type, the atomic supervector corresponding to the entity information of each entity is defined according to the quasi-orthogonality principle between each atomic supervector, and the entity corresponding to the discrete entity type includes a sparse electrode sensor; when the entity type is a continuous entity type, the atomic supervector corresponding to the entity information of each entity is defined according to the principle of similarity relationship between each atomic supervector, and the entity corresponding to the continuous entity type includes a dense electrode sensor and a signal amplitude.
[0310] As an implementation mode, the signal acquisition module 121 is also used to randomly generate an atomic supervector corresponding to the entity information of the current entity, and determine whether the atomic supervector corresponding to the entity information of the current entity is quasi-orthogonal to the atomic supervector corresponding to the entity information of the defined entity; when the atomic supervector corresponding to the entity information of the current entity is not quasi-orthogonal to the atomic supervector corresponding to the entity information of the defined entity, return to execute the step of randomly generating an initial atomic supervector corresponding to the entity information of the current entity, until the atomic supervector corresponding to the entity information of the current entity is quasi-orthogonal to the atomic supervector corresponding to the entity information of the defined entity.
[0311] As an implementation mode, the signal acquisition module 121 is also used to standardize the entity information of the entity when the entity is a signal amplitude, and bin the standardized entity information according to a preset binning rule; determine the target box based on each binning result, and define the target box according to a preset vector dimension to obtain the amplitude supervector corresponding to the target box; flip the amplitude supervector corresponding to the target box to obtain the amplitude supervector corresponding to each binning result; and use the amplitude supervector corresponding to each binning result as the atomic supervector corresponding to each entity information.
[0312] As an implementation mode, the signal acquisition module 121 is also used to generate a first sensor supervector along the horizontal axis and a second sensor supervector along the vertical axis when the entity is a dense electrode sensor; and define an atomic supervector corresponding to each entity information based on the first sensor supervector and the second sensor supervector.
[0313] Based on the above-mentioned embodiments of the signal recognition device of the present application, a third embodiment of the signal recognition device of the present application is proposed.
[0314] In this embodiment, the signal acquisition module 121 is also used to encode the signal value of each sampling point in the biological signal to be identified by calling the first atomic supervector to obtain a first encoded supervector; encode the sensor corresponding to the biological signal to be identified by calling the first atomic supervector to obtain a second encoded supervector; bind each first encoded supervector and the corresponding second encoded supervector to obtain a composite supervector; perform weighted superposition on each composite supervector according to the preset weight corresponding to each sensor, and standardize the obtained first superposition result to obtain a target supervector to be identified.
[0315] As an implementation mode, the signal acquisition module 121 is also used to obtain the node coding supervector of the previous sampling point, and to arrange the node coding supervector of the previous sampling point; to encode the signal value of the current sampling point in the biological signal to be identified by calling the first atomic supervector to obtain the node coding supervector of the current node; to bind the arranged node coding supervector of the previous sampling point and the node coding supervector of the current node, and to obtain the first coding supervector according to the binding result.
[0316] Based on the above-mentioned embodiments of the signal recognition device of the present application, a fourth embodiment of the signal recognition device of the present application is proposed.
[0317] In this embodiment, the signal acquisition module 121 is also used to determine the second entity information involved in the normal sample biological signal corresponding to the normal type, and to call the second atomic supervector corresponding to the involved second entity information; encode the normal sample biological signal by the called second atomic supervector to obtain the sample target supervector; and perform weighted superposition on the sample target supervectors in the same category to obtain the class supervector.
[0318] As an implementation mode, the signal acquisition module 121 is also used to perform weighted superposition on sample target supervectors in the same category to obtain a second superposition result, and standardize the second superposition result; determine a third similarity between the sample target supervector and the standardized second superposition result; when the third similarity reaches a preset similarity requirement, use the standardized second superposition result as a class supervector.
[0319] As an implementation mode, the signal acquisition module 121 is also used to determine the third superposition result to which the sample target supervector actually belongs and standardize the third superposition result when the third similarity does not meet the preset similarity requirement; determine the learning rate corresponding to the sample supervector according to the sample target supervector, the standardized second superposition result and the standardized third superposition result; retrain the second superposition result and the third superposition result based on the learning rate; and obtain the class supervector according to the retrained second superposition result and the retrained third superposition result when the retraining result meets the preset retraining requirement.
[0320] As an implementation manner, the signal acquisition module 121 is further used to determine a fourth similarity between the sample target supervector and the standardized second superposition result, and to determine a fifth similarity between the sample target supervector and the standardized third superposition result; and to determine a learning rate corresponding to the sample supervector according to a first preset formula by presetting an adjustable parameter, the fourth similarity, and the fifth similarity; wherein the first preset formula is:
[0321] lr = γ(sim_b-sim_a);
[0322] lr is the learning rate corresponding to the sample supervector, γ is a preset adjustable parameter, sim_b is the fourth similarity, and sim_a is the fifth similarity.
[0323] As an implementation manner, the signal acquisition module 121 is further used to retrain the third superposition result according to the second preset formula based on the learning rate, the sample target supervector and the third superposition result to obtain the retrained third superposition result; retrain the second superposition result according to the third preset formula based on the preset adjustment factor, the learning rate, the sample target supervector and the second superposition result to obtain the retrained second superposition result; wherein the second preset formula is:
[0324] A′=A+lr·a;
[0325] The third preset formula is:
[0326] B ′ =B+εlr·a;
[0327] A′ is the third superposition result after retraining, A is the third superposition result, B′ is the second superposition result after retraining, B is the second superposition result, ε is the preset adjustment factor, lr is the learning rate, and a is the sample target super vector.
[0328] Based on the above-mentioned embodiments of the signal recognition device of the present application, a fifth embodiment of the signal recognition device of the present application is proposed.
[0329] In this embodiment, the result adjustment module 123 is also used to determine the current task type; when the current task type is a classification task, the category completeness of the class supervector is obtained, and the initial recognition result is adjusted based on the category completeness and the first similarity between the target class supervector and the target supervector to be identified, so as to obtain the final recognition result; when the current task type is a recognition task, the category state of the class supervector is obtained, and the initial recognition result is adjusted based on the category state and the first similarity between the target class supervector and the target supervector to be identified, so as to obtain the final recognition result.
[0330] As an implementation mode, the result adjustment module 123 is also used to, when the category completeness is category complete, use the initial recognition result as the final recognition result; when the category completeness is category incomplete, determine the first similarity between the target class supervector and the target supervector to be identified, and when the first similarity is higher than a first preset similarity threshold, use the initial recognition result as the final recognition result; when the first similarity is not higher than the first preset similarity threshold, adjust the initial recognition result to an irrelevant category, and use the irrelevant category as the final recognition result.
[0331] As an implementation mode, the result adjustment module 123 is also used to determine the first similarity between the target class supervector and the target supervector to be identified when the category state is only the positive category state, and when the first similarity is higher than the second preset similarity threshold, use the initial recognition result as the final recognition result; when the first similarity is not higher than the second preset similarity threshold, adjust the initial recognition result to the abnormal category, and use the abnormal category as the final recognition result; when the category state includes the negative category state and the positive category state, determine the first similarity between the target class supervector and the target supervector to be identified, and when the first similarity is higher than the third preset similarity threshold, use the initial recognition result as the final recognition result; when the first similarity is not higher than the third preset similarity threshold, adjust the initial recognition result to the new abnormal category, and use the new abnormal category as the final recognition result.
[0332] Other embodiments or specific implementations of the signal recognition device described in the present application can refer to the above-mentioned method embodiments and will not be described in detail here.
[0333] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0334] 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.
[0335] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory image (ROM) / random access memory (RAM), a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0336] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A signal recognition method, characterized in that: The method comprises: Acquire a biological signal to be identified, and encode the biological signal to be identified to obtain a super vector of a target to be identified; Selecting a target class supervector from various supervectors according to the target supervector to be identified, wherein the class supervector is obtained by encoding a normal sample biological signal corresponding to a normal type; The normal type corresponding to the target class supervector is used as an initial recognition result, and the initial recognition result is adjusted according to a first similarity between the target class supervector and the target supervector to be recognized to obtain a final recognition result.
2. The method according to claim 1, characterized in that The step of adjusting the initial recognition result according to the first similarity between the target class supervector and the target supervector to be recognized to obtain a final recognition result includes: Determine the current task type; When the current task type is a classification task, obtaining a class completeness of the class supervector, and adjusting the initial recognition result based on the class completeness and a first similarity between the target class supervector and the target supervector to be recognized, to obtain a final recognition result; When the current task type is a recognition task, the category state of the class supervector is obtained, and the initial recognition result is adjusted based on the category state and a first similarity between the target class supervector and the target supervector to be recognized to obtain a final recognition result.
3. The method according to claim 2, characterized in that The step of adjusting the initial recognition result based on the category completeness and the first similarity between the target class supervector and the target supervector to be recognized to obtain a final recognition result includes: When the category completeness is category complete, taking the initial recognition result as the final recognition result; When the category completeness is incomplete, a first similarity between the target class supervector and the target supervector to be identified is determined, and when the first similarity is higher than a first preset similarity threshold, the initial recognition result is used as the final recognition result; when the first similarity is not higher than the first preset similarity threshold, the initial recognition result is adjusted to an irrelevant category, and the irrelevant category is used as the final recognition result.
4. The method according to claim 2, characterized in that The step of adjusting the initial recognition result based on the category state and the first similarity between the target class supervector and the target supervector to be recognized to obtain a final recognition result includes: When the category state is only a positive category state, determining a first similarity between the target class supervector and the target supervector to be identified, and when the first similarity is higher than a second preset similarity threshold, using the initial recognition result as a final recognition result; when the first similarity is not higher than the second preset similarity threshold, adjusting the initial recognition result to an abnormal category, and using the abnormal category as the final recognition result; When the category state includes the negative category state and the positive category state, determine a first similarity between the target class supervector and the target supervector to be identified, and when the first similarity is higher than a third preset similarity threshold, use the initial recognition result as the final recognition result; when the first similarity is not higher than the third preset similarity threshold, adjust the initial recognition result to a new abnormal category, and use the new abnormal category as the final recognition result.
5. The method according to claim 1, characterized in that Before the step of acquiring the biological signal to be identified and encoding the biological signal to be identified to obtain the target supervector to be identified, the method further includes: defining an atomic supervector corresponding to entity information of each entity, wherein the entity includes a sensor and a signal amplitude, and the entity information includes sensor information and signal amplitude information; The step of encoding the biological signal to be identified to obtain a supervector of the target to be identified includes: Determine first entity information involved in the biological signal to be identified, and retrieve a first atomic supervector corresponding to the first entity information involved; The biological signal to be identified is encoded by calling the first atomic supervector to obtain the target supervector to be identified.
6. The method according to claim 5, characterized in that The step of encoding the biological signal to be identified by calling the first atomic supervector to obtain the target supervector to be identified includes: The signal value of each sampling point in the biological signal to be identified is encoded by calling the first atomic supervector to obtain a first encoded supervector; The sensor corresponding to the biological signal to be identified is encoded by calling the first atomic supervector to obtain a second encoding supervector; Binding each of the first coding supervectors and the corresponding second coding supervector to obtain a composite supervector; The composite supervectors are weightedly superimposed according to the preset weights corresponding to the sensors, and the obtained first superposition result is standardized to obtain the supervector of the target to be identified.
7. The method according to claim 6, characterized in that The step of encoding the signal value of each sampling point in the biological signal to be identified by calling the first atomic supervector to obtain the first encoded supervector includes: Obtaining a node encoding supervector of a previous sampling point, and performing an arrangement operation on the node encoding supervector of the previous sampling point; Encoding the signal value of the current sampling point in the biological signal to be identified by calling the first atomic supervector to obtain a node encoding supervector of the current node; The arranged node coding supervector of the previous sampling point and the node coding supervector of the current node are bound, and a first coding supervector is obtained according to the binding result.
8. The method according to claim 5, characterized in that After the step of defining the atomic supervector corresponding to the entity information of each entity, the method further includes: Determine the second entity information related to the normal sample biological signal corresponding to the normal type, and retrieve the second atomic supervector corresponding to the second entity information involved; The normal sample biological signal is encoded by the retrieved second atomic supervector to obtain a sample target supervector; The sample target supervectors in the same category are weightedly superimposed to obtain a class supervector.
9. The method according to claim 8, characterized in that The step of weighted superposition of the sample target supervectors in the same category to obtain a class supervector comprises: Performing weighted superposition on the sample target supervectors in the same category to obtain a second superposition result, and standardizing the second superposition result; determining a third similarity between the sample target supervector and the normalized second superposition result; When the third similarity reaches a preset similarity requirement, the standardized second superposition result is used as a class super vector.
10. The method according to claim 9, characterized in that After the step of determining the third similarity between the sample target supervector and the standardized second superposition result, the method further includes: When the third similarity does not meet the preset similarity requirement, determining a third superposition result to which the sample target supervector actually belongs, and standardizing the third superposition result; Determine a learning rate corresponding to the sample supervector according to the sample target supervector, the standardized second superposition result, and the standardized third superposition result; Retraining the second superposition result and the third superposition result based on the learning rate; When the retraining result meets the preset retraining requirement, a class super vector is obtained according to the second superposition result after the retraining and the third superposition result after the retraining.
11. The method according to claim 10, characterized in that The step of determining the learning rate corresponding to the sample supervector according to the sample target supervector, the standardized second superposition result, and the standardized third superposition result comprises: Determining a fourth similarity between the sample target supervector and the standardized second superposition result, and determining a fifth similarity between the sample target supervector and the standardized third superposition result; Determine the learning rate corresponding to the sample supervector according to a first preset formula by presetting an adjustable parameter, the fourth similarity, and the fifth similarity; Wherein, the first preset formula is: lr = γ(sim_b-sim_a); lr is the learning rate corresponding to the sample supervector, γ is the preset adjustable parameter, sim_b is the fourth similarity, and sim_a is the fifth similarity.
12. The method according to claim 10, characterized in that The step of retraining the second superposition result and the third superposition result based on the learning rate includes: Retraining the third superposition result according to a second preset formula based on the learning rate, the sample target supervector and the third superposition result to obtain a retrained third superposition result; Retraining the second superposition result according to a third preset formula based on a preset adjustment factor, the learning rate, the sample target supervector, and the second superposition result to obtain a retrained second superposition result; Wherein, the second preset formula is: A′=A+lr·a; The third preset formula is: B′=B+εlr·a; A′ is the third superposition result after the retraining, A is the third superposition result, B′ is the second superposition result after the retraining, B is the second superposition result, ε is the preset adjustment factor, lr is the learning rate, and a is the sample target supervector.
13. The method according to claim 5, characterized in that The step of defining the atomic supervector corresponding to the entity information of each entity includes: Determine the entity type of each entity; When the entity type is a discrete entity type, the atomic supervectors corresponding to the entity information of each entity are defined according to the quasi-orthogonality principle between the atomic supervectors, and the entities corresponding to the discrete entity type include sparse electrode sensors; When the entity type is a continuous entity type, the atomic supervectors corresponding to the entity information of each entity are defined according to the principle that there is a similarity relationship between the atomic supervectors, and the entities corresponding to the continuous entity type include dense electrode sensors and the signal amplitude.
14. The method according to claim 13, characterized in that The step of defining the atomic supervectors corresponding to the entity information of each entity according to the quasi-orthogonality principle between the atomic supervectors includes: Randomly generate an atomic supervector corresponding to entity information of the current entity, and determine whether the atomic supervector corresponding to the entity information of the current entity is quasi-orthogonal to the atomic supervector corresponding to the entity information of the defined entity; When the atomic supervector corresponding to the entity information of the current entity is not quasi-orthogonal to the atomic supervector corresponding to the entity information of the defined entity, return to the step of randomly generating an initial atomic supervector corresponding to the entity information of the current entity until the atomic supervector corresponding to the entity information of the current entity is quasi-orthogonal to the atomic supervector corresponding to the entity information of the defined entity.
15. The method according to claim 13, characterized in that The step of defining the atomic supervectors corresponding to the entity information of each entity according to the principle that there is a similarity relationship between the atomic supervectors includes: When the entity is the signal amplitude, standardizing the entity information of the entity, and binning the standardized entity information according to a preset binning rule; Determine a target box based on each binning result, define the target box according to a preset vector dimension, and obtain an amplitude supervector corresponding to the target box; Flipping the amplitude supervector corresponding to the target box to obtain the amplitude supervector corresponding to each binning result; The amplitude supervector corresponding to each of the binning results is used as the atomic supervector corresponding to each of the entity information.
16. The method according to claim 13, characterized in that The step of defining the atomic supervectors corresponding to the entity information of each entity according to the principle that there is a similarity relationship between the atomic supervectors includes: When the entity is the dense electrode sensor, a first sensor supervector is generated according to the horizontal axis direction, and a second sensor supervector is generated according to the vertical axis direction; An atomic supervector corresponding to each entity information is defined based on the first sensor supervector and the second sensor supervector.
17. The method according to any one of claims 1 to 16, characterized in that The step of encoding the biological signal to be identified to obtain a supervector of the target to be identified includes: Segmenting the biological signal to be identified to obtain signal fragments; Performing data cleaning on the signal segment according to a preset cleaning operation, wherein the preset cleaning operation includes at least one of outlier detection, difference filling, mean filling or signal rectification; Performing noise reduction on the cleaned signal segment according to a preset noise reduction operation, wherein the preset noise reduction operation includes at least one of bandpass filtering, mean smoothing or spectral subtraction; Downsampling the de-noised signal segments according to a preset downsampling operation, wherein the preset downsampling operation includes at least one of interval summation, interval statistics, direct downsampling or pooling; The downsampled signal segments are normalized, and the normalized signal segments are encoded to obtain a super vector of the target to be identified.
18. A signal recognition device, characterized in that: The device comprises: A signal acquisition module, used to acquire a biological signal to be identified, and encode the biological signal to be identified to obtain a super vector of a target to be identified; A supervector acquisition module, used to select a target class supervector from various supervectors according to the target supervector to be identified, wherein the class supervector is obtained by encoding a normal sample biological signal corresponding to a normal type; The result adjustment module is used to take the normal type corresponding to the target class super vector as the initial recognition result, and adjust the initial recognition result according to the first similarity between the target class super vector and the target super vector to be recognized to obtain a final recognition result.
19. A storage medium, characterized in that: The storage medium stores a signal recognition program, and when the signal recognition program is executed by the processor, the steps of the signal recognition method according to any one of claims 1 to 17 are implemented.
20. A wearable device, characterized in that: The wearable device comprises: a memory, a processor, and a signal recognition program stored in the memory and executable on the processor, wherein the signal recognition program implements the steps of the signal recognition method according to any one of claims 1 to 17 when executed by the processor.
