Time sequence classification method and device, electronic equipment and storage medium
The local features and sparse response mapping of time series are extracted through convolutional neural network, and combined with feature frequency histograms for classification, solving the problems of low classification accuracy and high computational complexity in the existing technology, achieving efficient and accurate real-time Classification processing.
Patent Information
- Application Number
- CN202411825281.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-01-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing time series classification methods cannot meet the needs of real-time identification. The data processing volume is large and the recognition accuracy is low, so they cannot meet the urgent need for efficient, accurate and rapid processing in the fields of finance, medical care, etc.
The optimized feature bag framework based on convolutional neural network is adopted to segment the time series data through sliding windows, and the local feature vector is extracted using the convolutional neural network, and the sparse response vector is generated through the full connection layer, and the statistical feature frequency histogram is used as input for classification. Optimize the classification method using mixed loss function.
It improves the accuracy and robustness of time series classification, reduces the computational complexity, enhances the algorithm efficiency, and has better generalization performance, and is suitable for time series classification tasks in different fields and scenarios.
Smart Images

Figure CN119293615A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a time series classification method, device, electronic device and storage medium based on a convolutional neural network optimized feature bag framework. Background Art
[0002] In recent years, the application of time series data in the field of target recognition has become increasingly extensive and in-depth. As an important research direction in the fields of machine learning, pattern recognition and artificial intelligence, target recognition aims to automatically identify specific patterns or objects from complex data sets. In the context of time series data, target recognition is not only the matching of static features, but also involves the capture and analysis of the dynamic characteristics of time series. For example, in the financial market, by analyzing time series data such as stock prices and trading volumes, key information such as market trends and abnormal trading behaviors can be identified; in the medical field, time series analysis of biological signals such as electrocardiograms and electroencephalograms can help early diagnosis and monitoring of diseases; and in industrial manufacturing, by monitoring the time series data of equipment operation status, faults can be discovered in time and maintenance needs can be predicted, thereby improving production efficiency and safety. Therefore, classification problems based on time series have also attracted more and more attention from researchers.
[0003] In many application scenarios, real-time recognition of time series data is particularly important. Real-time, that is, the ability of the system to process and give feedback immediately after the data is generated, has a decisive impact on improving decision-making efficiency, reducing risk losses, and optimizing user experience. Especially in fields that rely heavily on real-time decision-making, such as financial transactions, disaster warnings, and autonomous driving, the real-time recognition ability of time series data is directly related to the stability and security of the system. For example, in high-frequency transactions in the financial market, millisecond-level delays may lead to huge economic losses; in disaster warning systems, warnings a few seconds or even milliseconds in advance may save countless lives. Therefore, conducting research on real-time measurement and real-time classification of time series data is not only a challenge and breakthrough to existing data processing technology, but also an urgent requirement to meet the needs of modern society for efficient, accurate, and fast information processing. Real-time measurement requires the system to be able to capture time series data uninterruptedly to ensure the integrity and timeliness of the data; while real-time classification emphasizes the immediate pattern recognition and classification at the same time as data acquisition, providing immediate and accurate basis for subsequent decision support.
[0004] However, the current time series classification methods cannot fully meet the needs of real-time recognition. They have large data processing volume and low recognition accuracy, and cannot meet the urgent needs for efficient, accurate and fast data processing in the above-mentioned application scenarios. Summary of the invention
[0005] Some embodiments of the present application provide a time series classification method, device, electronic device and storage medium based on a convolutional neural network optimized feature bag framework to solve at least one of the above technical problems, specifically as follows: The present application provides a time series classification method based on a convolutional neural network optimized feature bag framework, comprising the following steps: The time series data to be classified is divided according to a preset sliding window size to form a plurality of local time periods; for each of the local time periods, a convolutional neural network is used to process it to extract a feature vector of the local time period; Input each of the extracted feature vectors into a fully connected layer, and generate a corresponding sparse response vector through the transformation of the weight matrix and the nonlinear effect of the activation function; Performing frequency statistics on all the generated sparse response vectors, and constructing a characteristic frequency histogram of the time series based on the statistical results; The feature frequency histogram is used as a representation of the time series and input into a classifier for classification to obtain a category label of the time series.
[0006] In some embodiments, the following steps are also included: Constructing a first loss function based on the loss between the generated sparse response vector and a predefined expected label; Constructing a second loss function based on the loss between the category label and the true label; Determine a hybrid loss function based on the first loss function and the second loss function; The classification method is optimized by the hybrid loss function.
[0007] In some embodiments, determining a hybrid loss function based on the first loss function and the second loss function includes: Assigning a first weight to the first loss function and assigning a second weight to the second loss function; A hybrid loss function is determined based on the first loss function having a first weight and the second loss function having a second weight.
[0008] In some embodiments, the convolutional neural network includes at least two convolutional layers, and the first convolutional layer includes at least three convolution kernels of different scales for acquiring feature information with sufficient width from each of the local time periods.
[0009] In some embodiments, performing frequency statistics on all the generated sparse response vectors includes: All sparse response vectors are traversed, and the number of occurrences of each feature or feature combination in all local time periods is accumulated to form frequency statistics.
[0010] In some embodiments, the classifier comprises a support vector machine, a random forest, and / or a deep neural network.
[0011] In some embodiments, the step of inputting each of the extracted feature vectors into a fully connected layer further includes: inputting each of the extracted feature vectors into a fully connected layer, and performing sparsity control on the feature vectors to enhance the sparsity of the sparse response vectors.
[0012] The disclosed embodiment also provides a time series classification device based on a convolutional neural network optimized feature bag framework, comprising: An extraction unit is used to divide the time series data to be classified according to a preset sliding window size to form a plurality of local time periods; for each of the local time periods, a convolutional neural network is used to process it to extract a feature vector of the local time period; A generating unit, used for inputting each of the extracted feature vectors into a fully connected layer, and generating a corresponding sparse response vector through the transformation of a weight matrix and the nonlinear effect of an activation function; A statistical unit, used for performing frequency statistics on all the generated sparse response vectors, and constructing a characteristic frequency histogram of the time series based on the statistical results; The classification unit is used to use the feature frequency histogram as a representation of the time series and input it into a classifier for classification to obtain a category label of the time series.
[0013] An embodiment of the present disclosure further provides an electronic device, including a processor and a memory, wherein the memory stores computer program instructions that can be executed by the processor, and when the processor executes the computer program instructions, the method described in any one of the above items is implemented.
[0014] The embodiment of the present disclosure further provides a non-transitory computer-readable storage medium storing computer program instructions, wherein the computer program instructions implement the method steps described in any one of the above items when called and executed by a processor.
[0015] Compared with the related art, the above solution of the embodiment of the present application has at least one of the following beneficial effects: This application effectively captures the key information of the time series through local feature extraction and sparse response mapping, improves the accuracy and robustness of classification, and improves the classification accuracy.
[0016] The present application reduces data redundancy and the amount of computation required for subsequent processing, thereby improving the efficiency of the overall algorithm and reducing computational complexity through the design of sparse response vectors.
[0017] This application uses feature frequency histogram as the global representation of time series, which has better generalization performance and can cope with time series classification tasks in different fields and scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings: Figure 1 A schematic diagram of a time series classification method based on a convolutional neural network optimized feature bag framework provided in some embodiments of the present application; Figure 2 A schematic diagram of the structure of a time classification method based on a neural network optimized feature bag algorithm framework provided in some embodiments of the present application; Figure 3 A histogram provided for some embodiments of the present application; Figure 4 A block diagram of a time series classification device based on a convolutional neural network optimized feature bag framework provided in some embodiments of the present application; Figure 5 A schematic diagram of the structure of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0020] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two.
[0021] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0022] It should be understood that although the terms first, second, third, etc. may be used to describe in the embodiments of the present application, these should not be limited to these terms. These terms are only used to distinguish. For example, without departing from the scope of the embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.
[0023] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product 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 product or device. In the absence of more restrictions, the elements defined by the sentence "comprises a" do not exclude the presence of other identical elements in the product or device including the elements.
[0024] In technical fields such as finance, medical treatment, and industrial manufacturing that require high real-time processing of time data, in addition to emphasizing the speed of the classification algorithm, the requirements of real-time classification for the data set are also emphasized, that is, it is necessary to use this small time series for classification immediately after recording it. However, for time series with obvious time change trends, it is not necessarily possible to obtain all the characteristics of the complete time series in a short period of time. If the complete time series of this category shows completely different trends at different times, then each time series measured and recorded, even if it belongs to the same category, will show completely different characteristics. Directly training these data will cause the trained model to overfit, resulting in reduced recognition accuracy.
[0025] Based on this, this application proposes a multivariate time classification algorithm based on a neural network optimized feature bag algorithm framework, including using multi-scale convolution kernels to construct a convolution layer, combined with a sliding window, to extract feature vectors for each time period; using a fully connected layer to map the feature vector into a sparse response vector for an imaginary dictionary; performing frequency statistics on the sparse response vectors obtained for all time periods in the sample to obtain a feature frequency histogram; using the constructed feature frequency histogram as a representation of the sample and inputting it into a classifier for classification; and using a mixed loss of the sparse response vector loss and the classification loss for training.
[0026] This application uses the idea of traditional feature bags and focuses on the combination of differentiated features in samples in reverse to avoid the overfitting problem caused by excessive attention to the extraction of common features in neural networks; on the other hand, it uses the advantages of adaptive feature extraction of neural networks to make the extracted features more generalized and faster than SAX in traditional feature bag algorithms. Compared with pure neural network-based algorithms, this method solves the overfitting problem caused by excessive differences in similar samples, and compared with traditional feature bag algorithms, it solves the speed and generalization problems of feature extraction, which can achieve higher classification accuracy and running speed, and has good practical application prospects.
[0027] like Figure 1 As shown, some embodiments of the present application provide a time series classification method based on a convolutional neural network optimized feature bag framework, comprising the following steps: Step S102, dividing the time series data to be classified according to a preset sliding window size to form a plurality of local time periods; for each of the local time periods, processing it using a convolutional neural network to extract a feature vector of the local time period; Step S104, inputting each of the extracted feature vectors into a fully connected layer, and generating a corresponding sparse response vector through the transformation of the weight matrix and the nonlinear effect of the activation function; Step S106, performing frequency statistics on all the generated sparse response vectors, and constructing a characteristic frequency histogram of the time series based on the statistical results; Step S108: Use the feature frequency histogram as a representation of the time series and input it into a classifier for classification to obtain a category label of the time series.
[0028] The present application provides a multivariate time series classification method based on a neural network optimized feature bag algorithm framework. The method is applied to application scenarios such as finance, medical treatment, and industrial manufacturing that have high requirements for the immediacy of data processing. It aims to achieve efficient and accurate instant classification processing of time series data collected in real time.
[0029] Specifically, the method introduces a convolutional neural network (CNN) to replace the traditional symbolic aggregate approximation (SAX) method to extract more refined and efficient local features of time series samples. The convolutional neural network includes at least two convolutional layers, and the first convolutional layer includes at least three convolution kernels of different scales, which are used to obtain feature information with sufficient width from each local time period.
[0030] like Figure 2As shown, in step S102, local feature extraction of the time series is performed. First, the time series data is segmented according to a preset sliding window size, and the data in each window represents a local time period. Subsequently, the data in each window is processed using a convolutional neural network to extract a feature vector of the local time period.
[0031] Specific implementation methods include: Sliding window segmentation: According to the characteristics of the time series and classification requirements, set the appropriate window size and step size to perform sliding window segmentation on the time series.
[0032] Convolutional neural network processing: The data in each window is used as the input of CNN. The local features of the data are extracted in turn through multi-scale convolution kernels, and finally the feature vector of the window is output through a single convolution layer.
[0033] Since convolution operation is used for feature extraction, the local time period can be obtained by appropriately modulating the sliding step of the convolution kernel. In addition, in the process of building the convolution layer, multiple convolution kernels with multiple scales are used, and each convolution kernel is allowed to extract features from samples in turn according to the same time step. After that, the features extracted by the multiple convolution kernels are combined to obtain a new feature matrix. The two dimensions of the matrix are the number of time periods divided by the step length and the total number of features corresponding to the same time period obtained by multiple convolution kernels through a customized feature extraction method. After that, another convolution layer can be set to fuse the feature matrix, and the dimension remains unchanged.
[0034] In step S104, the feature vector is mapped to a sparse response vector, and the feature vectors of all local time periods extracted by CNN are further mapped to a sparse response vector through a fully connected layer, and the sparsity of the feature vector is controlled to enhance the sparsity of the sparse response vector. Sparsity helps to reduce redundant information and improve the efficiency of subsequent processing.
[0035] Specific implementation methods include: Fully connected layer mapping: Each feature vector is input into one or more fully connected layers, and the corresponding sparse response vector is generated through the transformation of the weight matrix and the nonlinear effect of the activation function.
[0036] Sparsity control: The sparsity of the response vector can be enhanced by using specific activation functions (such as ReLU variants or sigmoid) during training.
[0037] Specifically, for sparsity control, a feature dictionary obtained by various feature sets is preset first, and the so-called sparse response refers to the response to the preset dictionary.
[0038] First, define a preset dictionary to match the fully connected mapping layer. Assume that each class of samples has N feature bags, then the number of dictionaries is K*N, the number of categories. The feature bags in the dictionary are evenly distributed to each category, and the dictionary is in the form of: , Among them, K is the number of categories, each category has B feature bags, is the feature bag code, each The value of is [0,1].
[0039] Therefore, in the samples of category k, the fully connected mapping result of the feature vector X at each time step should be There are non-zero values in the value of All other values are 0.
[0040] Right now ,in .
[0041] definition is the weight of the fully connected layer, is the bias of the fully connected layer, and the complete formula is: , in, is the feature vector extracted from the i-th time step in the sample; is the sparse response of the dictionary corresponding to the vector, and the number of neurons in the fully connected layer is ; is the Sigmoid activation function.
[0042] like Figure 3 As shown, in step S106, feature frequency statistics and histogram generation are performed, and frequency statistics are performed on all sparse response vectors, that is, all sparse response vectors are traversed, and the number of times each feature or feature combination appears in all local time periods is accumulated to form frequency statistics, thereby constructing a feature frequency histogram of the sample. Figure 3 is an example of a feature frequency histogram corresponding to samples of each label in the dataset.
[0043] The specific implementation methods are as follows: Frequency statistics: traverse all sparse response vectors, count each feature that appears in them, record its frequency of occurrence, and obtain the feature histogram vector Hist of the sample. The statistical process is shown in the following formula , Histogram construction: Based on the statistical results, a feature frequency histogram of the sample is constructed. The horizontal axis of the histogram represents different features, and the vertical axis represents the frequency of occurrence of the corresponding features.
[0044] In step S108, classification and mixed loss training are performed, and the constructed feature frequency histogram is used as a representation of the sample and input into a classifier for classification. The classifier includes a support vector machine, a random forest and / or a deep neural network. The classifier outputs the category label of the time series according to the distribution characteristics of the feature frequency histogram. The training is performed using a mixed loss of the sparse response vector loss and the classification loss.
[0045] The specific implementation methods are as follows: Classifier training: In the classification stage, the constructed feature frequency histogram is used as input to make category predictions through the classifier. A hybrid loss function can be used during training. This function combines two key loss terms: one is based on the loss between the sparse response vector and the predefined expected label; the other is based on the loss between the final classification result and the true label. Appropriate weights are assigned to these two loss terms, and the total loss is minimized during training, so that the model can learn effective feature representations and classification boundaries at the same time.
[0046] Classification prediction: During the testing or application phase, repeat the above steps for new time series samples, construct their feature frequency histogram, and input it into the trained classifier for category prediction.
[0047] The main purpose of the classification module is to map the input feature vector to a predetermined category space to achieve multi-classification. To this end, this application adopts a two-layer fully connected network structure, the first layer is responsible for further abstraction and transformation of features, and the second layer directly outputs the predicted probability of each category. This design ensures sufficient model complexity to capture complex data patterns, while maintaining a relatively simple structure for easy training and optimization.
[0048] make is the hidden layer weight, is the hidden layer bias, is the output layer weight, is the hidden layer bias, where is the number of neurons in the hidden layer, Equal to the number of categories K. Then, for a time series sample, after being processed by the feature extraction module and the feature quantization and statistics module, the feature histogram vector Hist of the sample is obtained, and the predicted classification result of the sample is The calculation process is as follows: , , in, is the hidden layer output of the feature histogram Hist of the input sample, is the softmax activation function.
[0049] In some embodiments, the following steps are also included: constructing a first loss function based on the loss between the generated sparse response vector and a predefined expected label; constructing a second loss function based on the loss between the category label and the true label; determining a hybrid loss function based on the first loss function and the second loss function; and optimizing the classification method through the hybrid loss function.
[0050] In some embodiments, determining a hybrid loss function based on the first loss function and the second loss function includes: assigning a first weight to the first loss function and assigning a second weight to the second loss function; determining a hybrid loss function based on the first loss function with the first weight and the second loss function with the second weight.
[0051] The details are as follows: In order to make the network more capable of meeting the requirements of this application, a loss function is set here as a constraint. For each mapping result Y of X, an expected label R is set. The MSE loss between the mapping result Y and the expected label R is calculated, that is, Figure 2 The loss1 in is optimized to constrain the training direction of the module. The calculation formula of Loss1 is as follows: , in is the total number of samples, one sample can extract feature vectors, corresponding to sparse response vectors, each feature vector is considered as a new sample, so the total number of new samples here is , use the subscript j to count the total number, j is a natural number.
[0052] In the classification work, this application uses cross entropy loss, that is, Figure 2 The Loss2 in is used to train the network. The calculation formula of Loss2 is as follows: , Where K is the total number of categories, is the unique hot encoding representation of the true label. For each sample, only the kth element is 1 (indicating that the sample belongs to k class), and the rest are 0. The model predicts that k The probability of the class.
[0053] We use a mixed loss to train the entire network, , Among them, a and b are the weights of the two losses, which need to be adjusted according to the experiment.
[0054] Through the use of back-propagation and optimizers, the parameters of the model are updated so that it gradually converges to more accurate target detection capabilities.
[0055] This application effectively captures the key information of the time series through local feature extraction and sparse response mapping, improves the accuracy and robustness of classification, and improves the classification accuracy.
[0056] The present application reduces data redundancy and the amount of computation required for subsequent processing, thereby improving the efficiency of the overall algorithm and reducing computational complexity through the design of sparse response vectors.
[0057] This application uses feature frequency histogram as the global representation of time series, which has better generalization performance and can cope with time series classification tasks in different fields and scenarios.
[0058] The disclosed embodiment also provides a time series classification device based on a convolutional neural network and a feature bag framework, which is used to implement the method steps described in the above embodiment. The explanation based on the same name meaning is the same as that of the above embodiment, and has the same technical effect as that of the above embodiment, which will not be repeated here. Figure 4 As shown, the classification device comprises: The extraction unit 402 is used to divide the time series data to be classified according to a preset sliding window size to form a plurality of local time periods; for each of the local time periods, a convolutional neural network is used to process it to extract a feature vector of the local time period; A generating unit 404 is used to input each of the extracted feature vectors into a fully connected layer, and generate a corresponding sparse response vector through the transformation of the weight matrix and the nonlinear effect of the activation function; A statistical unit 406 is used to perform frequency statistics on all the generated sparse response vectors, and construct a characteristic frequency histogram of the time series based on the statistical results; The classification unit 408 is used to use the feature frequency histogram as a representation of the time series and input it into a classifier for classification to obtain a category label of the time series.
[0059] like Figure 5 As shown, this embodiment provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method steps described in the above embodiment.
[0060] An embodiment of the present disclosure provides a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the method steps described in the above embodiment.
[0061] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0062] like Figure 5 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 to a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0063] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0064] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0065] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0066] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0067] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0068] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0069] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
Claims
1. A time series classification method based on convolutional neural network optimized feature bag framework, characterized by The following steps are involved: The time series data to be classified is divided according to a preset sliding window size to form a plurality of local time periods; for each of the local time periods, a convolutional neural network is used to process it to extract a feature vector of the local time period; Input each of the extracted feature vectors into a fully connected layer, and generate a corresponding sparse response vector through the transformation of the weight matrix and the nonlinear effect of the activation function; Performing frequency statistics on all the generated sparse response vectors, and constructing a characteristic frequency histogram of the time series based on the statistical results; The feature frequency histogram is used as a representation of the time series and input into a classifier for classification to obtain a category label of the time series.
2. The method according to claim 1, characterized in that The following steps are also included: Constructing a first loss function based on the loss between the generated sparse response vector and a predefined expected label; Constructing a second loss function based on the loss between the category label and the true label; Determine a hybrid loss function based on the first loss function and the second loss function; The classification method is optimized by the hybrid loss function.
3. The method according to claim 2, characterized in that The determining of a hybrid loss function based on the first loss function and the second loss function comprises: Assigning a first weight to the first loss function and assigning a second weight to the second loss function; A hybrid loss function is determined based on the first loss function having a first weight and the second loss function having a second weight.
4. The method according to claim 1, characterized in that: The convolutional neural network includes at least two convolutional layers, and the first convolutional layer includes at least three convolution kernels of different scales, which are used to obtain feature information with sufficient width from each local time period.
5. The method according to claim 1, characterized in that The performing frequency statistics on all the generated sparse response vectors includes: All sparse response vectors are traversed, and the number of occurrences of each feature or feature combination in all local time periods is accumulated to form frequency statistics.
6. The method according to claim 1, characterized in that The classifiers include support vector machines, random forests and / or deep neural networks.
7. The method according to claim 1, characterized in that The step of inputting each of the extracted feature vectors into a fully connected layer further includes: inputting each of the extracted feature vectors into a fully connected layer, and performing sparsity control on the feature vectors to enhance the sparsity of the sparse response vectors.
8. A time series classification device based on a convolutional neural network optimized feature bag framework, characterized in that include: An extraction unit is used to divide the time series data to be classified according to a preset sliding window size to form a plurality of local time periods; for each of the local time periods, a convolutional neural network is used to process it to extract a feature vector of the local time period; A generating unit, used for inputting each of the extracted feature vectors into a fully connected layer, and generating a corresponding sparse response vector through the transformation of a weight matrix and the nonlinear effect of an activation function; A statistical unit, used for performing frequency statistics on all the generated sparse response vectors, and constructing a characteristic frequency histogram of the time series based on the statistical results; The classification unit is used to use the feature frequency histogram as a representation of the time series and input it into a classifier for classification to obtain a category label of the time series.
9. An electronic device, comprising a processor and a memory, characterized in that: The memory stores computer program instructions that can be executed by the processor, and when the processor executes the computer program instructions, the method according to any one of claims 1-7 is implemented.
10. A non-transitory computer-readable storage medium, characterized in that: Computer program instructions are stored, and when the computer program instructions are called and executed by a processor, the method steps according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Voice recognition method and device, computer equipment and computer readable storage medium
CN110265002A
Conversion method of brain function network
CN111882622A
Vehicle re-identification method and system based on depth features and sparse metric projection
CN112699829A
Object activity identification method and device based on channel state information
CN117951614A