WO2022088791A1 - Performance test method, apparatus and system for distribution device, electronic device, and medium - Google Patents

Performance test method, apparatus and system for distribution device, electronic device, and medium Download PDF

Info

Publication number
WO2022088791A1
WO2022088791A1 PCT/CN2021/108677 CN2021108677W WO2022088791A1 WO 2022088791 A1 WO2022088791 A1 WO 2022088791A1 CN 2021108677 W CN2021108677 W CN 2021108677W WO 2022088791 A1 WO2022088791 A1 WO 2022088791A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
test
time
distribution device
packet
Prior art date
Application number
PCT/CN2021/108677
Other languages
French (fr)
Chinese (zh)
Inventor
龚剑
万月亮
火一莽
Original Assignee
北京锐安科技有限公司
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 北京锐安科技有限公司 filed Critical 北京锐安科技有限公司
Publication of WO2022088791A1 publication Critical patent/WO2022088791A1/en

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/12Network monitoring probes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/14Arrangements for monitoring or testing data switching networks using software, i.e. software packages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Definitions

  • the embodiments of the present application relate to the field of data communication, for example, to a method, system, device, electronic device, and medium for testing the performance of a shunt device.
  • the application of broadband network and value-added services in my country has become more and more extensive. Telecom operators, value-added service providers, and even various public security agencies all need to deploy a variety of offloading devices in private networks.
  • the offloading device filters out the data required by the user according to the port numbers of different protocols, Internet Protocol (IP), feature codes and other conditions. Therefore, the shunt device has various performance requirements for data processing, among which the effective time of the rule is a very important performance indicator.
  • IP Internet Protocol
  • the test method for the time when the rule takes effect in the related art has relatively high resource requirements, and requires a testing machine, a contract issuing machine, a three-layer switch, a server, and a special rich client platform (Rich Client Platform, RCP) software, etc.
  • RCP Raster Client Platform
  • the knowledge reserve requirements for testers are high, and they need to be able to configure switches and use RCP.
  • the test environment setup and test operations are also complicated. It often costs a lot of manpower, resources and time.
  • the present application provides a method, device, system, electronic device and medium for testing the performance of shunt equipment, which improve the flexibility and efficiency of testing.
  • an embodiment of the present application provides a method for testing the performance of a shunt device, and the method is applied to a test system, wherein the test system includes a test client, a shunt device to be tested, and a test device, and the test client
  • the shunt device and the test device are respectively communicated and connected based on the Ethernet, and the shunt device and the test device are wiredly connected, and the method includes:
  • the test client sends the first data packet carrying the preset rule to the flow distribution device, and records the packet sending time of the first data packet;
  • the test client controls the test device to construct a second data packet that matches the preset rule, and continuously sends it to the distribution device;
  • the test client accepts the feedback time of the offloading device sent by the testing device, where the feedback time is the third data that the test device feeds back to the second data packet according to the preset rule to the offloading device packet reception time;
  • the test client determines the effective time of the rule of the traffic distribution device according to the packet sending time of the first data packet and the feedback time.
  • an embodiment of the present application also provides a device for testing the performance of a shunt device, the device comprising:
  • a first time recording module configured for the test client to send a first data packet carrying a preset rule to the flow distribution device, and record the packet sending time of the first data packet;
  • a second data packet sending module configured for the test client to control the test device to construct a second data packet that matches the preset rule, and continuously send it to the distribution device;
  • the second time recording module is configured to receive the feedback time of the shunt device sent by the test device by the test client, wherein the feedback time is the test device's response to the shunt device according to preset rules for the first The receiving time of the third data packet fed back by the two data packets;
  • a third time determining module is configured to determine, by the test client, the effective time of the rule of the traffic distribution device according to the packet sending time of the first data packet and the feedback time.
  • an embodiment of the present application also provides a performance testing system for a shunt device, the system comprising:
  • test device a shunt device to be tested, and a test client
  • the test client is respectively connected to the shunt device and the test device in communication based on the Ethernet, and the shunt device and the test device are wiredly connected;
  • the test device constructs a second data packet matching the preset rule at the device interface and continuously sends it to the distribution device to be tested, and continues to capture the data packets fed back by the distribution device, and the captured first data packet
  • the timestamp of the message is determined as the feedback time, and the feedback time is sent to the test client;
  • the test client sends the first data packet carrying the preset rule to the flow distribution device, and continues to capture the interaction message with the flow distribution device, and determines the captured first interaction message as the first interaction message.
  • a packet sending time
  • the distribution device receives the first data packet carrying the preset rule sent by the test client and the second data packet carrying the preset rule sent by the testing device, and generates the second data based on the preset rule the matching third data packet of the packet, and feeding back the third data packet to the test equipment;
  • the test client determines, based on the packet sending time of the first data packet and the feedback time, the rule effective time of the traffic distribution device.
  • an embodiment of the present application further provides an electronic device, the electronic device comprising:
  • processors one or more processors
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the method for testing the performance of a shunt device provided in any embodiment of the present application.
  • an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the method for testing the performance of a shunt device provided by any embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a method for testing the performance of a shunt device provided in an embodiment of the present application
  • FIG. 2 is a schematic diagram of a feedback time of a shunt device provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of a packet sending time of a first data packet provided by an embodiment of the present application
  • FIG. 4 is a schematic diagram of the architecture of a system for testing the performance of a shunt device provided by an embodiment of the present application;
  • FIG. 5 is a schematic structural diagram of a device for testing the performance of a shunt equipment provided in an embodiment of the present application
  • FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 1 is a flowchart of a method for testing the performance of a shunt device provided by an embodiment of the present application.
  • the method provided in this embodiment is applicable to a shunt device testing system, for example, in the case of testing the rule-validation performance of the shunt device.
  • the method may be performed by a device for testing the performance of a shunt device, and the device may be implemented in software and/or hardware, for example, may be configured in a computer device.
  • the present method applies a performance testing system for a shunt device such as shown in FIG. 3 .
  • the performance test system for a shunt device includes a test device 210 , a shunt device to be tested 220 and a test client 230 . Based on the test device 210 and the test client 230 to be tested The triage device 220 performs a test to determine the effective time of the rule of the triage device 220 .
  • the structure of the performance testing system of the shunt equipment in this embodiment is simple, and the equipment cost is reduced.
  • the method includes the following steps:
  • the test client sends a first data packet carrying a preset rule to the traffic distribution device, and records the packet sending time of the first data packet.
  • the performance of the shunting device needs to be tested according to the effective time of the screening rule.
  • the test client needs to send the first data packet carrying the preset rule to the distribution device to be tested, and record the packet sending time of the first data packet.
  • the test client may be an intelligent terminal device with computing functions, for example, may be an electronic device such as a personal computer (Personal Computer, PC), a smart tablet computer, and the like.
  • the preset rule can be a screening rule, such as obtaining an ipv4 packet whose source IP is 1.1.1.1; or other rules that instruct the distribution device to process the data packet, such as instructing the distribution device to update or mark the content of the data packet.
  • the first data packet is a packet for the test client to deliver the rule to the traffic distribution device.
  • the test client can send a first data packet carrying a preset rule to the distribution device through a preset connection protocol, where the preset connection protocol includes a secure shell protocol (Secure Shell, ssh) protocol, a remote terminal protocol (telnet) Protocol and any one of the protocols that come with the Windows system.
  • the preset connection protocol includes a secure shell protocol (Secure Shell, ssh) protocol, a remote terminal protocol (telnet) Protocol and any one of the protocols that come with the Windows system.
  • the test client can continuously capture the packet information locally.
  • the captured packet information includes the packet information carrying the preset rules sent by the test client to the distribution device.
  • the distribution device receives the feedback information of the preset rule
  • the test client receives the receipt information fed back by the distribution device.
  • network packet analysis software such as wireshark
  • the interactive packet information is filtered by using a preset filtering rule, and the packet information sent by the test client to the distribution device, that is, the first interactive packet information, is obtained.
  • feedback information and receipt information may be filtered according to the type of interactive message information, and only data packets carrying preset rules are acquired.
  • the embodiment of the present application does not limit the preset filtering method. Record the obtained time stamp for sending the first data packet carrying the preset rule, and determine that the time stamp is the time when the first data packet is sent.
  • the test client controls the test device to construct a second data packet that matches the preset rule, and continuously sends the data packet to the distribution device.
  • the test client sends a control instruction to the test device to control the test device to construct a second data packet that matches the preset rule.
  • the 8/6 interface of the test device can be used to construct multiple matching presets
  • the data packets of the rules are continuously sent to the distribution device to be tested. For example, when the offload device does not receive the first data packet sent by the test client, the packet sent by the test device to the offload device through the 8/6 interface will not hit the offload device, so the offload device will not send feedback information To the test equipment, so at this time, the 8/6 interface of the test equipment has only sent packets, but no received packets.
  • the test client accepts the feedback time of the offloading device sent by the testing device, where the feedback time is the second data packet that is fed back by the testing device to the offloading device according to a preset rule. Three packet reception time.
  • the offloading device when the offloading device receives the first data packet sent by the test client, the offloading device is configured with a preset rule, and the packet sent by the test device to the offloading device through the 8/6 interface can hit the The distribution device, so the distribution device will send each third data packet fed back to each second data packet according to the preset rule to the test device.
  • the 8/6 interface of the test device continuously captures not only sent packets, but also received packets.
  • the preset filtering rules are used to obtain the received packets continuously captured by the 8/6 interface, and the timestamp of the first received packet captured by the interface is recorded.
  • the test client receives the timestamp of the first received packet sent by the test device, and determines the timestamp as the feedback time of the offload device.
  • the test client determines the effective time of the rule of the traffic distribution device according to the packet sending time of the first data packet and the feedback time.
  • the difference between the feedback time of the traffic distribution device and the packet sending time of the first data packet is used as the effective time of the rule of the traffic distribution device.
  • the test client receives the feedback time of the offloading device and the time when it receives the first data packet, it calculates the difference between the time stamps of the two data packets, and this difference is used as the rule effective time of the offloading device.
  • the feedback time of the offloading device and the packet sending time of the first data packet are shown in FIG. 2 and FIG. 3 respectively, and the time interval between the first timestamps in the two figures is calculated as the rule effective time of the offloading device.
  • users can measure whether the distribution device can process data packets quickly and accurately according to the effective time of the rule.
  • the method provided by the present application sends a first data packet carrying a preset rule to a distribution device to be tested by a test client, and records the packet sending time of the first data packet; controls the test device to construct a second data packet matching the preset rule
  • the data packet is continuously sent to the offloading device; the feedback time of the offloading device sent by the test device is received, and the rule effective time of the offloading device is determined according to the packet sending time and the feedback time of the first data packet.
  • FIG. 3 is a schematic structural diagram of a system for testing the performance of a shunt device according to an embodiment of the present application, and the method provided in this embodiment can be applied to a situation in which the rule-validation performance of the shunt device is tested.
  • the system may be implemented in software and/or hardware, eg, may be configured in a computer device.
  • the system includes: a test device 210, a shunt device to be tested 220 and a test client 230, wherein:
  • the test equipment 210 and the shunt equipment 220 are connected by wire, for example, they may be connected by means of optical fibers or dual fibers.
  • the testing device 210 is configured to construct a second data packet that matches the preset rule at the device interface and continuously send it to the distribution device 220 to be tested, and continuously capture the data packets fed back by the distribution device 220, and capture The time stamp of the first data packet of , is determined as the feedback time, and the feedback time is sent to the test client 230 .
  • the 8/6 interface of the testing device 210 may construct a plurality of data packets matching the preset rules, and continuously send the matching data packets to the distribution device 220 to be tested.
  • the distribution device 220 receives the first data packet sent by the test client 230
  • the distribution device 220 is configured with a preset rule, so the distribution device 220 will send the test device 210 to each second data packet according to the preset rule. every third packet of feedback.
  • the packets continuously captured by the 8/6 interface of the test device 210 include not only sent packets, but also received packets.
  • the preset filtering rules are used to obtain the received packets continuously captured by the 8/6 interface, and the timestamp of the first received packet captured by the interface is recorded.
  • the time stamp is determined as the feedback time of the shunt device, and the time stamp is sent to the test client 230 .
  • the distribution device 220 is configured to receive the first data packet carrying the preset rule sent by the test client 230 and the second data packet carrying the preset rule sent by the testing device 210, and generate a data packet based on the preset rule. For the matching third data packet of the second data packet, the third data packet is fed back to the testing device 210 .
  • the offloading device 220 does not receive the first data packet sent by the test client 230
  • the offloading device 220 does not receive the second data packet sent by the testing device 210;
  • the distribution device 220 is configured with a preset rule, and the packet sent by the test device 230 to the distribution device 220 through the 8/6 interface can hit the distribution device 220, so the distribution device 220 will Each third data packet fed back to each second data packet according to the preset rule will be sent to the testing device 210 .
  • the test client 230 is in communication connection with the distribution device 220 and the test device 210 based on Ethernet, for example, it can be connected by means of Ethernet, WiFi, and Bluetooth.
  • the test client 230 is set to send the first data packet carrying the preset rule to the flow distribution device 220, and continues to capture the interactive messages with the flow distribution device, and the captured first interactive message is reported.
  • the text is determined as the packet sending time of the first data packet; on the other hand, the test client 230 is configured to determine the rule effective time of the flow distribution device 220 based on the packet sending time of the first data packet and the feedback time.
  • the test client 230 sends the first data packet carrying the preset rule to the traffic distribution device 220 to be tested.
  • the test client 230 can capture the packet information locally.
  • the captured packet information includes a packet carrying a preset rule sent by the test client 230 to the distribution device 210 information, the distribution device 220 receives the feedback information of the preset rule, and the test client 230 receives the receipt information fed back by the distribution device 220 .
  • network packet analysis software such as wireshark may be used to open the captured interaction data packets with the distribution device 220 to obtain interaction packet information.
  • the interactive packet information is filtered by using a preset filtering rule, and the packet information sent by the test client 230 to the distribution device 220 is acquired.
  • feedback information and receipt information may be filtered according to the type of interactive message information, and only data packets carrying preset rules are acquired.
  • the embodiment of the present application does not limit the preset filtering method.
  • the preset filtering rules are used to obtain the received packets continuously captured by the 8/6 interface, and the timestamp of the first received packet captured by the interface is recorded.
  • the test client 230 receives the time stamp of the first received packet sent by the test device, and determines the time stamp as the feedback time of the distribution device 220 .
  • the test client 230 when the test client 230 receives the feedback time from the distribution device 220 and the time when it receives and sends the first data packet, it calculates the difference between the time stamps of the two data packets, and the difference is used as the rule effective time.
  • the feedback time of the flow distribution device 220 and the packet sending time of the first data packet are shown in FIG. 1 and FIG. 2 , respectively, and the time interval between the first timestamps in the two figures is calculated as the rule effective time.
  • users can measure the ability of the distribution device to process data packets quickly and accurately according to the length of time the rule takes effect.
  • the present application forms a test system by building a test operating environment, wherein the test system includes a test client, a shunt device to be tested, and a test device, and the test client communicates with the shunt device and the test device respectively based on Ethernet, and the shunt device and Test device wired connection.
  • the method provided by the present application sends a first data packet carrying a preset rule to a distribution device to be tested by a test client, and records the packet sending time of the first data packet; controls the test device to construct a second data packet matching the preset rule
  • the data packet is continuously sent to the offloading device; the feedback time of the offloading device sent by the test device is received, and the rule effective time of the offloading device is determined according to the packet sending time and the feedback time of the first data packet.
  • FIG. 5 is a schematic structural diagram of a performance test and analysis apparatus provided by an embodiment of the present application, and this embodiment can be applied to a situation in which a performance test is performed in a software test.
  • the structure of the image data processing device is as follows:
  • the first data packet sending module 310 is configured for the test client to send a first data packet carrying a preset rule to the traffic distribution device.
  • the first time recording module 320 is configured to record the packet sending time of the first data packet.
  • the second data packet sending module 330 is configured for the test client to control the test device to construct a second data packet that matches the preset rule, and continuously send the second data packet to the distribution device.
  • the second time recording module 340 is configured for the test client to receive the feedback time of the offloading device sent by the test device, wherein the feedback time is the test device's response to the offloading device according to preset rules. The receiving time of the third data packet fed back by the second data packet.
  • the third time determining module 350 is configured to determine the effective time of the rule of the traffic distribution device by the test client according to the packet sending time of the first data packet and the feedback time.
  • the first data packet sending module 310 includes:
  • the first data packet sending unit is configured to send, by the test client, a first data packet carrying a preset rule to the traffic distribution device through a preset connection protocol.
  • the preset connection protocol includes any one of the ssh protocol, the telnet protocol, and the self-contained protocol of the windows system.
  • the preset rule is a filtering rule.
  • the first time recording module 320 includes:
  • a message information grabbing unit configured for the test client to grab message information locally, and to filter the start-up of interactive messages with the flow distribution device;
  • the first time recording unit is set to record the time stamp of the captured first interactive packet information, which is determined as the packet sending time of the first data packet.
  • the second time recording module 340 includes:
  • the second time recording module is configured for the test client to control the test device to continuously capture packets, and to receive the time stamp of the first packet captured by the test device, which is determined as the feedback time of the traffic distribution device.
  • the third time determination module 350 includes:
  • the third time determining unit is configured to use the difference between the feedback time and the packet sending time of the first data packet as the rule effective time of the traffic distribution device.
  • the method provided by the present application sends a first data packet carrying a preset rule to a distribution device to be tested by a test client, and records the packet sending time of the first data packet; controls the test device to construct a second data packet matching the preset rule
  • the data packet is continuously sent to the offloading device; the feedback time of the offloading device sent by the test device is received, and the rule effective time of the offloading device is determined according to the packet sending time and the feedback time of the first data packet.
  • the multiple units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized;
  • the names of multiple functional units are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application.
  • FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 6 shows a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present application.
  • the electronic device 12 shown in FIG. 6 is only an example, and should not impose any limitations on the functions and scope of use of the embodiments of the present application.
  • the electronic device 12 takes the form of a general-purpose computing electronic device.
  • Components of electronic device 12 may include, but are not limited to, one or more processors or processing units 16 , system memory 28 , and a bus 18 connecting various system components including system memory 28 and processing unit 16 .
  • Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures.
  • these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, enhanced ISA bus, Video Electronics Standards Association (Video Electronics Standards Association) Association, VESA) local bus and Peripheral Component Interconnect (PCI) bus.
  • Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including both volatile and non-volatile media, removable and non-removable media.
  • System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and/or cache memory 32 .
  • Electronic device 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media.
  • storage system 34 may be configured to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard drive").
  • a magnetic disk drive may be provided for reading and writing to removable non-volatile magnetic disks (eg "floppy disks"), as well as removable non-volatile optical disks (eg Compact Disc Read) -Only Memory, CD-ROM), Digital Video Disc-Read Only Memory (DVD-ROM) or other optical media) read and write optical disc drives.
  • each drive may be connected to bus 18 through one or more data media interfaces.
  • System memory 28 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present application.
  • a program/utility 40 having a set (at least one) of program modules 42, which may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and programs Data, each or some combination of these examples may include an implementation of a network environment.
  • Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
  • the electronic device 12 may also communicate with one or more external devices 14 (eg, a keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with the electronic device 12, and/or with Any device (eg, network card, modem, etc.) that enables the electronic device 12 to communicate with one or more other computing devices. Such communication may take place through an input/output (I/O) interface 22 . Also, the electronic device 12 may communicate with one or more networks (such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) through a network adapter 20. As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18 .
  • LAN Local Area Network
  • WAN Wide Area Network
  • public network such as the Internet
  • the processing unit 16 executes a variety of functional applications and sample data acquisition by running the program stored in the system memory 28, such as implementing the steps of a method for testing the performance of a shunt device provided in any embodiment of the present invention, and the sample data acquisition method includes:
  • the test client sends the first data packet carrying the preset rule to the flow distribution device, and records the packet sending time of the first data packet;
  • the test client controls the test device to construct a second data packet that matches the preset rule, and continuously sends it to the distribution device;
  • the test client accepts the feedback time of the offloading device sent by the testing device, where the feedback time is the third data that the test device feeds back to the second data packet according to the preset rule to the offloading device packet reception time;
  • the test client determines the effective time of the rule of the traffic distribution device according to the packet sending time of the first data packet and the feedback time.
  • processor can also implement the technical solution of the sample data acquisition method provided by any embodiment of the present application.
  • This embodiment provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements, for example, the steps of a method for testing the performance of a shunt device provided in any embodiment of the present application, and sample data is obtained.
  • Methods include:
  • the test client sends the first data packet carrying the preset rule to the flow distribution device, and records the packet sending time of the first data packet;
  • the test client controls the test device to construct a second data packet that matches the preset rule, and continuously sends it to the distribution device;
  • the test client accepts the feedback time of the offloading device sent by the testing device, where the feedback time is the third data that the test device feeds back to the second data packet according to the preset rule to the offloading device packet reception time;
  • the test client determines the effective time of the rule of the traffic distribution device according to the packet sending time of the first data packet and the feedback time.
  • the computer storage medium of the embodiments of the present application may adopt any combination of one or more computer-readable media.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. More specific examples (a non-exhaustive list) of computer readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable Programmable Read Only Memory (EPROM or Flash), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a propagated data signal in baseband or as part of a carrier wave, with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • the program code embodied on the computer readable medium may be transmitted by any suitable medium, including but not limited to: wireless, wire, optical fiber cable, radio frequency (RF), etc., or any suitable combination of the above.
  • suitable medium including but not limited to: wireless, wire, optical fiber cable, radio frequency (RF), etc., or any suitable combination of the above.
  • Computer program code for carrying out the operations of the present application may be written in one or more programming languages, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional Procedural programming language - such as the "C" language or similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or wide area network (WAN), or may be connected to an external computer (eg, through the Internet using an Internet service provider) connect).
  • LAN local area network
  • WAN wide area network
  • Internet service provider an external computer
  • modules or multiple steps of the present application can be implemented by a general-purpose computing device, and they can be centralized on a single computing device or distributed on a network composed of multiple computing devices
  • they can be implemented in program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be separately made into a plurality of integrated circuit modules, or a plurality of them
  • the modules or steps are implemented as a single integrated circuit module.
  • the present application is not limited to any particular combination of hardware and software.

Abstract

Disclosed are a performance test method, system and apparatus for a distribution device, an electronic device, and a medium. The method comprises: the test client sends, to the distribution device, a first data packet carrying a preset rule, and records the packet transmission time of the first data packet; the test client controls the test device to construct second data packets matching the preset value and continuously send the constructed second data packets to the distribution device; the test client receives the feedback time of the distribution device sent by the test device, the feedback time being the receiving time when the test device receives a third data packet; the third data packet being a data packet fed back by the distribution device for the second data packets according to the preset rule; the test client determines the rule effective time of the distribution device according to the packet transmission time of the first data packet and the feedback time.

Description

分流设备性能测试方法、装置、系统、电子设备以及介质Shunt equipment performance test method, device, system, electronic equipment and medium
本申请要求在2020年10月29日提交中国专利局、申请号为202011186146.1的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application No. 202011186146.1 filed with the China Patent Office on October 29, 2020, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请实施例涉及数据通信领域,例如涉及一种分流设备性能测试方法、系统、装置、电子设备以及介质。The embodiments of the present application relate to the field of data communication, for example, to a method, system, device, electronic device, and medium for testing the performance of a shunt device.
背景技术Background technique
近年来,我国宽带网络及增值业务的应用越来越广泛。电信运营商、增值业务服务商、甚至多种公共安全机构,都需要在专网中部署多种分流设备。分流设备根据不同协议的端口号、互联网协议(Internet Protocol,IP)、特征码等条件过滤出用户所需要的数据。所以分流设备对数据处理有多种性能方面的要求,其中规则的生效时间是很重要的一个性能指标。In recent years, the application of broadband network and value-added services in my country has become more and more extensive. Telecom operators, value-added service providers, and even various public security agencies all need to deploy a variety of offloading devices in private networks. The offloading device filters out the data required by the user according to the port numbers of different protocols, Internet Protocol (IP), feature codes and other conditions. Therefore, the shunt device has various performance requirements for data processing, among which the effective time of the rule is a very important performance indicator.
相关技术中的规则生效时间测试方法对资源要求比较高,需要测试机、发包机、三层交换机、服务器,还需要特殊的富客户平台(Rich Client Platform,RCP)软件等。且对测试人员知识储备要求较高,需要会配置交换机,会使用RCP。测试环境搭建和测试操作也很复杂。往往要花费很多人力、资源和时间成本。The test method for the time when the rule takes effect in the related art has relatively high resource requirements, and requires a testing machine, a contract issuing machine, a three-layer switch, a server, and a special rich client platform (Rich Client Platform, RCP) software, etc. In addition, the knowledge reserve requirements for testers are high, and they need to be able to configure switches and use RCP. The test environment setup and test operations are also complicated. It often costs a lot of manpower, resources and time.
发明内容SUMMARY OF THE INVENTION
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this article. This summary is not intended to limit the scope of protection of the claims.
本申请提供一种分流设备性能测试方法、装置、系统、电子设备以及介质,提高了测试的灵活性以及测试效率。The present application provides a method, device, system, electronic device and medium for testing the performance of shunt equipment, which improve the flexibility and efficiency of testing.
第一方面,本申请实施例提供了一种分流设备性能测试方法,该方法应用于测试系统,其中,所述测试系统包括测试客户端、待测试的分流设备和测试设备,所述测试客户端基于以太网分别与所述分流设备和测试设备通信连接,所述分流设备和所述测试设备有线连接,该方法包括:In a first aspect, an embodiment of the present application provides a method for testing the performance of a shunt device, and the method is applied to a test system, wherein the test system includes a test client, a shunt device to be tested, and a test device, and the test client The shunt device and the test device are respectively communicated and connected based on the Ethernet, and the shunt device and the test device are wiredly connected, and the method includes:
所述测试客户端向所述分流设备发送携带预设规则的第一数据包,并记录所述第一数据包的发包时间;The test client sends the first data packet carrying the preset rule to the flow distribution device, and records the packet sending time of the first data packet;
所述测试客户端控制所述测试设备构造匹配所述预设规则的第二数据包,并持续发送至所述分流设备;The test client controls the test device to construct a second data packet that matches the preset rule, and continuously sends it to the distribution device;
所述测试客户端接受所述测试设备发送的分流设备的反馈时间,其中,所述反馈时间为所述测试设备对所述分流设备根据预设规则对所述第二数据包反馈的第三数据包的接收时间;The test client accepts the feedback time of the offloading device sent by the testing device, where the feedback time is the third data that the test device feeds back to the second data packet according to the preset rule to the offloading device packet reception time;
所述测试客户端根据所述第一数据包的发包时间以及所述反馈时间确定所述分流设备的规则生效时间。The test client determines the effective time of the rule of the traffic distribution device according to the packet sending time of the first data packet and the feedback time.
第二方面,本申请实施例还提供了一种分流设备性能测试装置,该装置包括:In a second aspect, an embodiment of the present application also provides a device for testing the performance of a shunt device, the device comprising:
第一时间记录模块,设置为所述测试客户端向所述分流设备发送携带预设规则的第一数据包,并记录所述第一数据包的发包时间;a first time recording module, configured for the test client to send a first data packet carrying a preset rule to the flow distribution device, and record the packet sending time of the first data packet;
第二数据包发送模块,设置为所述测试客户端控制所述测试设备构造匹配所述预设规则的第二数据包,并持续发送至所述分流设备;A second data packet sending module, configured for the test client to control the test device to construct a second data packet that matches the preset rule, and continuously send it to the distribution device;
第二时间记录模块,设置为所述测试客户端接收所述测试设备发送的分流设备的反馈时间,其中,所述反馈时间为所述测试设备对所述分流设备根据预设规则对所述第二数据包反馈的第三数据包的接收时间;The second time recording module is configured to receive the feedback time of the shunt device sent by the test device by the test client, wherein the feedback time is the test device's response to the shunt device according to preset rules for the first The receiving time of the third data packet fed back by the two data packets;
第三时间确定模块,设置为所述测试客户端根据所述第一数据包的发包时间以及所述反馈时间确定所述分流设备的规则生效时间。A third time determining module is configured to determine, by the test client, the effective time of the rule of the traffic distribution device according to the packet sending time of the first data packet and the feedback time.
第三方面,本申请实施例还提供了一种分流设备性能测试系统,该系统包括:In a third aspect, an embodiment of the present application also provides a performance testing system for a shunt device, the system comprising:
测试设备、待测试的分流设备和测试客户端,所述测试客户端基于以太网分别与所述分流设备和测试设备通信连接,所述分流设备和所述测试设备有线连接;其中,A test device, a shunt device to be tested, and a test client, the test client is respectively connected to the shunt device and the test device in communication based on the Ethernet, and the shunt device and the test device are wiredly connected; wherein,
所述测试设备在设备接口处构造匹配预设规则的第二数据包并持续发送至待测试的分流设备,并持续抓取所述分流设备反馈的数据报文,将抓取的第一个数据报文的时间戳确定为反馈时间,并将所述反馈时间发送至所述测试客户端;The test device constructs a second data packet matching the preset rule at the device interface and continuously sends it to the distribution device to be tested, and continues to capture the data packets fed back by the distribution device, and the captured first data packet The timestamp of the message is determined as the feedback time, and the feedback time is sent to the test client;
所述测试客户端向所述分流设备发送携带预设规则的第一数据包,并持续抓取与所述分流设备之间的交互报文,将抓取的第一个交互报文确定为第一数 据包的发包时间;The test client sends the first data packet carrying the preset rule to the flow distribution device, and continues to capture the interaction message with the flow distribution device, and determines the captured first interaction message as the first interaction message. A packet sending time;
所述分流设备接收测试客户端发送的携带预设规则的第一数据包以及接收所述测试设备发送的携带预设规则的第二数据包,并基于所述预设规则生成所述第二数据包的匹配的第三数据包,将所述第三数据包反馈至所述测试设备;The distribution device receives the first data packet carrying the preset rule sent by the test client and the second data packet carrying the preset rule sent by the testing device, and generates the second data based on the preset rule the matching third data packet of the packet, and feeding back the third data packet to the test equipment;
所述测试客户端基于所述第一数据包的发包时间和所述反馈时间确定所述分流设备的规则生效时间。The test client determines, based on the packet sending time of the first data packet and the feedback time, the rule effective time of the traffic distribution device.
第四方面,本申请实施例还提供了一种电子设备,所述电子设备包括:In a fourth aspect, an embodiment of the present application further provides an electronic device, the electronic device comprising:
一个或多个处理器;one or more processors;
存储装置,设置为存储一个或多个程序,storage means arranged to store one or more programs,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本申请任意实施例提供的分流设备性能测试方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the method for testing the performance of a shunt device provided in any embodiment of the present application.
第五方面,本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本申请任意实施例提供的分流设备性能测试方法。In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the method for testing the performance of a shunt device provided by any embodiment of the present application.
附图说明Description of drawings
图1是本申请实施例提供的一种分流设备性能测试方法的流程示意图;1 is a schematic flowchart of a method for testing the performance of a shunt device provided in an embodiment of the present application;
图2是本申请实施例提供的分流设备的反馈时间的示意图;2 is a schematic diagram of a feedback time of a shunt device provided by an embodiment of the present application;
图3是本申请实施例提供的第一数据包的发包时间的示意图;3 is a schematic diagram of a packet sending time of a first data packet provided by an embodiment of the present application;
图4是本申请实施例提供的一种分流设备性能测试系统的架构示意图;4 is a schematic diagram of the architecture of a system for testing the performance of a shunt device provided by an embodiment of the present application;
图5是本申请实施例提供的一种分流设备性能测试装置的结构示意图;5 is a schematic structural diagram of a device for testing the performance of a shunt equipment provided in an embodiment of the present application;
图6为本申请实施例提供的一种电子设备的结构示意图。FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all the structures related to the present application.
图1为本申请实施例提供的一种分流设备性能测试方法的流程图,本实施例提供的方法可适用于分流设备测试系统,例如可以是对分流设备的规则生效性能进行测试的情况。该方法可以由分流设备性能测试装置来执行,该装置可 以由软件和/或硬件的方式来实现,例如,可以配置于计算机设备中。FIG. 1 is a flowchart of a method for testing the performance of a shunt device provided by an embodiment of the present application. The method provided in this embodiment is applicable to a shunt device testing system, for example, in the case of testing the rule-validation performance of the shunt device. The method may be performed by a device for testing the performance of a shunt device, and the device may be implemented in software and/or hardware, for example, may be configured in a computer device.
本方法应用诸如图3所示的分流设备性能测试系统,该分流设备性能测试系统包括测试设备210、待测试的分流设备220和测试客户端230,基于测试设备210和测试客户端230对待测试的分流设备220进行测试,确定分流设备220的规则生效时间。本实施例中的分流设备性能测试系统结构简单,降低了设备成本。The present method applies a performance testing system for a shunt device such as shown in FIG. 3 . The performance test system for a shunt device includes a test device 210 , a shunt device to be tested 220 and a test client 230 . Based on the test device 210 and the test client 230 to be tested The triage device 220 performs a test to determine the effective time of the rule of the triage device 220 . The structure of the performance testing system of the shunt equipment in this embodiment is simple, and the equipment cost is reduced.
如图1所示,该方法包括以下步骤:As shown in Figure 1, the method includes the following steps:
S110、所述测试客户端向所述分流设备发送携带预设规则的第一数据包,并记录所述第一数据包的发包时间。S110. The test client sends a first data packet carrying a preset rule to the traffic distribution device, and records the packet sending time of the first data packet.
网络运营商等为了掌控网络流量流向、用户关心的网络应用等以保障网络安全和支持业务正常平稳运行,需要在分流设备上配置筛选规则对大量的网络数据进行过滤,从而获取需要的数据。在本申请实施例中,需要根据筛选规则生效的时间测试分流设备的性能。例如,需要测试客户端向待测试的分流设备发送携带有预设规则的第一数据包,并记录第一数据包的发包时间。例如,测试客户端可以是一种具有计算功能的智能终端设备,例如,可以是个人计算机(Personal Computer,PC),智能平板电脑等电子设备。例如,预设规则可以为筛选规则,例如获取源IP是1.1.1.1的ipv4报文;或者指示分流设备对数据包进行处理的其它规则,例如指示分流设备对数据包内容进行更新或者标记处理。例如,第一数据包是测试客户端给该分流设备下发规则的报文。例如,测试客户端可以通过预设连接协议向该分流设备发送携带预设规则的第一数据包,其中,预设连接协议包括安全壳协议(Secure Shell,ssh)协议、远程终端协议(telnet)协议以及windows系统自带协议中任一项。In order to control the flow of network traffic and network applications that users care about to ensure network security and support the normal and stable operation of services, network operators need to configure filtering rules on traffic distribution devices to filter a large amount of network data to obtain the required data. In this embodiment of the present application, the performance of the shunting device needs to be tested according to the effective time of the screening rule. For example, the test client needs to send the first data packet carrying the preset rule to the distribution device to be tested, and record the packet sending time of the first data packet. For example, the test client may be an intelligent terminal device with computing functions, for example, may be an electronic device such as a personal computer (Personal Computer, PC), a smart tablet computer, and the like. For example, the preset rule can be a screening rule, such as obtaining an ipv4 packet whose source IP is 1.1.1.1; or other rules that instruct the distribution device to process the data packet, such as instructing the distribution device to update or mark the content of the data packet. For example, the first data packet is a packet for the test client to deliver the rule to the traffic distribution device. For example, the test client can send a first data packet carrying a preset rule to the distribution device through a preset connection protocol, where the preset connection protocol includes a secure shell protocol (Secure Shell, ssh) protocol, a remote terminal protocol (telnet) Protocol and any one of the protocols that come with the Windows system.
为了记录第一数据包的发包时间,测试客户端可以在本地持续抓取报文信息,例如,抓取到的报文信息包括测试客户端向该分流设备发送的携带预设规则的报文信息,该分流设备接收到该预设规则的反馈信息,以及测试客户端收到该分流设备反馈的回执信息。例如,可以使用网络封包分析软件(例如wireshark)解析抓到的与该分流设备的交互数据包,获取交互报文信息。采用预设过滤规则对交互报文信息进行过滤,获取测试客户端发送至该分流设备的报文信息,即第一个交互报文信息。例如,可以根据交互报文信息的类型将反馈信息与回执信息进行过滤,只获取携带预设规则的数据包,当然本申请实施例对预设过滤方法不加以限制。记录获取到的携带预设规则的第一个数据包的发包时间戳, 并确定该时间戳为第一数据包的发包时间。In order to record the packet sending time of the first data packet, the test client can continuously capture the packet information locally. For example, the captured packet information includes the packet information carrying the preset rules sent by the test client to the distribution device. , the distribution device receives the feedback information of the preset rule, and the test client receives the receipt information fed back by the distribution device. For example, network packet analysis software (such as wireshark) may be used to parse the captured interactive data packets with the distribution device to obtain interactive packet information. The interactive packet information is filtered by using a preset filtering rule, and the packet information sent by the test client to the distribution device, that is, the first interactive packet information, is obtained. For example, feedback information and receipt information may be filtered according to the type of interactive message information, and only data packets carrying preset rules are acquired. Of course, the embodiment of the present application does not limit the preset filtering method. Record the obtained time stamp for sending the first data packet carrying the preset rule, and determine that the time stamp is the time when the first data packet is sent.
S120、所述测试客户端控制所述测试设备构造匹配所述预设规则的第二数据包,并持续发送至所述分流设备。S120. The test client controls the test device to construct a second data packet that matches the preset rule, and continuously sends the data packet to the distribution device.
在本申请实施例中,测试客户端通过向测试设备发送控制指令,控制该测试设备构造匹配预设规则的第二数据包,例如,可以采用测试设备的8/6接口构造多个匹配预设规则的数据包,并将匹配的数据包持续的发送至待测试的分流设备。例如,当分流设备未接收到测试客户端发送的第一数据包时,测试设备通过8/6接口发送给该分流设备的报文不会命中该分流设备,所以该分流设备不会发送反馈信息至测试设备,因此此时测试设备的8/6接口只有发送的报文,没有接收的报文。In this embodiment of the present application, the test client sends a control instruction to the test device to control the test device to construct a second data packet that matches the preset rule. For example, the 8/6 interface of the test device can be used to construct multiple matching presets The data packets of the rules are continuously sent to the distribution device to be tested. For example, when the offload device does not receive the first data packet sent by the test client, the packet sent by the test device to the offload device through the 8/6 interface will not hit the offload device, so the offload device will not send feedback information To the test equipment, so at this time, the 8/6 interface of the test equipment has only sent packets, but no received packets.
S130、所述测试客户端接受所述测试设备发送的分流设备的反馈时间,其中,所述反馈时间为所述测试设备对所述分流设备根据预设规则对所述第二数据包反馈的第三数据包的接收时间。S130. The test client accepts the feedback time of the offloading device sent by the testing device, where the feedback time is the second data packet that is fed back by the testing device to the offloading device according to a preset rule. Three packet reception time.
在本申请实施例中,当分流设备接收到测试客户端发送的第一数据包时,分流设备配置有预设规则,此时测试设备通过8/6接口发送给该分流设备的报文可以命中该分流设备,所以该分流设备将会向测试设备发送根据预设规则对每个第二数据包反馈的每个第三数据包。此时,测试设备的8/6接口持续抓取的报文中不仅有发送的报文,还有接收的报文。例如,采用预设过滤规则获取8/6接口持续抓取的接收报文,并记录该接口抓取的第一个接收报文的时间戳。例如,测试客户端接收测试设备发送的第一个接收报文的时间戳,并将该时间戳确定为该分流设备的反馈时间。In this embodiment of the present application, when the offloading device receives the first data packet sent by the test client, the offloading device is configured with a preset rule, and the packet sent by the test device to the offloading device through the 8/6 interface can hit the The distribution device, so the distribution device will send each third data packet fed back to each second data packet according to the preset rule to the test device. At this time, the 8/6 interface of the test device continuously captures not only sent packets, but also received packets. For example, the preset filtering rules are used to obtain the received packets continuously captured by the 8/6 interface, and the timestamp of the first received packet captured by the interface is recorded. For example, the test client receives the timestamp of the first received packet sent by the test device, and determines the timestamp as the feedback time of the offload device.
S140、所述测试客户端根据所述第一数据包的发包时间以及所述反馈时间确定所述分流设备的规则生效时间。S140. The test client determines the effective time of the rule of the traffic distribution device according to the packet sending time of the first data packet and the feedback time.
在本申请实施例中,为了确定规则生效的时间,将分流设备的反馈时间和第一数据包的发包时间的差值作为该分流设备的规则生效时间。例如,当测试客户端接收到分流设备的反馈时间和接收到与第一数据包的发包时间时,计算这两种数据包时间戳的差值,这个差值就作为分流设备的规则生效时间。示例性的,分流设备的反馈时间和第一数据包的发包时间分别如图2和图3所示,计算两张图中第一个时间戳的时间间隔,即为该分流设备的规则生效时间。例如,该分流设备的规则生效时间等于图2中第1个时间戳减去图3中第1个数据包时间,即规则生效时间=9.897s-6.401s=3.496s。例如,可以使用户根据规则生 效时间的长短衡量分流设备是否能够快速准确的处理数据包的能力。In this embodiment of the present application, in order to determine the effective time of the rule, the difference between the feedback time of the traffic distribution device and the packet sending time of the first data packet is used as the effective time of the rule of the traffic distribution device. For example, when the test client receives the feedback time of the offloading device and the time when it receives the first data packet, it calculates the difference between the time stamps of the two data packets, and this difference is used as the rule effective time of the offloading device. Exemplarily, the feedback time of the offloading device and the packet sending time of the first data packet are shown in FIG. 2 and FIG. 3 respectively, and the time interval between the first timestamps in the two figures is calculated as the rule effective time of the offloading device. For example, the rule effective time of the traffic distribution device is equal to the first time stamp in FIG. 2 minus the first data packet time in FIG. 3 , that is, the rule effective time=9.897s-6.401s=3.496s. For example, users can measure whether the distribution device can process data packets quickly and accurately according to the effective time of the rule.
本申请提供的方法通过测试客户端向待测试的分流设备发送携带预设规则的第一数据包,并记录所述第一数据包的发包时间;控制测试设备构造匹配该预设规则的第二数据包,并持续发送至该分流设备;接收测试设备发送的分流设备的反馈时间,并且根据第一数据包的发包时间以及反馈时间确定该分流设备的规则生效时间。测试环境搭建和测试操作简单,对测试人员没有较高的知识储备要求。使测试资源缺乏或时间紧急的情况下,也能够对分流设备规则生效时间进行测试,提高了测试的灵活性以及测试效率。The method provided by the present application sends a first data packet carrying a preset rule to a distribution device to be tested by a test client, and records the packet sending time of the first data packet; controls the test device to construct a second data packet matching the preset rule The data packet is continuously sent to the offloading device; the feedback time of the offloading device sent by the test device is received, and the rule effective time of the offloading device is determined according to the packet sending time and the feedback time of the first data packet. The test environment construction and test operation are simple, and there is no high knowledge reserve requirement for testers. In the case of lack of test resources or urgent time, it is also possible to test the effective time of the rules of the shunt equipment, which improves the flexibility of the test and the test efficiency.
图3为本申请实施例提供的一种分流设备性能测试系统的结构示意图,本实施例提供的方法可适用于对分流设备的规则生效性能进行测试的情况。该系统可以由软件和/或硬件的方式来实现,例如,可以配置于计算机设备中。如图3所示,该系统包括:测试设备210、待测试的分流设备220和测试客户端230,其中:FIG. 3 is a schematic structural diagram of a system for testing the performance of a shunt device according to an embodiment of the present application, and the method provided in this embodiment can be applied to a situation in which the rule-validation performance of the shunt device is tested. The system may be implemented in software and/or hardware, eg, may be configured in a computer device. As shown in FIG. 3, the system includes: a test device 210, a shunt device to be tested 220 and a test client 230, wherein:
所述测试设备210和所述分流设备220有线连接,例如,可以通过光纤或者双纤等方式连接。例如,测试设备210设置为在设备接口处构造匹配预设规则的第二数据包并持续发送至待测试的分流设备220,并持续抓取所述分流设备220反馈的数据报文,将抓取的第一个数据报文的时间戳确定为反馈时间,并将所述反馈时间发送至所述测试客户端230。The test equipment 210 and the shunt equipment 220 are connected by wire, for example, they may be connected by means of optical fibers or dual fibers. For example, the testing device 210 is configured to construct a second data packet that matches the preset rule at the device interface and continuously send it to the distribution device 220 to be tested, and continuously capture the data packets fed back by the distribution device 220, and capture The time stamp of the first data packet of , is determined as the feedback time, and the feedback time is sent to the test client 230 .
例如,测试设备210的8/6接口可以构造多个匹配预设规则的数据包,并将匹配的数据包持续的发送至待测试的分流设备220。当分流设备220接收到测试客户端230发送的第一数据包时,分流设备220配置有预设规则,所以该分流设备220将会向测试设备210发送根据预设规则对每个第二数据包反馈的每个第三数据包。此时,测试设备210的8/6接口持续抓取的报文中不仅有发送的报文,还有接收的报文。例如,采用预设过滤规则获取8/6接口持续抓取的接收报文,并记录该接口抓取的第一个接收报文的时间戳。例如,将该时间戳确定为该分流设备的反馈时间,并将该时间戳发送至测试客户端230。For example, the 8/6 interface of the testing device 210 may construct a plurality of data packets matching the preset rules, and continuously send the matching data packets to the distribution device 220 to be tested. When the distribution device 220 receives the first data packet sent by the test client 230, the distribution device 220 is configured with a preset rule, so the distribution device 220 will send the test device 210 to each second data packet according to the preset rule. every third packet of feedback. At this time, the packets continuously captured by the 8/6 interface of the test device 210 include not only sent packets, but also received packets. For example, the preset filtering rules are used to obtain the received packets continuously captured by the 8/6 interface, and the timestamp of the first received packet captured by the interface is recorded. For example, the time stamp is determined as the feedback time of the shunt device, and the time stamp is sent to the test client 230 .
所述分流设备220设置为接收测试客户端230发送的携带预设规则的第一数据包以及接收所述测试设备210发送的携带预设规则的第二数据包,并基于所述预设规则生成所述第二数据包的匹配的第三数据包,将所述第三数据包反馈至所述测试设备210。The distribution device 220 is configured to receive the first data packet carrying the preset rule sent by the test client 230 and the second data packet carrying the preset rule sent by the testing device 210, and generate a data packet based on the preset rule. For the matching third data packet of the second data packet, the third data packet is fed back to the testing device 210 .
例如,当分流设备220未接收到测试客户端230发送的第一数据包时,所 以该分流设备220未接收到测试设备210发送的第二数据包;例如,当分流设备220接收到测试客户端230发送的第一数据包时,分流设备220配置有预设规则,此时测试设备230通过8/6接口发送给该分流设备220的报文可以命中该分流设备220,所以该分流设备220将会向测试设备210发送根据预设规则对每个第二数据包反馈的每个第三数据包。For example, when the offloading device 220 does not receive the first data packet sent by the test client 230, the offloading device 220 does not receive the second data packet sent by the testing device 210; for example, when the offloading device 220 receives the test client 230 sends the first data packet, the distribution device 220 is configured with a preset rule, and the packet sent by the test device 230 to the distribution device 220 through the 8/6 interface can hit the distribution device 220, so the distribution device 220 will Each third data packet fed back to each second data packet according to the preset rule will be sent to the testing device 210 .
所述测试客户端230基于以太网分别与所述分流设备220和所述测试设备210通信连接,例如,可以通过以太网、WiFi以及蓝牙等方式连接。一方面测试客户端230设置为向所述分流设备220发送携带预设规则的第一数据包,并持续抓取与所述分流设备之间的交互报文,将抓取的第一个交互报文确定为第一数据包的发包时间;另一方面测试客户端230设置为基于所述第一数据包的发包时间和所述反馈时间确定所述分流设备220的规则生效时间。The test client 230 is in communication connection with the distribution device 220 and the test device 210 based on Ethernet, for example, it can be connected by means of Ethernet, WiFi, and Bluetooth. On the one hand, the test client 230 is set to send the first data packet carrying the preset rule to the flow distribution device 220, and continues to capture the interactive messages with the flow distribution device, and the captured first interactive message is reported. The text is determined as the packet sending time of the first data packet; on the other hand, the test client 230 is configured to determine the rule effective time of the flow distribution device 220 based on the packet sending time of the first data packet and the feedback time.
例如,测试客户端230向待测试的分流设备220发送携带有预设规则的第一数据包。为了记录第一数据的发包时间,测试客户端230可以在本地抓取报文信息,例如,抓取到的报文信息包括测试客户端230向该分流设备210发送的携带预设规则的报文信息,该分流设备220接收到该预设规则的反馈信息,以及测试客户端230收到该分流设备220反馈的回执信息。例如,可以使用网络封包分析软件(例如wireshark)打开抓到的与该分流设备220的交互数据包,获取交互报文信息。采用预设过滤规则对交互报文信息进行过滤,获取测试客户端230发送至该分流设备220的报文信息。例如,可以根据交互报文信息的类型将反馈信息与回执信息进行过滤,只获取携带预设规则的数据包,当然本申请实施例对预设过滤方法不加以限制。记录获取到的携带预设规则的第一个数据包的发包时间戳,并确定该时间戳为第一数据包的发包时间。采用预设过滤规则获取8/6接口持续抓取的接收报文,并记录该接口抓取的第一个接收报文的时间戳。例如,测试客户端230接收测试设备发送的第一个接收报文的时间戳,并将该时间戳确定为该分流设备220的反馈时间。For example, the test client 230 sends the first data packet carrying the preset rule to the traffic distribution device 220 to be tested. In order to record the packet sending time of the first data, the test client 230 can capture the packet information locally. For example, the captured packet information includes a packet carrying a preset rule sent by the test client 230 to the distribution device 210 information, the distribution device 220 receives the feedback information of the preset rule, and the test client 230 receives the receipt information fed back by the distribution device 220 . For example, network packet analysis software (such as wireshark) may be used to open the captured interaction data packets with the distribution device 220 to obtain interaction packet information. The interactive packet information is filtered by using a preset filtering rule, and the packet information sent by the test client 230 to the distribution device 220 is acquired. For example, feedback information and receipt information may be filtered according to the type of interactive message information, and only data packets carrying preset rules are acquired. Of course, the embodiment of the present application does not limit the preset filtering method. Record the obtained time stamp of sending the first data packet carrying the preset rule, and determine that the time stamp is the time when the first data packet is sent. The preset filtering rules are used to obtain the received packets continuously captured by the 8/6 interface, and the timestamp of the first received packet captured by the interface is recorded. For example, the test client 230 receives the time stamp of the first received packet sent by the test device, and determines the time stamp as the feedback time of the distribution device 220 .
例如,当测试客户端230接收到分流设备220的反馈时间和接收到与第一数据包的发包时间,计算这两种数据包时间戳的差值,这个差值就作为规则生效时间。示例性的,分流设备220的反馈时间和第一数据包的发包时间分别如图1和图2所示,计算两张图中第一个时间戳的时间间隔,即为规则生效时间。例如,规则生效时间等于第1个数据包时间减去第2个数据包时间,即规则生效时间=9.897s-6.401s=3.496s。例如,可以使用户根据规则生效时间的长短 衡量分流设备是否能够快速准确的处理数据包的能力。For example, when the test client 230 receives the feedback time from the distribution device 220 and the time when it receives and sends the first data packet, it calculates the difference between the time stamps of the two data packets, and the difference is used as the rule effective time. Exemplarily, the feedback time of the flow distribution device 220 and the packet sending time of the first data packet are shown in FIG. 1 and FIG. 2 , respectively, and the time interval between the first timestamps in the two figures is calculated as the rule effective time. For example, the rule effective time is equal to the first data packet time minus the second data packet time, that is, the rule effective time=9.897s-6.401s=3.496s. For example, users can measure the ability of the distribution device to process data packets quickly and accurately according to the length of time the rule takes effect.
本申请通过搭建测试运行环境形成测试系统,其中,测试系统包括测试客户端、待测试的分流设备和测试设备,测试客户端基于以太网分别与所述分流设备和测试设备通信连接,分流设备和测试设备有线连接。本申请提供的方法通过测试客户端向待测试的分流设备发送携带预设规则的第一数据包,并记录所述第一数据包的发包时间;控制测试设备构造匹配该预设规则的第二数据包,并持续发送至该分流设备;接收测试设备发送的分流设备的反馈时间,并且根据第一数据包的发包时间以及反馈时间确定该分流设备的规则生效时间。测试环境搭建和测试操作简单,对测试人员没有较高的知识储备要求。使测试资源缺乏或时间紧急的情况下,也能够对分流设备规则生效时间进行测试,提高了测试的灵活性以及测试效率。The present application forms a test system by building a test operating environment, wherein the test system includes a test client, a shunt device to be tested, and a test device, and the test client communicates with the shunt device and the test device respectively based on Ethernet, and the shunt device and Test device wired connection. The method provided by the present application sends a first data packet carrying a preset rule to a distribution device to be tested by a test client, and records the packet sending time of the first data packet; controls the test device to construct a second data packet matching the preset rule The data packet is continuously sent to the offloading device; the feedback time of the offloading device sent by the test device is received, and the rule effective time of the offloading device is determined according to the packet sending time and the feedback time of the first data packet. The test environment construction and test operation are simple, and there is no high knowledge reserve requirement for testers. In the case of lack of test resources or urgent time, it is also possible to test the effective time of the rules of the shunt equipment, which improves the flexibility of the test and the test efficiency.
以下是本申请实施例提供的性能测试分析装置的实施例,该装置与上述多个实施例的性能测试分析方法属于同一个申请构思,在性能测试分析装置的实施例中未详尽描述的细节内容,可以参考上述性能测试分析方法的实施例。The following is an example of the performance test and analysis device provided by the embodiments of the present application, which belongs to the same application concept as the performance test and analysis methods of the above-mentioned multiple embodiments, and the details are not described in detail in the embodiments of the performance test and analysis device. , you can refer to the above-mentioned embodiment of the performance test analysis method.
图5为本申请实施例提供的性能测试分析装置的结构示意图,本实施例可适用于在软件测试中进行性能测试的情况。该图像数据的处理装置的结构如下:FIG. 5 is a schematic structural diagram of a performance test and analysis apparatus provided by an embodiment of the present application, and this embodiment can be applied to a situation in which a performance test is performed in a software test. The structure of the image data processing device is as follows:
第一数据包发送模块310,设置为所述测试客户端向所述分流设备发送携带预设规则的第一数据包。The first data packet sending module 310 is configured for the test client to send a first data packet carrying a preset rule to the traffic distribution device.
第一时间记录模块320,设置为记录所述第一数据包的发包时间。The first time recording module 320 is configured to record the packet sending time of the first data packet.
第二数据包发送模块330,设置为所述测试客户端控制所述测试设备构造匹配所述预设规则的第二数据包,并持续发送至所述分流设备。The second data packet sending module 330 is configured for the test client to control the test device to construct a second data packet that matches the preset rule, and continuously send the second data packet to the distribution device.
第二时间记录模块340,设置为所述测试客户端接收所述测试设备发送的分流设备的反馈时间,其中,所述反馈时间为所述测试设备对所述分流设备根据预设规则对所述第二数据包反馈的第三数据包的接收时间。The second time recording module 340 is configured for the test client to receive the feedback time of the offloading device sent by the test device, wherein the feedback time is the test device's response to the offloading device according to preset rules. The receiving time of the third data packet fed back by the second data packet.
第三时间确定模块350,设置为所述测试客户端根据所述第一数据包的发包时间以及所述反馈时间确定所述分流设备的规则生效时间。The third time determining module 350 is configured to determine the effective time of the rule of the traffic distribution device by the test client according to the packet sending time of the first data packet and the feedback time.
例如,所述第一数据包发送模块310,包括:For example, the first data packet sending module 310 includes:
第一数据包发送单元,设置为所述测试客户端通过预设连接协议向所述分流设备发送携带预设规则的第一数据包。The first data packet sending unit is configured to send, by the test client, a first data packet carrying a preset rule to the traffic distribution device through a preset connection protocol.
例如,所述预设连接协议包括ssh协议、telnet协议以及windows系统自带协议中任一项。For example, the preset connection protocol includes any one of the ssh protocol, the telnet protocol, and the self-contained protocol of the windows system.
例如,所述预设规则为过滤规则。For example, the preset rule is a filtering rule.
例如,所述第一时间记录模块320,包括:For example, the first time recording module 320 includes:
报文信息抓取单元,设置为所述测试客户端在本地抓取报文信息,并对与所述分流设备的交互报文的启动过滤;A message information grabbing unit, configured for the test client to grab message information locally, and to filter the start-up of interactive messages with the flow distribution device;
记第一时间记录单元,设置为录抓取的第一个交互报文信息的时间戳,确定为所述第一数据包的发包时间。The first time recording unit is set to record the time stamp of the captured first interactive packet information, which is determined as the packet sending time of the first data packet.
例如,所述第二时间记录模块340,包括:For example, the second time recording module 340 includes:
第二时间记录模块,设置为所述测试客户端控制所述测试设备持续抓包,接收所述测试设备抓取的第一个报文的时间戳,确定为所述分流设备的反馈时间。The second time recording module is configured for the test client to control the test device to continuously capture packets, and to receive the time stamp of the first packet captured by the test device, which is determined as the feedback time of the traffic distribution device.
例如,所述第三时间确定模块350,包括:For example, the third time determination module 350 includes:
第三时间确定单元,设置为将所述反馈时间和第一数据包的发包时间的差值作为所述分流设备的规则生效时间。The third time determining unit is configured to use the difference between the feedback time and the packet sending time of the first data packet as the rule effective time of the traffic distribution device.
本申请提供的方法通过测试客户端向待测试的分流设备发送携带预设规则的第一数据包,并记录所述第一数据包的发包时间;控制测试设备构造匹配该预设规则的第二数据包,并持续发送至该分流设备;接收测试设备发送的分流设备的反馈时间,并且根据第一数据包的发包时间以及反馈时间确定该分流设备的规则生效时间。测试环境搭建和测试操作简单,对测试人员没有较高的知识储备要求。使测试资源缺乏或时间紧急的情况下,也能够对分流设备规则生效时间进行测试,提高了测试的灵活性以及测试效率。The method provided by the present application sends a first data packet carrying a preset rule to a distribution device to be tested by a test client, and records the packet sending time of the first data packet; controls the test device to construct a second data packet matching the preset rule The data packet is continuously sent to the offloading device; the feedback time of the offloading device sent by the test device is received, and the rule effective time of the offloading device is determined according to the packet sending time and the feedback time of the first data packet. The test environment construction and test operation are simple, and there is no high knowledge reserve requirement for testers. In the case of lack of test resources or urgent time, it is also possible to test the effective time of the rules of the shunt equipment, which improves the flexibility of the test and the test efficiency.
值得注意的是,上述图像数据的处理装置的实施例中,所包括的多个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,多个功能单元的名称也只是为了便于相互区分,并不用于限制本申请的保护范围。It is worth noting that in the above-mentioned embodiment of the image data processing apparatus, the multiple units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; In addition, the names of multiple functional units are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application.
图6为本申请实施例提供的一种电子设备的结构示意图。图6示出了适于用来实现本申请实施方式的示例性电子设备12的框图。图6显示的电子设备12仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. FIG. 6 shows a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present application. The electronic device 12 shown in FIG. 6 is only an example, and should not impose any limitations on the functions and scope of use of the embodiments of the present application.
如图6所示,电子设备12以通用计算电子设备的形式表现。电子设备12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储器28,连接不同系统组件(包括系统存储器28和处理单元16)的总线18。As shown in FIG. 6, the electronic device 12 takes the form of a general-purpose computing electronic device. Components of electronic device 12 may include, but are not limited to, one or more processors or processing units 16 , system memory 28 , and a bus 18 connecting various system components including system memory 28 and processing unit 16 .
总线18表示几类总线结构中的一种或多种,包括存储器总线或者存储器控 制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(Industry Standard Architecture,ISA)总线,微通道体系结构(Micro Channel Architecture,MCA)总线,增强型ISA总线、视频电子标准协会(Video Electronics Standards Association,VESA)局域总线以及外围组件互连(Peripheral Component Interconnect,PCI)总线。 Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, enhanced ISA bus, Video Electronics Standards Association (Video Electronics Standards Association) Association, VESA) local bus and Peripheral Component Interconnect (PCI) bus.
电子设备12典型地包括多种计算机系统可读介质。这些介质可以是任何能够被电子设备12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。 Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including both volatile and non-volatile media, removable and non-removable media.
系统存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(Random Access Memory,RAM)30和/或高速缓存存储器32。电子设备12可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以设置为读写不可移动的、非易失性磁介质(图6未显示,通常称为“硬盘驱动器”)。尽管图6中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如只读光盘(Compact Disc Read-Only Memory,CD-ROM),数字通用光盘只读存储器(Digital Video Disc-Read Only Memory,DVD-ROM)或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。系统存储器28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本申请多个实施例的功能。 System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and/or cache memory 32 . Electronic device 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media. For example only, storage system 34 may be configured to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard drive"). Although not shown in Figure 6, a magnetic disk drive may be provided for reading and writing to removable non-volatile magnetic disks (eg "floppy disks"), as well as removable non-volatile optical disks (eg Compact Disc Read) -Only Memory, CD-ROM), Digital Video Disc-Read Only Memory (DVD-ROM) or other optical media) read and write optical disc drives. In these cases, each drive may be connected to bus 18 through one or more data media interfaces. System memory 28 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present application.
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如系统存储器28中,这样的程序模块42包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本申请所描述的实施例中的功能和/或方法。A program/utility 40 having a set (at least one) of program modules 42, which may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and programs Data, each or some combination of these examples may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
电子设备12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该电子设备12交互的设备通信,和/或与使得该电子设备12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(Input/Output,I/O)接口22进行。并且,电子设备12还可以通过网络适配器 20与一个或者多个网络(例如局域网(Local Area Network,LAN),广域网(Wide Area Network,WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器20通过总线18与电子设备12的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备12使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、磁盘阵列(Redundant Arrays of Independent Disks,RAID)系统、磁带驱动器以及数据备份存储系统等。The electronic device 12 may also communicate with one or more external devices 14 (eg, a keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with the electronic device 12, and/or with Any device (eg, network card, modem, etc.) that enables the electronic device 12 to communicate with one or more other computing devices. Such communication may take place through an input/output (I/O) interface 22 . Also, the electronic device 12 may communicate with one or more networks (such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) through a network adapter 20. As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18 . It should be understood that, although not shown, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.
处理单元16通过运行存储在系统存储器28中的程序,从而执行多种功能应用以及样本数据获取,例如实现本明任意实施例所提供的一种分流设备性能测试方法步骤,样本数据获取方法包括:The processing unit 16 executes a variety of functional applications and sample data acquisition by running the program stored in the system memory 28, such as implementing the steps of a method for testing the performance of a shunt device provided in any embodiment of the present invention, and the sample data acquisition method includes:
所述测试客户端向所述分流设备发送携带预设规则的第一数据包,并记录所述第一数据包的发包时间;The test client sends the first data packet carrying the preset rule to the flow distribution device, and records the packet sending time of the first data packet;
所述测试客户端控制所述测试设备构造匹配所述预设规则的第二数据包,并持续发送至所述分流设备;The test client controls the test device to construct a second data packet that matches the preset rule, and continuously sends it to the distribution device;
所述测试客户端接受所述测试设备发送的分流设备的反馈时间,其中,所述反馈时间为所述测试设备对所述分流设备根据预设规则对所述第二数据包反馈的第三数据包的接收时间;The test client accepts the feedback time of the offloading device sent by the testing device, where the feedback time is the third data that the test device feeds back to the second data packet according to the preset rule to the offloading device packet reception time;
所述测试客户端根据所述第一数据包的发包时间以及所述反馈时间确定所述分流设备的规则生效时间。The test client determines the effective time of the rule of the traffic distribution device according to the packet sending time of the first data packet and the feedback time.
当然,本领域技术人员可以理解,处理器还可以实现本申请任意实施例所提供的样本数据获取方法的技术方案。Of course, those skilled in the art can understand that the processor can also implement the technical solution of the sample data acquisition method provided by any embodiment of the present application.
本实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现例如实现本申请任意实施例所提供的一种分流设备性能测试方法步骤,样本数据获取方法包括:This embodiment provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements, for example, the steps of a method for testing the performance of a shunt device provided in any embodiment of the present application, and sample data is obtained. Methods include:
所述测试客户端向所述分流设备发送携带预设规则的第一数据包,并记录所述第一数据包的发包时间;The test client sends the first data packet carrying the preset rule to the flow distribution device, and records the packet sending time of the first data packet;
所述测试客户端控制所述测试设备构造匹配所述预设规则的第二数据包,并持续发送至所述分流设备;The test client controls the test device to construct a second data packet that matches the preset rule, and continuously sends it to the distribution device;
所述测试客户端接受所述测试设备发送的分流设备的反馈时间,其中,所述反馈时间为所述测试设备对所述分流设备根据预设规则对所述第二数据包反馈的第三数据包的接收时间;The test client accepts the feedback time of the offloading device sent by the testing device, where the feedback time is the third data that the test device feeds back to the second data packet according to the preset rule to the offloading device packet reception time;
所述测试客户端根据所述第一数据包的发包时间以及所述反馈时间确定所 述分流设备的规则生效时间。The test client determines the effective time of the rule of the traffic distribution device according to the packet sending time of the first data packet and the feedback time.
本申请实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是但不限于:电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The computer storage medium of the embodiments of the present application may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. More specific examples (a non-exhaustive list) of computer readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable Programmable Read Only Memory (EPROM or Flash), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer-readable signal medium may include a propagated data signal in baseband or as part of a carrier wave, with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、射频(Radio Frequency,RF)等等,或者上述的任意合适的组合。The program code embodied on the computer readable medium may be transmitted by any suitable medium, including but not limited to: wireless, wire, optical fiber cable, radio frequency (RF), etc., or any suitable combination of the above.
可以以一种或多种程序设计语言或其组合来编写用于执行本申请操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言,诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out the operations of the present application may be written in one or more programming languages, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional Procedural programming language - such as the "C" language or similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or wide area network (WAN), or may be connected to an external computer (eg, through the Internet using an Internet service provider) connect).
本领域普通技术人员应该明白,上述的本申请的多个模块或多个步骤可以用通用的计算装置来实现,它们可以集中在单个计算装置上,或者分布在多个 计算装置所组成的网络上,例如,他们可以用计算机装置可执行的程序代码来实现,从而可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成多个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件的结合。Those of ordinary skill in the art should understand that the above-mentioned multiple modules or multiple steps of the present application can be implemented by a general-purpose computing device, and they can be centralized on a single computing device or distributed on a network composed of multiple computing devices For example, they can be implemented in program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be separately made into a plurality of integrated circuit modules, or a plurality of them The modules or steps are implemented as a single integrated circuit module. As such, the present application is not limited to any particular combination of hardware and software.

Claims (10)

  1. 一种分流设备性能测试方法,应用于测试系统,其中,所述测试系统包括测试客户端、待测试的分流设备和测试设备,所述测试客户端基于以太网分别与所述分流设备和测试设备通信连接,所述分流设备和所述测试设备有线连接,该方法包括:A method for testing the performance of a shunt device, which is applied to a test system, wherein the test system includes a test client, a shunt device to be tested, and a test device, and the test client is connected to the shunt device and the test device respectively based on Ethernet. Communication connection, the shunt device and the test device are wiredly connected, and the method includes:
    所述测试客户端向所述分流设备发送携带预设规则的第一数据包,并记录所述第一数据包的发包时间;The test client sends the first data packet carrying the preset rule to the flow distribution device, and records the packet sending time of the first data packet;
    所述测试客户端控制所述测试设备构造匹配所述预设规则的第二数据包,并持续发送至所述分流设备;The test client controls the test device to construct a second data packet that matches the preset rule, and continuously sends it to the distribution device;
    所述测试客户端接收所述测试设备发送的分流设备的反馈时间,其中,所述反馈时间为所述测试设备接收第三数据包的接收时间,所述第三数据包为所述分流设备根据预设规则对所述第二数据包反馈的数据包;The test client receives the feedback time of the offloading device sent by the testing device, wherein the feedback time is the receiving time when the test device receives a third data packet, and the third data packet is the The data packet fed back by the preset rule to the second data packet;
    所述测试客户端根据所述第一数据包的发包时间以及所述反馈时间确定所述分流设备的规则生效时间。The test client determines the effective time of the rule of the traffic distribution device according to the packet sending time of the first data packet and the feedback time.
  2. 根据权利要求1所述的方法,其中,所述测试客户端向所述分流设备发送携带预设规则的第一数据包,包括:The method according to claim 1, wherein the test client sends a first data packet carrying a preset rule to the traffic distribution device, comprising:
    所述测试客户端通过预设连接协议向所述分流设备发送携带预设规则的第一数据包,其中预设连接协议包括安全壳ssh协议、远程终端telnet协议以及windows系统自带协议中任一项。The test client sends a first data packet carrying a preset rule to the distribution device through a preset connection protocol, wherein the preset connection protocol includes any one of the secure shell ssh protocol, the remote terminal telnet protocol, and the Windows system's own protocol item.
  3. 根据权利要求1所述的方法,其中,所述预设规则为过滤规则。The method according to claim 1, wherein the preset rule is a filtering rule.
  4. 根据权利要求1所述的方法,其中,所述记录所述第一数据包的发包时间,包括:The method according to claim 1, wherein the recording the packet sending time of the first data packet comprises:
    所述测试客户端在本地抓取报文信息,并对与所述分流设备的交互报文的启动过滤;The test client locally grabs the message information, and starts filtering the interaction message with the flow distribution device;
    所述测试客户端记录抓取的第一个交互报文信息的时间戳,将抓取的第一个交互报文信息的时间戳确定为所述第一数据包的发包时间。The test client records the time stamp of the captured first interactive message information, and determines the time stamp of the captured first interactive message information as the packet sending time of the first data packet.
  5. 根据权利要求1所述的方法,其中,所述测试客户端接受所述测试设备发送的分流设备的反馈时间包括:The method according to claim 1, wherein the test client accepts the feedback time of the shunt device sent by the test device comprising:
    所述测试客户端控制所述测试设备持续抓包,接收所述测试设备抓取的第一个报文的时间戳,并将抓取的第一个报文的时间戳确定为所述分流设备的反馈时间。The test client controls the test device to continuously capture packets, receives the timestamp of the first packet captured by the test device, and determines the time stamp of the first packet captured as the distribution device feedback time.
  6. 根据权利要求1所述的方法,其中,所述测试客户端根据所述第一数据包的发包时间以及所述反馈时间确定所述分流设备的规则生效时间,包括:The method according to claim 1, wherein the test client determines the effective time of the rule of the traffic distribution device according to the packet sending time of the first data packet and the feedback time, comprising:
    将所述反馈时间和第一数据包的发包时间的差值作为所述分流设备的规则生效时间。The difference between the feedback time and the packet sending time of the first data packet is used as the rule effective time of the traffic distribution device.
  7. 一种分流设备性能测试装置,包括:A device for testing the performance of shunt equipment, comprising:
    第一时间记录模块,设置为所述测试客户端向所述分流设备发送携带预设规则的第一数据包,并记录所述第一数据包的发包时间;a first time recording module, configured for the test client to send a first data packet carrying a preset rule to the flow distribution device, and record the packet sending time of the first data packet;
    第二数据包发送模块,设置为所述测试客户端控制所述测试设备构造匹配所述预设规则的第二数据包,并持续发送至所述分流设备;A second data packet sending module, configured for the test client to control the test device to construct a second data packet that matches the preset rule, and continuously send it to the distribution device;
    第二时间记录模块,设置为所述测试客户端接收所述测试设备发送的分流设备的反馈时间,其中,所述反馈时间为所述测试设备接收第三数据包的接收时间,所述第三数据包为所述分流设备根据预设规则对所述第二数据包反馈的数据包;The second time recording module is configured to receive the feedback time of the shunt device sent by the test device by the test client, wherein the feedback time is the reception time of the third data packet received by the test device, and the third data packet is received by the test device. The data packet is the data packet fed back by the distribution device to the second data packet according to a preset rule;
    第三时间确定模块,设置为所述测试客户端根据所述第一数据包的发包时间以及所述反馈时间确定所述分流设备的规则生效时间。A third time determining module is configured to determine, by the test client, the effective time of the rule of the traffic distribution device according to the packet sending time of the first data packet and the feedback time.
  8. 一种分流设备性能测试系统,包括测试设备、待测试的分流设备和测试客户端,所述测试客户端基于以太网分别与所述分流设备和测试设备通信连接,所述分流设备和所述测试设备有线连接;其中,A performance testing system for a shunt device, comprising a test device, a shunt device to be tested, and a test client, wherein the test client is respectively connected to the shunt device and the test device in communication based on Ethernet, and the shunt device and the test Device wired connection; where,
    所述测试设备在设备接口处构造匹配预设规则的第二数据包并持续发送至待测试的分流设备,并持续抓取所述分流设备反馈的数据报文,将抓取的第一个数据报文的时间戳确定为反馈时间,并将所述反馈时间发送至所述测试客户端;The test device constructs a second data packet matching the preset rule at the device interface and continuously sends it to the distribution device to be tested, and continues to capture the data packets fed back by the distribution device, and the captured first data packet The timestamp of the message is determined as the feedback time, and the feedback time is sent to the test client;
    所述测试客户端向所述分流设备发送携带预设规则的第一数据包,并持续抓取与所述分流设备之间的交互报文,将抓取的第一个交互报文确定为第一数据包的发包时间;The test client sends the first data packet carrying the preset rule to the flow distribution device, and continues to capture the interaction message with the flow distribution device, and determines the captured first interaction message as the first interaction message. A packet sending time;
    所述分流设备接收测试客户端发送的携带预设规则的第一数据包以及接收所述测试设备发送的携带预设规则的第二数据包,并基于所述预设规则生成所述第二数据包的匹配的第三数据包,将所述第三数据包反馈至所述测试设备;The distribution device receives the first data packet carrying the preset rule sent by the test client and the second data packet carrying the preset rule sent by the testing device, and generates the second data based on the preset rule the matched third data packet of the packet, and the third data packet is fed back to the test device;
    所述测试客户端基于所述第一数据包的发包时间和所述反馈时间确定所述分流设备的规则生效时间。The test client determines, based on the packet sending time of the first data packet and the feedback time, the rule effective time of the traffic distribution device.
  9. 一种电子设备,包括:An electronic device comprising:
    一个或多个处理器;one or more processors;
    存储装置,设置为存储一个或多个程序,storage means arranged to store one or more programs,
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-6中任一所述的分流设备性能测试方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the method for testing the performance of a shunt device according to any one of claims 1-6.
  10. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-6中任一所述的分流设备性能测试方法。A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the method for testing the performance of a shunt device according to any one of claims 1-6.
PCT/CN2021/108677 2020-10-29 2021-07-27 Performance test method, apparatus and system for distribution device, electronic device, and medium WO2022088791A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011186146.1 2020-10-29
CN202011186146.1A CN112333044B (en) 2020-10-29 2020-10-29 Shunting equipment performance test method, device and system, electronic equipment and medium

Publications (1)

Publication Number Publication Date
WO2022088791A1 true WO2022088791A1 (en) 2022-05-05

Family

ID=74297517

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/108677 WO2022088791A1 (en) 2020-10-29 2021-07-27 Performance test method, apparatus and system for distribution device, electronic device, and medium

Country Status (2)

Country Link
CN (1) CN112333044B (en)
WO (1) WO2022088791A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115442284A (en) * 2022-08-22 2022-12-06 绿盟科技集团股份有限公司 System and method for testing equipment

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112333044B (en) * 2020-10-29 2022-07-15 北京锐安科技有限公司 Shunting equipment performance test method, device and system, electronic equipment and medium
CN113630640B (en) * 2021-07-27 2023-11-17 中央广播电视总台 Method and device for analyzing flow precision of media equipment and readable storage medium
CN114006838B (en) * 2021-10-30 2023-06-27 杭州迪普信息技术有限公司 Testing method and system of flow control device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101272291A (en) * 2008-04-29 2008-09-24 北京星网锐捷网络技术有限公司 Network appliance testing method and system
CN104094558A (en) * 2012-02-29 2014-10-08 国际商业机器公司 Multi-threaded packet processing
CN104601400A (en) * 2014-12-17 2015-05-06 北京锐安科技有限公司 Shunting equipment performance test method, test client side and test server
CN112333044A (en) * 2020-10-29 2021-02-05 北京锐安科技有限公司 Shunting equipment performance test method, device and system, electronic equipment and medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104539470B (en) * 2014-11-28 2017-11-21 北京锐安科技有限公司 Test shunting device whether method, test client and the system of packet loss
CN107465565B (en) * 2016-06-06 2019-08-30 中兴通讯股份有限公司 Link test method and apparatus and system
CN109167707A (en) * 2018-09-10 2019-01-08 北京锐安科技有限公司 A kind of shunting device test macro, method, apparatus, server and storage medium
CN111371639B (en) * 2020-02-21 2021-12-14 腾讯科技(深圳)有限公司 Network delay analysis method and device, storage medium and computer equipment
CN111431766A (en) * 2020-03-20 2020-07-17 深圳震有科技股份有限公司 Port test method and system of switch

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101272291A (en) * 2008-04-29 2008-09-24 北京星网锐捷网络技术有限公司 Network appliance testing method and system
CN104094558A (en) * 2012-02-29 2014-10-08 国际商业机器公司 Multi-threaded packet processing
CN104601400A (en) * 2014-12-17 2015-05-06 北京锐安科技有限公司 Shunting equipment performance test method, test client side and test server
CN112333044A (en) * 2020-10-29 2021-02-05 北京锐安科技有限公司 Shunting equipment performance test method, device and system, electronic equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115442284A (en) * 2022-08-22 2022-12-06 绿盟科技集团股份有限公司 System and method for testing equipment
CN115442284B (en) * 2022-08-22 2023-06-09 绿盟科技集团股份有限公司 System and method for testing equipment

Also Published As

Publication number Publication date
CN112333044A (en) 2021-02-05
CN112333044B (en) 2022-07-15

Similar Documents

Publication Publication Date Title
WO2022088791A1 (en) Performance test method, apparatus and system for distribution device, electronic device, and medium
US11936921B2 (en) Method for managing network live streaming data and related apparatus, and device and storage medium
CN105868040A (en) Log collection method and collection terminal
US11336545B2 (en) Network device measurements employing white boxes
CN111818041B (en) Real-time message processing system and method based on network layer message analysis
US20130326049A1 (en) System and method for sequencing per-hop data in performance-monitored network environments
CN114071544B (en) Network testing method and device and electronic equipment
CN103036707A (en) Portable diagnostic device of internet protocol television (IPTV) business service quality and diagnostic method of IPTV business service quality
WO2015196636A1 (en) Packet collection method and system, network device and network management centre
US20140301226A1 (en) Apparatus and method for network monitoring and packet inspection
JP6904600B2 (en) Data acquisition device, client-server system, data acquisition method, and program
CN117176633A (en) Bus cross-device communication method, device, equipment and storage medium
CN109361915B (en) Wired network camera installation test method
WO2017166093A1 (en) Front-end system
CN113765719B (en) Instant implementation method for unified management, monitoring and maintenance of Internet of things access
CN111092952A (en) Data interaction method and related product
CN111917835A (en) System, method and device for monitoring network data
US20030154270A1 (en) Independent and integrated centralized high speed system for data management
CN112291210B (en) Method and device for acquiring front-end equipment catalog
CN112291207B (en) Method and device for acquiring front-end equipment catalog
CN112181789B (en) Equipment end log collection method based on AWS
CN112866200B (en) Network equipment rule management system under complex network environment
WO2023169261A1 (en) Data uploading method and apparatus, device, and medium
JP6471459B2 (en) COMMUNICATION DEVICE, LOG PROCESSING PROGRAM, COMMUNICATION SYSTEM, AND LOG PROCESSING METHOD
CN112291209A (en) Method and device for acquiring front-end equipment catalog

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21884526

Country of ref document: EP

Kind code of ref document: A1