CN113590997A - Data display method and device - Google Patents

Data display method and device Download PDF

Info

Publication number
CN113590997A
CN113590997A CN202011612604.3A CN202011612604A CN113590997A CN 113590997 A CN113590997 A CN 113590997A CN 202011612604 A CN202011612604 A CN 202011612604A CN 113590997 A CN113590997 A CN 113590997A
Authority
CN
China
Prior art keywords
data
width
display
value
display layer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011612604.3A
Other languages
Chinese (zh)
Other versions
CN113590997B (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.)
Shenzhou Lvmeng Chengdu Technology Co ltd
Nsfocus Technologies Inc
Nsfocus Technologies Group Co Ltd
Original Assignee
Shenzhou Lvmeng Chengdu Technology Co ltd
Nsfocus Technologies Inc
Nsfocus Technologies Group 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 Shenzhou Lvmeng Chengdu Technology Co ltd, Nsfocus Technologies Inc, Nsfocus Technologies Group Co Ltd filed Critical Shenzhou Lvmeng Chengdu Technology Co ltd
Priority to CN202011612604.3A priority Critical patent/CN113590997B/en
Publication of CN113590997A publication Critical patent/CN113590997A/en
Application granted granted Critical
Publication of CN113590997B publication Critical patent/CN113590997B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a data display method and device. The method comprises the steps of obtaining a data display request aiming at a target service type, wherein the data display request comprises data values and data units of different data types to be displayed; determining target display information of different data types to be displayed based on data values and data units of the different data types to be displayed; and outputting and sending a data display response carrying the target display information, and displaying the target display information in a display area according to a preset display format. The method can visually see the data values represented by different bar graphs. The visual experience of the user is improved.

Description

Data display method and device
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data display method and apparatus.
Background
Data display of a Web page (Web) is realized based on data transmission between a Web front end and a Web back end. At present, a lot of services perform data processing in a manner of separating a Web front end and a Web back end, and perform data transmission in an Application Programming Interface (API) manner; when the Web front end needs data, calling an API (application program interface) provided by the Web back end to request the data from the Web back end, acquiring the data in bottom storage (various databases of different types or file storage and the like) by the Web back end, responding to the request of the front end after processing, and returning the processed data; and the Web front end displays according to the returned data.
In order to enable the front end of the Web to obtain the displayed data, the back end of the Web needs to perform chart processing on the data to obtain chart data, wherein in the prior art, a data visualization display library is adopted to perform chart processing on the data, and the data visualization display library can comprise an Echart data chart display library and a highcherts data chart display library.
However, taking the bar graphs displayed by Echarts and HighCHarts as an example, the data standard value of the bar graph is generally a fixed value and the fixed value is not displayed in the graph, as shown in FIG. 1, the fixed value is 500, and the bar graph A, the bar graph B and the bar graph C respectively correspond to the values of 3, 4 and 5.
It can be seen that, since the values 3, 4, and 5 are much smaller than 500, and the variation widths of the bar graphs corresponding to the data values 3, 4, and 5 are not different significantly, the user cannot see the difference between the corresponding values of the bar graphs without reference of the data standard value 500, thereby reducing the visual experience of the user.
Disclosure of Invention
The embodiment of the application provides a data display method and device, which solve the problems in the prior art, and the comparison between data values can be visually realized by adopting display graphs of a type of layer corresponding to the data values and a type of layer corresponding to a data standard value, so that the visual experience of a user is improved.
In a first aspect, a data presentation method is provided, and the method may include:
acquiring a data display request aiming at a target service type, wherein the data display request comprises data values and data units of different data types to be displayed;
determining target display information of different data types to be displayed based on the data values of the different data types to be displayed and the data units; the target display information comprises a first display layer for displaying a graph, a second display layer for displaying the graph, a data value and a data unit of each data type to be displayed, and a character width occupied by the data value and the data unit of the corresponding data type to be displayed; the width of the first display layer represents a data standard value corresponding to the different data types to be displayed; the width of the second display layer represents the ratio of the data value of each to-be-displayed data type to the data standard value;
outputting and sending a data display response carrying the target display information, and displaying the target display information in a display area according to a preset display format; the preset display format is used for displaying data values of the data types to be displayed corresponding to the first display layer, the second display layer and the area to which the data units belong in a display area according to the width of the first display layer, the width of the second display layer and the width of the characters.
In an optional implementation, determining target display information of different data types to be displayed based on the data values of the different data types to be displayed and the data units includes:
determining the data value of each data type to be displayed and the character width occupied by the data unit based on the number of digital characters of the data value of each data type to be displayed and the preset character pixel width;
determining the width of the first display layer based on the obtained full width of the display area and the character width corresponding to the maximum numerical value in the data values;
and determining the width of the second display layer based on the width of the first display layer, the data value of each data type to be displayed and the sum of the data values of each data type to be displayed.
In an alternative implementation, the preset character pixel width includes a preset number character pixel width and a preset unit character pixel width;
determining the data value of each data type to be displayed and the character width occupied by the data unit based on the number of digital characters of the data value of each data type to be displayed and the preset character pixel width, and the method comprises the following steps:
calculating the product of the number of digital characters of the data value of each data type to be displayed and the preset pixel width of the digital characters aiming at each data type to be displayed;
and determining the sum of the calculated product and the preset unit character pixel width as the data value of the data type to be displayed and the character width occupied by the data unit.
In an optional implementation, determining the width of the first display layer based on the obtained full width of the display area and the character width corresponding to the maximum numerical value in each data value includes:
and determining the difference value between the total width of the display area and the character width corresponding to the maximum numerical value as the width of the first display layer.
In an optional implementation, the method further comprises:
acquiring a first interval pixel width between a first edge of the first display layer and a first edge of the display area, a second interval pixel width between the maximum data value and a first edge of the area to which the data unit belongs and a second edge of the display area, and a third interval pixel width between a second edge of the first display layer and a second edge of the area to which the maximum data value and the data unit belong;
determining the width of the first display layer based on the obtained full width of the display area and the character width corresponding to the maximum numerical value in each data value, wherein the determining the width of the first display layer comprises the following steps:
calculating the sum of the character width corresponding to the maximum numerical value in the data values, the first interval pixel width, the second interval pixel width and the third interval pixel width;
and determining the difference value between the total width of the display area and the sum value as the width of the first display layer.
In an optional implementation, determining the width of the second display layer based on the width of the first display layer, the sum of the data value of each to-be-displayed data type and the data value of each to-be-displayed data type includes:
if the ratio of the target data value to the sum of the data values in the data values is not less than a preset ratio threshold, determining the width of a second display layer corresponding to the target data value as the width of the first display layer;
if the ratio of the target data value to the sum of the data values in the data values is smaller than a preset ratio threshold, calculating the width ratio of the target data value to the first display layer;
determining the product of the width ratio and the width of the first display layer as the width of the second display layer;
wherein the target data value is any one of the data values; and the preset proportion threshold value represents that the maximum value is approximately the minimum proportion limit of the data standard values corresponding to the different data types to be displayed.
In an optional implementation, calculating a width ratio of the target data value to the first display layer includes:
calculating the maximum ratio of the maximum data value in the data values to the sum of the data values;
acquiring a width increase proportion of a second display layer corresponding to the target data value based on the maximum ratio and the preset proportion threshold; the width increase proportion represents a proportion base number which needs to be increased when the ratio reaches the preset proportion threshold value on the basis of the ratio of the target data value to the sum of the data values;
and determining the ratio of the sum of the target data value and each data value, the product of the ratio and the width increase proportion, and the sum of the ratios as the width proportion of the second display layer corresponding to the target data value in the first display layer.
In an alternative implementation, the calculation formula of the width increase ratio is expressed as:
IncrePercent=(A/MaxPercent)–1;
wherein, the IncrePercent is the width increasing proportion, the MaxPercent is the maximum ratio, and A is the preset proportion threshold;
the calculation formula of the width ratio of the second display layer corresponding to the target data value to the first display layer is as follows:
(value/SumVal)+(value/SumVal)*IncrePercent;
wherein (value/SumVal) is the ratio of the target data value to the sum of the data values.
In an optional implementation, the preset display format is further configured to mark the identifiers of the different data types to be displayed on the corresponding second display layer;
the first display layer is laid on the second display layer, and the first display layer and the second display layer are the same in height.
In a second aspect, there is provided a data presentation apparatus, which may include: the device comprises an acquisition unit, a determination unit, an output unit and a display unit;
the acquisition unit is used for acquiring a data display request aiming at a target service type, wherein the data display request comprises data values and data units of different data types to be displayed;
the determining unit is used for determining target display information of different data types to be displayed based on the data values of the different data types to be displayed and the data units; the target display information comprises a first display layer for displaying a graph, a second display layer for displaying the graph, a data value and a data unit of each data type to be displayed, and a character width occupied by the data value and the data unit of the corresponding data type to be displayed; the width of the first display layer represents a data standard value corresponding to the different data types to be displayed; the width of the second display layer represents the ratio of the data value of each to-be-displayed data type to the data standard value;
the output unit is used for outputting and sending a data display response carrying the target display information;
the display unit is used for displaying the target display information in a display area according to a preset display format; the preset display format is used for displaying data values of the data types to be displayed corresponding to the first display layer, the second display layer and the area to which the data units belong in a display area according to the width of the first display layer, the width of the second display layer and the width of the characters.
In an optional implementation, the determining unit is specifically configured to determine the data value of each data type to be displayed and the character width occupied by the data unit based on the number of numeric characters of the data value of each data type to be displayed and a preset character pixel width;
determining the width of the first display layer based on the obtained full width of the display area and the character width corresponding to the maximum numerical value in the data values;
and determining the width of the second display layer based on the width of the first display layer, the data value of each data type to be displayed and the sum of the data values of each data type to be displayed.
In an alternative implementation, the preset character pixel width includes a preset number character pixel width and a preset unit character pixel width;
the determining unit is further specifically configured to calculate, for each data type to be displayed, a product of a number of digital characters of a data value of the data type to be displayed and a preset digital character pixel width;
and determining the sum of the calculated product and the preset unit character pixel width as the data value of the data type to be displayed and the character width occupied by the data unit.
In an optional implementation, the determining unit is further specifically configured to determine a difference between a total width of the display area and a character width corresponding to the maximum numerical value as the width of the first display layer.
In an optional implementation, the obtaining unit is further configured to obtain a first interval pixel width between a first edge of the first display layer and a first edge of the display area, a second interval pixel width between the maximum data value and a first edge of the area to which the data unit belongs and a second edge of the display area, and a third interval pixel width between a second edge of the first display layer and a second edge of the area to which the maximum data value and the data unit belong;
the determining unit is further specifically configured to calculate a sum of a character width corresponding to a maximum numerical value of the data values, the first interval pixel width, the second interval pixel width, and the third interval pixel width;
and determining the difference value between the total width of the display area and the sum value as the width of the first display layer.
In an alternative implementation, the apparatus further comprises a computing unit;
the determining unit is further specifically configured to determine, if a ratio of a target data value to a sum of the data values in the data values is not smaller than a preset ratio threshold, a width of a second display layer corresponding to the target data value as a width of the first display layer;
the calculating unit is configured to calculate a width ratio of the target data value to the first display layer if a ratio of a target data value to a sum of the data values in the data values is smaller than a preset ratio threshold;
the determining unit is further specifically configured to determine a product of the width ratio and the width of the first display layer as the width of the second display layer;
wherein the target data value is any one of the data values; and the preset proportion threshold value represents that the maximum value is approximately the minimum proportion limit of the data standard values corresponding to the different data types to be displayed.
In an optional implementation, the calculating unit is further configured to calculate a maximum ratio of a maximum data value of the data values to a sum of the data values;
the obtaining unit is further configured to obtain a width increase ratio of a second display layer corresponding to the target data value based on the maximum ratio and the preset ratio threshold; the width increase proportion represents a proportion base number which needs to be increased when the ratio reaches the preset proportion threshold value on the basis of the ratio of the target data value to the sum of the data values;
the determining unit is further configured to determine, as the width ratio of the second display layer corresponding to the target data value to the first display layer, a product of the ratio of the sum of the target data value and each data value and the width increase ratio and a sum of the ratios.
In an alternative implementation, the calculation formula of the width increase ratio is expressed as:
IncrePercent=(A/MaxPercent)–1;
wherein, the IncrePercent is the width increasing proportion, the MaxPercent is the maximum ratio, and A is the preset proportion threshold;
the calculation formula of the width ratio of the second display layer corresponding to the target data value to the first display layer is as follows:
(value/SumVal)+(value/SumVal)*IncrePercent;
wherein (value/SumVal) is the ratio of the target data value to the sum of the data values.
In an optional implementation, the preset display format is further configured to mark the identifiers of the different data types to be displayed on the corresponding second display layer;
the first display layer is laid on the second display layer, and the first display layer and the second display layer are the same in height.
In a third aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor adapted to perform the method steps of any of the above first aspects when executing a program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, having stored therein a computer program which, when executed by a processor, performs the method steps of any of the above first aspects.
The data display method provided by the embodiment of the invention comprises the steps of obtaining a data display request aiming at a target service type, wherein the data display request comprises data values and data units of different data types to be displayed; determining target display information of different data types to be displayed based on data values and data units of the different data types to be displayed; the target display information comprises a first display layer for displaying the graph, a second display layer for displaying the graph, a data value and a data unit of each data type to be displayed, and a character width occupied by the data value and the data unit of the corresponding data type to be displayed; the width of the first display layer represents data standard values corresponding to different data types to be displayed; the width of the second display layer represents the ratio of the data value of each to-be-displayed data type to the standard data value; outputting and sending a data display response carrying the target display information, and displaying the target display information in a display area according to a preset display format; and the preset display format is used for displaying the data values of the data types to be displayed and the areas to which the data units belong, which correspond to the first display layer, the second display layer and the second display layer, in the display area according to the width of the first display layer, the width of the second display layer and the width of the characters. Compared with the prior art, the method displays the data value of each data type through the first display layer representing the total data value corresponding to different data types, the second display layer representing the corresponding proportion of the data value of the corresponding data type to the total data value, and different data values and data units, and can visually see the data values represented by different bar graphs. The visual experience of the user is improved.
Drawings
FIG. 1 is a schematic illustration of a prior art bar graph presentation provided;
fig. 2 is a schematic flow chart of a data display method according to an embodiment of the present invention;
FIG. 3A is a schematic diagram of a bar graph display according to an embodiment of the present invention;
FIG. 3B is a schematic diagram of another bar graph display provided in accordance with an embodiment of the present invention;
FIG. 3C is a schematic diagram of yet another bar graph display provided in accordance with an embodiment of the present invention;
FIG. 3D is a schematic diagram of yet another bar graph display provided in accordance with an embodiment of the present invention;
FIG. 3E is a schematic diagram of yet another bar graph display provided in accordance with an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a data display apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without any creative effort belong to the protection scope of the present application.
The data display method provided by the embodiment of the invention can be applied to terminal equipment or a system consisting of the terminal equipment and a server.
If the method is applied to the terminal equipment, the display end of the terminal equipment is the front end, the processor of the terminal equipment is the rear end, the front end is used for displaying data, and the rear end is used for processing and feeding back the data.
The Terminal device may be a Mobile phone with strong computing power, a smart phone, a notebook computer, a digital broadcast receiver, a Personal Digital Assistant (PDA), a User Equipment (UE) such as a tablet computer (PAD), a handheld device, a vehicle-mounted device, a wearable device, a computing device, or other processing devices connected to a wireless modem, a Mobile Station (MS), a Mobile Terminal (Mobile Terminal), or the like.
If the method is applied to the system, the display end of the terminal equipment is the front end, the server is the back end, the front end is used for displaying data, and the back end is used for processing and feeding back the data, wherein data transmission is carried out between the terminal equipment and the server in an API mode.
The following describes the method in detail by taking the execution subject as a terminal device as an example.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are merely for illustrating and explaining the present invention and are not intended to limit the present invention, and that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Fig. 2 is a schematic flow chart of a data display method according to an embodiment of the present invention. As shown in fig. 2, the method may include:
step 210, obtaining a data display request for the target service type.
The front end of the terminal equipment receives a data display request aiming at a target service type to obtain the data display request aiming at the target service type and sends the data display request to the rear end, wherein the data display request comprises data values and data units of different data types to be displayed.
For example, if the target business type is a sales business, the data types to be displayed are different article types for sale, such as shirts, woollens, chiffon shirts, pants and socks, and the corresponding data values may be the daily sales of shirts, woollens, chiffon shirts, pants and socks.
If the target service type is an attack service, the data type to be displayed is different attack types, such as a User Datagram Protocol (UDP) attack, that is, a UDP Flood, an Acknowledgement (ACK) attack, that is, an ACK Flood, a Synchronization (SYN) attack, that is, a SYN Flood, an Internet Control Message Protocol (ICMP) attack, that is, an ICMP Flood, a Connection attack, that is, a Connection Flood, and other attacks, that is, other attacks, and corresponding data values may be attack times of corresponding attack types.
For example, the data text format corresponding to the data of different attack types for obtaining the attack service is:
Figure BDA0002873320840000111
namely, the attack frequency of the attack type UDP Flood attack is 70 times;
the attack type is that the attack times of the ACK Flood attack is 55 times;
the attack number of the attack type of SYN Flood attack is 42;
the attack number of the attack type ICMP Flood attack is 19;
the attack number of the attack type of others attack is 15;
the number of attacks of which the attack type is Connection flow attack is 6.
And step 220, determining target display information of different data types to be displayed based on data values and data units of different data types to be displayed.
The target display information comprises a first display layer for displaying the graph, a second display layer for displaying the graph, a data value and a data unit of each data type to be displayed, and a character width occupied by the data value and the data unit of the corresponding data type to be displayed; the display graph can be a bar graph, a bar graph and other statistical graphs.
The width of the first display layer represents data standard values corresponding to different data types to be displayed; the width of the second display layer represents the ratio of the data value of each to-be-displayed data type to the standard data value.
In specific implementation, firstly, the data value of each data type to be displayed and the character width occupied by the data unit are determined based on the bit number of the data value of each data type to be displayed and the preset character pixel width.
Specifically, the preset character pixel width may include a preset numeric character pixel width and a preset unit character pixel width;
calculating the product of the number of digital characters of the data value of each data type to be displayed and the preset pixel width of the digital characters aiming at each data type to be displayed; and determining the sum of the calculated product and the preset unit character pixel width as the data value of the data type to be displayed and the character width occupied by the data unit.
That is, the character width refers to the pixel width of the region to which the numeric character and the data unit character belong.
For example, the preset numeric character pixel width is 7 pixels, the preset unit character pixel width is 12 pixels, and the daily sales volume and sales units of shirts, woollens, chiffon shirts, and pants can be as follows:
the daily sales volume of the shirt is 500;
the daily sales volume of the woolen sweater is 20;
the daily sales volume of the chiffon shirt is 40;
the daily sales volume of the trousers is 5;
for a shirt, the number of numeric characters of 500 is 3, and the product of 3 and the preset numeric character pixel width 7 is 21; because the preset unit character pixel width is 12, the character width corresponding to the shirt is 33 pixels;
correspondingly, the width of the character corresponding to the woolen sweater is 2 × 7+12 ═ 26 pixels;
the character width corresponding to the chiffon shirt is 2 × 7+12 ═ 26 pixels;
the width of the character corresponding to the trousers is 1 × 7+12 ═ 9 pixels;
as shown in fig. 3A, taking the display graph as a bar graph for example, in the display area a, the area 1 is a bar graph area, the area is used for representing the daily sales of shirts, woollen sweaters, chiffon shirts and trousers by using bar graphs with different widths, and the heights of the bar graphs are the same, that is, the heights are preset values; the area 2 includes areas to which character information of daily sales amount corresponding to bar charts of different widths in the area 1 belongs, that is, areas to which corresponding daily sales amount figures and corresponding units belong.
And secondly, determining the width of the first display layer based on the acquired full width of the display area and the character width corresponding to the maximum numerical value in each data value.
If the display area is the whole display screen of the terminal equipment, the full width of the display area is the full width of the whole display screen of the terminal equipment;
if the display area is a preset area in the whole display screen of the terminal equipment, the full width of the display area is the full width of the preset area.
Wherein the obtaining of the full width may at least comprise the following methods:
method one, dimensions.get ('window'). width;
second, document element client width;
third, document.
Fourth, document.
Fifth, window.
Method six, window.
Further, the manner of determining the width of the first display layer may at least include:
and determining the difference value of the total width of the display area and the character width corresponding to the maximum numerical value in each data value as the width of the first display layer.
It can be seen that the data standard value corresponding to the first display layer is not a fixed value, and the data standard value is determined by the data value of each type of data to be displayed under the condition that the full width of the display area is fixed.
As shown in fig. 3B, taking the display graph as a bar graph as an example, in the display area a, the area 1 includes bar graphs corresponding to different types of data to be displayed, and the area 2 includes data values and areas of data units corresponding to the bar graphs in the area 1. The first display layer is a total data value corresponding to each type of data to be displayed.
If the total width of the display area a is S pixels and the character width of the area 2 corresponding to the maximum value is N pixels, the width of the first display layer in the area 1 is M-N.
Obtaining a first interval pixel width between a first edge of the first display layer and a first edge of the display area;
a second spaced pixel width between the maximum data value and a first edge of the region to which the data unit belongs and a second edge of the presentation region;
a third interval pixel width between a second edge of the first display layer and a second edge of the region to which the maximum data value and the data unit belong;
then, calculating the sum of the character width corresponding to the maximum numerical value in each data value, the width of the first interval pixel, the width of the second interval pixel and the width of the third interval pixel; and determining the difference value between the total width of the display area and the sum value as the width of the first display layer.
As shown in fig. 3C, taking the display graph as a bar graph as an example, in the display area a, the area 1 includes bar graphs corresponding to different data types to be displayed, and the first display layer is a total data value corresponding to each data type to be displayed. The area 2 is the area to which the data value and the data unit corresponding to the corresponding bar graph belong. Wherein the first interval pixel width is L1; a second spaced pixel width of L2; the third spaced pixels have a width L3.
If the total width of the display region a is S pixels and the character width of the region 2 corresponding to the maximum value is N pixels, the sum of the character width, the first spaced pixel width, the second spaced pixel width and the third spaced pixel width is N + L1+ L2+ L3, and the width of the first display layer in the region 1 is M ═ S- (N + L1+ L2+ L3).
It should be noted that the character width of the region 2 corresponding to the maximum numerical value is taken as a subtraction number, so that all data values and the character widths corresponding to the corresponding data units are the width of the maximum pixel width (1000 in the above figure), the maximum pixel width is subtracted from the full width of the display region, and then different distances are subtracted, so that the widths of the first display layers of the bar graph corresponding to each data type can be ensured to be consistent, that is, each data type corresponds to the same total data value, so that a user can intuitively compare two types of data.
If the width of the character corresponding to each data value and the corresponding data unit is a subtraction number, then different intervals are subtracted, the width of the first display layer of the bar graph corresponding to each data type is different, the smaller the character width is, the larger the width of the first display layer is, as shown in fig. 3D, the attack times corresponding to the attack types of the ACK Flood in the area 1 are 26 times, and the attack times corresponding to the attack types of the SYN Flood are 4 times; the width value of the first display layer corresponding to the attack type of the ACK Flood is smaller than the width value of the first display layer corresponding to the attack type of the SYN Flood, that is, each data type corresponds to different total data values, and a user can not intuitively compare the two types of data.
And finally, determining the width of the second display layer based on the first width, the data value of each data type to be displayed and the sum of the data values of each data type to be displayed.
Detecting whether the ratio of the target data value to the sum of the data values in the data values is not less than a preset ratio threshold value; the target data value is any one of the data values; the preset proportion threshold value represents that the maximum value is approximately the minimum proportion limit of the data standard values corresponding to different data types to be displayed.
If the ratio of the target data value to the sum of the data values in the data values is not less than the preset ratio threshold, determining the width of the second display layer corresponding to the target data value as the width of the first display layer, that is, the width of the second display layer is the same as the width of the first display layer, and at this time, considering that the data value corresponding to the second display layer is approximate to a data standard value.
If the ratio of the target data value to the sum of the data values in the data values is smaller than a preset ratio threshold, calculating the width ratio of a second display layer corresponding to the target data value to the first display layer;
specifically, the maximum ratio of the maximum data value to the sum of the data values in each data value is calculated;
acquiring a width increase proportion of a second display layer corresponding to the target data value based on the maximum ratio and the preset proportion threshold; the width increase proportion represents a proportion base number which needs to be increased when the ratio reaches a preset proportion threshold value on the basis of the ratio of the target data value to the sum value of each data value, and the proportion base number increase of the width of the second display layer is obtained;
alternatively, the calculation formula of the width increase ratio may be expressed as:
MaxPercent+MaxPercent*IncrePercent=A;
==>MaxPercent*(1+IncrePercent)=A;
==>IncrePercent=(A/MaxPercent)-1;
the IncrePercent is a width increase proportion, the MaxPercent is a maximum ratio, and A is a preset proportion threshold. A may be 96%.
And determining the product of the ratio of the target data value to the sum of the data values and the width increasing proportion and the sum of the ratio as the width proportion of the second display layer corresponding to the target data value to the first display layer.
Alternatively, the calculation formula of the width ratio may be expressed as:
(value/SumVal)+(value/SumVal)*IncrePercent;
wherein (value/SumVal) is a ratio of a target data value to a sum of the data values, and (value/SumVal) × inclusive percentage is a ratio at which the width of the second presentation layer corresponding to each data type needs to be increased.
And determining the width of the second display layer as the product of the width ratio and the width of the first display layer.
Optionally, the calculation formula of the width ItemDistriWidth of the second display layer may be expressed as:
ItemDistriWidth=[(value/SumVal)+(value/SumVal)*IncrePercent]*ItemViewWidth;
wherein ItemViewWidth is the width of the first display layer.
And step 230, outputting and sending a data display response carrying the target display information, and displaying the target display information in the display area according to a preset display format.
The back end of the terminal equipment outputs and sends a data display response carrying the target display information to the front end, and the front end displays the target display information in a display area according to a preset display format.
The preset display format is used for displaying the data values of the data types to be displayed and the areas of the data units corresponding to the first display layer, the second display layer and the second display layer in the display area according to the width of the first display layer, the width of the second display layer and the character width.
The preset display format is also used for marking the identifiers of different data types to be displayed on the corresponding second display layers so as to facilitate viewing. The first display layer is laid on the second display layer, the heights of the first display layer and the second display layer are the same, and a certain interval can exist between display graphics corresponding to each type of data to be displayed.
It should be noted that the identifier of the data type to be displayed may also be marked on the rear side of the display graph formed by the first display layer and the second display layer, or the identifier of the data type to be displayed may be hidden, and the identifier may be displayed in the form of a prompt box when the cursor contacts the display graph.
As shown in fig. 3E, for the bar distribution diagram of the attack type, a preset proportion threshold is set to be 96%, and the attack frequency of the UDP Flood attack is 1000 times; the attack frequency of the ACK Flood attack is 55 times; the attack times of the SYN Flood attack are 42 times; the attack frequency of ICMP Flood attack is 19 times; the attack times of others attack are 15 times; the number of attacks of the Connection Flood attack was 6.
For UDP Flood attack, since the ratio of 1000 to the total number 1137 is about 0.88, and since 0.88 is less than 0.96, the width of the second display layer corresponding to each attack type cannot reach the width of the first display layer.
The data display method provided by the embodiment of the invention comprises the steps of obtaining a data display request aiming at a target service type, wherein the data display request comprises data values and data units of different data types to be displayed; determining target display information of different data types to be displayed based on data values and data units of the different data types to be displayed; the target display information comprises a first display layer for displaying the graph, a second display layer for displaying the graph, a data value and a data unit of each data type to be displayed, and a character width occupied by the data value and the data unit of the corresponding data type to be displayed; the width of the first display layer represents data standard values corresponding to different data types to be displayed; the width of the second display layer represents the ratio of the data value of each to-be-displayed data type to the standard data value; outputting and sending a data display response carrying the target display information, and displaying the target display information in a display area according to a preset display format; the preset display format is used for displaying the data values of the data types to be displayed and the areas of the data units corresponding to the first display layer, the second display layer and the second display layer in the display area according to the width of the first display layer, the width of the second display layer and the character width. Compared with the prior art, the method displays the data value of each data type through the first display layer representing the total data value corresponding to different data types, the second display layer representing the corresponding proportion of the data value of the corresponding data type to the total data value, and different data values and data units, and can visually see the data values represented by different bar graphs. The visual experience of the user is improved.
Corresponding to the above method, an embodiment of the present invention further provides a data display apparatus, as shown in fig. 4, where the data display apparatus includes: the device comprises an acquisition unit 410, a determination unit 420, an output unit 430 and a presentation unit 440;
an obtaining unit 410, configured to obtain a data display request for a target service type, where the data display request includes data values and data units of different data types to be displayed;
a determining unit 420, configured to determine target display information of different data types to be displayed based on the data values of the different data types to be displayed and the data units; the target display information comprises a first display layer for displaying a graph, a second display layer for displaying the graph, a data value and a data unit of each data type to be displayed, and a character width occupied by the data value and the data unit of the corresponding data type to be displayed; the width of the first display layer represents a data standard value corresponding to the different data types to be displayed; the width of the second display layer represents the ratio of the data value of each to-be-displayed data type to the data standard value;
the output unit 430 is configured to output and send a data display response carrying the target display information;
the display unit 440 is configured to display the target display information in a display area according to a preset display format; the preset display format is used for displaying data values of the data types to be displayed corresponding to the first display layer, the second display layer and the area to which the data units belong in a display area according to the width of the first display layer, the width of the second display layer and the width of the characters.
In an optional implementation, the determining unit 420 is specifically configured to determine, based on the number of numeric characters of the data value of each to-be-displayed data type and a preset character pixel width, the data value of each to-be-displayed data type and a character width occupied by the data unit;
determining the width of the first display layer based on the obtained full width of the display area and the character width corresponding to the maximum numerical value in the data values;
and determining the width of the second display layer based on the width of the first display layer, the data value of each data type to be displayed and the sum of the data values of each data type to be displayed.
In an alternative implementation, the preset character pixel width includes a preset number character pixel width and a preset unit character pixel width;
the determining unit 420 is further specifically configured to calculate, for each data type to be displayed, a product of a number of numeric characters of a data value of the data type to be displayed and a preset numeric character pixel width;
and determining the sum of the calculated product and the preset unit character pixel width as the data value of the data type to be displayed and the character width occupied by the data unit.
In an optional implementation, the determining unit 420 is further specifically configured to determine, as the width of the first display layer, a difference between a total width of the display area and a character width corresponding to the maximum numerical value.
In an optional implementation, the obtaining unit 410 is further configured to obtain a first interval pixel width between a first edge of the first display layer and a first edge of the display area, a second interval pixel width between the maximum data value and a first edge of the area to which the data unit belongs and a second edge of the display area, and a third interval pixel width between a second edge of the first display layer and a second edge of the area to which the maximum data value and the data unit belong;
the determining unit 420 is further specifically configured to calculate a sum of a character width corresponding to a maximum numerical value in the data values, the first interval pixel width, the second interval pixel width, and the third interval pixel width;
and determining the difference value between the total width of the display area and the sum value as the width of the first display layer.
In an alternative implementation, the apparatus further comprises a computing unit 450;
the determining unit 420 is further specifically configured to determine, if a ratio of a target data value to a sum of the data values in the data values is not smaller than a preset ratio threshold, a width of a second display layer corresponding to the target data value as a width of the first display layer;
a calculating unit 450, configured to calculate a width ratio of a target data value to the first display layer if a ratio of the target data value to a sum of the data values in the data values is smaller than a preset ratio threshold;
the determining unit 420 is further specifically configured to determine a product of the width ratio and the width of the first display layer as the width of the second display layer;
wherein the target data value is any one of the data values; and the preset proportion threshold value represents that the maximum value is approximately the minimum proportion limit of the data standard values corresponding to the different data types to be displayed.
In an optional implementation, the calculating unit 450 is further configured to calculate a maximum ratio of a maximum data value of the data values to a sum of the data values;
the obtaining unit 410 is further configured to obtain a width increase ratio of a second display layer corresponding to the target data value based on the maximum ratio and the preset ratio threshold; the width increase proportion represents a proportion base number which needs to be increased when the ratio reaches the preset proportion threshold value on the basis of the ratio of the target data value to the sum of the data values;
the determining unit 420 is further configured to determine, as the width ratio of the second display layer corresponding to the target data value to the first display layer, a product of the ratio of the sum of the target data value and each data value and the width increase ratio and a sum of the ratios.
In an alternative implementation, the calculation formula of the width increase ratio is expressed as:
IncrePercent=(A/MaxPercent)–1;
wherein, the IncrePercent is the width increasing proportion, the MaxPercent is the maximum ratio, and A is the preset proportion threshold;
the calculation formula of the width ratio of the second display layer corresponding to the target data value to the first display layer is as follows:
(value/SumVal)+(value/SumVal)*IncrePercent;
wherein (value/SumVal) is the ratio of the target data value to the sum of the data values.
In an optional implementation, the preset display format is further configured to mark the identifiers of the different data types to be displayed on the corresponding second display layer;
the first display layer is laid on the second display layer, and the first display layer and the second display layer are the same in height.
The functions of the functional units of the data display device provided in the above embodiment of the present invention can be implemented by the above method steps, and therefore, detailed working processes and beneficial effects of the units in the data display device provided in the embodiment of the present invention are not repeated herein.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, including a processor 510, a communication interface 520, a memory 530 and a communication bus 540, where the processor 510, the communication interface 520, and the memory 530 complete mutual communication through the communication bus 540.
A memory 530 for storing a computer program;
the processor 510, when executing the program stored in the memory 530, implements the following steps:
acquiring a data display request aiming at a target service type, wherein the data display request comprises data values and data units of different data types to be displayed;
determining target display information of different data types to be displayed based on the data values of the different data types to be displayed and the data units; the target display information comprises a first display layer for displaying a graph, a second display layer for displaying the graph, a data value and a data unit of each data type to be displayed, and a character width occupied by the data value and the data unit of the corresponding data type to be displayed; the width of the first display layer represents a data standard value corresponding to the different data types to be displayed; the width of the second display layer represents the ratio of the data value of each to-be-displayed data type to the data standard value;
outputting and sending a data display response carrying the target display information, and displaying the target display information in a display area according to a preset display format; the preset display format is used for displaying data values of the data types to be displayed corresponding to the first display layer, the second display layer and the area to which the data units belong in a display area according to the width of the first display layer, the width of the second display layer and the width of the characters.
In an optional implementation, determining target display information of different data types to be displayed based on the data values of the different data types to be displayed and the data units includes:
determining the data value of each data type to be displayed and the character width occupied by the data unit based on the number of digital characters of the data value of each data type to be displayed and the preset character pixel width;
determining the width of the first display layer based on the obtained full width of the display area and the character width corresponding to the maximum numerical value in the data values;
and determining the width of the second display layer based on the width of the first display layer, the data value of each data type to be displayed and the sum of the data values of each data type to be displayed.
In an alternative implementation, the preset character pixel width includes a preset number character pixel width and a preset unit character pixel width;
determining the data value of each data type to be displayed and the character width occupied by the data unit based on the number of digital characters of the data value of each data type to be displayed and the preset character pixel width, and the method comprises the following steps:
calculating the product of the number of digital characters of the data value of each data type to be displayed and the preset pixel width of the digital characters aiming at each data type to be displayed;
and determining the sum of the calculated product and the preset unit character pixel width as the data value of the data type to be displayed and the character width occupied by the data unit.
In an optional implementation, determining the width of the first display layer based on the obtained full width of the display area and the character width corresponding to the maximum numerical value in each data value includes:
and determining the difference value between the total width of the display area and the character width corresponding to the maximum numerical value as the width of the first display layer.
In an optional implementation, the method further comprises:
acquiring a first interval pixel width between a first edge of the first display layer and a first edge of the display area, a second interval pixel width between the maximum data value and a first edge of the area to which the data unit belongs and a second edge of the display area, and a third interval pixel width between a second edge of the first display layer and a second edge of the area to which the maximum data value and the data unit belong;
determining the width of the first display layer based on the obtained full width of the display area and the character width corresponding to the maximum numerical value in each data value, wherein the determining the width of the first display layer comprises the following steps:
calculating the sum of the character width corresponding to the maximum numerical value in the data values, the first interval pixel width, the second interval pixel width and the third interval pixel width;
and determining the difference value between the total width of the display area and the sum value as the width of the first display layer.
In an optional implementation, determining the width of the second display layer based on the width of the first display layer, the sum of the data value of each to-be-displayed data type and the data value of each to-be-displayed data type includes:
if the ratio of the target data value to the sum of the data values in the data values is not less than a preset ratio threshold, determining the width of a second display layer corresponding to the target data value as the width of the first display layer;
if the ratio of the target data value to the sum of the data values in the data values is smaller than a preset ratio threshold, calculating the width ratio of the target data value to the first display layer;
determining the product of the width ratio and the width of the first display layer as the width of the second display layer;
wherein the target data value is any one of the data values; and the preset proportion threshold value represents that the maximum value is approximately the minimum proportion limit of the data standard values corresponding to the different data types to be displayed.
In an optional implementation, calculating a width ratio of the target data value to the first display layer includes:
calculating the maximum ratio of the maximum data value in the data values to the sum of the data values;
acquiring a width increase proportion of a second display layer corresponding to the target data value based on the maximum ratio and the preset proportion threshold; the width increase proportion represents a proportion base number which needs to be increased when the ratio reaches the preset proportion threshold value on the basis of the ratio of the target data value to the sum of the data values;
and determining the ratio of the sum of the target data value and each data value, the product of the ratio and the width increase proportion, and the sum of the ratios as the width proportion of the second display layer corresponding to the target data value in the first display layer.
In an alternative implementation, the calculation formula of the width increase ratio is expressed as:
IncrePercent=(A/MaxPercent)–1;
wherein, the IncrePercent is the width increasing proportion, the MaxPercent is the maximum ratio, and A is the preset proportion threshold;
the calculation formula of the width ratio of the second display layer corresponding to the target data value to the first display layer is as follows:
(value/SumVal)+(value/SumVal)*IncrePercent;
wherein (value/SumVal) is the ratio of the target data value to the sum of the data values.
In an optional implementation, the preset display format is further configured to mark the identifiers of the different data types to be displayed on the corresponding second display layer;
the first display layer is laid on the second display layer, and the first display layer and the second display layer are the same in height.
The aforementioned communication bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
Since the implementation manner and the beneficial effects of the problem solving of each device of the electronic device in the foregoing embodiment can be implemented by referring to each step in the embodiment shown in fig. 2, detailed working processes and beneficial effects of the electronic device provided by the embodiment of the present invention are not described herein again.
In another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the computer-readable storage medium runs on a computer, the computer is caused to execute the data presentation method described in any one of the above embodiments.
In yet another embodiment, the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the data presentation method described in any of the above embodiments.
As will be appreciated by one of skill in the art, the embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present application.
It is apparent that those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the embodiments of the present application and their equivalents, the embodiments of the present application are also intended to include such modifications and variations.

Claims (10)

1. A method for presenting data, the method comprising:
acquiring a data display request aiming at a target service type, wherein the data display request comprises data values and data units of different data types to be displayed;
determining target display information of different data types to be displayed based on the data values of the different data types to be displayed and the data units; the target display information comprises a first display layer for displaying a graph, a second display layer for displaying the graph, a data value and a data unit of each data type to be displayed, and a character width occupied by the data value and the data unit of the corresponding data type to be displayed; the width of the first display layer represents a data standard value corresponding to the different data types to be displayed; the width of the second display layer represents the ratio of the data value of each to-be-displayed data type to the data standard value;
outputting and sending a data display response carrying the target display information, and displaying the target display information in a display area according to a preset display format; the preset display format is used for displaying data values of the data types to be displayed corresponding to the first display layer, the second display layer and the area to which the data units belong in a display area according to the width of the first display layer, the width of the second display layer and the width of the characters.
2. The method of claim 1, wherein determining the target presentation information for the different data types to be presented based on the data values and the data units for the different data types to be presented comprises:
determining the data value of each data type to be displayed and the character width occupied by the data unit based on the number of digital characters of the data value of each data type to be displayed and the preset character pixel width;
determining the width of the first display layer based on the obtained full width of the display area and the character width corresponding to the maximum numerical value in the data values;
and determining the width of the second display layer based on the width of the first display layer, the data value of each data type to be displayed and the sum of the data values of each data type to be displayed.
3. The method of claim 2, wherein the predetermined character pixel width comprises a predetermined numeric character pixel width and a predetermined unit character pixel width;
determining the data value of each data type to be displayed and the character width occupied by the data unit based on the number of digital characters of the data value of each data type to be displayed and the preset character pixel width, and the method comprises the following steps:
calculating the product of the number of digital characters of the data value of each data type to be displayed and the preset pixel width of the digital characters aiming at each data type to be displayed;
and determining the sum of the calculated product and the preset unit character pixel width as the data value of the data type to be displayed and the character width occupied by the data unit.
4. The method of claim 2, wherein determining the width of the first display layer based on the obtained full width of the display area and the character width corresponding to the maximum value of the data values comprises:
and determining the difference value between the total width of the display area and the character width corresponding to the maximum numerical value as the width of the first display layer.
5. The method of claim 2 or 4, wherein the method further comprises:
acquiring a first interval pixel width between a first edge of the first display layer and a first edge of the display area, a second interval pixel width between the maximum data value and a first edge of the area to which the data unit belongs and a second edge of the display area, and a third interval pixel width between a second edge of the first display layer and a second edge of the area to which the maximum data value and the data unit belong;
determining the width of the first display layer based on the obtained full width of the display area and the character width corresponding to the maximum numerical value in each data value, wherein the determining the width of the first display layer comprises the following steps:
calculating the sum of the character width corresponding to the maximum numerical value in the data values, the first interval pixel width, the second interval pixel width and the third interval pixel width;
and determining the difference value between the total width of the display area and the sum value as the width of the first display layer.
6. The method of claim 2, wherein determining the width of the second presentation layer based on the width of the first presentation layer, the sum of the data value of each data type to be presented and the data value of each data type to be presented comprises:
if the ratio of the target data value to the sum of the data values in the data values is not less than a preset ratio threshold, determining the width of a second display layer corresponding to the target data value as the width of the first display layer;
if the ratio of the target data value to the sum of the data values in the data values is smaller than a preset ratio threshold, calculating the width ratio of the target data value to the first display layer;
determining the product of the width ratio and the width of the first display layer as the width of the second display layer;
wherein the target data value is any one of the data values; and the preset proportion threshold value represents that the maximum value is approximately the minimum proportion limit of the data standard values corresponding to the different data types to be displayed.
7. The method of claim 6, wherein calculating the ratio of the target data value to the width of the first presentation layer comprises:
calculating the maximum ratio of the maximum data value in the data values to the sum of the data values;
acquiring a width increase proportion of a second display layer corresponding to the target data value based on the maximum ratio and the preset proportion threshold; the width increase proportion represents a proportion base number which needs to be increased when the ratio reaches the preset proportion threshold value on the basis of the ratio of the target data value to the sum of the data values;
and determining the ratio of the sum of the target data value and each data value, the product of the ratio and the width increase proportion, and the sum of the ratios as the width proportion of the second display layer corresponding to the target data value in the first display layer.
8. A data presentation device, the device comprising: the device comprises an acquisition unit, a determination unit, an output unit and a display unit;
the acquisition unit is used for acquiring a data display request aiming at a target service type, wherein the data display request comprises data values and data units of different data types to be displayed;
the determining unit is used for determining target display information of different data types to be displayed based on the data values of the different data types to be displayed and the data units; the target display information comprises a first display layer for displaying a graph, a second display layer for displaying the graph, a data value and a data unit of each data type to be displayed, and a character width occupied by the data value and the data unit of the corresponding data type to be displayed; the width of the first display layer represents a data standard value corresponding to the different data types to be displayed; the width of the second display layer represents the ratio of the data value of each to-be-displayed data type to the data standard value;
the output unit is used for outputting and sending a data display response carrying the target display information;
the display unit is used for displaying the target display information in a display area according to a preset display format; the preset display format is used for displaying data values of the data types to be displayed corresponding to the first display layer, the second display layer and the area to which the data units belong in a display area according to the width of the first display layer, the width of the second display layer and the width of the characters.
9. An electronic device, characterized in that the electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-7 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN202011612604.3A 2020-12-30 2020-12-30 Data display method and device Active CN113590997B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011612604.3A CN113590997B (en) 2020-12-30 2020-12-30 Data display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011612604.3A CN113590997B (en) 2020-12-30 2020-12-30 Data display method and device

Publications (2)

Publication Number Publication Date
CN113590997A true CN113590997A (en) 2021-11-02
CN113590997B CN113590997B (en) 2024-05-17

Family

ID=78238094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011612604.3A Active CN113590997B (en) 2020-12-30 2020-12-30 Data display method and device

Country Status (1)

Country Link
CN (1) CN113590997B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114430336A (en) * 2021-12-21 2022-05-03 成都鲁易科技有限公司 Decrypted data display method and device, storage medium and computer equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106570142A (en) * 2016-11-04 2017-04-19 北京神州绿盟信息安全科技股份有限公司 Data rendering method and device
US20190034047A1 (en) * 2017-07-31 2019-01-31 Wisconsin Alumni Research Foundation Web-Based Data Upload and Visualization Platform Enabling Creation of Code-Free Exploration of MS-Based Omics Data
US20190114365A1 (en) * 2017-10-17 2019-04-18 Baidu Online Network Technology (Beijing) Co., Ltd Method and apparatus for displaying information
CN109977545A (en) * 2019-03-26 2019-07-05 国网河南省电力公司经济技术研究院 A kind of Electric Power Network Planning figure methods of exhibiting and system
CN110263281A (en) * 2019-06-17 2019-09-20 北京亚鸿世纪科技发展有限公司 The adaptive device and method of page resolution in a kind of exploitation of data visualization
CN111159502A (en) * 2019-12-27 2020-05-15 中国银行股份有限公司 Data processing method and device for visual display
CN111177630A (en) * 2019-12-30 2020-05-19 中国银行股份有限公司 Data display method and device
CN111556057A (en) * 2020-04-29 2020-08-18 绿盟科技集团股份有限公司 Flow abnormity detection method and device, electronic equipment and storage medium
WO2020192463A1 (en) * 2019-03-27 2020-10-01 阿里巴巴集团控股有限公司 Display method and apparatus

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106570142A (en) * 2016-11-04 2017-04-19 北京神州绿盟信息安全科技股份有限公司 Data rendering method and device
US20190034047A1 (en) * 2017-07-31 2019-01-31 Wisconsin Alumni Research Foundation Web-Based Data Upload and Visualization Platform Enabling Creation of Code-Free Exploration of MS-Based Omics Data
US20190114365A1 (en) * 2017-10-17 2019-04-18 Baidu Online Network Technology (Beijing) Co., Ltd Method and apparatus for displaying information
CN109977545A (en) * 2019-03-26 2019-07-05 国网河南省电力公司经济技术研究院 A kind of Electric Power Network Planning figure methods of exhibiting and system
WO2020192463A1 (en) * 2019-03-27 2020-10-01 阿里巴巴集团控股有限公司 Display method and apparatus
CN110263281A (en) * 2019-06-17 2019-09-20 北京亚鸿世纪科技发展有限公司 The adaptive device and method of page resolution in a kind of exploitation of data visualization
CN111159502A (en) * 2019-12-27 2020-05-15 中国银行股份有限公司 Data processing method and device for visual display
CN111177630A (en) * 2019-12-30 2020-05-19 中国银行股份有限公司 Data display method and device
CN111556057A (en) * 2020-04-29 2020-08-18 绿盟科技集团股份有限公司 Flow abnormity detection method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴焕萍;张永强;孙家民;邵鹏程;: "气候信息交互显示与分析平台(CIPAS)设计与实现", 应用气象学报, no. 05, 15 October 2013 (2013-10-15) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114430336A (en) * 2021-12-21 2022-05-03 成都鲁易科技有限公司 Decrypted data display method and device, storage medium and computer equipment
CN114430336B (en) * 2021-12-21 2023-10-03 成都鲁易科技有限公司 Method and device for displaying decrypted data, storage medium and computer equipment

Also Published As

Publication number Publication date
CN113590997B (en) 2024-05-17

Similar Documents

Publication Publication Date Title
CN106445243B (en) Touch response device and method of intelligent equipment
CN106021421B (en) method and device for accelerating webpage rendering
US20150058766A1 (en) Information processing methods and electronic devices
EP3073363B1 (en) Electronic device, control method and control program
CN108616575B (en) Operation monitoring method and device, computer equipment and storage medium
CN107704223B (en) Advertisement display method and mobile terminal
TW201211801A (en) Displaying items in an application window
EP3525084A1 (en) Data processing method, and electronic terminal
CN113590997B (en) Data display method and device
CN105183474B (en) The method and apparatus that waterfall-type picture is shown
CN113296649A (en) Icon display method and device and electronic equipment
CN114527980A (en) Display rendering method and device, electronic equipment and readable storage medium
CN107943368A (en) Display control method, device, computer installation and computer-readable recording medium
CN103558957A (en) Method and device for screen operation of mobile terminal
CN107085521A (en) A kind of icon display method and device
CN115840550A (en) Angle-adaptive display screen display method, device and medium
CN113364915B (en) Information display method and device and electronic equipment
CN109388311A (en) A kind of image display method, device and equipment
CN111127310B (en) Image processing method and device, electronic equipment and storage medium
CN114398571A (en) Image annotation method, image annotation system, electronic device and storage medium
CN105022756B (en) A kind of Webpage display process and device
CN114416264A (en) Message display method and device
CN110991050A (en) CAD (computer-aided design) image stacking method and related product
US20220075583A1 (en) Information processing method, server, terminal, and computer storage medium
CN110795665A (en) Webpage article comment processing method and server side

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