Biosignal marking method, device, equipment and storage medium
By identifying the target signal mutation point in the biological signal through the preset sliding window, the signal data during the human body's movement is automatically extracted, the problem of inaccurate extraction is solved, the rapid and accurate generation of biological signal sample data is achieved, and deep learning is improved The robustness of the network.
Patent Information
- Application Number
- CN202111331759.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-11
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2041-11-11
AI Technical Summary
In the field of human biosignal recognition, the prior art requires manual extraction and labeling of signals, which is time-consuming and labor-intensive and easily affected by individual subjective factors, resulting in inaccurate extraction.
The preset sliding window is used to identify the mutation points of the target signal in the biological signal, and the action state changes are identified through the difference in characteristic values, and the target signal is automatically extracted and sample data is generated to reduce manual intervention.
It realizes rapid and accurate identification and extraction of biological signal sample data, improves the robustness of deep learning networks, and reduces the impact of manual intervention.
Smart Images

Figure CN114169361B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the technical field of biological signal recognition, and more specifically, to a biological signal marking method, device, equipment and storage medium. Background Art
[0002] Human biological signals, such as electromyography, electroencephalography, and electrooculography, are non-steady-state AC signals that will generate signal waveforms carrying different characteristic information when relaxing and performing various movements.
[0003] In the field of human biological signal recognition, the original signal needs to be collected first. Usually, when collecting the original signal, the relaxation state and the target action state are periodically alternating to extract and label the effective signal in the original signal, that is, to obtain the action behavior corresponding to a certain section of signal data to form training sample data for use by the deep learning network.
[0004] In order to improve the robustness of deep learning networks, it is necessary to add as many accurate samples as possible. At present, the extraction and labeling of effective signals requires researchers to use some auxiliary tools for manual extraction and labeling, which consumes a lot of time and energy, and is easily affected by the personal subjective factors of the extractors, introducing problems such as inaccurate confirmation of precise demarcation points. Summary of the invention
[0005] One objective of the present disclosure is to provide a new technical solution for biosignal labeling to quickly and accurately identify target signals in original signals, thereby generating biosignal sample data for use in deep learning networks.
[0006] According to a first aspect of the present disclosure, an embodiment of a biological signal marking method is provided, comprising:
[0007] Using a preset sliding window to identify a target signal mutation point in the original biological signal, wherein the preset sliding window is used to extract signal data of a first preset duration from the original biological signal, and the target signal mutation point is a time point in the original biological signal that reflects a mutation in a human body motion state;
[0008] Extracting a target biological signal from the original biological signal according to the target signal mutation point, wherein the target biological signal includes signal data generated during the human body performing the target action;
[0009] The label information is selected and the label information and the target biological signal are packaged in a data packet to obtain biological signal sample data.
[0010] Optionally, the target signal mutation point includes at least one signal mutation point, and the step of using a preset sliding window to identify the target signal mutation point in the original biological signal includes:
[0011] Based on a preset sliding window, and according to a first incremental window length, acquiring first signal data and second signal data that are adjacent in time sequence from the original biological signal, wherein the generation time of the second signal data is later than the generation time of the first signal data;
[0012] Acquire a first characteristic value of the first signal data, and acquire a second characteristic value of the second signal data;
[0013] When the absolute value of the difference between the first characteristic value and the second characteristic value is greater than the first preset threshold, obtaining the middle value of the time range corresponding to the second signal data as the first signal mutation point to be determined;
[0014] In the case where the first signal mutation point to be determined meets a preset condition, determining the first signal mutation point to be determined as the first signal mutation point;
[0015] According to the first signal mutation point, a target signal mutation point is obtained.
[0016] Optionally, when the first signal mutation point to be determined satisfies a preset condition, determining the first signal mutation point to be determined as the first signal mutation point includes:
[0017] Obtaining a third characteristic value of third signal data before the first signal mutation point to be determined, and obtaining a fourth characteristic value of fourth signal data after the first signal mutation point to be determined, wherein the third signal data and the fourth signal data are signal data of a second preset time length, and the second preset time length is less than the first preset time length;
[0018] When the absolute value of the difference between the third eigenvalue and the fourth eigenvalue is greater than the second preset threshold, the first to-be-determined signal mutation point is determined to be the first signal mutation point.
[0019] Optionally, extracting the target biological signal from the original biological signal according to the target signal mutation point includes:
[0020] Extracting signal data of a third preset time period before and after a first signal mutation point from the original biological signal as the first biological signal, wherein the first biological signal is signal data generated during a process from a relaxed state to a target action performed by a human body;
[0021] According to the first biological signal, a target biological signal is obtained.
[0022] Optionally, after obtaining the target biological signal, the method further includes:
[0023] From the first biological signal, obtain a fifth characteristic value of all signals before a mutation point of the first signal, and obtain a sixth characteristic value of half of the signals before a mutation point of the first signal;
[0024] When the absolute value of the difference between the fifth eigenvalue and the sixth eigenvalue is greater than the third preset threshold, the first signal mutation point is determined to be an erroneous signal mutation point, and the first signal mutation point is removed from the target signal mutation points, and the first biological signal is removed from the target biological signal.
[0025] Optionally, the method further comprises:
[0026] When the absolute value of the difference between the fifth eigenvalue and the sixth eigenvalue is not greater than the third preset threshold, obtaining, from the first biological signal, a seventh eigenvalue of all signals after the mutation point of the first signal;
[0027] When the absolute value of the difference between the fifth eigenvalue and the seventh eigenvalue is not greater than the fourth preset threshold, the first signal mutation point is determined to be an erroneous signal mutation point, and the first signal mutation point is removed from the target signal mutation points, and the first biological signal is removed from the target biological signal.
[0028] Optionally, the target signal mutation point includes at least one signal mutation point, and the target biological signal includes at least one biological signal corresponding to the at least one signal mutation point respectively; after obtaining the target biological signal, the method further includes:
[0029] Acquire any biological signal from the target biological signal as a second biological signal, and acquire a second signal mutation point corresponding to the second biological signal from the target signal mutation point;
[0030] The difference between the second signal mutation point and the duration of the preset sliding window and the length of the first incremental window is taken as the starting time point;
[0031] Reducing the first incremental window length to obtain a second incremental window length;
[0032] In the original biological signal, starting from the starting time point, based on the preset sliding window, and according to the second incremental window length, fifth signal data and sixth signal data that are adjacent in time sequence are acquired;
[0033] When the absolute value of the difference between the eighth eigenvalue of the fifth signal data and the ninth eigenvalue of the sixth signal data is greater than the first preset threshold, obtaining the start time corresponding to the sixth signal data, and updating the second signal mutation point according to the start time, the duration of the preset sliding window and the second incremental window length; and
[0034] Extracting signal data of a third preset time length before and after the updated second signal mutation point from the original biological signal to update the signal data in the second biological signal;
[0035] The target biosignal is updated according to the updated second biosignal.
[0036] Optionally, the original biological signal includes a DC bias signal;
[0037] Before the step of using a preset sliding window to identify a target signal mutation point in the original biological signal, the method further includes:
[0038] Obtaining a signal mean value of the original biological signal as a DC bias component;
[0039] According to the DC offset component, a DC offset signal included in the original biological signal is removed.
[0040] According to a second aspect of the present disclosure, there is provided an embodiment of a biological signal marking device, comprising:
[0041] A signal mutation point identification module, used to identify a target signal mutation point in the original biological signal using a preset sliding window, wherein the preset sliding window is a sliding window of a first preset time length, and the target signal mutation point is a time point in the original biological signal that reflects a mutation in a human body motion state;
[0042] A biological signal extraction module, used to extract a target biological signal from the original biological signal according to the mutation point of the target signal, wherein the target biological signal includes signal data generated during the biological execution of the target action;
[0043] The labeling module is used to use the motion information of the target motion as the label of the target biological signal to obtain the biological signal sample data.
[0044] According to a third aspect of the present disclosure, an embodiment of an electronic device is provided, including the apparatus according to the second aspect of the present specification, or the electronic device includes:
[0045] A memory for storing executable instructions;
[0046] A processor is used to execute the method described in the first aspect of this specification under the control of the executable computer program.
[0047] According to a fourth aspect of the present disclosure, an embodiment of a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program that can be read and executed by a computer, and the computer program is used to execute the method described in the first aspect of this specification when read and executed by the computer.
[0048] One beneficial effect of the embodiments of the present disclosure is that, according to the embodiments of the present disclosure, for the original signal to be analyzed, there is no need to rely on manual labor, but the electronic device uses a preset window to identify the signal data in the original biological signal to obtain a target signal mutation point that reflects a sudden change in the human body's motion state; thereafter, the target biological signal generated by the human body in the process of performing the target action can be extracted from the original biological signal based on the target signal mutation point, and the biological signal sample data can be quickly and accurately obtained by selecting label information and packaging the label information and the target biological signal in a data packet.
[0049] Other features and advantages of the present specification will become apparent from the following detailed description of exemplary embodiments of the present specification with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the specification and, together with the description, serve to explain the principles of the specification.
[0051] Figure 1 is a schematic diagram of an original signal provided by an embodiment of the present disclosure.
[0052] Figure 2 It is a flowchart of the biological signal labeling method provided in an embodiment of the present disclosure.
[0053] Figure 3 It is a schematic diagram of the original signal after the DC bias signal is removed provided by an embodiment of the present disclosure.
[0054] Figure 4 It is a schematic diagram of a process for obtaining a target signal mutation point provided by an embodiment of the present disclosure.
[0055] Figure 5 It is a schematic diagram of the preset sliding window step provided in an embodiment of the present disclosure.
[0056] Figure 6 It is a schematic diagram of the first target signal mutation point provided by an embodiment of the present disclosure.
[0057] Figure 7a It is a flowchart of the first mutation point error correction process provided by an embodiment of the present disclosure.
[0058] Figure 7b It is a flowchart of the second mutation point error correction process provided by an embodiment of the present disclosure.
[0059] Figure 8 It is a schematic diagram of the second target signal mutation point provided by an embodiment of the present disclosure.
[0060] Fig. 9It is a flowchart of the mutation point correction process provided by the embodiment of the present disclosure.
[0061] Fig.10 It is a schematic diagram of a critical signal mutation point provided by an embodiment of the present disclosure.
[0062] Fig.11 It is a schematic diagram of the third target signal mutation point provided in an embodiment of the present disclosure.
[0063] Fig.12 It is a block diagram of a biological signal marking device provided in an embodiment of the present disclosure.
[0064] Fig.13 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0065] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.
[0066] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0067] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0068] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0069] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0070] <Method Example>
[0071] Usually, after the original biological signal of the human body is collected, since the original biological signal does not contain the label information of the target action performed by the human body, the original biological signal cannot be directly input into the neural network for learning and classification. Instead, the target biological signal in the original biological signal, that is, the signal data generated during the human body performing the target action, needs to be screened and labeled before it can be used. In order to facilitate neural network learning, the extracted target biological signal and the label need to be packaged as biological signal sample data.
[0072] Please see Figure 1 , which is a schematic diagram of the original signal provided by the embodiment of the present disclosure. Figure 1 As shown, usually, in the process of collecting human biological signals, due to factors such as action interval, action strength, skin movement, etc., the target biological signals reflecting the target action will be dispersed, the signal amplitudes will be different, and some artifact signals may be introduced, so that when the target biological signals in the original biological signals are identified and analyzed based on the manual method to generate biological signal sample data, it is not only time-consuming and laborious, but also has the problem of low accuracy. To solve this problem, in an embodiment of the present disclosure, after the electronic device collects the original biological signals of the human body, based on the characteristics that the biological signals generated by the human body in a relaxed state and when performing the target action usually mutate, and the biological signals before the signal mutation point usually tend to be stable, while the biological signals after the signal mutation point usually increase first and then tend to be stable, the electronic device automatically identifies and analyzes the original biological signals to generate biological signal sample data for neural network learning.
[0073] Please see Figure 2 , which is a flow chart of the biological signal labeling method provided in an embodiment of the present disclosure. This embodiment can be implemented by an electronic device, and the electronic device can be a server or a terminal device, which is not particularly limited here.
[0074] like Figure 2 As shown, the biological signal marking method of this embodiment includes steps S2100-S2300, which are described in detail below.
[0075] Step S2100, using a preset sliding window to identify a target signal mutation point in the original biological signal, wherein the preset sliding window is used to extract signal data of a first preset duration from the original biological signal, and the target signal mutation point is a time point in the original biological signal that reflects a sudden change in the human body's motion state; and, executing step S2200, extracting a target biological signal from the original biological signal according to the target signal mutation point, wherein the target biological signal includes signal data generated during the human body performing a target action.
[0076] like Figure 1 As shown, when actually collecting human biological signals, since human biological signals are non-steady-state AC signals, in order to facilitate electronic equipment collection, a DC bias voltage is usually superimposed on the human skin to collect the complete AC signal waveform. This means that before collecting the original biological signals of the human body and analyzing the original biological signals, the electronic equipment needs to first remove the DC bias signal superimposed on the original biological signals to avoid the DC bias signal from interfering with the recognition results.
[0077] That is, in one embodiment, when the original biological signal contains a DC bias signal, after implementing step S2100, the method further includes: obtaining a signal mean of the original biological signal as a DC bias component; and removing the DC bias signal included in the original biological signal based on the DC bias component.
[0078] The processing can be specifically expressed by the following formula: new= X–(∑(X i )) / n. Specifically, for an AC signal with a DC bias signal, the DC bias component of the DC bias signal is actually the average value of the entire signal. Therefore, the DC bias signal can be removed by subtracting the average value of the entire signal from the original biological signal, leaving only the AC signal.
[0079] Please see Figure 3 , which is a schematic diagram of the original signal after the DC bias signal is removed according to an embodiment of the present disclosure. Figure 3 As shown, based on the above formula, Figure 1 After removing the DC bias signal from the original signal, an AC signal centered at 0 V can be obtained. By removing the DC bias signal from the original biological signal through the above method, the interference of the DC bias signal on the analysis result can be avoided, and the accuracy of the result can be improved.
[0080] Please see Figure 4 , which is a schematic diagram of the process of obtaining the target signal mutation point provided by the embodiment of the present disclosure. Figure 4 As shown, in one embodiment, the target signal mutation point may include at least one signal mutation point, and the use of a preset sliding window to identify the target signal mutation point in the original biological signal includes: step S4100, based on the preset sliding window, according to the first incremental window length, obtaining time-series adjacent first signal data and second signal data from the original biological signal, wherein the generation time of the second signal data is later than the generation time of the first signal data; step S4200, obtaining a first eigenvalue of the first signal data, and obtaining a second eigenvalue of the second signal data; step S4300, when the absolute value of the difference between the first eigenvalue and the second eigenvalue is greater than a first preset threshold, obtaining the middle value of the time range corresponding to the second signal data as the first signal mutation point to be determined; step S4400, when the first signal mutation point to be determined meets a preset condition, determining the first signal mutation point to be determined as the first signal mutation point; and step S4500, according to the first signal mutation point, obtaining the target signal mutation point.
[0081] In this embodiment, when the first signal mutation point to be determined meets a preset condition, determining the first signal mutation point to be determined as the first signal mutation point includes: obtaining a third eigenvalue of the third signal data before the first signal mutation point to be determined, and obtaining a fourth eigenvalue of the fourth signal data after the first signal mutation point to be determined, wherein the third signal data and the fourth signal data are signal data of a second preset time length, and the second preset time length is less than the first preset time length; when the absolute value of the difference between the third eigenvalue and the fourth eigenvalue is greater than a second preset threshold, determining the first signal mutation point to be determined as the first signal mutation point.
[0082] Specifically, after removing the DC bias signal from the original biosignal, the amplitude of the biosignal generated during the human body's target action, such as blinking, shaking head, waving, etc., is much larger than the amplitude of the biosignal generated when the human body is in a relaxed state. Figure 5 As shown, by using a first preset time length, for example, a preset sliding window of 200ms, that is, a time window, as a time window, and according to a first incremental window length, for example, 20ms as a first incremental window for a step, two segments of signal data connected in time sequence are intercepted one by one from the original biological signal, that is, the first signal data and the second signal data, to retrieve the original biological signal, and by comparing the sizes of the characteristic values of the first signal data and the second signal data, the target signal mutation point in the original biological signal can be obtained, wherein the characteristic values of the first signal data and the second signal data can be average values, effective values or variances. In the embodiments of the present disclosure, the characteristic value is taken as an example of the average value.
[0083] After obtaining the target signal mutation point, in one embodiment, extracting the target biological signal from the original biological signal based on the target signal mutation point includes: extracting signal data of third preset time lengths before and after the first signal mutation point from the original biological signal as the first biological signal, wherein the first biological signal is signal data generated by the human body from a relaxed state to performing a target action; and obtaining the target biological signal based on the first biological signal.
[0084] In this embodiment, the third preset time length may be 1 second. Of course, the value may also be set as required and is not specifically limited here.
[0085] Please see Figure 6 , which is a schematic diagram of the first target signal mutation point provided by the embodiment of the present disclosure. Figure 6 As shown, for Figure 3 The original signal after removing the DC bias signal is shown. The above method can quickly calculate 14 target signal mutation points.
[0086] It should be noted that, in the embodiment of the present disclosure, the specific values of the first preset time length, the first incremental window length, the first preset threshold value, and the second preset threshold value can be set as needed, and are not specifically limited here. In addition, in this embodiment, if the original biological signal contains multiple pathways, a corresponding number of preset sliding windows can be used to identify and analyze each pathway respectively, and the detailed processing process is not repeated here. In addition, in a specific implementation, if the absolute value of the difference between the characteristic values of the first signal data and the second signal data, such as the average values, is not greater than the first preset threshold value, it can be determined that the human biological signal has not mutated within the time range corresponding to the first signal data and the second signal data, that is, the action performed by the human body has not mutated. At this time, the preset sliding window can be moved corresponding to the first incremental window length to continue to retrieve the signal mutation point in the original biological signal; or, when the absolute value of the difference between the characteristic values of the first signal data and the second signal data is greater than the first preset threshold value, after obtaining the first signal mutation point to be determined, in order to improve the accuracy of the result, the characteristic values of the signal data of a preset time length before and after the first signal mutation point to be determined, for example, 200ms, can be compared again. If the difference between the two is very small, it can be judged as a false signal. If the difference between the two is very large, it means that the signal mutation point is relatively accurate, and the signal mutation point to be determined can be used as one of the target signal mutation points.
[0087] Please continue to see Figure 6 ,according to Figure 6 From the amplitude fluctuation of each signal mutation point, it can be seen that the 13th signal mutation point is an interference signal mutation point, that is, an erroneous signal mutation point. To avoid errors caused by interference signal mutation points, the method can also correct the signal mutation points in the target signal mutation points and the biological signals in the target biological signals through the following steps.
[0088] Please see Figure 7a , which is a flow chart of the first mutation point error correction processing provided by an embodiment of the present disclosure, the error correction processing includes: step S7100, obtaining the fifth eigenvalue of all signals before the first signal mutation point from the first biological signal, and obtaining the sixth eigenvalue of half of the signal before the first signal mutation point; step S7200, when the absolute value of the difference between the fifth eigenvalue and the sixth eigenvalue is greater than the third preset threshold, determining that the first signal mutation point is an erroneous signal mutation point, removing the first signal mutation point from the target signal mutation points, and removing the first biological signal from the target biological signal.
[0089] Also, see Figure 7b, which is a flow chart of the second mutation point error correction processing provided by an embodiment of the present disclosure, and the error correction processing includes: step S7300, when the absolute value of the difference between the fifth eigenvalue and the sixth eigenvalue is not greater than the third preset threshold, obtaining the seventh eigenvalue of all signals after the first signal mutation point from the first biological signal; step S7400, when the absolute value of the difference between the fifth eigenvalue and the seventh eigenvalue is not greater than the fourth preset threshold, determining that the first signal mutation point is an erroneous signal mutation point, removing the first signal mutation point from the target signal mutation point, and removing the first biological signal from the target biological signal.
[0090] That is, the original biological signal is a biological signal generated when the human body cycle changes from a relaxed state to a target action. Therefore, after the target signal mutation point and the target biological signal are obtained through the above preliminary identification and analysis, since the target biological signal includes signal data of each preset time before and after each signal mutation point, the biological signal corresponding to each signal mutation point should contain the biological signal data of the relaxed state and the biological signal data when the target action is performed. Therefore, for each biological signal in the target biological signal, the characteristic value of the signal data before the corresponding signal mutation point can be compared. If it tends to be stable, that is, the absolute value of the difference is small, it means that the biological signal conforms to the relaxed state, and it can be preliminarily judged that the signal mutation point and the corresponding valid biological signal are correctly identified. After the preliminary judgment, the characteristic values of the signal data before and after the signal mutation point can be further compared again. If the difference between the two is large, it means that the signal mutation point and the valid biological signal corresponding to the signal mutation point are correct. Otherwise, it can be determined that the signal mutation point and the valid biological signal are wrong and need to be discarded.
[0091] It should be noted that, in specific implementation, at least one of the above error correction processes can be used to correct signal mutation points in target signal mutation points and biological signals in target biological signals, without any special limitation here.
[0092] Please see Figure 8 , which is a schematic diagram of the second target signal mutation point provided by the embodiment of the present disclosure. As shown in FIG8 , after the above processing, the Figure 6 The interference signal mutation point in the image can be detected to improve the accuracy of the results.
[0093] Please continue to see Figure 8 ,like Figure 8 As shown, the target signal mutation point may include at least one signal mutation point, and the target biological signal may include at least one biological signal corresponding to the at least one signal mutation point. Figure 8As shown in the 12th signal mutation point, the signal mutation point obtained through the above processing may have the problem of inaccurate demarcation point position. Therefore, in one embodiment of the present disclosure, a correction process for the signal mutation point is also provided. Please refer to Fig. 9 , which is a flow chart of the mutation point correction process provided by the embodiment of the present disclosure. Fig. 9 As shown, the correction process specifically includes the following steps: step S9100, obtaining any biological signal from the target biological signal as the second biological signal, and obtaining the second signal mutation point corresponding to the second biological signal from the target signal mutation point; step S9200, taking the difference between the second signal mutation point and the duration of the preset sliding window and the length of the first incremental window as the starting time point; step S9300, reducing the length of the first incremental window to obtain the length of the second incremental window; step S9400, in the original biological signal, starting from the starting time point, based on the preset sliding window and according to the second incremental window length, obtaining the time sequence adjacent Fifth signal data and sixth signal data; step S9500, when the absolute value of the difference between the eighth eigenvalue of the fifth signal data and the ninth eigenvalue of the sixth signal data is greater than a first preset threshold, obtaining the start time corresponding to the sixth signal data, and updating the second signal mutation point according to the start time, the duration of the preset sliding window and the second incremental window length; and, from the original biological signal, extracting the signal data of the third preset durations before and after the updated second signal mutation point to update the signal data in the second biological signal; step S9600, updating the target biological signal according to the updated second biological signal.
[0094] Specifically, in order to improve the processing speed, when obtaining the target signal mutation point from the original biological signal, the first incremental window length is generally set to be relatively long, that is, a relatively long incremental window is set. However, due to the window span problem, in some extreme cases, there may be a maximum calculation error of one incremental window length. For details, please refer to Fig.10 , which is a schematic diagram of a critical signal mutation point provided by an embodiment of the present disclosure. Fig.10As shown, the third time window is just before the critical point of the signal mutation, which results in that the mutation point cannot be detected in time window 3, and the mutation point can only be detected in time window 4, but the mutation point may be located at the starting position or the ending position of the last incremental window. Therefore, in order to more accurately locate the real mutation point, after obtaining the target signal mutation point, the incremental window length can be adjusted, that is, by reducing the first incremental window length, a second incremental window length that is smaller than the first incremental window length is obtained, so as to fine-tune the demarcation point position of the signal mutation point according to the second incremental window length, and then according to the fine-tuned and corrected signal mutation point, the signal data is re-extracted from the original biological signal to update the biological signal corresponding to the signal mutation point, and then according to the updated biological signal, the target biological signal is updated to improve the accuracy of the result.
[0095] In specific implementation, when updating the second signal mutation point according to the start time, the duration of the preset sliding window and the second incremental window length, it can be obtained by the following formula: the updated second signal mutation point = the start time + (the duration of the preset sliding window - the second incremental window length / 2).
[0096] Please see Fig.11 , which is a schematic diagram of the third target signal mutation point provided by the embodiment of the present disclosure. Fig.11 As shown, after the above correction processing, Figure 8 The demarcation point position of the 12th signal mutation point in the gene was optimized.
[0097] After step S2200, step S2300 is executed to select label information and package the label information and the target biological signal into a data packet to obtain biological signal sample data.
[0098] Specifically, after obtaining the target biological signal according to the above steps, since the motion information of the target action performed by the human body is determined in the process of collecting the original biological signal, the motion information of the target action can be obtained in advance. After the electronic device extracts the effective target biological signal from the original biological signal, it uses the motion information as the label of each effective biological signal in the target biological signal, so as to conveniently, quickly and accurately obtain the biological signal sample data for neural network learning.
[0099] It should be noted that, in a specific implementation, since the signal mutation point of each valid biological signal in the target biological signal can also be obtained through the above processing, the biological signal in the target biological signal can also be fine-grainedly labeled according to each signal mutation point, that is, the signal data before the signal mutation point corresponding to each biological signal is labeled as a relaxed state, and the signal data after the signal mutation point is labeled as the action information of the target action.
[0100] To sum up, the biosignal labeling method provided by the embodiments of the present disclosure does not need to rely on manual labor for the original signal to be analyzed. Instead, the electronic device uses a preset window to identify the signal data in the original biosignal to obtain a target signal mutation point that reflects a sudden change in the human body's motion state; thereafter, the target biosignal generated by the human body in the process of performing the target action can be extracted from the original biosignal based on the target signal mutation point, and the biosignal sample data can be quickly and accurately obtained by selecting label information and packaging the label information and the target biosignal in a data packet.
[0101] <Device Example>
[0102] Corresponding to the above method embodiment, Fig.12 is a block diagram of the biological signal marking device provided by the embodiment of the present disclosure. Fig.12 As shown, the biological signal marking device 100 may include: a signal mutation point identification module 110 , a biological signal extraction module 120 and a marking module 130 .
[0103] The signal mutation point identification module 110 is used to use a preset sliding window to identify a target signal mutation point in the original biological signal, wherein the preset sliding window is a sliding window of a first preset time length, and the target signal mutation point is a time point in the original biological signal that reflects a mutation in a human body motion state.
[0104] In one embodiment, the device 100 also includes a DC bias signal removal module, which is used to obtain the signal mean of the original biological signal as a DC bias component before the step of using a preset sliding window to identify the target signal mutation point in the original biological signal; and remove the DC bias signal included in the original biological signal according to the DC bias component.
[0105] In one embodiment, the target signal mutation point includes at least one signal mutation point. When the signal mutation point identification module 110 uses a preset sliding window to identify the target signal mutation point in the original biological signal, it can be used to: based on the preset sliding window, according to the first incremental window length, obtain the first signal data and the second signal data that are adjacent in time sequence from the original biological signal, wherein the generation time of the second signal data is later than the generation time of the first signal data; obtain the first eigenvalue of the first signal data, and obtain the second eigenvalue of the second signal data; when the absolute value of the difference between the first eigenvalue and the second eigenvalue is greater than a first preset threshold, obtain the middle value of the time range corresponding to the second signal data as the first signal mutation point to be determined; when the first signal mutation point to be determined meets the preset conditions, determine the first signal mutation point to be determined as the first signal mutation point; and obtain the target signal mutation point based on the first signal mutation point.
[0106] In one embodiment, when the first signal mutation point to be determined meets a preset condition, the signal mutation point identification module 110, when determining that the first signal mutation point to be determined is the first signal mutation point, can be used to: obtain a third eigenvalue of the third signal data before the first signal mutation point to be determined, and obtain a fourth eigenvalue of the fourth signal data after the first signal mutation point to be determined, wherein the third signal data and the fourth signal data are signal data of a second preset time length, and the second preset time length is less than the first preset time length; when the absolute value of the difference between the third eigenvalue and the fourth eigenvalue is greater than a second preset threshold, determine that the first signal mutation point to be determined is the first signal mutation point.
[0107] The biological signal extraction module 120 is used to extract a target biological signal from an original biological signal according to a mutation point of the target signal, wherein the target biological signal includes signal data generated during a biological process of performing a target action.
[0108] In one embodiment, when the biosignal extraction module 120 extracts the target biosignal from the original biosignal according to the target signal mutation point, it can be used to: extract signal data of the third preset time lengths before and after the first signal mutation point from the original biosignal as the first biosignal, wherein the first biosignal is signal data generated by the human body from a relaxed state to performing a target action; and obtain the target biosignal based on the first biosignal.
[0109] In one embodiment, the device 100 also includes a first error correction module, which is used to: obtain the fifth eigenvalue of all signals before the first signal mutation point from the first biological signal, and obtain the sixth eigenvalue of half of the signal before the first signal mutation point; when the absolute value of the difference between the fifth eigenvalue and the sixth eigenvalue is greater than a third preset threshold, determine that the first signal mutation point is an erroneous signal mutation point, and remove the first signal mutation point from the target signal mutation point.
[0110] In one embodiment, the device 100 also includes a second error correction module, which is used to remove the first biological signal from the target biological signal; and, when the absolute value of the difference between the fifth eigenvalue and the sixth eigenvalue is not greater than the third preset threshold, obtain the seventh eigenvalue of all signals after the first signal mutation point from the first biological signal; when the absolute value of the difference between the fifth eigenvalue and the seventh eigenvalue is not greater than the fourth preset threshold, determine that the first signal mutation point is an erroneous signal mutation point, remove the first signal mutation point from the target signal mutation point, and remove the first biological signal from the target biological signal.
[0111] In one embodiment, the target signal mutation point includes at least one signal mutation point, and the target biological signal includes at least one biological signal corresponding to the at least one signal mutation point respectively; the device 100 also includes a correction module, which is used to: obtain any biological signal from the target biological signal as the second biological signal, and obtain a second signal mutation point corresponding to the second biological signal from the target signal mutation point; use the difference between the second signal mutation point and the duration of the preset sliding window and the length of the first incremental window as the starting time point; reduce the first incremental window length to obtain the second incremental window length; in the original biological signal, starting from the starting time point, based on the preset sliding window, according to the second incremental window length, obtain the fifth signal data and the sixth signal data that are adjacent in time sequence; when the absolute value of the difference between the eighth eigenvalue of the fifth signal data and the ninth eigenvalue of the sixth signal data is greater than the first preset threshold, obtain the start time corresponding to the sixth signal data, and update the second signal mutation point according to the start time, the duration of the preset sliding window and the second incremental window length; and, from the original biological signal, extract the signal data of the third preset durations before and after the updated second signal mutation point to update the signal data in the second biological signal; update the target biological signal according to the updated second biological signal.
[0112] The labeling module 130 is used to select label information and package the label information and the target biological signal into a data packet to obtain biological signal sample data.
[0113] <Equipment Embodiment>
[0114] Corresponding to the above method embodiment, please refer to Fig.13 , which is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure.
[0115] like Fig.13 As shown, the electronic device 200 includes a processor 210 and a memory 220, wherein the memory 220 is used to store an executable computer program, and the processor 210 is used to execute a biological signal marking method such as any of the above method embodiments under the control of the computer program.
[0116] In one embodiment, the processor 210 can be used to: use a preset sliding window to identify a target signal mutation point in the original biological signal, wherein the preset sliding window is used to extract signal data of a first preset duration from the original biological signal, and the target signal mutation point is a time point in the original biological signal that reflects a sudden change in a human body's motion state; extract a target biological signal from the original biological signal based on the target signal mutation point, wherein the target biological signal includes signal data generated during the human body's execution of a target action; select label information and package the label information and the target biological signal in a data packet to obtain biological signal sample data.
[0117] In one embodiment, the processing 210 can be used to: based on a preset sliding window, obtain time-series adjacent first signal data and second signal data from the original biological signal according to a first incremental window length, wherein the generation time of the second signal data is later than the generation time of the first signal data; obtain a first eigenvalue of the first signal data, and obtain a second eigenvalue of the second signal data; when the absolute value of the difference between the first eigenvalue and the second eigenvalue is greater than a first preset threshold, obtain the middle value of the time range corresponding to the second signal data as the first signal mutation point to be determined; when the first signal mutation point to be determined meets a preset condition, determine the first signal mutation point to be determined as the first signal mutation point; and obtain the target signal mutation point based on the first signal mutation point.
[0118] In one embodiment, the processor 210 can be used to: extract signal data of the third preset time lengths before and after the first signal mutation point from the original biological signal as the first biological signal, wherein the first biological signal is signal data generated by the human body from a relaxed state to performing a target action; obtain the target biological signal based on the first biological signal.
[0119] In one embodiment, the processor 210 can also be used to: obtain the fifth eigenvalue of all signals before the first signal mutation point from the first biological signal, and obtain the sixth eigenvalue of half of the signal before the first signal mutation point; when the absolute value of the difference between the fifth eigenvalue and the sixth eigenvalue is greater than a third preset threshold, determine that the first signal mutation point is an erroneous signal mutation point, remove the first signal mutation point from the target signal mutation points, and remove the first biological signal from the target biological signal.
[0120] In one embodiment, the target signal mutation point includes at least one signal mutation point, and the target biological signal includes at least one biological signal corresponding to the at least one signal mutation point respectively; the processor 210 can also be used to: obtain any biological signal from the target biological signal as the second biological signal, and obtain a second signal mutation point corresponding to the second biological signal from the target signal mutation point; use the difference between the second signal mutation point and the duration of the preset sliding window and the length of the first incremental window as the starting time point; reduce the first incremental window length to obtain the second incremental window length; in the original biological signal, starting from the starting time point, based on the preset sliding window, according to the second incremental window length, obtain the fifth signal data and the sixth signal data that are adjacent in time sequence; when the absolute value of the difference between the eighth eigenvalue of the fifth signal data and the ninth eigenvalue of the sixth signal data is greater than the first preset threshold, obtain the start time corresponding to the sixth signal data, and update the second signal mutation point according to the start time, the duration of the preset sliding window and the second incremental window length; and, from the original biological signal, extract the signal data of the third preset durations before and after the updated second signal mutation point to update the signal data in the second biological signal; update the target biological signal according to the updated second biological signal.
[0121] Each module of the above biological signal marking device 100 can be implemented by the processor 210 in this embodiment executing a computer program stored in the memory 220, or can be implemented by other circuit structures, which is not limited here.
[0122] <Computer Readable Storage Medium Embodiment>
[0123] This embodiment provides a computer-readable storage medium, in which executable commands are stored. When the executable commands are executed by a processor, the method described in any method embodiment of this specification is executed.
[0124] One or more embodiments of the present specification may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present specification.
[0125] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0126] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0127] The computer program instructions for performing the operation of the embodiments of this specification may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, executed as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In certain embodiments, by utilizing the state information of a computer-readable program instruction to customize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA) or a programmable logic array (PLA), the electronic circuit may execute a computer-readable program instruction, thereby realizing various aspects of this specification.
[0128] Various aspects of this specification are described herein with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of this specification. It should be understood that each box in the flowchart and / or block diagram and the combination of boxes in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0129] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0130] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0131] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to the multiple embodiments of this specification. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of an instruction, and a part of a module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions labeled in the box can also occur in an order different from the order labeled in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0132] The embodiments of the present specification have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of this application is defined by the appended claims.
Claims
1. A biological signal marking method, characterized in that: include: Using a preset sliding window to identify a target signal mutation point in the original biological signal, wherein the preset sliding window is used to extract two segments of signal data of a first preset duration and connected in time sequence from the original biological signal according to a first incremental window length, and the target signal mutation point is a time point in the original biological signal that reflects a mutation in a human body motion state, and is obtained by comparing the size of the characteristic values of the two segments of signal data; Extracting a target biological signal from the original biological signal according to the target signal mutation point, wherein the target biological signal includes signal data generated during a human body performing a target action; Selecting label information and packaging the label information and the target biological signal in a data packet to obtain biological signal sample data; wherein, The target signal mutation point includes at least one signal mutation point, and the target biological signal includes at least one biological signal corresponding to the at least one signal mutation point respectively; after obtaining the target biological signal, the method further includes: Acquire any biological signal from the target biological signal as a second biological signal, and acquire a second signal mutation point corresponding to the second biological signal from the target signal mutation point; Determine a starting time point, wherein the difference between the starting time point and the second signal mutation point is the duration of the preset sliding window and the first incremental window length; Reducing the first incremental window length to obtain a second incremental window length; In the original biological signal, starting from the starting time point, based on the preset sliding window and according to the second incremental window length, fifth signal data and sixth signal data that are adjacent in time sequence are acquired; When the absolute value of the difference between the eighth eigenvalue of the fifth signal data and the ninth eigenvalue of the sixth signal data is greater than a first preset threshold, obtaining a start time corresponding to the sixth signal data, and updating the second signal mutation point according to the start time, the duration of the preset sliding window, and the second incremental window length; and Extracting signal data of a third preset time length before and after the updated second signal mutation point from the original biological signal to update the signal data in the second biological signal; The target biosignal is updated according to the updated second biosignal.
2. The method according to claim 1, characterized in that The target signal mutation point includes at least one signal mutation point, and the method of using a preset sliding window to identify the target signal mutation point in the original biological signal includes: Based on the preset sliding window, and according to the first incremental window length, acquiring first signal data and second signal data that are adjacent in time sequence from the original biological signal, wherein the generation time of the second signal data is later than the generation time of the first signal data; Acquire a first characteristic value of the first signal data, and acquire a second characteristic value of the second signal data; When the absolute value of the difference between the first characteristic value and the second characteristic value is greater than a first preset threshold, obtaining a middle value of a time range corresponding to the second signal data as a first signal mutation point to be determined; In the case where the first signal mutation point to be determined meets a preset condition, determining the first signal mutation point to be determined as a first signal mutation point; According to the first signal mutation point, the target signal mutation point is obtained.
3. The method according to claim 2, characterized in that The step of determining the first signal mutation point to be determined as the first signal mutation point when the first signal mutation point to be determined meets a preset condition includes: Obtaining a third characteristic value of third signal data before the first signal mutation point to be determined, and obtaining a fourth characteristic value of fourth signal data after the first signal mutation point to be determined, wherein the third signal data and the fourth signal data are signal data of a second preset time length, and the second preset time length is less than the first preset time length; When the absolute value of the difference between the third eigenvalue and the fourth eigenvalue is greater than a second preset threshold, the first to-be-determined signal mutation point is determined to be a first signal mutation point.
4. The method according to claim 2, characterized in that: The step of extracting the target biological signal from the original biological signal according to the target signal mutation point comprises: Extracting signal data of a third preset time length before and after the first signal mutation point from the original biological signal as the first biological signal, wherein the first biological signal is signal data generated during the process from a human body being in a relaxed state to performing the target action once; The target biological signal is obtained according to the first biological signal.
5. The method according to claim 4, characterized in that After obtaining the target biological signal, the method further includes: From the first biological signal, obtaining a fifth eigenvalue of all signals before a mutation point of the first signal, and obtaining a sixth eigenvalue of half of the signals before a mutation point of the first signal; When the absolute value of the difference between the fifth eigenvalue and the sixth eigenvalue is greater than a third preset threshold, the first signal mutation point is determined to be an erroneous signal mutation point, and the first signal mutation point is removed from the target signal mutation points, and the first biological signal is removed from the target biological signal.
6. The method according to claim 5, characterized in that The method further comprises: When the absolute value of the difference between the fifth eigenvalue and the sixth eigenvalue is not greater than the third preset threshold, obtaining, from the first biological signal, a seventh eigenvalue of all signals after the mutation point of the first signal; When the absolute value of the difference between the fifth eigenvalue and the seventh eigenvalue is not greater than a fourth preset threshold, the first signal mutation point is determined to be an erroneous signal mutation point, and the first signal mutation point is removed from the target signal mutation points, and the first biological signal is removed from the target biological signal.
7. The method according to claim 1, characterized in that The original biological signal includes a DC bias signal; Before the step of using a preset sliding window to identify a target signal mutation point in the original biological signal, the method further includes: Acquiring a signal mean value of the original biological signal as a DC bias component; According to the DC offset component, the DC offset signal included in the original biological signal is removed.
8. A biological signal marking device, characterized in that: include: A signal mutation point identification module, used to identify a target signal mutation point in an original biological signal using a preset sliding window, wherein the preset sliding window is a sliding window of a first preset duration, and the preset sliding window is used to extract two segments of signal data of a first preset duration and connected in time sequence from the original biological signal according to a first incremental window length, and the target signal mutation point is a time point in the original biological signal that reflects a mutation in a human body motion state, and is obtained by comparing the size of the characteristic values of the two segments of signal data; A biological signal extraction module, used to extract a target biological signal from the original biological signal according to the target signal mutation point, wherein the target biological signal includes signal data generated during the biological execution of the target action; The labeling module is used to select label information and pack the label information and the target biological signal into a data packet to obtain biological signal sample data; wherein, The target signal mutation point includes at least one signal mutation point, the target biological signal includes at least one biological signal corresponding to the at least one signal mutation point, and the device further includes a correction module, which is used to obtain any biological signal from the target biological signal as a second biological signal, and to obtain a second signal mutation point corresponding to the second biological signal from the target signal mutation point; Determine a starting time point, wherein the difference between the starting time point and the second signal mutation point is the duration of the preset sliding window and the first incremental window length; Reducing the first incremental window length to obtain a second incremental window length; In the original biological signal, starting from the starting time point, based on the preset sliding window and according to the second incremental window length, fifth signal data and sixth signal data that are adjacent in time sequence are acquired; When the absolute value of the difference between the eighth eigenvalue of the fifth signal data and the ninth eigenvalue of the sixth signal data is greater than a first preset threshold, obtaining a start time corresponding to the sixth signal data, and updating the second signal mutation point according to the start time, the duration of the preset sliding window, and the second incremental window length; and Extracting signal data of a third preset time length before and after the updated second signal mutation point from the original biological signal to update the signal data in the second biological signal; The target biosignal is updated according to the updated second biosignal.
9. An electronic device, characterized in that: The device according to claim 8, or the electronic device comprises: A memory for storing instructions to be executed; A processor, configured to execute the method according to any one of claims 1 to 7 under the control of an executed computer program.
10. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program that is read and executed by a computer, and the computer program is used to execute the method according to any one of claims 1 to 7 when being read and executed by the computer.
Citation Information
Patent Citations
Method for removing photoelectric volume pulse wave noise
CN110432885A
Model training method and device, electronic device and storage medium
CN113505632A