In recent years, with the development of machine learning, especially after the rise of deep learning, time series clustering has been proven to effectively provide useful information in cloud computing and big data. However, many modern clustering algorithms are difficult to mine the complex features of time series, which is important for further analysis. Convolutional neural network provides powerful feature extraction capabilities and has excellent performance in classification tasks, but it is hard to be applied to clustering. Therefore, a similarity measurement method based on convolutional neural networks is proposed. This algorithm converts the number of output changes of the convolutional neural network in the same direction into the similarity of time series, so that the convolutional neural network can mine unlabeled data features in the clustering process. Especially by preferentially collecting a small amount of high similarity data to create labels, a classification algorithm based on the convolutional neural network can be used to assist clustering. The effectiveness of the proposed algorithm is proved by extensive experiments on the UCR time series datasets, and the experimental results show that its superior performance than other leading methods. Compared with other clustering algorithms based on deep networks, the proposed algorithm can output intermediate variables, and visually explain the principle of the algorithm. The application of financial stock linkage analysis provides an auxiliary mechanism for investment decision-making. INDEX TERMS time series, clustering, convolutional neural networks, similarity measurement