WO2017202166A1 - 一种报文传输方法和发送设备、存储介质 - Google Patents
一种报文传输方法和发送设备、存储介质 Download PDFInfo
- Publication number
- WO2017202166A1 WO2017202166A1 PCT/CN2017/081747 CN2017081747W WO2017202166A1 WO 2017202166 A1 WO2017202166 A1 WO 2017202166A1 CN 2017081747 W CN2017081747 W CN 2017081747W WO 2017202166 A1 WO2017202166 A1 WO 2017202166A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- basic test
- new
- test
- rate
- messages
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0823—Errors, e.g. transmission errors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
Definitions
- the present invention relates to a network interconnection device test and measurement technology in the field of communications, and in particular, to a message transmission method, a transmission device, and a storage medium.
- the RFC 2544 protocol is an international standard proposed by the RFC organization for evaluating networked devices.
- RFC 2544 provides a benchmark for testing network devices. It specifies a set of test procedures and sending devices that allow service providers and users to agree on the implementation and results of tests under the same benchmark.
- the requirements of the RFC2544 protocol are a big challenge for the device's Network Processor (NP) and Field Programmable Gate Array (FPGA), often for Supporting the transmission of large rate RFC2544 test messages requires additional FPGA or NP resources, or without adding NP resources, other functions need to be sacrificed to achieve this requirement, even when the user requires RFC2544 test rate.
- NP Network Processor
- FPGA Field Programmable Gate Array
- the existing technology cannot test the device through the basic test packet. Therefore, it is impossible to collect the basic test packet transmission and reception, and thus it is impossible to determine whether the transmission meets the user requirements.
- the embodiment of the present invention is to provide a packet transmission method, a transmitting device, and a storage medium, and can test a device through a basic test packet without adding an FPGA and an NP resource.
- an embodiment of the present invention provides a packet transmission method, where the method includes:
- N 0 basic test messages Sending, according to a preset test time, N 0 basic test messages to the reflective device, where N 0 is an integer greater than 0;
- N 2 is less than or equal to the N 0 ;
- the N 4 new basic test messages are sent to the reflective device, and the N 4 is less than or equal to the N 2 .
- the basic packet carries a number of times of retrieving, and when there are N 4 new basic test messages that meet the preset condition, the N 4 are sent to the reflective device.
- the new basic test messages include:
- the N 4 new basic test messages are sent to the reflective device.
- the method further includes:
- the throughput rate and/or the packet loss rate are determined according to the number of received, the N 0 , and the maximum number of recovered.
- the method before the preset test time, the method further includes:
- the configuration information includes at least a basic test packet length, a test rate, and the test time, where the determining the basic test packet according to the configuration information includes:
- an embodiment of the present invention provides a sending device, where the sending device includes:
- a transmission unit configured to test within a preset time, the device transmits to the reflector base-N 0 test packet, said N 0 is an integer greater than 0; when a new presence of N 4, is configured to satisfy a preset condition When the basic test packet is sent, the N 4 new basic test messages are sent to the reflective device, where the N 4 is less than or equal to the N 2 ;
- the receiving unit is configured to receive N 2 new basic test messages sent by the reflective device, where the N 2 is less than or equal to the N 0 .
- the sending unit is configured to:
- the N 4 new basic test messages are sent to the reflective device.
- the number of the collection is a preset maximum number of collections
- the sending device further includes:
- a statistical unit configured to count the number of received new basic test messages
- the determining unit is configured to determine the throughput rate and/or the packet loss rate according to the received number, the N 0 , and the maximum number of recovered.
- the receiving unit is further configured to: receive user input Configuration information
- the determining unit is further configured to: determine a basic test message according to the configuration information.
- the configuration information includes at least a basic test packet length, a test rate, and the test time
- the determining unit is configured to:
- an embodiment of the present invention provides a computer storage medium having stored therein computer executable instructions for performing the above-described message transmission method.
- an embodiment of the present invention provides a transmitting device including a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor executing the program to implement the following steps:
- N 0 basic test messages Sending, according to a preset test time, N 0 basic test messages to the reflective device, where N 0 is an integer greater than 0;
- N 2 is less than or equal to the N 0 ;
- the N 4 new basic test messages are sent to the reflective device, and the N 4 is less than or equal to the N 2 .
- the embodiment of the present invention provides a packet transmission method, a sending device, and a storage medium, where the method includes: sending, according to a preset test time, N 0 basic test packets to the reflective device, where the N 0 is greater than An integer of 0; receiving N 2 new basic test messages sent by the reflective device, where N 2 is less than or equal to the N 0 ; when there are N 4 new basic test messages satisfying a preset condition Sending N 4 new basic test messages to the reflective device, the N 4 being less than or equal to the N 2 .
- the transmitting device can send the basic test message back and forth, so that the loop process can be used without adding FPGA and NP resources, and the device can be tested through the basic test message, so even the FPGA And NP resources are not enough, the same test can be completed to meet user requirements.
- FIG. 1 is a flowchart of a method for transmitting a message according to an embodiment of the present invention
- 2 is a schematic diagram of the position of the number of times of recovery in the basic test message
- Figure 3 is a schematic diagram of the position of the number of times of recovery in the basic test message
- FIG. 4 is a schematic diagram of a cyclic transmission message of a message transmission system according to an embodiment of the present invention.
- FIG. 5 is a flowchart of a method for transmitting a message according to an embodiment of the present invention.
- FIG. 6 is a schematic structural diagram of a sending device according to an embodiment of the present disclosure.
- FIG. 7 is a schematic structural diagram of a sending device according to an embodiment of the present invention.
- the embodiment of the invention provides a packet transmission method, which is applied to a sending device. As shown in FIG. 1 , the method may include:
- Step 101 in a predetermined test time, the device transmits to the reflector base-N 0 test packets.
- N 0 is an integer greater than 0;
- Step 102 Receive N 2 new basic test messages sent by the reflective device.
- N 2 is less than or equal to N 0
- Step 103 When there are N 4 new basic test messages that meet the preset condition, send N 4 new basic test messages to the reflective device.
- the basic packet carries the number of times of reclaiming, and the number of the rounded number (Circular Number) carried in the reflected packet is extended in the padding field after the sequence number in the throughput rate and the packet loss rate packet format specified by FRC 2544.
- the padding field is followed by the Circular Number, as shown in Figure 3.
- the number of times of recovery of N 2 new basic test messages is reduced by 1, to obtain a new number of times of recovery; whether the number of new collections is greater than 0; if there are 4 new basic tests the new number of recovery packets is greater than 0, the N 4 transmits these new packets to the base test reflective devices. That is to say, the N 4 new basic test messages are new basic test messages that meet the preset conditions.
- N 2 of said basic testing new packets recovered by subtracting the number 1, to give a new number of collections comprising: determining whether the number of N 2 recovered basic testing new packet is greater than 0; if N 3 new packets based test If the number of times of recovery is greater than 0, the number of times of recovery of N 3 new basic test messages is reduced by 1, and a new number of collections is obtained.
- the transmitting device can send the basic test message back and forth, so that the loop process can be used without adding FPGA and NP resources, and the device can be tested through the basic test message, so even the FPGA And NP resources are not enough, the same test can be completed to meet user requirements.
- the number of the reclaimed is the preset maximum number of reclaimed.
- the method further includes: counting the number of received new basic test messages; The throughput rate and/or the packet loss rate are determined according to the number of received, N 0 and the maximum number of recovered.
- the formula of the throughput rate is the same as the formula of the prior art, and the present embodiment is not described in detail.
- the packet loss formula of the packet loss rate is: Wherein, N is the total number of receiving, C * N 0 is the number of transmission theory, N 0 is the number of the first transmission, C is the maximum number of recovery.
- the transmitting device Since the transmitting device sends the basic test message every time during the transmission loop, it can receive
- the basic test packet and the new basic test packet may be the same content, or may be changed as long as it does not affect the reflective device and the transmitting device recognizes that it is the basic test packet. Just fine.
- the configuration information includes at least a basic test packet length, a test rate, and the test time, where the determining the basic test packet according to the configuration information includes:
- the basic test packet rate is calculated according to the test rate, where the basic test packet rate is the sending rate of the basic test packet or the new basic test packet; and the maximum recovery is determined according to the test rate and the basic test packet rate. frequency.
- determining the maximum number of collections comprises:
- V 0 is (0, V max )
- V max is the maximum rate that the basic test message construction module can generate.
- V 0 Look down from V max and find a minimum integer C.
- An embodiment of the present invention provides a packet transmission method, which is applied to a message transmission system, where the system includes a sending device and a reflection device, and the sending device includes at least an NP and an FPGA.
- the packet transmission process of the sending device and the reflecting device is as shown by the arrow in FIG. 4, and the message is reused, and FIG. 2 is only an exemplary description.
- the method may include :
- Step 201 The sending device receives configuration information of a packet loss rate of the RFC2544 test input by the user.
- the configuration information includes the packet length, test rate, and test time of the basic test packet configured in the RFC2544 test.
- Step 202 The FPGA determines the basic test packet according to the configuration information.
- the FPGA calculates the basic test packet rate of the RFC 2544 according to the test rate of the configuration information, and calculates the maximum number of times C of the reflected packet C according to the basic test packet rate V 0 and the test rate V.
- V 0 (0, V max )
- V max is the maximum rate that the transmitting device can generate.
- V 0 starts to look down from V max and finds a minimum integer as C.
- the FPGA constructs the RFC 2544 basic test packet whose basic test packet rate is V 0 , and increases the number of times of recovery in the basic test packet.
- the initial state recovery times are the maximum number of times of recovery.
- Step 203 The NP uniformly transmits N 0 basic test messages at a speed of V 0 .
- Step 204 the processing device reflecting the N 1 test packet basis, to give a new test packet basis.
- N 0 messages are transmitted, it is not always possible to receive N 0 messages, and therefore, N 1 is less than or equal to N 0 .
- Step 205 the reflective device to the transmitting device transmits the N 1 new test packet basis.
- the new base number of test packets received NP is N 2
- the N 1 transmits packets not necessarily the N 1 can receive the packet, and therefore, N 2 is less than or equal to N 1.
- Step 206 NP determines whether the number of N 2 recovered new base test packets is greater than 0. If yes, go to step 207; if no, go to step 214.
- the NP can judge N 2 new basic test messages one by one, and can judge several new basic test messages simultaneously in parallel.
- Step 207 NP N times the recovered three new packets based test minus 1, to give a new number of collections.
- N 3 is the number of new basic test messages whose number of times of recovery is greater than zero.
- Step 208 The NP determines whether the number of new collections is greater than zero. If yes, go to step 209; if no, go to step 214.
- Step 209 NP N 4 transmits new packets based test.
- the N 4 new basic test messages are new basic test messages with a recovery count greater than zero.
- Step 210 When the sending device determines that the test time expires, the basic test packet transmission is stopped.
- Step 211 After the preset time length, the NP stops receiving the basic test message.
- test packets sent from the sending device are reflected back, and then the received reflected packets and the statistical reflected packets are stopped.
- Step 212 The sending device counts the number of received basic test packets.
- Step 213 The sending device calculates a packet loss rate according to the number of received and the maximum number of times of recovery.
- the packet loss formula for packet loss rate is: Wherein, N is the total number of receiving, C * N 0 is the number of transmission theory, N 0 is the number of the first transmission, C is the maximum number of recovery.
- Step 214 Discard the new basic test packet.
- the embodiment of the present invention provides a sending device 30.
- the sending device 30 may include:
- the sending unit 301 is configured to send, according to the preset test time, N 0 basic test messages to the reflective device, where N 0 is an integer greater than 0; when there are N 4 new basic tests that meet preset conditions At the time of the message, N 4 new basic test messages are sent to the reflective device, and the N 4 is less than or equal to the N 2 .
- the receiving unit 302 is configured to receive N 2 new basic test messages sent by the reflective device, where the N 2 is less than or equal to the N 0 .
- the transmitting device can send the basic test message back and forth, so that the loop process can be used without adding FPGA and NP resources, and the device can be tested through the basic test message, so even the FPGA And NP resources are not enough, the same can be done Try to meet user requirements.
- the sending unit 301 is configured to:
- the N 4 new basic test messages are sent to the reflective device.
- the sending device 30 in the initial case of the test, the number of the recovery is a preset maximum number of recovery.
- the sending device 30 further includes:
- the statistics unit 303 is configured to count the number of received basic test packets.
- the determining unit 304 is configured to determine the throughput rate and/or the packet loss rate according to the number of received, the N 0 and the maximum number of recovered.
- the receiving unit 302 is further configured to: receive configuration information input by a user;
- the determining unit 304 is further configured to: determine a basic test message according to the configuration information.
- the configuration information includes at least a basic test packet length, a test rate, and the test time
- the determining unit 304 is configured to:
- the sending unit, the receiving unit, the statistic unit and the determining unit may all be processed by a central processing unit (CPU), a microprocessor (Micro Processor Unit (MPU), and a digital signal processing located in the transmitting device. (Digital Signal Processor, DSP), FPGA and other implementations.
- CPU central processing unit
- MPU Micro Processor Unit
- DSP Digital Signal Processor
- FPGA field-programmable gate array
- the foregoing message transmission method is implemented in the form of a software function module, and is sold or used as an independent product, it may also be stored in one
- the computer can read the storage medium.
- the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
- a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
- the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
- program codes such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
- Embodiments of the present invention provide a computer storage medium having stored therein computer executable instructions for performing the above described message transmission method.
- Embodiments of the present invention provide a transmitting device including a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor implementing the program to implement the following steps:
- N 0 basic test messages Sending, according to a preset test time, N 0 basic test messages to the reflective device, where N 0 is an integer greater than 0;
- N 2 is less than or equal to the N 0 ;
- the N 4 new basic test messages are sent to the reflective device, and the N 4 is less than or equal to the N 2 .
- embodiments of the present invention can be provided as a transmitting device, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
- the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
- the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
- the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
- a preset test period transmitting to the base-reflector device N 0 test packet, said N 0 is an integer greater than 0; N 2 new basic testing apparatus receiving the reflected transmitted a message, the N 2 is less than or equal to the N 0 ; when there are N 4 new basic test messages that meet the preset condition, the N 4 new basic test messages are sent to the reflective device. Said N 4 is less than or equal to said N 2 .
- the transmitting device can send the basic test message back and forth, so that the loop process can be used without adding FPGA and NP resources, and the device can be tested through the basic test message, so even the FPGA And NP resources are not enough, the same test can be completed to meet user requirements.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明实施例公开了一种报文传输方法,所述方法包括:在预设的测试时间内,向反射设备发送N0个基础测试报文,所述N0是大于0的整数;接收所述反射设备发送的N2个新的基础测试报文,所述N2小于或等于所述N0;当存在N4个满足预设条件的新的基础测试报文时,向所述反射设备发送N4个新的基础测试报文,所述N4小于或等于所述N2。本发明实施例还同时公开了一种发送设备、存储介质。
Description
相关申请的交叉引用
本申请基于申请号为201610343910.9、申请日为2016年05月23日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
本发明涉及通信领域的网络互联设备测试测量技术,尤其涉及一种报文传输方法和发送设备、存储介质。
RFC2544协议是RFC组织提出的用于评测网络互联设备的国际标准。RFC2544提供了一个对网络设备测试的基准,它规定了一系列的测试过程和发送设备,使得服务提供商和用户间可以在同一个基准下对测试的实施和结果达成共识。
随着设备容量的越来越大,这RFC2544协议的要求对设备的网络处理器(Network Processor,NP)和现场可编程门阵列(Field Programmable Gate Array,FPGA)是一个很大的挑战,往往为了能够支持发送大速率的RFC2544测试报文,需要额外增加FPGA或NP资源,或者在不增加NP资源的情况下,则需要牺牲其他功能来达到这一要求,甚至,当用户要求的RFC2544的测试速率超过链路本身的带宽时,现有技术无法通过基础测试报文测试设备,从而无法统计基础测试报文的发送和接收,从而无法确定传输是否达到用户要求。
发明内容
为解决上述技术问题,本发明实施例期望提供一种报文传输方法和发送设备、存储介质,无需增加FPGA和NP资源,能够通过基础测试报文测试设备。
为达到上述目的,本发明实施例的技术方案是这样实现的:
一方面,本发明实施例提供一种报文传输方法,所述方法包括:
在预设的测试时间内,向反射设备发送N0个基础测试报文,所述N0是大于0的整数;
接收所述反射设备发送的N2个新的基础测试报文,所述N2小于或等于所述N0;
当存在N4个满足预设条件的新的基础测试报文时,向所述反射设备发送所述N4个新的基础测试报文,所述N4小于或等于所述N2。
在本发明的其他实施例中,所述基础报文携带有回收次数,所述当存在N4个满足预设条件的新的基础测试报文时,向所述反射设备发送所述N4个新的基础测试报文包括:
将所述N2个新的基础测试报文的回收次数减去1,得到新的回收次数;
判断所述新的回收次数是否大于0;
若存在所述N4个新的基础测试报文的新的回收次数大于0,则向所述反射设备发送所述N4个新的基础测试报文。
在本发明的其他实施例中,测试初始情况下,所述回收个数是预设的最大回收个数,当所述测试周期结束之后,所述方法还包括:
统计所述新的基础测试报文的接收个数;
根据所述接收个数、所述N0和所述最大回收个数,确定吞吐率和/或丢包率。
在本发明的其他实施例中,在预设的测试时间之前,所述方法还包括:
接收用户输入的配置信息;
根据所述配置信息确定基础测试报文。
在本发明的其他实施例中,所述配置信息至少包括基础测试报文长度、测试速率和所述测试时间,所述根据所述配置信息确定基础测试报文包括:
根据所述测试速率,计算基础测试报文速率,所述基础测试报文速率是所述基础测试报文或所述新的基础测试报文的发送速率;
根据所述测试速率和所述基础测试报文速率,确定所述最大回收次数。
另一方面,本发明实施例提供一种发送设备,所述发送设备包括:
发送单元,配置为在预设的测试时间内,向反射设备发送N0个基础测试报文,所述N0是大于0的整数;当存在N4,配置为个满足预设条件的新的基础测试报文时,向所述反射设备发送所述N4个新的基础测试报文,所述N4小于或等于所述N2;
接收单元,配置为接收所述反射设备发送的N2个新的基础测试报文,所述N2小于或等于所述N0。
在本发明的其他实施例中,所述发送单元配置为:
将所述N2个新的基础测试报文的回收次数减去1,得到新的回收次数;
判断所述新的回收次数是否大于0;
若存在所述N4个新的基础测试报文的新的回收次数大于0,则向所述反射设备发送所述N4个新的基础测试报文。
在本发明的其他实施例中,测试初始情况下,所述回收个数是预设的最大回收个数,所述发送设备还包括:
统计单元,配置为统计所述新的基础测试报文的接收个数;
确定单元,配置为根据所述接收个数、所述N0和所述最大回收个数,确定吞吐率和/或丢包率。
在本发明的其他实施例中,所述接收单元还配置为:接收用户输入的
配置信息;
所述确定单元还配置为:根据所述配置信息确定基础测试报文。
在本发明的其他实施例中,所述配置信息至少包括基础测试报文长度、测试速率和所述测试时间,所述确定单元配置为:
根据所述测试速率,计算基础测试报文速率,所述基础测试报文速率是所述基础测试报文或所述新的基础测试报文的发送速率;
根据所述测试速率和所述基础测试报文速率,确定所述最大回收次数。
再一方面,本发明的实施例提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行上述的报文传输方法。
又一方面,本发明的实施例提供一种发送设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现以下步骤:
在预设的测试时间内,向反射设备发送N0个基础测试报文,所述N0是大于0的整数;
接收所述反射设备发送的N2个新的基础测试报文,所述N2小于或等于所述N0;
当存在N4个满足预设条件的新的基础测试报文时,向所述反射设备发送所述N4个新的基础测试报文,所述N4小于或等于所述N2。
本发明实施例提了一种报文传输方法和发送设备、存储介质,其中,方法包括:在预设的测试时间内,向反射设备发送N0个基础测试报文,所述N0是大于0的整数;接收所述反射设备发送的N2个新的基础测试报文,所述N2小于或等于所述N0;当存在N4个满足预设条件的新的基础测试报文时,向所述反射设备发送N4个新的基础测试报文,所述N4小于或等于所述N2。这样一来,在预设的测试时间内,发送设备可以往复发送基础测
试报文,这样,利用了循环过程,就无需增加FPGA和NP资源,能够通过基础测试报文测试设备,因此,即使FPGA和NP资源不充足,同样可以完成测试,从而达到用户要求。
图1为本发明实施例提供的一中报文传输方法的流程图;
图2为回收次数在基础测试报文中的位置的示意图;
图3为回收次数在基础测试报文中的位置的示意图;
图4为本发明实施例的报文传输系统的循环传输报文的示意图;
图5为本发明实施例提供的一中报文传输方法的流程图;
图6为本发明实施例提供的一种发送设备的结构示意图;
图7为本发明实施例提供的一种发送设备的结构示意图。
本发明实施例提供一种报文传输方法,应用于发送设备,如图1所示,该方法可以包括:
步骤101、在预设的测试时间内,向反射设备发送N0个基础测试报文。
这里,N0是大于0的整数;
步骤102、接收反射设备发送的N2个新的基础测试报文。
这里,N2小于或等于N0
步骤103、当存在N4个满足预设条件的新的基础测试报文时,向反射设备发送N4个新的基础测试报文。
这里,所述基础报文携带有回收次数,反射报文中携带的回收次数(Circular Number)定义在FRC2544所规定的吞吐率和丢包率报文格式中Sequence Number之后的填充字段中扩展4个字节,扩展后,如果配置信息中的基础测试报文长度是64字节,则没有填充字段,如图2所示,如果配
置信息中的基础测试报文长度大于64个字节,则在Circular Number之后是填充字段,如图3所示。
在本发明的其他实施例中,将N2个新的基础测试报文的回收次数减去1,得到新的回收次数;判断新的回收次数是否大于0;若存在N4个新的基础测试报文的新的回收次数大于0,则向反射设备发送这N4个新的基础测试报文。也就是说这N4个新的基础测试报文是满足预设条件的新的基础测试报文。
在本发明的其他实施例中,由于发射设备接收到的新的基础测试报文是有问题的报文,特别是其回收次数变为负数,因此,需要提出这列报文,所述将所述N2个新的基础测试报文的回收次数减去1,得到新的回收次数包括:判断N2个新的基础测试报文的回收次数是否大于0;若N3个新的基础测试报文的回收次数大于0,则将N3个新的基础测试报文的回收次数减去1,得到新的回收次数。
这样一来,在预设的测试时间内,发送设备可以往复发送基础测试报文,这样,利用了循环过程,就无需增加FPGA和NP资源,能够通过基础测试报文测试设备,因此,即使FPGA和NP资源不充足,同样可以完成测试,从而达到用户要求。
本实施例中,测试初始情况下,所述回收个数是预设的最大回收个数,当所述测试周期结束之后,所述方法还包括:统计新的基础测试报文的接收个数;根据接收个数、N0和最大回收个数,确定吞吐率和/或丢包率。
由于在传输的循环过程中,发送设备每次发送基础测试报文,都能收
到新的基础测试报文,该基础测试报文和新的基础测试报文可能是相同的内容,也可能发生了一定的变化,只要不影响反射设备和发送设备识别出它是基础测试报文即可。
在本发明的其他实施例中,所述配置信息至少包括基础测试报文长度、测试速率和所述测试时间,所述根据所述配置信息确定基础测试报文包括:
根据测试速率,计算基础测试报文速率,该基础测试报文速率是所述基础测试报文或新的基础测试报文的发送速率;根据测试速率和基础测试报文速率,确定所述最大回收次数。
在本发明的其他实施例中,确定所述最大回收次数包括:
那么,最大回收次数为:C=V/V0;其中,C是最大回收次数;V是测试速率;V0是基础测试报文速率。
其中,V0的范围是(0,Vmax],Vmax为基础测试报文构造模块所能产生的最大速率。通常,为了减少报文在发射端和反射端之间循环的次数,V0从Vmax开始向下查找,找到一个最小的整数C即可。
所述方案中,如果V小于Vmax,则V0=V,C=1。
本发明实施例提供一种报文传输方法,应用于报文传输系统,该系统包括发送设备和反射设备,发送设备至少包括NP和FPGA。在测试过程中,发送设备和反射设备的报文传输过程如图4的箭头所示,报文会重复利用,且图2仅是示例性说明,如图5的流程所示,该方法可以包括:
步骤201、发送设备接收用户输入的RFC2544测试的丢包率的配置信息。
该配置信息包括配置RFC2544测试的基础测试报文的报文长度、测试速率和测试时间。
步骤202、FPGA根据配置信息确定基础测试报文。
FPGA根据配置信息的测试速率,计算出RFC2544的基础测试报文速
率,并且根据基础测试报文速率V0和测试速率V,计算反射报文最大回收次数C,所述C为:C=V/V0;
其中,V0的范围是(0,Vmax],Vmax为发送设备所能产生的最大速率。
一般情况下,为了减少基础测试报文在发送设备和反射设备之间回收次数(即循环次数),V0从Vmax开始向下查找,找到一个最小的整数作为C即可。
在本发明的其他实施例中,若V小于Vmax,则V=V0,C=1。
FPGA根据V0和测试报文长度,构造基础测试报文速率为V0的RFC2544基础测试报文,并且在基础测试报文中增加回收次数,初始状态回收次数是最大回收次数。
值得说明的是,本方案中,基础测试报文模块构造基础测试报文后,需要统计基础测试报文数N0。
步骤203、NP以V0的速度均匀发送N0个基础测试报文。
步骤204、反射设备处理N1个基础测试报文,得到新的基础测试报文。
这里,由于发送N0个报文,不一定就能够接收到N0个报文,因此,N1是小于或等于N0。
步骤205、反射设备向发射设备发送N1个新的基础测试报文。
这里,NP接收到的新的基础测试报文个数为N2,由于发送N1个报文,不一定就能够接收到N1个报文,因此,N2是小于或等于N1。
步骤206、NP判断N2个新的基础测试报文中的回收次数是否大于0。若是,则执行步骤207;若否,则执行步骤214。
这里,NP可以逐一判断N2个新的基础测试报文,可以并行同时判断几个新的基础测试报文。
步骤207、NP将N3个新的基础测试报文的回收次数减1,得到新的回收次数。
N3是回收次数大于0的新的基础测试报文的个数。
步骤208、NP判新的回收次数是否大于0。若是,则执行步骤209;若否,则执行步骤214。
步骤209、NP发送N4个新的基础测试报文。
该N4个新的基础测试报文是回收次数大于0的新的基础测试报文。
步骤210、当发送设备确定测试时间超时时,停止基础测试报文发送。
步骤211、NP在预设时长之后,停止基础测试报文接收。
这样,保证从发送设备发送出去的测试报文都反射回来,然后停止接收反射报文和统计反射报文。
步骤212、发送设备统计基础测试报文的接收个数。
步骤213、发送设备根据收个数和最大回收次数,计算丢包率。
步骤214、丢弃新的基础测试报文。
本发明实施例提供一种发送设备30,如图6所示,所述发送设备30可以包括:
发送单元301,配置为在预设的测试时间内,向反射设备发送N0个基础测试报文,所述N0是大于0的整数;当存在N4个满足预设条件的新的基础测试报文时,向所述反射设备发送N4个新的基础测试报文,所述N4小于或等于所述N2。
接收单元302,配置为接收所述反射设备发送的N2个新的基础测试报文,所述N2小于或等于所述N0。
这样一来,在预设的测试时间内,发送设备可以往复发送基础测试报文,这样,利用了循环过程,就无需增加FPGA和NP资源,能够通过基础测试报文测试设备,因此,即使FPGA和NP资源不充足,同样可以完成测
试,从而达到用户要求。
在本发明的其他实施例中,所述发送单元301配置为:
将所述N2个新的基础测试报文的回收次数减去1,得到新的回收次数;
判断所述新的回收次数是否大于0;
若存在所述N4个新的基础测试报文的新的回收次数大于0,则向所述反射设备发送所述N4个新的基础测试报文。
在本发明的其他实施例中,测试初始情况下,所述回收个数是预设的最大回收个数,如图7所示,所述发送设备30还包括:
统计单元303,配置为统计所述新的基础测试报文的接收个数。
确定单元304,配置为根据所述接收个数、所述N0和所述最大回收个数,确定吞吐率和/或丢包率。
在本发明的其他实施例中,所述接收单元302还配置为:接收用户输入的配置信息;
所述确定单元304还配置为:根据所述配置信息确定基础测试报文。
在本发明的其他实施例中,所述配置信息至少包括基础测试报文长度、测试速率和所述测试时间,所述确定单元304配置为:
根据所述测试速率,计算基础测试报文速率,所述基础测试报文速率是所述基础测试报文或新的基础测试报文的发送速率;
根据所述测试速率和所述基础测试报文速率,确定所述最大回收次数。
在实际应用中,所述发送单元、接收单元、统计单元和确定单元均可由位于发送设备中的中央处理器(Central Processing Unit,CPU)、微处理器(Micro Processor Unit,MPU)、数字信号处理器(Digital Signal Processor,DSP)、FPGA等实现。
需要说明的是,本发明实施例中,如果以软件功能模块的形式实现上述的报文传输方法,并作为独立的产品销售或使用时,也可以存储在一个
计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本发明实施例不限制于任何特定的硬件和软件结合。
本发明的实施例提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行上述的报文传输方法。
本发明的实施例提供一种发送设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现以下步骤:
在预设的测试时间内,向反射设备发送N0个基础测试报文,所述N0是大于0的整数;
接收所述反射设备发送的N2个新的基础测试报文,所述N2小于或等于所述N0;
当存在N4个满足预设条件的新的基础测试报文时,向所述反射设备发送所述N4个新的基础测试报文,所述N4小于或等于所述N2。
本领域内的技术人员应明白,本发明的实施例可提供为发送设备、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的发送设备、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。
本发明实施例中,在预设的测试时间内,向反射设备发送N0个基础测试报文,所述N0是大于0的整数;接收所述反射设备发送的N2个新的基础测试报文,所述N2小于或等于所述N0;当存在N4个满足预设条件的新的基础测试报文时,向所述反射设备发送N4个新的基础测试报文,所述N4小于或等于所述N2。这样一来,在预设的测试时间内,发送设备可以往
复发送基础测试报文,这样,利用了循环过程,就无需增加FPGA和NP资源,能够通过基础测试报文测试设备,因此,即使FPGA和NP资源不充足,同样可以完成测试,从而达到用户要求。
Claims (12)
- 一种报文传输方法,所述方法包括:在预设的测试时间内,向反射设备发送N0个基础测试报文,所述N0是大于0的整数;接收所述反射设备发送的N2个新的基础测试报文,所述N2小于或等于所述N0;当存在N4个满足预设条件的新的基础测试报文时,向所述反射设备发送所述N4个新的基础测试报文,所述N4小于或等于所述N2。
- 根据权利要求1所述的方法,其中,所述基础报文携带有回收次数,所述当存在N4个满足预设条件的新的基础测试报文时,向所述反射设备发送所述N4个新的基础测试报文包括:将所述N2个新的基础测试报文的回收次数减去1,得到新的回收次数;判断所述新的回收次数是否大于0;若存在所述N4个新的基础测试报文的新的回收次数大于0,则向所述反射设备发送所述N4个新的基础测试报文。
- 根据权利要求1所述的方法,其中,测试初始情况下,所述回收个数是预设的最大回收个数,当所述测试周期结束之后,所述方法还包括:统计所述新的基础测试报文的接收个数;根据所述接收个数、所述N0和所述最大回收个数,确定吞吐率和/或丢包率。
- 根据权利要求1至3任一项所述的方法,其中,在预设的测试时间之前,所述方法还包括:接收用户输入的配置信息;根据所述配置信息确定基础测试报文。
- 根据权利要求4所述方法,其中,所述配置信息至少包括基础测试报文长度、测试速率和所述测试时间,所述根据所述配置信息确定基础测试报文包括:根据所述测试速率,计算基础测试报文速率,所述基础测试报文速率是所述基础测试报文或所述新的基础测试报文的发送速率;根据所述测试速率和所述基础测试报文速率,确定所述最大回收次数。
- 一种发送设备,所述发送设备包括:发送单元,配置为在预设的测试时间内,向反射设备发送N0个基础测试报文,所述N0是大于0的整数;当存在N4个满足预设条件的新的基础测试报文时,向所述反射设备发送所述N4个新的基础测试报文,所述N4小于或等于所述N2;接收单元,配置为接收所述反射设备发送的N2个新的基础测试报文,所述N2小于或等于所述N0。
- 根据权利要求6所述的发送设备,其中,所述发送单元配置为:将所述N2个新的基础测试报文的回收次数减去1,得到新的回收次数;判断所述新的回收次数是否大于0;若存在所述N4个新的基础测试报文的新的回收次数大于0,则向所述反射设备发送所述N4个新的基础测试报文。
- 根据权利要求6所述的发送设备,其中,测试初始情况下,所述回收个数是预设的最大回收个数,所述发送设备还包括:统计单元,配置为统计所述新的基础测试报文的接收个数;确定单元,配置为根据所述接收个数、所述N0和所述最大回收个数, 确定吞吐率和/或丢包率。
- 根据权利要求6至8任一项所述的发送设备,其中,所述接收单元还配置为:接收用户输入的配置信息;所述确定单元还配置为:根据所述配置信息确定基础测试报文。
- 根据权利要求9所述发送设备,其中,所述配置信息至少包括基础测试报文长度、测试速率和所述测试时间,所述确定单元配置为:根据所述测试速率,计算基础测试报文速率,所述基础测试报文速率是所述基础测试报文或所述新的基础测试报文的发送速率;根据所述测试速率和所述基础测试报文速率,确定所述最大回收次数。
- 一种发送设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现以下步骤:在预设的测试时间内,向反射设备发送N0个基础测试报文,所述N0是大于0的整数;接收所述反射设备发送的N2个新的基础测试报文,所述N2小于或等于所述N0;当存在N4个满足预设条件的新的基础测试报文时,向所述反射设备发送所述N4个新的基础测试报文,所述N4小于或等于所述N2。
- 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行权利要求1至5任一项所述的报文传输方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610343910.9 | 2016-05-23 | ||
CN201610343910.9A CN107426042A (zh) | 2016-05-23 | 2016-05-23 | 一种报文传输方法和发送设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017202166A1 true WO2017202166A1 (zh) | 2017-11-30 |
Family
ID=60411060
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/081747 WO2017202166A1 (zh) | 2016-05-23 | 2017-04-24 | 一种报文传输方法和发送设备、存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107426042A (zh) |
WO (1) | WO2017202166A1 (zh) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111049704A (zh) * | 2019-12-23 | 2020-04-21 | 安徽皖通邮电股份有限公司 | 一种通过rfc2544计算在保护环境下倒换、回切时间的方法 |
CN111324536A (zh) * | 2020-02-19 | 2020-06-23 | 香港乐蜜有限公司 | 一种压力测试方法、装置、电子设备及存储介质 |
CN113344701A (zh) * | 2021-07-28 | 2021-09-03 | 中国银行股份有限公司 | 银行系统中基于预测机制发送交易报文的方法及装置 |
CN117082556A (zh) * | 2023-08-22 | 2023-11-17 | 深圳市中承科技有限公司 | 一种无线通信设备的吞吐量测试方法、检测设备、系统 |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111901181B (zh) * | 2019-05-05 | 2023-07-28 | 中兴通讯股份有限公司 | 一种误码率检测的处理方法及相关设备 |
CN114338474A (zh) * | 2021-12-27 | 2022-04-12 | 南京创通微新通信有限公司 | 空口链路免仪表测试系统、方法及存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101547063A (zh) * | 2009-04-30 | 2009-09-30 | 北京星网锐捷网络技术有限公司 | 一种转发延迟测试方法和系统 |
US20110188386A1 (en) * | 2010-02-02 | 2011-08-04 | Juniper Networks Inc. | Packet-based memory test of a network device |
CN102177681A (zh) * | 2011-04-21 | 2011-09-07 | 华为技术有限公司 | 检测故障的方法和系统 |
CN103095531A (zh) * | 2013-01-28 | 2013-05-08 | 北京星网锐捷网络技术有限公司 | 带宽测量方法、装置和网关设备 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101478458B (zh) * | 2009-01-20 | 2013-04-17 | 工业和信息化部电信传输研究所 | 一种sip协议安全性测试方法 |
CN102223263B (zh) * | 2011-06-09 | 2016-12-28 | 中兴通讯股份有限公司 | 基于fpga的丢包率监测方法及装置 |
CN102629880A (zh) * | 2012-03-27 | 2012-08-08 | 上海市电力公司 | 中压载波通信系统的测试方法 |
CN102904772A (zh) * | 2012-09-26 | 2013-01-30 | 中兴通讯股份有限公司 | 一种网络设备实现吞吐量测试的方法及装置 |
-
2016
- 2016-05-23 CN CN201610343910.9A patent/CN107426042A/zh active Pending
-
2017
- 2017-04-24 WO PCT/CN2017/081747 patent/WO2017202166A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101547063A (zh) * | 2009-04-30 | 2009-09-30 | 北京星网锐捷网络技术有限公司 | 一种转发延迟测试方法和系统 |
US20110188386A1 (en) * | 2010-02-02 | 2011-08-04 | Juniper Networks Inc. | Packet-based memory test of a network device |
CN102177681A (zh) * | 2011-04-21 | 2011-09-07 | 华为技术有限公司 | 检测故障的方法和系统 |
CN103095531A (zh) * | 2013-01-28 | 2013-05-08 | 北京星网锐捷网络技术有限公司 | 带宽测量方法、装置和网关设备 |
Non-Patent Citations (1)
Title |
---|
BRADNER, S. ET AL.: "Benchmarking Methodology for Network Interconnect Devices", RFC2544, 31 March 1999 (1999-03-31), XP015008327 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111049704A (zh) * | 2019-12-23 | 2020-04-21 | 安徽皖通邮电股份有限公司 | 一种通过rfc2544计算在保护环境下倒换、回切时间的方法 |
CN111324536A (zh) * | 2020-02-19 | 2020-06-23 | 香港乐蜜有限公司 | 一种压力测试方法、装置、电子设备及存储介质 |
CN113344701A (zh) * | 2021-07-28 | 2021-09-03 | 中国银行股份有限公司 | 银行系统中基于预测机制发送交易报文的方法及装置 |
CN117082556A (zh) * | 2023-08-22 | 2023-11-17 | 深圳市中承科技有限公司 | 一种无线通信设备的吞吐量测试方法、检测设备、系统 |
CN117082556B (zh) * | 2023-08-22 | 2024-05-03 | 深圳市中承科技有限公司 | 一种无线通信设备的吞吐量测试方法、检测设备、系统 |
Also Published As
Publication number | Publication date |
---|---|
CN107426042A (zh) | 2017-12-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017202166A1 (zh) | 一种报文传输方法和发送设备、存储介质 | |
RU2610250C2 (ru) | Узел передачи и способ отчетности о статусе буфера | |
US20150131445A1 (en) | Similarity matching method and related device and communication system | |
JP2008131640A (ja) | ネットワーク試験装置及び方法 | |
WO2013182137A1 (zh) | 一种吞吐量测试的方法及装置 | |
US9331925B2 (en) | Multiple test site bandwidth limit measurement | |
WO2016086542A1 (zh) | 一种传输报文的方法及装置、计算机存储介质 | |
EP2887591A1 (en) | Packet congestion processing method and apparatus | |
CN105207954A (zh) | 发送数据包和吞吐量测试方法及装置 | |
RU2653248C2 (ru) | Система и способ измерения производительности для точек доступа беспроводной локальной сети | |
Seytnazarov et al. | Enhanced mathematical modeling of aggregation-enabled WLANs with compressed blockACK | |
WO2017000252A1 (zh) | 传输信道状态信息的方法和设备 | |
WO2019029729A1 (zh) | 一种上报网络性能参数的方法及设备 | |
WO2017012389A1 (zh) | 链路检测方法、接收设备及计算机存储介质 | |
WO2024109810A1 (zh) | 虚拟桌面性能探测方法、装置、设备及存储介质和程序 | |
KR101881892B1 (ko) | 무선 근거리 네트워크의 오류율을 측정하는 시스템 및 방법 | |
CN110248379A (zh) | 无线局域网中基站的性能测试方法及装置 | |
WO2021018068A1 (zh) | 一种无线链路监测方法和通信设备 | |
CN114157716B (zh) | 基于区块链的数据处理方法、装置和电子设备 | |
CN111432441B (zh) | 音频数据发送方法及装置、计算机可读存储介质 | |
JP2018207345A (ja) | 計算装置及び計算方法 | |
CN115134855A (zh) | 网络切片性能测量方法和装置 | |
CN108259393B (zh) | 一种流数据处理中乱序纠正方法及系统 | |
JP6637381B2 (ja) | 無線装置 | |
Wang et al. | An entropy-based method for detection of covert channels over LTE |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17802012 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17802012 Country of ref document: EP Kind code of ref document: A1 |