Broadband measurement processing unit forwarding latency test method, test equipment and computer program product
Patent Information
- Application Number
- CN202611364321.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-03
- Publication Date
- 2026-10-23
AI Technical Summary
[0004]有鉴于此,本申请实施例提供了一种宽频测量处理单元转发时延测试方法、测试设备及计算机程序产品,以解决人为操作失误导致的测试失真的问题,实现对宽频测量处理单元转发时延的自动化测试,提高测试效率和测试准确性
[0015]本申请提供了一种宽频测量处理单元转发时延测试方法,该方案通过在测试终端侧获取采集设备发送至宽频测量处理单元的第一业务报文数据以及宽频测量处理单元转发至主站设备的第二业务报文数据,并基于预设通信规约版本对第一业务报文数据中的第一业务报文进行结构化解析以精准提取业务时标信息,进而利用时标信息在第二业务报文数据中筛选对应的第二业务报文,根据第一业务报文的第一接收时间和所述第二业务报文的第二接收时间确定所述宽频测量处理单元的转发时延,避免了人为操作失误导致的测试失真的情况,实现对宽频测量处理单元转发时延的自动化测试,提高测试效率和测试准确性。
Smart Images

Figure CN122970016A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of power equipment performance testing technology, and in particular relates to a method, testing equipment and computer program product for testing the forwarding delay of a broadband measurement and processing unit. Background Technology
[0002] The broadband measurement and processing unit is used for business data interaction between the acquisition device and the master station device. In actual operation, the business messages generated by the acquisition device are received, processed, and forwarded to the master station device by the broadband measurement and processing unit. The message forwarding latency of the broadband measurement and processing unit is an important indicator for measuring its communication processing performance. In scenarios such as equipment factory testing, network access testing, engineering debugging, and operation and maintenance, it is necessary to test the forwarding latency.
[0003] Existing testing methods rely on manual labor, have extremely low automation, are cumbersome, and involve a large workload, resulting in long testing times and low efficiency. Furthermore, manual screening is highly susceptible to subjective judgment and operator fatigue, leading to errors, poor accuracy, and instability, making it difficult to meet the demands of high-volume, high-precision, and high-efficiency testing of broadband measurement and processing unit forwarding delay. Summary of the Invention
[0004] In view of this, embodiments of this application provide a method, testing equipment, and computer program product for testing the forwarding delay of a broadband measurement and processing unit, in order to solve the problem of test distortion caused by human error, realize automated testing of the forwarding delay of a broadband measurement and processing unit, and improve testing efficiency and accuracy.
[0005] To achieve the above objectives, this application provides the following technical solution: The first aspect of this application provides a method for testing the forwarding delay of a broadband measurement and processing unit, applied to a test terminal, the method comprising: Acquire the first service message data sent by the acquisition device to the broadband measurement and processing unit and the second service message data sent by the broadband measurement and processing unit to the master station device; Parse the service message data and obtain the service timestamp information in the service message data based on the parsing result; Based on the service time stamp information of the first service message in the first service message data, filter the second service message corresponding to the first service message in the second service message data; The forwarding delay of the broadband measurement and processing unit is determined based on the first reception time of the first service message and the second reception time of the second service message.
[0006] In one optional embodiment, parsing the service message data and obtaining the service timestamp information in the service message data based on the parsing result includes: According to the preset communication protocol version, the service message data is structured and parsed, and the service time stamp information of each frame of the service message data is read according to the position information of the service field in the structured parsing result.
[0007] In one optional embodiment, the service message data is structured and parsed according to a preset communication protocol version, and the service time stamp information of each frame of the service message data is read based on the position information of the service fields in the structured parsing result, including: Load the parsing rules corresponding to the preset communication protocol version; The location information of each service field in each frame of the service message data is determined according to the parsing rules. Based on the location information in the service timestamp field, read the SOC time data and second-by-second data of each frame of the service message.
[0008] In one optional embodiment, based on the service time stamp information of the first service message in the first service message data, the second service message corresponding to the first service message is filtered from the second service message data, including: The SOC time data and the second-division data of the first service message in the first service message data are subjected to data standardization processing, and matching conditions are constructed. Based on the matching conditions, retrieve the service messages that match the matching conditions from the second service message data; If a service message matching the conditions is found, then the service message matching the conditions is identified as the second service message.
[0009] In an optional embodiment, before acquiring the first service message data sent by the acquisition device to the broadband measurement processing unit and the second service message data sent by the broadband measurement processing unit to the master station device, the method further includes: When the acquisition device, broadband measurement and processing unit, and master station device are connected to the same switch, port mirroring is performed on the first communication port and the second communication port connected to the broadband measurement and processing unit in the switch to acquire all communication message data received and sent by the broadband measurement and processing unit. The broadband measurement and processing unit communicates with the acquisition device through the first communication port and with the master station device through the second communication port.
[0010] In one optional embodiment, acquiring the first service message data sent by the acquisition device to the broadband measurement processing unit and the second service message data sent by the broadband measurement processing unit to the master station device includes: Based on the first service port number and first IP address of the acquisition device, the first service message data sent by the acquisition device to the broadband measurement and processing unit is obtained from the communication message data obtained by mirroring through the first communication port; Based on the second service port number and second IP address of the master station device, the second service message data sent by the broadband measurement and processing unit to the master station device is obtained from the communication message data obtained by mirroring through the second communication port.
[0011] In an optional embodiment, determining the forwarding delay of the broadband measurement processing unit based on the first reception time of the first service packet and the second reception time of the second service packet includes: Obtain the first reception time of the first service message and the second reception time of the second service message. The first reception time is the time when the test terminal receives the first service message in the mirror of the first communication port, and the second reception time is the time when the test terminal receives the second service message in the mirror of the second communication port. The forwarding delay of the broadband measurement and processing unit is determined based on the difference between the first reception time and the second reception time.
[0012] In an optional embodiment, the method further includes: If no second service message corresponding to the first service message is found, output the service timestamp information of the first service message and generate a test exception prompt. If a second service message corresponding to the first service message is found, a forwarding delay test result is generated based on the forwarding delay and a preset delay threshold.
[0013] A second aspect of this application provides a test apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the broadband measurement processing unit forwarding delay test methods described above.
[0014] A third aspect of this application provides a computer program product, including a computer program that, when run, causes the broadband measurement processing unit forwarding delay test method as described in any of the preceding claims to be executed.
[0015] This application provides a method for testing the forwarding delay of a broadband measurement and processing unit (BMT). This method acquires first service message data sent from a data acquisition device to the BMT and second service message data forwarded by the BMT to a master station device at the test terminal. Based on a preset communication protocol version, it performs structured parsing of the first service message data to accurately extract service timestamp information. Then, it uses the timestamp information to filter corresponding second service messages from the second service message data. Finally, it determines the forwarding delay of the BMT based on the first reception time of the first service message and the second reception time of the second service message. This method avoids test distortion caused by human error, automates the testing of the BMT's forwarding delay, and improves testing efficiency and accuracy. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart of the broadband measurement and processing unit forwarding delay test method provided in the embodiments of this application; Figure 2 This is a schematic diagram of the testing equipment provided in the embodiments of this application; Figure 3 This is a schematic diagram of a computer program product provided in an embodiment of this application. Detailed Implementation
[0018] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0019] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0020] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0021] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0022] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0023] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0024] like Figure 1 The diagram shown is a flowchart of a broadband measurement processing unit forwarding delay testing method provided in an embodiment of this application. The method includes: Step S101: Obtain the first service message data sent by the acquisition device to the broadband measurement processing unit and the second service message data sent by the broadband measurement processing unit to the master station device.
[0025] This step aims to establish the bidirectional communication data foundation required for testing. In practice, the acquisition equipment, broadband measurement and processing unit, and master station equipment are connected to the same switch network. The test terminal seamlessly captures bidirectional traffic in the communication link through the port mirroring function of the switch or a series-connected splitter / TAP (Test Access Point) device. After acquiring the raw communication packets, the test terminal filters and classifies the packets according to the preset communication protocol version, using source / destination IP addresses, port numbers, etc., thereby accurately extracting the first and second service packet data that conform to specific service characteristics. This process ensures the integrity of the input and output data, providing raw data support for subsequent latency analysis.
[0026] Step S102: Parse the service message data and obtain the service time stamp information in the service message data based on the parsing results.
[0027] This step is used to extract key fields identifying the time of data generation from the message payload. Service time stamp information typically includes SOC (Second of Century) time data and RRACSEC (Fraction of Second) data, used to maintain the uniqueness of the same data event throughout the data flow. The test terminal first identifies the communication protocol followed by the message (such as IEC 61850) and loads the corresponding parsing rule base. This rule base defines the offset, length, and data type of each field in the message frame structure. Based on the parsing rules, the test terminal locates the specific position of the service time stamp field in the message, reads the corresponding hexadecimal or alphanumeric value, and converts it to a standard time format. For example, the SOC and RRACSEC fields at a specific byte offset can be read directly, or the time stamp data immediately following can be extracted after matching the feature code through a state machine. Through precise protocol parsing, the unique time identifier of each message frame can be accurately extracted from massive amounts of messages, laying the foundation for cross-link message matching.
[0028] Step S103: Based on the service time stamp information of the first service message in the first service message data, filter the second service message corresponding to the first service message in the second service message data.
[0029] Since the broadband measurement and processing unit typically retains the core service time stamp information of the packet unchanged during forwarding, this time stamp information can serve as the sole basis for establishing the input-output correspondence. The test terminal selects a frame of the first service packet from the first service packet data, extracts its service time stamp information, performs standardization processing, and constructs matching conditions. Subsequently, it searches in the second service packet data, comparing whether the service time stamp information of each packet is consistent with the matching conditions. If a packet with completely consistent service time stamp information is found, it is identified as the second service packet corresponding to the first service packet. In specific implementation, the SOC time and seconds can be combined into a unique retrieval key value for quick searching in a hash table or index database; alternatively, a sliding window algorithm can be used to sequentially scan the second service packet data stream to find packet segments with matching time stamps. This precise filtering mechanism based on service time stamps can effectively eliminate interference factors such as network jitter and out-of-order delivery, accurately locking the input-output correspondence of packets in the broadband measurement and processing unit.
[0030] Step S104: Determine the forwarding delay of the broadband measurement and processing unit based on the first reception time of the first service message and the second reception time of the second service message.
[0031] This step aims to quantify the absolute delay generated by a single frame of data passing through the broadband measurement and processing unit. The first reception time and the second reception time are the physical times at which the test terminal receives the first and second service packets, respectively. Since both timestamps are marked by the test terminal based on the same local clock source, the difference between them directly reflects the processing and forwarding time of the packet within the broadband measurement and processing unit, and is unaffected by the clock synchronization status between the acquisition device, the broadband measurement and processing unit, or the master station device. After determining the correspondence, the test terminal reads the first and second reception times from the packet capture source data and calculates the difference between them, which is the forwarding delay. For example, a high-precision timer can be used to calculate the microsecond or millisecond difference between the two timestamps, or the timestamps can be uniformly converted to nanosecond values before subtraction. This method eliminates system errors caused by clock asynchrony between devices and provides objective and accurate performance evaluation indicators.
[0032] The aforementioned technical process acquires full bidirectional message data through port mirroring, ensuring the integrity of the test data; it extracts service timestamp information based on deep parsing of the communication protocol, achieving standardized processing of messages from different protocol versions; it establishes a precise message correspondence in the input and output data streams using service timestamp information, avoiding the problem of mismatches that are easily caused by manual screening; and finally, it calculates the latency based on the local received timestamp of the test terminal, eliminating system errors caused by clock asynchrony between devices. This entire automated testing process achieves a closed loop from data acquisition to result output, significantly improving the automation, accuracy, and reliability of the test.
[0033] One possible implementation involves parsing the service message data and obtaining the service time stamp information from the service message data based on the parsing results. This includes: performing structured parsing of the service message data according to a preset communication protocol version, and reading the service time stamp information of each frame of the service message data based on the position information of the service fields in the structured parsing results.
[0034] The preset communication protocol version serves as the baseline for message parsing. It is not a fixed, single value, but rather a dynamically configured parameter based on the actual communication standards supported by the broadband measurement and processing unit under test. Before system initialization or test task initiation, the communication protocol standard used in the current test scenario is determined based on user input on the test terminal. This includes broadband measurement communication protocols such as V2 (Q-GDW131-2006 Technical Specification for Real-time Dynamic Monitoring System of Power Systems), V3 (GBT26865.2-2011 Real-time Dynamic Monitoring System of Power Systems), or V4 (GBT 26865.2-2023 Real-time Dynamic Monitoring System of Power Systems). The configuration of this parameter is based on the firmware model of the device under test or the field operating procedures, aiming to provide the corresponding version of the byte arrangement rules and offset mapping table for the subsequent parsing algorithm, ensuring that the parsing logic strictly matches the actual message format. For example, it can be set to V3 to adapt to the communication requirements of mainstream broadband measurement and processing units.
[0035] Structured parsing is a crucial process that transforms raw byte stream messages into a sequence of data fields with logical semantics. Once the predefined communication protocol version is determined, the business message data is structurally decomposed from top to bottom according to the corresponding protocol specifications. This process first determines the frame start position by scanning the fixed frame synchronization word (e.g., 0xAA) in the message header. Then, based on the protocol version, it identifies the frame type field and the frame byte number segment, thereby determining the length boundaries of the data frame and the order of subsequent fields. Through this progressively layered parsing logic, the originally flat hexadecimal data stream is mapped into information entities containing multi-layered nested structures. For example, a continuous byte sequence is divided into independent logical units such as frame headers, identifiers, timestamps, data payloads, and checksums, thus laying the structural foundation for accurately locating specific business fields.
[0036] The location information of a business field refers to the specific offset and length range of the target field in the message data stream, determined during structured parsing. Due to significant differences in frame structure between different versions of the communication protocol (e.g., the V2 version does not include the PDC_IDCODE field while the V3 version does), the byte position of business fields with the same semantics may shift in different versions of the message. By comparing with a preset communication protocol version and calling the corresponding field offset table, the starting byte offset and number of bytes occupied by time stamp fields such as SOC (century second) and FRACSEC (seconds in minutes) within the current frame are accurately calculated. This location information is provided to the reading module in the form of a pointer index or parameterized configuration, guiding it to extract data from the correct byte range.
[0037] After obtaining the location information of the service field, the corresponding hexadecimal data block is directly extracted from the message data stream based on this location information to read the service time stamp information of each frame of the service message data. Using the aforementioned offset and length parameters, a precise byte extraction operation is performed on each frame of the service message to capture the timestamp data encapsulated at a specific location in the message. For the SOC field, it is typically extracted as 4 bytes of hexadecimal data; for the FRACSEC field, it is also extracted as 3 bytes of hexadecimal data. This reading process not only captures the original byte values but also converts the hexadecimal bit stream into a numerical format that can be computed and processed according to the data type defined in the structured parsing results, thereby completing the conversion from physical signal to logical data and providing a precise time stamp reference for subsequent delay calculations.
[0038] This version-adaptive structured parsing method can adaptively process broadband measurement communication messages of different versions, transforming generic byte streams into standardized business data. This not only eliminates the tedious process of manually comparing message structures but also avoids the risk of field misalignment due to protocol version confusion, ensuring the uniqueness and accuracy of extracted business timestamp information and providing reliable data input for the entire forwarding latency testing process.
[0039] In another optional embodiment, the service message data is structured and parsed according to a preset communication protocol version, and the service time stamp information of each frame of the service message data is read based on the position information of the service fields in the structured parsing result, including: Step S201: Load the parsing rules corresponding to the preset communication protocol version.
[0040] Parsing rules are predefined logical instruction sets based on specific communication protocol standards, used to guide test terminals in identifying and extracting valid information from hexadecimal data streams. During system initialization or test task startup, based on the user-configured communication protocol version (e.g., V2, V3, or V4), the matching parsing rules are retrieved from the rule base and invoked. This loading process maps version identifiers to corresponding rule files or memory objects, which define in detail the offsets, data types, byte order, and lengths of each field in the message frame structure. Taking the V3 protocol as an example, the loaded parsing rules include the specific positions of fields such as frame synchronization header, frame byte count, PDC_IDCODE, SOC time, time quality, and second-division data in the message frame. Through a dynamic loading mechanism, test terminals can adapt to different versions of communication protocols without modifying code, enabling flexible configuration of parsing logic. After loading, the parsing rules reside in memory for subsequent data structure parsing steps to invoke.
[0041] In application, the parsing rules for version V2 are as follows: the frame begins with the real-time channel SYNC frame synchronization word; the first byte, 0xaa, is the real-time frame synchronization header; the second byte has bit 7 reserved, bits 6-4 set to 0, and bits 3-0 as the version number; the third and fourth bytes are the frame byte count; the fifth to eighth bytes are the SOC time; the ninth byte is the time quality; and the tenth to twelfth bytes are the seconds. The parsing rules for version V3 are as follows: the first byte, 0xaa, is the real-time frame synchronization header; the second byte has bit 7 reserved, bits 6-4 set to 0, and bits 3-0 as the version number; the third and fourth bytes are the frame byte count; the fifth to twelfth bytes are the PDC_IDCODE; the thirteenth to sixteenth bytes are the SOC time; the seventeenth byte is the time quality; and the eighteenth to twentieth bytes are the seconds. The parsing rules for version V4 are as follows: the first byte 0xaa is the real-time frame synchronization header; the second byte has bit 7 reserved, bits 6-4 set to 0, and bits 3-0 as the version number; the third to sixth bytes are the frame byte count; the seventh to fourteenth bytes are the PDC_IDCODE; the fifteenth to eighteenth bytes are the SOC time; the nineteenth byte is the time quality; and the twentieth to twenty-second bytes are the seconds.
[0042] Step S202: Determine the location information of each service field in each frame of the service message data according to the parsing rules.
[0043] The service message data is raw communication data existing in the form of a hexadecimal byte stream, with various service fields closely arranged within it. Using the loaded parsing rules, the captured service message data is scanned and located frame by frame. First, the start boundary of the message frame is identified according to the frame synchronization header (e.g., 0xAA) defined in the parsing rules. Then, based on the offset of each field relative to the frame header and the byte length in the rules, the exact start and end positions of each service field in the current message frame are calculated. For example, if the parsing rules indicate that the SOC time field is located at the 13th to 16th bytes of the frame start position, the absolute address index of these four bytes in the current message data stream is calculated accordingly. For different protocol versions, due to differences in the length of fields such as PDC_IDCODE (e.g., this field is absent in version V2, while it occupies 8 bytes in version V3), the positions of subsequent service fields will change accordingly. Through dynamic calculation of the parsing rules, an accurate position information mapping table can be adaptively generated, ensuring the accuracy and consistency of field location in mixed protocol or version switching scenarios.
[0044] Step S203: Read the SOC time data and second division data of each service message frame according to the location information of the service time stamp field. The SOC time data records the century second of the message transmission time, and the second division data is the time supplement data with microsecond or millisecond precision corresponding to that second. Together, they constitute the complete service time stamp information. After determining the specific location information of the service time stamp field (i.e., the SOC time field and the second division field), the original value of the corresponding byte is read directly from the hexadecimal message data stream according to the location information. During the reading process, according to the byte offset indicated by the location information, the storage unit where the SOC time field is located is located, and four consecutive bytes of hexadecimal data are read; similarly, the storage unit where the second division field is located is located, and three consecutive bytes of hexadecimal data are read. Subsequently, the read hexadecimal data is converted into a computable numerical format according to the byte order specified by the parsing rules (such as big-endian or little-endian mode). For example, the hexadecimal SOC time data is converted into a decimal Unix timestamp, and the time quality bits and time integer bits in the second division data are parsed. This precise, point-to-point reading operation enables the extraction of high-precision timestamp data from massive amounts of packets. This data not only records the exact moment the service occurred but also serves as the core comparison basis for subsequent packet matching and latency calculation, thereby ensuring the accuracy of forwarding latency test results.
[0045] The above steps accurately calculate the position of key timestamp fields in the message by dynamically loading specific versions of parsing rules, and read standardized SOC time data and second-division data accordingly. This realizes the automatic conversion from raw hexadecimal messages to structured business timestamp information, providing an accurate and reliable data foundation for subsequent timestamp-based message matching and delay calculation.
[0046] One possible implementation involves filtering the second service message corresponding to the first service message from the second service message data based on the service time stamp information of the first service message in the first service message data, and further includes: Step S301: Perform data standardization processing on the SOC time data and second-division data of the first service message in the first service message data, and construct matching conditions.
[0047] Data standardization aims to convert the raw byte stream data in a message into a unified data format and numerical standard, eliminating matching obstacles caused by differences in byte order or number base representation. In the first service message, SOC time data and second-by-second data are typically transmitted in hexadecimal byte stream format. By converting this hexadecimal data into decimal values, data standardization is achieved, thereby unifying heterogeneous data representations from different protocol versions or hardware platforms to the same numerical space and avoiding mismatches caused by format differences.
[0048] The original SOC value and seconds are extracted from the parsed business time stamp information. Based on preset data conversion rules, the hexadecimal SOC value is converted to a decimal absolute timestamp, and the seconds are converted to corresponding millisecond-level offsets. The converted data is then combined into standardized time pairs. This time frame forms the basis for subsequent searches.
[0049] Based on the standardized data, matching conditions are constructed to accurately locate target packets within a massive dataset. These matching conditions consist of query logic comprised of the standardized time pairs described above, and are essentially based on logical judgments of numerical equivalence, rather than simple string comparisons. For example, a matching condition might be set as: in the dataset to be retrieved, the search SOC time is equal to... And the time is equal to the second. The message record. Since the combination of SOC and equal seconds is unique in all messages under the condition that the clock is not manually modified and transmission is continuous, this matching condition can uniquely identify a sampling service.
[0050] Step S302: Based on the matching conditions, retrieve the service messages that match the matching conditions from the second service message data.
[0051] The second service message data can refer to the complete set of messages forwarded by the broadband measurement and processing unit to the master station equipment, which contains a large number of time-sequential data frames. Using the matching conditions constructed in step S301, a full-domain search is performed on the second service message data. Each frame of the second service message data is traversed, the service time stamp information corresponding to each frame is extracted, and the time stamp information of the message is standardized to obtain the time pairs to be compared.
[0052] The time pair to be compared is compared with the standard time pair in the matching criteria to verify whether the two time pairs are strictly equal in value. If the normalized SOC time and second division data of a certain frame are completely consistent with the matching criteria, the frame is determined to be a match. This retrieval process utilizes the characteristic of unique identifiers to quickly locate unique forwarded packets from massive amounts of data. Compared with traditional manual search or imprecise matching based on raw byte streams, this retrieval method significantly improves the accuracy and automation of matching.
[0053] Step S303: If a service message matching the conditions is found, then the service message matching the conditions is identified as the second service message.
[0054] When a matching message is successfully found in the second service message data, it means that the corresponding message of the first service message after being forwarded by the broadband measurement processing unit has been successfully traced. At this point, the service message that matches the conditions is officially identified as the second service message.
[0055] This determination process marks the completion of the message matching phase. The determined second service message and the first service message are, logically, two transmission states of the same sampled data: the first service message represents the source data sent by the acquisition device, and the second service message represents the forwarded data received by the master station device. Establishing this clear correspondence provides a solid data foundation for the subsequent accurate calculation of the forwarding delay of the broadband measurement and processing unit. If no matching service message is found, the matching is considered a failure, and the system can determine this as a frame loss anomaly without performing the determination operation.
[0056] By standardizing the SOC time data and second-division data and constructing matching conditions, the negative impact of differences in the original message data format on matching accuracy is eliminated. This ensures high-accuracy message association under different communication protocol versions or hardware architectures, thereby guaranteeing the reliability and consistency of forwarding delay test results.
[0057] In another embodiment, before acquiring the first service message data sent by the acquisition device to the broadband measurement processing unit and the second service message data sent by the broadband measurement processing unit to the master station device, the method further includes: When the acquisition device, broadband measurement and processing unit, and master station device are connected to the same switch, port mirroring is performed on the first and second communication ports connected to the broadband measurement and processing unit in the switch to acquire all communication message data received and sent by the broadband measurement and processing unit. The broadband measurement and processing unit communicates with the acquisition device through the first communication port and with the master station device through the second communication port.
[0058] Building a test LAN is a prerequisite for performing packet latency testing. The acquisition devices, broadband measurement and processing unit, and master station equipment are all connected to the same switch, placing them within the same Layer 2 broadcast domain. This physical networking method ensures that all communication traffic between the devices under test is forwarded through the switch's internal backplane, providing a unified physical access point for subsequent traffic capture. In this architecture, the switch acts as the core data forwarding node, carrying uplink data sent from the acquisition devices to the broadband measurement and processing unit, and downlink data forwarded from the broadband measurement and processing unit to the master station equipment. This allows external monitoring devices to indirectly obtain the complete communication content between devices by listening to the switch port status.
[0059] By utilizing the port mirroring function of the switch, two key communication ports connected to the broadband measurement processing unit are configured to ensure complete data acquisition of communication messages. The first communication port serves as the physical interface for data interaction between the broadband measurement processing unit and the acquisition device, while the second communication port serves as the physical interface for data interaction between the broadband measurement processing unit and the master station device. The first and second communication ports are designated as mirroring source ports, and the switch port connected to the test terminal is designated as the mirroring destination port.
[0060] Based on the above configuration, the switch, without affecting the normal forwarding of the original services, completely copies all communication packet data flowing through the first and second communication ports and forwards it to the test terminal. This hardware-based mirroring acquisition method can fully acquire the first service packet data received by the broadband measurement processing unit from the acquisition device, as well as the second service packet data sent by the broadband measurement processing unit to the master station device. Since the data capture process is independent of the processor load and software running state of the broadband measurement processing unit itself, it effectively avoids packet loss caused by the processing delay or resource preemption of the protocol stack inside the device under test. By constructing a transparent and lossless traffic monitoring channel, it ensures that the first and second service packet data used for latency calculation have a complete time sequence relationship and original content integrity, thereby improving the accuracy and reliability of forwarding latency testing.
[0061] In another optional embodiment, acquiring the first service message data sent by the acquisition device to the broadband measurement processing unit and the second service message data sent by the broadband measurement processing unit to the master station device includes: Step S401: Based on the first service port number and first IP address of the acquisition device, obtain the first service message data sent by the acquisition device to the broadband measurement processing unit from the communication message data obtained by mirroring through the first communication port.
[0062] The first service port number and the first IP address are address tuples used to uniquely identify the communication process of the acquisition device in network communication. Their values are determined by the specific communication protocol and the on-site network planning. In the test environment, the mirrored data of the first communication port contains all network traffic exchanged between the acquisition device and the broadband measurement processing unit, which may be mixed with control messages, heartbeat messages, or other irrelevant data. In order to accurately filter out the target service data, a five-tuple filtering strategy is adopted, using the first IP address and the first service port number of the acquisition device as the core matching conditions.
[0063] For ease of understanding, the following test environment configuration parameters are provided as an example in the embodiments of this application: The IP address of the data acquisition device is 192.168.1.10, and the service port number is 7000; the IP address of the main station device is 192.168.2.10, and the service port number is 9000.
[0064] The communication message data obtained by mirroring through the first communication port is traversed, and the network layer header and transport layer header of each frame are checked to extract the source IP address and source port number of the message. When the source IP address of the message is 192.168.1.10, the source port number is 7000, and the message payload meets the characteristics of the service frame, the message is determined to be a valid service message sent by the acquisition device to the broadband measurement and processing unit, that is, the first service message data.
[0065] Step S402: Based on the second service port number and second IP address of the master station device, obtain the second service message data sent by the broadband measurement processing unit to the master station device from the communication message data obtained by mirroring through the second communication port.
[0066] The second service port number and the second IP address are used to uniquely identify the listening address of the master station device in the communication link between the broadband measurement processing unit and the master station device. The mirrored data of the second communication port is cleaned using filtering logic similar to the steps described above.
[0067] The communication message data obtained by mirroring through the second communication port is traversed, and the network layer header and transport layer header of each frame are checked to extract the destination IP address and destination port number of the message. When the destination IP address of the message is 192.168.2.10, the destination port number is 9000, and the message payload meets the service frame characteristics, the message is determined to be a valid service message sent by the broadband measurement and processing unit to the master station equipment, that is, the second service message data.
[0068] By utilizing the IP address and port number characteristics of the acquisition device and the master station device, one-way service packet data from the acquisition device to the broadband measurement and processing unit and from the broadband measurement and processing unit to the master station device can be accurately separated from the mixed mirrored traffic. This network address matching filtering mechanism effectively eliminates non-target traffic in the mirrored data, providing a clean and accurate data foundation for subsequent packet parsing and latency calculation, thereby ensuring the accuracy of the forwarding latency test results.
[0069] In another optional embodiment, determining the forwarding delay of the broadband measurement processing unit based on the first reception time of the first service message and the second reception time of the second service message includes: Step S501: Obtain the first reception time of the first service message and the second reception time of the second service message. The first reception time is the time when the test terminal receives the first service message in the mirror of the first communication port, and the second reception time is the time when the test terminal receives the second service message in the mirror of the second communication port.
[0070] The test terminal listens to both the first and second communication ports, capturing the mirrored first and second service packets and recording their arrival times as the reception times. The first service packet is uplink data sent from the acquisition device to the broadband measurement processing unit, mirrored to the test terminal via the first communication port; the second service packet is downlink data sent from the broadband measurement processing unit to the master station device, mirrored to the test terminal via the second communication port. Upon detecting the arrival of a packet, the test terminal reads the high-precision count value of its local system clock and marks it as the first and second reception times, respectively. Since both timestamps originate from the same internal clock source within the test terminal, they possess natural time reference consistency, effectively avoiding measurement errors introduced by clock asynchrony between the acquisition device, the broadband measurement processing unit, and the master station device.
[0071] Step S502: Determine the forwarding delay of the broadband measurement and processing unit based on the difference between the first reception time and the second reception time.
[0072] Using the first and second reception times obtained above, the time difference between them is calculated to characterize the forwarding delay of the broadband measurement processing unit. This calculation process can be expressed as: ,in, Due to forwarding delay, For the second receiving time, The first reception time is calculated based on the time difference of the local clock of the same test terminal. This allows for the precise identification of the processing time and queuing time of data packets within the broadband measurement and processing unit, eliminating interference from external network transmission delays and clock deviations between devices. The test terminal generates a forwarding latency report based on this calculation result, used to quantitatively evaluate whether the performance indicators of the broadband measurement and processing unit meet preset standards (e.g., latency less than 200ms).
[0073] The above steps work together to determine the forwarding delay based on the mirror reception time difference between the first and second communication ports, eliminating the impact of clock asynchrony between multiple devices on the test results and ensuring that the test results can truly reflect the actual forwarding processing performance of the broadband measurement and processing unit.
[0074] In one possible implementation, the method further includes: If no second service message corresponding to the first service message is found, output the service timestamp information of the first service message and generate a test exception message.
[0075] During the message matching process, if no target message matching the service timestamp information of the first service message is found in the second service message data, a frame loss anomaly is determined to have occurred. In response to this matching failure, a test anomaly message is generated as a structured fault feedback signal. This test anomaly message transforms the intermediate state of unsuccessful matching into an alarm object that can be captured by external monitoring or log systems. Its content includes the time of the anomaly, the anomaly type (e.g., frame loss), the anomaly source identifier, and related message information. The storage format can be, for example, JSON or XML, to facilitate subsequent data cleaning and statistical analysis. Simultaneously, the service timestamp information (including SOC time data and second-by-second data) of the first service message that caused the anomaly is output as a key index for fault tracing. This service timestamp information is raw data directly extracted from the parsing results of the first service message, objectively recording the temporal characteristics of the lost message. By outputting this timestamp information, testers or subsequent analysis programs can accurately locate the position of the lost message in the time series, thereby investigating whether it is due to interruption of transmission by the acquisition device, forwarding failure of the broadband measurement processing unit, or packet loss in the link transmission. The system generates test exception prompts and outputs business time stamp information, thus constructing a closed-loop quality control mechanism for the testing process. This makes latent faults explicit and ensures the traceability of the testing process and the diagnosability of faults.
[0076] If a second service message corresponding to the first service message is found, a forwarding delay test result is generated based on the forwarding delay and a preset delay threshold.
[0077] After successfully filtering the second service message corresponding to the first service message from the second service message data and calculating the forwarding delay, the calculated forwarding delay value is compared with a preset delay threshold to generate the final forwarding delay test result. The preset delay threshold is a quantitative standard for judging whether the device performance is qualified. Its determination method can be based on broadband measurement communication industry standards (such as 200 milliseconds), or it can be configured differently according to the real-time requirements of specific projects. For example, for highly sensitive scenarios, it can be set to 100 milliseconds or 150 milliseconds. This threshold is loaded into the memory configuration area during the system initialization phase. The process of generating the forwarding delay test result is essentially a logical judgment and data encapsulation process: by comparing the forwarding delay with the preset delay threshold, it is determined whether the forwarding performance meets the standard. The judgment result (such as qualified or unqualified), the specific value of the forwarding delay, the service timestamp information, and the test timestamp are aggregated to form a complete forwarding delay test result record. The test results are recorded for subsequent performance evaluation report generation. For example, they can be used to statistically analyze key performance indicators such as average latency, maximum latency, and exceedance rate over long-term operation. By generating test results based on forwarding latency and preset latency thresholds, automated quantitative evaluation of the forwarding performance of the broadband measurement and processing unit is achieved, replacing manual judgment, ensuring the objectivity and consistency of test results, and supporting long-term trend analysis of equipment health status.
[0078] The aforementioned technical processes collaboratively address the technical challenges of lacking feedback mechanisms and the inability to automatically quantify and evaluate test results in matching failure scenarios. By outputting business time stamp information and generating test anomaly prompts when matching fails, precise fault feature localization and alarms are achieved, ensuring the observability of the testing process. By automatically generating test results based on latency thresholds when matching succeeds, a closed loop from raw data to performance judgment is completed. This enables the entire testing system to automatically identify frame loss anomalies and output structured performance evaluation conclusions without human intervention, significantly improving the engineering practicality and fault diagnosis capabilities of the testing system.
[0079] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0080] Figure 2 This is a schematic diagram of the structure of a test device provided in one embodiment of this application. Figure 2 As shown, the test device 2 in this embodiment includes: at least one processor 20 ( Figure 2Only one is shown in the diagram), memory 21, and computer program 22 stored in the memory 21 and executable on the at least one processor 20, wherein the processor 20 executes the computer program 22 to implement the steps in any of the above-described broadband measurement processing unit forwarding delay test method embodiments.
[0081] The test device 2 can be a desktop computer, laptop, handheld computer, or cloud server, etc. This test device may include, but is not limited to, a processor 20 and a memory 21. Those skilled in the art will understand that... Figure 2 This is merely an example of test device 2 and does not constitute a limitation on test device 2. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, etc.
[0082] The processor 20 can be a Central Processing Unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0083] In some embodiments, the memory 21 may be an internal storage unit of the test device 2, such as a hard disk or memory of the test device 2. In other embodiments, the memory 21 may be an external storage device of the test device 2, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the test device 2. Further, the memory 21 may include both internal and external storage units of the test device 2. The memory 21 is used to store operating systems, applications, bootloaders, data, and other programs, such as the program code of computer programs. The memory 21 can also be used to temporarily store data that has been output or will be output.
[0084] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0085] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0086] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0087] like Figure 3 As shown, this application embodiment provides a computer program product 300, including a computer program 22. When the computer program 22 is run, the steps in the above-described broadband measurement processing unit forwarding delay test method embodiments are executed.
[0088] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a device / testing equipment, a recording medium, a computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0089] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0090] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0091] In the embodiments provided in this application, it should be understood that the disclosed test equipment and methods can be implemented in other ways. For example, the test equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0092] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0093] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for testing the forwarding delay of a broadband measurement and processing unit, characterized in that, Applied to a test terminal, the method includes: Acquire the first service message data sent by the acquisition device to the broadband measurement and processing unit and the second service message data sent by the broadband measurement and processing unit to the master station device; Parse the service message data and obtain the service timestamp information in the service message data based on the parsing result; Based on the service time stamp information of the first service message in the first service message data, filter the second service message corresponding to the first service message in the second service message data; The forwarding delay of the broadband measurement and processing unit is determined based on the first reception time of the first service message and the second reception time of the second service message.
2. The broadband measurement and processing unit forwarding delay test method as described in claim 1, characterized in that, The step of parsing the service message data and obtaining the service timestamp information in the service message data based on the parsing result includes: According to the preset communication protocol version, the service message data is structured and parsed, and the service time stamp information of each frame of the service message data is read according to the position information of the service fields in the structured parsing result.
3. The broadband measurement and processing unit forwarding delay test method as described in claim 2, characterized in that, The step of performing structured parsing of the service message data according to a preset communication protocol version, and reading the service time stamp information of each frame of the service message data based on the position information of the service fields in the structured parsing result, includes: Load the parsing rules corresponding to the preset communication protocol version; The location information of each service field in each frame of the service message data is determined according to the parsing rules. Based on the location information in the service timestamp field, read the SOC time data and second-by-second data of each frame of the service message.
4. The broadband measurement and processing unit forwarding delay test method as described in claim 3, characterized in that, The step of filtering the second service message corresponding to the first service message in the second service message data based on the service time stamp information of the first service message in the first service message data includes: The SOC time data and the second-division data of the first service message in the first service message data are subjected to data standardization processing, and matching conditions are constructed. Based on the matching conditions, retrieve the service messages that match the matching conditions from the second service message data; If a service message matching the conditions is found, then the service message matching the conditions is identified as the second service message.
5. The broadband measurement and processing unit forwarding delay test method as described in claim 1, characterized in that, Before acquiring the first service message data sent by the acquisition device to the broadband measurement and processing unit and the second service message data sent by the broadband measurement and processing unit to the master station device, the process further includes: When the acquisition device, broadband measurement and processing unit, and master station device are connected to the same switch, port mirroring is performed on the first communication port and the second communication port of the switch connected to the broadband measurement and processing unit to fully acquire the communication message data received and sent by the broadband measurement and processing unit. The broadband measurement and processing unit communicates with the acquisition device through the first communication port and with the master station device through the second communication port.
6. The broadband measurement and processing unit forwarding delay test method as described in claim 5, characterized in that, The acquisition of the first service message data sent by the acquisition device to the broadband measurement and processing unit and the second service message data sent by the broadband measurement and processing unit to the master station device include: Based on the first service port number and first IP address of the acquisition device, the first service message data sent by the acquisition device to the broadband measurement and processing unit is obtained from the communication message data obtained by mirroring through the first communication port; Based on the second service port number and second IP address of the master station device, the second service message data sent by the broadband measurement and processing unit to the master station device is obtained from the communication message data obtained by mirroring through the second communication port.
7. The broadband measurement and processing unit forwarding delay test method as described in claim 5, characterized in that, The step of determining the forwarding delay of the broadband measurement processing unit based on the first reception time of the first service message and the second reception time of the second service message includes: Obtain the first reception time of the first service message and the second reception time of the second service message. The first reception time is the time when the test terminal receives the first service message in the mirror of the first communication port, and the second reception time is the time when the test terminal receives the second service message in the mirror of the second communication port. The forwarding delay of the broadband measurement and processing unit is determined based on the difference between the first reception time and the second reception time.
8. The broadband measurement and processing unit forwarding delay test method as described in any one of claims 1 to 7, characterized in that, The method further includes: If no second service message corresponding to the first service message is found, output the service timestamp information of the first service message and generate a test exception prompt. If a second service message corresponding to the first service message is found, a forwarding delay test result is generated based on the forwarding delay and a preset delay threshold.
9. A testing device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the broadband measurement processing unit forwarding delay test method as described in any one of claims 1 to 8.
10. A computer program product, characterized in that, Includes a computer program, which, when run, causes the broadband measurement processing unit forwarding delay test method as described in any one of claims 1 to 8 to be executed.