CN104156427A - Graph drawing method and system supporting large data volume fast refreshing - Google Patents
Graph drawing method and system supporting large data volume fast refreshing Download PDFInfo
- Publication number
- CN104156427A CN104156427A CN201410387983.9A CN201410387983A CN104156427A CN 104156427 A CN104156427 A CN 104156427A CN 201410387983 A CN201410387983 A CN 201410387983A CN 104156427 A CN104156427 A CN 104156427A
- Authority
- CN
- China
- Prior art keywords
- unit
- painting canvas
- chart element
- big data
- data quantity
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/904—Browsing; Visualisation therefor
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Image Generation (AREA)
Abstract
The invention provides a graph drawing method and system supporting large data volume fast refreshing. The method comprises the steps that (a) a container unit is used for updating coordinate data, the layout of the container unit is adjusted, and redrawing is conducted on drawing cloth; (b) the fact that a buffer needs to be set for the drawing cloth when redrawing is conducted on the drawing cloth is judged, graph element content is drawn on the related buffer of a device first when redrawing is conducted on the drawing cloth, and then the content in the buffer is drawn on the drawing cloth; (c) a drawing cloth unit is used for calling a graph element unit to draw graph elements or calling image content of an old buffer to be drawn on the drawing cloth. According to the graph drawing method and system supporting large data volume fast refreshing, the purpose of large data volume fast refreshing is achieved by achieving a graph element cache mechanism and using multiple cpus for separating data collecting and data drawing work out, and thus the problems of slow refreshing, incoherence of images and the like are solved.
Description
Technical field
The present invention relates to graph making technical field, relate in particular to a kind of graph making method and system of supporting big data quantity fast refresh.
?
Background technology
Existing graph making system generally comprises container, coordinate, and painting canvas, chart element, miscellaneous.Take qwt chart plot as example, and its curve map implementation is as follows:
1: container comprises coordinate, painting canvas, and some other miscellaneous, chart element is presented in painting canvas in the mode of layer;
2: when chart refreshes, first container upgrades coordinate data, then adjusts self layout, redraws painting canvas;
3: when painting canvas redraws, can be chosen as painting canvas and use buffering or directly draw.When buffering is set, first chart element is plotted in device-dependent buffering, and then buffer content is plotted to painting canvas, follow-up drafting can change and select painting canvas repaint or directly buffer contents be plotted to painting canvas according to drafting condition.There is not buffer zone in chart element, repaint chart element all needs to repaint at every turn;
4: painting canvas is used buffering associated with plotting equipment, and is not thread-safe, and repainting chart element must complete at main thread.
From qwt chart plot logic, can see, in application of oscillograph, suppose that oscillograph storage depth is 10K, time base be 10us, the time that gathers full screen data is 100us, data point number is 10240.If there is no special processing, will inevitably cause Refresh Data not in time, screen display chart can not truer reflected waveform data variation, thus there will be refresh slow, the problem such as image is discontinuous.
Summary of the invention
The object of the present invention is to provide a kind of graph making method and system of supporting big data quantity fast refresh, by realizing chart element caching mechanism, utilize many cpu to isolate data acquisition and data drawing, to reach big data quantity fast refresh object.
The object of the invention is to be achieved through the following technical solutions.
A graph making method of supporting big data quantity fast refresh, comprising:
A: container unit upgrades coordinate data, adjusts container unit layout, redraws painting canvas;
B: judgement redraws painting canvas and need to buffering be set for painting canvas, is first plotted to chart element content in device-dependent buffering while redrawing painting canvas, and then buffer content is plotted to painting canvas;
C: painting canvas cell call chart element unit carries out chart element drafting or call old buffering picture material being plotted to painting canvas.
Further preferably, in described step b, judgement redraws painting canvas buffering is not set, and directly draws painting canvas.
Further preferably, when described step b redraws painting canvas, according to drafting condition, set up new buffering, chart element in cyclic query container, is first plotted to chart element content in device-dependent buffering, and then buffer content is plotted to painting canvas.
When further preferably, described step b redraws painting canvas, according to drafting condition, change and select painting canvas repaint or directly old buffer content be plotted to painting canvas.
Further preferably, step c specifically comprises:
C1: one image buffer is set in chart element unit;
C2: the inconsistent or state of decision chart element size and canvas size changes, sets up newly buffering, repaints chart element to buffer zone.
Further preferably, in step c2, decision chart element size and state consistent with canvas size do not change, and calls old buffering picture material and is plotted to painting canvas.
Further preferably, before step a, also comprise: container unit initialization operation.
Further preferably, described container unit initialization operation specifically comprises: container unit carries out initialization operation to coordinate system unit, painting canvas unit and chart element unit.
A graph making system of supporting big data quantity fast refresh, comprises a container unit, and described container unit is comprised of coordinate system unit, painting canvas unit, chart element unit;
Described container unit is for carrying out initialization to coordinate system unit, painting canvas unit and chart element unit;
Described coordinate system unit is used for realizing coordinate conversion, and coordinate axis is drawn;
Described painting canvas unit is used for realizing concrete graph making;
Described chart element unit is used for preserving revises oneself state value, and when redrawing painting canvas, painting canvas completes drafting by enumerating the drafting function of the chart element calling in container.
Further preferably, described chart element unit comprises background grid figure table unit, curve unit.
The present invention compared with prior art, beneficial effect is: the graph making method and system of support big data quantity fast refresh provided by the invention, by realizing chart element caching mechanism, utilize many cpu to isolate data acquisition and data drawing, to reach big data quantity fast refresh object, thereby avoid occurring refreshing slow, the problem such as image is discontinuous.
?
Accompanying drawing explanation
Fig. 1 is the graph making system architecture diagram that the present invention supports big data quantity fast refresh;
Fig. 2 is the graph making method flow diagram that the present invention supports big data quantity fast refresh;
Fig. 3 is chart element method for drafting process flow diagram in the present invention.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Refer to shown in Fig. 1, the present invention supports the graph making system of big data quantity fast refresh, comprises a container unit,
Described container unit is comprised of coordinate system unit, painting canvas unit, chart element unit etc.;
Described container unit is used for coordinate system unit, painting canvas unit and chart element unit to carry out initialization,
Described coordinate system unit is used for realizing coordinate conversion, and coordinate axis is drawn.Coordinate conversion supports coordinate figure and graphic plotting system pixel mutually to change.
Described painting canvas unit is used for realizing concrete graph making;
Described chart element unit is used for preserving revises oneself state value, and when redrawing painting canvas, painting canvas completes drafting by enumerating the drafting function of the chart element calling in container.
The chart element unit on basis comprises background grid figure table unit, curve unit.
Refer to shown in Fig. 2, the present invention supports the graph making method of big data quantity fast refresh, comprising:
Step 201: container unit initialization operation;
Particularly, container unit carries out initialization operation to coordinate system unit, painting canvas unit and chart element unit.
Step 202: container unit upgrades coordinate data, adjusts container unit layout, redraws painting canvas;
Step 203: whether judgement redraws painting canvas is that painting canvas arranges buffering, if so, enters step 204; Otherwise, directly draw painting canvas;
Step 204: first chart element content is plotted in device-dependent buffering while redrawing painting canvas, and then buffer content is plotted to painting canvas;
Particularly, while redrawing painting canvas, according to drafting condition, set up new buffering, chart element in cyclic query container, is first plotted to chart element content in device-dependent buffering, and then buffer content is plotted to painting canvas.
While further, redrawing painting canvas, according to drafting condition, change and select painting canvas repaint or directly old buffer content be plotted to painting canvas.
Step 205: painting canvas cell call chart element unit carries out chart element drafting.
Particularly, refer to the drawing process of chart element shown in Fig. 3 as follows:
Step 301: one image buffer is set in chart element unit;
Step 302: whether decision chart element size follows painting canvas unanimously and state does not change, and if so, enters step 304; Otherwise, enter step 303;
Step 303: set up newly buffering, repaint chart element to buffer zone;
Step 304: call old buffering picture material and be plotted to painting canvas.
Particularly, owing to being provided with the image buffer of a device independent in chart element unit, the each drafting according to condition of chart element set, and can consider to use previous old buffering picture material or repaint picture material to buffer zone.
Chart element can be drawn and is put into other threads in actual applications, in there is many cpu environment, can improve the utilization rate of cpu.For example, when cpu is more than or equal to 3, can start 3 left and right threads, or can be by collecting thread, chart element is drawn thread and is merged to a thread.
The graph making method and system of support big data quantity fast refresh provided by the invention, by realizing chart element caching mechanism, utilize many cpu to isolate data acquisition and data drawing, to reach big data quantity fast refresh object, thereby avoid occurring refreshing slow, the problem such as image is discontinuous.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.
Claims (10)
1. a graph making method of supporting big data quantity fast refresh, is characterized in that, comprising:
A: container unit upgrades coordinate data, adjusts container unit layout, redraws painting canvas;
B: judgement redraws painting canvas and need to buffering be set for painting canvas, is first plotted to chart element content in device-dependent buffering while redrawing painting canvas, and then buffer content is plotted to painting canvas;
C: painting canvas cell call chart element unit carries out chart element drafting or call old buffering picture material being plotted to painting canvas.
2. the graph making method of support big data quantity fast refresh as claimed in claim 1, is characterized in that, in described step b, judgement redraws painting canvas buffering is not set, and directly draws painting canvas.
3. the graph making method of support big data quantity fast refresh as claimed in claim 1, it is characterized in that, when redrawing painting canvas, described step b sets up new buffering according to drafting condition, chart element in cyclic query container, first chart element content is plotted in device-dependent buffering, and then buffer content is plotted to painting canvas.
4. the graph making method of support big data quantity fast refresh as claimed in claim 1, is characterized in that, when described step b redraws painting canvas, according to drafting condition, changes and selects painting canvas repaint or directly old buffer content be plotted to painting canvas.
5. the graph making method of support big data quantity fast refresh as claimed in claim 1, is characterized in that, step c specifically comprises:
C1: one image buffer is set in chart element unit;
C2: the inconsistent or state of decision chart element size and canvas size changes, sets up newly buffering, repaints chart element to buffer zone.
6. the graph making method of support big data quantity fast refresh as claimed in claim 5, is characterized in that, in step c2, decision chart element size and state consistent with canvas size do not change, and calls old buffering picture material and is plotted to painting canvas.
7. the graph making method of support big data quantity fast refresh as claimed in claim 1, is characterized in that, also comprises: container unit initialization operation before step a.
8. the graph making method of support big data quantity fast refresh as claimed in claim 7, is characterized in that, described container unit initialization operation specifically comprises: container unit carries out initialization operation to coordinate system unit, painting canvas unit and chart element unit.
9. a graph making system of supporting big data quantity fast refresh, is characterized in that, comprises a container unit, and described container unit is comprised of coordinate system unit, painting canvas unit, chart element unit;
Described container unit is for carrying out initialization to coordinate system unit, painting canvas unit and chart element unit;
Described coordinate system unit is used for realizing coordinate conversion, and coordinate axis is drawn;
Described painting canvas unit is used for realizing concrete graph making;
Described chart element unit is used for preserving revises oneself state value, and when redrawing painting canvas, painting canvas completes drafting by enumerating the drafting function of the chart element calling in container.
10. the graph making system of support big data quantity fast refresh as claimed in claim 9, is characterized in that, described chart element unit comprises background grid figure table unit, curve unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410387983.9A CN104156427A (en) | 2014-08-07 | 2014-08-07 | Graph drawing method and system supporting large data volume fast refreshing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410387983.9A CN104156427A (en) | 2014-08-07 | 2014-08-07 | Graph drawing method and system supporting large data volume fast refreshing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104156427A true CN104156427A (en) | 2014-11-19 |
Family
ID=51881925
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410387983.9A Pending CN104156427A (en) | 2014-08-07 | 2014-08-07 | Graph drawing method and system supporting large data volume fast refreshing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104156427A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107463654A (en) * | 2017-07-27 | 2017-12-12 | 武汉票据交易中心有限公司 | A kind of chart data renewal method for drafting and device |
CN113535280A (en) * | 2021-08-04 | 2021-10-22 | 北京字跳网络技术有限公司 | Pattern drawing method, device, equipment, computer readable storage medium and product |
CN114489910A (en) * | 2022-02-10 | 2022-05-13 | 北京字跳网络技术有限公司 | Video conference data display method, device, equipment and medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101441779A (en) * | 2008-12-26 | 2009-05-27 | 南京师范大学 | Rapid dynamic drafting method of magnanimity digital terrain |
-
2014
- 2014-08-07 CN CN201410387983.9A patent/CN104156427A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101441779A (en) * | 2008-12-26 | 2009-05-27 | 南京师范大学 | Rapid dynamic drafting method of magnanimity digital terrain |
Non-Patent Citations (2)
Title |
---|
ALAN00000: ""QwtPlot介绍及实例"", 《HTTP://BLOG.CSDN.NET/ALAN00000/ARTICLE/DETAILS/12054917》 * |
小龙王2010: ""双缓冲技术绘图原理及简单的VC实现"", 《HTTP://BLOG.CSDN.NET/XIAOLONGWANG2010/ARTICLE/DETAILS/10247801》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107463654A (en) * | 2017-07-27 | 2017-12-12 | 武汉票据交易中心有限公司 | A kind of chart data renewal method for drafting and device |
CN113535280A (en) * | 2021-08-04 | 2021-10-22 | 北京字跳网络技术有限公司 | Pattern drawing method, device, equipment, computer readable storage medium and product |
CN113535280B (en) * | 2021-08-04 | 2023-03-21 | 北京字跳网络技术有限公司 | Pattern drawing method, device, equipment, computer readable storage medium and product |
CN114489910A (en) * | 2022-02-10 | 2022-05-13 | 北京字跳网络技术有限公司 | Video conference data display method, device, equipment and medium |
CN114489910B (en) * | 2022-02-10 | 2024-05-17 | 北京字跳网络技术有限公司 | Video conference data display method, device, equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2016095728A1 (en) | Multi-window display method and device | |
CN105786301B (en) | Method and device for switching display object under multi-window system | |
CN109375980B (en) | Touch drawing method based on Andriod system | |
US10049625B1 (en) | Context-based rendering | |
TW201435798A (en) | Drawing method, device and terminal | |
US11561637B2 (en) | Method and device of drawing handwriting track, electronic apparatus, medium, and program product | |
US20160378272A1 (en) | Systems and methods for providing multi-focus to applications for collaboration | |
US9529463B1 (en) | Method and device for reducing latency for rendering and displaying stylus strokes | |
CN114020233B (en) | Meeting whiteboard window mode writing adaptation method, system, device and medium | |
CN106681586A (en) | Placement position adjusting method and device | |
CN104156427A (en) | Graph drawing method and system supporting large data volume fast refreshing | |
US11610563B2 (en) | Location-based display of pixel history | |
WO2023160282A1 (en) | Display rendering method and apparatus, electronic device and readable storage medium | |
CN104385920B (en) | Realization method of pointer type virtual instrument panel | |
CN103678261A (en) | Method, device and equipment for rapidly displaying TTFs | |
CN107015726A (en) | A kind of multidate information methods of exhibiting and device | |
CN102004621B (en) | Graphic display method, device and system | |
CN103700362A (en) | Multi-signal window display method and multi-signal window display device | |
CN103226456A (en) | Image display method and device for tiled wall | |
CN104571791A (en) | Information processing method and electronic equipment | |
CN116360734A (en) | Rendering method and device, storage medium and electronic equipment | |
CN105159647A (en) | Method and device for refreshing screen | |
CN105930041B (en) | Menu generation method and device based on liquid crystal display | |
CN104571844A (en) | Information processing method and electronic equipment | |
CN103677698A (en) | Method and device for displaying content |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20141119 |
|
RJ01 | Rejection of invention patent application after publication |