Traffic generation detection method and apparatus, electronic device, and computer program product

By combining a high-precision data acquisition card and a frequency counter, the problem of network monitoring equipment being unable to achieve full-process, full-domain traffic monitoring was solved, realizing high uniformity and stability detection of traffic generation, and meeting the traffic generation detection requirements of 10 Gigabit networks.

CN115665001BActive Publication Date: 2026-02-03NO 63921 UNIT OF PLA +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211281574.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-19
Publication Date
2026-02-03
Estimated Expiration
2042-10-19

AI Technical Summary

Technical Problem

Existing network monitoring equipment cannot achieve full-process, full-domain traffic monitoring, cannot provide a comprehensive and real-time data foundation, and various monitoring methods are built independently without forming a synergy, which cannot meet the traffic generation and detection needs of 10 Gigabit networks.

Method used

By combining a high-precision data acquisition card with a frequency counter, data packets are sent through simulated network devices, and the uniformity and stability of the data packets are detected by the frequency counter. A third-party instrumentation testing scheme is designed to ensure the impartiality and testability of the testing.

Benefits of technology

It achieves high uniformity and stability detection of data packets sent by traffic probes, provides technical support for large-bandwidth full-domain traffic perception and monitoring, and ensures the accuracy and precision of traffic generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115665001B_ABST
    Figure CN115665001B_ABST
Patent Text Reader

Abstract

The method comprises: obtaining a sending parameter of a sending data packet set by a user; simulating a sending device in a network to send data packets based on the sending parameter, and outputting a level signal to a frequency counter after sending a set number of data packets, and the current output level signal and the last output level signal are opposite in polarity; obtaining a data sending frequency parameter from the frequency counter after sending a total number of data packets; increasing an initial packet frequency in the sending parameter according to a set rule, and returning to the step of simulating the sending device in the network to send data packets based on the sending parameter; decreasing an initial packet length in the sending parameter according to a set rule, and restoring the packet frequency in the sending parameter to the initial packet frequency, and returning to the step of simulating the sending device in the network to send data packets based on the sending parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of network technology, specifically to a traffic generation and detection method, apparatus, electronic device, and computer program product. Background Technology

[0002] With the convergence of diversified and integrated business operations, open networks, and intelligent terminals, network coverage has expanded rapidly, new applications have emerged in large numbers, and network traffic has surged. However, the availability of fine-grained resources for diversified applications and important services has not yet been achieved. Furthermore, the traffic monitoring and detection equipment currently deployed in the network can only target single nodes and local information, and the information obtained from the network is relatively isolated. The correlation analysis and comprehensive presentation of information from multiple points along the link are still lacking, making it impossible to achieve full-process and full-domain monitoring of traffic. It also cannot provide a comprehensive and real-time data foundation for rapid location of network faults and comprehensive assessment of network operating status. At the same time, various network monitoring methods are built independently and have not formed a synergy.

[0003] Uniform packet transmission is a crucial function of network probes. As network speeds upgrade to 10 Gigabit Ethernet, the packet transmission capability also needs to be upgraded to 10 Gigabit speed, achieving line-speed capability. The existing software-based packet transmission method needs to be upgraded to hardware-based packet transmission, thus a hardware traffic generation method was proposed. Detecting the traffic data packets emitted by the hardware is a challenge. Directly capturing packets with a custom probe is insufficient for verification; a third-party instrumentation verification scheme can be designed. A high-precision data acquisition card outputs a level signal every 100 data packets sent, with the polarity opposite to the previous output, thus observing a complete square wave signal, indicating that 200 data packets have been sent. Measuring the frequency of this square wave yields the traffic transmission packet frequency, and viewing the data record trend chart verifies the uniformity of transmission.

[0004] With the convergence and development of networks, network coverage has expanded rapidly, new applications have emerged in large numbers, network traffic has surged, and network transmission bandwidth has expanded from hundreds / gigabits to tens of gigabits. However, current network traffic monitoring capabilities are limited to below gigabits, and traffic monitoring for high-bandwidth transmission links remains a blank. Furthermore, current network monitoring equipment can only target single nodes and localized information, and the information obtained from the network is relatively isolated. The correlation analysis and comprehensive presentation of information from multiple points along the link are still lacking, making it impossible to achieve end-to-end, full-domain traffic monitoring. This hinders the provision of comprehensive, real-time data for rapid network fault location and comprehensive assessment of network operational status. Simultaneously, a unified standard suitable for the characteristics of business network applications has not yet been established for traffic monitoring; various network monitoring methods are being developed independently, failing to form a cohesive force. Therefore, research on high-bandwidth, full-domain traffic awareness and monitoring technology and the formulation of network traffic monitoring standards are urgently needed. Summary of the Invention

[0005] This disclosure provides a method, apparatus, electronic device, and computer program product for detecting traffic generation.

[0006] In a first aspect, this disclosure provides a flow generation and detection method, wherein the method is executed on a high-precision data acquisition card mounted on a flow probe, the high-precision data acquisition card being connected to a frequency counter, and the method includes:

[0007] Obtain the sending parameters of the data packets set by the user; the sending parameters include the initial packet length, the initial packet frequency, and the total number of packets;

[0008] Based on the transmission parameters, the transmitting device in the simulated network sends data packets, and after sending a set number of data packets, it outputs a level signal to the frequency counter, and the polarity of the current output level signal is opposite to that of the previous output level signal;

[0009] After sending the total number of data packets, the data transmission frequency parameters are obtained from the frequency counter;

[0010] After incrementing the initial packet frequency in the sending parameters according to the set rules, return to the step of simulating the sending device in the network to send data packets based on the sending parameters, until the sent data packets fill the entire network bandwidth;

[0011] After decreasing the initial packet length in the sending parameters according to the set rules and restoring the packet frequency in the sending parameters to the initial packet frequency, the process returns to the step of sending data packets by the sending device in the simulated network based on the sending parameters, until the sent data packets fill the entire network bandwidth.

[0012] Based on the set of frequency parameters obtained from the frequency counter and the level signal output to the frequency counter, the uniformity and stability of the data packets sent by the flow probe are detected.

[0013] Furthermore, based on the set of frequency parameters obtained from the frequency counter and the level signal output to the frequency counter, the uniformity and stability of the data packets sent by the flow probe are detected, including:

[0014] For a complete square wave level signal output to the frequency counter, determine whether the count value in the frequency parameter set meets the requirement of the total number of actual data packets sent under a complete square wave level signal; and / or,

[0015] Each frequency value in the set of frequency parameters is multiplied by a fixed factor and compared with the initial packet frequency value. If they match, it indicates that the uniformity of the transmitted data packets meets the requirements; if they do not match, it indicates that the uniformity of the transmitted data does not meet the requirements; and / or,

[0016] Determine whether multiple frequency values ​​and / or multiple count values ​​in the set of frequency parameters form a straight line. If they do not form a straight line, it indicates that the stability of the transmitted data packet does not meet the requirements. If multiple frequency values ​​and / or multiple count values ​​in the set of frequency parameters form a straight line, it indicates that the stability of the transmitted data packet meets the requirements.

[0017] Furthermore, the high-precision data acquisition card installed on the traffic probe sends data packets to another traffic probe located in the network.

[0018] Secondly, this disclosure provides a flow generation and detection device, wherein the device operates on a high-precision data acquisition card mounted on a flow probe, the high-precision data acquisition card being connected to a frequency counter, and the device includes:

[0019] The acquisition module is configured to acquire the sending parameters of the data packets set by the user; the sending parameters include the initial packet length, the initial packet frequency, and the total number of packets;

[0020] The first transmitting module is configured to simulate a transmitting device in the network to transmit data packets based on the transmitting parameters, and output a level signal to a frequency counter after transmitting a set number of data packets, and the polarity of the currently output level signal is opposite to that of the previously output level signal;

[0021] The second sending module is configured to obtain data transmission frequency parameters from the frequency counter after sending the total number of data packets.

[0022] The first return module is configured to increment the initial packet frequency in the sending parameters according to a set rule, and then return to the step of sending data packets by the sending device in the network based on the sending parameters, until the sent data packets fill the entire network bandwidth.

[0023] The second return module is configured to decrease the initial packet length in the sending parameters according to a set rule, restore the packet frequency in the sending parameters to the initial packet frequency, and then return to the step of sending data packets by the sending device in the simulated network based on the sending parameters, until the sent data packets fill the entire network bandwidth.

[0024] The verification module is configured to detect the uniformity and stability of the data packets sent by the flow probe based on a set of frequency parameters obtained from the frequency counter and a level signal output to the frequency counter.

[0025] Furthermore, the verification module includes:

[0026] The first determining submodule is configured to, for a complete square wave level signal output to the frequency counter, determine whether the count value in the frequency parameter set meets the requirement of the total number of actual data packets sent under a complete square wave level signal; and / or,

[0027] The comparison submodule is configured to multiply each frequency value in the set of frequency parameters by a fixed factor and compare it with the initial packet frequency value. If they match, it indicates that the uniformity of the transmitted data packets meets the requirements; if they do not match, it indicates that the uniformity of the transmitted data does not meet the requirements; and / or,

[0028] The second determining submodule is configured to determine whether multiple frequency values ​​and / or multiple count values ​​in the frequency parameter set form a straight line. If they do not form a straight line, it indicates that the stability of the transmitted data packet does not meet the requirements. If multiple frequency values ​​and / or multiple count values ​​in the frequency parameter set form a straight line, it indicates that the stability of the transmitted data packet meets the requirements.

[0029] Furthermore, the high-precision data acquisition card installed on the traffic probe sends data packets to another traffic probe located in the network.

[0030] Thirdly, this disclosure provides a traffic generation and detection system, including: a traffic probe, a B-code signal source, a frequency counter, and a switch; the traffic probe includes a high-precision data acquisition card;

[0031] The input signal of the flow probe is connected to the B-code signal source, the first output signal is connected to the frequency counter, and the second output signal is connected to the switch;

[0032] The traffic probe receives the sending parameters of the data packets set by the user; the sending parameters include the initial packet length, the initial packet frequency, and the total number of packets;

[0033] The flow probe simulates the sending device in the network to send data packets based on the sending parameters, and outputs a level signal to the frequency counter after sending a set number of data packets, and the polarity of the current output level signal is opposite to that of the previous output level signal;

[0034] After the traffic probe has sent the total number of data packets, it obtains the data transmission frequency parameters from the frequency counter.

[0035] The traffic probe increments the initial packet frequency in the sending parameters according to a set rule, and then returns to the step of simulating the sending device in the network to send data packets based on the sending parameters, until the sent data packets fill the entire network bandwidth.

[0036] The traffic probe decreases the initial packet length in the sending parameters according to a set rule, restores the packet frequency in the sending parameters to the initial packet frequency, and then returns to the step of sending data packets based on the sending parameters to simulate the sending device in the network until the sent data packets fill the entire network bandwidth.

[0037] The flow probe detects the uniformity and stability of the data packets it sends based on the set of frequency parameters obtained from the frequency counter and the level signal output to the frequency counter.

[0038] The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above function.

[0039] In one possible design, the above-described device includes a memory and a processor. The memory stores one or more computer instructions that support the device in performing the corresponding methods described above, and the processor is configured to execute the computer instructions stored in the memory. The device may also include a communication interface for communicating with other devices or communication networks.

[0040] Fourthly, embodiments of this disclosure provide an electronic device including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method described in any of the above aspects.

[0041] Fifthly, embodiments of this disclosure provide a computer-readable storage medium for storing computer instructions used by any of the above-described devices, which, when executed by a processor, are used to implement the methods described in any of the above aspects.

[0042] In a sixth aspect, embodiments of this disclosure provide a computer program product comprising computer instructions which, when executed by a processor, are used to implement the methods described in any of the preceding aspects.

[0043] The technical solutions provided in this disclosure may have the following beneficial effects:

[0044] The advantages and innovations of this disclosure compared to the prior art are as follows:

[0045] 1. Based on frequency counter testing, the number of data packets and packet frequency sent can be calculated, which can directly verify the uniformity, accuracy and precision of packet transmission, and provide support for precise resource control.

[0046] 2. Design a scheme based on third-party instrumentation verification, where the accuracy and precision of the measurements are determined by third-party equipment, ensuring the fairness, impartiality, and testability of the proposed methods and ideas.

[0047] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0048] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments, taken in conjunction with the accompanying drawings. In the drawings:

[0049] Figure 1 A flowchart illustrating a traffic generation and detection method according to an embodiment of the present disclosure is shown;

[0050] Figure 2 A schematic diagram illustrating a deployment implementation of a flow probe according to an embodiment of the present disclosure is shown.

[0051] Figure 3 A schematic diagram of a flow probe structure according to an embodiment of the present disclosure is shown;

[0052] Figure 4 A schematic diagram illustrating the connection effect of a flow probe and a frequency counter according to an embodiment of the present disclosure is shown.

[0053] Figure 5 A detection method for generating highly uniform flow rate according to an embodiment of the present disclosure is shown;

[0054] Figure 6 A structural block diagram of a flow generation and detection apparatus according to an embodiment of the present disclosure is shown;

[0055] Figure 7 This is a schematic diagram of the structure of an electronic device suitable for implementing the flow generation and detection method according to an embodiment of the present disclosure. Detailed Implementation

[0056] In the following, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to enable those skilled in the art to readily implement them. Furthermore, for clarity, portions unrelated to the description of the exemplary embodiments have been omitted from the drawings.

[0057] In this disclosure, it should be understood that terms such as “comprising” or “having” are intended to indicate the presence of features, figures, steps, behaviors, components, parts or combinations thereof disclosed in this specification, and do not preclude the possibility of the presence or addition of one or more other features, figures, steps, behaviors, components, parts or combinations thereof.

[0058] It should also be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0059] The details of the embodiments of this disclosure are described in detail below through specific examples.

[0060] Figure 1 A flowchart illustrating a traffic generation and detection method according to an embodiment of this disclosure is shown. Figure 1 As shown, this method is executed on a high-precision data acquisition card mounted on a flow probe. The high-precision data acquisition card is connected to a frequency counter. This flow generation and detection method includes the following steps:

[0061] In step S101, the sending parameters of the data packet set by the user are obtained; the sending parameters include the initial packet length, the initial packet frequency, and the total number of packets;

[0062] In step S102, based on the initial packet length and initial packet frequency, the transmitting device in the simulated network sends data packets, and after sending a set number of data packets, it outputs a level signal to the frequency counter, and the polarity of the currently output level signal is opposite to that of the previously output level signal;

[0063] In step S103, after sending the total number of data packets, the data transmission frequency parameters are obtained from the frequency counter;

[0064] In step S104, after incrementing the packet frequency used last time according to the set rules, the process returns to the step of sending data packets by the sending device in the simulated network based on the sending parameters, until the sent data packets fill the entire network bandwidth.

[0065] In step S105, after reducing the packet length used last time according to the set rules, the process returns to the step of sending data packets by the sending device in the simulated network based on the sending parameters, until the sent data packets fill the entire network bandwidth.

[0066] In step S106, the uniformity and stability of the data packets sent by the flow probe are detected based on the set of frequency parameters obtained from the frequency counter and the level signal output to the frequency counter.

[0067] In this embodiment, the traffic probe is a dedicated device for realizing high-bandwidth, full-domain traffic awareness and monitoring. It is a typical network probe deployed in the business network to monitor network performance parameters, especially traffic awareness and monitoring. The traffic probe includes two working modes: (1) passive working mode, which can obtain all data packets flowing through the device from the mirror port of the switch or router, and obtain performance indicators by parsing the IP protocol; (2) active working mode, which connects to the communication port of the switch, and the traffic probe actively sends data packets to generate traffic or simulate business applications.

[0068] By default, the traffic probe operates in passive mode upon power-on, enabling unattended, automatic operation. In user settings, an active mode can be selected, requiring manual intervention. After setting the appropriate sending parameters, the traffic probe's traffic generation function can be activated, causing it to send a series of data packets.

[0069] Each data packet sent by the traffic probe conforms to the TCP / IP protocol requirements and contains the correct source MAC address, destination MAC address, source IP address, destination IP address, source port, destination port and other parameters. The verification at each level is also correct. It can be transmitted to the final destination address through the switches and routers of the business network. The destination can be another traffic probe located in the network.

[0070] In active working mode, the sending parameters that the user needs to set may include: (1) Packet length, also known as frame length, which is the length of the data packet, with a minimum of 64 bytes and a maximum of 1518 bytes. (2) Packet frequency, which represents the number of data packets sent per second, also known as the number of frames, ranging from a minimum of 1 packet / second to millions of packets / second. (3) Total number of packets, which is the total number of data packets, representing the total number of data packets that the traffic probe needs to generate. The total sending time can also be specified, and it can be converted to and from the total number of packets.

[0071] The challenge in sending data packets in active mode is achieving uniformity in the transmission of these packets. In the real world, many devices operate periodically; for example, radar scans have a fixed cycle, and the data obtained is periodically uniform; television refresh rates are fixed, and video data is also periodically uniform. When using a flow probe to simulate sending radar or video data, a strong periodicity must also be simulated.

[0072] Many testing software programs that use network cards to send data packets can simulate the generation of data packets, but after the data is transmitted to the network card buffer, the network card will send out all the data in the buffer at once, and then wait for the next round. The speed of transmission depends entirely on whether the buffer is full to a certain extent, and there is basically no uniformity.

[0073] Many testing instruments use hardware packet transmission, which can only achieve a roughly uniform transmission rate, meeting the requirement of transmitting a certain number of packets per second. When the packet frequency is an integer (i.e., when 1,000,000 is divided by an integer value), for example, a packet frequency of 2000 frames per second, then an average of one packet is transmitted every 500 microseconds, and the hardware can achieve uniformity. However, if the packet frequency is 3000 frames per second, then an average of one packet is transmitted every 333 microseconds. Because the division is not exact, accumulated errors will occur.

[0074] In contrast, the solution proposed in this disclosure uses an innovative packet sending algorithm and FPGA hardware for fast packet sending, achieving high uniformity and equal intervals between data packets.

[0075] The detection object in this embodiment is a flow probe, and the detection content is the verification of the high uniformity flow generation method of the flow probe.

[0076] To detect high uniformity in traffic generation, a frequency counter can be configured on the traffic probe. The transmit counting level signal output from traffic probe A is connected to channel A of the frequency counter. The frequency counter accumulates the count of changes in the level signal. Each time a rising edge from low to high is detected, the count value of the frequency counter is incremented by one. This allows the frequency counter value to increment by one after a predetermined number of data packets (e.g., 200). Conversely, an increment of one counter value indicates that a predetermined number (e.g., 200) of data packets have been detected. By continuously recording the set of counter count values ​​and the recorded trend graph, the successful detection of the high uniformity traffic generation function can be verified.

[0077] In some embodiments, the frequency counter may include three channels, and the precision data acquisition card can be connected to any one of the channels of the frequency counter. The frequency counter can display measurement results, such as the transmission frequency of data packets or the count of data packets transmitted within a certain time period.

[0078] User-defined sending parameters include initial packet length, initial packet frequency, and total number of packets. Each packet sent by the traffic probe has a length; in a network, the packet length can be at least 64 bytes and no more than 1518 bytes. If the communication content between the two parties is less than 64 bytes, the sender can pad it with empty bytes to make it 64 bytes. If the communication content between the two parties is greater than 1518 bytes, for example, a 5000-byte image, the sender can split it into smaller packets, each no more than 1518 bytes, thus forcibly splitting the image into 4 packets. This splitting and padding process is completed at the operating system level. Since the traffic probe can capture all packets and also capture this splitting and padding process, it will simulate this splitting and padding process when sending packets.

[0079] Different packet lengths place different demands on the network. Large packets, such as 1518 bytes, consume more network resources; small packets, such as 64 bytes, while consuming fewer network resources, place higher demands on devices like switches and routers. Therefore, a comprehensive assessment is needed when sending data packets to select an appropriate packet length for testing.

[0080] Packet frequency is another important parameter, representing the number of data packets per second. A higher packet frequency requires the network to transmit more data per second, thus placing greater demands on network resources. Choosing the right packet frequency is a crucial aspect of testing. Combined with packet length, a test table can be created. The table below lists the parameters for a 10 Gigabit network:

[0081] Test number Packet length (bytes) Maximum packet frequency (packets / second) 1 64 14,880,952 2 128 8,445,945 3 256 4,528,985 4 512 2,349,624 5 1024 1,197,318 6 1280 961,538 7 1518 812,743

[0082] The last transmission parameter is the total number of packets, representing the number of data packets to be sent in this transmission process. Once this number is reached, the transmission process with the initial packet frequency and initial packet length automatically ends. At this point, the data transmission frequency parameter can be obtained from the frequency counter, meaning step S103 is complete. In some embodiments, the data transmission frequency parameter may include a count value and a frequency value. The count value is incremented by one each time the frequency counter detects a change in the level signal, while the frequency value is calculated based on the count value over a period of time and the length of that period.

[0083] After sending the total number of data packets according to the user-defined sending parameters, the initial packet frequency can be incremented. The increment rule can be preset, for example, it can be configured by the user. For instance, the user can configure the packet length decreasing sequence and the packet frequency increasing sequence as shown in Table 1 above. For example, if the initial packet frequency is 812743 packets / second, it can be incremented to 961538 packets / second this time, and then to 1197318 packets / second next time. It can be understood that during the incrementing process of the packet frequency in the sending parameters, the packet length and the total number of packets can remain unchanged. Each time the packet frequency is incremented, step S102 is returned and executed again until the sent data packets fill the entire network bandwidth, at which point the packet frequency increment stops and the next step S105 is executed.

[0084] Network bandwidth can be understood as the maximum data transmission capacity of a data transmission channel. For example, a 10 Gigabit network means that it can transmit a maximum of 10 gigabits per second (10 Gbps), which, divided by 8, is equivalent to transmitting 1250 megabytes. If each data packet is 1024 bytes long, then this means a maximum of 1,197,318 data packets can be transmitted. If 1024-byte data packets are transmitted at this packet frequency, the entire network bandwidth can be fully utilized.

[0085] By incrementally increasing the packet frequency to fill the entire network bandwidth, multiple data transmission frequency parameters under different packet frequencies can be obtained, and these multiple data transmission frequency parameters can be added to the frequency parameter set.

[0086] Then, the packet frequency in the sending parameters can be restored to the initial packet frequency, and the packet length can be decreased from the initial packet length. For example, as shown in Table 1, the initial packet length is 1518 bytes. At this time, the packet length can be decreased from the initial packet length to 1280 bytes, and then the above steps are repeated in step 102. That is to say, with the reduced packet length of 1280 bytes, the process of sending data packets is re-executed using the initial packet frequency and the increased packet frequency to obtain multiple data sending frequency parameters under different packet frequencies, and these parameters are added to the frequency parameter set.

[0087] In this embodiment, by increasing the packet frequency and packet length, data transmission stops once the transmitted data packets have filled the entire network bandwidth. In other words, both increasing the packet frequency and decreasing the packet length can terminate when the entire network bandwidth is fully occupied. Alternatively, it can be understood that the packet frequency can stop increasing if it reaches the user-defined maximum value, and the packet length can stop decreasing if it reaches the user-defined minimum value.

[0088] In other words, for each packet length, data transmission frequency parameters at different packet frequencies will be obtained. Based on these frequency parameters and the level signal output by the flow probe to the frequency counter, the flow probe's flow generation function can be verified, that is, whether the flow probe can generate flow with high uniformity.

[0089] The technical problem this disclosure aims to solve is how to verify that the generated and sent data packets are uniform and stable. High-precision timing is the foundation for traffic probes to monitor traffic, and uniform packet transmission is one of the important functions of network probes. This disclosure proposes a traffic generation detection method. Traffic generation can be understood as the process of generating a series of data packets according to user-specified parameters such as packet frequency, packet length, destination IP address, and destination port, and sending them into the service network.

[0090] In an optional implementation of this embodiment, step S106, which is the step of detecting the uniformity and stability of the data packets sent by the flow probe based on the set of frequency parameters obtained from the frequency counter and the level signal output to the frequency counter, further includes the following steps:

[0091] For a complete square wave level signal output to the frequency counter, determine whether the count value in the frequency parameter set meets the requirement of the total number of actual data packets sent under a complete square wave level signal; and / or,

[0092] Each frequency value in the set of frequency parameters is multiplied by a fixed factor and compared with the initial packet frequency value. If they match, it indicates that the uniformity of the transmitted data packets meets the requirements; if they do not match, it indicates that the uniformity of the transmitted data does not meet the requirements; and / or,

[0093] Determine whether multiple frequency values ​​and / or multiple count values ​​in the set of frequency parameters form a straight line. If they do not form a straight line, it indicates that the stability of the transmitted data packet does not meet the requirements. If multiple frequency values ​​and / or multiple count values ​​in the set of frequency parameters form a straight line, it indicates that the stability of the transmitted data packet meets the requirements.

[0094] In this optional implementation, the high-precision data acquisition card can output a level signal with the opposite polarity to the previous output every 100 data packets sent, thus observing a complete square wave signal, indicating that 200 data packets have been sent. By measuring the frequency of this square wave, the packet frequency of the data transmission can be obtained, and the uniformity of transmission can be verified by viewing the data record trend graph.

[0095] When a flow probe sends data packets, it can be configured with an internal counter. For example, it can output an inverted level signal every 100 data packets sent. Figure 4 The connection relationships are shown in the diagram.

[0096] If the initial level of the counting signal is low, after sending the 100th data packet, the signal is inverted once, becoming high. The external frequency counter detects the rising edge of the transition from low to high and automatically increments the count. If another 100 data packets are sent, the signal is inverted again, becoming low. The external frequency counter detects the falling edge of the transition from high to low and the count remains unchanged. Thus, the external frequency counter increments by one every 200 data packets sent. If 2000 data packets are sent, the count will be 10. The count value directly indicates whether the flow probe has sent a sufficient number of data packets.

[0097] Therefore, by observing a complete square wave level signal, the count value in the frequency parameter set and the total number of actual data packets sent by the flow probe can be used to determine whether the count value and the total number of data packets sent under a complete square wave level signal meet the requirements. In some embodiments, if the count value in the frequency parameter set is not equal to the total number of data packets sent by the high-precision data acquisition card divided by 2 and then multiplied by the number of output level signals of the high-precision data acquisition card, it indicates that the number of data packets sent by the flow probe is incorrect and the sending function has failed; otherwise, it indicates that the number of data packets sent by the flow probe meets the requirements.

[0098] In addition, each frequency value in the frequency parameter set is multiplied by a fixed factor and compared with the packet frequency value in the user-set transmission parameters. If they are inconsistent, it means that the uniformity of the transmitted data packets does not meet the requirements; otherwise, it means that the uniformity of the transmitted data packets meets the requirements.

[0099] The total number of packages and the count value have the following relationship: Total number of packages = Count value × 200.

[0100] For example: Suppose the packet frequency is 20,000 frames / second, and 20,000 frames are sent per second, then the count value is 100, that is, the frequency value of the frequency counter is 100Hz.

[0101] When the packet frequency is set to 200,000 frames / second, 200,000 frames are sent per second, the count value is 1,000, and the frequency value is 1,000 Hz.

[0102] When the packet frequency is set to 2,000,000 frames / second, 2 million frames are sent per second, the count value is 10,000, and the frequency value is 10,000Hz.

[0103] Therefore, the packet frequency value can be deduced from the frequency value measured by the frequency counter, and then it can be verified whether it is the same as the packet frequency value set by the user.

[0104] Users can configure the traffic probe to send packets continuously for 102 seconds and check whether the frequency value measured by the frequency counter is stable at the same value. For example, if the frequency value is 1000Hz for 100 consecutive seconds after removing the beginning and end, it means that the packet frequency sent by the traffic probe is stable at 200,000,000 frames / second. At this time, it can be considered that the uniformity of the sent data packets meets the requirements.

[0105] You can also check the trend chart of the data records corresponding to the frequency value and count value in the frequency parameter set (this chart can be obtained directly from the frequency counter). If it is not a straight line, it means that the stability of the transmitted data packet does not meet the requirements; otherwise, it means that the stability of the transmitted data packet meets the requirements.

[0106] If the flow probe can transmit normally and the uniformity and stability meet the requirements after the above tests, it means that the flow probe's flow generation function is working properly; otherwise, it means that the flow probe's flow generation function is faulty and does not meet the requirements.

[0107] In some embodiments, a high-precision data acquisition card mounted on the traffic probe sends data packets to another traffic probe located in the network.

[0108] Figure 2 A schematic diagram illustrating a deployment implementation of a flow probe according to an embodiment of the present disclosure is shown. Figure 2 As shown, a traffic probe equipped with a high-precision data acquisition card is deployed in the service network. Two traffic probes can be deployed in the service network, positioned at both ends of the communication line to be tested. One traffic probe, A, is responsible for sending data packets, and the other, B, is responsible for receiving data packets. Both traffic probes are connected to a B-code signal source device and to the communication port of their respective switches, with their respective IP addresses and subnet masks configured.

[0109] Figure 3 A schematic diagram of a flow probe structure according to an embodiment of the present disclosure is shown. Figure 3 As shown, the flow probe can be a server equipped with a high-precision data acquisition card, including two input signals and two output signals. The input signals include B-code signals and received network data packets, and the output signals include transmitted network data packets and transmitted counting level signals.

[0110] At the sending end, traffic probe A is connected to the communication port of switch A. The user sets the sending parameters, starts the traffic generation function, and begins sending network data packets. The sent network data packets can be transmitted to the destination receiving end through the service network.

[0111] At the receiving end, traffic probe B is connected to the communication port of switch B, and switch B forwards network data packets to traffic probe B. After receiving network data packets, traffic probe B can calculate the delay value based on the timestamp of each data packet, and can also determine whether there is packet loss by checking whether the total number of received data packets is equal to the total number of data packets sent by the sending traffic probe A. The timestamp of the data packets can be determined by traffic probe B based on the real-time when the data packets are received. Since both traffic probe A and traffic probe B are connected to a unified B-code signal source, they have a unified time standard.

[0112] Figure 4 A schematic diagram illustrating the connection effect of a flow probe and a frequency counter according to an embodiment of this disclosure is shown. Figure 4 As shown, to detect high uniformity of traffic generation, a frequency counter and a B-code signal source can be configured at the traffic probe transmitter. The B-code signal output from the B-code signal source is connected to the B-code signal input of traffic probe A. The transmission count level signal output from traffic probe A is connected to channel A of the frequency counter. The frequency counter accumulates the count of the level signal changes. Each time a rising edge from low to high is detected, the count value of the frequency counter is incremented by one. This allows the frequency counter value to increment by one for every predetermined number (e.g., 200) of data packets transmitted. Conversely, an increment of one counter value indicates that a predetermined number (e.g., 200) of data packets have been detected. By continuously recording the counter count values ​​and the recorded trend graph, the successful detection of the high uniformity traffic generation function can be verified.

[0113] Figure 5 A detection method for generating high-uniformity flow rate according to an embodiment of the present disclosure is shown. For example... Figure 5 As shown, the method includes the following steps:

[0114] S1: Connect the high-precision data acquisition card installed on the flow probe to channel A of the frequency counter;

[0115] S2: Select the flow generation function of the flow probe, and set the packet frequency, packet length and total number of packets sent by the high-precision data acquisition card;

[0116] S3: The high-precision data acquisition card sends data packets. For each set number of data packets sent, it outputs a level signal to the frequency counter, with the polarity opposite to the previous output.

[0117] S4: After the high-precision data acquisition card has sent all the data packets, it reads and records the count value, frequency value and data recording trend graph on the frequency counter, and then clears the frequency counter to zero.

[0118] S5: Increment the packet frequency value of the data packets sent by the high-precision data acquisition card, and return to step S3 until the sent data packets fill the entire network bandwidth;

[0119] S6: Gradually decrease the packet length value of the 10 Gigabit Ethernet tester until it reaches 64. For each decrease of the packet length value, gradually increase the packet frequency value based on the setting in step S2. Repeat steps S3 and S4 until the sent data packets fill the entire network bandwidth.

[0120] S7: Analyze the set of count values ​​on the frequency counter. Based on the output level of the high-precision data acquisition card, observe a complete square wave signal. If the value in the set of count values ​​is not equal to the total number of data packets sent by the high-precision data acquisition card / 2 * the number of data packets of the high-precision data acquisition card's output level signal, it indicates that the number of data packets sent is incorrect and the sending function fails; otherwise, it indicates that the number of data packets sent meets the requirements.

[0121] The analysis focuses on the count values, frequency values, and data recording trend charts recorded on the frequency counter. Since the high-precision data acquisition card outputs a level signal with the opposite polarity to the previous output for every 100 data packets sent, a complete square wave signal can be observed in channel A of the frequency counter, indicating that 200 data packets have been sent. Therefore, theoretically, if 200,000 packets are sent each time, the recorded count value should be 1000. If a value other than 1000 appears in the count value set, it indicates an error in the number of data packets sent, a failure of the sending function, and that the requirements are not met. Otherwise, all counts are 1000, indicating that the number of packets sent meets the requirements.

[0122] S8: Continue checking by multiplying each frequency value in the count set by a fixed factor and comparing it with the packet frequency value set in step S2. If they are inconsistent, it means that the uniformity of the transmitted data packets does not meet the requirements; otherwise, it means that the uniformity of the transmitted data packets meets the requirements.

[0123] S9: Check the trend chart of the data records in the numerical set. If it is not a straight line, it means that the stability of sending data packets does not meet the requirements; otherwise, it means that the stability of sending data packets meets the requirements.

[0124] S10: Determine whether the checks in steps S7, S8 and S9 all meet the requirements. If all the requirements are met, it means that the high uniformity flow generation function test is successful; otherwise, the high uniformity flow generation function test fails.

[0125] Complete the detection of high-uniformity flow generation.

[0126] The following are embodiments of the apparatus disclosed herein, which can be used to execute embodiments of the method disclosed herein.

[0127] Figure 6 A structural block diagram of a flow generation and detection apparatus according to an embodiment of the present disclosure is shown. This apparatus can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 6 As shown, the flow generation and detection device includes:

[0128] The acquisition module is configured to acquire the sending parameters of the data packets set by the user; the sending parameters include the initial packet length, the initial packet frequency, and the total number of packets;

[0129] The first transmitting module 601 is configured to simulate a transmitting device in a network to transmit data packets based on the transmitting parameters, and output a level signal to a frequency counter after transmitting a set number of data packets, and the polarity of the currently output level signal is opposite to that of the previously output level signal;

[0130] The second sending module 602 is configured to obtain data sending frequency parameters from the frequency counter after sending the total number of data packets.

[0131] The first return module 603 is configured to increment the initial packet frequency in the sending parameters according to a set rule, and then return to the step of sending data packets by the sending device in the network based on the sending parameters until the sent data packets fill the entire network bandwidth.

[0132] The second return module 604 is configured to decrease the initial packet length in the sending parameters according to a set rule, restore the packet frequency in the sending parameters to the initial packet frequency, and then return to the step of sending data packets by the sending device in the simulated network based on the sending parameters until the sent data packets fill the entire network bandwidth.

[0133] The verification module 605 is configured to detect the uniformity and stability of the data packets sent by the flow probe based on the set of frequency parameters obtained from the frequency counter and the level signal output to the frequency counter.

[0134] The flow generation detection device in this embodiment corresponds to the flow generation detection method described above. Therefore, for specific details, please refer to the description of the flow generation detection method above, which will not be repeated here.

[0135] This disclosure also proposes a flow generation and detection system, including: a flow probe, a B-code signal source, a frequency counter, and a switch; the flow probe includes a high-precision data acquisition card;

[0136] The input signal of the flow probe is connected to the B-code signal source, the first output signal is connected to the frequency counter, and the second output signal is connected to the switch;

[0137] The traffic probe receives the sending parameters of the data packets set by the user; the sending parameters include the initial packet length, the initial packet frequency, and the total number of packets;

[0138] The flow probe simulates the sending device in the network to send data packets based on the sending parameters, and outputs a level signal to the frequency counter after sending a set number of data packets, and the polarity of the current output level signal is opposite to that of the previous output level signal;

[0139] After the traffic probe has sent the total number of data packets, it obtains the data transmission frequency parameters from the frequency counter.

[0140] The traffic probe increments the initial packet frequency in the sending parameters according to a set rule, and then returns to the step of simulating the sending device in the network to send data packets based on the sending parameters, until the sent data packets fill the entire network bandwidth.

[0141] The traffic probe decreases the initial packet length in the sending parameters according to a set rule, restores the packet frequency in the sending parameters to the initial packet frequency, and then returns to the step of sending data packets based on the sending parameters to simulate the sending device in the network until the sent data packets fill the entire network bandwidth.

[0142] The flow probe detects the uniformity and stability of the data packets it sends based on the set of frequency parameters obtained from the frequency counter and the level signal output to the frequency counter.

[0143] Figure 7 This is a schematic diagram of the structure of an electronic device suitable for implementing the flow generation and detection method according to an embodiment of the present disclosure.

[0144] like Figure 7As shown, the electronic device 700 includes a processing unit 701, which can be implemented as a CPU, GPU, FPGA, NPU, or other processing unit. The processing unit 701 can execute various processes according to any of the methods described above in this disclosure, based on a program stored in the read-only memory (ROM) 702 or a program loaded from the storage portion 708 into the random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0145] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.

[0146] In particular, according to embodiments of this disclosure, any of the methods described above in the embodiments of this disclosure can be implemented as a computer software program. For example, embodiments of this disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for performing any of the methods in the embodiments of this disclosure. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711.

[0147] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0148] The units or modules described in the embodiments of this disclosure can be implemented in software or hardware. The described units or modules can also be located in a processor, and the names of these units or modules do not necessarily constitute a limitation on the unit or module itself.

[0149] In another aspect, this disclosure also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the apparatus described in the above embodiments; or it may be a standalone computer-readable storage medium not assembled into a device. The computer-readable storage medium stores one or more programs that are used by one or more processors to perform the methods described in this disclosure.

[0150] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

Claims

1. A method for detecting traffic generation, wherein, The method is executed on a high-precision data acquisition card mounted on a flow probe, the high-precision data acquisition card being connected to a frequency counter, and the method includes: Obtain the sending parameters of the data packets set by the user; the sending parameters include the initial packet length, the initial packet frequency, and the total number of packets; Based on the transmission parameters, the transmitting device in the simulated network sends data packets, and after sending a set number of data packets, it outputs a level signal to the frequency counter, and the polarity of the current output level signal is opposite to that of the previous output level signal; After sending the total number of data packets, the data transmission frequency parameters are obtained from the frequency counter; After incrementing the initial packet frequency in the sending parameters according to the set rules, return to the step of simulating the sending device in the network to send data packets based on the sending parameters, until the sent data packets fill the entire network bandwidth; After decreasing the initial packet length in the sending parameters according to the set rules and restoring the packet frequency in the sending parameters to the initial packet frequency, the process returns to the step of sending data packets by the sending device in the simulated network based on the sending parameters, until the sent data packets fill the entire network bandwidth. Based on the set of frequency parameters obtained from the frequency counter and the level signal output to the frequency counter, the uniformity and stability of the data packets sent by the flow probe are detected.

2. The method according to claim 1, wherein, Based on the set of frequency parameters obtained from the frequency counter and the level signal output to the frequency counter, the uniformity and stability of the data packets sent by the flow probe are detected, including: For a complete square wave level signal output to the frequency counter, determine whether the count value in the frequency parameter set meets the requirement of the total number of actual data packets sent under a complete square wave level signal; and / or, Each frequency value in the set of frequency parameters is multiplied by a fixed factor and compared with the initial packet frequency value. If they match, it indicates that the uniformity of the transmitted data packets meets the requirements; if they do not match, it indicates that the uniformity of the transmitted data does not meet the requirements; and / or, Determine whether multiple frequency values ​​and / or multiple count values ​​in the set of frequency parameters form a straight line. If they do not form a straight line, it indicates that the stability of the transmitted data packet does not meet the requirements. If multiple frequency values ​​and / or multiple count values ​​in the set of frequency parameters form a straight line, it indicates that the stability of the transmitted data packet meets the requirements.

3. The method according to any one of claims 1-2, wherein, The high-precision data acquisition card installed on the traffic probe sends data packets to another traffic probe located in the network.

4. A flow generation and detection device, wherein, The device operates on a high-precision data acquisition card mounted on a flow probe, the high-precision data acquisition card being connected to a frequency counter, and the device includes: The acquisition module is configured to acquire the sending parameters of the data packets set by the user; the sending parameters include the initial packet length, the initial packet frequency, and the total number of packets; The first transmitting module is configured to simulate a transmitting device in the network to transmit data packets based on the transmitting parameters, and output a level signal to a frequency counter after transmitting a set number of data packets, and the polarity of the currently output level signal is opposite to that of the previously output level signal; The second sending module is configured to obtain data transmission frequency parameters from the frequency counter after sending the total number of data packets. The first return module is configured to increment the initial packet frequency in the sending parameters according to a set rule, and then return to the step of sending data packets by the sending device in the network based on the sending parameters, until the sent data packets fill the entire network bandwidth. The second return module is configured to decrease the initial packet length in the sending parameters according to a set rule, restore the packet frequency in the sending parameters to the initial packet frequency, and then return to the step of sending data packets by the sending device in the simulated network based on the sending parameters, until the sent data packets fill the entire network bandwidth. The verification module is configured to detect the uniformity and stability of the data packets sent by the flow probe based on a set of frequency parameters obtained from the frequency counter and a level signal output to the frequency counter.

5. The apparatus according to claim 4, wherein, The verification module includes: The first determining submodule is configured to, for a complete square wave level signal output to the frequency counter, determine whether the count value in the frequency parameter set meets the requirement of the total number of actual data packets sent under a complete square wave level signal; and / or, The comparison submodule is configured to multiply each frequency value in the set of frequency parameters by a fixed factor and compare it with the initial packet frequency value. If they match, it indicates that the uniformity of the transmitted data packets meets the requirements; if they do not match, it indicates that the uniformity of the transmitted data does not meet the requirements; and / or, The second determining submodule is configured to determine whether multiple frequency values ​​and / or multiple count values ​​in the frequency parameter set form a straight line. If they do not form a straight line, it indicates that the stability of the transmitted data packet does not meet the requirements. If multiple frequency values ​​and / or multiple count values ​​in the frequency parameter set form a straight line, it indicates that the stability of the transmitted data packet meets the requirements.

6. The apparatus according to any one of claims 4-5, wherein, The high-precision data acquisition card installed on the traffic probe sends data packets to another traffic probe located in the network.

7. A traffic generation and detection system, comprising: Flow probe, B-code signal source, frequency counter and switch; The flow probe includes a high-precision data acquisition card; The input signal of the flow probe is connected to the B-code signal source, the first output signal is connected to the frequency counter, and the second output signal is connected to the switch; The traffic probe receives the sending parameters of the data packets set by the user; the sending parameters include the initial packet length, the initial packet frequency, and the total number of packets; The flow probe simulates the sending device in the network to send data packets based on the sending parameters, and outputs a level signal to the frequency counter after sending a set number of data packets, and the polarity of the current output level signal is opposite to that of the previous output level signal; After the traffic probe has sent the total number of data packets, it obtains the data transmission frequency parameters from the frequency counter. The traffic probe increments the initial packet frequency in the sending parameters according to a set rule, and then returns to the step of simulating the sending device in the network to send data packets based on the sending parameters, until the sent data packets fill the entire network bandwidth. The traffic probe decreases the initial packet length in the sending parameters according to a set rule, restores the packet frequency in the sending parameters to the initial packet frequency, and then returns to the step of sending data packets based on the sending parameters to simulate the sending device in the network until the sent data packets fill the entire network bandwidth. The flow probe detects the uniformity and stability of the data packets it sends based on the set of frequency parameters obtained from the frequency counter and the level signal output to the frequency counter.

8. An electronic device, wherein, The method includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method of any one of claims 1-3.

9. A computer-readable storage medium having computer instructions stored thereon, wherein, When executed by a processor, the computer instructions implement the method described in any one of claims 1-3.

10. A computer program product comprising computer instructions, wherein, When executed by a processor, the computer instructions implement the method described in any one of claims 1-3.

Citation Information

Patent Citations

  • Method and device for generating network flux

    CN101141320A

  • Method, system and device for controlling embedded system power consumption

    CN101515196A