CN110263310B - Data graph generation method and device and computer readable storage medium - Google Patents

Data graph generation method and device and computer readable storage medium Download PDF

Info

Publication number
CN110263310B
CN110263310B CN201910404757.XA CN201910404757A CN110263310B CN 110263310 B CN110263310 B CN 110263310B CN 201910404757 A CN201910404757 A CN 201910404757A CN 110263310 B CN110263310 B CN 110263310B
Authority
CN
China
Prior art keywords
data
target
coordinate axis
target data
truncation
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.)
Active
Application number
CN201910404757.XA
Other languages
Chinese (zh)
Other versions
CN110263310A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910404757.XA priority Critical patent/CN110263310B/en
Publication of CN110263310A publication Critical patent/CN110263310A/en
Application granted granted Critical
Publication of CN110263310B publication Critical patent/CN110263310B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a data graph generation method, which comprises the following steps: acquiring a target file provided by a user; reading target data in the target file; carrying out statistical processing on the target data to determine the boundary of a coordinate axis; judging whether to execute coordinate axis truncation; if the coordinate axis truncation is executed, drawing a target data graph by using a coordinate axis truncation strategy based on the boundary of the coordinate axis; and if the coordinate axis truncation is not executed, drawing a target data diagram according to the time sequence of the target data based on the boundary of the coordinate axis. The invention can improve the drawing efficiency, adapt to the trend and the requirement of big data drawing, and improve the accuracy and the readability of the data drawing result.

Description

Data graph generation method and device and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data graph generating method, a data graph generating device, and a computer readable storage medium.
Background
Traditional data drawing is mainly based on Excel and other data processing software for manual drawing, but along with rapid development of large data technology and improvement of productivity, the traditional drawing mode cannot meet the input requirement of current mass data, and is difficult to realize the regularized high-efficiency image output requirement. In addition, the higher-end drawing requirements such as image cutting, proportional splicing and the like are difficult to realize in common drawing software, are mostly finished in a manual correction mode, are time-consuming and labor-consuming, and have larger drawing bottlenecks.
Disclosure of Invention
The invention provides a data graph generation method, a data graph generation device and a computer readable storage medium, which mainly aim to automatically generate test cases and automatically display the test cases to a user for the user to select, thereby improving user experience.
In order to achieve the above object, the present invention further provides a data map generating method, which includes:
acquiring a target file provided by a user;
reading target data in the target file;
carrying out statistical processing on the target data to determine the boundary of a coordinate axis;
judging whether to execute coordinate axis truncation;
If the coordinate axis truncation is executed, drawing a target data graph by using a coordinate axis truncation strategy based on the boundary of the coordinate axis;
and if the coordinate axis truncation is not executed, drawing a target data diagram according to the time sequence of the target data based on the boundary of the coordinate axis.
Preferably, the reading the target data in the target file includes:
And obtaining target data by reading space characters in row data of the target file, wherein the target data comprises at least one group of data groups, and each group of data groups corresponds to a data graph.
Preferably, the statistical processing on the target data, and determining the boundary of the coordinate axis includes:
For each group of data groups, sequencing each group of data groups according to the sequence increasing sequence, so that each group of data groups are arranged in sequence increasing mode to obtain arrangement data of each group;
acquiring a target value maximum value and a target value minimum value and a time point maximum value and a time point minimum value in at least one group of data according to the arrangement data of each group;
Determining the upper and lower boundaries of the ordinate axis according to the target value maximum value and the target value minimum value;
And determining the upper and lower boundaries of the abscissa axis according to the maximum value and the minimum value of the time points.
Preferably, the determining whether to perform coordinate axis truncation includes:
if no data point exists in the area exceeding the preset range in the target data, determining that a cutoff point exists, and executing coordinate axis cutoff.
Preferably, the drawing the target data graph by using the coordinate axis truncation strategy based on the boundary of the coordinate axis includes:
dividing the target data into a plurality of parts by using a cut-off point;
Respectively drawing a data subgraph corresponding to the data of each part;
and splicing the data subgraphs corresponding to the data of each part in the coordinate axis based on the boundary of the coordinate axis, and obtaining the target data graph.
Preferably, the drawing the target data map according to the time sequence of the target data based on the boundary of the coordinate axis includes:
acquiring the maximum value and the minimum value of each group of data according to the arrangement data of each group, and determining the upper and lower boundaries of the drawing of the group of data;
and in the blank spaces of the upper and lower boundaries, according to the time sequence of the arrangement data of each group, the data points of each group of data are drawn into the graph one by one, and the target data graph is obtained.
Preferably, the method further comprises:
If multiple groups of data exist in the target data, drawing each data graph by adopting different preset patterns.
Preferably, the method further comprises:
and scaling down the target data graph to a preset size, and drawing coordinate scale lines and marks in the target data graph.
In order to achieve the above object, the present invention also provides a data map generating apparatus comprising a memory and a processor, the memory storing a data map generating program executable on the processor, the data map generating program implementing the steps when executed by the processor of:
acquiring a target file provided by a user;
reading target data in the target file;
carrying out statistical processing on the target data to determine the boundary of a coordinate axis;
judging whether to execute coordinate axis truncation;
If the coordinate axis truncation is executed, drawing a target data graph by using a coordinate axis truncation strategy based on the boundary of the coordinate axis;
and if the coordinate axis truncation is not executed, drawing a target data diagram according to the time sequence of the target data based on the boundary of the coordinate axis.
In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a data map generation program executable by one or more processors to implement the steps of the data map generation method as described above.
Through the technical scheme, the target file provided by the user is obtained; reading target data in the target file; carrying out statistical processing on the target data to determine the boundary of a coordinate axis; judging whether to execute coordinate axis truncation; if the coordinate axis truncation is executed, drawing a target data graph by using a coordinate axis truncation strategy based on the boundary of the coordinate axis; and if the coordinate axis truncation is not executed, drawing a target data diagram according to the time sequence of the target data based on the boundary of the coordinate axis. The invention can improve the drawing efficiency, adapt to the trend and the requirement of big data drawing, and improve the accuracy and the readability of the data drawing result.
Drawings
FIG. 1 is a flowchart illustrating a method for generating a data map according to an embodiment of the present invention;
Fig. 2 is a schematic diagram of an internal structure of a data map generating apparatus according to an embodiment of the present invention;
fig. 3 is a schematic block diagram of a data map generating program in a data map generating apparatus according to an embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The invention provides a data graph generation method. Referring to fig. 1, a flow chart of a data map generating method according to an embodiment of the invention is shown. The method may be performed by an apparatus, which may be implemented in software and/or hardware.
In this embodiment, the data map generating method includes:
s10, acquiring a target file provided by a user.
In this embodiment, a data file provided from a user is received as input to the drawing process. The data files are stored primarily in csv, txt, xls or xlsx format.
Wherein the csv file stores the tabular data (numbers and text) in plain text form. Plain text is a sequence of characters that does not contain data that must be interpreted as binary digits. The csv file consists of any number of records, and the records are separated by a certain line feed symbol; each record consists of fields, with the separators between the fields being other characters or strings, most commonly commas or tab. the data storage mode of the txt format data file is similar to that of the csv, the data is separated by the separator, and the reading mode is also the same as that of the csv file. Reading xls or xlsx files directly reads data by reading data of each cell in the same row.
S11, reading target data in the target file.
In this embodiment, the reading the target data in the target file includes:
And obtaining target data by reading space characters in row data of the target file, wherein the target data comprises at least one group of data groups, and each group of data groups corresponds to a data graph.
In a specific implementation, data of the same abscissa (i.e. the time point) is read by reading each row of data in the target file, and the data is partitioned by reading space characters in the row of data. The first data after segmentation represents the abscissa (time point) of the current data, and the subsequent data amount represents the group number of the data groups in the data table, namely the number of broken lines needed to be drawn in the graph, and each data represents the ordinate value of the data group in the abscissa (time point). The data group number is recorded in the memory for the subsequent steps. After one line of data is read, the next line is moved to continue to read the data at the next time point until the end of the file is read, namely, all the data lines in the data file are read.
S12, carrying out statistical processing on the target data, and determining the boundary of the coordinate axis.
In order to avoid the situations of poor readability, insignificant trend display and the like of the drawn data graph caused by unreasonable coordinate scale selection or larger coordinate axis interval, statistics and analysis are required to be carried out on the data before drawing so as to determine the boundary and scale of the drawn data graph.
Preferably, the statistical processing on the target data, and determining the boundary of the coordinate axis includes:
For each group of data groups, sequencing each group of data groups according to the sequence increasing sequence, so that each group of data groups are arranged in sequence increasing mode to obtain arrangement data of each group;
acquiring a target value maximum value and a target value minimum value and a time point maximum value and a time point minimum value in at least one group of data according to the arrangement data of each group;
Determining the upper and lower boundaries of the ordinate axis according to the target value maximum value and the target value minimum value;
And determining the upper and lower boundaries of the abscissa axis according to the maximum value and the minimum value of the time points.
S13, judging whether to execute coordinate axis truncation.
In one embodiment, preferably, the determining whether to perform coordinate axis truncation includes:
if no data point exists in the area exceeding the preset range in the target data, determining that a cutoff point exists, and executing coordinate axis cutoff.
For example, if one part of data falls in the range of 0-100 and the other part of data falls in the range of 500-900, 100 and 500 are recorded as cut-off points, and the cut-off points must be processed correspondingly in the subsequent drawing process.
And S14, if the coordinate axis truncation is executed, drawing a target data diagram by using a coordinate axis truncation strategy based on the boundary of the coordinate axis.
Preferably, the drawing the target data graph by using the coordinate axis truncation strategy based on the boundary of the coordinate axis includes:
dividing the target data into a plurality of parts by using a cut-off point;
Respectively drawing a data subgraph corresponding to the data of each part;
and splicing the data subgraphs corresponding to the data of each part in the coordinate axis based on the boundary of the coordinate axis, and obtaining the target data graph.
Specifically, the data point is divided into two or more parts by utilizing the cutoff point, each part is respectively drawn as a sub-graph, and the specific process of sub-graph drawing is consistent with the drawing method in the next step. And after drawing, splicing the subgraphs in proportion to splice the subgraphs of all the parts in the complete same coordinate system. And finally unifying the coordinate axes, removing redundant coordinate axes, and marking a cutting mark and a cutting point value on the cutting position of the coordinate axes in the spliced graph.
And S15, if the coordinate axis truncation is not executed, drawing a target data diagram according to the time sequence of the target data based on the boundary of the coordinate axis.
Preferably, the drawing the target data map according to the time sequence of the target data based on the boundary of the coordinate axis includes:
acquiring the maximum value and the minimum value of each group of data according to the arrangement data of each group, and determining the upper and lower boundaries of the drawing of the group of data;
and in the blank spaces of the upper and lower boundaries, according to the time sequence of the arrangement data of each group, the data points of each group of data are drawn into the graph one by one, and the target data graph is obtained.
Specifically, the upper and lower boundaries of the drawing are determined according to the obtained maximum value and minimum value of the data set, and a proper white space is added to the upper and lower boundaries, so that the curve is prevented from reaching the boundary of the picture, and the visual impression is prevented from being influenced. After determining the drawing boundary, the data points are drawn into the drawing one by one according to time sequence. For each data point, the abscissa is the first value of the data line (i.e., the instant point), and the ordinate corresponds to the relative position of the value on the ordinate. And (3) finishing drawing a point every time, namely connecting the point with the previous point in a straight line to form a broken line until the curve is drawn.
Preferably, the method further comprises:
If multiple groups of data exist in the target data, drawing each data graph by adopting different preset patterns. When a plurality of groups of data exist, the system draws the groups of data respectively by adopting preset different modes, so that the user can distinguish and identify the data conveniently. The drawing of multiple sets of data shares the same coordinate system so that the user analyzes the dynamic change relation and numerical comparison of the multiple sets of data.
Preferably, the method further comprises:
And scaling down the target data graph to a preset size, and drawing coordinate scale lines and marks in the target data graph. The user can conveniently know the approximate numerical range of the data, and the readability of the data graph is improved. For the output pictures of multiple groups of data, a style mark is added at the upper right corner of the picture so as to prompt a user to distinguish the data groups.
The invention discloses a data graph generation method, which comprises the following steps: acquiring a target file provided by a user; reading target data in the target file; carrying out statistical processing on the target data to determine the boundary of a coordinate axis; judging whether to execute coordinate axis truncation; if the coordinate axis truncation is executed, drawing a target data graph by using a coordinate axis truncation strategy based on the boundary of the coordinate axis; and if the coordinate axis truncation is not executed, drawing a target data diagram according to the time sequence of the target data based on the boundary of the coordinate axis. The invention can improve the drawing efficiency, adapt to the trend and the requirement of big data drawing, and improve the accuracy and the readability of the data drawing result.
The invention also provides a data graph generating device. Referring to fig. 2, an internal structure of a data map generating apparatus according to an embodiment of the present invention is shown.
In this embodiment, the data map generating apparatus 1 may be a personal computer (Personal Computer, PC), or may be a terminal device such as a smart phone, a tablet computer, or a portable computer. The data map generating device 1 comprises at least a memory 11, a processor 12, a communication bus 13, and a network interface 14.
The memory 11 includes at least one type of readable storage medium including flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the data-map generating apparatus 1, for example a hard disk of the data-map generating apparatus 1. The memory 11 may also be an external storage device of the data map generating apparatus 1 in other embodiments, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the data map generating apparatus 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the data map generating apparatus 1. The memory 11 may be used not only for storing application software installed in the data map generating apparatus 1 and various types of data, for example, codes of the data map generating program 01 and the like, but also for temporarily storing data that has been output or is to be output.
The processor 12 may in some embodiments be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chip for executing program code or processing data stored in the memory 11, such as executing the data diagram generation program 01, etc.
The communication bus 13 is used to enable connection communication between these components.
The network interface 14 may optionally comprise a standard wired interface, a wireless interface (e.g. WI-FI interface), typically used to establish a communication connection between the apparatus 1 and other electronic devices.
Optionally, the device 1 may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an Organic Light-Emitting Diode (OLED) touch, or the like. The display may also be referred to as a display screen or a display unit, as appropriate, for displaying information processed in the data map generating device 1 and for displaying a visual user interface.
Fig. 2 shows only the data-map generating apparatus 1 with the components 11-14 and the data-map generating program 01, it being understood by a person skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the data-map generating apparatus 1, and may comprise fewer or more components than shown, or may combine certain components, or may be arranged in different components.
In the embodiment of the apparatus 1 shown in fig. 2, the memory 11 stores a data map generation program 01; the processor 12 executes the data map generation program 01 stored in the memory 11, and realizes the following steps:
and obtaining the target file provided by the user.
In this embodiment, a data file provided from a user is received as input to the drawing process. The data files are stored primarily in csv, txt, xls or xlsx format.
Wherein the csv file stores the tabular data (numbers and text) in plain text form. Plain text is a sequence of characters that does not contain data that must be interpreted as binary digits. The csv file consists of any number of records, and the records are separated by a certain line feed symbol; each record consists of fields, with the separators between the fields being other characters or strings, most commonly commas or tab. the data storage mode of the txt format data file is similar to that of the csv, the data is separated by the separator, and the reading mode is also the same as that of the csv file. Reading xls or xlsx files directly reads data by reading data of each cell in the same row.
And reading target data in the target file.
In this embodiment, the reading the target data in the target file includes:
And obtaining target data by reading space characters in row data of the target file, wherein the target data comprises at least one group of data groups, and each group of data groups corresponds to a data graph.
In a specific implementation, data of the same abscissa (i.e. the time point) is read by reading each row of data in the target file, and the data is partitioned by reading space characters in the row of data. The first data after segmentation represents the abscissa (time point) of the current data, and the subsequent data amount represents the group number of the data groups in the data table, namely the number of broken lines needed to be drawn in the graph, and each data represents the ordinate value of the data group in the abscissa (time point). The data group number is recorded in the memory for the subsequent steps. After one line of data is read, the next line is moved to continue to read the data at the next time point until the end of the file is read, namely, all the data lines in the data file are read.
And carrying out statistical processing on the target data to determine the boundary of the coordinate axis.
In order to avoid the situations of poor readability, insignificant trend display and the like of the drawn data graph caused by unreasonable coordinate scale selection or larger coordinate axis interval, statistics and analysis are required to be carried out on the data before drawing so as to determine the boundary and scale of the drawn data graph.
Preferably, the statistical processing on the target data, and determining the boundary of the coordinate axis includes:
For each group of data groups, sequencing each group of data groups according to the sequence increasing sequence, so that each group of data groups are arranged in sequence increasing mode to obtain arrangement data of each group;
acquiring a target value maximum value and a target value minimum value and a time point maximum value and a time point minimum value in at least one group of data according to the arrangement data of each group;
Determining the upper and lower boundaries of the ordinate axis according to the target value maximum value and the target value minimum value;
And determining the upper and lower boundaries of the abscissa axis according to the maximum value and the minimum value of the time points.
It is determined whether or not to perform coordinate axis truncation.
In one embodiment, preferably, the determining whether to perform coordinate axis truncation includes:
if no data point exists in the area exceeding the preset range in the target data, determining that a cutoff point exists, and executing coordinate axis cutoff.
For example, if one part of data falls in the range of 0-100 and the other part of data falls in the range of 500-900, 100 and 500 are recorded as cut-off points, and the cut-off points must be processed correspondingly in the subsequent drawing process.
If the coordinate axis truncation is executed, drawing a target data graph by using a coordinate axis truncation strategy based on the boundary of the coordinate axis.
Preferably, the drawing the target data graph by using the coordinate axis truncation strategy based on the boundary of the coordinate axis includes:
dividing the target data into a plurality of parts by using a cut-off point;
Respectively drawing a data subgraph corresponding to the data of each part;
and splicing the data subgraphs corresponding to the data of each part in the coordinate axis based on the boundary of the coordinate axis, and obtaining the target data graph.
Specifically, the data point is divided into two or more parts by utilizing the cutoff point, each part is respectively drawn as a sub-graph, and the specific process of sub-graph drawing is consistent with the drawing method in the next step. And after drawing, splicing the subgraphs in proportion to splice the subgraphs of all the parts in the complete same coordinate system. And finally unifying the coordinate axes, removing redundant coordinate axes, and marking a cutting mark and a cutting point value on the cutting position of the coordinate axes in the spliced graph.
And if the coordinate axis truncation is not executed, drawing a target data diagram according to the time sequence of the target data based on the boundary of the coordinate axis.
Preferably, the drawing the target data map according to the time sequence of the target data based on the boundary of the coordinate axis includes:
acquiring the maximum value and the minimum value of each group of data according to the arrangement data of each group, and determining the upper and lower boundaries of the drawing of the group of data;
and in the blank spaces of the upper and lower boundaries, according to the time sequence of the arrangement data of each group, the data points of each group of data are drawn into the graph one by one, and the target data graph is obtained.
Specifically, the upper and lower boundaries of the drawing are determined according to the obtained maximum value and minimum value of the data set, and a proper white space is added to the upper and lower boundaries, so that the curve is prevented from reaching the boundary of the picture, and the visual impression is prevented from being influenced. After determining the drawing boundary, the data points are drawn into the drawing one by one according to time sequence. For each data point, the abscissa is the first value of the data line (i.e., the instant point), and the ordinate corresponds to the relative position of the value on the ordinate. And (3) finishing drawing a point every time, namely connecting the point with the previous point in a straight line to form a broken line until the curve is drawn.
Preferably, the method further comprises:
If multiple groups of data exist in the target data, drawing each data graph by adopting different preset patterns. When a plurality of groups of data exist, the system draws the groups of data respectively by adopting preset different modes, so that the user can distinguish and identify the data conveniently. The drawing of multiple sets of data shares the same coordinate system so that the user analyzes the dynamic change relation and numerical comparison of the multiple sets of data.
Preferably, the method further comprises:
And scaling down the target data graph to a preset size, and drawing coordinate scale lines and marks in the target data graph. The user can conveniently know the approximate numerical range of the data, and the readability of the data graph is improved. For the output pictures of multiple groups of data, a style mark is added at the upper right corner of the picture so as to prompt a user to distinguish the data groups.
The invention discloses a data graph generation method, which comprises the following steps: acquiring a target file provided by a user; reading target data in the target file; carrying out statistical processing on the target data to determine the boundary of a coordinate axis; judging whether to execute coordinate axis truncation; if the coordinate axis truncation is executed, drawing a target data graph by using a coordinate axis truncation strategy based on the boundary of the coordinate axis; and if the coordinate axis truncation is not executed, drawing a target data diagram according to the time sequence of the target data based on the boundary of the coordinate axis. The invention can improve the drawing efficiency, adapt to the trend and the requirement of big data drawing, and improve the accuracy and the readability of the data drawing result.
Alternatively, in other embodiments, the data map generating program may be further divided into one or more modules, where one or more modules are stored in the memory 11 and executed by one or more processors (the processor 12 in this embodiment) to perform the present invention, and the modules referred to herein are a series of instruction segments of a computer program capable of performing a specific function, for describing the execution of the data map generating program in the data map generating apparatus.
For example, referring to fig. 3, a schematic program module of a data map generating program in an embodiment of the data map generating apparatus of the present invention is shown, where the data map generating program may be divided into an obtaining module 10, a reading module 20, a determining module 30, a judging module 40 and a drawing module 50, and the data map generating program is exemplified as follows:
the acquisition module 10 acquires a target file provided by a user;
The reading module 20 reads the target data in the target file;
The determining module 30 performs statistical processing on the target data to determine the boundary of the coordinate axis;
The judging module 40 judges whether or not to execute coordinate axis truncation;
If the drawing module 50 executes the coordinate axis truncation, drawing the target data graph by using a coordinate axis truncation strategy based on the boundary of the coordinate axis;
If the drawing module 50 does not execute the coordinate axis truncation, drawing a target data graph according to the time sequence of the target data based on the boundary of the coordinate axis.
The functions or operation steps implemented when the program modules such as the acquisition module 10, the reading module 20, the determination module 30, the determination module 40, and the drawing module 50 are executed are substantially the same as those of the above embodiment, and will not be described herein.
In addition, an embodiment of the present invention also proposes a computer-readable storage medium having stored thereon a data map generation program executable by one or more processors to implement the following operations:
acquiring a target file provided by a user;
reading target data in the target file;
carrying out statistical processing on the target data to determine the boundary of a coordinate axis;
judging whether to execute coordinate axis truncation;
If the coordinate axis truncation is executed, drawing a target data graph by using a coordinate axis truncation strategy based on the boundary of the coordinate axis;
and if the coordinate axis truncation is not executed, drawing a target data diagram according to the time sequence of the target data based on the boundary of the coordinate axis.
The computer-readable storage medium of the present invention is substantially the same as the above-described embodiments of the data map generating apparatus and method, and will not be described in detail herein.
It should be noted that, the foregoing reference numerals of the embodiments of the present invention are merely for describing the embodiments, and do not represent the advantages and disadvantages of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (9)

1. A method of generating a data map, the method comprising:
acquiring a target file provided by a user;
reading target data in the target file;
carrying out statistical processing on the target data to determine the boundary of a coordinate axis;
judging whether to execute coordinate axis truncation;
If the coordinate axis is truncated, dividing the target data into a plurality of parts by using a truncation point, respectively drawing a data subgraph corresponding to the data of each part, splicing the data subgraph corresponding to the data of each part in the coordinate axis according to the boundary of the coordinate axis, removing redundant coordinate axes, unifying the coordinate axes, marking a truncation mark and a truncation point value on the coordinate axis truncation position in the spliced graph, and obtaining the target data graph;
and if the coordinate axis truncation is not executed, drawing a target data diagram according to the time sequence of the target data based on the boundary of the coordinate axis.
2. The data map generating method according to claim 1, wherein the reading the target data in the target file includes:
And obtaining target data by reading space characters in row data of the target file, wherein the target data comprises at least one group of data groups, and each group of data groups corresponds to a data graph.
3. The data map generating method according to claim 2, wherein said statistically processing said target data to determine boundaries of coordinate axes comprises:
For each group of data groups, sequencing each group of data groups according to the sequence increasing sequence, so that each group of data groups are arranged in sequence increasing mode to obtain arrangement data of each group;
acquiring a target value maximum value and a target value minimum value and a time point maximum value and a time point minimum value in at least one group of data according to the arrangement data of each group;
Determining the upper and lower boundaries of the ordinate axis according to the target value maximum value and the target value minimum value;
And determining the upper and lower boundaries of the abscissa axis according to the maximum value and the minimum value of the time points.
4. The data map generation method of claim 1, wherein the determining whether to perform coordinate axis truncation comprises:
if no data point exists in the area exceeding the preset range in the target data, determining that a cutoff point exists, and executing coordinate axis cutoff.
5. The data map generation method of claim 3, wherein the drawing the target data map in accordance with the timing of the target data based on the boundary of the coordinate axes includes:
acquiring the maximum value and the minimum value of each group of data according to the arrangement data of each group, and determining the upper and lower boundaries of the drawing of the group of data;
and in the blank spaces of the upper and lower boundaries, according to the time sequence of the arrangement data of each group, the data points of each group of data are drawn into the graph one by one, and the target data graph is obtained.
6. The data map generation method according to claim 2, characterized in that the method further comprises:
If multiple groups of data exist in the target data, drawing each data graph by adopting different preset patterns.
7. The data map generation method according to any one of claims 1 to 6, characterized in that the method further comprises:
and scaling down the target data graph to a preset size, and drawing coordinate scale lines and marks in the target data graph.
8. A data map generation apparatus comprising a memory and a processor, the memory having stored thereon a data map generation program executable on the processor, the data map generation program when executed by the processor performing the steps of:
acquiring a target file provided by a user;
reading target data in the target file;
carrying out statistical processing on the target data to determine the boundary of a coordinate axis;
judging whether to execute coordinate axis truncation;
If the coordinate axis is truncated, dividing the target data into a plurality of parts by using a truncation point, respectively drawing a data subgraph corresponding to the data of each part, splicing the data subgraph corresponding to the data of each part in the coordinate axis according to the boundary of the coordinate axis, removing redundant coordinate axes, unifying the coordinate axes, marking a truncation mark and a truncation point value on the coordinate axis truncation position in the spliced graph, and obtaining the target data graph;
and if the coordinate axis truncation is not executed, drawing a target data diagram according to the time sequence of the target data based on the boundary of the coordinate axis.
9. A computer-readable storage medium, having stored thereon a data map generation program executable by one or more processors to implement the data map generation method of any of claims 1 to 7.
CN201910404757.XA 2019-05-15 2019-05-15 Data graph generation method and device and computer readable storage medium Active CN110263310B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910404757.XA CN110263310B (en) 2019-05-15 2019-05-15 Data graph generation method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910404757.XA CN110263310B (en) 2019-05-15 2019-05-15 Data graph generation method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110263310A CN110263310A (en) 2019-09-20
CN110263310B true CN110263310B (en) 2024-05-10

Family

ID=67913229

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910404757.XA Active CN110263310B (en) 2019-05-15 2019-05-15 Data graph generation method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110263310B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111045768B (en) * 2019-11-27 2023-06-23 青岛歌尔智能传感器有限公司 Application method of chart module, application device of chart module and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105389170A (en) * 2015-11-20 2016-03-09 中国农业大学 Drawing method and system
WO2017028436A1 (en) * 2015-08-18 2017-02-23 百度在线网络技术(北京)有限公司 Drawing tool implementation method, apparatus, device, and computer storage medium
CN107958020A (en) * 2017-10-24 2018-04-24 中国南方电网有限责任公司超高压输电公司检修试验中心 It is a kind of based on cluster electric network data processing and data visualization method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090027395A1 (en) * 2007-07-26 2009-01-29 Chii Ying Co., Ltd. Machine-implemented method and electronic device for presenting a normalized graph for a plurality of data sets

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017028436A1 (en) * 2015-08-18 2017-02-23 百度在线网络技术(北京)有限公司 Drawing tool implementation method, apparatus, device, and computer storage medium
CN105389170A (en) * 2015-11-20 2016-03-09 中国农业大学 Drawing method and system
CN107958020A (en) * 2017-10-24 2018-04-24 中国南方电网有限责任公司超高压输电公司检修试验中心 It is a kind of based on cluster electric network data processing and data visualization method

Also Published As

Publication number Publication date
CN110263310A (en) 2019-09-20

Similar Documents

Publication Publication Date Title
CN111325110B (en) OCR-based table format recovery method, device and storage medium
CN111476227B (en) Target field identification method and device based on OCR and storage medium
WO2020173008A1 (en) Text recognition method and apparatus
CN108388598B (en) Electronic device, data storage method, and storage medium
CN107688789B (en) Document chart extraction method, electronic device and computer readable storage medium
CN107689070B (en) Chart data structured extraction method, electronic device and computer-readable storage medium
CN113920117B (en) Panel defect area detection method and device, electronic equipment and storage medium
CN112699775A (en) Certificate identification method, device and equipment based on deep learning and storage medium
CN111325104A (en) Text recognition method, device and storage medium
CN113127125B (en) Page automatic adaptation method, device, equipment and storage medium
CN111310426A (en) Form format recovery method and device based on OCR and storage medium
KR20150099936A (en) Method and apparatus for applying an alternate font for maintaining document layout
CN110990010A (en) Software interface code generation method and device
CN112115111A (en) OCR-based document version management method and system
CN114005126A (en) Table reconstruction method and device, computer equipment and readable storage medium
KR102170930B1 (en) Car damage picture angle correction method, electronic device and readable storage medium
CN110263310B (en) Data graph generation method and device and computer readable storage medium
CN111400998A (en) Text display method and device, electronic equipment and readable storage medium
CN110956087B (en) Method and device for identifying table in picture, readable medium and electronic equipment
CN106776527B (en) Electronic book data display method and device and terminal equipment
CN112528984A (en) Image information extraction method, device, electronic equipment and storage medium
CN111259888A (en) Image-based information comparison method and device and computer-readable storage medium
CN109871517B (en) Text block ordering method and device, storage medium and electronic equipment
CN111160193B (en) Method, device and storage medium for extracting key information
CN110442663B (en) Raster data batch clipping method and device and computer readable 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
GR01 Patent grant
GR01 Patent grant