CN106682011B - Method and device for displaying data by using graph - Google Patents
Method and device for displaying data by using graph Download PDFInfo
- Publication number
- CN106682011B CN106682011B CN201510753453.6A CN201510753453A CN106682011B CN 106682011 B CN106682011 B CN 106682011B CN 201510753453 A CN201510753453 A CN 201510753453A CN 106682011 B CN106682011 B CN 106682011B
- Authority
- CN
- China
- Prior art keywords
- data
- difference
- scaling
- difference data
- displayed
- 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
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)
- Controls And Circuits For Display Device (AREA)
- Complex Calculations (AREA)
Abstract
the invention discloses a method and a device for displaying data by using a graph. Wherein, the method comprises the following steps: acquiring a plurality of data to be displayed; determining whether difference data exists in the data to be displayed or not, wherein the difference value between the difference data and each non-difference data in the data to be displayed exceeds a preset difference value range; if the different data exists in the data to be displayed, zooming the different data according to preset zooming parameters to obtain zoomed data; and drawing a plurality of display graphs of the display data for the zooming data and the non-difference data. The invention solves the technical problem that the trend of the data to be displayed along with the change of time can not be accurately displayed.
Description
Technical Field
The invention relates to the field of data processing, in particular to a method and a device for displaying data by using graphs.
Background
in the prior art, when data is analyzed, in order to intuitively understand the rule and trend of the data changing with time as a whole, each data to be displayed is usually displayed according to the time dimension thereof by using some charts (such as a graph, a histogram, and the like). However, when one or more pieces of data in a group of data to be displayed have a large difference (e.g., a numerical difference) from other data, it is difficult to see the variation trend of other data. In the prior art, the data with large differences are generally considered to be abnormal data, and the abnormal data are generally discarded in the process of displaying the data.
However, when a group of data changing according to time is displayed, if abnormal data with large difference is not discarded, it is difficult to see the changing trend of other data, for example, the value of data 6 shown in fig. 1 is much larger than that of other data, and the changing trend of other data cannot be known from the graph; if the data with larger difference is discarded (e.g. the value of data 4 in the figure is zero), it is difficult to reflect the data change rule and trend at the time point or in the time period of discarding, as shown in fig. 2.
Aiming at the technical problem that the trend of the data to be displayed changing along with the time cannot be accurately displayed due to the fact that one or more data in the data to be displayed have larger difference with other data in the prior art, an effective solution is not provided at present.
disclosure of Invention
the embodiment of the invention provides a method and a device for displaying data by using a graph, which at least solve the technical problem that the trend of the data to be displayed along with the change of time cannot be accurately displayed.
According to an aspect of an embodiment of the present invention, there is provided a method for presenting data using a graphic, the method including: acquiring a plurality of data to be displayed; determining whether difference data exists in the data to be displayed or not, wherein the difference value between the difference data and each non-difference data in the data to be displayed exceeds a preset difference value range; if the different data exists in the data to be displayed, zooming the different data according to preset zooming parameters to obtain zoomed data; and drawing a display graph of the scaling data and each non-difference data.
further, the scaling the difference data according to the preset scaling parameter includes: if the difference data is one, calculating the zooming data of the difference data according to a preset zooming parameter; if the difference data is multiple, determining the reference data of the multiple difference data; calculating scaling data of the reference data according to a preset scaling parameter; if the difference data is larger than the non-difference data and the zooming data of the reference data is larger than the non-difference data, zooming each difference data based on the zooming data of the reference data; and if the difference data is smaller than the non-difference data and the scaling data of the reference data is smaller than the non-difference data, scaling each difference data based on the scaling data of the reference data.
Further, the scaling processing of each difference data based on the scaling data of the difference data comprises determining a ratio a m/a of each difference data to the reference data, wherein a is used for representing the reference data, a m is used for representing the difference data, m is equal to or less than 1 and equal to or less than n, m and n are natural numbers, and n is used for representing the number of the difference data, and calculating the scaling data a 'm of each difference data a m, a' m is equal to a 'a m/a, wherein a' is used for representing the scaling data of the reference data.
Further, determining the reference data for the plurality of difference data comprises: comparing the magnitude of each difference data with the magnitude of each non-difference data; if the difference data are larger than the non-difference data, acquiring the minimum value in the difference data, and taking the minimum value as reference data; and if the comparison result shows that each difference data is smaller than each non-difference data, acquiring the maximum value in the difference data, and taking the maximum value as the reference data.
Further, according to the preset scaling parameter, calculating scaling data of the reference data includes: calculating scaling data a ' of reference data a, wherein a ' is X a, a represents the reference data, a ' represents the scaling data of the reference data, X represents a preset scaling parameter, n is a natural number, and n is used for representing the number of difference data; or calculating the absolute value of the difference value between each non-difference data and the reference data; scaling data a 'of the reference data is calculated based on non-difference data having a minimum absolute value of the difference, where a' ═ X × b, and where b denotes the non-difference data having the minimum absolute value of the difference.
the method comprises the steps of obtaining a plurality of data sequences of data to be displayed, wherein the data to be displayed in the data sequences are arranged according to the size sequence of the data to be displayed, calculating the absolute value Deltaa | of the difference value between the data a q to be displayed in the data sequences and the previous data a q- 1 to be displayed adjacent to the data a q to be displayed in the data sequences, wherein q is a positive integer, if the absolute value Deltaa | of the difference value is larger than a preset difference value, determining that the data sequence has the difference data, and determining the difference data in the data sequences, wherein the preset difference value range is (-k, k), and k represents the preset difference value.
Further, determining difference data in the data sequence comprises: acquiring a first quantity of data to be displayed with sequence numbers more than or equal to q in a data sequence; acquiring a second quantity of all data to be displayed in the data sequence; calculating a ratio of the first quantity to the second quantity; if the ratio is smaller than a preset threshold value, determining that the data to be displayed with the sequence number greater than or equal to q in the data sequence is differential data; and if the ratio is smaller than the preset threshold, determining that the data to be displayed with the sequence number smaller than or equal to q in the data sequence is the difference data.
according to another aspect of the embodiments of the present invention, there is also provided an apparatus for displaying data using graphics, the apparatus including: the display device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring a plurality of data to be displayed; the display device comprises a determining unit, a display unit and a display unit, wherein the determining unit is used for determining whether difference data exists in a plurality of data to be displayed or not, and the difference value between the difference data and each non-difference data in the plurality of data to be displayed exceeds a preset difference value range; the processing unit is used for zooming the difference data according to preset zooming parameters to obtain zoomed data if the difference data exists in the data to be displayed; and the drawing unit is used for drawing the display graphs of the zooming data and the non-difference data.
Further, the processing unit includes: the product calculation module is used for calculating the zooming data of the difference data according to a preset zooming parameter if the difference data is one; the data determining module is used for determining the reference data of a plurality of difference data if the number of the difference data is multiple; the data calculation module is used for calculating scaling data of the reference data according to preset scaling parameters; the zooming processing module is used for zooming each difference data based on the zooming data of the reference data if the difference data is larger than each non-difference data and the zooming data of the reference data is larger than each non-difference data; and if the difference data is smaller than the non-difference data and the scaling data of the reference data is smaller than the non-difference data, scaling each difference data based on the scaling data of the reference data.
The scaling processing module further comprises a ratio determining submodule and a scaling data calculating submodule, wherein the ratio determining submodule is used for determining the ratio a m/a of each difference data to the reference data, a m is used for representing the reference data, m is more than or equal to 1 and less than or equal to n, m and n are natural numbers, n is used for representing the number of the difference data, and the scaling data calculating submodule is used for calculating the scaling data a 'm of each difference data a m, a' m is a 'a m/a, and a' is used for representing the scaling data of the reference data.
In the embodiment of the invention, under the condition that the different data with larger difference value with other data exists in the data to be displayed, the different data can be zoomed, and the display graph (such as a curve graph, a broken line graph, a column graph and the like) is drawn based on the zoomed data and the non-different data.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of a presentation of data using graphics according to the prior art;
FIG. 2 is a schematic diagram of another presentation of data using graphics in accordance with the prior art;
FIG. 3 is a flow diagram of a method of presenting data using a graph, according to an embodiment of the invention;
FIG. 4 is a diagram illustrating data using graphics in accordance with the prior art;
FIG. 5 is a schematic diagram illustrating an effect of processing the data of FIG. 4 by a method for displaying the data graphically according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an apparatus for utilizing graphics to present data, in accordance with an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for graphically representing data, it being noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
fig. 3 is a flowchart of a method for presenting data using a graph according to an embodiment of the present invention, as shown in fig. 3, the method including the steps of:
step S302, a plurality of data to be displayed are obtained.
step S304, determining whether difference data exists in the plurality of data to be displayed, wherein the difference value between the difference data and each non-difference data in the plurality of data to be displayed exceeds a preset difference value range.
Step S306, if the difference data exists in the plurality of data to be displayed, zooming the difference data according to the preset zooming parameters to obtain zooming data.
Step S308, drawing a display graph of the zooming data and each non-difference data.
By adopting the method and the device, under the condition that the different data with larger difference value with other data exists in the data to be displayed, the different data can be zoomed, the display graph (such as a curve graph, a broken line graph, a column graph and the like) is drawn based on the zoomed data and the non-different data, because the zooming processing is carried out on the different data before the graph is drawn, the difference between the different data and the non-different data is reduced, the trend of the data to be displayed according to the time dimension can be accurately displayed on the drawn graph, and the technical problem that the trend of the data to be displayed along with the time can not be accurately displayed in the prior art is solved.
In the above embodiment, when the plurality of data to be displayed are graphically displayed, in order to better show the variation trend of the data, particularly large or particularly small data may be scaled according to a certain proportion and then displayed.
In the above embodiment, the display graphics of the data to be displayed may be drawn according to a time dimension.
According to the above embodiment of the present invention, the scaling processing of the difference data according to the preset scaling parameter includes: if the difference data is one, calculating the zooming data of the difference data according to a preset zooming parameter; if the difference data is multiple, determining the reference data of the multiple difference data; calculating scaling data of the reference data according to a preset scaling parameter; if the difference data is larger than the non-difference data and the zooming data of the reference data is larger than the non-difference data, zooming each difference data based on the zooming data of the reference data; and if the difference data is smaller than the non-difference data and the scaling data of the reference data is smaller than the non-difference data, scaling each difference data based on the scaling data of the reference data.
In this embodiment, if the difference data is larger than other data (i.e., the non-difference data in the above embodiment), the difference data is reduced according to a certain proportion, and the minimum value in the reduced data is larger than the maximum value in the other data; and if the difference data is smaller than other data, amplifying the difference data according to a certain proportion, wherein the maximum value in the amplified data is smaller than the minimum value in the other data.
Specifically, when the difference data is scaled according to the preset scaling parameter, if there is only one difference data, the product of the difference data and the preset scaling parameter may be calculated to obtain the scaling data of the difference data. The preset scaling parameter is a fraction less than 1 in this embodiment.
Optionally, if only one of the difference data is greater than each of the non-difference data, obtaining the largest non-difference data of each of the non-difference data, and calculating a product of the largest difference data and a preset scaling parameter to obtain scaling data of the difference data; if the difference data is larger than the non-difference data, obtaining the maximum non-difference data in the non-difference data, and calculating the product of the maximum difference data and a preset scaling parameter to obtain the scaling data of the difference data.
in another alternative embodiment, if there are a plurality of difference data, the reference data of the difference data may be determined, and the scaling data of the plurality of difference data may be obtained based on the scaling data of the reference data.
Specifically, determining the reference data of the plurality of difference data includes: comparing the magnitude of each difference data with the magnitude of each non-difference data; if the difference data are larger than the non-difference data, acquiring the minimum value in the difference data, and taking the minimum value as reference data; and if the comparison result shows that each difference data is smaller than each non-difference data, acquiring the maximum value in the difference data, and taking the maximum value as the reference data.
After the reference data is determined, the scaling data of the reference data is calculated, and based on the scaling data of the difference data, the scaling processing of each difference data comprises the steps of determining the ratio a m/a of each difference data to the reference data, wherein a is used for representing the reference data, a m is used for representing the difference data, m is more than or equal to 1 and less than or equal to n, m and n are natural numbers, and n is used for representing the number of the difference data, and calculating the scaling data a 'm of each difference data a m, a' m is a 'a m/a, wherein a' is used for representing the scaling data of the reference data.
Optionally, according to the preset scaling parameter, calculating the scaling data of the reference data may include: calculating scaling data a ' of reference data a, wherein a ' is X a, a represents the reference data, a ' represents the scaling data of the reference data, X represents a preset scaling parameter, n is a natural number, and n is used for representing the number of difference data; or calculating the absolute value of the difference value between each non-difference data and the reference data; scaling data a 'of the reference data is calculated based on non-difference data having a minimum absolute value of the difference, where a' ═ X × b, and where b denotes the non-difference data having the minimum absolute value of the difference.
In the above embodiment, the scaling data of the reference data may be calculated according to the reference data, or the scaling data of the reference data may be calculated based on the data in the non-difference data.
alternatively, if the scaled data of the reference data is calculated based on data in the non-difference data:
If each difference data is larger than each non-difference data, calculating the product of the maximum non-difference data b in the non-difference data and a preset scaling parameter to obtain scaling data of the reference data;
If each difference data is smaller than each non-difference data, the product of the minimum non-difference data b in the non-difference data and a preset scaling parameter can be calculated to obtain the scaling data of the reference data.
After determining that the difference data in the set of data to be displayed is five data, namely, data a11 to a15 (i.e., the difference data a m) in the set of data to be displayed, a11 to a15 may be reduced or enlarged according to the above rule, for example, a11 (in this embodiment, a11 is used as the reference data) is changed into a multiple X of a10 (i.e., the preset scaling parameter) and then, according to the ratio relationship between a12 to a15 and a11, a12 to a15 are enlarged or reduced in an equal ratio, data after a11 to a15 is defined as B11 to B15 (i.e., the scaling data a' m of the difference data), as follows:
B11=A10*X;
B12=B11*A12/A11;
B13=B11*A13/A11;
B14=B11*A14/A11;
B15=B11*A15/A11。
According to the embodiment of the present invention, a difference between any two pieces of data to be displayed in the plurality of pieces of data to be displayed can be calculated, and if there is data to be displayed in the calculated difference that is greater than a preset difference, it can be determined that there is difference data in the plurality of pieces of data to be displayed.
If the calculated difference is smaller than a preset threshold, two data to be displayed corresponding to the difference belong to the same category; and if the calculated difference is not smaller than the preset threshold, the two data to be displayed corresponding to the difference do not belong to the same category. According to the classification method, the data to be displayed are classified into difference data and non-difference data.
In order to reduce the calculation amount, determining whether difference data exists in the plurality of data to be displayed or not may include obtaining a data sequence of the plurality of data to be displayed, wherein the data to be displayed in the data sequence are arranged according to the size sequence of the plurality of data to be displayed, calculating an absolute value | Δ a | of a difference between the data a q to be displayed in the data sequence and a previous data a q-1 to be displayed adjacent to the data a, wherein q is a positive integer, determining that the difference data exists in the data sequence and determining the difference data in the data sequence if the absolute value | Δ a | of the difference is greater than a preset difference, wherein the preset difference range is (-k, k), and k represents the preset difference.
Optionally, determining the difference data in the data sequence comprises: acquiring a first quantity of data to be displayed with sequence numbers more than or equal to q in a data sequence; acquiring a second quantity of all data to be displayed in the data sequence; calculating a ratio of the first quantity to the second quantity; if the ratio is smaller than a preset threshold value, determining that the data to be displayed with the sequence number greater than or equal to q in the data sequence is differential data; and if the ratio is smaller than the preset threshold, determining that the data to be displayed with the sequence number smaller than or equal to q in the data sequence is the difference data.
The data sequence of the data to be displayed is obtained by sequencing the data to be displayed from small to large or from large to small, and after the difference between any two adjacent data to be displayed in the data sequence is calculated in sequence, if the absolute value of one or more of the differences is greater than the preset difference, it can be determined that the data sequence includes one or more of the difference data.
the above embodiment is shown below by taking a single data as an example.
Table 1 shows the values of 10 data to be presented.
TABLE 1
Serial number | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
Numerical value | 410 | 350 | 640 | 550 | 870 | 22100 | 510 | 290 | 890 | 760 |
fig. 4 shows a display graph drawn based on the values in table 1, in which only one peak is visible and no trend is resolved for the other data.
according to the scheme in the above embodiment, the largest data in the ten data is reduced, and the reduced data is larger than the second largest data, for example, the largest data is modified to be 1.5 times of the second largest data (the preset scaling parameter may be set according to actual conditions).
the scaled data are shown in table 2.
TABLE 2
Serial number | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
numerical value | 410 | 350 | 640 | 550 | 870 | 1335 | 510 | 290 | 890 | 760 |
And drawing a display graph shown in fig. 5 based on the zoomed data, wherein the display graph can obviously and accurately represent the data trend of the ten data to be displayed.
Example 2
According to another aspect of the embodiments of the present invention, there is also provided an apparatus for presenting data using a graphic, as shown in fig. 6, the apparatus including: an obtaining unit 10, configured to obtain a plurality of data to be displayed; the determining unit 30 is configured to determine whether difference data exists in the multiple pieces of data to be displayed, where a difference value between the difference data and each piece of non-difference data in the multiple pieces of data to be displayed exceeds a preset difference value range; the processing unit 50 is configured to, if there is difference data in the plurality of data to be displayed, perform scaling processing on the difference data according to a preset scaling parameter to obtain scaling data; and a drawing unit 70 for drawing the display graphics of the scaled data and each non-difference data.
By adopting the method and the device, under the condition that the different data with larger difference value with other data exists in the data to be displayed, the different data can be zoomed, the display graph (such as a curve graph, a broken line graph, a column graph and the like) is drawn based on the zoomed data and the non-different data, because the zooming processing is carried out on the different data before the graph is drawn, the difference between the different data and the non-different data is reduced, the trend of the data to be displayed according to the time dimension can be accurately displayed on the drawn graph, and the technical problem that the trend of the data to be displayed along with the time can not be accurately displayed in the prior art is solved.
In the above embodiment, when the plurality of data to be displayed are graphically displayed, in order to better show the variation trend of the data, particularly large or particularly small data may be scaled according to a certain proportion and then displayed.
in the above embodiment, the display graphics of the data to be displayed may be drawn according to a time dimension.
According to the above embodiment of the present invention, the processing unit includes: the product calculation module is used for calculating the product of the difference data and the preset scaling parameter if the difference data is one; the data determining module is used for determining the reference data of a plurality of difference data if the number of the difference data is multiple; the data calculation module is used for calculating scaling data of the reference data according to preset scaling parameters; the zooming processing module is used for zooming each difference data based on the zooming data of the reference data if the difference data is larger than each non-difference data and the zooming data of the reference data is larger than each non-difference data; and if the difference data is smaller than the non-difference data and the scaling data of the reference data is smaller than the non-difference data, scaling each difference data based on the scaling data of the reference data.
In this embodiment, if the difference data is larger than other data (i.e., the non-difference data in the above embodiment), the difference data is reduced according to a certain proportion, and the minimum value in the reduced data is larger than the maximum value in the other data; and if the difference data is smaller than other data, amplifying the difference data according to a certain proportion, wherein the maximum value in the amplified data is smaller than the minimum value in the other data.
the scaling processing module further comprises a ratio determining submodule and a scaling data calculating submodule, wherein the ratio determining submodule is used for determining the ratio a m/a of each difference data to the reference data, a m is used for representing the reference data, m is more than or equal to 1 and less than or equal to n, m and n are natural numbers, n is used for representing the number of the difference data, and the scaling data calculating submodule is used for calculating the scaling data a 'm of each difference data a m, a' m is a 'a m/a, and a' is used for representing the scaling data of the reference data.
specifically, the data determination module includes: the comparison module is used for comparing the sizes of each difference data and each non-difference data; the first data determining submodule is used for acquiring the minimum value in the difference data if the difference data are larger than the non-difference data, and taking the minimum value as the reference data; and the second data determining submodule is used for acquiring the maximum value in the difference data if the difference data is smaller than the non-difference data, and taking the maximum value as the reference data.
In the above embodiment, the scaling data of the reference data may be calculated according to the reference data, or the scaling data of the reference data may be calculated based on the data in the non-difference data.
Alternatively, if the scaled data of the reference data is calculated based on data in the non-difference data:
If each difference data is larger than each non-difference data, calculating the product of the maximum non-difference data b in the non-difference data and a preset scaling parameter to obtain scaling data of the reference data;
If each difference data is smaller than each non-difference data, the product of the minimum non-difference data b in the non-difference data and a preset scaling parameter can be calculated to obtain the scaling data of the reference data.
Optionally, according to the preset scaling parameter, calculating the scaling data of the reference data may include: calculating scaling data a ' of reference data a, wherein a ' is X a, a represents the reference data, a ' represents the scaling data of the reference data, X represents a preset scaling parameter, n is a natural number, and n is used for representing the number of difference data; or calculating the absolute value of the difference value between each non-difference data and the reference data; scaling data a 'of the reference data is calculated based on non-difference data having a minimum absolute value of the difference, where a' ═ X × b, and where b denotes the non-difference data having the minimum absolute value of the difference.
According to the embodiment of the present invention, a difference between any two pieces of data to be displayed in the plurality of pieces of data to be displayed can be calculated, and if there is data to be displayed in the calculated difference that is greater than a preset difference, it can be determined that there is difference data in the plurality of pieces of data to be displayed.
If the calculated difference is smaller than a preset threshold, two data to be displayed corresponding to the difference belong to the same category; and if the calculated difference is not smaller than the preset threshold, the two data to be displayed corresponding to the difference do not belong to the same category. According to the classification method, the data to be displayed are classified into difference data and non-difference data.
In order to reduce the calculation amount, determining whether difference data exists in the plurality of data to be displayed or not may include obtaining a data sequence of the plurality of data to be displayed, wherein the data to be displayed in the data sequence are arranged according to the size sequence of the plurality of data to be displayed, calculating an absolute value | Δ a | of a difference between the data a q to be displayed in the data sequence and a previous data a q- 1 to be displayed adjacent to the data a, wherein q is a positive integer, determining that the difference data exists in the data sequence and determining the difference data in the data sequence if the absolute value | Δ a | of the difference is greater than a preset difference, wherein the preset difference range is (-k, k), and k represents the preset difference.
The device for displaying data by using the graph comprises a processor and a memory, wherein the acquisition unit, the determination unit, the processing unit, the drawing unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The present application further provides a computer program product adapted to perform program code for initializing the following method steps when executed on a data processing device: acquiring a plurality of data to be displayed; determining whether difference data exists in the data to be displayed or not, wherein the difference value between the difference data and each non-difference data in the data to be displayed exceeds a preset difference value range; if the different data exists in the data to be displayed, zooming the different data according to preset zooming parameters to obtain zoomed data; and drawing a display graph of the scaling data and each non-difference data.
the above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
in the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
in the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
the integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (8)
1. A method for displaying data using graphics, comprising:
acquiring a plurality of data to be displayed;
Determining whether difference data exists in the plurality of data to be displayed, wherein the difference value between the difference data and each non-difference data in the plurality of data to be displayed exceeds a preset difference value range;
If the difference data exist in the data to be displayed, zooming the difference data according to preset zooming parameters to obtain zooming data;
Drawing a display graph of the zooming data and each non-difference data;
Wherein, scaling the difference data according to a preset scaling parameter comprises: if the difference data is one, calculating the zooming data of the difference data according to the preset zooming parameter; if the difference data are multiple, determining the reference data of the multiple difference data; calculating scaling data of the reference data according to the preset scaling parameters; if the difference data is larger than the non-difference data and the scaling data of the reference data is larger than the non-difference data, scaling each difference data based on the scaling data of the reference data; and if the difference data is smaller than the non-difference data and the scaling data of the reference data is smaller than the non-difference data, scaling each difference data based on the scaling data of the reference data.
2. the method according to claim 1, wherein scaling each of the difference data based on the scaled data of the reference data comprises:
Determining a ratio a m/a of each of the difference data to the reference data, wherein a is used to represent the reference data, a m is used to represent the difference data, wherein 1 ≦ m ≦ n, m and n are natural numbers, and n is used to represent the number of the difference data;
And calculating scaling data a 'm, a' m and a 'a m/a of each difference data a m, wherein a' is used for representing the scaling data of the reference data.
3. the method of claim 1, wherein determining the reference data for the plurality of difference data comprises:
Comparing the size of each of the difference data with each of the non-difference data;
If the comparison result shows that each difference data is larger than each non-difference data, acquiring a minimum value in the difference data, and taking the minimum value as the reference data;
and if the comparison result shows that each difference data is smaller than each non-difference data, acquiring a maximum value in the difference data, and taking the maximum value as the reference data.
4. the method of claim 1, wherein calculating scaling data for the reference data according to the preset scaling parameters comprises:
Calculating scaling data a ' of the reference data a, wherein a ' indicates the reference data, a ' indicates the scaling data of the reference data, and X indicates the preset scaling parameter; or
Calculating an absolute value of a difference between each of the non-difference data and the reference data;
and calculating scaling data a 'of the reference data based on non-difference data having a minimum absolute value of a difference, wherein a' is X b, and b represents the non-difference data having the minimum absolute value of the difference.
5. The method according to any one of claims 1 to 4, wherein determining whether there is difference data in the plurality of data to be presented comprises:
Acquiring a data sequence of the plurality of data to be displayed, wherein the data to be displayed in the data sequence are arranged according to the size sequence of the plurality of data to be displayed;
Calculating the absolute value | delta a | of the difference value between the data a q to be shown in the data sequence and the previous data a q-1 to be shown adjacent to the data a q to be shown, wherein q is a positive integer;
if the absolute value | Δ a | of the difference is greater than a preset difference, determining that the difference data exists in the data sequence, and determining the difference data in the data sequence,
Wherein the preset difference range is (-k, k), and k represents the preset difference.
6. the method of claim 5, wherein determining difference data in the data sequence comprises: acquiring a first quantity of data to be displayed with sequence numbers more than or equal to q in the data sequence;
Acquiring a second quantity of all data to be displayed in the data sequence;
calculating a ratio of the first quantity to the second quantity;
If the ratio is smaller than a preset threshold value, determining that the data to be displayed with the sequence number greater than or equal to q in the data sequence is the difference data;
And if the ratio is smaller than the preset threshold, determining the data to be displayed with the sequence number smaller than or equal to q in the data sequence as the difference data.
7. An apparatus for displaying data using graphics, comprising:
The display device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring a plurality of data to be displayed;
The display device comprises a determining unit, a displaying unit and a displaying unit, wherein the determining unit is used for determining whether difference data exists in the plurality of data to be displayed or not, and the difference value between the difference data and each non-difference data in the plurality of data to be displayed exceeds a preset difference value range;
The processing unit is used for zooming the difference data according to preset zooming parameters to obtain zoomed data if the difference data exists in the plurality of data to be displayed;
The drawing unit is used for drawing the display graphs of the zooming data and the non-difference data;
The processing unit includes: a product calculating module, configured to calculate scaling data of the difference data according to the preset scaling parameter if the difference data is one; the data determining module is used for determining the reference data of a plurality of difference data if the number of the difference data is multiple; the data calculation module is used for calculating scaling data of the reference data according to the preset scaling parameters; a scaling module, configured to, if the difference data is greater than each of the non-difference data and the scaled data of the reference data is greater than each of the non-difference data, scale each of the difference data based on the scaled data of the reference data; and if the difference data is smaller than the non-difference data and the scaling data of the reference data is smaller than the non-difference data, scaling each difference data based on the scaling data of the reference data.
8. The apparatus of claim 7, wherein the scaling module comprises:
A ratio determination submodule for determining a ratio a m/a of each of the difference data to the reference data, wherein a is used for representing the reference data, a m is used for representing the difference data, wherein m is greater than or equal to 1 and less than or equal to n, m and n are natural numbers, and n is used for representing the number of the difference data;
And a scaling data calculation submodule, configured to calculate scaling data a ' m, a ' m ═ a ' × a ' m/a of each of the difference data a m, where a ' is used to represent the scaling data of the reference data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510753453.6A CN106682011B (en) | 2015-11-06 | 2015-11-06 | Method and device for displaying data by using graph |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510753453.6A CN106682011B (en) | 2015-11-06 | 2015-11-06 | Method and device for displaying data by using graph |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106682011A CN106682011A (en) | 2017-05-17 |
CN106682011B true CN106682011B (en) | 2019-12-10 |
Family
ID=58863044
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510753453.6A Active CN106682011B (en) | 2015-11-06 | 2015-11-06 | Method and device for displaying data by using graph |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106682011B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109344305B (en) * | 2018-09-28 | 2021-12-07 | 新华三技术有限公司 | Statistical data display method, device and equipment |
CN110046184A (en) * | 2019-02-19 | 2019-07-23 | 广州视源电子科技股份有限公司 | Data graph display adjusting method and device, storage medium and computer equipment |
CN112231316B (en) * | 2019-07-15 | 2024-07-23 | 珠海金山办公软件有限公司 | Graph display method and device and electronic equipment |
CN111899821A (en) * | 2020-06-28 | 2020-11-06 | 广州万孚生物技术股份有限公司 | Method for processing medical institution data, method and device for constructing database |
CN112668660B (en) * | 2020-12-31 | 2024-07-12 | 新奥数能科技有限公司 | Abnormal point detection method and device based on time sequence data |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11230735A (en) * | 1998-02-12 | 1999-08-27 | Nikon Corp | Data processing method for coordinate measuring device |
CN101110881A (en) * | 2006-07-20 | 2008-01-23 | 京瓷美达株式会社 | Image forming processing apparatus and image forming processing method |
CN101330030A (en) * | 2007-06-21 | 2008-12-24 | 中芯国际集成电路制造(上海)有限公司 | Method for removing abnormal point of detection data |
CN101477589A (en) * | 2009-01-16 | 2009-07-08 | 上海闻泰电子科技有限公司 | Regional image display dimension setting method |
CN102651093A (en) * | 2012-03-31 | 2012-08-29 | 上海海洋大学 | Marine information management system based on time series outlier detection technology |
US8290990B2 (en) * | 2003-02-28 | 2012-10-16 | Abb Research Ltd | System and method for managing and exchanging data of a technical project, technical installation and individual installation components |
-
2015
- 2015-11-06 CN CN201510753453.6A patent/CN106682011B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11230735A (en) * | 1998-02-12 | 1999-08-27 | Nikon Corp | Data processing method for coordinate measuring device |
US8290990B2 (en) * | 2003-02-28 | 2012-10-16 | Abb Research Ltd | System and method for managing and exchanging data of a technical project, technical installation and individual installation components |
CN101110881A (en) * | 2006-07-20 | 2008-01-23 | 京瓷美达株式会社 | Image forming processing apparatus and image forming processing method |
CN101330030A (en) * | 2007-06-21 | 2008-12-24 | 中芯国际集成电路制造(上海)有限公司 | Method for removing abnormal point of detection data |
CN101477589A (en) * | 2009-01-16 | 2009-07-08 | 上海闻泰电子科技有限公司 | Regional image display dimension setting method |
CN102651093A (en) * | 2012-03-31 | 2012-08-29 | 上海海洋大学 | Marine information management system based on time series outlier detection technology |
Also Published As
Publication number | Publication date |
---|---|
CN106682011A (en) | 2017-05-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106682011B (en) | Method and device for displaying data by using graph | |
CN106355431B (en) | Cheating flow detection method and device and terminal | |
CN103440335B (en) | Video recommendation method and device | |
Huson et al. | Dendroscope 3: an interactive tool for rooted phylogenetic trees and networks | |
CN101288099B (en) | Visual processing apparatus, display apparatus, visual processing method, program and integrated circuit | |
Sun et al. | Causal inference via sparse additive models with application to online advertising | |
CN109064261A (en) | The method, apparatus and computer readable storage medium of Recommendations | |
CN110298858B (en) | Image clipping method and device | |
CN110197390B (en) | Recommendation method and system based on association degree and economic value of association rule | |
CN107340964A (en) | The animation effect implementation method and device of a kind of view | |
CN110896488A (en) | Recommendation method for live broadcast room and related equipment | |
CN104881415A (en) | Tree graph generation method and tree graph generation equipment | |
CN104809109B (en) | social information display method and device and server | |
US20140039875A1 (en) | Visual analysis of phrase extraction from a content stream | |
CN106257507B (en) | Risk assessment method and device for user behavior | |
JP2013186319A5 (en) | ||
CN115293993A (en) | Sampling method and system for filtering salt and pepper noise | |
US10002458B2 (en) | Data plot processing | |
CN107103010A (en) | Visualize the processing method and processing device of data | |
CN106484702B (en) | Target web page access volume display method and device | |
CN109726317B (en) | Method and device for displaying data | |
CN104899232A (en) | Cooperative clustering method and cooperative clustering equipment | |
JP2013242709A (en) | Information processing system and program | |
JP6048119B2 (en) | Abnormal cause estimation program, abnormal cause estimation apparatus, and abnormal cause estimation method | |
Lawrence et al. | VariantTools: an extensible framework for developing and testing variant callers |
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: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing Applicant after: Beijing Guoshuang Technology Co.,Ltd. Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing Applicant before: Beijing Guoshuang Technology Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |