Data classification method, data compression method, equipment and medium

By combining convolution and circular convolution operations with window value and interval value to control the compression of time-series data, the problem of loss of temporal sequence in compressed time-series data is solved, and efficient classification and accuracy of data such as electrocardiogram signals are achieved.

CN121743952APending Publication Date: 2026-03-27JIANGYU KANGJIAN INNOVATION MEDICAL TECH CHENGDU CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies struggle to preserve temporal sequence when compressing time-series data, leading to decreased classification accuracy, particularly impacting the accuracy of early diagnosis and monitoring in electrocardiogram (ECG) signal data processing.

Method used

Convolution and circular convolution operations are used to compress time-series data. The temporality of the compressed data is controlled by setting window values ​​and interval values. Combined with feature extraction and classification networks, the temporality of the compressed data and the accuracy of classification are ensured.

Benefits of technology

Preserving temporal characteristics in compressed data improves the accuracy of data classification and ensures the accuracy of early diagnosis and monitoring of time-series data such as electrocardiogram signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121743952A_ABST
    Figure CN121743952A_ABST
Patent Text Reader

Abstract

The invention provides a data classification method, a data compression method, equipment and a medium. The data classification method comprises the steps of obtaining time series data, performing compression operation on the time series data to obtain compressed data, performing feature extraction operation on the compressed data to obtain target data features, and performing classification operation on the target data features to obtain data categories. By utilizing the method, the time sequence of the compressed data can be ensured, so that the classification accuracy of the data category can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a data classification method, a data compression method, an apparatus, and a medium. Background Technology

[0002] In related technologies, neural networks are often used to classify time-series data. To improve the classification accuracy of neural networks, the resolution of time-series data often needs to be increased. However, higher resolution means a larger amount of data, which increases the burden on the neural network and further reduces classification accuracy. Therefore, how to compress high-resolution data without losing its temporal sequence is an important issue.

[0003] Taking the field of electrocardiogram (ECG) signal data processing as an example, ECG signal data is an important vital sign that directly reflects the user's heart activity. Its accurate classification is of great significance for the early diagnosis and monitoring of heart diseases. For example, if the temporal sequence of the compressed ECG signal data cannot be preserved, it will affect the accuracy of ECG signal data classification. Summary of the Invention

[0004] In view of the above, it is necessary to provide a data classification method, a data compression method, an apparatus and a medium that can solve the technical problem of inaccurate classification caused by the difficulty in preserving the temporal sequence when compressing time-series data.

[0005] On one hand, embodiments of this application provide a data classification method, which includes: acquiring time-series data, performing compression operations on the time-series data to obtain compressed data, performing feature extraction operations on the compressed data to obtain target data features, and performing classification operations on the target data features to obtain data categories.

[0006] In some embodiments of this application, the compression operation is a convolution operation.

[0007] In some embodiments of this application, the convolution operation includes residual operation.

[0008] In some embodiments of this application, the feature extraction operation is a convolution operation.

[0009] In some embodiments of this application, the feature extraction operation is a circular convolution operation.

[0010] In the data classification method provided in this application embodiment, the data compression method can preserve the temporal characteristics of time-series data in the compressed data, thereby ensuring the temporal sequence of the compressed data. Through feature extraction operations, effective target data features can be extracted from the compressed data, and by classifying the effective target data features, the accuracy of data category classification can be ensured.

[0011] On the other hand, this application provides a data compression method, the data compression method comprising: acquiring time-series data, the time-series data including multiple original data ordered by time; setting a window value and an interval value; performing compression operations on the time-series data to obtain multiple compressed data ordered by time, and each compressed data corresponding to a data set, wherein the correspondence between the compressed data and the data set is as follows:

[0012]

[0013] Where Y represents compressed data, and t represents the t-th data point. The {} represents the corresponding data set, X represents the original data, w represents the window value, d represents the interval value, and T represents the sequence length of the compressed data.

[0014] In some embodiments of this application, the method further includes: calculating the difference between the window value and the interval value to obtain an intersection difference, calculating the quotient between the intersection difference and the window value to obtain the temporal degree corresponding to the compressed data.

[0015] In some embodiments of this application, the timing degree is greater than 0.7.

[0016] In the data compression method provided in this application embodiment, the size of the data set corresponding to each compressed data and the time series data can be controlled by the window value, and the amount of overlapping original data between related data sets can be controlled by the interval value. By controlling the size of the data set corresponding to each compressed data and the amount of overlapping original data between related data sets, the temporality of the compressed data can be controlled, thereby preserving the temporal characteristics of the time series data in the compressed data and ensuring the temporality of the compressed data.

[0017] On the other hand, this application provides an electronic device, the electronic device comprising: a memory storing at least one instruction; and a processor executing the at least one instruction to implement the data classification method or the data compression method.

[0018] On the other hand, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the data classification method or the data compression method described above. Attached Figure Description

[0019] Figure 1 This is a flowchart of a data compression method provided in an embodiment of this application.

[0020] Figure 2 This is a schematic diagram of electrocardiogram signal data provided in an embodiment of this application.

[0021] Figure 3 It is a schematic diagram of the compression of time series data provided by an embodiment of the present application.

[0022] Figure 4 It is a flowchart of a data classification method provided by an embodiment of the present application.

[0023] Figure 5 It is a schematic diagram of the calculation of weights provided by an embodiment of the present application.

[0024] Figure 6 It is a schematic diagram of neurons in a fully connected layer provided by an embodiment of the present application.

[0025] Figure 7 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0026] It should be noted that in the present application, "at least one" means one or more, and "multiple" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. Terms such as "first", "second", "third", "fourth", etc. (if any) in the description, claims, and drawings of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0027] It should be noted that the definitions of rows and columns in an array or matrix in the present application are as follows:

[0028] Row: equivalent to "row" in English, with a horizontal direction;

[0029] Column: equivalent to "column" in English, with a vertical direction.

[0030] In the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as more preferred or more advantageous than other embodiments or design solutions. Exactly, using words such as "exemplary" or "for example" aims to present related concepts in a specific manner. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.

[0031] The embodiments of the present application provide a data compression method, which compresses time series data and can ensure the temporality of the compressed data after compression.

[0032] Such as Figure 1The diagram shown is a flowchart of a data compression method provided in an embodiment of this application. Depending on different needs, the order of the steps in this flowchart can be adjusted according to actual requirements, and some steps can be omitted. The data compression method is applied to electronic devices, such as… Figure 7 The electronic device 10 shown.

[0033] S11, acquire timing data.

[0034] In some embodiments of this application, time-series data can be data that changes over time. This time-series data can include biomedical data, industrial production data, and weather data, etc., and this application does not limit the specific type of time-series data. For example, biomedical data can be electrocardiogram (ECG) data or electroencephalogram (EEG) data. Industrial production data can be data on machine operating status and product output that changes over time.

[0035] Taking electrocardiogram (ECG) signal data as an example, ECG signal data consists of a series of waveform signals that change over time; therefore, ECG signal data can be considered time-series data. Figure 2 The diagram shown is a schematic representation of electrocardiogram (ECG) signal data provided in an embodiment of this application. Electronic devices can acquire ECG signal data in various ways, and this application does not limit the method of acquiring ECG signal data.

[0036] For example, an electronic device can acquire electrocardiogram (ECG) signal data from an ECG monitoring device that is communicatively connected to the electronic device. The ECG monitoring device is a device that monitors the electrical activity of the heart, such as a wearable ECG wristband. The ECG monitoring device can collect ECG signal data from a living organism, which can be a human or an animal, according to a preset sampling frequency and a preset sampling duration. The sampling frequency and sampling duration can be customized, and this application does not limit them. For example, the sampling frequency can be 250Hz and the sampling duration can be 30s. Collecting data at a sampling frequency of 250Hz and a sampling duration of 30s can yield ECG signal data with a sequence length of 7500 = 250 * 30.

[0037] The above examples of methods for acquiring electrocardiogram (ECG) signal data are merely illustrative of methods for acquiring time-series data. In practical applications, the methods for acquiring time-series data are not limited to these examples. For instance, electronic devices can also acquire time-series data from a pre-set database.

[0038] S12, Perform compression operations on the time-series data according to the data compression network to obtain compressed data.

[0039] In some embodiments of this application, the time-series data may include original data X ordered by time, each compressed data Y may have a corresponding data set, and the data set corresponding to each compressed data Y may include multiple original data X ordered by time. The size of the data set corresponding to each compressed data may be controlled by a window value w. The data sets corresponding to two adjacent compressed data are interconnected, and the size of the data set may be the number of original data included in the data set. In each data set, the first original data in the sorted order is the first data, and the first data of interconnected data sets are separated by N original data, the value of N being controlled by an interval value d. The N original data separated by the first data of interconnected data sets may be the overlapping original data between the two interconnected data sets.

[0040] In some embodiments of this application, the data compression network may include multiple network modules, and the network parameters of each network module may include a stride and a kernel size. The window value may be determined by the kernel size of the multiple network modules, and the interval value d may be determined by the stride of the multiple network modules. For example, the window value w is proportional to the kernel size of the multiple network modules, and the interval value d is proportional to the stride of the multiple network modules.

[0041] For example, the method for determining the data set corresponding to each compressed data can refer to the following formula (1):

[0042]

[0043] Where Y represents compressed data, and t represents the t-th data point. The {} represents the corresponding data set, X represents the original data, w represents the window value, d represents the interval value, and T represents the sequence length of the compressed data.

[0044] like Figure 3 The diagram shown is a schematic representation of timing data compression provided in an embodiment of this application. Figure 3 In the sequence, time-series data X of length n includes X1 to X... n Given a set of original data, time-series data (e.g., electrocardiogram signal data) can be compressed using a data compression network to obtain compressed data Y of sequence length T, where Y includes Y1 to Y2. T The compressed data is determined by the network parameters of the data compression network, where the window value w = 4 and the interval value d = 2. It can be determined by formula (1) that the data set corresponding to Y1 includes the original data X1 to X4, the data set corresponding to Y2 includes the original data X3 to X6, the data set corresponding to Y3 includes the original data X5 to X8, and so on. The data set corresponding to each compressed data can be determined.

[0045] In some embodiments of this application, the sequence length of the compressed data is T = n / c, where n represents the number of original data in the time series data and c represents the compression ratio.

[0046] In this compression network, the compression ratio *c* is inversely proportional to the interval *d*. The compression ratio *c* can be determined by the stride of each network module in the compression network. For example, if the data compression network contains three network modules with strides *S1*, *S2*, and *S3*, then the relationship between the compression ratio *c* and the stride of the network modules can be expressed as: [Compression ratio *c*...]

[0047] In some embodiments of this application, in order to preserve the temporal characteristics of compressed data, it is necessary to ensure that the compressed data has temporal sequence. The temporal sequence of compressed data can be determined by the temporal sequence degree, and the compressed data with a higher temporal sequence degree has better temporal sequence.

[0048] For example, an electronic device can calculate the difference between the window value and the interval value to obtain the intersection difference, and calculate the quotient of the intersection difference and the window value to obtain the temporal sequence degree corresponding to the compressed data.

[0049] For example, the calculation method for the temporal degree of compressed data can refer to the following formula (2):

[0050] TS degree = (wd) / w; (2)

[0051] Where TS degree represents the time series degree, w represents the window value, and d represents the interval value.

[0052] In some embodiments of this application, the timing degree (TS degree) is greater than 0.7.

[0053] In some embodiments of this application, the data compression network can be a convolutional neural network, and the multiple network modules in the data compression network can include network modules such as convolutional layers, pooling layers, and residual network layers. For example, the convolutional layer can be a one-dimensional convolutional layer (conv1D), and the pooling layer can be a one-dimensional max pooling layer (MaxPool1D). The residual network layer includes multiple residual modules, each residual module including multiple convolutional layers with skip connections or residual connections. This application does not limit the number of residual modules or the number of convolutional layers in each residual module. The above examples of the structure of the data compression network are merely illustrative and do not constitute a limitation on the data compression network.

[0054] In other embodiments, the data compression network may include more or fewer network layers. For example, convolutional layers and pooling layers may be connected by cascaded batch normalization layers and activation function layers. Each convolutional layer in the residual module may be followed by a batch normalization layer, or a batch normalization layer and an activation function layer. For example, the activation function layer may be a rectified linear unit (ReLU).

[0055] Taking a data compression network, which includes convolutional layers, pooling layers, and residual network layers, as an example, electronic devices use a data compression network to compress time-series data to obtain compressed data. This process involves: using convolutional layers to perform convolutional processing on the time-series data to obtain convolutional feature maps; using pooling layers to perform pooling processing on the convolutional feature maps to obtain pooled feature maps; inputting the pooled feature maps into the residual network layers to obtain residual feature maps output by each of the multiple residual modules; wherein, the residual feature maps output by the preceding residual modules are used as feature maps input to the following residual modules; and the residual feature map output by the last residual module is determined as the compressed data.

[0056] Each residual module includes multiple convolutional layers. The feature map output by each convolutional layer is obtained by convolving the input feature map. The feature map output by the preceding convolutional layer serves as the input feature map to the following convolutional layer. The residual feature map output by each residual module is obtained by fusing the feature map input to the first convolutional layer with the feature map output by the last convolutional layer. This application does not limit the method of feature fusion. For example, the method of feature fusion between the feature map input to the first convolutional layer and the feature map output by the last convolutional layer can be to add the feature values ​​at corresponding positions between the feature map input to the first convolutional layer and the feature map output by the last convolutional layer.

[0057] In the data compression method provided in this application embodiment, the window value and the interval value can be controlled by the network parameters of the data compression network. The window value can control the size of the data set corresponding to each compressed data and the time-series data, and the interval value can control the amount of overlapping original data between related data sets. By controlling the size of the data set corresponding to each compressed data and the amount of overlapping original data between related data sets, the temporality of the compressed data can be controlled, thereby ensuring the temporality of the compressed data.

[0058] Receive as Figure 1 The data compression method shown allows for the classification of compressed data using a data classification model after the compressed data is obtained. This data classification model may include a feature extraction network, an attention module, a weighting module, and a classification network. In other embodiments of this application, the data classification model may further include the data compression network described in step S12. The data classification model can be trained using training data with category labels, where the training data may be time-series data such as electrocardiogram signal data.

[0059] like Figure 4 The diagram shown is a flowchart of a data classification method provided in an embodiment of this application. Depending on different needs, the order of the steps in this flowchart can be adjusted according to actual requirements, and some steps can be omitted. The data classification method is applied to electronic devices, such as… Figure 7 The electronic device 10 shown.

[0060] S21, perform feature extraction operations on the compressed data to obtain the target data features.

[0061] In some embodiments of this application, compressed data can be utilized as follows: Figure 1 The data compression method shown is used to compress time-series data.

[0062] In some embodiments of this application, the electronic device can utilize the feature extraction network in the data classification model to perform feature extraction operations on compressed data to obtain target data features.

[0063] The feature extraction network can be a convolutional network, and the feature extraction operation can be a convolution operation. For example, the feature extraction network can be LeNet-5, AlexNet, VGGNet, Inception, etc. Alternatively, the feature extraction network can also be a variant of a convolutional neural network, where the variant of the convolutional neural network can be a recurrent neural network (RNN) or a variant of a recurrent neural network, and the feature extraction operation can be a recurrent convolution operation. Variants of recurrent neural networks can be Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU), and Bidirectional Gated Recurrent Unit (BiGRU), etc. To more clearly illustrate the data classification method provided in this application embodiment, the following description will use the bidirectional gated recurrent unit module as an example.

[0064] The bidirectional gated recurrent unit module includes a forward-gated recurrent unit and a backward-gated recurrent unit. The forward-gated recurrent unit includes multiple first hidden neurons, and the backward-gated recurrent unit includes multiple second hidden neurons. The electronic device performs convolution operations on the compressed data within the compressed data according to a data classification model to obtain target data features. This includes: reversing the sorting of the compressed data to obtain reverse-order compressed data; inputting the compressed data into the forward-gated recurrent unit to obtain multiple first data features output by each first hidden neuron; inputting the reverse-order compressed data into the backward-gated recurrent unit to obtain multiple second data features output by each second hidden neuron; and concatenating the first and second data features to obtain the target data features. The target data features contain multiple feature data, which can be represented as a two-dimensional matrix, where feature data in the same column of the matrix corresponds to the same compressed data.

[0065] The methods for generating the first data feature and the second data feature can refer to the methods for calculating the hidden state through the gating mechanism in the bidirectional gating loop unit in related technologies, and will not be described in detail in this application.

[0066] For example, following the above embodiment, if the compressed data is Y = (Y (1) ,Y (2) ,…,Y (T) If the reverse sorting yields the reverse-order compressed data, then Y′=(Y (T) ,Y (T-1),…,Y (1) The multiple first data features output from multiple compressed data in the compressed data of each first hidden neuron needle can be Z′ = (Z (1) Z (2) ,…,Z (T) Each second hidden neuron outputs multiple second data features for the compressed data in the reverse-order compressed data, which can be Z′′=(Z (T) Z (T-1) ,…,Z (1) By concatenating these components, the target data feature Z can be obtained. If the number of the first hidden neuron and the second hidden neuron are both H, the target data feature Z can be represented as a 2H×T two-dimensional matrix, and the feature data in the i-th row and j-th column of the target data feature Z can be represented as Zi. i,j , i=1,2…2H, j=1,2…T.

[0067] For example, the target data features can be represented by a matrix as shown in the following formula (3):

[0068]

[0069] Where Z represents the target data feature.

[0070] In this embodiment, the bidirectional gated recurrent unit can capture forward dependencies in time-series data from compressed data and backward dependencies in time-series data from reverse-order compressed data. This bidirectional processing allows the bidirectional gated recurrent unit to capture target data features in time-series data more comprehensively and effectively, thereby improving the accuracy of subsequent classification networks.

[0071] S22, perform weight calculations on the target data features to obtain a weight vector.

[0072] In some embodiments of this application, the electronic device can use the attention module in the data classification model to perform weight calculations on the target data features to obtain a weight vector.

[0073] The attention module may include a linear layer and / or a normalization function. For example, the linear layer may be a fully connected layer, and the normalization function may be a softmax function.

[0074] If the attention module includes a fully connected layer and a normalization function, the electronic device uses the attention module to perform weight calculations on the target data features to obtain a weight vector. This includes: using the fully connected layer to perform a linear transformation on each column of feature data in the target data features to obtain the original score corresponding to each column of feature data; using the normalization function to normalize the original score corresponding to each column of feature data to obtain the weight corresponding to each column of feature data; and arranging the weights corresponding to each column of feature data in sequence to obtain a weight vector. The weight vector is a one-dimensional array, and the weight vector includes weights that correspond one-to-one with each column of feature data in the target data features.

[0075] For example, following the above embodiments, if the target data features are a 2H×T matrix as shown in formula (3), such as Figure 5 The diagram shown is a schematic representation of weight calculation provided in an embodiment of this application. Figure 5 In this process, the j-th column of feature data is selected from the target data feature Z as shown in formula (3). The selected feature data in column j is input into the fully connected layer to obtain the original score f corresponding to the feature data in column j. j Since j = 1, 2, ..., T, we can obtain the original scores f1 corresponding to the first column of feature data, f2 corresponding to the second column of feature data, ..., f3 corresponding to the Tth column of feature data. T f1, f2...f T By inputting into the softmax layer, we can obtain the weights W1 corresponding to the first column of feature data in the target data, W2 corresponding to the second column of feature data, ..., W1 corresponding to the Tth column of feature data. T To facilitate calculations with the target data features in the following text, W1, W2...W T Arrange them sequentially in a column to obtain a weight vector of shape T×1.

[0076] In some embodiments of this application, the fully connected layer may include neurons at the input end, hidden layers, and neurons at the output end, and the number of neurons at the input end of the fully connected layer is different from the number of neurons at the output end. For example... Figure 6 The diagram shown is a schematic representation of a neuron in a fully connected layer according to an embodiment of this application. Figure 6 In this fully connected layer, there are 2H neurons at the input end and 1 neuron at the output end, which enables the conversion of 2H feature data in each column of the target data into a raw score f.

[0077] Considering that directly inputting the target data features into the classification network of a data classification model would make it difficult for the network to capture the features that have a significant impact on classification, this embodiment utilizes a fully connected layer to perform a linear transformation on each column of feature data in the target data. This allows the network to learn the relationships between different features in the target data, thus identifying the features that have a greater or lesser impact on classification. Consequently, higher weights can be assigned to the features with a greater impact on classification in the weight vector, while lower weights can be assigned to the features with a lesser impact.

[0078] S23, perform a weighted operation on the weight vector and the target data features to obtain the weighted data features.

[0079] In some embodiments of this application, the electronic device uses a weighting module to multiply the target data features and the weight vector to obtain weighted data features.

[0080] For example, an electronic device can multiply a target data feature Z of shape 2H×T with a weight vector W of shape T×1 to obtain a vector Q of shape 2H×1. By transposing vector Q, a weighted data feature K can be obtained.

[0081] For example, the calculation method for vector Q can refer to the following formula (4), and the calculation method for weighted data feature K can refer to the following formula (5):

[0082]

[0083] In this embodiment, since the feature data that has a greater impact on classification has a higher weight in the weight vector, and the feature data that has a smaller impact on classification has a lower weight in the weight vector, multiplying the target data features and the weight vector can optimize the target data features. For example, it can strengthen the feature data that has a greater impact on classification and weaken the feature data that has a smaller impact on classification, thereby obtaining weighted data features.

[0084] S24, classify the weighted data features to obtain data categories.

[0085] In some embodiments of this application, the electronic device can utilize a classification network to classify weighted data features and obtain data categories. The classification network may include linear layers and a normalization function. For example, the linear layer in the classification network can be a fully connected layer, and the normalization function can be a softmax function. For instance, if the time-series data is electrocardiogram (ECG) signal data, the data category can be a cardiac rhythm state category such as normal sinus rhythm, atrial fibrillation, and premature ventricular contractions; if the time-series data is electroencephalogram (EEG) data, the data category can be a state category such as awake, deep sleep, and light sleep; if the time-series data is weather data, the data category can be a weather state category such as sunny, cloudy, and rainy.

[0086] Electronic devices use a classification network to classify weighted data features to obtain data categories, including: using a classification network to map weighted data features to multiple preset categories, obtaining the confidence level of time series data corresponding to each preset category, and determining the data category from multiple preset categories based on the confidence level.

[0087] The multiple preset categories can be customized based on the time-series data, and this application does not impose any restrictions on this. For example, if the time-series data is electrocardiogram (ECG) signal data, the multiple preset categories may include: normal sinus rhythm, atrial fibrillation, and premature ventricular contractions, etc.; if the time-series data is weather data, the multiple preset categories may include: sunny, cloudy, rainy, etc. The data category can be the preset category corresponding to the highest confidence level. The calculation method for the time-series data corresponding to each preset category can be found in the description of the weight vector calculation method in step S22, and will not be repeated in this application.

[0088] In this embodiment, since the weighted data features are obtained by strengthening the feature data that has a greater impact on classification in the target data features and weakening the feature data that has a smaller impact on classification in the target data features, the feature data that has a greater impact on classification is more significant in the weighted data features compared to the feature data that has a smaller impact on classification. Therefore, the classification network can accurately capture the feature data that has a greater impact on classification in the weighted data features, thereby ensuring the accuracy of the classification of data categories.

[0089] In other embodiments of this application, the electronic device can use a classification network to classify target data features and obtain data categories. The method for classifying target data features using a classification network can be found in the description of the weight vector calculation method in step S22, and will not be repeated here.

[0090] like Figure 7 The diagram shown is a structural schematic of an electronic device provided in one embodiment of this application. The electronic device 10 can be a computer, tablet computer, laptop computer, mobile phone, server, or other electronic device. This application embodiment does not impose any restrictions on the specific type of electronic device.

[0091] exist Figure 7 The electronic device 10 may include a communication module 101, a memory 102, a processor 103, an input / output (I / O) interface 104, and a bus 105. The processor 103 is coupled to the communication module 101, the memory 102, and the input / output interface 104 via the bus 105.

[0092] Communication module 101 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more wired communication solutions such as Universal Serial Bus (USB) and Controller Area Network (CAN). The wireless communication module may provide one or more wireless communication solutions such as Wireless Fidelity (Wi-Fi), Bluetooth (BT), mobile communication networks, Frequency Modulation (FM), Near Field Communication (NFC), and Infrared (IR).

[0093] Memory 102 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 103, and can be used to store executable programs (e.g., machine instructions) of other running programs, as well as user and application data. The RAM may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.

[0094] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 103. Non-volatile memory can include disk storage devices and flash memory. For example, flash memory can be Nand Flash.

[0095] The memory 102 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 103. The one or more computer programs include multiple instructions that, when executed by the processor 103, can implement a data compression method or a data classification method that is executed on the electronic device 10.

[0096] In other embodiments, such as Figure 7 The electronic device 10 shown also includes an external memory interface for connecting to an external memory to expand the storage capacity of the electronic device 10.

[0097] Processor 103 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0098] The processor 103 provides computing and control capabilities. For example, the processor 103 is used to execute computer programs stored in the memory 102 to implement the data compression method or data classification method described above.

[0099] The input / output interface 104 is used to provide a channel for user input or output. For example, the input / output interface 104 can be used to connect various input / output devices, such as a mouse, keyboard, touch device, display screen, etc., so that users can enter information or visualize information.

[0100] Bus 105 is used at least to provide a channel for communication between communication modules 101, memory 102, processor 103, and input / output interface 104 in electronic device 10.

[0101] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 10. In other embodiments of this application, the electronic device 10 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0102] This application also provides a computer-readable storage medium storing a computer program, which includes program instructions. When the program instructions are executed, the method implemented can refer to the methods in the above embodiments of this application.

[0103] The computer-readable storage medium can be the internal memory of the electronic device described in the above embodiments, such as the hard disk or memory of the electronic device. Alternatively, the computer-readable storage medium can be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., installed on the electronic device.

[0104] In some embodiments, a computer-readable storage medium may include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function, etc.; and the stored data area may store data created based on the use of the electronic device, etc.

[0105] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0106] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0107] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0108] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No appended diagram markings in the claims should be construed as limiting the scope of the claims.

[0109] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices described in this application may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.

[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.

Claims

1. A data classification method, characterized in that, The data classification method includes: Acquire time series data; The time-series data is compressed to obtain compressed data; Feature extraction operations are performed on the compressed data to obtain the target data features; The target data features are classified to obtain data categories.

2. The data classification method as described in claim 1, characterized in that, The compression operation is a convolution operation.

3. The data classification method as described in claim 2, characterized in that, The convolution operation includes residual operations.

4. The data classification method as described in claim 1, characterized in that, The feature extraction operation is a convolution operation.

5. The data classification method as described in claim 4, characterized in that, The feature extraction operation is a circular convolution operation.

6. A data compression method, characterized in that, The data compression method includes: Acquire time-series data, which includes multiple original data sorted by time; Set a window value and an interval value; The time-series data is compressed to obtain multiple compressed data items ordered by time, and each compressed data item corresponds to a data set; The correspondence between the compressed data and the data set is as follows: Where Y represents compressed data, and t represents the t-th data point. The {} represents the corresponding data set, X represents the original data, w represents the window value, d represents the interval value, and T represents the sequence length of the compressed data.

7. The data compression method as described in claim 6, characterized in that, The method further includes: Calculate the difference between the window value and the interval value to obtain the intersection difference; The time series degree corresponding to the compressed data is obtained by calculating the quotient of the intersection difference and the window value.

8. The data compression method as described in claim 7, characterized in that, The time series degree is greater than 0.

7.

9. An electronic device, characterized in that, The electronic device includes: Memory, storing at least one instruction; and The processor executes the at least one instruction to implement the data classification method as described in any one of claims 1 to 5 or the data compression method as described in any one of claims 6 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the data classification method as described in any one of claims 1 to 5 or the data compression method as described in any one of claims 6 to 8.