A method for visualizing a large number of time series curves based on dynamic clustering

Through dynamic clustering algorithm and tree-like hierarchical subdivision structure, the problem of low visual discernibility in the existing technology is solved, efficient visualization and interactive operation of large amounts of time series data are achieved, and the visual recognition and calculation of curves are improved. efficiency.

CN114564576BInactive Publication Date: 2024-08-30ZHEJIANG UNIV +2
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210066889.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-20
Publication Date
2024-08-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

It is difficult for existing technology to simultaneously present thousands of time series data curves in the same view and implement real-time clustering calculations during user interaction, resulting in reduced visual discernibility and confusing visualization windows.

Method used

A fast approximation algorithm based on dynamic clustering is used to establish a tree-like hierarchical subdivision structure by defining the k-dimensional eigenvectors and comprehensive eigenvalues ​​of the curve, dynamically adjust the color mapping scheme, and realize real-time visualization and interactive operation of the curve.

Benefits of technology

It improves the visual discernibility of curve subsets, reduces the computational complexity of dynamic clustering, and enhances the real-time performance and visual effects of interactive visualization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114564576B
    Figure CN114564576B
Patent Text Reader

Abstract

The present invention discloses a method for visualizing a large number of time series curves based on dynamic clustering, comprising the following steps: firstly, a large number of time series curve sets are read in; the curve sets are subdivided into a tree-like hierarchy according to a time value range to form an m-tree, the k-dimensional feature vectors and the comprehensive feature value F value of each curve and the curve sub-segment are defined and calculated, and a specific sorting is performed according to the two-dimensional spatial distribution, and the result is stored on the node; based on the feature vector, the initial clustering calculation is performed on the time series curve set, and the curve as a whole is divided into a specified cluster; when the user interactively zooms in, zooms out, and translates the two-dimensional observation viewport rectangular range of the curve set, based on the established m-tree data structure, a subset of the curve segments passing through the current viewport range is quickly found, and real-time dynamic approximate clustering is realized based on the comprehensive feature value F value, and the color mapping scheme of the curve set is dynamically adjusted, and the color saturation and hue of the curve within the cluster are adjusted at the same time. When visualizing a large number of time series curves, the present invention can effectively enhance the visual distinguishability between different clusters of curves and between the same cluster curves on the screen based on the dynamic approximate clustering method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of multidimensional data visual analysis in the field of visual analysis, and in particular to a method for visualizing a large number of time series curves based on dynamic clustering. Background Art

[0002] The time series data in large systems often have thousands or even more physical characteristic quantities as a whole, which are interrelated and have characteristics such as periodicity and fluctuation in time. For example, the analysis or monitoring data of large power grids can have tens of thousands of buses, and each bus has multiple physical quantities such as voltage and frequency at the same time. Therefore, system analysts are eager to see the changing rules of these physical quantities in the time dimension when a certain phenomenon occurs.

[0003] Limited by the human eye's visual channel, multivariate time series data visualization can only observe a dozen curves at most at the same time. However, when the number of curves is too large, simply visualizing a large number of curves directly will inevitably cause common overlap and occlusion problems between the curves. The entire visualization window will be very messy and difficult to observe, which seriously hinders the recognition of its local features. When the number of curves reaches dozens, it is usually possible to increase the recognition and layering of the curves by reducing the line size, adjusting the color contrast, saturation, transparency, etc., but still cannot achieve a good visual effect. Not to mention a collection of thousands of curves.

[0004] Existing analysis methods usually observe the monitoring curves of key components based on the analyst's experience. However, seeing that the curves of key components are stable does not mean that the system is stable. At this time, there are still oscillations in other areas of the system. Therefore, it is impossible to know the overall safety and stability situation from the curve graphs observed locally. For example, when some signals of the power system may change according to the assumed fault, engineers may miss some important information because they only focus on a small number of pre-selected buses. One solution is that we address these possible omissions by using clustering algorithms to group buses according to certain features. For example, buses with similar voltage curves are clustered by clustering, and each cluster is mapped to a color to facilitate observers to quickly locate the faulty bus.

[0005] The existing patent application document with the publication number CN107958020A provides a clustering-based power grid data processing and data visualization method, including: collecting raw data; cleaning the abnormal points and null values ​​in the raw data; for the abnormal points, filtering or correcting the abnormal values ​​to the maximum or minimum boundary values; for the null values, using the average value to fill the null values. And the application document with the publication number CN110795463A provides a massive time series data visualization method for power system transient analysis, which maps the density value to the color space for visualization based on the density distribution of the curve on the screen space through the kernel density estimation method, eliminating the occlusion between the curves and the visual clutter.

[0006] In the prior art, the clustering algorithm for a large number of curves is a time-consuming calculation process. For example, in the designed voltage timing diagram, each curve of voltage variation over time shows the voltage fluctuation within three seconds, and the horizontal axis (time axis) is in milliseconds, which means that each curve to be displayed will have 3,000 data points. When the voltage values ​​to be displayed in the timing diagram exceed 1,000, the total number of data points required for clustering calculation will reach three million levels. On a current mid-range PC, the traditional classic clustering algorithm cannot complete the clustering work in real time, and will cause a long period of freeze during program operation. When the user performs interactive operations such as partial zooming, reduction, and translation on a large number of visualized curves, a fixed clustering result is adopted because real-time clustering calculation cannot be achieved. When observing the local details of the curve set, the clustering categories in the viewport may be reduced, resulting in monotonous colors and a serious reduction in the visual discernibility between curves. Summary of the invention

[0007] The technical problem to be solved by the present invention is to simultaneously present more than tens of thousands of time series data curves in the same view, and allow users to interactively zoom in, zoom out, translate or select areas on a large number of visualized curves. Traditional technologies usually use fixed clustering results. When the observation area is reduced to observe the details of the curve set, what is seen is often only a part of the curve set. The clustering categories in the viewport are reduced, the colors tend to be monotonous, and the visual discernibility between curves is seriously reduced. The present invention adopts a fast approximation algorithm in the interactive visualization analysis process, which can dynamically adjust the clustering results and adjust the color mapping scheme of the curve, thereby effectively improving the visual recognizability of the currently visible curve subset.

[0008] In order to solve the above technical problems, the present invention provides a method for visualizing a large number of time series curves based on dynamic clustering, comprising the following steps:

[0009] Step 1: Data preparation: Read the data of each physical quantity at different times in sequence to form a set of time series curves, and give these curves a sequential ID, transform the time series into a set with 0 as the initial value, align the curve set in time according to the value of the time series, and the user specifies the number of clusters C;

[0010] Step 2: define k important features of the curve (or a curve segment within a certain time interval) to form a k-dimensional feature vector and a comprehensive feature value F for quantitatively describing the position and shape of the curve (curve segment);

[0011] Step 3: Perform tree-like hierarchical subdivision from top to bottom in the time value range to form an m-tree; sort the curve subsegments in the corresponding time subdivision subintervals on the m-tree nodes according to the spatial distribution, and calculate the k-dimensional feature vector and F value of each curve subsegment, and store them on the nodes;

[0012] Step 4: Based on the k-dimensional feature vectors on the curve and its segmented curves, define a method for calculating the curve similarity; specifically, use the existing method to implement clustering calculation on the complete set of time series curves, and divide the curve into C clusters. Update the comprehensive feature value F of the curve (curve segment) according to the cluster category and its own k-dimensional feature vector;

[0013] Step 5: Select a color mapping scheme for curve cluster visualization based on the C value; adjust the visualization color of the curve within the cluster based on the F value of the curve (curve segment), and draw a picture of the curve set.

[0014] Step 6: When the user interactively zooms in, zooms out, or translates the two-dimensional observation viewport rectangular range of the curve set, a subset of curve segments passing through the current viewport range is quickly found based on the m-tree data structure established in step 3;

[0015] Step 7: Based on the found subset of curve segments of the current picture and its clustering data, the color mapping scheme of the previous picture is automatically fine-tuned to form a color mapping scheme of the curve set of the current picture to enhance the visual distinguishability between the curves on the picture.

[0016] In the present invention, k important features of a curve (or a curve segment within a certain time interval) are first defined to form a k-dimensional feature vector and a comprehensive feature value F for quantitatively describing the position and shape of the curve (curve segment), which are used to calculate the curve similarity and record the spatial range in the cluster analysis in the subsequent steps. Preferably, the specific process of step 2 is as follows (explained by taking the example of k taking the value of 4):

[0017] Step 2.1, take the average value f of the physical quantity of the sampling points of the curve (or curve segment) avg , the maximum amplitude f that deviates from the mean value amp, the total length of the curve discrete sampling line segment L a , the difference Δ obtained by subtracting the physical quantity at the starting point from the physical quantity at the end point of the curve is used to measure the four important characteristics of the curve or curve segment, namely the longitudinal position, overall fluctuation, detail fluctuation (smoothness), and overall direction, forming a 4-dimensional feature vector (f avg ,f amp ,L a ,Δ). In the calculation process, the physical quantity value is standardized so that except for a small number of deviation points, its value is within the interval [0.0,256.0).

[0018] Step 2.2: For each curve, calculate the comprehensive evaluation value F = c 1 f avg +c 2 f amp +c 3 L a +c 4 Δ. F is a real number; (c 1 ,c 2 ,c 3 ,c 4 ) are four real number weight factors that can be adjusted according to different visualization requirements. F is normalized as a whole so that its value is in the interval [0,1].

[0019] In the present invention, a tree-like hierarchical subdivision is performed from top to bottom in the time value range to form an m-tree. The curve subsegments in the time subdivision subinterval corresponding to the m-tree node are specifically sorted according to the spatial distribution, and the k-dimensional feature vector and F value of each curve subsegment are calculated, stored and recorded on the node, and a spatial mapping between the curve segment and the two-dimensional area is formed. Preferably, the specific process of step three is as follows (explained by an example of m taking the value of 4):

[0020] Step 3.1, divide the time value range into 4 sub-intervals, so that each curve is subdivided into 4 sub-curve segments in time;

[0021] In step 3.2, each sub-time period is further subdivided into 4 sub-intervals by recursively dividing from top to bottom to form a 4-way tree. The height of the tree is determined by the number of time intervals in the timing curve and the degree of detail that the user may need to observe. When m=4, it is recommended to take a value between 2 and 4, so that the number of time interval divisions is between 16 and 256, which is more in line with the real-time computing capabilities of current mainstream hardware.

[0022] Step 3.3, calculate the k-dimensional feature vector (f avg ,f amp ,L a,Δ) and F value, and the F value is normalized according to the same global parameters.

[0023] Step 3.4, sort the sub-curve segments in the sub-interval represented by the node. The sorting method is: according to f av -f amp The rounded values ​​of the bounding box lower limit are sorted from small to large. If the rounded values ​​of the bounding box lower limits are equal, press f avg +f amp The rounded values ​​(that is, the upper limit of the bounding box) are sorted from large to small.

[0024] Step 3.5, record and store the curve ID, k-dimensional feature vector (f avg ,f amp ,L a ,Δ) and F value.

[0025] In the present invention, a method for calculating curve similarity is defined based on the k-dimensional feature vectors on the curve and its subdivided curve segments. The existing method is used to implement clustering calculation on the complete set of time series curves, and the curve is divided into C clusters as a whole. The comprehensive feature value F of the curve (curve segment) is updated according to the cluster category. Preferably, the specific calculation process of step 4 is as follows:

[0026] Step 4.1, define the calculation formula for the curve distance. The smaller the distance between two curves, the higher the similarity between the two curves. The calculation formula for the distance between two curves will comprehensively weight the difference between their k-dimensional feature vectors and the difference between the k-dimensional feature vectors of their corresponding sub-curve segments at the next level of the m-ary tree.

[0027] Step 4.2: Use the existing method to perform offline clustering calculation on the complete set of time series curves, divide the curves into C clusters, and record the cluster center curve t for each cluster i. i , for each curve j, record the cluster category x to which it belongs j .

[0028] Step 4.3, traverse the m-ary tree, and update the comprehensive evaluation value F for each curve (sub-curve) = the original value of the curve F + the cluster number where it is located - the original value of the cluster center curve F.

[0029] In the present invention, a color mapping scheme is used when selecting curve cluster visualization according to the C value. The visualization color of the curve in the cluster is adjusted according to the F value of the curve (curve segment), and a picture of the curve set is drawn. Preferably, the specific calculation process of step five is as follows:

[0030] Step 5.1: For each number of clusters, the artist pre-builds several color schemes that take into account both contrast and aesthetics, and obtains visualization colors based on cluster categories, and stores them as a color scheme table for long-term use. Usually, the number of clusters should not exceed 10 to avoid a decrease in the color distinction between curve clusters.

[0031] Step 5.2, according to the C value, introduce a random factor, extract one of the color schemes for table lookup, and obtain a specific color mapping scheme.

[0032] Step 5.3, when drawing a set of curves, based on the difference between the F value of the cluster center curve and the F value of the curve, the color saturation and hue of the cluster where the curve is located are appropriately adjusted to enhance the visual distinguishability between the curves within the cluster.

[0033] In the present invention, when the user interactively zooms in, zooms out, or translates the two-dimensional observation viewport rectangular range of the curve set, the subset of curve segments passing through the current viewport range is quickly found based on the m-tree data structure established in step 3. Preferably, the specific calculation process of step 6 is as follows:

[0034] Step 6.1, during the user interactive visualization process, the curve display is zoomed in, zoomed out, and translated to form a two-dimensional viewport rectangular range of the curve display (the horizontal range is the time value range, and the vertical range is the physical quantity value range).

[0035] Step 6.2, through the m-ary tree established in step 3, it is easy to quickly find the subtree within the range of the positioning time value.

[0036] Step 6.3, we can use the curve (curve segment) (f avg ,f amp ) parameters to infer the bounding box of the curve (curve segment) to quickly exclude those curves that are obviously invisible within the current 2D viewport rectangle, thereby obtaining a subset of curves that may pass through the current 2D viewport rectangle, which we call the possible visible curve set. Since the curve segments have been sorted in step 3.4, using this sorting can greatly speed up the process of finding and establishing the possible visible curve set.

[0037] In the present invention, based on the found subset of the current screen curve segments and their clustering data, real-time dynamic approximate clustering is performed when necessary, and the color mapping scheme of the previous screen curve drawing is automatically fine-tuned to form the color mapping scheme of the current screen curve drawing, so as to enhance the visual distinguishability between the curves on the screen. Preferably, the specific calculation process of step seven is as follows:

[0038] Step 7.1, from the possible visible curve set in the current two-dimensional viewport rectangular range, obtain the number of clusters located in the current two-dimensional viewport rectangular range.

[0039] Step 7.2: Assume that r is the ratio threshold given by the user (0 < r < 1, and the recommended value is 0.5). If the number of visible clusters in the current screen < C × r, then we adopt a technique similar to the multi-level detail visualization of maps to perform dynamic approximate clustering decomposition on the current clusters, so as to visually display richer information. The implementation method of dynamic approximate clustering is to directly perform local clustering on the one-dimensional floating-point data on the F values of the possibly visible curve set. Since the F value contains the original clustering result, it will be an adjustment based on the original clustering scheme. Adjust the color scheme according to the new clustering.

[0040] Step 7.3: When drawing the curve set, based on the difference between the F value of the cluster center curve and the F value of this curve, appropriately adjust the color saturation and hue of each curve in the cluster, so that the cluster center curve is in the most prominent position, and then slowly change the color saturation and hue with the F value difference, thereby enhancing the visual distinguishability between the curves within the cluster.

[0041] The present invention has the following beneficial effects:

[0042] (1) Subdivide the curve set into a tree-like hierarchy according to the time value range to form an m-ary tree, and perform a specific sorting according to the two-dimensional space distribution and store it on the nodes. During user interaction, based on the established m-ary tree data structure, the subset of curve segments passing through the current viewport range can be quickly found, thereby effectively reducing the number of curves that need to be dynamically clustered.

[0043] (2) Define and calculate the k-dimensional feature vectors and comprehensive eigenvalue F values of each curve (curve segment), so as to support the initial relatively accurate clustering calculation of a large number of time-series curve sets in the present invention, as well as the real-time approximate clustering of the curve subset during interaction.

[0044] (3) After clustering a large number of curves, there is still a problem that the curves within the cluster cannot be accurately identified visually. Based on the previously calculated F value, the present invention performs dynamic approximate clustering, dynamically adjusts the color mapping scheme of the curve set, and at the same time adjusts the color values of the curves within the cluster, which can effectively enhance the visual distinguishability between different clusters of curves and between curves within the same cluster on the screen. Description of the Drawings

[0045] Figure 1 is the algorithm flow framework diagram of the present invention;

[0046] Figure 2 is the visualization result of clustering a large number of curves before using the algorithm of the present invention;

[0047] Figure 3 is the visualization result of dynamic clustering of a large number of curves after using the algorithm of the present invention;

[0048] Figure 4 The clusters are automatically adjusted for local zooming in. DETAILED DESCRIPTION

[0049] The present invention will be described in detail below with reference to the embodiments and the accompanying drawings, but the present invention is not limited thereto.

[0050] The present invention implements a method for visualizing a large number of time series curves based on dynamic clustering. Figure 1 As shown, the implementation method is divided into the following steps:

[0051] Step 1: Data preparation: Read the data of each physical quantity at different times in sequence to form a time series curve set, and give these curves a sequential ID. Transform the time series to use 0 as the initial value, and align the curve set in time according to the value of the time series. The number of clusters C is given by the user.

[0052] Step 2: Define k important features of the curve (or a curve segment within a certain time interval) to form a k-dimensional feature vector and a comprehensive feature value F for quantitatively describing the position and shape of the curve (curve segment), which are used to calculate the curve similarity in the cluster analysis in the subsequent steps and to record the spatial range of the curve.

[0053] Based on the k-dimensional feature vectors on the curve and its subdivided curve segments, a method for calculating the curve similarity can be further defined. The specific process is as follows (using an example where k is 4 for illustration):

[0054] Among the k important features, as a mandatory option, the average value f of the physical quantity of the sampling points of the curve (or curve segment) must be included avg , the maximum amplitude f that deviates from the mean value amp , which are used to measure the vertical axis position and overall fluctuation of the curve (or curve segment), and can also calculate the bounding box of the curve. The total length L of the discrete sampling line segment containing the curve (or curve segment) is recommended to be a , the difference Δ obtained by subtracting the physical quantity at the beginning of the curve from the physical quantity at the end of the curve is used to describe the detailed fluctuation (smoothness) and overall direction of the curve (or curve segment). These four important characteristics form a 4-dimensional feature vector (f avg ,f amp ,L a ,Δ). During the calculation process, the physical quantity values ​​are standardized so that except for a very small number of points, their values ​​are within the interval [0.0,256.0). The standardization process is used to form an integer table for the upper and lower bounds of the bounding box.

[0055] For each curve, calculate the curve comprehensive evaluation value F, which is a real number, the weight of each component of the eigenvector. Perform overall normalization on F so that its value is in the interval [0,1].

[0056] Define the calculation formula for curve distance. The smaller the distance between two curves, the higher the similarity between the two curves. The calculation formula for the distance between two curves will comprehensively weight the difference between their k-dimensional feature vectors and the difference between the k-dimensional feature vectors of their corresponding sub-curve segments at the next level of the m-tree. For the bottom-level curve segments, there is no sub-curve at the next level. You can simply use the feature vectors at this level for comparison, or you can perform the most detailed data comparison.

[0057] Step 3: Perform tree-like hierarchical subdivision from top to bottom in the time value range to form an m-tree. Sort the curve subsegments in the corresponding time subdivision subintervals on the m-tree nodes according to the spatial distribution, calculate the k-dimensional feature vector and F value of each curve subsegment, store and record them on the nodes, and form a spatial mapping between the curve segment and the two-dimensional area. The specific process is as follows (using the example of m value 4 for explanation):

[0058] First, divide the time value range into 4 sub-intervals, so that each curve is subdivided into 4 sub-curve segments in time; by recursively subdividing each sub-time period into 4 sub-intervals from top to bottom, a 4-way tree is formed; the height of the tree is determined by the number of time intervals of the time series curve and the degree of detail that the user may need to observe. When m=4, it is recommended to take between 2-4, so that the number of time interval divisions is between 16 and 256, which is more in line with the real-time computing capabilities of current mainstream hardware. Then calculate and record the ID and k-dimensional feature vector (f avg ,f m ,L a ,Δ) and F value, and the F value is normalized according to the same global parameters.

[0059] Furthermore, the sub-curve segments in the sub-interval represented by the node are sorted. The sorting method is: according to f avg -f m The rounded values ​​of the bounding box lower limit are sorted from small to large. If the rounded values ​​of the bounding box lower limits are equal, press f avg +f m The rounded values ​​of the bounding box (i.e., the upper limit of the bounding box) are sorted from large to small. This arrangement will help improve the query process for the subset of curves that pass through a given two-dimensional window.

[0060] Step 4: Based on the k-dimensional feature vectors on the curve and its segmented curves, define a method for calculating the curve similarity. Use existing methods to implement clustering calculations on the complete set of time series curves, and divide the curves into C clusters. Update the comprehensive feature value F of the curve (curve segment) based on the cluster category and its own k-dimensional feature vector.

[0061] In this step, the existing method is used to implement clustering calculation on the complete set of time series curves, and the curves are divided into C clusters. According to the cluster category, the comprehensive characteristic value F of the curve (curve segment) is updated. This step can be considered as a preprocessing process, and the algorithm efficiency does not need to reach real time. The specific calculation process is as follows:

[0062] The existing method is used to implement offline clustering calculation on the complete set of time series curves, and the curves are divided into C clusters. For each cluster i, the cluster center curve t is recorded. i , for each curve j, record the cluster category X to which it belongs j Traverse the m-ary tree and update the comprehensive evaluation value F for each curve (sub-curve) = the original F value of the curve + the cluster number - the original F value of the cluster center curve. Since the original F value is globally normalized, this calculation method makes the cluster category numerically dominant in the final F value calculation, and at the same time reflects their slow and continuous change process.

[0063] Step 5: Select the color mapping scheme for curve cluster visualization based on the C value; adjust the visualization color of the curve within the cluster based on the F value of the curve (curve segment), and draw a picture of the curve set. The specific calculation process is as follows:

[0064] For each number of clusters, the art staff pre-builds several color schemes that can take into account both contrast and aesthetics, and obtains visual colors from cluster categories, and stores them as color matching tables for long-term use. Usually, the number of clusters should not exceed 10 to avoid a decrease in the color distinction between curve clusters. According to C, a random factor is introduced to look up the table to obtain the initial color mapping scheme. When drawing a set of curves, the color saturation of the cluster where the curve is located is appropriately adjusted based on the difference between the F value of the cluster center curve and the F value of the curve, so as to enhance the visual distinguishability between the curves within the cluster.

[0065] Step 6: When the user interactively zooms in, out, or translates the two-dimensional observation viewport rectangle of the curve set, the m-tree data structure established in the previous step is used to quickly find the subset of curve segments that pass through the current viewport range. The specific calculation process is as follows:

[0066] In the process of user interactive visualization, the curve display is zoomed in, zoomed out, and translated to form a two-dimensional viewport rectangular range of the curve display (the horizontal range is the time value range, and the vertical range is the physical quantity value range).

[0067] Through the m-ary tree established in step 3, it is easy to quickly find the subtree within the range of the positioning time value. Then, the curve (curve segment) can be used to find the (f a ,f m ) parameters to infer the bounding box of the curve (curve segment) to quickly exclude those curves that are obviously not visible within the current two-dimensional viewport rectangle, thereby obtaining a subset of curves that may pass through the current two-dimensional viewport rectangle, which we call the possible visible curve set. When sorting the curve list in the node, the strategy of sorting the integer value of the lower limit of the bounding box from small to large is adopted, and when the integer values ​​of the lower limit of the bounding box are equal, the integer value of the upper limit of the bounding box is sorted from large to small. In this way, when we search for a curve subset, we first use the binary search method to quickly locate the curve whose lower limit of the bounding box just exceeds the upper edge value of the two-dimensional viewport rectangle. Then the curve subset located in front of this curve must be located above and outside the two-dimensional viewport rectangle, and all of them can be excluded. For the curve list with the same bounding box lower limit integer value, search forward until the bounding box upper limit is less than the lower edge value of the two-dimensional viewport rectangle, then the subsequent curves with the bounding box lower limit value can be excluded. Then search the list of the next bounding box lower limit integer value until the search is completed. This uses the m-ary tree to accelerate the query process of the curve subset passing through a given two-dimensional window.

[0068] Step 7: Based on the found subset of the current screen curve segments and their clustering data, real-time dynamic approximate clustering is performed when necessary, and the color mapping scheme of the previous screen curve drawing is automatically fine-tuned to form the color mapping scheme of the current screen curve drawing to enhance the visual distinguishability between the curves on the screen. The specific calculation process is as follows:

[0069] From the possible visible curve set in the current two-dimensional viewport rectangular range, the number of clusters located in the current two-dimensional viewport rectangular range is obtained. When the number of clusters where most of the curves are located is significantly less than the total number of clusters, similar to the multi-level detail visualization of the map, we perform dynamic approximate cluster decomposition on the current cluster, so that richer information can be visualized. Since the cluster category is numerically dominant in the final F-value calculation of the curve, and at the same time reflects their slow and continuous change process, the implementation method of dynamic approximate cluster decomposition in the present invention is to directly perform local clustering of one-dimensional floating-point value data on the F value of the possible visible curve set, and then adjust the color matching according to the new cluster. This will not lead to drastic changes in clusters, but will form continuous transition changes in the visualization of curve details.

[0070] When drawing a set of curves, the color saturation and hue of the cluster where the curve is located are appropriately adjusted based on the difference between the F value of the cluster center curve and the F value of this curve, so as to conform to the perception characteristics of the human eye, thereby enhancing the visual distinguishability between the curves within the cluster.

[0071] Figure 2 This is a visualization result of a large number of curve clustering before using the algorithm of the present invention. Figure 3 The dynamic clustering visualization results of a large number of curves after using the algorithm of the present invention show that the visual recognition of different curve trends is significantly improved. Figure 4 The clusters are automatically adjusted for local zooming, further improving visual recognition.

[0072] The above description is only an example of a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for visualizing a large number of time series curves based on dynamic clustering, characterized in that: The steps include: Step 1: Read the data of each physical quantity at different times in sequence to form a time series curve set, align the curve set in time according to the value of the time series; and specify the number of clusters C; Step 2: define k important features of the curve or the curve segment within a certain time interval, and form a k-dimensional feature vector and a comprehensive feature value F for quantitatively describing the position and shape of the curve or the curve segment; Step 3: Perform tree-like hierarchical subdivision from top to bottom in the time value range to form an m-ary tree; The curve sub-segments in the corresponding time sub-intervals on the m-ary tree nodes are specifically sorted according to the spatial distribution, and the k-dimensional eigenvector and comprehensive eigenvalue F value of each curve sub-segment are calculated and stored on the nodes; Step 4: Based on the k-dimensional feature vectors on the curve and its segmented curve segments, cluster calculation is performed on the complete set of time series curves, the curve is divided into C clusters as a whole, and the comprehensive feature value F of the curve or curve segment is updated according to the cluster category; Step 5: Adjust the visualization color of the curves in the cluster according to the F value of the curve or curve segment, and draw a picture of the curve set; Step 6: When the user interacts with the two-dimensional observation viewport rectangular range of the curve set, a subset of curve segments passing through the current viewport range is quickly found based on the established m-tree data structure; Step 7: Based on the found subset of the current screen curve segments and their initial clustering data, or further real-time dynamic approximate clustering, fine-tune the color mapping scheme of the previous screen curve drawing to form a color mapping scheme for the current screen curve drawing to enhance the visual distinguishability between the curves on the screen.

2. The method for visualizing a large number of time series curves based on dynamic clustering according to claim 1, characterized in that: The specific process of step 2 is as follows: Step 2.1, take k important characteristics of the physical quantity of the curve or curve segment sampling point, k>2, which must include the average value f1=f avg , the maximum amplitude f2 deviates from the average value = f amp , forming a k-dimensional feature vector (f1, f2, ..., f k ); Step 2.2, for each curve, calculate the curve comprehensive evaluation value F = c1f1 + c2f2 + ..... + c k f k , F is a real number; (c1, c2, ..., c k ) are k real number weight factors, and F is normalized on the curve set so that its value is in the interval [0, 1].

3. The method for visualizing a large number of time series curves based on dynamic clustering as claimed in claim 2, characterized in that: In step 2.1, the physical quantity values ​​are standardized during the calculation process so that, except for a small number of deviation points, their values ​​are within a given numerical range after standardization.

4. The method for visualizing a large number of time series curves based on dynamic clustering according to claim 1, characterized in that: The specific process of step three is as follows: Step 3.1, divide the time value range into m sub-intervals, so that each curve is subdivided into m sub-curve segments in time; Step 3.2, by recursively dividing each sub-time period into m sub-intervals from top to bottom, an m-fork tree is formed; Step 3.3, calculate the k-dimensional feature vector (f1, f2, ..., f k ) and F value, and normalize the F value according to the same global parameters; Step 3.4, sort the sub-curve segments in the sub-interval represented by the m-ary tree node, and the sorting method is: according to f avg -f amp The rounded values ​​are sorted from small to large. If the rounded values ​​of the lower limits of the bounding boxes are equal, press f av +f amp The rounded values ​​of are sorted from large to small; Step 3.5, record and store the curve ID, k-dimensional feature vector (f1, f2, ..., f k ) and F value.

5. The method for visualizing a large number of time series curves based on dynamic clustering according to claim 1, characterized in that: The specific calculation process of step 4 is as follows: Step 4.1, define the calculation formula of curve distance, implement offline clustering calculation for the complete set of time series curves, and divide the curves into C clusters; Step 4.2, traverse the m-ary tree, and update the comprehensive evaluation value F for each curve (sub-curve) = the original value of the curve F + the cluster number where it is located - the original value of the cluster center curve F.

6. The method for visualizing a large number of time series curves based on dynamic clustering according to claim 1, characterized in that: The specific calculation process of step 5 is as follows: Step 5.1, corresponding to each number of clusters, pre-build several color matching tables; Step 5.2, according to the cluster number C value, the color mapping scheme is obtained by looking up the table; Step 5.3, when drawing a set of curves, the color of the cluster where the curve is located is appropriately adjusted based on the difference between the F value of the cluster center curve and the F value of the curve, so as to enhance the visual distinguishability between the curves in the cluster.

7. The method for visualizing a large number of time series curves based on dynamic clustering according to claim 1, characterized in that: The specific calculation process of step six is ​​as follows: Step 6.1, during the user interactive visualization process, operating the curve display, including zooming in, zooming out, and panning, to form a two-dimensional viewport rectangular range for the curve display; Step 6.2, quickly search for a subtree within the range of the positioning time value through the m-ary tree established in step 3; Step 6.3, by calculating the bounding box of the curve or curve segment, obtain the subset of curves that may pass through the current two-dimensional viewport rectangle.

8. The method for visualizing a large number of time series curves based on dynamic clustering according to claim 1, characterized in that: The specific calculation process of step seven is as follows: Step 7.1, obtaining the number of clusters located in the current two-dimensional viewport rectangular range from the set of possible visible curves in the current two-dimensional viewport rectangular range; Step 7.2, or directly perform local clustering of floating point numbers on the F value of the visible curve set to achieve dynamic clustering decomposition of the current curve set, and adjust the color scheme according to the new clustering results; Step 7.3, when drawing a set of curves, the color of each curve in the cluster is appropriately adjusted based on the difference between the F value of the cluster center curve and the F value of the curve, so as to enhance the visual distinguishability between the curves in the same cluster.

Citation Information

Patent Citations

  • Power grid data processing and data visualization method based on cluster

    CN107958020A

  • Method and device for visualized analysis on layering factors of deep neural network based on text flow input

    CN107688870A

  • Massive time series data visualization method for transient analysis of power system

    CN110795463A