Physiological data classification method and electronic equipment
By slicing physiological data and searching similarity in a vector database, the problem of requiring a large amount of sample data for multimodal classification of physiological time series in the prior art is solved, and the effect of efficiently classifying physiological data under limited data volume is achieved.
Patent Information
- Application Number
- CN202411201361.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-08-29
AI Technical Summary
When using machine learning to multimodal classification of physiological time series, the prior art requires a large amount of sample data, and the data acquisition and labeling of biomedical research is expensive, which makes classification difficult.
By processing the physiological data to be classified into a multi-channel time series, input the time series basic model after slices for feature extraction, and a similarity search is used to determine the classification category to reduce dependence on sample data.
It realizes efficient classification of physiological data under limited data volume, reduces the cost of data collection and labeling, and improves the accuracy and efficiency of classification.
Smart Images

Figure CN119150168A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of biological data processing, and in particular to a physiological data classification method and electronic equipment. Background Art
[0002] The physiological data collected by wearable devices include but are not limited to vital signs (such as heart rate, blood oxygen saturation, body temperature) and behavioral patterns (such as daily activity). In the traditional single-modality research paradigm, different types of data are often analyzed in isolation.
[0003] Existing multimodal learning of physiological time series using machine learning requires a large amount of sample data for model training and classification of physiological time series through the model. However, the data collection and annotation costs of biomedical research are often high, and the amount of data available for training and testing is very limited. Therefore, it is difficult to classify physiological time series using machine learning. Summary of the invention
[0004] In view of this, an object of an embodiment of the present invention is to provide a physiological data classification method and an electronic device to at least partially improve the above-mentioned problem.
[0005] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:
[0006] In a first aspect, an embodiment of the present invention provides a physiological data classification method, the method comprising:
[0007] processing the physiological data to be classified into a first multi-channel time series;
[0008] Slicing the first multi-channel time series according to a preset length and a preset step size to obtain a plurality of multi-channel slices;
[0009] Input each of the multi-channel slices into a time series basic model for feature extraction to obtain a feature vector to be classified corresponding to each of the multi-channel slices;
[0010] For any of the multi-channel slices, a similarity search is performed in a vector database according to the feature vector to be classified corresponding to the multi-channel slice to determine the classification category of the multi-channel slice; the vector database stores a plurality of samples, and the samples include supporting feature vectors and corresponding standard classification labels;
[0011] Each of the multi-channel slices is traversed to obtain a classification category of each of the multi-channel slices.
[0012] Optionally, the multi-channel slice includes a plurality of channel data, and the step of inputting each of the multi-channel slices into a time series basic model for feature extraction to obtain a feature vector to be classified corresponding to each of the multi-channel slices includes:
[0013] For any of the multi-channel slices, the channel data of each of the multi-channel slices are sequentially input into the time series basic model to obtain a channel feature vector of each of the channel data;
[0014] Multiplying each of the channel feature vectors by a preset corresponding weight coefficient in sequence to obtain a channel weighted feature vector;
[0015] splicing the weighted feature vectors of each channel into an overall feature vector as the feature vector to be classified of the multi-channel slice;
[0016] Each of the multi-channel slices is traversed to obtain a feature vector to be classified of each of the multi-channel slices.
[0017] Optionally, for any of the multi-channel slices, performing a similarity search in a vector database according to the feature vector to be classified corresponding to the multi-channel slice to determine the classification category of the multi-channel slice includes:
[0018] For any of the multi-channel slices, a plurality of similar samples similar to the feature vector to be classified corresponding to the multi-channel slice are retrieved from the vector database; the similar samples include standard classification labels and similarities;
[0019] Using a weighting function to perform weighted calculation on the standard classification labels and similarities of each of the similar samples, and using the standard classification label with the highest score as the classification category of the feature vector to be classified;
[0020] Each of the multi-channel slices is traversed to obtain a classification category of each of the multi-channel slices.
[0021] Optionally, the method further comprises:
[0022] processing the labeled physiological data into at least one second multi-channel time series;
[0023] Slicing each of the second multi-channel time series according to a preset length and step size to obtain a plurality of multi-channel slices;
[0024] Inputting each of the multi-channel slices into the time series basic model for feature extraction to obtain a plurality of supporting feature vectors and a plurality of standard classification labels;
[0025] Each of the supporting feature vectors and the standard classification label is stored in the vector database accordingly.
[0026] Optionally, the multi-channel slices include multiple channel data and multiple standard classification labels, and the step of inputting each of the multi-channel slices into the time series basic model for feature extraction to obtain multiple supporting feature vectors and multiple standard classification labels includes:
[0027] For any of the multi-channel slices, using the standard classification label with the highest occurrence frequency as the standard classification label of the multi-channel slice;
[0028] Inputting each of the channel data into the time series basic model in sequence to obtain a channel feature vector of each of the channel data;
[0029] Multiplying each of the channel feature vectors by a preset corresponding weight coefficient in sequence to obtain a channel weighted feature vector;
[0030] concatenating the weighted feature vectors of each channel into an overall feature vector as a supporting feature vector of the multi-channel slice;
[0031] Each of the multi-channel slices is traversed to obtain a supporting feature vector and a standard classification label of each of the multi-channel slices.
[0032] Optionally, the processing of the physiological data to be classified into a first multi-channel time series includes:
[0033] Determining a common time reference for each of the channels according to the time points of each channel in the first multi-channel time series;
[0034] The data of each channel is stretched or compressed to ensure that the data lengths of all the channels are the same.
[0035] Optionally, the method further comprises a step of preprocessing the first multi-channel time series, the step comprising:
[0036] Adding a mask to the position where the missing value of the first multi-channel time series is located, predicting the predicted value of the masked position by using the time series basic model, and adding the predicted value to the first multi-channel time series;
[0037] Or / and, using the time series basic model to detect outlier points in the first multi-channel time series, masking the positions of the outliers, predicting the predicted values of the masked positions through the time series basic model, and using the predicted values to replace the outliers in the first multi-channel time series.
[0038] Optionally, the method further comprises:
[0039] Performing weighted fusion on the data of each channel of the first multi-channel time series;
[0040] or / and, performing weighted fusion on the feature vectors extracted from the first multi-channel time series;
[0041] Or / and, weighted fusion is performed on the classification categories of each of the feature vectors to be classified.
[0042] Optionally, the method further comprises:
[0043] Performing dimensionality reduction processing on each of the supporting feature vectors using an unsupervised dimensionality reduction algorithm to obtain a corresponding reduced dimensionality feature vector;
[0044] Using an unsupervised clustering algorithm to cluster each of the dimension reduction feature vectors to obtain a corresponding cluster feature vector;
[0045] Each cluster feature vector is visualized.
[0046] In a second aspect, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-described methods when executing the program.
[0047] A physiological data classification method and electronic device provided by an embodiment of the present invention processes and extracts features of physiological data and performs a similarity search in a vector database to determine the classification category of each feature vector to be classified, thereby classifying the category of physiological data through the vector database.
[0048] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0050] Figure 1 A schematic structural block diagram of an electronic device provided by an embodiment of the present invention;
[0051] Figure 2 A schematic diagram of a flow chart of a physiological data classification method provided by an embodiment of the present invention;
[0052] Figure 3 Another schematic diagram of a flow chart of a physiological data classification method provided by an embodiment of the present invention;
[0053] Figure 4 Another schematic diagram of a flow chart of a physiological data classification method provided by an embodiment of the present invention;
[0054] Figure 5 Another schematic diagram of a flow chart of a physiological data classification method provided by an embodiment of the present invention;
[0055] Figure 6 Another schematic diagram of a flow chart of a physiological data classification method provided by an embodiment of the present invention.
[0056] Icon: 100 - electronic device; 101 - memory; 102 - communication interface; 103 - processor; 104 - bus. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0058] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0059] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0060] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device 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 device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0061] Physiological data collected by wearable devices include but are not limited to vital signs (such as heart rate, blood oxygen saturation, body temperature) and behavioral patterns (such as daily activity). In the traditional unimodal research paradigm, different types of data are often analyzed in isolation. For overall classification of multimodal physiological data, the existing method is to use machine learning to perform multimodal classification of physiological time series. This method requires a large amount of sample data for model training and classifies physiological time series through the model. However, the data collection and annotation costs of biomedical research are often high, and the amount of data available for training and testing is very limited. Therefore, it is difficult to use machine learning to classify physiological time series.
[0062] Based on the above situation, the embodiment of the present invention provides a physiological data classification method and electronic device, which extracts the feature vector of the physiological data and matches it with the supporting feature vector in the preset vector database to determine the classification of the physiological data. Therefore, the category of the physiological data can be classified by searching the vector database.
[0063] To implement the process steps and functions of each example of the present invention, please refer to Figure 1 , Figure 1 A schematic structural block diagram of an electronic device provided by an embodiment of the present invention. The electronic device 100 includes a memory 101 and a processor 103, and the memory 101 and the processor 103 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses 104 or signal lines. The memory 101 can be used to store software programs and modules, and the processor 103 executes the software programs and modules stored in the memory 101 to perform various functional applications and data processing.
[0064] The electronic device 100 may be, but is not limited to, a personal computer (PC), a server, a distributed computer, etc. It is understandable that the electronic device 100 is not limited to a physical server, but may also be a virtual machine on a physical server, a virtual machine built on a cloud platform, etc., which can provide the same functions as the server or virtual machine. The operating system of the electronic device 100 may be, but is not limited to, a Windows system, a Linux system, etc.
[0065] Among them, the memory 101 can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc.
[0066] The communication connection between the electronic device 100 and an external device is achieved through at least one communication interface 102 (which can be wired or wireless).
[0067] The processor 103 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the embodiment of the present invention can be completed by the hardware integrated logic circuit in the processor 103 or the instructions in the form of software. The processor 103 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0068] Understandably, Figure 1 The structure shown is for illustration only. The electronic device 100 may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown. Figure 1Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0069] The following is an exemplary description of a physiological data classification method provided by the present invention. Figure 2 , Figure 2 A schematic diagram of a physiological data classification method provided by an embodiment of the present invention, the execution subject of the method may be the above Figure 1 The electronic device 100 shown in FIG. 1 includes: Figure 2 The following steps are described:
[0070] S210: Processing the physiological data to be classified into a first multi-channel time series.
[0071] S220: Slice the first multi-channel time series according to a preset length and a preset step size to obtain a plurality of multi-channel slices.
[0072] S230: Input each multi-channel slice into the time series basic model for feature extraction to obtain a feature vector to be classified corresponding to each multi-channel slice.
[0073] S240: For any multi-channel slice, perform a similarity search in a vector database according to the feature vector to be classified corresponding to the multi-channel slice to determine the classification category of the multi-channel slice.
[0074] S250: traverse each multi-channel slice to obtain a classification category of each multi-channel slice.
[0075] In this embodiment, wearable devices can be used to collect physiological data, which includes data of multiple dimensions, such as heart rate, blood oxygen saturation, body temperature, etc. These physiological data are classified, and the classification type can be sleep or activity. The classification is not for the entire segment of physiological data as a whole, but for each small segment of the entire segment of physiological data.
[0076] The collected physiological data to be classified are processed into a first multi-channel time series, and the physiological data include multiple types. In this embodiment, three physiological data, heart rate, blood oxygen saturation, and body temperature, are used as examples. The three types of data are respectively put into three channels to form a first multi-channel time series.
[0077] The first multi-channel time series is sliced according to a preset length and a preset step size to obtain multiple multi-channel slices. For example, the first multi-channel time series includes three dimensional data of heart rate, blood oxygen saturation, and body temperature. The first multi-channel time series is one minute of data. The preset length is 1 second, and the preset step size is 1 second. Then, the first multi-channel time series is sliced into 60 multi-channel slices.
[0078] The time series basic model is used to extract features from each multi-channel slice to obtain multiple feature vectors to be classified. Each feature vector to be classified is input into a preset vector database for similarity search, and supporting feature vectors are searched based on the feature vector to be classified, and then the classification category of the multi-channel slice is determined based on the standard classification label of the supporting feature vector. For example, some segments of the physiological data are sleeping, and some segments are activities.
[0079] This method processes physiological data, slices them, extracts features, and searches directly from a vector database to classify each segment of the physiological data.
[0080] There are many ways to extract features. In order to make the extracted feature vector to be classified to comprehensively express the unique attributes and internal patterns of each time series, including but not limited to the periodicity, peak phase, amplitude and long-term trend of the data, etc. The multi-channel slice includes multiple channel data. Figure 3 Another flowchart of a physiological data classification method provided by an embodiment of the present invention is shown in FIG. Figure 3 , step S230 may include the following steps:
[0081] S231: For any multi-channel slice, input each channel data of the multi-channel slice into the time series basic model in sequence to obtain a channel feature vector of each channel data.
[0082] S232: Multiply each channel feature vector by a preset corresponding weight coefficient in sequence to obtain a channel weighted feature vector.
[0083] S233: concatenating the weighted feature vectors of each channel into an overall feature vector as the feature vector to be classified of the multi-channel slice.
[0084] S234: Repeat steps S231 to S233 until the feature vector to be classified of each multi-channel slice is obtained.
[0085] In the example of step S220 above, the first multi-channel time series is sliced according to a preset length and a preset step size to obtain multiple multi-channel slices. For example, the first multi-channel time series includes three dimensional data of heart rate, blood oxygen saturation, and body temperature. The first multi-channel time series is one minute of data, the preset length is 1 second, and the preset step size is 1 second. Then, the first multi-channel time series is sliced into 60 multi-channel slices, and each multi-channel slice includes 3 channel data, and the 3 channel data are heart rate data, blood oxygen saturation data, and body temperature data, which are respectively recorded as X1, X2, and X3.
[0086] Remove any multi-channel slice from the 60 multi-channel slices, input the three-channel data of the multi-channel slice into the time series basic model in sequence, and obtain the channel feature vectors of the three-channel data, which are recorded as E1, E2, and E3.
[0087] The contributions of the three dimensional data of heart rate, blood oxygen saturation, and body temperature to the feature vector may not be the same. Therefore, the feature vector of each dimensional data is weighted, and a weight coefficient is preset for each dimensional data. The weight coefficients of the three dimensional data of heart rate, blood oxygen saturation, and body temperature are w1, w2, and w3 respectively. Multiply the channel feature vector by the preset corresponding weight coefficient to obtain the channel weighted feature vectors w1E1, w2E2, and w3E3 respectively.
[0088] The weighted feature vectors of each channel are concatenated into an overall feature vector E = (w1E1, w2E2, w3E3), which is used as the feature vector to be classified for the multi-channel slice.
[0089] The above steps are performed on each of the 60 multi-channel slices to obtain 60 feature vectors to be classified. Based on the 60 feature vectors to be classified, a search is performed in the vector database to obtain the classification category of each feature vector to be classified.
[0090] There are many ways to perform similarity search in a vector database. In order to reliably predict the category of the feature vector to be classified, a similarity weighting method can be used for processing. Specifically, Figure 4 Another flowchart of a physiological data classification method provided by an embodiment of the present invention is shown in FIG. Figure 4 , step S240 may include the following steps:
[0091] S241: For any multi-channel slice, a plurality of similar samples similar to the feature vector to be classified corresponding to the multi-channel slice are retrieved from the vector database, wherein the similar samples include standard classification labels and similarities.
[0092] S242: Use a weighting function to perform weighted calculation on the standard classification labels and similarities of each similar sample, and use the standard classification label with the highest score as the classification category of the feature vector to be classified.
[0093] S243: Repeat steps S241 to S242 until the classification category corresponding to each multi-channel slice is obtained.
[0094] Take a multi-channel slice, and according to its corresponding feature vector to be classified, retrieve the K similar samples that are most similar to the feature vector in the vector database. Each similar sample includes a standard classification label and similarity. The standard classification label and similarity are (y1, d1), (y2, d2)…(y K ,dK ), where similarity retrieval can be achieved by comparing the feature vectors of two samples, and the similarity indicator used is the Euclidean distance. For two points p and q, the Euclidean distance d(p, q) in n-dimensional space is defined as:
[0095]
[0096] Among them, p i and q i are the coordinates of points p and q in the i-th dimension respectively.
[0097] Among the multiple sets of retrieved standard classification labels and similarities, a standard classification label needs to be selected as the label of the feature vector to be classified, and the method used can be to use a weighting function to perform weighted calculation on each set of standard classification labels and similarities, and use the standard classification label with the highest score as the classification category of the feature vector to be classified. Among them, the weighting function can be a radial basis function (RBF).
[0098] The above processing is performed on each multi-channel slice to obtain the classification category of each multi-channel slice. For the first multi-channel time series in the above example, which is one minute of data, the preset length is 1 second, and the preset step size is 1 second, the first multi-channel time series is sliced into 60 multi-channel slices, corresponding to 60 feature vectors to be classified, and 60 classification categories are obtained respectively. That is, the classification category of each second is determined in the one-minute time series.
[0099] For the sample data of the vector database, it can be automatically stored according to the annotated physiological data. Specifically, Figure 5 Another flowchart of a physiological data classification method provided by an embodiment of the present invention is shown in FIG. Figure 5 The method may also include: Figure 5 The following steps are described:
[0100] S260: Process the labeled physiological data into at least one second multi-channel time series.
[0101] S270: Slice each second multi-channel time series according to a preset length and step size to obtain a plurality of multi-channel slices.
[0102] S280: Input each multi-channel slice into the time series basic model for feature extraction to obtain multiple supporting feature vectors and multiple standard classification labels.
[0103] S290: Store each supporting feature vector and the standard classification label into a vector database.
[0104] The labeled physiological data includes physiological data and classification labels for the physiological data, which are processed into at least one second multi-channel time series and sliced to obtain multiple multi-channel slices. The time series basic model is used to extract features from each multi-channel slice, and multiple supporting feature vectors and multiple standard classification labels are extracted. The supporting feature vectors correspond to the standard classification labels one by one, and the corresponding storage of the supporting feature vectors and the standard classification labels is stored in a vector database. The above step S240 can retrieve the classification category of the feature vector to be classified based on the vector database.
[0105] In order to extract the features of each multi-channel slice more accurately, the following steps can be used: Figure 6 Another flowchart of a physiological data classification method provided by an embodiment of the present invention is shown in FIG. Figure 6 The multi-channel slice includes multiple channel data and multiple standard classification labels. Step S280 may include the following: Figure 6 The following steps are shown:
[0106] S281: For any multi-channel slice, the standard classification label with the highest occurrence frequency is used as the standard classification label of the multi-channel slice.
[0107] S282: Input each channel data into the time series basic model in sequence to obtain the channel feature vector of the channel data.
[0108] S283: Multiply each channel feature vector by a preset corresponding weight coefficient in sequence to obtain a channel weighted feature vector.
[0109] S284: Concatenate the weighted feature vectors of each channel into an overall feature vector as a supporting feature vector of the multi-channel slice.
[0110] S285: Repeat steps S281 to S284 until the feature vector to be classified of each multi-channel slice is obtained.
[0111] The slices obtained in step S270 may be, for example, the second multi-channel time series includes three dimensional data of heart rate, blood oxygen saturation, and body temperature. The second multi-channel time series is one minute of data, the preset length is 1 second, and the preset step length is 1 second. Then the first multi-channel time series is sliced into 60 multi-channel slices, each multi-channel slice includes 3 channel data and multiple standard classification labels. The 3 channel data are heart rate data, blood oxygen saturation data, and body temperature data, which are recorded as Y1, Y2, and Y3 respectively. The standard classification labels mentioned above can be sleep and activity. Furthermore, the standard classification labels can also be deep sleep, light sleep, rest, activity, etc., and each multi-channel slice finally includes multiple of the standard classification labels.
[0112] If the preset length and the preset step size are inconsistent, the same data may exist in two multi-channel slices. For example, if the preset length is 3 seconds and the preset step size is 2 seconds, then the two adjacent multi-channel slices will have 1 second of data overlap. For a multi-channel slice, the standard classification label with the highest frequency of occurrence can be used as the standard classification label for the multi-channel slice. For example, if the numbers of deep sleep, light sleep, resting, and activity in the multi-channel slice are 6, 2, 1, and 0 respectively, then the standard classification label for the multi-channel slice is determined to be deep sleep.
[0113] Then through the above steps S282 to S284, the supporting feature vector of the multi-channel slice is obtained. The specific steps and principles are the same as the above steps S231 to S233, which will not be repeated here.
[0114] The above steps S282 to S284 are performed on each multi-channel slice to obtain the feature vector to be classified and the standard classification label corresponding to each multi-channel slice, and each feature vector to be classified and the standard classification label are stored in the vector database, which can be used in step S240.
[0115] There are many ways to process the physiological data to be classified. In one possible implementation, the data collection lengths of various dimensions may be processed to be the same. Step S210 may include the following steps:
[0116] A time base common to each channel is determined according to the time point of each channel in the first multi-channel time series.
[0117] The data of each channel is stretched or compressed to ensure that the data length of all channels is the same.
[0118] For the physiological data collected in multiple dimensions, the data length of each dimension may be inconsistent. Therefore, the data of the first multi-channel time series can be synchronized by first finding a common time base for each channel, and then aligning and stretching all data coordinates based on the time base so that the data of each channel can be organized into equal-length data within the same time range.
[0119] In order to ensure the data continuity, integrity, reliability and generalization ability of the first multi-channel time series, the method may further include the step of preprocessing the first multi-channel time series, which may include:
[0120] A mask is added to the position where the missing value of the first multi-channel time series is located, and the predicted value of the masked position is predicted by the time series basic model, and the predicted value is added to the first multi-channel time series.
[0121] Or / and, use the time series basic model to detect outlier points in the first multi-channel time series, add a mask to the position of each outlier, predict the predicted value of the masked position through the time series basic model, and use the predicted value to replace the outlier in the first multi-channel time series.
[0122] Specifically, at the location where the missing value is located (t i ,NaN),(t i+1 ,NaN)…(t i+m ,NaN) plus a mask, the value of the masked position can be predicted by the time series basic model Missing values can be filled by adding predicted values to the time series; using the time series basic model can detect outliers in the input time series Mask the locations of these values, and then use the time series basic model to interpolate and fill in the values of these abnormal locations to obtain the predicted values Use these predicted values to replace outliers in the original time series.
[0123] The preprocessing of the second multi-channel time series may be the same as the above steps, and the preprocessing step of the second multi-channel time series may further include:
[0124] A mask is added to the end of the second multi-channel time series, and the predicted value of the masked position is predicted by the time series basic model, and the predicted value is appended to the end of the second multi-channel time series.
[0125] Add a mask at the end of the existing time series, and obtain the predicted values of these mask positions through the time series basic model, that is, Appending these values to the end of the original time series can form a longer time series, thereby obtaining more sample data after slicing.
[0126] In order to more accurately predict the classification category of the query sample, data from different modalities may be fused and complemented. The method may also include:
[0127] The data of each channel of the first multi-channel time series is weightedly fused.
[0128] Or / and, weighted fusion is performed on the feature vectors extracted from the first multi-channel time series.
[0129] Or / and, weighted fusion is performed on the classification categories of each feature vector to be classified.
[0130] That is, first perform weighted fusion on the data of each channel, and then perform feature extraction; perform weighted fusion on the extracted feature vectors, and then perform similarity retrieval; perform weighted fusion on the retrieved labels, and then obtain a definite classification.
[0131] In order to discover the hidden subgroups in the data set and present them in a user-friendly manner, the method may further include:
[0132] An unsupervised dimensionality reduction algorithm is used to reduce the dimensionality of each supporting feature vector to obtain the corresponding reduced dimensionality feature vector.
[0133] An unsupervised clustering algorithm is used to cluster each dimension-reduced feature vector to obtain the corresponding cluster feature vector.
[0134] Visualize the feature vectors of each cluster.
[0135] Among them, the unsupervised dimensionality reduction algorithm can be PCA, t-SNE, UMAP, etc., and the unsupervised clustering algorithm can be KNN, Fuzzy C-means, DBSCAN or spectral clustering, etc.
[0136] Use visualization techniques such as two-dimensional or three-dimensional scatter plots to present clustering results, where the color or shape of each point represents its cluster label, which helps to intuitively understand the data distribution and structure.
[0137] In summary, the embodiments of the present invention provide a physiological data classification method and electronic device, which processes and extracts features of physiological data and performs similarity search in a vector database to determine the classification category of each feature vector to be classified, processes and extracts features of the labeled physiological data, and stores the extracted feature vectors and labels in a vector database, thereby being able to directly classify physiological data in this way when the amount of training and testing data is limited.
[0138] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a module, a program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked 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 flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0139] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0140] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a computer-readable storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0141] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0142] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A physiological data classification method, characterized in that: The method comprises: processing the physiological data to be classified into a first multi-channel time series; Slicing the first multi-channel time series according to a preset length and a preset step size to obtain a plurality of multi-channel slices; Input each of the multi-channel slices into a time series basic model for feature extraction to obtain a feature vector to be classified corresponding to each of the multi-channel slices; For any of the multi-channel slices, a similarity search is performed in a vector database according to the feature vector to be classified corresponding to the multi-channel slice to determine the classification category of the multi-channel slice; the vector database stores a plurality of samples, and the samples include supporting feature vectors and corresponding standard classification labels; Each of the multi-channel slices is traversed to obtain a classification category of each of the multi-channel slices.
2. The method according to claim 1, characterized in that The multi-channel slices include a plurality of channel data, and the multi-channel slices are input into the time series basic model for feature extraction to obtain a feature vector to be classified corresponding to each multi-channel slice, including: For any of the multi-channel slices, the channel data of each of the multi-channel slices are sequentially input into the time series basic model to obtain a channel feature vector of each of the channel data; Multiplying each of the channel feature vectors by a preset corresponding weight coefficient in sequence to obtain a channel weighted feature vector; splicing the weighted feature vectors of each channel into an overall feature vector as the feature vector to be classified of the multi-channel slice; Each of the multi-channel slices is traversed to obtain a feature vector to be classified of each of the multi-channel slices.
3. The method according to claim 1, characterized in that For any of the multi-channel slices, performing a similarity search in a vector database according to the feature vector to be classified corresponding to the multi-channel slice to determine the classification category of the multi-channel slice includes: For any of the multi-channel slices, a plurality of similar samples similar to the feature vector to be classified corresponding to the multi-channel slice are retrieved from the vector database; the similar samples include standard classification labels and similarities; Using a weighting function to perform weighted calculation on the standard classification labels and similarities of each of the similar samples, and using the standard classification label with the highest score as the classification category of the feature vector to be classified; Each of the multi-channel slices is traversed to obtain a classification category of each of the multi-channel slices.
4. The method according to claim 1, characterized in that: The method further comprises: processing the labeled physiological data into at least one second multi-channel time series; Slicing each of the second multi-channel time series according to a preset length and step size to obtain a plurality of multi-channel slices; Inputting each of the multi-channel slices into the time series basic model for feature extraction to obtain a plurality of supporting feature vectors and a plurality of standard classification labels; Each of the supporting feature vectors and the standard classification label is stored in the vector database accordingly.
5. The method according to claim 4, characterized in that The multi-channel slices include multiple channel data and multiple standard classification labels, and the multi-channel slices are input into the time series basic model for feature extraction to obtain multiple supporting feature vectors and multiple standard classification labels, including: For any of the multi-channel slices, using the standard classification label with the highest occurrence frequency as the standard classification label of the multi-channel slice; Inputting each of the channel data into the time series basic model in sequence to obtain a channel feature vector of each of the channel data; Multiplying each of the channel feature vectors by a preset corresponding weight coefficient in sequence to obtain a channel weighted feature vector; concatenating the weighted feature vectors of each channel into an overall feature vector as a supporting feature vector of the multi-channel slice; Each of the multi-channel slices is traversed to obtain a supporting feature vector and a standard classification label of each of the multi-channel slices.
6. The method according to claim 1, characterized in that The step of processing the physiological data to be classified into a first multi-channel time series comprises: Determining a common time reference for each of the channels according to the time points of each channel in the first multi-channel time series; The data of each channel is stretched or compressed to ensure that the data lengths of all the channels are the same.
7. The method according to claim 6, characterized in that The method further comprises the step of preprocessing the first multi-channel time series, the step comprising: Adding a mask to the position where the missing value of the first multi-channel time series is located, predicting the predicted value of the masked position by using the time series basic model, and adding the predicted value to the first multi-channel time series; Or / and, using the time series basic model to detect outlier points in the first multi-channel time series, masking the positions of the outliers, predicting the predicted values of the masked positions through the time series basic model, and using the predicted values to replace the outliers in the first multi-channel time series.
8. The method according to claim 1, characterized in that The method further comprises: Performing weighted fusion on the data of each channel of the first multi-channel time series; or / and, performing weighted fusion on the feature vectors extracted from the first multi-channel time series; Or / and, weighted fusion is performed on the classification categories of each of the feature vectors to be classified.
9. The method according to claim 4, characterized in that The method further comprises: Performing dimensionality reduction processing on each of the supporting feature vectors using an unsupervised dimensionality reduction algorithm to obtain a corresponding reduced dimensionality feature vector; Using an unsupervised clustering algorithm to cluster each of the dimension reduction feature vectors to obtain a corresponding cluster feature vector; Each cluster feature vector is visualized.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Classification method, computer equipment and storage medium
CN110210519A
Multi-channel physiological time sequence classification method
CN117076994A
Attitude reconstruction interaction behavior understanding method based on skeleton and image features
CN117238026A
Risk prediction method and device based on multi-source heterogeneous data and multi-modal data
CN117992925A
Track similarity analysis method based on spatio-temporal information extraction, electronic equipment and storage medium
CN118484481A
