CN110599556A - Method for converting time sequence into image based on improved recursive graph - Google Patents

Method for converting time sequence into image based on improved recursive graph Download PDF

Info

Publication number
CN110599556A
CN110599556A CN201910836011.6A CN201910836011A CN110599556A CN 110599556 A CN110599556 A CN 110599556A CN 201910836011 A CN201910836011 A CN 201910836011A CN 110599556 A CN110599556 A CN 110599556A
Authority
CN
China
Prior art keywords
matrix
dimensional
recursive
converting
formula
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN201910836011.6A
Other languages
Chinese (zh)
Inventor
齐本胜
张衡
贾澜
苗红霞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changzhou Campus of Hohai University
Original Assignee
Changzhou Campus of Hohai University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changzhou Campus of Hohai University filed Critical Changzhou Campus of Hohai University
Priority to CN201910836011.6A priority Critical patent/CN110599556A/en
Publication of CN110599556A publication Critical patent/CN110599556A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a method for converting a time sequence into an image based on an improved recursive graph, which converts time sequence data into a two-dimensional texture image by using the improved recursive graph and comprises the following steps: intercepting a one-dimensional time sequence signal with a proper length from original data, and converting the one-dimensional time sequence signal into a two-dimensional phase space track; calculating a recursion matrix R by using the improved RP formula, and obtaining a color two-dimensional texture image through the recursion matrix R; and carrying out gray processing on the color two-dimensional texture image to obtain a final two-dimensional texture image. The present invention improves the recursion map by eliminating the threshold processing step and adding a graying process.

Description

Method for converting time sequence into image based on improved recursive graph
Technical Field
The invention belongs to the field of time series signal data processing, and relates to a method for converting a time series into an image based on an improved recursive graph.
Background
Time series data is widely present in daily production and life as a common temporal data type. The various time series data contain rich information, and the processing and classification of the time series data can reveal valuable information in the data so as to guide production and life and provide a real and accurate basis for related decisions. Currently, time series data is widely applied in the fields of medical diagnosis, electronic health record, human activity recognition, industrial equipment, acoustic scene classification, weather prediction, network security and the like, so that the processing and classification of various time series data in a scientific and reasonable manner has very important practical significance.
At present, the artificial neural network algorithm achieves excellent effect in the aspect of image processing. When the time series are classified by using an image processing algorithm in an artificial neural network, the time series are required to be converted into two-dimensional texture images, and efficient classification can be realized. Common methods for converting time series into images mainly include: a Gram Angular Field (GAF), a Markov Transform Field (MTF), and a Recurrence Plot (RP). The GAF and MTF methods are complex in calculation process and complex in calculation steps, and the recursive graph method has the problems of uncertainty in threshold selection and loss of detail characteristics after encoding, so that the existing encoding method needs to be improved.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a time series data coding conversion method, which is used for converting time series data into a two-dimensional texture image.
In order to solve the technical problem, the invention provides a method for converting a time sequence into an image based on an improved recursive graph, which converts time sequence data into a two-dimensional texture image by using the improved recursive graph, and comprises the following steps:
1) considering the characteristics of periodicity, complexity and irregular cyclicity of the time sequence, intercepting a one-dimensional time sequence signal (x) containing at least one complete period information from the original data1,x2,x3,…,xn);
2) A one-dimensional time series signal (x) having a plurality of data points1,x2,x3,…,xn) Converting the space trajectory into a two-dimensional phase space trajectory S;
3) calculating a recursion matrix R according to the improved RP formula;
4) generating a color two-dimensional texture image through a recursive matrix R;
5) and carrying out gray processing on the two-dimensional color texture image to obtain a final two-dimensional texture image.
The step of converting the one-dimensional time series signal into the two-dimensional phase space trajectory S in the step 2) is as follows:
21) setting the time delay interval of the two-dimensional phase space trajectory S as 1;
22) calculating a two-dimensional phase space trajectory S according to the formula (1) and the formula (2),
wherein n is the number of data in the one-dimensional time series signal to be converted,the starting point is the origin of coordinates and the end point is (x)i,xi+1) The vector of (a);
the calculation step of the recursive matrix R in the step 3) is as follows:
31) reading the two-dimensional phase space track S obtained in the step 2);
32) solving the Euclidean norm of each vector in the two-dimensional phase space track S and each vector including the vector, and recording the Euclidean norm as Ri,jThe calculation process is shown as formula (3);
33) using i as the number of rows and j as the number of columns, all R obtained in step 32)i,jCombining into a recursive matrix R with the size of (n-1) x (n-1), wherein the combination form is shown in formula (4);
the step of obtaining the color two-dimensional texture image through the recursive matrix R in the step 4) is as follows:
41) reading the recursion matrix R obtained in the step 3);
42) and calling a Matlab library function imagesc () to process the recursive matrix R to generate a color two-dimensional texture map.
The graying processing of the color two-dimensional texture image in the step 5) is as follows:
51) reading the recursive matrix R in the step 3);
52) calling max () function to get the maximum value of the elements in the recursive matrix R, which is denoted as RmaxThe calling rule is max (R));
53) calling min () function to obtain minimum value of elements in recursive matrix R, and recording the minimum value as RminThe calling rule is min (R));
54) normalizing all element values in the recursive matrix R to be in an interval from 0 to 1, marking the normalized matrix as Q, and calculating the matrix as shown in formula (5) and formula (6);
55) multiplying each element in the matrix Q by 255 to obtain a final two-dimensional texture image matrix, which is marked as P, and the calculation process is shown as formula (7);
P=255×Q (7)
56) calling an imshow () function to process the matrix P and display a two-dimensional texture image;
57) and calling a save () function to store the matrix P in a mat file.
The invention achieves the following beneficial effects:
according to the method for converting the time sequence to the image based on the improved recursion diagram, the problem of uncertainty of threshold value selection of the recursion diagram and information loss caused by R matrix binarization in the process of converting the one-dimensional time sequence into the two-dimensional texture image is solved, and the threshold value processing is replaced by the gray processing, so that the two-dimensional texture image obtained by conversion maximally retains the characteristic information of the original time sequence data. Meanwhile, the substitution of the two-dimensional texture image for the time series data is completed, the image processing and classifying method which is widely applied and mature theoretically is applied to the analysis of the time series data, and various researches on the time series data are facilitated.
Drawings
FIG. 1 is a flow chart of time series data transformation;
fig. 2 is a two-dimensional texture image of the embodiment.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
As shown in fig. 1, a method for converting time series data into an image based on an improved recursive graph, which converts time series data into a two-dimensional texture image by using the improved recursive graph, comprises the following steps:
1) considering the characteristics of periodicity, complexity and irregular cyclicity of the time sequence, intercepting a one-dimensional time sequence signal (x) containing at least one complete period information from the original data1,x2,x3,…,xn);
2) A one-dimensional time series signal (x) having a plurality of data points1,x2,x3,…,xn) Converting the space trajectory into a two-dimensional phase space trajectory S;
21) setting the time delay interval of the two-dimensional phase space trajectory S as 1;
22) calculating a two-dimensional phase space trajectory S according to the formula (1) and the formula (2),
wherein n is the number of data in the one-dimensional time series signal to be converted,the starting point is the origin of coordinates and the end point is (x)i,xi+1) The vector of (2).
3) Calculating a recursion matrix R according to the improved RP formula;
31) reading the two-dimensional phase space track S obtained in the step 2);
32) solving the Euclidean norm of each vector in the two-dimensional phase space track S and each vector including the vector, and recording the Euclidean norm as Ri,jThe calculation process is shown as formula (3);
33) using i as the number of rows and j as the number of columns, all R obtained in step 32)i,jCombining into a recursive matrix R with the size of (n-1) x (n-1), wherein the combination form is shown in formula (4);
4) generating a color two-dimensional texture image through a recursive matrix R;
41) reading the recursion matrix R obtained in the step 3);
42) and calling a Matlab library function imagesc () to process the recursive matrix R to generate a color two-dimensional texture map.
5) And carrying out gray processing on the two-dimensional color texture image to obtain a final two-dimensional texture image.
51) Reading the recursive matrix R in the step 3);
52) calling max () function to get the maximum value of the elements in the recursive matrix R, which is denoted as RmaxThe calling rule is max (R));
53) calling min () function to obtain minimum value of elements in recursive matrix R, and recording the minimum value as RminThe calling rule is min (R));
54) normalizing all element values in the recursive matrix R to be in an interval from 0 to 1, marking the normalized matrix as Q, and calculating the matrix as shown in formula (5) and formula (6);
55) multiplying each element in the matrix Q by 255 to obtain a final two-dimensional texture image matrix, which is marked as P, and the calculation process is shown as formula (7);
P=255×Q (7)
56) calling an imshow () function to process the matrix P and display a two-dimensional texture image;
57) and calling a save () function to store the matrix P in a mat file.
Example (b):
a certain time series signal (x)1,x2,x3,…,xn) Is (0, 1, 2, 1, 2, 3, 4, 3, 2, 3, 2, 1, 2), and n is 13.
The following can be obtained according to equation 1 and equation 2:
S=((0,1),(1,2),(2,1),(1,2),(2,3),(3,4),(4,3),(3,2),(2,3),(3,2),(2,1)(1,2))
the recursive matrix R is calculated to obtain a color two-dimensional texture image, and the gray scale processing is performed to obtain the final two-dimensional texture image as shown in fig. 2.
As can be seen from fig. 2, compared with the binarization texture map generated by the conventional recursion map, the method of the present invention can take values of each pixel point from 0 to 255, refine the difference between the pixel points, and more completely retain the characteristic information of the time series data.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (5)

1. A method for converting time series data into images based on an improved recursive graph is characterized in that the improved recursive graph is used for converting the time series data into two-dimensional texture images, and the method comprises the following steps:
1) considering the characteristics of periodicity, complexity and irregular cyclicity of the time sequence, intercepting a one-dimensional time sequence signal (x) containing at least one complete period information from the original data1,x2,x3,…,xn);
2) A one-dimensional time series signal (x) having a plurality of data points1,x2,x3,…,xn) Converting the space trajectory into a two-dimensional phase space trajectory S;
3) calculating a recursion matrix R according to the improved RP formula;
4) generating a color two-dimensional texture image through a recursive matrix R;
5) and carrying out gray processing on the two-dimensional color texture image to obtain a final two-dimensional texture image.
2. The method for converting a time series signal into an image based on an improved recursive graph as claimed in claim 1, wherein the step of converting the one-dimensional time series signal into the two-dimensional phase space trajectory S in step 2) is as follows:
21) setting the time delay interval of the two-dimensional phase space trajectory S as 1;
22) calculating a two-dimensional phase space trajectory S according to the formula (1) and the formula (2),
wherein n is the number of data in the one-dimensional time series signal to be converted,the starting point is the origin of coordinates and the end point is (x)i,xi+1) The vector of (2).
3. The method for converting time series into images based on improved recursive graph as claimed in claim 1, wherein the recursive matrix R in step 3) is calculated as follows:
31) reading the two-dimensional phase space track S obtained in the step 2);
32) solving the Euclidean norm of each vector in the two-dimensional phase space track S and each vector including the vector, and recording the Euclidean norm as Ri,jThe calculation process is shown as formula (3);
33) using i as the number of rows and j as the number of columns, all R obtained in step 32)i,jCombining into a recursive matrix R with the size of (n-1) x (n-1), wherein the combination form is shown in formula (4);
4. the method for converting a time sequence into an image based on an improved recursive graph according to claim 1, wherein the step of obtaining a color two-dimensional texture image by a recursive matrix R in the step 4) is as follows:
41) reading the recursion matrix R obtained in the step 3);
42) and calling a Matlab library function imagesc () to process the recursive matrix R to generate a color two-dimensional texture map.
5. The method for converting a time sequence into an image based on an improved recursive graph as claimed in claim 1, wherein the step 5) of graying the color two-dimensional texture image comprises the following steps:
51) reading the recursive matrix R in the step 3);
52) calling max () function to get the maximum value of the elements in the recursive matrix R, which is denoted as RmaxThe calling rule is max (R));
53) calling min () function to obtain minimum value of elements in recursive matrix R, and recording the minimum value as RminThe calling rule is min (R));
54) normalizing all element values in the recursive matrix R to be in an interval from 0 to 1, marking the normalized matrix as Q, and calculating the matrix as shown in formula (5) and formula (6);
55) multiplying each element in the matrix Q by 255 to obtain a final two-dimensional texture image matrix, which is marked as P, and the calculation process is shown as formula (7);
P=255×Q (7)
56) calling an imshow () function to process the matrix P and display a two-dimensional texture image;
57) and calling a save () function to store the matrix P in a mat file.
CN201910836011.6A 2019-09-05 2019-09-05 Method for converting time sequence into image based on improved recursive graph Withdrawn CN110599556A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910836011.6A CN110599556A (en) 2019-09-05 2019-09-05 Method for converting time sequence into image based on improved recursive graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910836011.6A CN110599556A (en) 2019-09-05 2019-09-05 Method for converting time sequence into image based on improved recursive graph

Publications (1)

Publication Number Publication Date
CN110599556A true CN110599556A (en) 2019-12-20

Family

ID=68857698

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910836011.6A Withdrawn CN110599556A (en) 2019-09-05 2019-09-05 Method for converting time sequence into image based on improved recursive graph

Country Status (1)

Country Link
CN (1) CN110599556A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813830A (en) * 2020-07-02 2020-10-23 清华大学 Industrial time sequence data retrieval method based on rail transit industrial Internet
CN116342961A (en) * 2023-03-30 2023-06-27 重庆师范大学 Time sequence classification deep learning system based on mixed quantum neural network

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813830A (en) * 2020-07-02 2020-10-23 清华大学 Industrial time sequence data retrieval method based on rail transit industrial Internet
CN111813830B (en) * 2020-07-02 2023-03-28 清华大学 Industrial time sequence data retrieval method based on rail transit industrial Internet
CN116342961A (en) * 2023-03-30 2023-06-27 重庆师范大学 Time sequence classification deep learning system based on mixed quantum neural network
CN116342961B (en) * 2023-03-30 2024-02-13 重庆师范大学 Time sequence classification deep learning system based on mixed quantum neural network

Similar Documents

Publication Publication Date Title
Hu et al. A multiscale fusion convolutional neural network for plant leaf recognition
Patro et al. An efficient optimized feature selection with machine learning approach for ECG biometric recognition
CN113688822A (en) Time sequence attention mechanism scene image identification method
CN110599556A (en) Method for converting time sequence into image based on improved recursive graph
CN111860130A (en) Audio-based gesture recognition method and device, terminal equipment and storage medium
Xie et al. Bag-of-words feature representation for blind image quality assessment with local quantized pattern
CN116503636A (en) Multi-mode remote sensing image classification method based on self-supervision pre-training
CN116844041A (en) Cultivated land extraction method based on bidirectional convolution time self-attention mechanism
CN113537120B (en) Complex convolution neural network target identification method based on complex coordinate attention
CN113569735B (en) Complex input feature graph processing method and system based on complex coordinate attention module
CN110659641B (en) Text recognition method and device and electronic equipment
CN112528077B (en) Video face retrieval method and system based on video embedding
CN117892059A (en) Electric energy quality disturbance identification method based on multi-mode image fusion and ResNetXt-50
CN110738129B (en) End-to-end video time sequence behavior detection method based on R-C3D network
CN112132253B (en) 3D action recognition method, device, computer readable storage medium and equipment
CN115223181A (en) Text detection-based method and device for recognizing characters of seal of report material
WO2022204800A1 (en) Machine learning systems and methods for generating structural representations of plants
CN110222599B (en) Gait recognition method based on Gaussian mapping
Niemann et al. Neural network adaptive image coding
CN116645566B (en) Classification method based on full-addition pulse type transducer
Gowda et al. Background initialization in video data using singular value decomposition and robust principal component analysis
CN118097498B (en) Periodic signal detection method and device based on periodic sparse attention
CN117975573B (en) Sign language translation method and system based on CNN-transducer mixed model
CN118229891B (en) Voice-driven three-dimensional face generation method, system and equipment
CN113780155B (en) Pig face detection method based on newly added Haar-like features

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20191220

WW01 Invention patent application withdrawn after publication