METHOD AND DEVICE FOR DISPLAYING REPRESENTATION INDICATOR OF OBJECT
20220129504 · 2022-04-28
Inventors
Cpc classification
G06F11/32
PHYSICS
G06F11/301
PHYSICS
G06F11/34
PHYSICS
G06F3/14
PHYSICS
International classification
G06F11/34
PHYSICS
Abstract
Embodiments of this application provide a method and a device for displaying a representation indicator of an object. In the method for displaying a representation indicator of an object, values of representation indicators of a plurality of monitored objects at a plurality of sampling time points are determined; and image information used to display changes of the representation indicators is generated, where the image information includes the plurality of sampling time points, values of representation indicators of a plurality of objects that meet a sorting requirement at the sampling time points, and association information, and the association information is used to associate values of representation indicators that are at a same sorting position at the sampling time points, to reflect changes of the values of the representation indicators that are at the same sorting position.
Claims
1. A method for displaying a representation indicator of an object, wherein the method comprises: determining values of representation indicators of N objects at a plurality of sampling time points, wherein N≥2; and generating, based on the values of the representation indicators of the N objects at the plurality of sampling time points, image information used to display changes of the representation indicators, wherein the image information comprises the plurality of sampling time points, values of representation indicators of a plurality of objects that meet a sorting requirement at the sampling time points, and association information, and the association information is used to associate values of representation indicators that are at a same sorting position at the sampling time points, to reflect changes of the values of the representation indicators that are at the same sorting position.
2. The method according to claim 1, wherein the method further comprises: displaying the changes of the values of the representation indicators based on the image information.
3. The method according to claim 1, wherein the association information is represented as that the values of the representation indicators that are at the same sorting position at the sampling time points are displayed by using a same feature.
4. The method according to claim 3, wherein the same feature is specifically a same color, size, shape, or category.
5. The method according to claim 1, wherein the association information is represented as that the values of the representation indicators that are at the same sorting position at the sampling time points are connected to form a complete broken line or curve in a same color, and broken lines or curves formed by values of representation indicators at different sorting positions are different in color.
6. The method according to claim 1, wherein the method further comprises: displaying the changes of values of the plurality of representation indicators based on the plurality of pieces of image information.
7. The method according to claim 1 wherein the representation indicator comprises a CPU usage, memory usage, I/O, a network delay, a packet loss rate, traffic, queries per second (queries per second, QPS), transactions per second (transactions per second, TPS), duration (duration time, DT), or disk space usage.
8. The method according to claim 2, wherein the image information further comprises identifiers of the plurality of objects that meet the sorting requirement at the sampling time points, and the identifier may uniquely identify the object; and the displaying comprises: simultaneously displaying identifiers of objects and values of representation indicators that correspond to one or more specified sorting positions at a specific sampling time point.
9. A device for displaying a representation indicator of an object, wherein the device comprises: a determining unit, configured to determine values of representation indicators of N objects at a plurality of sampling time points, wherein N≥2; and a generation unit, configured to generate, based on the values of the representation indicators of the N objects at the plurality of sampling time points, image information used to display changes of the representation indicators, wherein the image information comprises the plurality of sampling time points, values of representation indicators of a plurality of objects that meet a sorting requirement at the sampling time points, and association information, and the association information is used to associate values of representation indicators that are at a same sorting position at the sampling time points, to reflect changes of the values of the representation indicators that are at the same sorting position.
10. The device according to claim 9, wherein the device further comprises a display unit, configured to display the changes of the values of the representation indicators based on the image information.
11. The device according to claim 10, wherein the device further comprises an evaluation unit, configured to evaluate a running status of one or more of the objects based on the displaying.
12. The device according to claim 9, wherein the association information is represented as that the values of the representation indicators that are at the same sorting position at the sampling time points are displayed by using a same feature.
13. The device according to claim 12, wherein the same feature is specifically a same color, size, shape, or category.
14. The device according to claim 9, wherein the association information is represented as that the values of the representation indicators that are at the same sorting position at the sampling time points are connected to form a complete broken line or curve in a same color, and broken lines or curves formed by values of representation indicators at different sorting positions are different in color.
15. The device according to claim 9, wherein a plurality of pieces of image information used to display the changes of the representation indicators are generated, and the plurality of pieces of image information respectively reflect changes of a plurality of representation indicators.
16. The device according to claim 9, wherein the changes of values of the plurality of representation indicators are displayed based on the plurality of pieces of image information.
17. The device according claim 9, wherein the representation indicator comprises a CPU usage, memory usage, I/O, a network delay, a packet loss rate, traffic, queries per second (queries per second, QPS), transactions per second (transactions per second, TPS), duration (duration time, DT), or disk space usage.
18. The device according to claim 10, wherein the image information further comprises identifiers of the plurality of objects that meet the sorting requirement at the sampling time points, and the identifier may uniquely identify the object; and the displaying comprises: simultaneously displaying identifiers of objects and values of representation indicators that correspond to one or more specified sorting positions at a specific sampling time point.
19. The device according to claim 10, wherein the image information further comprises average values of the values of the representation indicators of the N objects at the sampling time points; and the displaying comprises: displaying changes of the average values.
20. The device according to claim 19, wherein only some specified sorting positions and/or corresponding changes of average values are displayed by controlling button selection.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
DESCRIPTION OF EMBODIMENTS
[0034] To make the objectives, technical solutions, and advantages of this application clearer, the following further describes in detail embodiments of this application with reference to the accompanying drawings.
[0035] An application scenario described in the embodiments of this application is intended to more clearly describe the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided in the embodiments of this application. A person of ordinary skill in the art may learn that the technical solutions provided in the embodiments of this application are also applicable to a similar technical problem as a network architecture evolves and a new application scenario emerges.
[0036]
[0037]
[0038] The communications interface 202 is configured to: receive data sent by the network device, and send data to the network device.
[0039] The memory 203 is configured to store computer-readable instructions and data.
[0040] The processor 201 is configured to: read the instructions and the data stored in the memory 203, and perform a specific operation based on the instructions and the data.
[0041] The processor 201 may be an integrated circuit chip that has a signal processing capability. In an implementation process, the methods described in the embodiments can be implemented by using a hardware integrated logical circuit in the processor, or by using instructions in a form of software. These instructions may be implemented and controlled through cooperation of the processor, and are used to perform the methods disclosed in the embodiments of this application. The processor may alternatively be a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (application-specific integrated circuit), a field programmable gate array (Field Programmable Gate Array, FPGA) or another programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.
[0042] The processor 201 may alternatively be a general-purpose processor, a microprocessor, any conventional processor, a decoder, or the like. Further, there may be a plurality of processors. For example, there are both the processor 201 and a processor 205, or more processors. The specific operation performed based on the instructions and the data may be directly performed by a hardware processor, or may be performed by a combination of hardware in a processor and a software module. The software module may be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register.
[0043] The drive circuit 204 is configured to drive each piece of hardware in the monitoring device, so that each piece of hardware can normally work.
[0044] A person skilled in the art also knows that a monitored object is not limited to the network device 100. The monitored “object” in the embodiments of this application refers to hardware, software, or a component thereof at each possible granularity. Specifically, the hardware or software may be an independent running device, for example, the network device 100 shown in
[0045] The “representation indicator” in the embodiments of this application is an indicator that can be represented and that can reflect a running status, a health status, or the like of an object.
[0046] The “indicator that can be represented” may be directly represented in a data form or in another form, provided that the indicator can be finally quantified directly or relatively.
[0047]
[0048] S310. Determine values of representation indicators of N objects at a plurality of sampling time points, where N≥2.
[0049] For ease of understanding, a method for displaying representation indicators of a plurality of virtual machines included in a network in a cluster environment is described in detail herein by using an example in which the network is monitored. The values of the representation indicators of the N (N≥2) objects, namely, N virtual machines, in the distributed cluster environment at the plurality of sampling time points are determined. For example, the representation indicator includes a CPU, memory, I/O, a network delay, a packet loss rate, traffic, queries per second (queries per second, QPS), transactions per second (transactions per second, TPS), duration (duration time, DT), or disk space usage, and may be another representation indicator that needs to be monitored, for example, a success rate or a failure rate of an action (action) such as a request, forwarding, or receiving. This is not specifically limited herein. The plurality of sampling time points may be set at an equal interval, for example, an interval of 10 s, or may be set at a preset unequal time interval. Representation indicators of the virtual machines are obtained at each interval time point. For example, as shown in
[0050] S315. Generate, based on the values of the representation indicators of the N objects at the plurality of sampling time points, image information used to display changes of the representation indicators, where the image information includes the plurality of sampling time points, values of representation indicators of a plurality of objects that meet a sorting requirement at the sampling time points, and association information, and the association information is used to associate values of representation indicators that are at a same sorting position at the sampling time points, to reflect changes of the values of the representation indicators that are at the same sorting position.
[0051]
[0052] In an embodiment of this application, average values of values of representation indicators of a plurality of objects at the sampling time points may be further calculated. For example, there may be various possible manners of calculating the average value, for example, an arithmetic mean, a root mean square, a harmonic mean, a moving average, an arithmetic-geometric mean, or a geometric-harmonic mean. For example, in
[0053] In another embodiment of this application, the method further includes the following content shown in
[0054] S320. Display the changes of the values of the representation indicators based on the image information.
[0055] The changes of the values of the representation indicators are displayed based on the image information generated in S315.
[0056] In an embodiment of this application, broken lines only at some specified sorting positions may be selected for display, for example, a broken line only at the first sorting position is displayed, and not broken lines at all sorting positions are displayed. In addition, herein, selecting a broken line or a dashed line for connection is merely used as a possible implementation form. In another embodiment, a curve or another form of line may be selected for connection, or no connection is established, and only a scattered point diagram is presented. In this embodiment of this application, devices or components for performing S315 and S320 may be the same or different. When two mutually independent devices perform S315 and S320, a device for performing S315 may send the image information to a device for performing S320, so that the device for performing S320 may perform display based on the image information.
[0057] Further, to help a user use and intuitively and quickly obtain information at each key display position, an identifier of an object and a value of a representation indicator that correspond to a specific sorting position at each sampling time point may be further displayed. In this embodiment of this application, the “identifier” of the object refers to identification information that may uniquely identify the object in a required range, for example, an IP address, a MAC address, or a product serial number of a device, or a serial number or a name of application software, or a process name.
[0058] Specifically, it may be set to directly display identifiers of objects and values of representation indicators that correspond to a plurality of sorting positions at the plurality of sampling time points. Alternatively, it may be set that a hovering time of a mouse of the user is detected, and when the hovering time meets a specified determining time, an identifier of an object and a value of a representation indicator that correspond to a hovering position are displayed.
[0059] Certainly, setting may be performed based on any required rule. For example, when the mouse hovers over a sampling time point for a long enough time, identifiers of objects and values of representation indicators that correspond to a plurality of sorting positions at the sampling time point are displayed. This is merely used for illustration. This is not specifically limited herein. As shown in
[0060] In another embodiment of this application, the method further includes S325 shown in
[0061] S325. Evaluate a running status of one or more of the objects based on the displaying.
[0062] For better description, a schematic diagram of displaying changes of representation indicators provided in this embodiment is first shown herein. The schematic diagram is derived from a possible actual application scenario. In the application scenario, the monitoring device 200 samples CPU usage values of 80 virtual machines in a distributed cluster environment, and sampling time points are set at an interval of 10 s from 18:57 to 19:26. The monitoring device 200 generates image information used to display changes of CPU usage values at the top three sorting positions at the sampling time points, and generates image information used to display average values of the CPU usage values of the 80 virtual machines at the sampling time points. The monitoring device 200 or a display device independent of the monitoring device 200 displays the changes of the CPU usage values of the 80 virtual machines based on the image information, as shown in
[0063] It should be further noted that CPU usage values at a same sorting location at different sampling time points may correspond to different virtual machines. Different virtual machines may be distinguished by using identifiers of the virtual machines, for example, IP addresses of the virtual machines. For example, at 17:00, an IP address of a virtual machine with highest CPU usage is 10.180.129.78, and in this case, the peak CPU usage is 25.51% (not shown in the figure, which is merely used as an example for description). This is different from the IP address of the virtual machine with the largest CPU usage value at 17:38:50, and therefore it may be determined that the two virtual machines with the highest CPU usage at the two moments are different virtual machines.
[0064] Based on the foregoing schematic diagram that represents the changes of the CPU usage values of the 80 virtual machines, a running status of each virtual machine in the distributed cluster environment is then analyzed and evaluated based on the display. For example, a virtual machine that abnormally runs in a specific time period may be found by locating a peak point of the displayed sorting curve; an overall health condition of a device may be learned of by observing an average value curve of a plurality of virtual machines; and a distribution status of the virtual machines in the cluster environment can be evaluated by determining a difference between a representation indicator of a virtual machine with a high rank and an overall average value.
[0065] S310 to S325 may be performed by one device, for example, the monitoring device 200, or may be performed by a plurality of devices. For example, S310 and S315 are performed by one device, and S320 and S325 are performed by another device, or S310 to S325 are respectively performed by four devices.
[0066] In another embodiment of this application, a cause for abnormality of a virtual machine and the like may be analyzed and determined in a plurality of dimensions by comparing change curves of a plurality of representation indicators in a same time period. For example,
[0067] In another embodiment of this application, it may be set to display changes of representation indicators only at some sorting positions. For example, for
[0068] In this embodiment of this application, abnormal information of values of specific representation indicators of a plurality of objects in a network environment can be intuitively displayed, and an object that abnormally runs in a sampling period can be quickly located, thereby greatly improving abnormality check efficiency of the monitored objects. Evaluation of an overall health condition of the plurality of objects in the network environment may be further facilitated by displaying changes of average values of the representation indicator of the plurality of objects. In addition, a cause for abnormality of a virtual machine and the like may be further analyzed and determined in a plurality of dimensions by comprehensively comparing changes of a plurality of representation indicators of a plurality of objects in a same sampling period.
[0069] An embodiment of this application further provides a device 700 for displaying a representation indicator of an object. The device 700 includes a determining unit 705, a generation unit 710, a display unit 715, and an evaluation unit 720. The units may be respectively configured to implement the corresponding functions performed in S310 to S325 in the foregoing method embodiments. Details are as follows:
[0070] The determining unit 705 is configured to determine values of representation indicators of N objects at a plurality of sampling time points, where N≥2.
[0071] The generation unit 710 is configured to generate, based on the values of the representation indicators of the N objects at the plurality of sampling time points, image information used to display changes of the representation indicators. The image information includes the plurality of sampling time points, values of representation indicators of a plurality of objects that meet a sorting requirement at the sampling time points, and association information, and the association information is used to associate values of representation indicators that are at a same sorting position at the sampling time points, to reflect changes of the values of the representation indicators that are at the same sorting position.
[0072] The display unit 715 is configured to display the changes of the values of the representation indicators based on the image information.
[0073] The evaluation unit 720 is configured to evaluate a running status of one or more of the objects based on the displaying.
[0074] Both the display unit 715 and the evaluation unit 720 are optional units.
[0075] An embodiment of this application further provides a computer-readable storage medium. The storage medium stores a computer program, and the computer program is used to perform the method for displaying a representation indicator of an object described in the foregoing embodiments.
[0076] An embodiment of this application further provides a device. The device includes a processor and a memory. The memory is configured to store a computer program, and the processor is configured to invoke the computer program stored in the memory, to perform the method for displaying a representation indicator of an object described in the foregoing embodiments. For example, in a specific embodiment of this application, the device may be the monitoring device 200 shown in
[0077] The parts in this specification are all described in a progressive manner, for same or similar parts in the embodiments, refer to these embodiments, and each embodiment focuses on a difference from other embodiments. Especially, the device embodiment is basically similar to a method embodiment, and therefore is described briefly; for related parts, refer to descriptions in the method embodiment.
[0078] It should be understood that sequence numbers of the foregoing method do not mean execution sequences in various embodiments of this application. The execution sequences of the method should be determined based on functions and internal logic of the method, and should not be construed as any limitation on the implementation processes of the embodiments of this application.
[0079] The foregoing embodiments are merely intended for describing the technical solutions of this application, and are not intended for limiting this application. Although this application is described in detail with reference to the foregoing embodiments, a person of ordinary skill in the art should further understand that any modification or variation to the technical solutions described in the foregoing embodiments or equivalent replacement to some technical features thereof shall fall within the spirit and the scope of the technical solutions of the embodiments of this application.