Multivariable time sequence clustering method and device based on binary dual clustering factors and medium
By preprocessing data and calculating binary dual clustering factors, the problems of outlier sensitivity and inaccurate cluster relationships in multivariate time series clustering are solved, thereby improving the accuracy and performance of clustering.
Patent Information
- Application Number
- CN202511030309.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-11-21
AI Technical Summary
Existing multivariate time series clustering methods are sensitive to outliers and cannot accurately characterize cluster relationships, resulting in poor clustering performance.
By preprocessing data (quantile outlier removal and Z-score normalization), data augmentation (uniform random sampling with replacement), and calculating binary dual clustering factors, a distance matrix is constructed to predict the optimal number of clusters, thereby improving clustering accuracy.
It reduces the impact of noise and dimensional differences, can more accurately describe cluster relationships, and improves the clustering performance of multivariate time series.
Smart Images

Figure CN120995138A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of time series clustering, in particular to a multi-variable time series clustering method based on binary dual clustering factors, a device and a medium. BACKGROUND
[0002] Multi-variable Time Series (MTS) widely exists in the fields of financial analysis, biological medicine, industrial manufacturing and meteorological transportation, and is of great significance for stock price prediction and risk management, physiological signal monitoring and disease diagnosis, energy consumption analysis and traffic flow control. How to accurately realize the clustering analysis of multi-variable time series is an important basic means for the above applications. The working principle of the traditional MTS clustering method is mainly based on the multi-feature parameters of the original data, and a clustering algorithm is used to divide the time series to be evaluated into different clusters, so as to complete the division of the potential class relationship. Since the clustering performance of the clustering algorithm usually depends on the quantification of the distance relationship or the similarity relationship between the samples to be clustered, how to accurately describe the distance measurement of the MTS feature parameters is the key to improving the clustering performance.
[0003] The current MTS feature parameter clustering mainly relies on Euclidean distance, cosine distance and Pearson distance, etc. However, the irregular multi-variable time sequence characteristics of MTS data make it impossible to accurately describe the cluster relationship between the sequences to be clustered by using the above distance measurements. On the one hand, MTS data usually has abnormal values such as jumps caused by incomplete measurement or environmental noise, and the above distance measurements are usually sensitive to abnormal values. On the other hand, the distance relationship between samples defined by the above distance measurements is usually only the difference in feature values, and cannot analyze the class difference caused by the multi-variable time sequence characteristics of MTS data itself, that is, the sample difference described by these distance measurements does not necessarily coincide with the real class relationship, which may cause local misclustering. SUMMARY
[0004] In view of the problem that the distance measurement used in the current MTS data clustering is sensitive to abnormal values and cannot accurately describe the cluster relationship between different sample sequences, resulting in poor clustering performance, the present application provides a multi-variable time series clustering method based on binary dual clustering factors, a device and a medium, to improve the accuracy of predicting the unknown potential cluster number based on the multi-variable parameter characteristics of MTS data, and improve the clustering accuracy of complex MTS data.
[0005] In a first aspect, the present application provides a multi-variable time series clustering method based on binary dual clustering factors, comprising: performing data preprocessing on the MTS data to be clustered; The MTS data after data preprocessing is subjected to data enhancement to obtain a plurality of sub-sequences; The sub-sequences are subjected to binary dual clustering, and a binary dual clustering factor is calculated based on the clustering result; A distance matrix is obtained based on the binary dual clustering factor, and the optimal clustering cluster number is predicted based on the distance matrix; Based on the optimal clustering cluster number and the distance matrix, a final MTS data clustering result is output.
[0006] In a preferred embodiment, the data preprocessing of the MTS data to be clustered comprises: Data cleaning: by counting the quantiles of each dimension of the multivariate feature parameters, the MTS data is subjected to outlier rejection based on the quantiles; Normalization: using Z-score normalization method, the MTS data is mapped to the range of [-1, 1].
[0007] In a preferred embodiment, the data preprocessing of the MTS data to be clustered comprises: Using uniform random sampling with replacement, a sub-sequence capable of approximately reflecting the change rule of the original MTS data is intercepted and generated.
[0008] In a preferred embodiment, the binary dual clustering of the sub-sequences and the calculation of the binary dual clustering factor based on the clustering result comprise: Let any two original sequences in the MTS data to be clustered be The corresponding sub-sequence set is represented as , from the original sequences The corresponding sub-sequences are subjected to binary dual clustering:
[0009] Wherein, represents a hierarchical clustering function; represents the input clustering cluster number before clustering; represents the clustering result of the two original sequences , and takes the value of 0 or 1; The similarity of the original sequences is calculated based on the clustering result to obtain a binary dual clustering factor describing the original sequences , comprising: If the number of the clustering results of the corresponding sub-sequences of the original sequences are both more than 50%, the binary dual clustering factor is calculated as follows:
[0010] If the number of the clustering results of the corresponding sub-sequences of the original sequences If the number of different clustering results for the corresponding subsequences all exceeds 50%, then the binary dual clustering factor is calculated as follows:
[0011] in, Represents the original sequence binary dual clustering factor, Indicates origin from the original sequence The number of samples whose subsequence clustering result is 0. Indicates origin from the original sequence The number of samples whose subsequence clustering result is 1. Indicates origin from the original sequence The number of samples whose subsequence clustering result is 0. Indicates origin from the original sequence The number of samples whose subsequence clustering result is 1.
[0012] In a preferred embodiment, obtaining the distance matrix based on the binary dual clustering factor includes: MTS data of un-clustered groups were obtained based on binary dual clustering factors. Distance matrix Distance matrix Each element in is .
[0013] In a preferred embodiment, the step of predicting the optimal number of clusters based on the distance matrix includes: Calculate the contour coefficient based on the distance matrix: ;in, Represents a sequence and the average distance between all other sequences classified in the same cluster, Represents a sequence The average distance between the sequence and all sequences in the other most similar cluster. and Based on the distance matrix get; Predicting the optimal number of clusters based on the distance matrix and silhouette coefficient: Given the maximum possible number of clusters in a given experiment. Based on the distance matrix The clustering results are output by implementing a hierarchical clustering algorithm; let This indicates that when the input number of clusters is The corresponding target cluster partitioning at that time, then This indicates that the clustering results and distance matrix are output at this point. The silhouette coefficients were calculated jointly; then the input cluster numbers were used to... Gradually increase from 2 to to calculate the silhouette coefficient of the corresponding clustering result When the silhouette coefficient is maximum, the input cluster number generating the clustering result is selected as the optimal cluster number.
[0014] In a preferred embodiment, if the last time the value corresponding to the silhouette coefficient is less than the current time the value corresponding to the silhouette coefficient, the input cluster number of the next time is increased, otherwise it is decreased.
[0015] In a preferred embodiment, the final MTS data clustering result is represented as:
[0016] wherein, represents the final MTS data clustering result, represents the hierarchical clustering function, and n represents the optimal cluster number.
[0017] In a second aspect, the present application provides an electronic device, comprising: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor, by executing the instructions stored in the memory, performs the method described above.
[0018] In a third aspect, the present application provides a computer readable storage medium for storing instructions, when the instructions are executed, the method described above is implemented.
[0019] In summary, due to the adoption of the above technical solutions, the present application has the following advantages: The present application realizes the preprocessing of the multivariate time series feature parameters by the outlier elimination based on quantile and the data normalization based on Z-score, reduces the influence of noise and dimension difference in the data on clustering, constructs a new distance measurement between the sequences to be clustered based on the proposed binary dual clustering factor, and effectively improves the problem that the traditional distance measurement is easily affected by outliers. Meanwhile, the distance between samples constructed based on the pre-clustering can more accurately describe the real class cluster relationship compared with the traditional distance measurement, thereby improving the clustering performance of complex MTS data. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1A flow chart of a multivariate time series clustering method based on binary dual clustering factors is provided for the embodiment of the present application.
[0021] Figure 2 A comparison chart of different distance metrics predicting the optimal cluster number is provided for the embodiment of the present application.
[0022] Figure 3 A comparison chart of different distance metrics clustering indicators NMI is provided for the embodiment of the present application.
[0023] Figure 4 A distance matrix visualization result chart corresponding to different distance metrics is provided for the embodiment of the present application.
[0024] Figure 5 A structural schematic diagram of an electronic device is provided for the embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations.
[0026] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative labor are within the scope of protection of the present application.
[0027] As shown in the drawings, Figure 1 The embodiments of the present application provide a multivariate time series clustering method based on binary dual clustering factors, which comprises the following steps: S100, data preprocessing is performed on the MTS data to be clustered; The data preprocessing comprises data cleaning and normalization processing, which are specifically as follows: (1) The data cleaning is performed by counting the quantile of each dimension of the multivariate feature parameters, and the abnormal values of the MTS data are removed based on the quantile, for example, the abnormal values far greater than the quantile interval in the measured values are removed.
[0028] Suppose that the feature parameters corresponding to the MTS data of a typical class cluster are represented in a sequence list as follows:
[0029] Among them, N represents the sample number of the MTS data, This represents the multivariate time-series feature parameters corresponding to a single sample. This represents the feature dimension of MTS data. It uses a feature parameter of a certain dimension. For example, the outlier detection method is as follows:
[0030] in, They represent calculations respectively. The third and first quartiles of this feature dimension Indicates the interquartile range, which reflects This feature represents the distribution range of the middle 50% of the data. This indicates an outlier for the corresponding feature parameter; that is, if a sample corresponds to an outlier... Feature parameter values exceeding If an outlier is found, it will be removed before further processing. Similarly, outliers can be filtered out by performing similar processing on other feature dimensions.
[0031] (2) The normalization mentioned above takes into account the dimensional differences between the feature parameters of the samples. In order not to affect the subsequent clustering, the Z-score normalization method is used to map the MTS data to the range of [-1, 1]. Similarly, the feature parameters are normalized. For example, the specific details are as follows:
[0032] in, They represent Corresponding features The mean and standard deviation of the features. Similarly, normalization can be achieved by performing similar processing on other feature dimensions.
[0033] S200 performs data augmentation on the preprocessed MTS data to obtain multiple subsequences.
[0034] Considering that the augmented MTS data needs to reflect the multivariate time-series patterns in the original MTS data, this embodiment of the invention utilizes time series slicing to generate subsequences for data augmentation. The main purpose of this strategy is to use bootstraping sampling, i.e., uniform random sampling with replacement, to extract and generate subsequences that approximately reflect the original MTS data. Subsequences exhibiting a pattern of change, assuming the number of sampled sequences equals the window length. Specifically, it is expressed as follows:
[0035] in, Represents a sequence The sub-sequence obtained after uniform random sampling with replacement. In the present application, the sampling number is 100.
[0036] S300, binary pair clustering is performed on the sub-sequence, and a binary pair clustering factor is calculated based on the clustering result to evaluate the similarity of the original sequence.
[0037] Let any two original sequences in the MTS data to be clustered be The corresponding sub-sequence set is represented as , wherein the length of the sub-sequence is the window length First, the above sub-sequence is pre-clustered. The purpose of pre-clustering is to use a clustering algorithm to explore the distance relationship between the original sequences , that is, by performing binary pair clustering on the sub-sequences corresponding to the original sequences , obtaining the clustering result, and calculating the binary pair clustering factor based on the clustering result. The specific implementation is as follows:
[0038] , wherein represents a hierarchical clustering function. As a typical clustering algorithm, the algorithm represents the hierarchical structure and similarity relationship between the sub-sequences to be clustered by constructing a hierarchical clustering tree. represents the input cluster number of pre-clustering. Since the above sub-sequences to be clustered are all from , there are at most two potential clusters. represents the clustering result of the two original sequences , which is 0 or 1, that is, the sub-sequence label is either 0 or 1. The same label represents that the sub-sequences belong to the same cluster. According to the above result, a pre-clustering result table can be constructed, as shown in Table 1.
[0039] Table 1, pre-clustering result table:
[0040] , wherein represents the number of samples whose sub-sequence clustering result from the original sequence is 0, represents the number of samples whose sub-sequence clustering result from the original sequence is 1, represents the number of samples whose sub-sequence clustering result from the original sequence is 0, represents the number of samples whose sub-sequence clustering result from the original sequence is 1.
[0041] Then, the clustering result in the pre-clustering result analysis table is used to calculate the clustering result of the original sequence The similarity is used to obtain a description of the original sequence. The binary dual clustering factor is as follows, if the original sequence The number of corresponding subsequences belonging to the same cluster (same pre-clustering results) all exceeds 50%, that is... or , then represents the original sequence at this time. With high similarity, the binary dual clustering factor is calculated as follows:
[0042] If the original sequence The number of corresponding subsequences belonging to heterogeneous clusters (different pre-clustering results) all exceeded 50%, that is... or , then represents the original sequence at this time. With low similarity, the binary dual clustering factor is calculated as follows:
[0043] Based on the above method, pre-clustering can be used to process two original sequences. Calculation of binary dual clustering factors.
[0044] S400 obtains the distance matrix based on the binary dual clustering factor, and predicts the optimal number of clusters based on the distance matrix.
[0045] The binary dual clustering factor can be used to obtain the MTS data of the clusters to be clustered. Distance matrix Distance matrix Each element in is This metric incorporates cluster relationships into the distance measurement of samples, making similar sequences closer together and different sequences farther apart. It provides a more granular description of the distance relationships between samples, thereby improving subsequent clustering performance.
[0046] This invention combines the internal clustering metric silhouette coefficient (SI) with a heuristic search strategy to predict the optimal number of clusters. The silhouette coefficient (SI) combines the cohesion and separation of the clustering results, analogous to intra-cluster distance and inter-cluster distance, and evaluates clustering performance by comprehensively measuring the similarity of a sample to its own cluster compared to other clusters.
[0047]
[0048] in, Represents a sequence and the average distance between all other sequences classified in the same cluster, Represents a sequence and the average distance between all sequences in another cluster most similar to it, which can be obtained according to the distance matrix , the greater the value, the better the quality of clustering, that is, the more compact within the class, and the more sparse between the classes.
[0049] In the process of determining the optimal cluster number, the maximum possible cluster number in a certain experiment is given The clustering result is output by implementing the hierarchical clustering algorithm. Let represent the target cluster division when the input cluster number is , and represent the profile coefficient calculated by the output clustering result and the distance matrix at this time. Then, the input cluster number is gradually increased from 2 to to calculate the profile coefficient of the corresponding clustering result, and when the profile coefficient reaches the maximum value, the input cluster number that generates the clustering result is selected as the optimal cluster number. In particular, if the profile coefficient corresponding to the value of the last time is less than the profile coefficient corresponding to the value of this time , the input cluster number of the next time is increased, and vice versa. The optimal cluster number can be specifically represented as:
[0050] S500, based on the optimal cluster number and the distance matrix, the final MTS data clustering result is output.
[0051] Suppose the distance matrix of the sequence set of the MTS data to be clustered is , and the optimal cluster number is , then the final MTS data clustering result is represented as:
[0052] , wherein represents the final MTS data clustering result, represents the hierarchical clustering function.
[0053] In order to prove the effectiveness of the multivariate time series clustering method based on the binary dual clustering factor of the present application, numerical simulation experiments are carried out according to Figure 1The processing flow of the binary dual clustering factor-based multivariate time series clustering method is shown. The simulation adopts common electromagnetic target signals with multivariate time sequence characteristics, and 10 types of targets are preset, wherein the inter-pulse parameter variation characteristics are respectively RF (Radio Frequency, pulse carrier frequency) fixed / group variation, the value range is 9500MHz-9900MHz, PW (Pulse Width, pulse width) fixed / group variation, the value range is 0.5us-6us, and PRI (Pulse Repetition Interval, pulse repetition interval) fixed / group variation, the value range is 6us-100us. The experimental hardware platform is: Intel(R) Core(TM) i7-12700H CPU 4.70GHz, 16GB RAM, and the software platform is: python3.9.
[0054] Figure 2 The results of class cluster number prediction based on different distance metrics are given. According to different distance metrics, the distance matrix of the simulation data is calculated, the hierarchical clustering is used as the benchmark algorithm, the predefined cluster number is gradually increased from 2 to 15, and the change trend of SI in this process is evaluated. When the SI reaches the maximum value, the corresponding predefined cluster number is the prediction result. It can be seen that, compared with Euclidean distance ( ), cosine distance ( ) and Pearson distance ( ), the clustering result based on the binary dual clustering factor accurately predicts the class cluster number of the simulation data set, that is .
[0055] Figure 3 The clustering results of different distance metrics are given. Based on the real clustering labels of the simulation data, the distance matrix of the simulation data and its clustering result when the real class cluster number is 10 are calculated according to different distance metrics, and the typical external index NMI (Normalized Mutual Information, normalized mutual information) is used for measurement. It can be seen that for the simulation data, the binary dual clustering factor proposed in the application can more accurately reflect the intra-class relationship and inter-class relationship, so as to realize higher NMI value and more consistent clustering with the real label.
[0056] Figure 4The distance matrix visualization results of different distance metrics are given. In order to deeply analyze that the binary dual clustering factor is more accurate in describing the relationship between samples when clustering inter-pulse parameters, the distance matrix of the simulation data is visualized by using a heat map. Three kinds of sample sequences with different inter-pulse parameters are extracted from the simulation data, including (1) RF group variable, other parameters fixed; (2) RF / PW group variable, other parameters fixed; (3) RF / PW / PRI group variable; then the distance matrix is drawn based on different distance metrics, and the heat map is used for visualization. It can be seen that the binary dual clustering factor proposed in the application can more accurately describe the inter-class difference and intra-class similarity of the pulse sequence to be clustered, thereby showing more compact intra-class distance and clearer inter-class distance, which proves the interpretability of the proposed method from the side.
[0057] In summary, the method proposed in the application can realize effective clustering of various inter-pulse parameter sequences, and proves the effectiveness of the application.
[0058] Based on the same technical concept, the electronic device provided by the embodiments of the application can implement the multivariate time series clustering method based on the binary dual clustering factor provided by the above-mentioned embodiments of the application. In one embodiment, the electronic device can be a server, a terminal device or other electronic device. As shown in the Figure 5 The electronic device can include: At least one processor and a memory connected to the at least one processor, and the specific connection medium between the processor and the memory in the embodiments of the application is not limited, Figure 5 In the embodiment, the connection between the processor and the memory is taken as an example of connection through a bus. The bus is represented by a thick line in Figure 5 The connection mode between other components is only schematically illustrated and is not limited. The bus can be divided into an address bus, a data bus, a control bus, etc. For convenience of representation, Figure 5 In the embodiment, only one thick line is used to represent the bus, but it does not mean that there is only one bus or only one type of bus. Alternatively, the processor can also be called a controller, and the name is not limited.
[0059] In the embodiments of the application, the memory stores instructions executable by the at least one processor, and the at least one processor can execute the foregoing multivariate time series clustering method based on the binary dual clustering factor by executing the instructions stored in the memory.
[0060] The processor is the control center of the device, can connect all parts of the control device through various interfaces and lines, and can perform overall monitoring on the device by running or executing the instructions stored in the memory and calling the data stored in the memory. Various functions and processing data of the device.
[0061] In an alternative design, the processor can include one or more processing units, and the processor can integrate an application processor and a modem processor, where the application processor mainly processes operating systems, user interfaces, and applications, and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor can also not be integrated into the processor. In some embodiments, the processor and the memory can be implemented on the same chip, and in some embodiments, they can also be implemented on separate chips, respectively.
[0062] The processor can be a general purpose processor, such as a CPU, a digital signal processor, an application specific integrated circuit, a field programmable gate array, or other programmable logic device, a discrete gate or transistor logic component, a discrete hardware component, and can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general purpose processor can be a microprocessor or any conventional processor. The steps of a method for clustering multivariate time series based on binary dual clustering factors disclosed in the embodiments of the present application can be directly embodied as execution completed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0063] The memory, as a non-volatile computer readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card type memory, random access memory (RAM), static random access memory (SRAM), programmable read only memory (PROM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. The memory can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. The memory in the embodiments of the present application can also be a circuit or any other device capable of realizing a storage function, used for storing program instructions and / or data.
[0064] The processor can be programmed to implement the method of the embodiments described above. How to program the processor is well known to those skilled in the art, and thus will not be described here.
[0065] Based on the same inventive concept, the embodiments of the present application also provide a storage medium storing computer instructions, which, when executed on a computer, cause the computer to perform the method of clustering multivariate time series based on binary dual clustering factors as discussed above.
[0066] In some optional embodiments, the embodiments of the present application also provide various aspects of the method of clustering multivariate time series based on binary dual clustering factors in the form of a program product, which includes program codes for causing the control device to perform the steps of the method of clustering multivariate time series based on binary dual clustering factors according to the embodiments of the present application described above in the specification when the program product is executed on the device.
[0067] It should be noted that although several units or sub-units of the apparatus are mentioned in the foregoing detailed description, such division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into units for embodiment. In addition, although the operations of the method of the present application are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in that particular order, or that all of the illustrated operations must be performed to achieve the desired result. Additionally or alternatively, certain steps can be omitted, a plurality of steps can be combined into one step, and / or one step can be divided into a plurality of steps.
[0068] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0069] The present application is described in reference to the flowchart and / or block diagrams of the methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart and / or block diagrams, and combinations of blocks in the flowchart and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing device or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.
[0070] The program code can be implemented in any combination of one or more programming languages including an object oriented programming language such as Java, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. The user computing device can be a mobile device, a desktop computer, a server, a handheld device, a laptop computer, a personal digital assistant, a cellular telephone, a smart phone, a web appliance, a network appliance, a wide area network appliance, a local area network appliance, or a processor of any of the above devices or appliances.
[0071] In the case of the remote computing device, the remote computing device can be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to the Internet through an Internet Service Provider (ISP). The user computing device can be a mobile device, a desktop computer, a server, a handheld device, a laptop computer, a personal digital assistant, a cellular telephone, a smart phone, a web appliance, a network appliance, a wide area network appliance, a local area network appliance, or a processor of any of the above devices or appliances.
[0072] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.
[0073] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.
[0074] The above merely provides the preferred embodiments of the present application, and is not used to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the principles and technical scope of the present application shall fall into the scope of the present application.
Claims
1. A multivariate time series clustering method based on binary dual clustering factors, characterized in that, include: Perform data preprocessing on the MTS data to be clustered; Data augmentation was performed on the preprocessed MTS data to obtain multiple subsequences; Perform binary dual clustering on the subsequences and calculate the binary dual clustering factor based on the clustering results; The distance matrix is obtained based on the binary dual clustering factor, and the optimal number of clusters is predicted based on the distance matrix. The final MTS data clustering results are output based on the optimal number of clusters combined with the distance matrix.
2. The multivariate time series clustering method based on binary dual clustering factors according to claim 1, characterized in that, The data preprocessing of the MTS data to be clustered includes: Data cleaning: Outliers in MTS data are removed based on the quantiles of each dimension of multivariate feature parameters. Normalization: The MTS data is mapped to the range [-1, 1] using the Z-score normalization method.
3. The multivariate time series clustering method based on binary dual clustering factors according to claim 1, characterized in that, The process of data augmentation on the preprocessed MTS data yields multiple sub-sequences, including: Uniform random sampling with replacement is used to extract subsequences that can approximately reflect the variation patterns of the original MTS data.
4. The multivariate time series clustering method based on binary dual clustering factors according to claim 1, characterized in that, The paired sequences are subjected to binary dual clustering, and the binary dual clustering factor is calculated based on the clustering results, including: Suppose there are any two original sequences in the MTS data to be clustered. The corresponding set of subsequences is represented as For the original sequence Binary dual clustering is performed on the corresponding subsequences: in, This represents a hierarchical clustering function; This represents the number of input clusters for the pre-clustering; Represents two original sequences The clustering result takes a value of 0 or 1; The original sequence was calculated based on the clustering results. The similarity is used to obtain a description of the original sequence. The binary dual clustering factors include: If the original sequence If the number of identical clustering results for the corresponding subsequences exceeds 50%, then the binary dual clustering factor is calculated as follows: If the original sequence If the number of different clustering results for the corresponding subsequences all exceeds 50%, then the binary dual clustering factor is calculated as follows: in, Represents the original sequence binary dual clustering factor, Indicates origin from the original sequence The number of samples whose subsequence clustering result is 0. Indicates origin from the original sequence The number of samples whose subsequence clustering result is 1. Indicates origin from the original sequence The number of samples whose subsequence clustering result is 0. Indicates origin from the original sequence The number of samples whose subsequence clustering result is 1.
5. The multivariate time series clustering method based on binary dual clustering factors according to claim 4, characterized in that, The method for obtaining the distance matrix based on the binary dual clustering factor includes: MTS data of un-clustered groups were obtained based on binary dual clustering factors. Distance matrix Distance matrix Each element in is .
6. The multivariate time series clustering method based on binary dual clustering factors according to claim 5, characterized in that, The method of predicting the optimal number of clusters based on the distance matrix includes: Calculate the contour coefficient based on the distance matrix: ;in, Represents a sequence and the average distance between all other sequences classified in the same cluster, Represents a sequence The average distance between the sequence and all sequences in the other most similar cluster. and Based on the distance matrix get; Predicting the optimal number of clusters based on the distance matrix and silhouette coefficient: Given the maximum possible number of clusters in a given experiment. Based on the distance matrix The clustering results are output by implementing a hierarchical clustering algorithm; let This indicates that when the input number of clusters is The corresponding target cluster partitioning at that time, then This indicates that the clustering results and distance matrix are output at this point. The silhouette coefficients were calculated jointly; then the input cluster numbers were used to... Gradually increase from 2 to To calculate the silhouette coefficient of the corresponding clustering results When the profile coefficient When the value reaches its maximum, select the input cluster number to generate the clustering result. As the optimal number of clusters.
7. The multivariate time series clustering method based on binary dual clustering factors according to claim 6, characterized in that, If last time The profile coefficient corresponding to the value is less than that of the current time. The silhouette coefficient corresponding to the value determines the number of clusters in the next input. Increase, and vice versa.
8. The multivariate time series clustering method based on binary dual clustering factors according to claim 6, characterized in that, The final MTS data clustering results are represented as follows: in, This represents the final MTS data clustering result. This represents a hierarchical clustering function. This represents the optimal number of clusters.
9. An electronic device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which executes the instructions stored in the memory to perform the method as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store instructions that, when executed, cause the method as described in any one of claims 1-8 to be implemented.