Nothing Special   »   [go: up one dir, main page]

CN109120472A - A kind of interface rate preparation method and device - Google Patents

A kind of interface rate preparation method and device Download PDF

Info

Publication number
CN109120472A
CN109120472A CN201810836331.7A CN201810836331A CN109120472A CN 109120472 A CN109120472 A CN 109120472A CN 201810836331 A CN201810836331 A CN 201810836331A CN 109120472 A CN109120472 A CN 109120472A
Authority
CN
China
Prior art keywords
sampling instant
preset
interface
duration
interface rate
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
CN201810836331.7A
Other languages
Chinese (zh)
Other versions
CN109120472B (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.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies 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 New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN201810836331.7A priority Critical patent/CN109120472B/en
Publication of CN109120472A publication Critical patent/CN109120472A/en
Application granted granted Critical
Publication of CN109120472B publication Critical patent/CN109120472B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • H04L43/0894Packet rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • H04L43/045Processing captured monitoring data, e.g. for logfile generation for graphical visualisation of monitoring data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/22Traffic shaping
    • H04L47/225Determination of shaping rate, e.g. using a moving window
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/26Flow control; Congestion control using explicit feedback to the source, e.g. choke packets
    • H04L47/263Rate modification at the source after receiving feedback

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Environmental & Geological Engineering (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The embodiment of the present application provides a kind of interface rate preparation method and device, is related to network technique field, wherein the above method includes: to obtain the default starting sample moment to the first quantity for passing through target interface transmitting message between current sample time;The default starting sample moment is obtained to passing through the second quantity of the target interface transmitting message between the first sampling instant, wherein, first sampling instant before current sample time and with the preset quantity sampling instant of current sample time interval, the preset quantity be greater than 2;According to first quantity, the second quantity and the first duration, the interface rate of the target interface is obtained, wherein first duration are as follows: from the first sampling instant to the duration current sample time.Using scheme provided by the embodiments of the present application, accurate interface rate can be obtained.

Description

A kind of interface rate preparation method and device
Technical field
This application involves network technique fields, more particularly to a kind of interface rate preparation method and device.
Background technique
Communication equipment needs to know in real time during the work time the rate of each interface transmitting message, that is, interface speed Rate, using the basis as follow-up work.For example, it is desired to shunted to the message for being related to aggregation port, needed when shunting with The interface rate of each interface corresponding to aggregation port is to prevent from causing communication to set due to shunting unevenness according to being shunted It is standby to play its maximum performance.
For this reason, it may be necessary to a kind of scheme for obtaining interface rate be provided, to obtain accurate interface rate.
Summary of the invention
The embodiment of the present application is designed to provide a kind of interface rate preparation method and device, accurate to obtain Interface rate.Specific technical solution is as follows:
In a first aspect, the embodiment of the present application provides a kind of interface rate preparation method, which comprises
The default starting sample moment is obtained to the first quantity for passing through target interface transmitting message between current sample time;
Obtain the default starting sample moment between the first sampling instant by the target interface transmitting message Second quantity, wherein first sampling instant are as follows: the preset quantity sampling instant forward since current sample time, The preset quantity is greater than 2;
According to first quantity, the second quantity and the first duration, the interface rate of the target interface is obtained, wherein First duration are as follows: from the first sampling instant to the duration current sample time.
Second aspect, the embodiment of the present application provide a kind of interface rate acquisition device, and described device includes:
First quantity obtains module, is connect between current sample time by target for obtaining the default starting sample moment First quantity of port transmission message;
Second quantity obtains module, for obtaining the default starting sample moment to passing through institute between the first sampling instant State the second quantity of target interface transmitting message, wherein first sampling instant are as follows: forward since current sample time Preset quantity sampling instant, the preset quantity are greater than 2;
Interface rate obtains module, for obtaining the target according to first quantity, the second quantity and the first duration The interface rate of interface, wherein first duration are as follows: from the first sampling instant to the duration current sample time.
The third aspect, the embodiment of the present application provide a kind of communication equipment, comprising: processor and machine readable storage are situated between Matter, the machine readable storage medium are stored with the machine-executable instruction that can be executed by the processor, the processor Promoted by the machine-executable instruction: realizing method and step described in above-mentioned first aspect.
Fourth aspect, the embodiment of the present application provide a kind of machine readable storage medium, are stored with machine-executable instruction, When being called and being executed by processor, the machine-executable instruction promotes the processor: realizing described in above-mentioned first aspect Method and step.
As seen from the above, when obtaining interface rate using the scheme that above-mentioned each embodiment provides, due to used the One quantity and the second quantity be the default starting sample moment respectively between current sample time and the default starting sample moment extremely Pass through the quantity of target interface transmitting message between first sampling instant, and the first sampling instant is since current sample time Preset quantity sampling instant forward, and since preset quantity is greater than 2, in the obtained message number of each sampling instant In the case that the error of amount is certain, using corresponding second number of corresponding first quantity of current sample time and the first sampling instant Amount obtains interface rate, can reduce influence of the above-mentioned error to interface rate, so as to obtain accurate interface speed Rate.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of interface rate preparation method provided by the embodiments of the present application;
Fig. 2 a is the first data comparison curve synoptic diagram provided by the embodiments of the present application;
Fig. 2 b is second of data comparison curve synoptic diagram provided by the embodiments of the present application;
Fig. 3 is the structural schematic diagram that a kind of interface rate provided by the embodiments of the present application obtains device;
Fig. 4 is a kind of structural schematic diagram of communication equipment provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
The executing subject that interface rate provided by the embodiments of the present application obtains scheme can be communication equipment.
Fig. 1 is a kind of flow diagram of interface rate preparation method provided by the embodiments of the present application, this method comprises:
S101: the default starting sample moment is obtained to passing through the first of target interface transmitting message between current sample time Quantity.
During the work time, the message amount that inside chip can transmit target interface counts communication equipment.Into When row message amount counts, it can be and counted according to certain time interval.Every time carry out message amount statistics when Quarter can be referred to as sampling instant, and the time interval between each sampling instant is usually identical.
Specifically, the above-mentioned default starting sample moment can for it is communication device initiated and start to work after first sampling when It carves, is also possible to preset a certain specific sampling instant, can also be a certain sampling instant in multiple sampling instants, The application is defined not to this.
S102: the default starting sample moment is obtained to passing through the second of target interface transmitting message between the first sampling instant Quantity.
Wherein, the first sampling instant are as follows: the preset quantity sampling instant forward since current sample time, it is above-mentioned pre- If quantity is greater than 2.
Communication equipment during the work time can be always according to the number of above-mentioned time interval statistics target interface institute transmitting message Amount obtains above-mentioned second in the first sampling instant to guarantee easily obtain above-mentioned second quantity when executing this step After quantity, the second quantity can be stated on local storage.
Specifically, above-mentioned second quantity can be stored in preset list when stating the second quantity on local storage In, above-mentioned second quantity can also be stored in preset array etc., the application is defined not to this.
Sequence is executed between above-mentioned steps S101 and S102 it should be noted that not limiting in the embodiment of the present application.
S103: according to the first quantity, the second quantity and the first duration, the interface rate of target interface is obtained.
Wherein, above-mentioned first duration are as follows: from the first sampling instant to the duration current sample time.
In one embodiment of the application, according to above-mentioned first quantity, the second quantity and the first duration, target interface is obtained Interface rate when, the interface rate of target interface can be obtained according to following formula:
Wherein, Num1 indicates above-mentioned first quantity, and Num2 indicates above-mentioned second quantity, and n indicates above-mentioned preset quantity, t table Show the duration between the neighbouring sample moment.
Below with reference to data comparison curve synoptic diagram shown in Fig. 2 a and Fig. 2 b, to interface speed provided by the embodiments of the present application Rate preparation method is described in detail.
In shown coordinate system shown in Fig. 2 a, horizontal axis indicate the time, 0, t, 2t, 3t ... represent each sampling instant, the longitudinal axis Indicate message amount, black line indicates the number curve of interface actual transmissions message at various moments, Grey curves table in figure Show the amount formed curve of the interface transmitting message counted in each sampling instant.
The first situation: according to sampling instant t and 2t message amount c+ Δ c1,2c- Δ c2 collected, can according to Lower expression formula calculates interface rate:
Wherein, v indicates interface rate.
It is from above-mentioned expression it is known that between the interface rate being calculated in this case and actual interface rate Error are as follows:
Second situation: the scheme provided according to aforementioned embodiment illustrated in fig. 1, it is collected according to sampling instant t and nt Message amount c+ Δ c1, nc- Δ c3 can calculate interface rate according to following formula:
It is from above-mentioned expression it is known that between the interface rate being calculated in this case and actual interface rate Error are as follows:
By the first above-mentioned situation and second situation as it can be seen that the mistake for the interface rate being calculated under second situation Difference is almost the one of (n-1) point for the error of interface rate being calculated in the case of the first.That is, using the application When the scheme that embodiment provides calculates interface rate, when above-mentioned preset quantity is bigger namely the first sampling instant is from present sample Quarter is remoter, and obtained interface rate error is smaller.
View of the above, it will be seen that the message amount used is phase when the first above-mentioned situation calculates interface rate The corresponding quantity of adjacent sampling instant, it is, corresponding interface rate when preset quantity n=2, above-mentioned second situation calculating is connect When mouth rate, the message amount used is the corresponding quantity of non-adjacent sampling instant, it is, corresponding when preset quantity n ≠ 2 Interface rate.
As the following table 1 shows specific data, wherein
Sampling instant is respectively as follows: the 0th second, the 10th second the 1st second ...;
Actual transmissions message amount indicates: the quantity of the 0th second to each sampling instant interface actual transmissions message;
Actual interface rate representation: the actual speed rate of interface;
The message amount of each sampling instant statistics indicates: in each sampling instant, to interface, transmitting message quantity is united Count obtained numerical value;
When n=2, interface rate is indicated: using the corresponding mode of the first above-mentioned situation, the interface rate being calculated;
When n=5, interface rate is indicated: sampling the corresponding mode of above-mentioned second situation, the connecing when n=5 being calculated Mouth rate.
Table 1
Due to the 0th second, the 1st second, the 2nd second and the 3rd second be not present the 5th sampling instant forward since this is several seconds respectively, Therefore, in table 1 at the 0th second to the 3rd second corresponding n=5 when interface rate value be according to above-mentioned the first situation provider What formula was calculated.
When Fig. 2 b shows actual interface rate, n=2 interface rate and when n=5 interface rate curve graph, by upper The curve graph that the data and Fig. 2 b for stating the record of table 1 are shown can be seen that the interface rate being calculated when n-5 closer to reality Interface rate, that is, the error between actual interface rate are smaller.
In one embodiment of the application, the default starting sample moment is obtained between current sample time in above-mentioned S101 After the first quantity of target interface transmitting message, it can also be followed in array according to current sample time according to data The mode of ring storage determines in preset group for storing the element of the first quantity, the first quantity is stored as determined element Value.
Wherein, the size of preset group is equal to the preset quantity.
It will be appreciated by persons skilled in the art that array was made of each element, the size of array determines number The quantity of element included in group.
The mode of above-mentioned circulation storage is it is to be understood that data are successively stored from first element to last in array After a element, then when having new data to need to store, the first element covering for returning to array is stored in first element.
After obtaining corresponding first quantity of current sample time in the present embodiment, first quantity is stored in array, by It is a relative concept in current sample time, that is, communication equipment is during the work time, each sampling instant experienced It can be by as current sample time, such words within the period of acquisition data, it can be understood as, when obtaining each sampling After carving corresponding message amount, several modes can be deposited with circulation and stored into above-mentioned preset group.
It is assumed that preset quantity is 5, then preset group includes 5 elements altogether, is respectively as follows: a [0], a [1], a [2], a [3], a [4], each sampling instant is respectively as follows: 0,1t, 2t, 3t, 4t, 5t, 6t, 7t, 8t, 9t, 10t, the corresponding report of each sampling instant The corresponding relationship of literary quantity and each element in preset group is as shown in table 2 below.
Table 2
Sampling instant 0 1t 2t 3t 4t 5t 6t 7t 8t 9t 10t
Element a[0] a[1] a[2] a[3] a[4] a[0] a[1] a[2] a[3] a[4] a[0]
In one embodiment of the application, according to current sample time, in such a way that data recycle storage in array, When determining in preset group for storing the element of the first quantity, the serial number of current sample time can be first obtained, then root According to the size of serial number obtained and preset group, determine in preset group for storing the element of the first quantity.
Specifically, when the serial number of sampling instant is started counting from 0, it can be directly by obtained serial number to present count The size of group carry out modulus processing as a result, as in preset group for storing the element of the first quantity.
It, can be by (obtained serial number -1) to the big of preset group when the serial number of sampling instant is started counting from 1 It is small carry out modulus processing as a result, as setting in array for storing the element of the first quantity.
In another embodiment of the application, a global static variable can also be set as counting mark, it is assumed that should It is identified as i, the initial value of i is 0.It, can after obtaining the corresponding message amount of each sampling instant since first sampling instant To determine the element for being used for stored messages quantity in preset group in the following way:
Judge whether the value of i is greater than the size of preset group;
If it is, the value of i is cut to the size of preset group, it is, using the value of i-m as the value of i, and will be pre- If element a [i] is determined as the element for stored messages quantity, the value cumulative 1 of i in array;M is array size;
If it has not, element a [i] in preset group is directly determined as the element for stored messages quantity, the value of i is tired Add 1.
On the basis of the above embodiments, in one embodiment of the application, above-mentioned steps S102 obtains default starting and adopts It, can be real as follows when sample moment to the second quantity for passing through target interface transmitting message between the first sampling instant It is existing.
Judge whether determined element is the last one element in preset group;
If it is, when the value of first element in preset group is determined as default starting sample moment to the first sampling Pass through the second quantity of target interface transmitting message between quarter;
If it has not, the value of the next element of element determined in preset group is determined as the second quantity.
For the corresponding relationship shown in the above-mentioned table 2, it is assumed that above-mentioned preset quantity are as follows: 5.
If current sample time is 4t, determined element is a [4], it is, for storing the first quantity in preset group Element be a [4], and a [4] is the last one element of preset group, and the second quantity is the value of element a [0], at this time element The value of a [0] is the corresponding message amount of sampling instant 0.Sampling instant 0 is the 5th sampling forward since sampling instant 4t Moment, therefore meet the relationship between current sample time and the first sampling instant.
If current sample time is 5t, determined element is a [0], it is, for storing the first quantity in preset group Element be a [0], it is not the last one element of preset group, the second quantity is that a [0], which is first element of preset group, The value of element a [1], the value of element a [1] is the corresponding message amount of sampling instant t at this time.Sampling instant t is from sampling Moment 5t starts the 5th sampling instant forward, therefore meets the relationship between current sample time and the first sampling instant.
As seen from the above, when obtaining interface rate using the scheme that above-mentioned each embodiment provides, due to used the One quantity and the second quantity be the default starting sample moment respectively between current sample time and the default starting sample moment extremely Pass through the quantity of target interface transmitting message between first sampling instant, and the first sampling instant is since current sample time Preset quantity sampling instant forward, and since preset quantity is greater than 2, in the obtained message number of each sampling instant In the case that the error of amount is certain, using corresponding second number of corresponding first quantity of current sample time and the first sampling instant Amount obtains interface rate, can reduce influence of the above-mentioned error to interface rate, so as to obtain accurate interface speed Rate.
Corresponding with above-mentioned interface rate preparation method, the embodiment of the present application also provides a kind of interface rates to be filled It sets.
Fig. 3 is the structural schematic diagram that a kind of interface rate provided by the embodiments of the present application obtains device, which includes:
First quantity obtains module 301, for obtaining the default starting sample moment to passing through mesh between current sample time First quantity of tag splice port transmission message;
Second quantity obtains module 302, leads to for obtaining the default starting sample moment between the first sampling instant Cross the second quantity of the target interface transmitting message, wherein first sampling instant are as follows: since current sample time to Preceding preset quantity sampling instant, the preset quantity are greater than 2;
Interface rate obtains module 303, for according to first quantity, the second quantity and the first duration, described in acquisition The interface rate of target interface, wherein first duration are as follows: from the first sampling instant to current sample time when It is long.
In one embodiment of the application, the interface rate obtains module 303, is specifically used for according to following formula, Obtain the interface rate of the target interface:
Wherein, Num1 indicates first quantity, and Num2 indicates second quantity, and n indicates the preset quantity, t table Show the duration between the neighbouring sample moment.
In one embodiment of the application, above-mentioned interface rate, which obtains device, to include:
Element determining module is used for after first quantity obtains module acquisition first quantity, according to described Current sample time determines in preset group in such a way that data recycle storage in array for storing first number The element of amount, wherein the size of the preset group is equal to the preset quantity;
Value memory module, for first quantity to be stored as to the value of determined element.
In one embodiment of the application, second quantity obtains module 302 and may include:
Element judging unit, for judging whether determined element is the last one element in the preset group, if It is yes, the first quantity determination unit of triggering, if it has not, the second quantity determination unit of triggering;
The first quantity determination unit, it is described pre- for the value of first element in the preset group to be determined as If the starting sample moment is to passing through the second quantity of the target interface transmitting message between the first sampling instant;
Second quantity determination unit, for the value of the next element of element determined in the preset group to be determined as Second quantity.
As seen from the above, when obtaining interface rate using the scheme that above-mentioned each embodiment provides, due to used the One quantity and the second quantity be the default starting sample moment respectively between current sample time and the default starting sample moment extremely Pass through the quantity of target interface transmitting message between first sampling instant, and the first sampling instant is since current sample time Preset quantity sampling instant forward, and since preset quantity is greater than 2, in the obtained message number of each sampling instant In the case that the error of amount is certain, using corresponding second number of corresponding first quantity of current sample time and the first sampling instant Amount obtains interface rate, can reduce influence of the above-mentioned error to interface rate, so as to obtain accurate interface speed Rate.
Corresponding with above-mentioned interface rate preparation method, the embodiment of the present application also provides a kind of communication equipments.
Fig. 4 is a kind of structural schematic diagram of communication equipment provided by the embodiments of the present application, which includes: processor 401 and machine readable storage medium 402, the machine readable storage medium 402, which is stored with, to be executed by the processor 401 Machine-executable instruction, the processor 401 promoted by the machine-executable instruction: realizing provided by the embodiments of the present application Interface rate preparation method.
In one embodiment of the application, a kind of interface rate preparation method is provided, this method comprises:
The default starting sample moment is obtained to the first quantity for passing through target interface transmitting message between current sample time;
The default starting sample moment is obtained to passing through the second of the target interface transmitting message between the first sampling instant Quantity, wherein preset quantity sampling instant before first sampling instant is current sample time, the preset quantity Greater than 2;
According to first quantity, the second quantity and the first duration, the interface rate of the target interface is obtained, wherein First duration are as follows: from the first sampling instant to the duration current sample time.
It should be noted that above-mentioned processor 401 is promoted the interface rate preparation method realized by machine-executable instruction Other embodiments, identical as the embodiment that preceding method embodiment part refers to, which is not described herein again.
Above-mentioned machine readable storage medium may include random access memory (Random Access Memory, RAM), It also may include nonvolatile memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.It is optional , above-mentioned machine readable storage medium can also be that at least one is located remotely from the storage device of aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
As seen from the above, when communication equipment provided in this embodiment obtains interface rate, due to used first quantity And second quantity to be the default starting sample moment respectively adopt with the default starting sample moment to first between current sample time By the quantity of target interface transmitting message between the sample moment, and the first sampling instant is forward the since current sample time Preset quantity sampling instant, and since preset quantity is greater than 2, in the mistake of the obtained message amount of each sampling instant In the case that difference is certain, obtained using corresponding first quantity of current sample time and corresponding second quantity of the first sampling instant Interface rate can reduce influence of the above-mentioned error to interface rate, so as to obtain accurate interface rate.
Corresponding with above-mentioned interface rate preparation method, the embodiment of the present application also provides a kind of machine readable storage Jie Matter is stored with machine-executable instruction, and when being called and being executed by processor, the machine-executable instruction promotes the processing Device: interface rate preparation method provided by the embodiments of the present application is realized.
In one embodiment of the application, a kind of interface rate preparation method is provided, this method comprises:
The default starting sample moment is obtained to the first quantity for passing through target interface transmitting message between current sample time;
The default starting sample moment is obtained to passing through the second of the target interface transmitting message between the first sampling instant Quantity, wherein preset quantity sampling instant before first sampling instant is current sample time, the preset quantity Greater than 2;
According to first quantity, the second quantity and the first duration, the interface rate of the target interface is obtained, wherein First duration are as follows: from the first sampling instant to the duration current sample time.
It should be noted that other for the interface rate preparation method that above-mentioned machine-executable instruction promotes processor to realize Embodiment, identical as the embodiment that preceding method embodiment part refers to, which is not described herein again.
As seen from the above, the machine-executable instruction stored in machine readable storage medium provided in this embodiment is executed to obtain When obtaining interface rate, since used first quantity and the second quantity are when presetting starting sample moment to present sample respectively Between quarter and the default starting sample moment is to, by the quantity of target interface transmitting message, and first adopts between the first sampling instant The sample moment is the preset quantity sampling instant forward since current sample time, and since preset quantity is greater than 2, In the case where the error of the obtained message amount of each sampling instant is certain, using corresponding first quantity of current sample time The second quantity corresponding with the first sampling instant obtains interface rate, can reduce influence of the above-mentioned error to interface rate, from And accurate interface rate can be obtained.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence " including one ... ", it is not excluded that There is also other identical elements in the process, method, article or apparatus that includes the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device, For communication equipment and machine readable storage medium embodiment, since it is substantially similar to the method embodiment, so the ratio of description Relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely the preferred embodiments of the application, are not intended to limit the protection scope of the application.It is all Any modification, equivalent replacement, improvement and so within spirit herein and principle are all contained in the protection scope of the application It is interior.

Claims (10)

1. a kind of interface rate preparation method, which is characterized in that the described method includes:
The default starting sample moment is obtained to the first quantity for passing through target interface transmitting message between current sample time;
Obtain the default starting sample moment between the first sampling instant by the second of the target interface transmitting message Quantity, wherein first sampling instant are as follows: the preset quantity sampling instant forward since current sample time, it is described Preset quantity is greater than 2;
According to first quantity, the second quantity and the first duration, the interface rate of the target interface is obtained, wherein described First duration are as follows: from the first sampling instant to the duration current sample time.
2. the method according to claim 1, wherein described according to first quantity, the second quantity and first Duration obtains the interface rate of the target interface, comprising:
According to following formula, the interface rate of the target interface is obtained:
Wherein, Num1 indicates first quantity, and Num2 indicates second quantity, and n indicates the preset quantity, and t indicates phase Duration between adjacent sampling instant.
3. method according to claim 1 or 2, which is characterized in that obtain the default starting sample moment to current described After the first quantity for passing through target interface transmitting message between sampling instant, further includes:
According to the current sample time, in such a way that data recycle storage in array, determine in preset group for depositing Store up the element of first quantity, wherein the size of the preset group is equal to the preset quantity;
First quantity is stored as to the value of determined element.
4. according to the method described in claim 3, it is characterized in that, described obtain default starting sample moment and adopt to first Pass through the second quantity of the target interface transmitting message between the sample moment, comprising:
Judge whether determined element is the last one element in the preset group;
It adopts if it is, the value of first element in the preset group is determined as the default starting sample moment to first Pass through the second quantity of the target interface transmitting message between the sample moment;
If it has not, the value of the next element of element determined in the preset group is determined as second quantity.
5. a kind of interface rate obtains device, which is characterized in that described device includes:
First quantity obtains module, is passed between current sample time by target interface for obtaining the default starting sample moment First quantity of defeated message;
Second quantity obtain module, for obtain the default starting sample moment between the first sampling instant pass through the mesh Second quantity of tag splice port transmission message, wherein first sampling instant are as follows: the default forward since current sample time Quantity sampling instant, the preset quantity are greater than 2;
Interface rate obtains module, for obtaining the target interface according to first quantity, the second quantity and the first duration Interface rate, wherein first duration are as follows: from the first sampling instant to the duration current sample time.
6. device according to claim 5, which is characterized in that the interface rate obtains module, be specifically used for according to Lower expression formula, obtains the interface rate of the target interface:
Wherein, Num1 indicates first quantity, and Num2 indicates second quantity, and n indicates the preset quantity, and t indicates phase Duration between adjacent sampling instant.
7. device according to claim 5 or 6, which is characterized in that described device further include:
Element determining module is used for after first quantity obtains module acquisition first quantity, according to described current Sampling instant determines in preset group in such a way that data recycle storage in array for storing first quantity Element, wherein the size of the preset group is equal to the preset quantity;
Value memory module, for first quantity to be stored as to the value of determined element.
8. device according to claim 7, which is characterized in that second quantity obtains module, comprising:
Element judging unit, for judging whether determined element is the last one element in the preset group, if it is, The first quantity determination unit is triggered, if it has not, the second quantity determination unit of triggering;
The first quantity determination unit, for the value of first element in the preset group to be determined as described preset Beginning sampling instant is to passing through the second quantity of the target interface transmitting message between the first sampling instant;
Second quantity determination unit, it is described for the value of the next element of element determined in the preset group to be determined as Second quantity.
9. a kind of communication equipment characterized by comprising processor and machine readable storage medium, the machine readable storage Media storage has the machine-executable instruction that can be executed by the processor, and the processor is by the machine-executable instruction Promote: realizing any method and step of claim 1-4.
10. a kind of machine readable storage medium, which is characterized in that be stored with machine-executable instruction, by processor call and When execution, the machine-executable instruction promotes the processor: realizing any method and step of claim 1-4.
CN201810836331.7A 2018-07-26 2018-07-26 Interface rate obtaining method and device Active CN109120472B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810836331.7A CN109120472B (en) 2018-07-26 2018-07-26 Interface rate obtaining method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810836331.7A CN109120472B (en) 2018-07-26 2018-07-26 Interface rate obtaining method and device

Publications (2)

Publication Number Publication Date
CN109120472A true CN109120472A (en) 2019-01-01
CN109120472B CN109120472B (en) 2020-11-20

Family

ID=64862317

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810836331.7A Active CN109120472B (en) 2018-07-26 2018-07-26 Interface rate obtaining method and device

Country Status (1)

Country Link
CN (1) CN109120472B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116032852A (en) * 2023-03-28 2023-04-28 新华三工业互联网有限公司 Flow control method, device, system, equipment and storage medium based on session

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038499A (en) * 2014-06-17 2014-09-10 宁波三星电气股份有限公司 MODBUS RTU protocol based data transmission method
TW201626761A (en) * 2015-01-12 2016-07-16 Alpha Networks Inc Testing method of network transmission rate
CN105897494A (en) * 2015-01-26 2016-08-24 明泰科技股份有限公司 Testing method of network transmission rate
CN106227619A (en) * 2016-07-20 2016-12-14 中国航空工业集团公司航空动力控制系统研究所 There is the Flash data storage method of data modification memory ability
CN107172639A (en) * 2017-06-29 2017-09-15 苏州博联科技有限公司 A kind of method of testing of low-power consumption bluetooth transmission rate

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038499A (en) * 2014-06-17 2014-09-10 宁波三星电气股份有限公司 MODBUS RTU protocol based data transmission method
TW201626761A (en) * 2015-01-12 2016-07-16 Alpha Networks Inc Testing method of network transmission rate
CN105897494A (en) * 2015-01-26 2016-08-24 明泰科技股份有限公司 Testing method of network transmission rate
CN106227619A (en) * 2016-07-20 2016-12-14 中国航空工业集团公司航空动力控制系统研究所 There is the Flash data storage method of data modification memory ability
CN107172639A (en) * 2017-06-29 2017-09-15 苏州博联科技有限公司 A kind of method of testing of low-power consumption bluetooth transmission rate

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116032852A (en) * 2023-03-28 2023-04-28 新华三工业互联网有限公司 Flow control method, device, system, equipment and storage medium based on session
CN116032852B (en) * 2023-03-28 2023-06-02 新华三工业互联网有限公司 Flow control method, device, system, equipment and storage medium based on session

Also Published As

Publication number Publication date
CN109120472B (en) 2020-11-20

Similar Documents

Publication Publication Date Title
CN105610534B (en) A kind of multistation method for synchronizing time and equipment
DE102006060067A1 (en) Precise setting of a local clock
CN109428786B (en) Network performance monitoring method and device and computer readable storage medium
Quinton et al. Typical worst case response-time analysis and its use in automotive network design
CN103974146A (en) Video processing method, client and system
DE102011004040A1 (en) Synchronization signal detection device
CN104410413A (en) Atomic frequency standard frequency correction method and device and atomic frequency standard
CN104717120A (en) Method and device for determining time for sending information
CN109120472A (en) A kind of interface rate preparation method and device
CN104184571A (en) Time correction method of driven clock equipment and device thereof
CN110019386A (en) A kind of stream data processing method and equipment
DE102004032363A1 (en) Global positioning system receiver, has filter that selectively stores sampled values based on screening process, where sampled values of tap not having peak are discarded, and are not stored in memory
CN104572076B (en) The soft filtering algorithm and filtering system of a kind of analog acquisition
EP2961089B1 (en) Method and apparatus for estimating a maximum time interval error in a data transmission network
CN106531151B (en) Audio recognition method and device
US20110153804A1 (en) Method and system for reporting defects within a network
CN102710283B (en) Direct sequence spread spectrum pseudo code capturing method, capturing device and communication system
US20230146130A1 (en) Reference signal resource configuration method and apparatus, device, and storage medium
CN106611005B (en) Method and device for setting crawling time interval of crawler
US9479310B2 (en) Method, apparatus and system to communicate with a device
CN106776614A (en) The display methods and device of sharing platform
US20080123619A1 (en) Apparatus, method, and computer readable medium thereof for dividing a beacon interval
CN108133036A (en) A kind of weighted value of user interest point determines method, apparatus and electronic equipment
CN108833215A (en) Calculate method, the network equipment and the computer storage medium of aggregation network delay
CN104348748B (en) A kind of method and system of limitation network speed

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