CN112256218A - Method and device for drawing massive data graphs - Google Patents

Method and device for drawing massive data graphs Download PDF

Info

Publication number
CN112256218A
CN112256218A CN202011065578.7A CN202011065578A CN112256218A CN 112256218 A CN112256218 A CN 112256218A CN 202011065578 A CN202011065578 A CN 202011065578A CN 112256218 A CN112256218 A CN 112256218A
Authority
CN
China
Prior art keywords
data
memory
graph
target
fragment
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.)
Granted
Application number
CN202011065578.7A
Other languages
Chinese (zh)
Other versions
CN112256218B (en
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.)
Synthesis Sunrise Medical Information Technology Co ltd
Original Assignee
Synthesis Sunrise Medical Information Technology Co ltd
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 Synthesis Sunrise Medical Information Technology Co ltd filed Critical Synthesis Sunrise Medical Information Technology Co ltd
Priority to CN202011065578.7A priority Critical patent/CN112256218B/en
Publication of CN112256218A publication Critical patent/CN112256218A/en
Application granted granted Critical
Publication of CN112256218B publication Critical patent/CN112256218B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1407General aspects irrespective of display type, e.g. determination of decimal point position, display with fixed or driving decimal point, suppression of non-significant zeros

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Generation (AREA)

Abstract

The invention discloses a method and a device for drawing a large number of data graphs, which are used for preprocessing original data, and segmenting the original data according to the capacity of a viewport window to obtain a plurality of segmented data, wherein the corresponding capacity of each piece of data is not more than n times of the capacity of the viewport window, and n is an integer more than or equal to 1; when the graph is drawn, corresponding fragment data is extracted according to the target to be displayed, and the graph is drawn on the extracted fragment data. According to the method and the device, the original data are divided into the plurality of fragment data according to the viewport window capacity, and when the graph is drawn, the fragment data corresponding to the target to be displayed are extracted and drawn without loading and drawing all the data, so that the graph drawing efficiency is greatly improved, and the smoothness of data switching between screens is effectively guaranteed.

Description

Method and device for drawing massive data graphs
Technical Field
The invention relates to the field of graph drawing, in particular to a method and a device for drawing a large amount of data graphs.
Background
In the field of graphic drawing, a large amount of original data (namely, data which needs to be displayed by graphic drawing) are often processed, the requirement on display precision is high, and flow display is needed for data switching between screens. For example, when a vital sign application is programmed, a vital sign data graph needs to be drawn, the vital sign data includes data such as blood pressure, heart rate, pulse, respiration, blood oxygen, and the like, and the data volume is often large. At present, when a large amount of data is subjected to graph drawing, a large amount of original data is generally loaded and drawn, so that data switching between screens is not smooth enough, and the graph drawing efficiency is low.
Disclosure of Invention
In order to solve the problems, the invention provides a method and a device for drawing a large amount of data graphs, which improve the data switching smoothness and the drawing efficiency between screens.
The technical scheme of the invention is as follows: a method for drawing a large-volume data graph, comprising the steps of:
preprocessing original data, and segmenting the original data according to the capacity of a viewport window to obtain a plurality of segmented data, wherein the corresponding capacity of each piece of data is not more than n times of the capacity of the viewport window, and n is an integer more than or equal to 1;
when the graph is drawn, corresponding fragment data is extracted according to the target to be displayed, and the graph is drawn on the extracted fragment data.
Further, the horizontal axis of the data graph drawn in the viewport window is time; a viewport window size refers to the number of data points that can be held within the length of time that a viewport window can display.
Further, the method further comprises:
establishing memory mapping for the fragment data, and establishing a one-to-one mapping relation between pointers and physical addresses of the fragment data;
and when the graph is drawn, extracting corresponding fragment data of the target to be displayed based on memory mapping.
Further, when the graph drawing is carried out, the method also comprises the following steps:
and loading the extracted fragment data into a memory.
Further, when the graph drawing is carried out, the method also comprises the following steps:
judging whether the fragment data corresponding to the target to be displayed is loaded into the memory;
if the fragment data is loaded into the memory, performing graph drawing on the loaded fragment data in the memory;
and if the data is not loaded into the memory, extracting corresponding fragment data of the target to be displayed based on memory mapping, reloading the fragment data into the memory, and carrying out graphic drawing on the fragment data reloaded into the memory.
Further, when the fragment data is reloaded into the memory, the fragment data loaded previously in the memory is cleared.
The technical scheme of the invention also comprises a large-amount data graph drawing device, which comprises,
a data preprocessing module: preprocessing original data, and segmenting the original data according to the capacity of a viewport window to obtain a plurality of segmented data, wherein the corresponding capacity of each piece of data is not more than n times of the capacity of the viewport window, and n is an integer more than or equal to 1;
the data extraction and drawing module: when the graph is drawn, corresponding fragment data is extracted according to the target to be displayed, and the graph is drawn on the extracted fragment data.
Further, the horizontal axis of the data graph drawn in the viewport window is time; a viewport window size refers to the number of data points that can be held within the length of time that a viewport window can display.
Further, the device also comprises a control device,
a memory mapping module: and establishing memory mapping for the fragment data, and establishing a one-to-one mapping relation between the pointer and the physical address of the fragment data.
Further, the data extraction and rendering module comprises,
a target receiving unit to be displayed: receiving a target to be displayed;
a display target data judgment unit: judging whether the fragment data corresponding to the target to be displayed is loaded into the memory, if so, informing a graph drawing unit to draw a graph, otherwise, informing a data extraction and loading unit to extract and load data;
a data extraction loading unit: extracting corresponding fragment data of a target to be displayed based on memory mapping, and loading the extracted fragment data into a memory;
a graph drawing unit: and drawing the graph according to the fragment data loaded in the memory.
According to the method and the device for drawing the large-amount data graph, the original data are divided into the plurality of fragment data according to the viewport window capacity, the fragment data corresponding to the target to be displayed are extracted for drawing during graph drawing, all data do not need to be loaded and drawn, graph drawing efficiency is greatly improved, and smoothness of data switching between screens is effectively guaranteed.
Drawings
FIG. 1 is a schematic flow chart of a method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a graphics rendering phase according to an embodiment of the present invention;
fig. 3 is a schematic block diagram of a second structure according to an embodiment of the present invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings by way of specific examples, which are illustrative of the present invention and are not limited to the following embodiments.
Example one
As shown in fig. 1, the present embodiment provides a method for drawing a large amount of data graphs, which includes the following steps:
s1, preprocessing the original data, and slicing the original data according to the capacity of a viewport window to obtain a plurality of sliced data, wherein the corresponding capacity of each piece of data is not more than n times of the capacity of the viewport window, and n is an integer more than or equal to 1;
and S2, when drawing graphics, extracting corresponding fragment data according to the target to be displayed, and drawing graphics on the extracted fragment data.
According to the embodiment, the original data is fragmented, and graph drawing is performed on certain fragment data based on the target to be displayed, so that the graph drawing on all the original data is avoided, the drawing efficiency is greatly improved, and the smoothness of screen switching is ensured.
Preferably, after the target to be displayed is determined, the correspondingly extracted fragment data is loaded to the memory, so that the situation that all original data are loaded to the memory is avoided, the memory occupancy rate is greatly reduced, and the drawing efficiency is further improved.
In the embodiment, a graph horizontal axis of original data displayed in the viewport window is time, generally, ruler grids are used as labels, one grid represents 0.2 second, multiple grids can be drawn on one screen, and the length of one screen can be converted into time; taking vital signs as an example, fixed points can be collected within 1 second, and the points which can be contained within one screen time are the capacity of one screen of data, namely the capacity of a viewport window.
For example, the length of one screen is 2 seconds, and the number of collected points in 2 seconds is the capacity of one screen of data.
In this embodiment, the corresponding capacity of each piece of data is not greater than n times of the capacity of a viewport window, n is an integer greater than or equal to 1, for example, a viewport window capacity is defined as c, the corresponding capacity of each piece of data may be n × c, wherein a value of n is related to the memory occupancy rate, and since the sliced data is loaded into the memory when performing graphic rendering, the value of n should ensure that the memory occupancy rate is not too high, and may be based on the data volume that can be rendered by 2-3 screens.
It should be noted that, when the original data is sliced, the original data is sliced from front to back in sequence according to the time of acquiring the original data. Assuming that the length of one screen is 2 seconds, and the value of n is 2, the data of 0-4 seconds can be divided into a first fragment, the data of 4-8 seconds can be divided into a second fragment, and so on.
The horizontal axis of the graph in this embodiment is time, the target to be shown is also determined according to the time, and data in a certain time interval may be used as the target to be shown, or data at a certain time point may be used as the target to be shown. For example, data within 1-2 seconds is to be displayed, the data within 1-2 seconds corresponds to the first fragment data (one screen length is 2 seconds, n =2, and data within 0-4 seconds is the first fragment), and the first fragment data is extracted and loaded into the memory to draw the graph. The first fragment data comprises data of 1-2 seconds and data of 0-4 seconds in total, actually drawn graphs comprise 2 screens in total, the first screen displays the data of 0-2 seconds, the second screen displays the data of 2-4 seconds, and the two screens can be switched.
The original data of the embodiment are respectively stored in a certain position of the hard disk, and when a certain target to be displayed needs to be displayed, the specific fragment data is extracted from the hard disk into the memory. Therefore, after the original data is sliced, the following steps are also performed in this embodiment:
and establishing memory mapping for the fragment data, and establishing a one-to-one mapping relation between the pointer and the physical address of the fragment data. E.g., sharded data 1- > pointer ptr1, sharded data 2- > pointer ptr2 ….
Correspondingly, when the graph is drawn, corresponding fragment data are extracted from the target to be displayed based on memory mapping.
It should be noted that the memory map further includes information of a time interval corresponding to each piece of data, so that when a target to be displayed (i.e., a time interval to be displayed) is input, corresponding piece of data can be matched, and data is read from the hard disk based on a position pointed by a corresponding pointer.
In this embodiment, the memory map may be stored in the memory.
As shown in fig. 2, in the graph drawing stage, the present embodiment performs the following steps:
the SS1 receives the target to be displayed;
the target to be displayed is input by a worker, and the time interval to be displayed is set based on the time interval.
SS2, judging whether the fragment data corresponding to the target to be displayed is loaded into the memory;
when the display is performed for the first time, no data is loaded in the memory, and the step SS4 may be directly performed, and then when the target to be displayed is changed or refilled, it is necessary to determine whether the fragment data is in the memory.
SS3, if it has been loaded into the memory, drawing the graph of the loaded slicing data in the memory;
for example, the data of 0-2 seconds is displayed for the first time, the first piece of sliced data (0-4 seconds) is loaded in the memory, and if the data of 2-3 seconds needs to be displayed for the second time and the first piece of sliced data is loaded in the memory, the first piece of sliced data loaded in the memory is directly subjected to graphic drawing and refreshing.
If the fragment data is not loaded into the memory, SS4 extracts corresponding fragment data from the target to be displayed based on the memory mapping, and reloads the fragment data into the memory to perform graphic drawing on the fragment data reloaded into the memory;
similarly, data of 0-2 seconds is displayed for the first time, the first piece of fragment data (0-4 seconds) is loaded in the memory, and if data of 5-6 seconds needs to be displayed for the second time, the second piece of fragment data (5-8 seconds) is extracted again and loaded in the memory, and the second piece of fragment data is subjected to graphic drawing.
In specific implementation, the value range of the target to be displayed at each time can be limited according to the time length of one screen, so that only one piece of fragment data is extracted at each time. When the target to be displayed needs to be changed and the fragment data needs to be reloaded into the memory, the fragment data loaded previously in the memory is cleared, so that the maximum memory space is vacated, and the drawing efficiency is improved.
Of course, the value range of the target to be displayed at each time may not be limited, and the target to be displayed at each time may correspond to multiple pieces of fragment data, and the corresponding multiple pieces of fragment data are loaded to the memory at the same time. If the target to be displayed is changed at a certain time, the changed target corresponds to two pieces of fragment data, and when only one piece of fragment data is loaded in the memory, the other piece of fragment data is reloaded, and the loaded fragment data does not need to be cleared and reloaded.
Example two
As shown in fig. 3, on the basis of the first embodiment, the present embodiment provides a massive data graph drawing apparatus, which includes the following functional modules.
The data preprocessing module 101: preprocessing original data, and segmenting the original data according to the capacity of a viewport window to obtain a plurality of segmented data, wherein the corresponding capacity of each piece of data is not more than n times of the capacity of the viewport window, and n is an integer more than or equal to 1;
the data extraction rendering module 102: when the graph is drawn, corresponding fragment data is extracted according to the target to be displayed, and the graph is drawn on the extracted fragment data.
In the embodiment, a graph horizontal axis of original data displayed in the viewport window is time, generally, ruler grids are used as labels, one grid represents 0.2 second, multiple grids can be drawn on one screen, and the length of one screen can be converted into time; taking vital signs as an example, fixed points can be collected within 1 second, and the points which can be contained within one screen time are the capacity of one screen of data, namely the capacity of a viewport window.
The original data is stored on the hard disk, the corresponding fragment data to be displayed according to the target to be displayed is extracted and loaded into the memory, and the device is further provided with a memory mapping module 103 for timely and efficient extraction of the corresponding data.
The memory mapping module 103 creates a memory map for the fragmented data, and establishes a one-to-one mapping relationship between the pointers and the physical addresses of the fragmented data.
The data extraction and rendering module 102 extracts the corresponding fragment data and loads the fragment data to the memory, and performs graph rendering on the extracted fragment data.
Accordingly, the data extraction rendering module 102 includes the following functional units.
A target receiving unit to be displayed: receiving a target to be displayed;
a display target data judgment unit: judging whether the fragment data corresponding to the target to be displayed is loaded into the memory, if so, informing a graph drawing unit to draw a graph, otherwise, informing a data extraction and loading unit to extract and load data;
a data extraction loading unit: extracting corresponding fragment data of a target to be displayed based on memory mapping, and loading the extracted fragment data into a memory;
a graph drawing unit: and drawing the graph according to the fragment data loaded in the memory.
The target to be displayed is input by a worker, and data in a certain time interval can be used as the target to be displayed or data at a certain time point can be used as the target to be displayed by taking a time interval as a reference. When the target to be displayed is changed, if the changed corresponding fragment data is stored in the memory, the corresponding fragment data is directly drawn and refreshed normally, and if the changed corresponding fragment data is not stored in the memory, the corresponding fragment data is extracted again for drawing the graph.
The above disclosure is only for the preferred embodiments of the present invention, but the present invention is not limited thereto, and any non-inventive changes that can be made by those skilled in the art and several modifications and amendments made without departing from the principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A method for drawing a large-volume data graph is characterized by comprising the following steps:
preprocessing, namely segmenting original data according to the capacity of a viewport window to obtain a plurality of segmented data, wherein the corresponding capacity of each piece of data is not more than n times of the capacity of the viewport window, and n is an integer which is more than or equal to 1;
when the graph is drawn, corresponding fragment data is extracted according to the target to be displayed, and the graph is drawn on the extracted fragment data.
2. The method of claim 1, wherein the horizontal axis of the data graph rendered in the viewport window is time; a viewport window size refers to the number of data points that can be held within the length of time that a viewport window can display.
3. A method for rendering a volume of data graphics according to claim 1 or 2, the method further comprising:
establishing memory mapping for the fragment data, and establishing a one-to-one mapping relation between pointers and physical addresses of the fragment data;
and when the graph is drawn, extracting corresponding fragment data of the target to be displayed based on memory mapping.
4. The method for graphic rendering of large amount of data according to claim 3, further comprising the steps of, when performing graphic rendering:
and loading the extracted fragment data into a memory.
5. The method for graphic rendering of large amount of data according to claim 4, further comprising the steps of, when performing graphic rendering:
judging whether the fragment data corresponding to the target to be displayed is loaded into the memory;
if the fragment data is loaded into the memory, performing graph drawing on the loaded fragment data in the memory;
and if the data is not loaded into the memory, extracting corresponding fragment data of the target to be displayed based on memory mapping, reloading the fragment data into the memory, and carrying out graphic drawing on the fragment data reloaded into the memory.
6. The method of claim 5, wherein upon reloading the sliced data into memory, the sliced data previously loaded in memory is purged.
7. A large data pattern drawing apparatus, comprising,
a data preprocessing module: preprocessing, namely segmenting original data according to the capacity of a viewport window to obtain a plurality of segmented data, wherein the corresponding capacity of each piece of data is not more than n times of the capacity of the viewport window, and n is an integer which is more than or equal to 1;
the data extraction and drawing module: when the graph is drawn, corresponding fragment data is extracted according to the target to be displayed, and the graph is drawn on the extracted fragment data.
8. The mass data graph rendering apparatus of claim 7, wherein a horizontal axis of the rendered data graph in the viewport window is time; a viewport window size refers to the number of data points that can be held within the length of time that a viewport window can display.
9. The mass data graphics rendering apparatus of claim 7 or 8, further comprising,
a memory mapping module: and establishing memory mapping for the fragment data, and establishing a one-to-one mapping relation between the pointer and the physical address of the fragment data.
10. The mass data graphics rendering apparatus of claim 9, wherein the data extraction rendering module comprises,
a target receiving unit to be displayed: receiving a target to be displayed;
a display target data judgment unit: judging whether the fragment data corresponding to the target to be displayed is loaded into the memory, if so, informing a graph drawing unit to draw a graph, otherwise, informing a data extraction and loading unit to extract and load data;
a data extraction loading unit: extracting corresponding fragment data of a target to be displayed based on memory mapping, and loading the extracted fragment data into a memory;
a graph drawing unit: and drawing the graph according to the fragment data loaded in the memory.
CN202011065578.7A 2020-09-30 2020-09-30 Method and device for drawing massive data graphs Active CN112256218B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011065578.7A CN112256218B (en) 2020-09-30 2020-09-30 Method and device for drawing massive data graphs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011065578.7A CN112256218B (en) 2020-09-30 2020-09-30 Method and device for drawing massive data graphs

Publications (2)

Publication Number Publication Date
CN112256218A true CN112256218A (en) 2021-01-22
CN112256218B CN112256218B (en) 2023-03-10

Family

ID=74234789

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011065578.7A Active CN112256218B (en) 2020-09-30 2020-09-30 Method and device for drawing massive data graphs

Country Status (1)

Country Link
CN (1) CN112256218B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112860729A (en) * 2021-03-29 2021-05-28 中信银行股份有限公司 Operation method, operation device, electronic equipment and readable storage medium
CN113129407A (en) * 2021-03-15 2021-07-16 武汉联影智融医疗科技有限公司 Physiological waveform chart drawing method and device, computer equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107784195A (en) * 2017-11-30 2018-03-09 新华三大数据技术有限公司 Data processing method and device
US20180262670A1 (en) * 2017-03-07 2018-09-13 Illumina, Inc. Systems and methods for improved focus tracking using a hybrid mode light source
CN111652955A (en) * 2020-04-09 2020-09-11 北京奇艺世纪科技有限公司 Data display method and device, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180262670A1 (en) * 2017-03-07 2018-09-13 Illumina, Inc. Systems and methods for improved focus tracking using a hybrid mode light source
CN107784195A (en) * 2017-11-30 2018-03-09 新华三大数据技术有限公司 Data processing method and device
CN111652955A (en) * 2020-04-09 2020-09-11 北京奇艺世纪科技有限公司 Data display method and device, computer equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113129407A (en) * 2021-03-15 2021-07-16 武汉联影智融医疗科技有限公司 Physiological waveform chart drawing method and device, computer equipment and readable storage medium
CN113129407B (en) * 2021-03-15 2023-08-18 武汉联影智融医疗科技有限公司 Physiological waveform drawing method, device, computer equipment and readable storage medium
CN112860729A (en) * 2021-03-29 2021-05-28 中信银行股份有限公司 Operation method, operation device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN112256218B (en) 2023-03-10

Similar Documents

Publication Publication Date Title
CN112256218B (en) Method and device for drawing massive data graphs
EP0026266B1 (en) Digital data display system
EP0179193B1 (en) Data display systems having a display source merge capability and using a storage-type display device
GB2191666A (en) Video display apparatus
US11644810B2 (en) Hybrid rendering HMI terminal device
CN101246550B (en) Image character recognition method and device
CN107092655A (en) Circularly exhibiting method and system for organizing figure in Android widescreen equipment
EP0026268A2 (en) Digital data display system
CN109446506B (en) Automatic reconstruction method and device for electronic form table
US8487952B2 (en) Methods and systems for marking pixels for image monitoring
US6914608B2 (en) Screen display processing apparatus, screen display processing method and computer program
CN110675800A (en) Display screen driving method and device
US6295059B1 (en) Method of vertically compressing a large list of data to fit on a screen
CA2023832C (en) Method and apparatus for filing contours in digital typefaces
CN108733441A (en) A kind of rendering method for visualizing and system suitable for large scale electric network symbolic device
CN111506679A (en) Map element data generation method, map element data display method, map element data generation device, map element data display device, medium, and equipment
CN1121656C (en) Characters display method under apparent window environment
CN104571791A (en) Information processing method and electronic equipment
CN113297313A (en) Table data display method and device, electronic equipment and storage medium
CN109189789B (en) Method and device for displaying table
US6262727B1 (en) Method of compressing and expanding large lists of data
US6295060B1 (en) Method of quickly expanding large lists of compressed data
JP7118194B1 (en) Graph generation device, graph generation method, and computer program
CN101840411B (en) Data demagnification and load display method, device and system
CN112486477B (en) File generation method and device, electronic equipment and storage medium

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
CB02 Change of applicant information

Address after: 250000 East Hall, five floor, R & D and production building, 2 Shenhua science and Technology Park, 699 Shun Hua West Road, Ji'nan High-tech Zone, Shandong

Applicant after: Shensi (Shandong) Medical Information Technology Co.,Ltd.

Address before: 250000 East Hall, five floor, R & D and production building, 2 Shenhua science and Technology Park, 699 Shun Hua West Road, Ji'nan High-tech Zone, Shandong

Applicant before: SYNTHESIS SUNRISE MEDICAL INFORMATION TECHNOLOGY CO.,LTD.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant