Statistical Method of Bit Error Rate in Running Flow Test

By using a combination of memory block comparison and binary search algorithm in the running test, the error byte is quickly located, which solves the problems of low statistical efficiency of bit error rate and high CPU resource consumption in the existing technology, and achieves an efficient bit error rate. calculate.

CN115484515BActive Publication Date: 2024-09-27SICHUAN JIUZHOU ELECTRONICS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211037497.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-26
Publication Date
2024-09-27
Estimated Expiration
2042-08-26

AI Technical Summary

Technical Problem

In the running test, the existing bit error rate statistical method is inefficient, resulting in insufficient CPU processing power and high system resource consumption, which may cause system freezes and misjudgments.

Method used

Use memory block comparison combined with binary search algorithm to quickly locate the location of error bytes, thereby quickly counting the number of error bytes and calculating the bit error rate.

Benefits of technology

Through the combination of memory block comparison and binary search algorithm, the efficiency of bit error rate statistics is significantly improved, the CPU usage is reduced, and system lags and misjudgments are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115484515B
    Figure CN115484515B
Patent Text Reader

Abstract

The invention discloses a method for counting bit error rates in a flow test, comprising: receiving a message; constructing a source data memory block; comparing the memory blocks: if the memory block comparison results are consistent, there is no bit error and the test passes; if the memory block comparison results are inconsistent, there is a bit error and the test proceeds to the next step; comparing the memory blocks in combination with a binary search algorithm to quickly locate the bit error: dividing the message memory block into a front and a back block according to the length, and comparing them with the start position and the end position corresponding to the source data memory block respectively; if the comparison results of the front half or the back half are inconsistent, further dividing the front half or the back half information into a front and a back block according to the length, and then comparing them, and repeating this cycle until the bit error byte is found and the test ends; finally, counting the number of bytes with bit errors, thereby calculating the bit error rate; the invention adopts the memory block comparison in combination with the binary search algorithm to realize the rapid location of the bit error byte, thereby quickly counting the number of bit error bytes, and calculating the bit error rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of bit error rate statistics, in particular to a method for calculating bit error rate statistics in a flow test. Background Art

[0002] The symbol error rate (SER) is an indicator to measure the accuracy of data transmission within a specified time. The symbol error rate = the bit error in transmission / the total number of transmitted codes * 100%. The study of the symbol error rate under specific conditions is of great significance to enhance the performance of the communication system and improve the quality of data transmission. For digital communication systems, the smaller the error rate, the higher the reliability.

[0003] I-PON, the full name of All IP over PON, is a fiber-to-the-home system based on "10 Gigabit IP broadcasting", where "10 Gigabit IP broadcasting" specifically refers to the transmission of IP data on a unidirectional broadcast network. It combines 10 Gigabit Ethernet technology with a unidirectional broadcast transmission network to achieve 10 Gigabit baseband IP data transmission on a tree-like broadcast distribution network. The I-PON solution achieves full baseband IP bidirectional access.

[0004] The purpose of I-PON flow test is to test the traffic forwarding capability of the equipment. The signal source sends 188-byte messages with sequence numbers from 0-15 (or 0-255, depending on the actual signal source configuration) in a fixed cycle. The receiving end receives the message within the specified time period and determines whether the received message is complete. The usual implementation method is to store the received message in the cache, and then parse the sequence number of each message in turn, and then compare the byte order, count the erroneous bytes, and finally calculate the bit error rate; the time complexity of this processing flow is O(n). According to the production test requirements, the number of messages that need to be processed per unit time is approximately 400,000. Considering the equipment investment and test efficiency, the production workshop needs one-to-many testing, which places high demands on the CPU's computing processing and increases the system resource consumption; specifically reflected in:

[0005] (1) Using a sequential search algorithm, traversing and comparing bytes from beginning to end, the efficiency is low: the number of messages that need to be processed in a unit time (generally set to 10 seconds) is about 400,000, and the length of each message is 188 bytes, 40*188*10000=75,000,000 bytes. Using a sequential search and comparison algorithm is very inefficient.

[0006] (2) High CPU processing power requirements and high system resource consumption: In a one-to-many system environment in a production workshop, the amount of data that the CPU needs to process per unit time is very large, resulting in a very high CPU occupancy rate per unit time, which may exceed 95%, causing the system to freeze and misjudgment due to packet loss due to PC system performance issues. Summary of the invention

[0007] In order to solve the problems existing in the prior art, the purpose of the present invention is to provide a statistical method for the bit error rate in the flow test. The present invention adopts memory block comparison combined with a binary search algorithm to quickly locate the position of the erroneous bytes, thereby quickly counting the number of erroneous bytes and calculating the bit error rate.

[0008] To achieve the above object, the technical solution adopted by the present invention is: a statistical method for bit error rate in flow test, comprising the following steps:

[0009] Step 1: Start the system and receive messages within the specified time;

[0010] Step 2: Build source data memory block;

[0011] Step 3, memory block comparison: During a memory block comparison process, if the memory block comparison results are consistent, there is no bit error and the test passes; if the memory block comparison results are inconsistent, there is a bit error and proceed to the next step;

[0012] Step 4: Compare memory blocks and use a binary search algorithm to quickly locate bit errors: divide the message memory block into two blocks according to length, and compare them with the starting position and ending position corresponding to the source data memory block respectively; if the comparison results of the first half or the second half are inconsistent, further divide the first half or the second half of the information into two blocks according to length, and then compare them, and repeat this process until the erroneous byte is found; finally, count the number of bytes with erroneous bits to calculate the bit error rate.

[0013] As a further improvement of the present invention, in step 2, constructing the source data memory block is specifically as follows:

[0014] Construct a correct message memory block within a cycle period T as the source data memory block for memory block comparison.

[0015] As a further improvement of the present invention, the memory block in step 3 more specifically includes the following steps:

[0016] (1) Define the total length of the received message memory block: totalLength; define the cycle memory block length: periodLength;

[0017] (2) Analyze the sequence number of the first message in the received message memory block, recorded as index;

[0018] (3) Calculate the offset position of the source data memory block to be compared according to the index of the first message in the received memory block, which is expressed as: offset = index * a, where a is the number of bytes in the message;

[0019] (4) Calculate the length of the first memory block to be compared with the source data memory block: length = (b-index)*a, where b is the total number of message sequence numbers;

[0020] (5) The receiving memory starts at 0, and the source data memory block is compared from offset, with the comparison length being length; if the comparison fails, the erroneous bytes are counted using a binary search algorithm;

[0021] (6) After the first message memory block comparison is completed, the offset position is moved to the beginning of the second memory block: offset = offset + length;

[0022] (7) offset increases according to the period length: offset = offset + periodLength, the length to be compared is length = periodLength;

[0023] (8) If offset ≥ totalLength, then offset = offset - periodLength, and the length to be compared length = totalLength - offset;

[0024] (9) Memory block comparison: the source data memory block starts at 0, the received message memory block starts at the offset position, and the comparison length is length; if the comparison result fails, the error bytes are counted using a binary search algorithm;

[0025] (10) Define a temporary variable: temp = offset + periodLength. If temp ≥ totalLength, end the entire comparison process.

[0026] (11) Repeat steps (7) to (10).

[0027] The beneficial effects of the present invention are:

[0028] The present invention adopts memory block comparison combined with a binary search algorithm to quickly locate the position of the erroneous byte, thereby quickly counting the number of erroneous bytes and calculating the bit error rate; the memory block comparison can quickly determine whether the data of two memory blocks are the same, but cannot determine the specific different positions. Combined with the binary search algorithm, the search range can be continuously narrowed and the error position can be finally located. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 is a flowchart of an embodiment of the present invention;

[0030] Figure 2 A schematic diagram of a message structure received in an embodiment of the present invention;

[0031] Figure 3 A schematic diagram of a message structure including bit errors received in an embodiment of the present invention;

[0032] Figure 4 This is a logic diagram of memory block comparison combined with binary division to locate error bytes in an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0034] Example

[0035] like Figure 1 As shown, a statistical method for bit error rate in flow testing uses memory block comparison combined with a binary search algorithm to count bit errors. The process is as follows: in a memory block comparison process, if the memory block comparison results are consistent, there is no bit error and the test passes; if there is a bit error, the message memory block is divided into two blocks according to the length, and the start and end positions corresponding to the source data memory block are compared respectively. If the comparison result of the first half is inconsistent, the first half of the information is further divided into two blocks according to the length, and then compared, and the cycle is repeated until the error byte is found; the same operation is repeated for the second half. Finally, the number of bytes with error is counted to calculate the bit error rate; specifically including:

[0036] 1. Start the system and receive messages within the specified time. The number of messages received is determined by the receiving time:

[0037] The source sends 188-byte messages with sequence numbers from 0 to 15 in a fixed cycle, so the messages received by the system can be divided into three segments, such as Figure 2 As shown:

[0038] The first segment: x-15 sequence number message block, ending with message sequence number 15, x is determined according to the actual receiving start time;

[0039] The second segment: The serial number is from 0 to 15, and the data information of each cyclic message block is consistent;

[0040] The third segment: 0-x sequence number message block, x is determined according to the actual reception end time, and may be any sequence number from 1 to 15.

[0041] 2. Build the source data memory block:

[0042] Considering the efficiency of memory block comparison, comparing as many messages as possible at one time is the optimal comparison mode. Figure 2 Taking the received message structure as an example, a correct message memory block within a cycle period T is constructed as the source data memory block for memory block comparison.

[0043] 3. Memory block comparison:

[0044] 1) Define the total length of the received message memory block: totalLength; define the cycle memory block length: periodLength;

[0045] 2) Analyze the sequence number of the first message in the received message memory block, recorded as index;

[0046] 3) Calculate the offset position of the source data memory block to be compared according to the index of the first message of the received memory block, recorded as: offset = index * 188;

[0047] 4) Calculate the length of the first memory block and the source data memory block to be compared: length = (16-index) * 188;

[0048] 5) The receiving memory starts from 0, and the source data memory block is compared from offset, and the comparison length is length; if the comparison fails, the erroneous bytes are counted through the binary search algorithm;

[0049] 6) After the first message memory block comparison is completed, the offset position is moved to the beginning of the second memory block: offset = offset + length;

[0050] 7) offset increases according to the period length: offset = offset + periodLength, the length to be compared is length = periodLength;

[0051] 8) If offset≥totalLength, then offset=offset-periodLength, and the length to be compared length=totalLength-offset;

[0052] 9) Memory block comparison: the source data memory block starts at 0, the received message memory block starts at the offset position, and the comparison length is length; if the comparison result fails, the error bytes are counted through the binary search algorithm.

[0053] 10) Define a temporary variable: temp = offset + periodLength. If temp ≥ totalLength, end the entire comparison process.

[0054] 11) Repeat steps 7) to 10).

[0055] 4. Memory block comparison combined with binary search algorithm to quickly locate error logic:

[0056] During the memory block comparison process, if a bit error occurs, the binary search method needs to be used to quickly locate the bit error.

[0057] like Figure 3 The figure shows a complete message with message sequence numbers 0-15, wherein the byte 44 in the rectangular box is a custom error byte.

[0058] Memory block comparison combined with binary search algorithm to quickly locate bit errors. The basic algorithm logic is as follows: Figure 4 As shown:

[0059] Determine the start (Start) and end (End) positions of the memory block, and calculate the middle position (Mid = (Start + End) / 2);

[0060] Compare the (Start+(mid-1)) memory block and the (mid+End-1) memory block respectively to determine the comparison result; if the first half is the same, it means that there is no erroneous byte in this memory block, and return; if the second half is different, it means that the erroneous byte is in the second half, and continue the binary search;

[0061] Reread the above actions until the erroneous byte is located, and save the erroneous byte;

[0062] Calculate the bit error rate based on the number of erroneous bytes counted.

[0063] The above-mentioned embodiments only express the specific implementation of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.

Claims

1. A statistical method for bit error rate in flow testing. It is characterized in that The following steps are involved: Step 1: Start the system and receive messages within the specified time; Step 2: Build source data memory block; Step 3, memory block comparison: During a memory block comparison process, if the memory block comparison results are consistent, there is no bit error and the test passes; if the memory block comparison results are inconsistent, there is a bit error and proceed to the next step; The memory block of step 3 specifically includes the following steps: (1) Define the total length of the received message memory block: totalLength; define the cycle memory block length: periodLength; (2) Analyze the sequence number of the first message in the received message memory block, recorded as index; (3) Calculate the offset position of the source data memory block to be compared according to the index of the first message in the received memory block, which is expressed as: offset = index * a, where a is the number of bytes in the message; (4) Calculate the length of the first memory block to be compared with the source data memory block: length = (b-index)*a, where b is the total number of message sequence numbers; (5) The receiving memory starts at 0, and the source data memory block is compared from offset, with the comparison length being length; if the comparison fails, the erroneous bytes are counted using a binary search algorithm; (6) After the first message memory block comparison is completed, the offset position is moved to the beginning of the second memory block: offset = offset + length; (7) offset increases according to the period length: offset = offset + periodLength, the length to be compared is length = periodLength; (8) If offset ≥ totalLength, then offset = offset - periodLength, and the length to be compared length = totalLength - offset; (9) Memory block comparison: the source data memory block starts at 0, the received message memory block starts at the offset position, and the comparison length is length; if the comparison result fails, the error bytes are counted using a binary search algorithm; (10) Define a temporary variable: temp = offset + periodLength. If temp ≥ totalLength, end the entire comparison process. (11) Repeat steps (7) to (10); Step 4: Compare memory blocks and use a binary search algorithm to quickly locate bit errors: divide the message memory block into two blocks according to length, and compare them with the starting position and ending position corresponding to the source data memory block respectively; if the comparison results of the first half or the second half are inconsistent, further divide the first half or the second half of the information into two blocks according to length, and then compare them, and repeat this process until the erroneous byte is found; finally, count the number of bytes with erroneous bits to calculate the bit error rate.

2. According to the statistical method of bit error rate in the running flow test of claim 1, It is characterized in that In step 2, the source data memory block is constructed as follows: Construct a correct message memory block within a cycle period T as the source data memory block for memory block comparison.