Test methods and related equipment for shaping protocols in vehicular TSN networks
Patent Information
- Application Number
- CN202611078957.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-09-29
AI Technical Summary
但常规方式往往难以在时间轴上指定某一时刻来模拟干扰数据,无法精确命中上述算法关键时间点,常常通过长时间大范围干扰来完成,对被测网络会造成极大负担,难以完成对整形器配置参数的有效验证
1、由于采用了首先获取待测数据流,该待测数据流涵盖车载场景下的各个业务数据,为后续测试提供数据支持,并基于该待测数据流提取待测Qav整形协议和待测Qbv整形协议的运行参数,基于该运行参数生成针对待测Qbv整形协议特定时间点的第一干扰数据,以及基于该运行参数生成针对待测Qav整形协议特定猝发干扰周期的第二干扰数据,通过生成特定情况下干扰数据,以便后续对关键参数和边界进行测试。根据测试调节参数,分别对待测Qbv整形协议和待测Qav整形协议在特定时间点和特定时间周期进行测试,能够精确命中上述算法关键时间点,从而对关键参数和边界进行充分验证,并对测试数据进行采集,评估测试运行结果,实现对车载TSN网络的整形效果的有效干扰测试和评估。所以,有效解决了相关技术中通过常规方式无法模拟特定时刻的干扰数据,进而无法对整形效果进行有效验证的问题。
Smart Images

Figure CN122845480A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network transmission testing technology, specifically to a testing method and related equipment for shaping protocols in vehicular TSN networks. Background Technology
[0002] In scenarios such as industrial control, vehicular networks, and audio / video transmission, services have stringent requirements for network latency and jitter. Time-Sensitive Networking (TSN) effectively meets these service needs through a series of standardized traffic shaping and scheduling mechanisms. Specifically, Qav, a credit-based shaper, controls the data transmission rate by increasing or decreasing credits and is commonly used for streaming services such as audio and video. Qbv, a time-aware shaper, achieves strict time-slice scheduling by periodically switching priority queues on and off along the timeline using gating, and is suitable for deterministic latency services. In practical deployments, Qav and Qbv are often used in combination to achieve coordinated bandwidth and timing shaping, thereby improving network quality.
[0003] Due to the inherent design characteristics of the shaping algorithm itself, many key parameters (such as Qav credit increment / decrement, Qbv gating and queue occupancy changes, queue backlog and packet loss detection) are only truly triggered and exposed under specified time-based disturbances or sudden data stream impacts. If testing is only conducted under Gaussian or stable loads, these key parameters and boundary behaviors are often difficult to observe and verify, resulting in insufficient testing of the shaping algorithm's performance in real-world burst scenarios. To achieve a truly effective test, data must be inserted at specific time points to observe the shaping effect after disturbance. However, conventional methods often struggle to specify a particular moment on the timeline to simulate disturbance data, failing to accurately target the aforementioned key time points of the algorithm. This often requires long-term, large-scale disturbances, placing a significant burden on the network under test and hindering effective verification of the shaper's configuration parameters. Summary of the Invention
[0004] This application provides a testing method and related equipment for shaping protocols in vehicular TSN networks, which can effectively test and evaluate the network shaping effect at specific time points.
[0005] The technical solution of this application embodiment is as follows: In a first aspect, embodiments of this application provide a testing method for shaping protocols in vehicular TSN networks, the method comprising: Acquire the data stream to be tested, and obtain the gating transmission table parameters of the Qbv shaping protocol to be tested based on the data stream to be tested. The gating transmission table parameters include at least one gate opening time point under test, as well as the data transmission period and duration of the Qav shaping protocol to be tested. The gate control transmission table parameters are adjusted based on the delay time during transmission in the vehicle TSN network, the measured door opening time, and the preset interference triggering strength parameters to obtain interference scheduling table parameters, and the first interference data corresponding to the interference scheduling table parameters is generated. The number of interference frames and the interference time period are determined based on the duration and the preset data burst amount, wherein the interference time period corresponds to the effective data transmission time in the data transmission period, and second interference data is generated based on the interference time period, the number of interference frames and the preset network transmission frame. Obtain test adjustment parameters and execute: when the test adjustment parameters indicate that the Qbv shaping protocol under test is to be tested, test the port under test in the vehicle TSN network that uses the Qbv shaping protocol under test according to the interference scheduling table parameters and the first interference data, and output the first shaped data stream. When the test adjustment parameters indicate that the Qav shaping protocol under test is to be tested, the port under test in the vehicle TSN network that uses the Qav shaping protocol under test is tested according to the interference time period and the second interference data, and the second shaped data stream is output. Metrics were collected from the first shaped data stream and the second shaped data stream respectively to evaluate the test run effect.
[0006] In the above technical solution, the test data stream is first acquired, which covers various service data in the vehicle scenario to provide data support for subsequent testing. Based on this test data stream, the operating parameters of the Qav shaping protocol and the Qbv shaping protocol under test are extracted. Based on these operating parameters, first interference data for a specific time point of the Qbv shaping protocol under test and second interference data for a specific burst interference period of the Qav shaping protocol under test are generated. By generating interference data under specific conditions, key parameters and boundaries can be tested subsequently. According to the test adjustment parameters, the Qbv shaping protocol and the Qav shaping protocol under test are tested at specific time points and specific time periods, accurately hitting the key time points of the algorithm, thereby fully verifying key parameters and boundaries. Test data is collected, and the test results are evaluated, achieving effective interference testing and evaluation of the shaping effect of the vehicle TSN network.
[0007] In some embodiments of this application, determining the number of interference frames and the interference time period based on the duration and a preset data burst amount includes: Based on the data transmission period, calculate the frame transmission time of each video frame in the data stream under test; The effective burst time of valid data is obtained by dividing the frame transmission time using the duration. The effective burst time is divided according to a preset rule to obtain the interference time period and the number of interference frames, wherein the preset rule is based on the existence of one or more interference frames in the effective burst time according to the interference time period.
[0008] In some embodiments of this application, the step of adjusting the gate control transmission table parameters based on the delay time during transmission in the vehicle-mounted TSN network, the measured door opening time, and preset interference triggering strength parameters to obtain interference scheduling table parameters, and generating first interference data corresponding to the interference scheduling table parameters, includes: Mapping the measured door opening time with the delay time yields the interference transmission time. At the interference transmission time point, interference is periodically triggered once or multiple times according to the interference trigger strength parameter. The gating transmission table parameters are updated according to the interference transmission time point and the number of interferences, and interference scheduling table parameters are generated. The number of interferences is determined by the window of interference data allowed to pass through in the gating transmission table parameters. The first interference data is generated based on the number of bytes allowed to be transmitted through the window of the vehicle-mounted TSN network and the number of interference attempts.
[0009] In some embodiments of this application, the step of testing the port under test in the vehicular TSN network using the Qbv shaping protocol according to the interference scheduling table parameters and the first interference data, and outputting the first shaped data stream, includes: According to the control parameters configured in the interference scheduling table, when the control parameters indicate single-frame interference, the first interference data has one frame. Configure the first interference data in a single frame and the data stream under test to share the same port and be located in the same or different priority queues; The first frame of interference data is used to interfere with the data stream under test according to the interference transmission time point, and then input into the test port of the vehicle TSN network that uses the Qbv shaping protocol under test, and the first shaped data stream is output.
[0010] In some embodiments of this application, the step of testing the port under test in the vehicular TSN network using the Qbv shaping protocol according to the interference scheduling table parameters and the first interference data, and outputting the first shaped data stream, includes: According to the control parameters configured in the interference scheduling table, when the control parameters indicate multi-frame interference, the first interference data has multiple frames; Configure multiple frames of the first interference data and the data stream under test to share the same port and be located in the same or different priority queues; The first interference data in multiple frames is used to interfere with the data stream under test according to the interference transmission time point, and is then input into the test port of the vehicle TSN network that uses the Qbv shaping protocol under test, and the first shaped data stream is output.
[0011] In some embodiments of this application, the step of collecting metrics from the first shaped data stream and the second shaped data stream respectively to evaluate the test run effect includes: While applying the interference stream, the timestamp sequence of the data stream under test entering and exiting the port under test is acquired; A virtual timeline for the gated state of the Qbv shaping protocol under test is established based on the gated transmission table parameters, and a credit score evolution curve for the Qav shaping under test is established based on the data transmission period and duration. The timestamp sequence is mapped to the virtual time axis and the credit score evolution curve to align the spatiotemporal correlation of abnormal data frame landing points, determine the scheduling backlog causes of the latency and jitter of the data stream under test, and evaluate the vulnerable boundary test based on the scheduling backlog causes to assess the test operation effect.
[0012] In some embodiments of this application, the step of aligning the spatiotemporal correlation of abnormal data frame landing points to determine the scheduling backlog causes of latency and jitter in the data stream under test includes: In the multidimensional state space formed by the virtual time axis and the credit score evolution curve, a causal logic mapping region is established according to a preset queue scheduling mechanism; Obtain the time coordinates and credit status coordinates of the abnormal data frame falling within the mapping area; Based on the comparison between the time coordinates and the credit status coordinates, the categories of scheduling backlog causes are output, and the cause categories include at least: When the landing point of the abnormal data frame is within the protection band trigger edge or the gate closing protection interval on the virtual time axis, and the message length of the data stream under test is greater than the remaining gate opening time, it is determined to be a time delay mutation caused by a gate conflict. When the landing point of the abnormal data frame is within the opening interval of the virtual time axis, and the corresponding real-time credit value on the credit score evolution curve is less than or equal to the zero threshold, it is determined to be a queue blockage caused by credit overdraft.
[0013] Secondly, embodiments of this application provide a testing system for shaping protocols in vehicular TSN networks, the system comprising: The data acquisition module is used to acquire the data stream to be tested, and to acquire the gating transmission table parameters of the Qbv shaping protocol to be tested based on the data stream to be tested. The gating transmission table parameters include at least one gate opening time point under test, as well as the data transmission period and duration of the Qav shaping protocol to be tested. The first test data generation module is used to adjust the gate control transmission table parameters according to the delay time during the transmission process in the vehicle TSN network, the door opening time point under test, and the preset interference triggering strength parameters to obtain interference scheduling table parameters, and generate the first interference data corresponding to the interference scheduling table parameters. The second test data generation module is used to determine the number of interference frames and the interference time period based on the duration and the preset data burst amount, wherein the interference time period corresponds to the effective data transmission time in the data transmission period, and generates second interference data based on the interference time period, the number of interference frames and the preset network transmission frames. The first test module is used to acquire test adjustment parameters and perform the following: when the test adjustment parameters indicate that the Qbv shaping protocol under test is to be tested, the test module tests the port under test in the vehicle TSN network that uses the Qbv shaping protocol under test according to the interference scheduling table parameters and the first interference data, and outputs the first shaped data stream. The second test module is used to test the port under test in the vehicle TSN network that uses the Qav shaping protocol under test according to the interference time period and the second interference data when the test adjustment parameter indicates that the Qav shaping protocol under test is to be tested, and output the second shaped data stream. The evaluation module is used to collect metrics from the first shaped data stream and the second shaped data stream respectively to evaluate the test run effect.
[0014] Thirdly, embodiments of this application provide an electronic device including a processor, a memory, a user interface, a communication bus, and a network interface. The processor, the memory, the user interface, and the network interface are respectively connected to the communication bus. The memory is used to store instructions. The user interface and the network interface are used to communicate with other devices. The processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method described in any one of the first aspects.
[0015] Fourthly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed, perform the method described in any one of the methods provided in the first aspect above.
[0016] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. By first acquiring the data stream to be tested, which covers various service data in the vehicle scenario, providing data support for subsequent testing, and then extracting the operating parameters of the Qav shaping protocol and the Qbv shaping protocol under test based on this data stream, first interference data for a specific time point of the Qbv shaping protocol under test, and second interference data for a specific burst interference period of the Qav shaping protocol under test, are generated based on these operating parameters. By generating interference data under specific conditions, key parameters and boundaries can be tested subsequently. According to the test adjustment parameters, the Qbv shaping protocol and the Qav shaping protocol under test are tested at specific time points and at specific time periods, which can accurately hit the key time points of the above algorithms, thereby fully verifying key parameters and boundaries. Test data is collected and the test results are evaluated, realizing effective interference testing and evaluation of the shaping effect of the vehicle TSN network. Therefore, it effectively solves the problem in related technologies that it is impossible to simulate interference data at specific times through conventional methods, thus making it impossible to effectively verify the shaping effect. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating a testing method for a shaping protocol in a vehicle-mounted TSN network according to an embodiment of this application. Figure 2 This is a schematic diagram illustrating the single-frame interference generation principle of the Qbv shaping protocol under test, provided in an embodiment of this application for a testing method of shaping protocols in vehicular TSN networks. Figure 3 This is a schematic diagram of the multi-frame interference generation principle of the Qbv shaping protocol under test, provided in another embodiment of this application for a test method of shaping protocol in vehicular TSN network. Figure 4 This is a schematic diagram of the Qbv shaping protocol under test, provided in an embodiment of this application, for a testing method of shaping protocol in vehicular TSN network. Figure 5 This is a schematic diagram of the Qav shaping protocol under test, provided in one embodiment of the present application for a testing method of shaping protocol in vehicular TSN network. Figure 6 This is a schematic diagram of the structure of a test system for shaping protocols in an vehicular TSN network provided in one embodiment of this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Detailed Implementation
[0018] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0019] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.
[0020] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0021] In related technologies, due to the design characteristics of the shaping algorithm itself, many key shaping algorithm parameters are only truly triggered and exposed under the impact of interference or burst data flow at a specified time. Existing testing methods have the following shortcomings: (1) It is difficult to simulate "burst, repeatable, and time-configurable" interference using only background traffic or fixed load; (2) It is difficult to accurately inject interference at key time points of the algorithm (such as Qbv gate opening point), and conventional stable load cannot be simulated by specifying time; (3) There is a lack of a scheme to generate interference using the standard gating mechanism itself, resulting in inconsistency between the test and the actual device behavior.
[0022] Based on this, embodiments of this application provide a testing method, system, electronic device, and readable storage medium for shaping protocols in vehicular TSN networks. The testing method first acquires a data stream to be tested, which covers various service data in a vehicular scenario, providing data support for subsequent testing. Based on this data stream, the method extracts operating parameters for the Qav and Qbv shaping protocols under test. Based on these operating parameters, it generates first interference data for a specific time point of the Qbv shaping protocol under test, and second interference data for a specific burst interference period of the Qav shaping protocol under test. By generating interference data under specific conditions, subsequent testing of key parameters and boundaries is possible. According to the test adjustment parameters, the Qbv and Qav shaping protocols under test are tested at specific time points and specific time periods, accurately hitting the key time points of the aforementioned algorithms, thereby fully verifying key parameters and boundaries. The method also collects test data, evaluates the test results, and achieves effective interference testing and evaluation of the shaping effect of vehicular TSN networks.
[0023] It should be noted that this testing method for shaping protocols in vehicular TSN networks involves Time-Sensitive Networking (TSN) and Ethernet QoS technologies. Specifically, it involves generating controllable burst interference flows based on the gating characteristics of IEEE 802.1Qbv (Qbv for short) and using this method to test the effectiveness of shaping mechanisms such as IEEE 802.1Qav (Qav for short) and Qbv under interference conditions. This shaping test method can generate controllable burst interference flows at a specified time and perform stress tests and comparative evaluations of the shaping effects of Qav and Qbv under controlled conditions. For Qav, whose shaping time is not controlled by a gating list like Qbv, its shaping time is uncertain, but this method is still applicable to Qav testing. The reason is that the Qav shaping process involves a relatively large time span, mostly on the order of tens of milliseconds (e.g., a 30fps video occurs approximately once every 33ms). By increasing the frequency of generating interference data (e.g., triggering bursts at millisecond intervals or periods), interference can be applied multiple times within its time window, thereby covering and triggering Qav's key shaping parameters and boundary behaviors. At the same time, the millisecond-level interference frequency places low demands on the generating equipment and will not place an excessive burden on the testing equipment.
[0024] The technical solutions provided in the embodiments of this application will be further described below with reference to the accompanying drawings.
[0025] Reference Figure 1 , Figure 1This is a flowchart illustrating a testing method for shaping protocols in vehicular TSN networks provided in an embodiment of this application. The testing method for shaping protocols in vehicular TSN networks is implemented in OMNeT++, NS-3, or a commercial TSN emulator. The testing method is applied to a testing system for shaping protocols in vehicular TSN networks and executed by a processor in an electronic device or readable storage medium. The testing method for shaping protocols in vehicular TSN networks includes steps S100, S200, S300, S400, S500, and S600.
[0026] Step S100: Obtain the data stream to be tested, and obtain the gating transmission table parameters of the Qbv shaping protocol to be tested based on the data stream to be tested. The gating transmission table parameters include at least one gate opening time point under test, as well as the data transmission period and duration of the Qav shaping protocol to be tested.
[0027] In one embodiment, the data stream to be tested refers to the set of service benchmark packets actually transmitted in the vehicular network that require service quality evaluation, such as LiDAR point cloud data or vehicular H.264 video data streams. The gating transmission table parameters are configured in the vehicular switch, and the list of opening or closing times controlled by the Qbv shaping protocol under test, along with other parameters, define the time segments for opening and closing hardware priority queues within a global cycle. The measured opening time point is the precise, physical-level system timestamp in the gating schedule table when the status of the queue containing the benchmark service of interest changes from "closed" to "open." The data transmission cycle is the macroscopic time tick of the periodically densely generated data under test; for example, a 30fps video has a cycle of approximately 33.3ms. The duration refers to the effective span of the link where dense data frames are actually transmitted within a burst cycle (e.g., 33.3ms). If only the first 10ms are transmitting data, and the latter 23.3ms are idle and do not transmit packets, then the duration is 10ms.
[0028] The simulator connects to the vehicle's TSN network and captures vehicle communication traffic through the network mirror port. It uses a packet parsing module to identify VLAN tags and priorities, thus identifying the transmitted data stream under test. By reading the configuration port of the vehicle switch under test, and based on the port's configuration information, it parses the underlying gating transmission table parameters for that specific priority according to the configured Qbv shaping protocol. These gating transmission table parameters record multiple gate opening timestamps. The specific absolute time point is extracted from the gating transmission table parameters; for example, if "the 3rd ms of every 10ms period is the gate opening start point for queue 4," this 3rd ms point is recorded as the gate opening timetamp. For the Qav shaping protocol configured on the network port, timestamp statistical analysis is performed on the captured video data stream under test. The interval between the start points of two large traffic peaks is recorded to obtain the data transmission period. The time required for a single peak to fall back to 0 is measured to obtain the duration; for example, the data transmission period is 33ms, and the duration is 10ms. For the two protocols with different characteristics, Qbv and Qav, two distinct baseline reference anchors were accurately extracted, providing a high-precision spatiotemporal reference for the subsequent customized generation of different forms of interference traffic.
[0029] Step S200: Adjust the gate control transmission table parameters according to the delay time during transmission in the vehicle TSN network, the measured door opening time, and the preset interference trigger strength parameters to obtain the interference scheduling table parameters, and generate the first interference data corresponding to the interference scheduling table parameters.
[0030] In one embodiment, the delay time is the time consumed by a message during transmission from various ports of the vehicular TSN network to the processing during network transmission, typically in the nanosecond or microsecond range. The delay time is obtained by statistically analyzing the time consumption of messages transmitted at each port. The interference trigger strength parameter is the set pressure equivalent to be applied to the device under test, for example, setting it to send eight 1500-byte large packets at an instant. The interference scheduling table parameter is a scheduling configuration table of interference data transmission time adjusted according to the gating scheduling configuration table to achieve precise interference at specific time points to test its shaping performance. The first interference data is a high-density data packet used to test the risk resistance capability of the Qbv shaping protocol under test at key points.
[0031] Specifically, the gate control transmission table parameters are adjusted based on the latency during transmission in the vehicle-mounted TSN network, the measured door opening time, and preset interference trigger strength parameters to obtain interference scheduling table parameters, and the first interference data corresponding to the interference scheduling table parameters is generated, including but not limited to the following steps: Step S210: Map the measured door opening time point to the delay time to obtain the interference transmission time point.
[0032] In one embodiment, the interference transmission time point is determined to ensure that the interference data arrives at the queue of the switch under test (SBT) precisely at a specific time. This is determined by a calculated packet countdown timer. Using the 802.1AS time synchronization protocol, the test clock is synchronized with the clock of the TSN network under test to an accuracy of tens of nanoseconds. Then, based on the timestamps of transmitted packets in the network, the transmission delay time through the port under test is calculated. This delay time is then shifted forward from the test opening time point to obtain the interference transmission time point. This ensures that the interference data can be accurately inserted into the test data at a specific time point during subsequent extreme and boundary testing. For example, if the measured door opening time is T=5000.0 microseconds and the calculated delay time is 5.2 microseconds, then the measured door opening time minus the delay time equals 4994.8 microseconds. That is, the time point corresponding to 4994.8 microseconds is the interference transmission time point. This means that if the interference data is transmitted at 4994.8 microseconds, then the measured door opening time point will be consistent with the data stream to be tested, thus enabling measurement at a specific time point at the door opening time point.
[0033] Step S220: At the interference transmission time point, periodically trigger interference once or multiple times according to the interference trigger strength parameter, update the gating transmission table parameters according to the interference transmission time point and the number of interferences, and generate interference scheduling table parameters. The number of interferences is determined by the window of interference data allowed to pass through in the gating transmission table parameters.
[0034] In one embodiment, the window for allowing interference data to pass through is a duration gap during which the gate of the Qbv shaping protocol under test is in the open state. For example, the device gate is set to allow only 30 microseconds of open time, and this 30 microseconds is the maximum window allowed to pass through. By analyzing the gate transmission table parameter structure of the Qbv shaping protocol under test, the gate transmission table parameters record the length of the window for allowing interference data to pass through, such as 15 microseconds. Verification is performed in conjunction with the link rate. For example, in automotive gigabit Ethernet, sending a standard large data packet with a frame length of 1500 bytes takes approximately 12 microseconds. If the window is only 15 microseconds, it means that the window can only swallow one complete 1500-byte data packet. Forcing the transmission of a second packet would exceed the gate closing time, resulting in severe packet loss due to stacking. Based on the above physical verification and matching, the number of times the data packet passes through can be determined according to the size of the window, thereby setting one or more interferences. For example, if the window is 100 microseconds, the number of interferences can be set to 8, 6, or 1, not exceeding the upper limit of 8. The interference sending time and number of interference attempts are rewritten into the gating scheduling table to obtain the interference scheduling table parameters. This not only tells when to launch interference, but also, through physical bandwidth and time windows, tells the maximum number of interference attacks. This avoids the drawbacks of causing the tested network to be completely paralyzed due to severe packet flooding and the inability to capture subtle boundary shaping indicators.
[0035] Step S230: Generate first interference data based on the number of bytes allowed to be transmitted and the number of interference attempts within the window of the vehicle-mounted TSN network.
[0036] In one embodiment, based on the number of interference attempts determined in step S220, if the number of interference attempts is 1, the maximum number of bytes to be transmitted is calculated using the vehicle-mounted TSN network interface rate according to the traffic analysis method. For example, in a 100Mbps vehicle-mounted topology, if the aforementioned 15-microsecond door opening window is exactly filled, the maximum number of allowed transmitted bytes is approximately 187 bytes, calculated by multiplying the rate by the time and dividing by 8 according to the traffic analysis method. The number of transmitted bytes allowed through the window is then determined. Space is allocated in memory, the Ethernet protocol header skeleton is encapsulated, and bytes are filled according to the number of transmitted bytes to form a data frame. This generated data frame is the first interference data. The first interference data generated above can fully fill the critical memory of the Qbv shaping protocol, increasing the probability of triggering boundary vulnerability tests.
[0037] Step S300: Determine the number of interference frames and the interference time period based on the duration and the preset data burst amount, wherein the interference time period corresponds to the effective data transmission time in the data transmission period, and generate second interference data based on the interference time period, the number of interference frames and the preset network transmission frames.
[0038] In one embodiment, the interference time period corresponds to the effective data transmission time in the data transmission period, ensuring that the second interference data can interfere within the effective data transmission time. The data burst size, when used for interference testing of the Qav shaping protocol under test, is the expected total amount of data to be injected into the network each time. The interference time period is a millisecond-level polling time tick, set to account for the characteristic that the Qav shaping protocol under test does not require microsecond-level alignment, such as acting once every 5ms. The interference frame number is the number of Ethernet packets actually sent to the pipeline each time the interference time tick is reached, such as 2 frames. The preset network transmission frame is a pre-constructed standard message template in memory (containing a standard Ethernet header and padding payload). The second interference data is a sequence of test messages that flush the network at a certain frequency to deplete the Qav algorithm's credit score.
[0039] Specifically, the number of interference frames and the interference time period are determined based on the duration and the preset data burst amount, including but not limited to the following steps: Step S310: Calculate the frame transmission time of each video frame in the data stream to be tested according to the data transmission period.
[0040] In one embodiment, the frame transmission time of each video frame is obtained by dividing the data transmission period by the video frame of the data stream to be tested. This frame transmission time determines the amount of data transmitted over the network so as to form the second interference data.
[0041] Step S320: Divide the frame transmission time using the duration to obtain the effective burst time of valid data.
[0042] In one embodiment, within each individual frame period, long periods of physical idle waiting by the network interface card (NIC) are removed, retaining only the time intervals during which definite network packets are being transmitted consecutively. Using the transmission time of the first video frame as the anchor point, data is transmitted every 33ms data transmission cycle. In the first data transmission cycle, the duration is 10ms. Using a sliding window mask algorithm, only the time block between 0ms and 10ms is extracted from the time axis containing 0~33ms. The 23ms idle period between 10ms and 33ms, during which no packets are queued, is removed from the test intervention plan. For the second cycle, [33ms, 43ms] is extracted as the second effective burst time segment, and so on. Because if interference is applied during the idle period, due to the extremely smooth network, the Qav credit limit will automatically recover to full capacity, and the interference packets will be easily digested, making it impossible to detect anomalies. By dividing the effective time periods, invalid tests are largely avoided.
[0043] Step S330: Divide the effective burst time according to a preset rule to obtain the interference time period and the number of interference frames. The preset rule is that there is one or more interference frames in the effective burst time based on the interference time period.
[0044] In one embodiment, to verify the recovery capability of burst data during the data transmission cycle, interference data must be injected once every half-length of the transmission period, each time sufficient to fill the maximum network transmission frame. The transmission time of the maximum number of bytes transmitted is calculated, which is the interference period. For each effective burst time, the effective burst time is divided by the interference period to obtain the number of interference data, i.e., the number of interference frames, that can be transmitted within that effective burst time. For example, if the duration or effective burst time is 10ms and the interference period is one data transmission every 5ms, then two interference frames can be transmitted within the effective burst time. This achieves adaptive dynamic generation of test parameters under completely uncertain and constantly fluctuating service loads.
[0045] In one embodiment, a preset network transmission frame is guaranteed to be converted into second interference data, and the second interference data is sent at intervals of interference time. It should be noted that, based on the number of interference frames, the network transmission frame can also be encapsulated into two consecutive frames to obtain the second interference data. In this case, when interference is triggered, the interference time period is also adjusted and merged pairwise. Based on its effective transmission span, continuous and rhythmic periodic attack packets are generated. Without causing extremely high hardware bandwidth load, the boundary behavior of the Qav shaping protocol under test, hidden in multiple credit accumulation and deduction, can be successfully covered and triggered with a very small number of frames.
[0046] Step S400: Obtain test adjustment parameters and execute: When the test adjustment parameters indicate that the Qbv shaping protocol under test is to be tested, test the port under test in the vehicle TSN network that uses the Qbv shaping protocol under test according to the interference scheduling table parameters and the first interference data, and output the first shaped data stream.
[0047] In one embodiment, the test adjustment parameter is a direction switch (Boolean value or enumeration value) issued by an automated script to distinguish between the Qbv shaping protocol or the Qav shaping protocol currently being tested. The first shaped data stream refers to the sequence of packets output from the vehicle TSN network and captured by the collector after the data stream under test and the first interference data pass through the vehicle TSN network simultaneously, undergo Qbv shaping protocol queue control, congestion, packet loss, and delay scheduling within the vehicle TSN network.
[0048] Specifically, the port under test in the vehicular TSN network using the Qbv shaping protocol is tested according to the interference scheduling table parameters and the first interference data, and the first shaped data stream is output, including but not limited to the following steps: Step S410: According to the control parameters configured in the interference scheduling table, when the control parameters indicate single-frame interference, the first interference data has one frame.
[0049] In one embodiment, based on the multi-frame and single-frame test switches set on the control surface of the simulator, the control parameters configured in the interference scheduling table are read. If the control parameters indicate single-frame interference, the test uses a single frame of first interference data. The single-frame test switch is set on the simulation control surface, the above process is invoked to generate the first interference data, and this single frame of first interference data is mounted to the transmission hardware. The single-frame test provides extremely clear and uncomplicated data, offering a very high signal-to-noise ratio for subsequent log analysis by the analyzer. If a backlog occurs due to a collision, it can be confirmed that a single frame caused the algorithm malfunction at the moment of door closing.
[0050] like Figure 2 As shown, before shaping, the interference data could be sent periodically. After shaping, the data formed at a specified time point is a single frame. During the shaping opening period, only one frame of interference data is sent.
[0051] Step S420: Configure the first interference data of a single frame and the data stream to be tested to share the same port and be located in the same or different priority queues.
[0052] In one embodiment, sharing the same port means that on the test topology, the sending port of the data stream under test and the sending port of interference packets are all sent to the same physical receiving port through physical combining or software mapping. Same or different priority queues refer to the fact that in a TSN, the 802.1Q VLAN tag carries a 3-bit code point called a priority code point (PCP). Different PCPs (0~7) are distributed by the internal switching core of the hardware switch into 8 different first-in-first-out queuing channels.
[0053] By configuring packet probes, a specific test VLAN tag is attached to the first interfering data frame. When sharing the same queue, the VLAN's PCP field is set to the same value as the data stream being tested (e.g., both set to PCP=5). This allows the interfering data frame to be routed into the same FIFO channel as the data stream being tested, creating internal competition for the first position. When sharing different queues, the VLAN PCP field of the interfering stream is modified to a higher value (e.g., PCP=6). This allows the interfering data frame to enter a higher-priority hardware channel, thus examining whether the sudden intervention of a higher-priority channel will paralyze or damage the Qbv shaping protocol protection mechanism set in the lower-priority channel. The above settings comprehensively cover the complex topologies that vehicular TSNs may face when processing traffic shaping; both same-queue and different-queue linkages can be reproduced by simply rewriting the PCP bit.
[0054] Step S430: The first frame of interference data is used to interfere with the data stream under test according to the interference transmission time point, and then input into the port under test in the vehicle TSN network that uses the Qbv shaping protocol under test, and the first shaped data stream is output.
[0055] In one embodiment, a baseline normal test data stream is continuously and stably input to the test port in the vehicular TSN network using the Qbv shaping protocol under test at its native rate. First interference data is sent according to the interference transmission time, and a single frame of the first interference data is inserted into the test data stream for mixing. This is then input to the test port in the vehicular TSN network using the Qbv shaping protocol under test, allowing testing to be performed during the critical phase when the Qbv shaping protocol is enabled. After all packets are processed, data is output, and timestamps are saved to form a first shaped data stream. Through this process, testing can be performed on the critical phase of the Qbv shaping protocol, solving the problem that conventional methods in the prior art cannot target this phase.
[0056] Specifically, based on the interference scheduling table parameters and the first interference data, the tested port in the vehicular TSN network using the Qbv shaping protocol under test is tested, and the first shaped data stream is output, including: Step S440: According to the control parameters configured in the interference scheduling table, when the control parameters indicate multi-frame interference, the first interference data has multiple frames.
[0057] In one embodiment, based on the multi-frame and single-frame test switches set on the control surface of the simulator, the control parameters configured in the interference scheduling table are read. When the control parameters indicate multi-frame interference, the test uses multi-frame first interference data. The multi-frame test switch is set on the simulation control surface, the above process is invoked to generate the first interference data, and the multi-frame first interference data is loaded into the transmission hardware. The multi-frame test generates a large amount of burst data that closely matches the extreme values of the gating time, achieving a high degree of simulation of the high-voltage load model.
[0058] like Figure 3 As shown, before shaping, the interference data can be periodically sent. After shaping, the data formed at a specified time point is in multiple frames. During the shaping opening period, multiple frames of interference data are sent, filling the shaping opening period.
[0059] Step S450: Configure the first interference data and the data stream under test of multiple frames to share the same port and be located in the same or different priority queues.
[0060] In one embodiment, sharing the same port means that on the test topology, the sending port of the data stream under test and the sending port of interference packets are all sent to the same physical receiving port through physical combining or software mapping. Same or different priority queues refer to the fact that in a TSN, the 802.1Q VLAN tag carries a 3-bit code point called a priority code point (PCP). Different PCPs (0~7) are distributed by the internal switching core of the hardware switch into 8 different first-in-first-out queuing channels.
[0061] By configuring packet probes, specific test VLAN tags are applied to the first frames of interfering data. When sharing the same queue, the PCP field of the VLAN is set to the same value as the data stream under test (e.g., both set to PCP=5). This allows the interfering data to be routed into the same FIFO channel as the data stream under test, creating internal competition for the first position. When sharing different queues, the VLAN PCP field of the interfering stream is modified to a higher value (e.g., PCP=6). This allows the interfering data to enter a higher-priority hardware channel, thus examining whether the sudden intervention of the higher-priority channel will paralyze or destroy the Qbv shaping protocol protection mechanism set in the lower-priority channel. The above settings comprehensively cover the complex topologies that vehicular TSNs may face when handling traffic shaping; both same-queue and different-queue linkages can be reproduced by simply rewriting the PCP bit.
[0062] Step S460: The first interference data of multiple frames is used to interfere with the data stream under test according to the interference transmission time point, and is input into the port under test in the vehicle TSN network that uses the Qbv shaping protocol under test, and the first shaped data stream is output.
[0063] In one embodiment, a baseline normal test data stream is continuously and stably input to the test port of the vehicular TSN network using the Qbv shaping protocol at its native rate. First interference data is sent according to the interference transmission times corresponding to multiple frames of data. The first interference data from multiple frames is randomly inserted into the test data stream for mixing and then input into the test port of the vehicular TSN network using the Qbv shaping protocol. This allows testing to be performed during the critical phase when the Qbv shaping protocol is enabled. After all packets are processed, data is output, and timestamps are saved to form the first shaped data stream. Through this process, multi-frame bursts fully exploit the limits of the gating's internal opening time. By using multiple interferences with minimal data overhead, the most realistic bandwidth maintenance and jitter degradation curves of the controlled queue under extreme burst conditions are obtained. This allows testing of the critical phase of the Qbv shaping protocol, solving the problem that conventional methods in the prior art cannot target this phase.
[0064] like Figure 4 As shown, the interference data frame generated by the Qbv shaping protocol under test is 1500 bytes, represented by the blue block. The data stream under test consists of green, orange, light blue, yellow, and pink data blocks (different colors are used to distinguish the data under test and the shaping process). The interference data is input from port A of the vehicle-mounted TSN network switch, and the data stream under test is input from port B of the vehicle-mounted TSN network switch. The test is performed on port C. First, the transmission delay is calculated, and the interference data is sent at a time delay earlier than the data stream under test, so that the arrival time at port C is consistent. The interference data is inserted into the data stream under test at the gating opening time, and the data stream shaped by the Qbv shaping protocol under test is output. As shown in the figure, the blue block blocks the transmission of the pink data block to achieve the shaping test.
[0065] Step S500: When the test adjustment parameters indicate that the Qav shaping protocol under test is to be tested, the port under test in the vehicle TSN network using the Qav shaping protocol under test is tested according to the interference time period and the second interference data, and the second shaped data stream is output.
[0066] In one embodiment, the second shaped data stream refers to the sequence of entity egress messages with burst and delay characteristics formed after the test service packet undergoes Qav credit pool overdraft, suspension, and replenishment under continuous millisecond-level interference packet flushing. The test adjustment parameters, when testing the Qav shaped protocol under test, continuously input the second interference data into the test port of the vehicular TSN network using the Qav shaped protocol under test, according to the obtained interference time period. The test data stream and the second interference data queue and converge at the test port. Due to the frequent insertion of the second interference data, the available transmission quota accumulated by the Qav algorithm for this queue is rapidly consumed, forcing the test data stream to queue in place and wait for the credit score to slowly recover to a positive value. This process is collected and recorded, for example, capturing delayed or rate-limited dropped traffic and recording timestamps, and outputting the second shaped data stream. The above test creates an excellent physical environment that allows the Qav protocol to fully saturate and exposes the credit recovery efficiency and leaky bucket overflow boundary, verifying the stress protection level of streaming media such as audio and video in real, harsh concurrent networks.
[0067] like Figure 5 As shown, the interference data frame generated by the Qav shaping protocol under test is 1500 bytes, represented by blue blocks. The data stream under test is represented by green blocks. The interference data is input from port A of the vehicle-mounted TSN network switch, and the data stream under test is input from port B of the vehicle-mounted TSN network switch. The test is performed on port C. During the data transmission cycle, the interference data is inserted into the data stream under test. This insertion is random. The data stream is shaped through port C, and the output is the data stream shaped by the Qav shaping protocol under test. Due to the interference of the interference data, the data stream under test is transmitted relatively densely to achieve the purpose of shaping test.
[0068] Step S600: Collect metrics from the first shaped data stream and the second shaped data stream respectively to evaluate the test run effect.
[0069] Specifically, metrics are collected from the first and second integer data streams respectively to evaluate the test run performance, including but not limited to the following steps: Step S610: While applying the interference stream, acquire the timestamp sequence of the data stream entering and exiting the port under test.
[0070] In one embodiment, under a clock synchronization mechanism, first or second interference data is input to the vehicle-mounted target exchange. Within the physical window of interference occurrence, the test probe continuously monitors and captures the reference data stream under test. Whenever a reference packet enters the exchange, the arrival time is recorded; when the packet is output from the exchange, the departure time is recorded. The data passing through each port under test are stored according to the arrival and departure times to obtain a continuous timestamp sequence corresponding to each data, providing a basis for subsequent calculations.
[0071] Step S620: Establish a virtual time axis of the gating state of the Qbv shaping protocol under test based on the gating transmission table parameters, and establish the credit score evolution curve of the Qav shaping under test based on the data transmission period and duration.
[0072] In one embodiment, the virtual time axis is a constructed digital coordinate system, with the X-axis representing absolute time and the Y-axis representing the gating state (0 represents the closed state and 1 represents the open state). The opening and closing expectations of the Qbv logic gate inside the tested port at various times are replicated through mathematical modeling. The credit score evolution curve is a mathematical model constructed for the credit-based shaper mechanism in the Qav algorithm. When there are packets waiting in the queue but not sent, the score increases with the idle slope; when the packet is sent, the score decreases with the sending slope. The curve is a jagged broken line that fluctuates up and down with time.
[0073] For the Qbv shaping protocol under test, the polling period of each queue is extracted (e.g., 1000 microseconds), along with the gate offset and gate duty cycle. An extended square wave graph is plotted, generating a virtual time axis, clearly indicating which microseconds the gate is actually open on this axis. For the Qav shaping protocol under test, the duration of valid data during the data transmission cycle is substituted, i.e., when data packets are queued in the network. Calculus or discrete step size calculations are used to synchronously plot a corresponding credit score evolution curve in memory along with the time axis. For example, it shows that at T=5ms, the system's virtual credit value has accumulated to +1500 bytes, while at T=6ms it has been consumed to -500 bytes. By establishing a "digital twin" reference system, it is possible to know precisely the state of the underlying algorithm of the device at any given nanosecond level.
[0074] Step S630: Map the timestamp sequence to the virtual time axis and credit score evolution curve, align the spatiotemporal correlation of abnormal data frame landing points, determine the scheduling backlog causes of latency and jitter in the data stream under test, and evaluate the vulnerable boundary test based on the scheduling backlog causes to assess the test operation effect.
[0075] In one embodiment, the abnormal data frame landing point is the corresponding coordinate on the virtual timeline of the underlying test message selected from the timestamp sequence that has experienced severe delay, extremely high latency (e.g., suddenly changing from one ten-thousandth of a second to one-tenth of a second), or direct loss. Vulnerable boundary testing refers to data attacks launched just one or two microseconds before the gate closes, or at the critical point where the credit value is exactly zero. Abnormal messages marked as having sudden latency spikes or jitter in step S610 are acquired. The arrival time of the abnormal message is obtained and mapped to the Qbv virtual timeline and Qav credit mechanism curve at the same moment for time alignment, facilitating subsequent calculations.
[0076] In one embodiment, the spatiotemporal correlation of abnormal data frame landing points is aligned to determine the scheduling backlog causes of latency and jitter in the data stream under test, including but not limited to the following steps: Step S631: In the multi-dimensional state space formed by the virtual time axis and the credit score evolution curve, establish the causal logic mapping area according to the preset queue scheduling mechanism.
[0077] In one embodiment, the multidimensional state space integrates one-dimensional time, one-dimensional gate switch state, and one-dimensional credit balance value into a two-dimensional or three-dimensional digital coordinate topology; the preset queue scheduling mechanism is the underlying rule of queue discarding and truncation in the TSN standard (IEEE 802.1Qbv and 802.1Qav); the incentive logic mapping area is a pre-defined feature area.
[0078] A coordinate space system is initialized. Based on the guard band (the time during which data can be transmitted) defined in the 802.1Qbv standard, designed to prevent large packets from crossing time cycles, a region is marked at the falling edge of the virtual time axis gate—the moment before the network transitions from open to closed (e.g., assuming a gigabit 1500 packet takes 12 microseconds, the region shifting back 12 microseconds is marked). This establishes a Qbv gated extreme danger mapping zone. Following the 802.1Qav mechanism that transmission is prohibited when the credit score is negative, the lower quadrant representing the limit from 0 to negative credit scores is designated on the credit score evolution graph, establishing a Qav credit overdraft danger mapping zone. This abstracts the highly complex network queuing phenomenon into intuitive geometric partitioning, improving data analysis efficiency.
[0079] Step S632: Obtain the time coordinates and credit status coordinates of the abnormal data frame falling within the mapping area.
[0080] The time coordinate is the exact time (nanosecond-level variable X) at which a specific abnormal delayed packet arrives at the switch and requests to be popped from the stack; the credit status coordinate is the Qav scheduling credit balance (variable Y) that the packet's queue should have held at that instant (as calculated by the above formula). First, the abnormal frame with delay was identified, and its corresponding timestamp was extracted. The timestamp T = 15004.5, representing the time coordinate, was input into the credit evolution simulator. The result returned was that at T = 15004.5 microseconds, the priority credit score was -234 bytes. -234 is the credit status coordinate at that time, and thus the coordinates (15004.5, -234) corresponding to the abnormal frame were extracted. This process transforms discrete physical network card packet capture parameters into absolute mathematical coordinate parameters encompassing time flow, service state machine, and algorithm context, providing accurate basic data for subsequent fault diagnosis.
[0081] Step S633: Based on the comparison of time coordinates and credit status coordinates, output the categories of scheduling backlog causes. The cause categories include at least: When the landing point of the abnormal data frame is within the protection band trigger edge or the gate closing protection interval on the virtual time axis, and the message length of the data stream under test is greater than the remaining gate opening time, it is determined to be a time delay change caused by a gate conflict. When the landing point of an abnormal data frame is within the opening interval of the virtual time axis, and the corresponding real-time credit value on the credit score evolution curve is less than or equal to the zero threshold, it is determined to be a queue blockage caused by credit overdraft.
[0082] In one embodiment, for Qbv fault analysis, when the landing point of an abnormal data frame is within the protection band trigger edge or the gate closing protection interval on the virtual time axis, and the message length of the data stream under test is greater than the remaining gate opening time, it indicates that the abnormal data frame is within the protection interval of the normal opening or closing time of the Qbv shaping protocol on the virtual time axis. The triggered gate opening and closing time is normal, but the message length of the data stream under test is greater than the remaining gate opening time, indicating that the data packet cannot be sent completely. This type of anomaly is labeled as a delay mutation caused by a gate conflict.
[0083] For example, the frame data is 1500 bytes long, and it needs to be sent in 12 microseconds according to the in-vehicle 100 Mbps / 1 Gbps line speed. However, at the abnormal frame and its time coordinate point, the physical queue is only 5 microseconds away from the Qbv scheduling table closing time. Theoretically, there is enough time, but the data packet cannot be squeezed in. The message is forced to wait in the switch memory for the arrival of the next new macro cycle, which is marked as a latency mutation caused by gating conflict.
[0084] For QAV fault analysis, when the landing point of an abnormal data frame falls within the open interval of the virtual time axis, it indicates that the data can be sent normally, ruling out anomalies caused by the closing of the gate. However, on the credit score evolution curve, if the real-time credit value is less than or equal to the zero threshold, it indicates that the data frame cannot be sent according to the credit value. Therefore, this type of anomaly is attributed to the upper-layer rectification algorithm reaching its limit, triggering an order to stop transmission, and is labeled as queue congestion caused by credit overdraft.
[0085] After summarizing the judgment output, a categorized statistical chart with graphs is generated. For example, in this 30-minute extreme stress test, 34 gating conflicts and 108 credit overdrafts were triggered, and a high-confidence judgment report is automatically generated. The above completes the accuracy test of the boundaries of the two TSN integer protocols, thereby improving network debugging efficiency.
[0086] In one embodiment, based on the category of scheduling backlog causes, it is determined whether the vulnerable boundary test triggers engineering, and an evaluation report is generated to evaluate the test operation effect. The two TSN shaping protocols output standardized and fully parameterized quantitative evaluation reports, providing a reliable basis for the design finalization and configuration optimization of the vehicle network.
[0087] like Figure 6 As shown, this application embodiment provides a test system 100 for shaping protocols in vehicular TSN networks. The test system 100 acquires the data stream under test through a data acquisition module 110, and obtains the gating transmission table parameters of the Qbv shaping protocol under test based on the data stream. The gating transmission table parameters include at least one door opening time point under test, and the data transmission period and duration of the Qav shaping protocol under test. Then, the first test data generation module 120 adjusts the gating transmission table parameters according to the delay time during transmission in the vehicular TSN network, the door opening time point under test, and preset interference trigger strength parameters to obtain interference scheduling table parameters, and generates first interference data corresponding to the interference scheduling table parameters. The second test data generation module 130 determines the number of interference frames and the interference time period based on the duration and preset data burst amount, wherein the interference time... The interference period corresponds to the effective data transmission time in the data transmission period. Second interference data is generated based on the interference time period, the number of interference frames, and the preset network transmission frames. The first test module 140 acquires test adjustment parameters and executes the following: when the test adjustment parameters indicate that the Qbv shaping protocol under test is to be tested, the port under test in the vehicular TSN network using the Qbv shaping protocol under test is tested according to the interference scheduling table parameters and the first interference data, and the first shaped data stream is output. The second test module 150, when the test adjustment parameters indicate that the Qav shaping protocol under test is to be tested, tests the port under test in the vehicular TSN network using the Qav shaping protocol under test according to the interference time period and the second interference data, and the second shaped data stream is output. Finally, the evaluation module 160 collects indicators from the first and second shaped data streams respectively to evaluate the test performance.
[0088] It should be noted that the data acquisition module 110 is connected to the first test data generation module 120, the first test data generation module 120 is connected to the second test data generation module 130, the second test data generation module 130 is connected to the first test module 140, the first test module 140 is connected to the second test module 150, and the second test module 150 is connected to the evaluation module 160. The aforementioned testing method for shaping protocols in vehicular TSN networks is applied to a testing system 100 for shaping protocols in vehicular TSN networks. The testing system 100 acquires a data stream to be tested, which covers various service data in the vehicular scenario to provide data support for subsequent testing. Based on the data stream, it extracts the operating parameters of the Qav shaping protocol and the Qbv shaping protocol to be tested. Based on the operating parameters, it generates first interference data for a specific time point of the Qbv shaping protocol to be tested, and second interference data for a specific burst interference period of the Qav shaping protocol to be tested. By generating interference data under specific conditions, it is possible to subsequently test key parameters and boundaries. Based on the test adjustment parameters, the Qbv shaping protocol and the Qav shaping protocol under test are tested at specific time points and at specific time periods. This can accurately hit the key time points of the above algorithms, thereby fully verifying the key parameters and boundaries. Test data is collected and the test results are evaluated, achieving effective interference testing and evaluation of the shaping effect of the vehicle TSN network.
[0089] It should also be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0090] This application also discloses an electronic device. (See reference...) Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. The electronic device 500 may include: at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, and at least one communication bus 502.
[0091] The communication bus 502 is used to enable communication between these components.
[0092] The user interface 503 may include a display screen and a camera. Optionally, the user interface 503 may also include a standard wired interface and a wireless interface.
[0093] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0094] The processor 501 may include one or more processing cores. The processor 501 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 505, and by calling data stored in memory 505. Optionally, the processor 501 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array. The processor 501 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and Modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor 501.
[0095] The memory 505 may include random access memory (RAM) or read-only memory. Optionally, the memory 505 may include a non-transitory computer-readable storage medium. The memory 505 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 505 may also be at least one storage device located remotely from the aforementioned processor 501. (Refer to...) Figure 7 The memory 505, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for testing a shaping protocol in an in-vehicle TSN network.
[0096] exist Figure 7 In the illustrated electronic device 500, the user interface 503 is mainly used to provide an input interface for the user and acquire user input data; while the processor 501 can be used to call an application program stored in the memory 505 for testing a shaping protocol in an in-vehicle TSN network. When executed by one or more processors 501, the electronic device 500 performs one or more methods as described in the above embodiments. It should be noted that, for the foregoing method embodiments, for the sake of simplicity, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0097] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0098] In the various embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of 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 through some service interface; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.
[0099] 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.
[0100] Furthermore, the functional units in the various embodiments of this application 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.
[0101] 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 device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0102] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will readily conceive of those skilled in the art upon consideration of the specification and the disclosure of practical truths.
[0103] This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A testing method for shaping protocols in vehicular TSN networks, characterized in that, The method includes: Acquire the data stream to be tested, and obtain the gating transmission table parameters of the Qbv shaping protocol to be tested based on the data stream to be tested. The gating transmission table parameters include at least one gate opening time point under test, as well as the data transmission period and duration of the Qav shaping protocol to be tested. The gate control transmission table parameters are adjusted based on the delay time during transmission in the vehicle TSN network, the measured door opening time, and the preset interference triggering strength parameters to obtain interference scheduling table parameters, and the first interference data corresponding to the interference scheduling table parameters is generated. The number of interference frames and the interference time period are determined based on the duration and the preset data burst amount, wherein the interference time period corresponds to the effective data transmission time in the data transmission period, and second interference data is generated based on the interference time period, the number of interference frames and the preset network transmission frame. Obtain test adjustment parameters and execute: when the test adjustment parameters indicate that the Qbv shaping protocol under test is to be tested, test the port under test in the vehicle TSN network that uses the Qbv shaping protocol under test according to the interference scheduling table parameters and the first interference data, and output the first shaped data stream. When the test adjustment parameters indicate that the Qav shaping protocol under test is to be tested, the port under test in the vehicle TSN network that uses the Qav shaping protocol under test is tested according to the interference time period and the second interference data, and the second shaped data stream is output. Metrics were collected from the first shaped data stream and the second shaped data stream respectively to evaluate the test run effect.
2. The method according to claim 1, characterized in that, The step of determining the number of interference frames and the interference time period based on the duration and the preset data burst amount includes: Based on the data transmission period, calculate the frame transmission time of each video frame in the data stream under test; The effective burst time of valid data is obtained by dividing the frame transmission time using the duration. The effective burst time is divided according to a preset rule to obtain the interference time period and the number of interference frames, wherein the preset rule is based on the existence of one or more interference frames in the effective burst time according to the interference time period.
3. The method according to claim 1, characterized in that, The step of adjusting the gate control transmission table parameters based on the delay time during transmission in the vehicle-mounted TSN network, the measured door opening time, and preset interference triggering strength parameters to obtain interference scheduling table parameters, and generating first interference data corresponding to the interference scheduling table parameters, includes: Mapping the measured door opening time with the delay time yields the interference transmission time. At the interference transmission time point, interference is periodically triggered once or multiple times according to the interference trigger strength parameter. The gating transmission table parameters are updated according to the interference transmission time point and the number of interferences, and interference scheduling table parameters are generated. The number of interferences is determined by the window of interference data allowed to pass through in the gating transmission table parameters. The first interference data is generated based on the number of bytes allowed to be transmitted through the window of the vehicle-mounted TSN network and the number of interference attempts.
4. The method according to claim 3, characterized in that, The step of testing the port under test in the vehicular TSN network using the Qbv shaping protocol according to the interference scheduling table parameters and the first interference data, and outputting the first shaped data stream, includes: According to the control parameters configured in the interference scheduling table, when the control parameters indicate single-frame interference, the first interference data has one frame. Configure the first interference data in a single frame and the data stream under test to share the same port and be located in the same or different priority queues; The first frame of interference data is used to interfere with the data stream under test according to the interference transmission time point, and then input into the test port of the vehicle TSN network that uses the Qbv shaping protocol under test, and the first shaped data stream is output.
5. The method according to claim 3, characterized in that, The step of testing the port under test in the vehicular TSN network using the Qbv shaping protocol according to the interference scheduling table parameters and the first interference data, and outputting the first shaped data stream, includes: According to the control parameters configured in the interference scheduling table, when the control parameters indicate multi-frame interference, the first interference data has multiple frames; Configure multiple frames of the first interference data and the data stream under test to share the same port and be located in the same or different priority queues; The first interference data in multiple frames is used to interfere with the data stream under test according to the interference transmission time point, and is then input into the test port of the vehicle TSN network that uses the Qbv shaping protocol under test, and the first shaped data stream is output.
6. The method according to claim 1, characterized in that, The step of collecting metrics from the first shaped data stream and the second shaped data stream respectively to evaluate the test run effect includes: While applying the interference stream, the timestamp sequence of the data stream under test entering and exiting the port under test is acquired; A virtual timeline for the gated state of the Qbv shaping protocol under test is established based on the gated transmission table parameters, and a credit score evolution curve for the Qav shaping under test is established based on the data transmission period and duration. The timestamp sequence is mapped to the virtual time axis and the credit score evolution curve to align the spatiotemporal correlation of abnormal data frame landing points, determine the scheduling backlog causes of the latency and jitter of the data stream under test, and evaluate the vulnerable boundary test based on the scheduling backlog causes to assess the test operation effect.
7. The method according to claim 6, characterized in that, The spatiotemporal correlation of the alignment anomaly data frame landing points determines the scheduling backlog causes of the latency and jitter of the data stream under test, including: In the multidimensional state space formed by the virtual time axis and the credit score evolution curve, a causal logic mapping region is established according to a preset queue scheduling mechanism; Obtain the time coordinates and credit status coordinates of the abnormal data frame falling within the mapping area; Based on the comparison between the time coordinates and the credit status coordinates, the categories of scheduling backlog causes are output, and the cause categories include at least: When the landing point of the abnormal data frame is within the protection band trigger edge or the gate closing protection interval on the virtual time axis, and the message length of the data stream under test is greater than the remaining gate opening time, it is determined to be a time delay mutation caused by a gate conflict. When the landing point of the abnormal data frame is within the opening interval of the virtual time axis, and the corresponding real-time credit value on the credit score evolution curve is less than or equal to the zero threshold, it is determined to be a queue blockage caused by credit overdraft.
8. A test system for shaping protocols in vehicular TSN networks, characterized in that, The system includes: The data acquisition module is used to acquire the data stream to be tested, and to acquire the gating transmission table parameters of the Qbv shaping protocol to be tested based on the data stream to be tested. The gating transmission table parameters include at least one gate opening time point under test, as well as the data transmission period and duration of the Qav shaping protocol to be tested. The first test data generation module is used to adjust the gate control transmission table parameters according to the delay time during the transmission process in the vehicle TSN network, the door opening time point under test, and the preset interference triggering strength parameters to obtain interference scheduling table parameters, and generate the first interference data corresponding to the interference scheduling table parameters. The second test data generation module is used to determine the number of interference frames and the interference time period based on the duration and the preset data burst amount, wherein the interference time period corresponds to the effective data transmission time in the data transmission period, and generates second interference data based on the interference time period, the number of interference frames and the preset network transmission frames. The first test module is used to acquire test adjustment parameters and perform the following: when the test adjustment parameters indicate that the Qbv shaping protocol under test is to be tested, the test module tests the port under test in the vehicle TSN network that uses the Qbv shaping protocol under test according to the interference scheduling table parameters and the first interference data, and outputs the first shaped data stream. The second test module is used to test the port under test in the vehicle TSN network that uses the Qav shaping protocol under test according to the interference time period and the second interference data when the test adjustment parameter indicates that the Qav shaping protocol under test is to be tested, and output the second shaped data stream. The evaluation module is used to collect metrics from the first shaped data stream and the second shaped data stream respectively to evaluate the test run effect.
9. An electronic device, characterized in that, The device includes a processor, a memory, a user interface, a communication bus, and a network interface. The processor, the memory, the user interface, and the network interface are respectively connected to the communication bus. The memory is used to store instructions. The user interface and the network interface are used to communicate with other devices. The processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the method as described in any one of claims 1-7.