CN110995536B - Resource utilization rate statistical method and device - Google Patents

Resource utilization rate statistical method and device Download PDF

Info

Publication number
CN110995536B
CN110995536B CN201911201481.1A CN201911201481A CN110995536B CN 110995536 B CN110995536 B CN 110995536B CN 201911201481 A CN201911201481 A CN 201911201481A CN 110995536 B CN110995536 B CN 110995536B
Authority
CN
China
Prior art keywords
target
dimension
time
usage
network tester
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911201481.1A
Other languages
Chinese (zh)
Other versions
CN110995536A (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.)
Ziguang Huashan Technology Co ltd
Original Assignee
Ziguang Huashan Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ziguang Huashan Technology Co ltd filed Critical Ziguang Huashan Technology Co ltd
Priority to CN201911201481.1A priority Critical patent/CN110995536B/en
Publication of CN110995536A publication Critical patent/CN110995536A/en
Application granted granted Critical
Publication of CN110995536B publication Critical patent/CN110995536B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level

Abstract

The invention provides a method and a device for counting resource utilization rate, wherein the method comprises the following steps: acquiring an operation record of the network tester; wherein the operation record comprises a resource identifier and an operation time; determining a target operation record based on the resource identification and the operation time, wherein the resource identification is matched with a target utilization rate dimension, and the operation time is matched with a target time dimension; and determining the utilization rate of the network tester in the target utilization rate dimension in the target time dimension based on the target operation record. By applying the embodiment of the invention, the accuracy of the network tester utilization rate statistics can be improved.

Description

Resource utilization rate statistical method and device
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a method and an apparatus for counting resource utilization.
Background
Conventional network device manufacturers or network operators need to purchase a large number of network testers from network device tester manufacturers to perform function and performance tests on the network devices. In order to reasonably utilize resources, enterprises need to acquire the actual use condition of the network tester.
Because a tester manufacturer does not provide a method for counting the utilization rate of a tester port, the utilization rate of the tester port is currently obtained by counting the utilization rate of the tester by acquiring whether the port is occupied and the occupied time length through an external interface provided by the manufacturer.
However, practice shows that in the above network tester usage rate statistical scheme, the usage rate of the network tester is counted according to the time length that the port of the network tester is occupied, but after the port of the network tester is occupied, there may be no actual operation, that is, the port is not actually used, so that the counted usage rate of the network tester is not matched with the actual usage rate.
Disclosure of Invention
The invention provides a resource utilization rate statistical method and a resource utilization rate statistical device, which are used for solving the problem that the utilization rate of a network tester counted in the conventional network tester utilization rate statistical scheme is not matched with the actual utilization rate.
According to a first aspect of the embodiments of the present invention, a resource usage rate statistical method is provided, including:
acquiring an operation record of the network tester; wherein the operation record comprises a resource identifier and an operation time;
determining a target operation record based on the resource identification and the operation time, wherein the resource identification is matched with a target utilization rate dimension, and the operation time is matched with a target time dimension;
and determining the utilization rate of the network tester in the target utilization rate dimension in the target time dimension based on the target operation record.
According to a second aspect of the embodiments of the present invention, there is provided a resource usage rate statistic apparatus, including:
the acquisition unit is used for acquiring the operation record of the network tester; wherein the operation record comprises a resource identifier and an operation time;
the determining unit is used for determining a target operation record, wherein the resource identifier is matched with a target utilization rate dimension, and the operation time is matched with a target time dimension;
and the statistical unit is used for determining the utilization rate of the target utilization rate dimension of the network tester in the target time dimension based on the target operation record.
By applying the embodiment of the invention, the operation record of the network tester is obtained, the target operation record with the resource identifier matched with the target utilization rate dimension and the operation time matched with the target time dimension is determined based on the resource identifier and the operation time, and then the utilization rate of the target utilization rate dimension of the network tester in the target time dimension is determined based on the target operation record, so that the accuracy of the network tester utilization rate statistics is improved.
Drawings
FIG. 1 is a flow chart illustrating a resource usage statistics method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a process of determining a usage rate of a target usage rate dimension of a network tester in a target time dimension based on a target operation record according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating a process of determining a usage rate of a target usage rate dimension of a network tester in a target time dimension based on a statistical number of target operation records according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a resource usage rate statistics system according to an embodiment of the present invention;
fig. 5A to 5B are schematic diagrams illustrating annual usage rates and annual usage rate trend display effects of regions of an enterprise according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a resource utilization statistics apparatus according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of another resource utilization statistics apparatus according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a hardware structure of a resource utilization rate statistics apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions in the embodiments of the present invention better understood and make the above objects, features and advantages of the embodiments of the present invention more comprehensible, the technical solutions in the embodiments of the present invention are described in further detail below with reference to the accompanying drawings.
Referring to fig. 1, a flow chart of a resource usage rate statistical method according to an embodiment of the present invention is shown, where the resource usage rate statistical method can be applied to a resource usage rate statistical device, as shown in fig. 1, the resource usage rate statistical method can include the following steps:
step 101, obtaining an operation record of the network tester, wherein the operation record comprises a resource identifier and operation time.
In the embodiment of the invention, in order to realize the statistics of the utilization rate of the network tester, the operation record of the network tester needs to be acquired.
Illustratively, the operation record may include, but is not limited to, the resource identification and the operation time.
The resource identifier is used for identifying a resource object of the operation, and the operation time is used for identifying the time when the operation occurs.
For example, if the resource object of a certain operation is port 1 of board a of the network tester a, the resource identifier may include an IP address of the network tester a, a board number of the board a, and a port number of the port 1; the operation time is used to identify the time at which the operation of port 1 for board a of network tester a occurred.
In an example, the operation record may include, but is not limited to, an interface configuration operation record and a traffic transceiving operation record, that is, in step 101, acquiring an operation record of the network tester may include: and acquiring interface configuration operation records and flow receiving and sending operation records of the network tester.
Wherein, the traffic transceiving operation record may include a traffic receiving operation record and a traffic transmitting operation record.
For example, the operation record may include, in addition to the resource identifier and the operation time, an operation type, such as an interface configuration, a receiving traffic, a sending traffic, or the like.
And 102, determining a target operation record, wherein the resource identifier is matched with the target utilization rate dimension and the operation time is matched with the target time dimension based on the resource identifier and the operation time included in the operation record.
In the embodiment of the present invention, the usage dimension may include, but is not limited to, a base usage rate, a type usage rate, or a region usage rate.
Base usage may include, but is not limited to, port level, board level, or instrument level, etc.
Type usage may include, but is not limited to, vendor type, instrument type, board type or port type, etc.
The zone usage may include, but is not limited to, department, region, laboratory, or the like.
It should be noted that, in the embodiment of the present invention, in order to implement statistics of the utilization rates of different utilization rate dimensions, the resource utilization rate statistics apparatus needs to maintain basic information of an instrument provider, an asset number, an instrument type, a board asset number, a board type, a board port number, a port rate, a department to which an instrument belongs, a region, a laboratory, and the like of the network tester.
The instrument asset number and the board card asset number are respectively unique identifiers of the board cards in the network tester and the network tester.
For example, the instrument asset number and the board asset number may be respectively fixed to the network tester and the board of the network tester, so that when the network tester or the board changes position, the relevant basic information may be adaptively updated.
In one example, the basic information may be automatically recorded periodically by the network tester, or/and actively recorded when a board card change is sensed.
In embodiments of the present invention, the time dimension may include, but is not limited to, days, weeks, months, quarters, half years, hours on, hours off, or other specified time ranges.
The target usage dimension may include a combination of one or more of the dimensions of base usage, type usage, and area usage.
For example, the target usage dimension may be a certain port of a certain department of a certain type of network tester (i.e., the target usage dimension is a combination of "department + instrument type + port level").
The target time dimension may be any time dimension.
When the usage rate of the network tester in the target usage dimension in the target time dimension needs to be counted, an operation record (referred to as a target operation record herein) in which the resource identifier matches the target usage dimension and the operation time matches the target operation time dimension may be queried from the obtained operation records of the network tester based on the resource identifier and the operation time included in the operation records.
And 103, determining the utilization rate of the target utilization rate dimension of the network tester in the target time dimension based on the target operation record.
In the embodiment of the invention, after the target operation record is determined, the utilization rate of the target utilization rate dimension of the network tester in the target time dimension can be determined based on the target operation record.
It should be noted that, in the embodiment of the present invention, the usage rate of the network tester in the target usage dimension in the target time dimension may be counted periodically (for example, periodically), or the usage rate of the network tester in the target usage dimension in the target time dimension may be counted when the usage rate query request is received.
For example, when a usage query request is received, the usage of the network tester in the target usage dimension in the target time dimension may be counted according to the usage dimension (i.e., the target usage dimension) and the time dimension (i.e., the target time dimension) carried in the usage query request.
Therefore, in the method flow shown in fig. 1, the utilization rate of the network tester in the specified utilization rate dimension in the specified time dimension is determined by obtaining the operation record of the network tester and based on the operation record of the network tester, so that the accuracy of utilization rate statistics is improved.
In a possible embodiment, the obtaining the traffic transceiving operation record of the network tester may include:
for any port of the network tester, when detecting that the port has burst flow sending operation, determining the operation time of the flow sending operation based on the current time to obtain a corresponding flow sending operation record;
and the number of the first and second groups,
detecting a value of first statistical information (which can also be called traffic sending statistical information) and a value of second statistical information (which can also be called traffic receiving statistical information) of the port according to a preset time interval, and determining operation time of traffic sending operation based on current time when detecting that the value of the first statistical information is not zero, so as to obtain a corresponding traffic sending operation record; and when the value of the second statistical information is detected to be not zero, determining the operation time of the flow receiving operation based on the current time to obtain a corresponding flow receiving operation record.
The value of the first statistical information is used for identifying whether a port has a traffic sending operation, and when the value is not zero, the port is identified to have the traffic sending operation; otherwise, identifying that no traffic sending operation exists on the port.
The value of the second statistical information is used for identifying whether the port has a traffic receiving operation, and when the value is not zero, the port is identified to have the traffic receiving operation; otherwise, identifying that no traffic receiving operation exists for the port.
In this embodiment, the traffic transceiving of the network tester may generally include burst traffic transceiving or persistent traffic transceiving.
Wherein, for burst traffic transmission, the traffic transmission operation can be detected; for persistent traffic sending, burst traffic receiving, or persistent traffic receiving operations, whether a corresponding operation exists may be determined by detecting a value of statistical information corresponding to a port.
Accordingly, for any port of the network tester, on one hand, whether a burst traffic sending operation exists or not can be detected, and when the port is detected to have the burst traffic sending operation, the operation time of the traffic sending operation can be determined based on the current time so as to obtain a corresponding traffic sending operation record.
For example, the current time is taken as the operation time in the traffic sending operation record, or after the current time is processed according to a preset processing strategy, the processed time is taken as the operation time in the traffic sending operation record.
On the other hand, the value of the first statistical information and the value of the second statistical information of the port may be detected at preset time intervals.
When the port of the network tester has continuous flow sending, the network tester can set the value of the first statistical information according to the flow sending condition; when the port of the network tester has burst/continuous flow receiving, the network tester can set the value of the second statistical information according to the flow receiving condition.
Accordingly, when it is detected that the value of the first statistic information of the port is not zero, it is determined that a traffic sending operation currently exists in the port, and at this time, an operation time of the traffic sending operation may be determined based on the current time to obtain a corresponding traffic sending operation record.
Similarly, when it is detected that the value of the second statistical information of the port is not zero, it is determined that a traffic receiving operation currently exists in the port, and at this time, an operation time of the traffic receiving operation may be determined based on the current time, so as to obtain a corresponding traffic receiving operation record.
In one possible embodiment, as shown in fig. 2, in step 103, determining the usage rate of the network tester in the target usage rate dimension in the target time dimension based on the target operation record may be implemented by:
step 1031, determining the statistical number of the target operation records based on the operation time in the target operation records; when a plurality of target operation records with the same operation time and resource identification exist, the statistical number of the plurality of target operation records is 1.
Step 1032, determining the utilization rate of the target utilization rate dimension of the network test in the target time dimension based on the statistical number of the target operation records.
The operation time included in the operation record is obtained by processing the operation occurrence time through the following formula:
operation time ═ round (operation occurrence time ÷ N) × N (1)
Wherein, round () is a rounding function, and N is a preset operation duration.
In this embodiment, in order to improve the accuracy of the statistics of the actual usage time of the network tester, the duration of the single operation may be preset (i.e., the preset operation duration may be an empirical value, such as 5 seconds).
For the continuous operation, such as continuous receiving/sending of traffic, the continuous operation may be converted into multiple operations by a sampling manner (i.e., sampling according to a preset operation duration), that is, one continuous receiving/sending of traffic operation may correspond to multiple operation records.
In addition, considering that multiple operations of different types may occur within the duration of a single operation, if the length of time is counted for each of the multiple operations of different types when the length of time is counted for actual use of the network tester, the counted length of time for actual use of the network tester may be inaccurate.
Therefore, in order to further improve the accuracy of the statistics of the actual service life of the network tester, the operation occurrence time can be processed by the formula (1), so as to obtain the operation time in the operation record.
The operation occurrence time may be a system time of the network tester when the operation occurs.
For example, for the interface configuration operation, since the interface configuration usually causes the configuration of the network tester to change, the operation occurrence time of the interface configuration operation may be the system time when the network tester perceives the configuration change.
For burst traffic sending operation, the operation occurrence time may be a system time when the network tester detects the burst traffic sending/receiving operation.
For the persistent traffic sending, the bursty traffic receiving, or the persistent traffic receiving operation, the operation occurrence time may be a system time when the network tester performs sampling according to a preset time interval, and the sampling result is a sampling point where the traffic sending/receiving operation exists.
Preferably, the preset time interval may be a preset operation duration, and further, when the sampling result is that there is a traffic sending/receiving operation, the system time of the sampling point may not need to be additionally processed according to formula (1).
It should be noted that, the processing of the operation occurrence time by the formula (1) may be performed by the network tester, or may be performed by the resource usage rate statistical device.
Since the operation time included in the operation record is obtained by processing the operation occurrence time by the formula (1), there may be a case where the operation times included in the plurality of operation records are the same.
Correspondingly, when the actual service life of the network tester is counted, the operation records need to be deduplicated based on the operation time included in the operation records, that is, a plurality of operation records with the same operation time and resource identification are counted as 1 in the counting.
In this embodiment, after the target operation record is determined, the target operation record may be subjected to deduplication processing based on the operation time in the target operation record, a statistical number of the target operation record is determined, and the usage rate of the network tester in the target usage rate dimension in the target time dimension is determined based on the statistical number of the target operation record.
In one example, as shown in fig. 3, in step 1032, determining the usage rate of the network tester in the target usage rate dimension in the target time dimension based on the statistical number of the target operation records may be implemented by:
step 10321, determining an operation duration of the network tester in the target usage dimension in the target time dimension based on the statistical number of the target operation records in the target time dimension and a preset operation duration.
Step 10322, determining a usage rate of the network tester in the target usage rate dimension in the target time dimension based on an operation duration of the network tester in the target usage rate dimension in the target time dimension.
In this example, the operational duration of the network tester for the target usage dimension within the target time dimension may be determined based on a statistical number of target operational records within the target time dimension and a preset operational duration.
For example, the product of the statistical number of target operation records in the target time dimension and the preset operation duration may be determined as the operation duration of the network tester in the target usage dimension in the target time dimension.
After the operational duration of the network tester in the target usage dimension within the target time dimension is determined, the usage of the network tester in the target usage dimension within the target time dimension may be determined based on the operational duration.
For example, the ratio of the operation duration to the time length of the target time dimension may be determined as the usage of the network tester in the target usage dimension within the target time dimension.
For example, assuming that the operation duration of the target usage dimension of the network tester in the target time dimension is T1 seconds, and the target time dimension is days, i.e. 24 × 3600 seconds, the usage rate of the target usage dimension of the network tester in the target time dimension is: t1/(24 × 3600) × 100%.
In one example, determining the operation duration of the network tester in the target usage dimension in the target time dimension based on the statistical number of the target operation records in the target time dimension and the preset operation duration may include:
obtaining a first numerical value based on the product of the statistical number of the target operation records in the target time dimension and the preset operation duration;
determining a ratio of the first value to a number of ports included in the target usage dimension as an operating duration of the network tester in the target usage dimension in the target time dimension.
The determining the usage rate of the network tester in the target usage rate dimension in the target time dimension based on the operation duration of the network tester in the target usage rate dimension in the target time dimension may include:
and determining the ratio of the operation duration of the target utilization ratio dimension of the network tester in the target time dimension to the target time dimension as the utilization ratio of the target utilization ratio dimension of the network tester in the target time dimension.
In the embodiment of the application, the utilization rate of the network tester can be determined based on the average utilization rate of the ports.
In this example, the total operation duration of the ports in the target usage dimension may be determined, then the average operation duration of each port in the target usage dimension (i.e., the operation duration of the network tester in the target usage dimension in the target time dimension) is determined, and then the usage rate of the network tester in the target usage dimension in the target time dimension is determined based on the average operation duration and the target time dimension.
For example, assuming that the target usage dimension is a first type of port (assuming that the target usage dimension includes port 1 and port 2), a target operation record associated with port 1 and port 2 in the target time dimension may be obtained (determined according to the resource identifier and the operation time in the operation record), a statistical number of the target operation record may be obtained by repetition, the statistical number is multiplied by a preset operation duration, and the product is divided by the total number of ports (i.e. 2), which is the operation duration of the target usage dimension in the target time dimension of the network tester, and a ratio of the operation duration to the target time dimension is determined as the usage of the target usage dimension in the target time dimension of the network tester.
In another example, determining usage of the network tester for a target usage dimension in a target time dimension based on a statistical number of target operational records may include:
respectively determining target ports associated with the target operation records based on the resource identifiers in the target operation records;
for any target port, determining the operation duration of the target port by multiplying the statistical number of the target operation records matched with the resource identifier and the target port by preset operation duration, and determining the ratio of the operation duration of the target port to the target time dimension as the utilization rate of the target port in the target dimension;
and determining the ratio of the sum of the utilization rates of all the target ports in the target dimension to the number of the ports included in the target utilization rate dimension as the utilization rate of the target utilization rate dimension of the network tester in the target time dimension.
In this example, the usage rate of each port in the target usage dimension may be determined first, and the average of the usage rates of each port in the target usage dimension may be determined as the usage rate of the network tester in the target usage dimension in the target time dimension.
And for any port in the target utilization dimension, when no operation record exists in the target time dimension, the utilization rate of the port in the target time dimension is 0.
For example, assuming that the target usage dimension includes ports 1 to 10, but only ports 1 and 2 have operation records in the target time dimension, the port usage rates of ports 1 and 2 in the target time dimension are calculated respectively, and then the ratio of the sum of the port usage rates and the port total number (i.e. 10) is determined as the usage rate of the target usage dimension of the network tester in the target time dimension.
In a possible embodiment, after determining the usage rate of the network tester in the target usage rate dimension in the target time dimension based on the target operation record, the method may further include:
displaying the utilization rate of the target utilization rate dimension of the network tester in the target time dimension;
and/or the first and/or second light sources,
and displaying the utilization rate trend corresponding to the utilization rate of the target utilization rate dimension of the network tester in the target time dimension.
In this embodiment, after determining the usage rate of the network tester in the target usage rate dimension in the target time dimension, the usage rate may be displayed, or a usage rate trend may be determined based on the counted usage rates and displayed.
For example, the usage rate of the network tester in the target usage rate dimension in the target time dimension may be shown in the form of a histogram, or/and the usage rate trend of the network tester in the target usage rate dimension in the target time dimension may be shown in the form of a line graph.
In order to enable those skilled in the art to better understand the technical solution provided by the embodiment of the present invention, the technical solution provided by the embodiment of the present invention is described below with reference to a specific application scenario.
Referring to fig. 4, a schematic structural diagram of a resource utilization rate statistical system according to an embodiment of the present invention is shown in fig. 4, where the resource utilization rate statistical system may include a data acquisition unit, a data analysis unit, a data display unit, and a data storage unit.
It should be noted that the data acquisition unit, the data analysis unit, the data display unit, and the data storage unit may be collectively deployed in the same device, or may be partially or fully deployed in different devices in a distributed manner.
The functions of the respective units are explained below.
1. Data acquisition unit
The data acquisition unit may acquire two types of data including, but not limited to:
basic information of the network tester: including but not limited to instrument vendor, asset number, instrument type, board asset number, board type, board port number, port rate, department of instrument, region, and laboratory.
Service life of the network tester: including but not limited to interface configuration time and test runtime.
Wherein:
the interface configuration of the network tester triggers the configuration change of the network tester, so that when the configuration change of the network tester is sensed, the information shown in table 1 (each entry is an operation record) can be collected:
TABLE 1
Figure BDA0002295990660000121
The operation time in table 1 is the configuration change time and is obtained by the following formula:
operation time round (configuration change time ÷ 5) × 5 (2)
Wherein the preset operation duration is assumed to be 5 seconds.
For example, the computer time of 2019.8.1509: 01:07 is 1565859667, the calculated operation time is 1565859665, and the conversion is to actual time of 2019-08-1509: 01: 05.
When the network tester operates, the port includes 2 situations of sending flow and receiving flow, and also includes 2 modes of burst flow and continuous flow, and corresponding to the 4 situations, the method shown in table 2 is respectively adopted to detect whether the port has receiving/sending flow:
TABLE 2
Figure BDA0002295990660000131
Wherein rx represents reception, tx represents transmission, and pps (packet per second, number of messages per second) represents traffic transmission rate.
The port receiving/sending flow operation records are shown in table 3 (each entry corresponds to 1 operation record), where the operation time calculation formula is configured with the interface.
TABLE 3
Figure BDA0002295990660000132
2. Data storage unit
The data storage unit is used for storing basic information and service time data of the network tester, which are scattered in laboratories of enterprises, of the enterprises, and the data can be stored in each laboratory and each area respectively, and periodically synchronized to the enterprise database, and also can be directly stored in the enterprise database.
3. Data analysis unit
The data analysis unit is used for calculating and processing the data acquired by the data acquisition unit to obtain the utilization rate of the specified utilization rate dimension in the specified time dimension:
1) the time dimension is as follows: days, weeks, months, quarters, years, hours on, hours off, or other specified time ranges;
2) usage dimension:
basic utilization rate: port level, board level, instrument level
Type usage rate: vendor type, instrument type, board type, port type
Area usage rate: department, region, laboratory
For example, taking the usage rate of the port level per day as an example, the following formula can be used to calculate:
operation records number of usage rate of port per day (removing duplicate term) 5/(24 3600) (3)
Wherein, the usage rate statistics of the port daily, weekly, monthly, quarterly and yearly are automatically calculated and recorded to the database every day, and the usage rates of other usage rate dimensions are superposed and calculated based on the data.
For example, if a board includes 10 ports, the usage rate of the board per day is an average of the usage rates of the ports of the board per day.
The term "remove duplicate" refers to operation records of interface configuration, traffic transmission, and traffic reception that have the same operation time, and is counted as 1 item when calculating the usage rate.
4. Data display unit
The data display unit supports combined query with various dimensions such as instrument suppliers, asset numbers, instrument types, board asset numbers, board types, board port numbers, port rates, departments to which the instruments belong, regions, laboratories, time and the like, for example, the utilization rate or the utilization rate trend of 'specified region + specified department + specified card type + specified time range' can be queried, and a query request is sent to the data analysis unit to be displayed on the data display unit after calculation.
Taking the annual usage rate and annual usage rate trend of each region of the enterprise as an example, the display effect can be shown in fig. 5A and 5B, respectively.
As can be seen from the above description, in the technical solution provided in the embodiment of the present invention, the operation record of the network tester is obtained, and the target operation record in which the resource identifier matches the target usage dimension and the operation time matches the target time dimension is determined based on the resource identifier and the operation time, and further, the usage rate of the target usage dimension of the network tester in the target time dimension is determined based on the target operation record, so that the accuracy of the usage rate statistics of the network tester is improved.
Referring to fig. 6, a schematic structural diagram of a resource utilization rate statistics apparatus according to an embodiment of the present invention is shown in fig. 6, where the resource utilization rate statistics apparatus may include:
an obtaining unit 610, configured to obtain an operation record of the network tester; wherein the operation record comprises a resource identifier and an operation time;
a determining unit 620, configured to determine, based on the resource identifier and the operation time, a target operation record in which the resource identifier matches a target usage dimension and the operation time matches a target time dimension;
a statistical unit 630, configured to determine, based on the target operation record, a usage rate of the network tester in the target usage rate dimension in the target time dimension.
In an optional embodiment, the obtaining unit 610 is specifically configured to obtain an interface configuration operation record and a flow transceiving operation record of the network tester;
the flow receiving and sending operation records comprise flow receiving operation records and flow sending operation records.
In an optional embodiment, the obtaining unit 610 is specifically configured to, for any port of the network tester, determine, when it is detected that a burst traffic sending operation exists at the port, an operation time of the traffic sending operation based on a current time, so as to obtain a corresponding traffic sending operation record;
and the number of the first and second groups,
detecting the value of the flow sending statistical information and the value of the flow receiving statistical information of the port according to a preset time interval, and determining the operation time of flow sending operation based on the current time when the value of the flow sending statistical information is detected to be not zero so as to obtain a corresponding flow sending operation record; and when the value of the traffic receiving statistical information is detected to be not zero, determining the operation time of the traffic receiving operation based on the current time to obtain a corresponding traffic receiving operation record.
In an optional embodiment, the determining unit 620 is specifically configured to determine the statistical number of the target operation records based on the operation time in the target operation records; when a plurality of target operation records with the same operation time and resource identification exist, the statistical number of the target operation records is 1;
determining the usage rate of the target usage rate dimension of the network tester in the target time dimension based on the statistical number of the target operation records;
the operation time included in the operation record is obtained by processing the operation occurrence time through the following formula:
operation time ═ round (operation occurrence time ÷ N) × N
Wherein, round () is a rounding function, and N is a preset operation duration.
In an optional embodiment, the statistical unit 630 is specifically configured to determine, based on the statistical number of target operation records in the target time dimension and the preset operation duration, an operation duration of the network tester in the target usage dimension in the target time dimension;
determining the usage of the network tester in the target usage dimension within the target time dimension based on an operating duration of the network tester in the target usage dimension within the target time dimension.
In an optional embodiment, the statistical unit 630 is specifically configured to obtain a first numerical value based on a product of a statistical number of target operation records in the target time dimension and the preset operation duration;
determining a ratio of the first value to a number of ports included in the target usage dimension as an operating duration of the network tester in the target usage dimension within the target time dimension;
and determining the ratio of the operation duration of the network tester in the target utilization rate dimension in the target time dimension to the target time dimension as the utilization rate of the network tester in the target utilization rate dimension in the target time dimension.
In an optional embodiment, the statistical unit 630 is specifically configured to determine, based on the resource identifier in the target operation record, a target port associated with each target operation record respectively;
for any target port, determining the operation duration of the target port by multiplying the statistical number of the target operation records matched with the resource identifier and the target port by preset operation duration, and determining the ratio of the operation duration of the target port to the target time dimension as the utilization rate of the target port in the target dimension;
and determining the ratio of the sum of the utilization rates of all the target ports in the target dimension to the number of the ports included in the target utilization rate dimension as the utilization rate of the target utilization rate dimension of the network tester in the target time dimension.
In an alternative embodiment, please refer to fig. 7 together, which is a schematic structural diagram of another resource usage rate statistics apparatus according to an embodiment of the present invention, as shown in fig. 7, based on the resource usage rate statistics apparatus shown in fig. 6, the apparatus shown in fig. 7 further includes:
a presentation unit 640, configured to present a usage rate of the target usage rate dimension of the network tester in the target time dimension;
and/or the first and/or second light sources,
and displaying the utilization rate trend corresponding to the utilization rate of the target utilization rate dimension of the network tester in the target time dimension.
Please refer to fig. 8, which is a schematic diagram of a hardware structure of a resource utilization rate statistics apparatus according to an embodiment of the present invention. The resource usage statistics apparatus may include a processor 801, a machine-readable storage medium 802 having machine-executable instructions stored thereon. The processor 801 and the machine-readable storage medium 802 may communicate via a system bus 803. Also, the processor 801 may perform the resource usage statistics method described above by reading and executing machine-executable instructions in the machine-readable storage medium 802 that correspond to the resource usage statistics logic.
The machine-readable storage medium 802 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be volatile memory, non-volatile memory, or similar storage medium. In particular, the machine-readable storage medium 802 may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., a compact disk, a DVD, etc.), or similar storage medium, or a combination thereof.
Embodiments of the present invention also provide a machine-readable storage medium, such as machine-readable storage medium 802 in fig. 8, comprising machine-executable instructions that can be executed by processor 801 in a resource usage statistics apparatus to implement the resource usage statistics method described above.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
According to the embodiment, the operation records of the network tester are obtained, the resource identifier is determined to be matched with the target utilization rate dimension based on the resource identifier and the operation time, the operation time is determined to be matched with the target operation record of the target time dimension, the utilization rate of the target utilization rate dimension of the network tester in the target time dimension is determined based on the target operation record, and the accuracy of network tester utilization rate statistics is improved.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (11)

1. A resource utilization rate statistical method is characterized by comprising the following steps:
acquiring an operation record of the network tester; wherein the operation record comprises a resource identifier and an operation time;
determining a target operation record based on the resource identification and the operation time, wherein the resource identification is matched with a target utilization rate dimension, and the operation time is matched with a target time dimension;
determining the utilization rate of the target utilization rate dimension of the network tester in the target time dimension based on the target operation record;
wherein determining the usage of the network tester in the target usage dimension within the target time dimension based on the target operational record comprises:
based on the operation time in the target operation record, carrying out duplicate removal processing on the target operation record, and determining the statistical number of the target operation record; when a plurality of target operation records with the same operation time and resource identification exist, the statistical number of the target operation records is 1;
determining the usage rate of the target usage rate dimension of the network tester in the target time dimension based on the statistical number of the target operation records;
the operation time included in the operation record is obtained by processing the operation occurrence time through the following formula:
operation time = round (operation occurrence time ÷ N) × N
Wherein, round () is a rounding function, and N is a preset operation duration.
2. The method of claim 1, wherein said obtaining operational records of a network tester comprises:
acquiring interface configuration operation records and flow receiving and sending operation records of a network tester;
the flow receiving and sending operation records comprise flow receiving operation records and flow sending operation records.
3. The method of claim 2, wherein obtaining the record of the flow transceiving operation of the network tester comprises:
for any port of the network tester, when detecting that the port has burst flow sending operation, determining the operation time of the flow sending operation based on the current time to obtain a corresponding flow sending operation record;
and the number of the first and second groups,
detecting the value of the flow sending statistical information and the value of the flow receiving statistical information of the port according to a preset time interval, and determining the operation time of flow sending operation based on the current time when the value of the flow sending statistical information is detected to be not zero so as to obtain a corresponding flow sending operation record; and when the value of the traffic receiving statistical information is detected to be not zero, determining the operation time of the traffic receiving operation based on the current time to obtain a corresponding traffic receiving operation record.
4. The method of claim 1, wherein determining the usage of the target usage dimension of network testers in the target time dimension based on the statistical number of target operational records comprises:
determining the operation duration of the network tester in the target utilization rate dimension in the target time dimension based on the statistical number of the target operation records in the target time dimension and the preset operation duration;
determining the usage of the network tester in the target usage dimension within the target time dimension based on an operating duration of the network tester in the target usage dimension within the target time dimension.
5. The method of claim 4, wherein determining the operational duration of the network tester for the target usage dimension in the target time dimension based on the statistical number of target operational records in the target time dimension and the preset operational duration comprises:
obtaining a first numerical value based on the product of the statistical number of the target operation records in the target time dimension and the preset operation duration;
determining a ratio of the first value to a number of ports included in the target usage dimension as an operating duration of the network tester in the target usage dimension within the target time dimension;
the determining usage of the network tester for the target usage dimension in the target time dimension based on an operational duration of the network tester for the target usage dimension in the target time dimension includes:
and determining the ratio of the operation duration of the network tester in the target utilization rate dimension in the target time dimension to the target time dimension as the utilization rate of the network tester in the target utilization rate dimension in the target time dimension.
6. The method of claim 1, wherein determining the usage of the target usage dimension of network testers in the target time dimension based on the statistical number of target operational records comprises:
respectively determining target ports associated with the target operation records based on the resource identifiers in the target operation records;
for any target port, determining the operation duration of the target port by multiplying the statistical number of the target operation records matched with the resource identifier and the target port by preset operation duration, and determining the ratio of the operation duration of the target port to the target time dimension as the utilization rate of the target port in the target dimension;
and determining the ratio of the sum of the utilization rates of all the target ports in the target dimension to the number of the ports included in the target utilization rate dimension as the utilization rate of the target utilization rate dimension of the network tester in the target time dimension.
7. The method of any of claims 1-6, wherein after determining the usage of the network tester for the target usage dimension in the target time dimension based on the target operational record, further comprising:
displaying the utilization rate of the target utilization rate dimension of the network tester in the target time dimension;
and/or the first and/or second light sources,
and displaying the utilization rate trend corresponding to the utilization rate of the target utilization rate dimension of the network tester in the target time dimension.
8. The method according to any one of claims 1 to 6,
the usage dimension comprises a base usage, a type usage, or a zone usage;
the basic utilization rate comprises a port level, a board level or an instrument level;
the type utilization rate comprises a supplier type, an instrument type, a board card type or a port type;
regional usage includes department, region, or laboratory;
the time dimension includes days, weeks, months, quarters, half years, hours on, hours off, or other specified time ranges.
9. A resource usage statistics apparatus, comprising:
the acquisition unit is used for acquiring the operation record of the network tester; wherein the operation record comprises a resource identifier and an operation time;
the determining unit is used for determining a target operation record, wherein the resource identifier is matched with a target utilization rate dimension, and the operation time is matched with a target time dimension;
the statistical unit is used for determining the utilization rate of the target utilization rate dimension of the network tester in the target time dimension based on the target operation record;
the determining unit is specifically configured to perform deduplication processing on the target operation record based on the operation time in the target operation record, and determine a statistical number of the target operation record; when a plurality of target operation records with the same operation time and resource identification exist, the statistical number of the target operation records is 1; determining the usage rate of the target usage rate dimension of the network tester in the target time dimension based on the statistical number of the target operation records;
the operation time included in the operation record is obtained by processing the operation occurrence time through the following formula:
operation time = round (operation occurrence time ÷ N) × N
Wherein, round () is a rounding function, and N is a preset operation duration.
10. The apparatus of claim 9,
the acquisition unit is specifically used for acquiring interface configuration operation records and flow transceiving operation records of the network tester;
the flow receiving and sending operation records comprise flow receiving operation records and flow sending operation records.
11. The apparatus of claim 10,
the acquiring unit is specifically configured to, for any port of the network tester, determine, based on current time, operation time of a traffic sending operation when it is detected that the port has a burst traffic sending operation, so as to obtain a corresponding traffic sending operation record;
and the number of the first and second groups,
detecting the value of the flow sending statistical information and the value of the flow receiving statistical information of the port according to a preset time interval, and determining the operation time of flow sending operation based on the current time when the value of the flow sending statistical information is detected to be not zero so as to obtain a corresponding flow sending operation record; and when the value of the traffic receiving statistical information is detected to be not zero, determining the operation time of the traffic receiving operation based on the current time to obtain a corresponding traffic receiving operation record.
CN201911201481.1A 2019-11-29 2019-11-29 Resource utilization rate statistical method and device Active CN110995536B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911201481.1A CN110995536B (en) 2019-11-29 2019-11-29 Resource utilization rate statistical method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911201481.1A CN110995536B (en) 2019-11-29 2019-11-29 Resource utilization rate statistical method and device

Publications (2)

Publication Number Publication Date
CN110995536A CN110995536A (en) 2020-04-10
CN110995536B true CN110995536B (en) 2022-04-26

Family

ID=70088343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911201481.1A Active CN110995536B (en) 2019-11-29 2019-11-29 Resource utilization rate statistical method and device

Country Status (1)

Country Link
CN (1) CN110995536B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102255755A (en) * 2011-07-19 2011-11-23 武汉烽火网络有限责任公司 Access network switch port utilization rate counting method
CN104991854A (en) * 2015-06-12 2015-10-21 北京奇虎科技有限公司 Method and system for monitoring and statistics of server sources
CN105893224A (en) * 2015-01-26 2016-08-24 阿里巴巴集团控股有限公司 Resource measurement method and device
CN108833203A (en) * 2018-05-23 2018-11-16 新华三信息安全技术有限公司 A kind of message statistical method and device
CN108924272A (en) * 2018-06-26 2018-11-30 新华三信息安全技术有限公司 A kind of port resource distribution method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3273361A1 (en) * 2016-07-22 2018-01-24 Sap Se Method and system for adaptive processing of resource usage records
US10445208B2 (en) * 2017-06-23 2019-10-15 Microsoft Technology Licensing, Llc Tunable, efficient monitoring of capacity usage in distributed storage systems

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102255755A (en) * 2011-07-19 2011-11-23 武汉烽火网络有限责任公司 Access network switch port utilization rate counting method
CN105893224A (en) * 2015-01-26 2016-08-24 阿里巴巴集团控股有限公司 Resource measurement method and device
CN104991854A (en) * 2015-06-12 2015-10-21 北京奇虎科技有限公司 Method and system for monitoring and statistics of server sources
CN108833203A (en) * 2018-05-23 2018-11-16 新华三信息安全技术有限公司 A kind of message statistical method and device
CN108924272A (en) * 2018-06-26 2018-11-30 新华三信息安全技术有限公司 A kind of port resource distribution method and device

Also Published As

Publication number Publication date
CN110995536A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
US20150081704A1 (en) Methods and apparatus to obtain anonymous audience measurement data from network server data for particular demographic and usage profiles
CN107026881B (en) Method, device and system for processing service data
CN112307057A (en) Data processing method and device, electronic equipment and computer storage medium
CN110362455B (en) Data processing method and data processing device
CN111045881A (en) Slow disk detection method and system
CN107038108B (en) Software testing method and device
CN109407984B (en) Method, device and equipment for monitoring performance of storage system
CN113918622B (en) Information tracing method and system based on block chain
CN109739718A (en) Log alarming method and device
CN108055340A (en) Customer resources distribution method, device, computer equipment and storage medium
US10884892B2 (en) Non-transitory computer-readable storage medium, display control method and display control device for observing anomolies within data
CN110750529B (en) Data processing method, device, equipment and storage medium
CN104731858B (en) A kind of multi-client parallel detection data-base content consistency system and method
CN111092880B (en) Network traffic data extraction method and device
CN110018932B (en) Method and device for monitoring container magnetic disk
CN109656789A (en) IO method for testing performance and system
CN110995536B (en) Resource utilization rate statistical method and device
CN105718539B (en) A kind of database application method and device
CN112948501B (en) Data analysis method, device and system
CN111368104A (en) Information processing method, device and equipment
CN114860432A (en) Method and device for determining information of memory fault
CN113469825A (en) Data processing method and device, electronic equipment and computer readable medium
CN113515497A (en) Database data processing method, device and system
CN109948998A (en) Data processing method, device and electronic equipment
CN112486823B (en) Error code verification method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant