Method for drawing large data volume of load-controllable points in data acquisition monitoring software

CN115880128BActive Publication Date: 2026-09-29TIANJIN RES INST OF ELECTRIC SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211308612.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-25
Publication Date
2026-09-29
Estimated Expiration
2042-10-25

AI Technical Summary

Technical Problem

[0005]本发明的目的在于克服现有技术的不足,提出数据采集监控软件中负载可控的大数据量摘点绘制方法,能够解决直接采用复杂数学计算方式后造成程序不流畅问题或者不采用算法图形不能正确反映数据趋势,不能正确显示故障突变点问题

Benefits of technology

[0011]本发明的优点和积极效果是:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115880128B_ABST
    Figure CN115880128B_ABST
Patent Text Reader

Abstract

The present application relates to a large data volume drawing method of load controllable in data acquisition monitoring software, which processes original sampling data in data file, draws a curve according to coordinate range, judges whether to perform a graphic operation, and draws a curve according to new coordinate range if the graphic operation is performed. The effect of controllable drawing load is realized when drawing data in any range, and the maximum program execution time is irrelevant to data size, graphic scaling, graphic movement, coordinate range and other factors. Meanwhile, the users of engineering graphic analysis software often focus on signal mutation or maximum and minimum values. When mass data is displayed on a computer screen, how to keep all these characteristic values under controllable load is a difficulty in graphic curve drawing. The present application reasonably groups data, draws maximum and minimum values of each group of data, and maximally ensures the display of these key information in the curve graphic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data acquisition and analysis technology, and in particular to a method for plotting large amounts of data with controllable load in data acquisition and monitoring software. Background Technology

[0002] Process data acquisition (PDA) systems are widely used in key sectors such as energy, transportation, and metallurgy. PDA systems enable real-time, rapid acquisition and display of process data within production equipment, as well as the storage and playback of historical data, meeting the requirements for real-time monitoring of on-site equipment status. This facilitates equipment maintenance and reduces troubleshooting time. Currently, the German Iba software system is widely used; however, compatibility issues exist with specific equipment, such as data channels, data acquisition accuracy, data sampling cycles, and data sources, which limit the application of the software system.

[0003] Developing an independent data acquisition software system presents numerous challenges. For instance, how can the host computer software quickly complete the graphical rendering of large amounts of data within a limited time and on a limited screen of pixels, ensuring that the graphics accurately reflect data trends and correctly display fault abrupt changes?

[0004] There are many methods for processing massive amounts of data, but they are all based on complex mathematical calculations. The more data there is, the greater the load becomes. When each data calculation takes more than 1 second, the program will lag noticeably. Therefore, methods based on complex mathematical calculations are not suitable for use in host computer graphical monitoring software. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and propose a method for plotting large data volumes with controllable load in data acquisition and monitoring software. This method can solve the problems of program sluggishness caused by directly using complex mathematical calculations or the inability to correctly reflect data trends and display fault change points without using algorithmic graphics.

[0006] The technical problem solved by this invention is achieved through the following technical solution: The method for plotting large data points with controllable load in data acquisition and monitoring software includes the following steps: Step 1: Open the data file collected by the PDA system and process the raw sampled data in the data file; Step 2: Based on the set coordinate range and the data processed in Step 1, plot the large data extraction curve; Step 3: Determine whether a graphical operation is required. If yes, proceed to step 2; otherwise, continue to step 3.

[0007] Furthermore, step 1 includes the following steps: Step 1.1: Establish the first program memory segment to store the raw sampling data; Step 1.2: Determine the number of layers based on the total amount of original sampled data, the maximum number of plotting points, and the required data extraction load. k and dependent variable X 1< X 2<…< X i <…< X k ,in X i =2^ j , j is a positive integer; Step 1.3, raw data each X Compare the size of each point, and calculate the result in a loop. X The maximum and minimum values ​​of a single point are recorded as the first-level extreme value data; Step 1.4: Establish a second program memory segment to store the data calculated in step 1.3. The size of the second program memory segment = 2 * the size of the first program memory segment / X1, and the relative locations of the data storage are consistent. Step 1.5: Determine whether to set the number of floors. k >1, if k If >1, then let the loop variable... i The initial value is 2, check if it is a loop variable. i > k If the loop variable i > k If the condition is met, the process ends; otherwise, proceed to step 1.6. Step 1.6, with the first i The -1 level extreme value data is the processing object, each X i / X i-1 By comparing the first minimum / maximum value, a new minimum / maximum value is obtained, thus obtaining the th minimum / maximum value. i Layer maximum / minimum data; Step 1.7: Store the data obtained in step 1.6 at the end of the second program memory segment. Data size = 2 * first program memory segment / X i ; Step 1.8, Loop Variable i = i +1 and return to step 1.5.

[0008] Furthermore, step 2 includes the following steps: Step 2.1: Calculate the picking ratio n = ( dmax - ⌊ dmin⌋) / ( Maxpoint -1) ,in dmin The minimum value on the x-axis. dmax The maximum value of the x-axis. Maxpoint This represents the maximum number of points in the drawing. Step 2.2: Determine whether to remove the percentage of points. n < X 1. If the picking ratio n < X 1. When plotting, the original data, i.e., the data in the first program memory segment, is used directly. n If the maximum and minimum values ​​are compared at each point, the result is added to the plotting buffer and plotted, then proceed to step 3; otherwise, proceed to step 2 or 3. Step 2.3, when the picking ratio n ≥ X At step 1, when plotting, the data in the second program memory segment is used, the result is added to the plotting cache and plotted, and then step 3 is performed.

[0009] Furthermore, step 2.3 includes the following steps: Step 2.3.1: Find the value that is not greater than n The largest X i , determine to use the first i The maximum and minimum values ​​of each layer are found based on the size of the data in each layer. i The location of the layer data in the second program memory segment; Step 2.3.2, Calculation m = n / X i ,Every m The maximum value is obtained by comparing each of the maximum values. m The minimum value is obtained by comparing the minimum values, the result is added to the plotting buffer and plotted, and then proceed to step 3.

[0010] Furthermore, the graphic operation in step 3 is the operation of scaling the graphic, moving the graphic, or setting the coordinate range.

[0011] The advantages and positive effects of this invention are: This invention processes the raw sampled data in a data file; plots curves based on coordinate ranges; and determines whether to perform graphical operations. If so, it plots curves based on the new coordinate range. This achieves controllable plotting load when plotting data within an arbitrary range, and the maximum program execution time is independent of factors such as data size, graph scaling, graph movement, and coordinate range. Meanwhile, users of engineering graphical analysis software often focus on signal abrupt changes or maximum and minimum values. When massive amounts of data are displayed on a computer screen, preserving all these characteristic values ​​under controllable load is a challenge in graph plotting. This invention, by rationally grouping the data and plotting the maximum and minimum values ​​of each group, ensures the maximum possible display of this crucial information in the curve graph. Attached Figure Description

[0012] Figure 1 This is a flowchart of step 1 of the present invention; Figure 2 This is a flowchart of step 2 of the present invention; Figure 3 This is a schematic diagram of the data pick-up load of the present invention at different pick-up ratios; Figure 4 This is a screenshot of the waveform curve of the present invention; Figure 5 This is a schematic diagram of the curve plotting area of ​​the present invention. Detailed Implementation

[0013] The present invention will be further described in detail below with reference to the accompanying drawings.

[0014] like Figure 5 As shown, let MinPos This represents the minimum horizontal pixel value of the drawing area. MaxPos This represents the maximum horizontal pixel value of the drawing area. dmin The minimum value on the x-axis. dmax The maximum value of the x-axis. Maxpoint To draw the maximum number of points (take) Maxpoint > MaxPos – MinPos ), n For the percentage of points picked, N Total data volume M The maximum number of data comparisons set, i.e., the maximum data capture point load, is indicated by the symbol. ⌊ represents rounding up, and ⌋ represents rounding down. Maxpoint , M The variables are set in the program, while N It depends on the size of the specific data file being opened. dmin , dmax , nThe variables are determined by the range of the displayed horizontal axis.

[0015] Step 1: Open the data file collected by the PDA system and process the raw sampled data in the data file. For example... Figure 1 The steps shown are as follows: Step 1.1: Establish the first program memory segment to store the raw sampling data; Step 1.2, as follows Figure 4 As shown, the number of layers is determined based on the total amount of original sampled data, the maximum number of plotting points, and the required data extraction load. k and dependent variable X 1< X 2<…< X i <…< X k ,in X i =2^ j , j It is a positive integer; ensuring that the data sampling load is always less than the set upper limit. M .

[0016] Step 1.2.1, Select X i =2^ j , j It is a positive integer. The advantage is that the program is easy to process and can conveniently calculate different... X i The average value.

[0017] Step 1.2.2: Consider the scale of point selection when drawing. n < X Case 1: In this case, the original data is used, each n A plot is drawn by comparing the maximum and minimum values ​​of each point. The total amount of data to be compared is approximately... Maxpoint * n ,Every n Comparing the maximum and minimum values ​​at each point requires at most 2 ( n -1) comparisons, then the number of comparisons is: y=Maxpoint *2*( n -1) ① Then consider the picking ratio n≥X i Situation: At this time, use the first i Layer maximum / minimum data, that is, each data point is... X i If the maximum / minimum values ​​of the original data are given, then the total amount of data to be compared is approximately [value missing]. Maxpoint * n / X i ,set up m= n / X i Then each m A new minimum value is obtained by comparing each minimum value. m The new maximum value is obtained by comparing the maximum values. The number of comparisons is: y= ( Maxpoint * n / X i / m )*2*( m -1) ② Steps 1, 2, and 3: To make the load controllable, the number of comparisons should be reduced. y Less than the set value M Equation ① is clearly about n Monotonically increasing, in equation ② y It is about m, n Monotonically increasing m It is about n Monotonically increasing, therefore equation ② also relates to... n Monotonically increasing. Therefore y The function is about n Given a piecewise function where each segment is monotonically increasing, then if the right endpoint of each segment is less than... M That's fine, such as Figure 3 .

[0018] Piecewise discussion of the function y For ease of narration, let's assume... M’ =( M / 2 / Maxpoint )+2.

[0019] Situation 1 n < X At time 1, according to equation ①, the maximum value is at n = X Found at location 1-1 y max =2* Maxpoint *( X 1-2) M ,Right now X 1< M’ ③ Scenario 2 X i <= n < X i+1 When, simplify inequality ② M , ( Maxpoint * n / X i / m ) *2*( m -1)< M → ( n / X i ) *(1-1 / m )< M’ -2 ∵ m = n / X i > n / X i ∴ ( n / X i ) *(1- X i / n )<( n / X i ) *(1-1 / m )< M’ -2 → n / X i < M’ -1 ④ From the maximum value in n = X i+1 If it is obtained at position -1, then ( X i+1 -1) / X i < M’ -1, which can be obtained after scaling. X i+1 / X i < M’ ⑤ Situation 3 n >= X k When, the maximum value is n = N / ( Maxpoint -1)+1≈ N / Maxpoint Substituting the value from point 4 into equation 4, we get... X k > N / Maxpoint / M’,Right now X k >2 N / M ⑥ Steps 1, 2, and 4 X i The smaller, the first i The larger the space required for the layer's maximum and minimum values, therefore... X 1. It should not be too small.

[0020] Step 1.2.5: In summary, according to equation ③, based on the upper limit of the number of comparisons... M And the maximum number of points in the drawing Maxpoint The dependent variable can be calculated. X 1 = 2^⌊ log 2( M’ According to equation ⑥, based on the total data volume... N and the upper limit of the number of comparisons M The dependent variable can be calculated. X k =2^ log 2(2 N / M ) ;like X 1>= X k ,but k =1, one layer of extreme value data is sufficient; if X 1< X k ,because X i Both are powers of 2, as can be seen from equation ⑤. X i+1 / X i <=2^⌊ log 2( M’ )⌋= X 1. Further X k / X 1=( X k / X k-1 )*( X k-1 / X k-2 )*…*( X 2 / X 1) <= ( X 1) k-1 Therefore, it can be determined k = log 2(X k ) / log 2( X 1) The remaining dependent variables X i Pick X 1 and X k The average of the products can be obtained by multiplying them.

[0021] Example 1, Total Data Volume N =100 million, maximum number of comparisons M The maximum number of points to be drawn is specified as 100,000. Maxpoint =1500, then M’ = ( M / 2 / Maxpoint ) + 2 ≈ 35.3, X 1 = 2^⌊ log 2( M’ )⌋ = 2 5 = 32; X k =2^ log 2(2 N / M ) =2^ log 2(2000) ,so X 1 = 32, X 2 = 2 (5+11) / 2 = 2 8 = 256, X 3 = 2048. For example, if the total amount of data is relatively small... N =1 million, other parameters remain unchanged, then X 1 = 2^⌊ log 2( M’ )⌋=32, X k =2^ log 2(2 N / M ) = 32, then take k =1 is sufficient. X 1 = 32.

[0022] Step 1.3, raw data each X Compare the size of each point, and calculate the result in a loop. X The maximum and minimum values ​​of a single point are recorded as the first-level extreme value data; Step 1.4: Establish a second program memory segment to store the data calculated in step 1.3. The size of the second program memory segment = 2 * the size of the first program memory segment / X1, and the relative locations of the data storage are consistent. Step 1.5: Determine whether to set the number of floors. k >1, if k If >1, then let the loop variable... i The initial value is 2, check if it is a loop variable. i > k If the loop variable i > k If the condition is met, the process ends; otherwise, proceed to step 1.6. Step 1.6, with the first i The -1 level extreme value data is the processing object, each X i / X i-1 By comparing the first minimum / maximum value, a new minimum / maximum value is obtained, thus obtaining the th minimum / maximum value. i Layer maximum / minimum data; Step 1.7: Store the data obtained in step 1.6 at the end of the second program memory segment. Data size = 2 * first program memory segment / X i ; Step 1.8, Loop Variable i = i +1 and return to step 1.5.

[0023] Example 1 illustrates this point. X 1 = 32, X 2 = 256, X 3 = 2048, Z i The original data is represented in the table below, and the storage method is shown in the table below.

[0024] Step 2: Based on the set coordinate range and the data processed in Step 1, plot the large data extraction curve. For example... Figure 2 As shown, it includes the following steps: Step 2.1: Calculate the picking ratio n = ( dmax - ⌊ dmin ⌋) / ( Maxpoint -1) This is how the picking ratio is set. n This ensures that the number of points on the curve does not exceed 2* Maxpoint The proof formula is as follows: ∵n ≥( dmax -⌊ dmin ⌋) / ( Maxpoint -1) ∴( dmax -⌊ dmin ⌋) / n ≤ Maxpoint -1 Therefore, the number of curve points ≤ 2*( ( dmax -⌊ dmin ⌋) / n +1)≤2*( Maxpoint -1 +1)=2* Maxpoint Step 2.2: Determine whether to remove the percentage of points. n < X 1. If the picking ratio n < X 1. When plotting, the original data, i.e., the data in the first program memory segment, is used directly. n If the maximum and minimum values ​​are compared at each point, the result is added to the plotting buffer and plotted, then proceed to step 3; otherwise, proceed to step 2 or 3. Step 2.3, when the picking ratio n ≥ X At step 1, when plotting, the data in the second program memory segment is used, the result is added to the plotting cache and plotted, and then step 3 is performed.

[0025] Step 2.3.1: Find the value that is not greater than n The largest X i , determine to use the first i The maximum and minimum values ​​of each layer are found based on the size of the data in each layer. i The location of the layer data in the second program memory segment; Step 2.3.2, Calculation m = n / X i ,Every m The maximum value is obtained by comparing each of the maximum values. m The minimum value is obtained by comparing the minimum values, the result is added to the plotting buffer and plotted, and then proceed to step 3.

[0026] Step 3: Determine whether a graphical operation is required. If yes, proceed to step 2; otherwise, continue to step 3.

[0027] Determine whether any operations such as scaling, moving, or setting coordinate ranges of the graphic have been performed. If such operations have been performed, return to step 2; otherwise, return to step 3.

[0028] The graphics operation program load consists of two parts: data extraction load and plotting load. Based on the argument in step one, the data extraction load can always be less than the set upper limit. M According to the argument in step two, the number of plotting points will never exceed 2* Maxpoint In other words, the overall program load is always controllable and is not affected by factors such as the overall data volume or coordinate range.

[0029] It should be emphasized that the embodiments described in this invention are illustrative rather than limiting. Therefore, this invention includes, but is not limited to, the embodiments described in the specific implementation. Any other implementations derived by those skilled in the art based on the technical solutions of this invention are also within the scope of protection of this invention.

Claims

1. A method for plotting large data points with controllable load in data acquisition and monitoring software, characterized by: Includes the following steps: Step 1: Open the data file collected by the PDA system and process the raw sampled data in the data file; Step 1.1: Establish the first program memory segment to store the raw sampling data; Step 1.2: Determine the number of layers based on the total amount of original sampled data, the maximum number of plotting points, and the required data extraction load. k and dependent variable X 1< X 2<…< X i <…< X k ,in X i =2^ j , j is a positive integer; Step 1.3, raw data each X Compare the size of each point, and calculate the result in a loop. X The maximum and minimum values ​​of a single point are recorded as the first-level extreme value data; Step 1.4: Establish a second program memory segment to store the data calculated in step 1.

3. The size of the second program memory segment = 2 * the size of the first program memory segment / X1, and the relative locations of the data storage are consistent. Step 1.5: Determine whether to set the number of floors. k >1, if k If >1, then let the loop variable... i The initial value is 2, check if it is a loop variable. i > k If the loop variable i > k If the condition is met, the process ends; otherwise, proceed to step 1.

6. Step 1.6, with the first i The -1 level extreme value data is the processing object, each X i / X i-1 By comparing the first minimum / maximum value, a new minimum / maximum value is obtained, thus obtaining the th minimum / maximum value. i Layer maximum / minimum data; Step 1.7: Store the data obtained in step 1.6 at the end of the second program memory segment. Data size = 2 * first program memory segment / X i ; Step 1.8, Loop Variable i = i +1 and return to step 1.5; Step 2: Based on the set coordinate range and the data processed in Step 1, plot the large data extraction curve; Step 2.1: Calculate the picking ratio n = ( dmax - ⌊ dmin ⌋) / ( Maxpoint -1) ,in dmin The minimum value on the x-axis. dmax The maximum value of the x-axis. Maxpoint This represents the maximum number of points in the drawing. Step 2.2: Determine whether to remove the percentage of points. n < X 1. If the picking ratio n < X 1. When drawing, the original data, i.e., the data in the first program memory segment, is used directly. n If the maximum and minimum values ​​are compared at each point, the result is added to the plotting buffer and plotted, then proceed to step 3; otherwise, proceed to step 2 or 3. Step 2.3, when the picking ratio n ≥ X At step 1, when plotting, the data in the second program memory segment is used, the result is added to the plotting buffer and plotted, and then step 3 is performed; Step 2.3.1: Find the value that is not greater than n The largest X i , determine to use the first i The maximum and minimum values ​​of each layer are found based on the size of the data in each layer. i The location of the layer data in the second program memory segment; Step 2.3.2, Calculation m = n / X i ,Every m The maximum value is obtained by comparing each of the maximum values. m The minimum value is obtained by comparing the minimum values, the result is added to the plotting buffer and plotted, and then proceed to step 3; Step 3: Determine whether a graphical operation is required. If yes, proceed to step 2; otherwise, continue to step 3. Step 3 involves graphic operations such as scaling, moving, or setting coordinate ranges.

Citation Information

Patent Citations

  • Curve display and inquiry method for large data quantity

    CN101982820A

  • Data trend curve diagram drawing method

    CN106023280A