Flow control method and related devices based on gPTP health status

CN122554899APending Publication Date: 2026-08-11SHENZHEN SUNRAY ELECTRONICS LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0003]目前,业界普遍采用静态QoS配置方案,该方案在网络设计阶段为gPTP同步报文预留较高的转发优先级,以确保其在拥塞时优先通过;但是,静态QoS无法感知同步质量的实时变化,当网络中出现广播扩散、未知单播泛洪或OTA升级等背景流量时,同步报文的排队时延、到达抖动及居留时间偏差会显著恶化,而静态QoS配置无法据此动态调节非关键业务流的行为,从而导致流量控制效果不佳

Benefits of technology

可以看出,本申请中所描述的基于gPTP健康度的流量控制方法及相关装置,通过获取gPTP同步报文的目标基本数据判定目标健康度等级,并依据所述目标健康度等级匹配正常、受扰、保护、恢复四类状态标签;当识别到受扰标签或保护标签时,根据所述目标健康度等级匹配对应的抑制矩阵表,生成适配的目标抑制方案,仅对非关键业务数据流执行流量控制动作,同时为预设关键业务名单中的数据流保留传输资源,避免了单一限速策略对关键业务通信造成影响。在执行所述目标抑制方案后,采集预设时间段内的多个健康度等级,并综合评判抑制效果;若判定抑制成功,则启动目标恢复方案,有序解除对非关键业务数据流的流量控制,实现gPTP异常期间的分级差异化动态控制;如此,有效降低了非关键业务流量对同步报文的干扰,保障车载关键业务的时间同步传输稳定性,从而有效提高了流量控制效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122554899A_ABST
    Figure CN122554899A_ABST
Patent Text Reader

Abstract

This application discloses a flow control method and related apparatus based on gPTP health status, applied to the control module of an in-vehicle system. The method includes: acquiring target basic data corresponding to gPTP synchronization messages; determining the target health level based on the target basic data; determining the target status label based on the target health level; when the target status label includes a disturbed label or a protected label, determining a target suppression matrix table based on the target health level; determining a target suppression scheme based on the target suppression matrix table; executing the target suppression scheme; acquiring *a* health levels within a preset time period; determining the target suppression result based on the *a* health levels; when the target suppression result includes successful suppression, determining the target recovery scheme corresponding to the target suppression scheme; and executing the target recovery scheme. Using this application improves the flow control effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of flow control technology, and in particular to a flow control method and related apparatus based on gPTP health status. Background Technology

[0002] With the development of technology, the requirements for time synchronization accuracy in vehicular networks are becoming increasingly stringent. Nodes such as cameras, radars, and domain controllers all rely on the Generalized Precision Time Protocol (gPTP) to achieve cross-device time alignment in order to ensure the accuracy of perception data fusion and control command coordination.

[0003] Currently, the industry generally adopts a static QoS configuration scheme. This scheme reserves a high forwarding priority for gPTP synchronization packets during the network design phase to ensure that they pass through first when congestion occurs. However, static QoS cannot perceive real-time changes in synchronization quality. When background traffic such as broadcast diffusion, unknown unicast flooding, or OTA upgrades occurs in the network, the queuing delay, arrival jitter, and dwell time deviation of synchronization packets will deteriorate significantly. Static QoS configuration cannot dynamically adjust the behavior of non-critical service flows accordingly, resulting in poor traffic control performance.

[0004] Therefore, how to improve the effectiveness of flow control has become an urgent problem to be solved. Summary of the Invention

[0005] This application provides a flow control method and related apparatus based on gPTP health status, which improves the flow control effect.

[0006] In a first aspect, embodiments of this application provide a flow control method based on gPTP health, applied to the control module of an in-vehicle system, the method comprising: Obtain the target basic data corresponding to the gPTP synchronization message; The target's health level is determined based on the aforementioned basic target data; A target status label is determined based on the target health level; the target status label includes any of the following: normal label, disturbed label, and protected label; When the target status label includes the disturbed label or the protected label, a target suppression matrix table is determined according to the target health level; a target suppression scheme is determined according to the target suppression matrix table; the target suppression scheme is used to suppress the traffic of non-critical services in the vehicle system to ensure the traffic transmission of critical services in the preset critical service list; Execute the target suppression scheme; Retrieve *a* health levels within a preset time period; where *a* is a positive integer. The target inhibition result is determined based on the aforementioned health level a; the target inhibition result includes any of the following: inhibition successful, inhibition failed; When the target suppression result includes the suppression success, a target recovery scheme corresponding to the target suppression scheme is determined; the target recovery scheme is executed; the target recovery scheme is used to release the suppression of traffic for non-critical services in the vehicle system.

[0007] Secondly, embodiments of this application provide a flow control device based on gPTP health, applied to the control module of an in-vehicle system. The device includes: an acquisition unit, a determination unit, and a flow control unit, wherein: The acquisition unit is used to acquire the target basic data corresponding to the gPTP synchronization message; The determining unit is configured to determine the target health level based on the target basic data; and determine the target status label according to the target health level; the target status label includes any one of the following: normal label, disturbed label, and protected label; The traffic control unit is configured to, when the target status label includes the disturbed label or the protected label, determine a target suppression matrix table based on the target health level; determine a target suppression scheme based on the target suppression matrix table; the target suppression scheme is used to suppress the traffic of non-critical services in the vehicle system to ensure the traffic transmission of critical services in the preset critical service list; and execute the target suppression scheme. The acquisition unit is further configured to acquire a health levels within a preset time period; where a is a positive integer. The determining unit is further configured to determine the target suppression result based on the a health levels; the target suppression result includes any one of the following: suppression success, suppression failure; when the target suppression result includes suppression success, determine the target recovery scheme corresponding to the target suppression scheme; execute the target recovery scheme; the target recovery scheme is used to release the suppression of traffic for non-critical services in the vehicle system.

[0008] Thirdly, embodiments of this application provide an electronic device, including: a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for performing the steps in the first aspect of embodiments of this application.

[0009] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to perform some or all of the steps described in the first aspect of embodiments of this application.

[0010] Fifthly, embodiments of this application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the first aspect of embodiments of this application. The computer program product may be a software installation package.

[0011] Implementing this application will have the following beneficial effects: As can be seen, the gPTP health-based flow control method and related apparatus described in this application determine the target health level by acquiring the target basic data of the gPTP synchronization message, and matches four status labels (normal, disturbed, protected, and recovering) according to the target health level. When a disturbed label or a protected label is identified, a corresponding suppression matrix table is matched according to the target health level to generate an appropriate target suppression scheme. Flow control actions are only performed on non-critical service data streams, while transmission resources are reserved for data streams in a preset critical service list, avoiding the impact of a single rate-limiting strategy on critical service communication. After executing the target suppression scheme, multiple health levels within a preset time period are collected, and the suppression effect is comprehensively evaluated. If the suppression is successful, the target recovery scheme is activated, and flow control on non-critical service data streams is released in an orderly manner, realizing hierarchical differentiated dynamic control during gPTP anomalies. In this way, the interference of non-critical service traffic on synchronization messages is effectively reduced, ensuring the stability of time synchronization transmission of vehicle-mounted critical services, thereby effectively improving the flow control effect. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this application or the background art, the accompanying drawings used in the embodiments of this application or the background art will be described below.

[0013] Figure 1 This is a schematic diagram of the structure of an in-vehicle system provided in an embodiment of this application; Figure 2 This is a flowchart of a flow control method based on gPTP health provided in an embodiment of this application; Figure 3 This is a flowchart of a method for determining a target health level provided in an embodiment of this application; Figure 4 This is a flowchart of a method for determining a target suppression scheme provided in an embodiment of this application; Figure 5 This is a working diagram of a flow control method based on gPTP health provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a control module provided in an embodiment of this application; Figure 7 This is a schematic diagram of a flow control device based on gPTP health status provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0014] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0015] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0016] It should be understood that the term "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this document indicates that the preceding and following related objects are in an "or" relationship. In the embodiments of this application, "multiple" refers to two or more.

[0017] In the embodiments of this application, "at least one item" or its similar expression refers to any combination of these items, including any combination of a single item or a plurality of items. "One or more" means one or more, while "multiple" means two or more. For example, "at least one item" of a, b, or c can represent the following seven cases: a, b, c; a and b; a and c; b and c; a, b, and c. Each of a, b, and c can be an element or a set containing one or more elements.

[0018] In this application, the term "connection" refers to various connection methods, such as direct connection or indirect connection, to achieve communication between devices. This application does not impose any limitations on this.

[0019] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0020] The electronic devices described in this application embodiment may include smartphones (such as Android phones, iOS phones, Windows Phones, etc.), tablet computers, PDAs, laptops, video matrices, monitoring platforms, mobile internet devices (MIDs), or wearable devices, etc. The above are merely examples and not exhaustive, and include but are not limited to the above devices.

[0021] Of course, the aforementioned electronic devices can also be in-vehicle systems, or control modules of in-vehicle systems.

[0022] The following describes the relevant content, concepts, meanings, technical issues, technical solutions, and beneficial effects involved in the embodiments of this application.

[0023] First, let me explain some of the technical terms or phrases used in this application: gPTP: It is an abbreviation for Generalized Precision Time Protocol, which is specifically used for timing and synchronizing the clocks of devices in time-sensitive networks. It relies on the precise timestamps of specific messages to distribute clock and delay information, thereby achieving high-precision synchronization of the clocks of various devices in the network.

[0024] Static QoS (Quality of Service) configuration scheme: refers to a QoS implementation method in which the network administrator, based on the pre-assessed business needs, fixes the priority, queue scheduling policy and bandwidth allocation parameters of various data flows once during the network design or deployment phase, and does not adjust them according to the real-time network status during network operation.

[0025] OTA (Over-The-Air Technology) upgrade: In the automotive field, OTA upgrade refers to the process by which a car receives and installs software update packages from a remote server via the Internet to update the functions of the vehicle system, fix vulnerabilities, or optimize performance.

[0026] Data stream: refers to a collection of data packets with the same characteristics that are transmitted in a network.

[0027] Data traffic: refers to the total amount of data passing through a network link or network node per unit of time, usually measured in bits per second (bps) or packets per second (pps).

[0028] gPTP synchronization messages: These are data packets conforming to the IEEE 802.1AS standard and used to transmit time synchronization information between network devices. gPTP synchronization messages include, but are not limited to, Sync messages, Follow_Up messages, Pdelay_Req messages, and Pdelay_Resp messages.

[0029] Sync messages: These are event messages periodically sent from the master clock to the slave clock in the gPTP protocol. Sync messages are given a precise estimated transmission time when leaving the master clock and are marked with an entry timestamp when entering the slave clock or network bridging device. Sync messages are the "heartbeat" signal in the time synchronization link; monitoring the arrival interval and jitter of Sync messages can assess the stability of network transmission.

[0030] Follow_Up message: This refers to a regular message sent immediately following the Sync message in the gPTP protocol. It carries the precise timestamp of the Sync message when it leaves the master clock. Since the Sync message itself cannot carry its precise transmission time when leaving the master clock, the Follow_Up message needs to transmit this precise timestamp to the receiving end. The receiving end combines the entry timestamp of the Sync message and the precise transmission timestamp in the Follow_Up message to calculate the clock offset, thereby achieving time synchronization.

[0031] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of an in-vehicle system provided in an embodiment of this application; it can be seen that the in-vehicle system (hereinafter referred to as the system) includes: a control module, a synchronous quality acquisition module, a health assessment module, a suppression matrix module, an execution module, and a recovery module, wherein: The control module, as the decision-making core of the system, is responsible for coordinating the data interaction and execution timing between various modules, triggering suppression or recovery processes based on health assessment results, and issuing control commands to the execution module to ensure the closed-loop operation of the entire flow control logic.

[0032] The synchronization quality acquisition module is used to collect basic information about system messages and calculate multiple synchronization quality indicators based on this information, such as message jitter, fluctuation of the corresponding time synchronization correction value, dwell time deviation, synchronization loss ratio, etc., which are not limited here.

[0033] The health assessment module is used to normalize and weight multiple synchronization quality indicators output by the synchronization quality acquisition module to obtain a comprehensive health score; then, the target health score level is determined based on the comprehensive health score.

[0034] The inhibition matrix module is used to store multiple inhibition matrix tables. It queries the corresponding inhibition matrix table according to the target health level and outputs the corresponding set of hierarchical inhibition actions (i.e., the target inhibition plan).

[0035] The execution module is used to execute the target suppression scheme.

[0036] The recovery module is used to release the flow control of non-critical business data streams in reverse order of the execution sequence of the suppression actions after the target suppression plan is executed and the health assessment module determines that the system's health level has returned to normal, so as to achieve a smooth rollback of the suppression measures.

[0037] Please see Figure 2 , Figure 2 This is a flowchart of a flow control method based on gPTP health provided in an embodiment of this application; applied to the control module of an in-vehicle system, the method includes: S201. Obtain the target basic data corresponding to the gPTP synchronization message.

[0038] In this embodiment of the application, the structure of the vehicle system can be as follows: Figure 1 As shown.

[0039] In a specific embodiment, the control module can invoke the synchronization quality acquisition module to capture gPTP standard synchronization packets (e.g., Sync, Follow_Up packets), filter vehicle-mounted ordinary service packets, continuously capture all gPTP packets within a preset time window, obtain information such as the original timestamp of the packet, the packet payload field, and the send / receive time markers, and calculate multiple synchronization quality indicators, i.e., target basic data, based on this information. The preset time window can be preset in advance or defaulted; these multiple synchronization quality indicators can be: packet jitter value, fluctuation amount of the time synchronization correction value corresponding to the packet, dwell time deviation value, and synchronization loss ratio.

[0040] In some embodiments, the vehicle system may include a switching chip interface, through which the hardware timestamp of the Sync message is read and the arrival time of each Sync message is recorded; the difference between the arrival times of adjacent Sync messages is calculated to obtain the actual arrival interval, and the absolute value of the difference between the actual arrival interval and the theoretical transmission interval specified by the protocol is used as the jitter value of the message.

[0041] In some embodiments, the value of the CorrectionField field in each gPTP synchronization message is read, and the maximum and minimum values ​​are recorded. The difference between the maximum and minimum values ​​is used as the fluctuation of the time synchronization correction value corresponding to the message. The CorrectionField field is a gPTP header correction field used to accumulate the message's network-wide forwarding latency and link transmission delay. Downstream devices rely on this field to compensate for synchronization errors.

[0042] In some embodiments, for each Sync message, the entry time when it enters the current network node and the exit time when it leaves the current network node are recorded respectively. The difference between the exit time and the entry time is calculated to obtain the actual residence time. The difference between the actual residence time and the standard residence time of the network node is used as the residence time deviation value.

[0043] In some embodiments, the number of Sync messages actually received is counted, and the theoretical number of messages to be received is calculated based on the sending period of the Sync messages and the length of the preset time window; the number of messages to be received is subtracted from the number of messages to be received to obtain the message difference; the ratio of the message difference to the theoretical number of messages to be received is used as the synchronization loss ratio.

[0044] S202. Determine the target health level based on the target's basic data.

[0045] In some embodiments, the target basic data includes: message jitter value, fluctuation amount of the time synchronization correction value corresponding to the message, residence time deviation value, and synchronization loss ratio; please refer to Figure 3 , Figure 3 This is a flowchart illustrating a method for determining a target health level according to an embodiment of this application. As can be seen, determining the target health level based on the target's basic data includes, for example... Figure 3 The steps shown are as follows: S11. Normalize the jitter value, the fluctuation amount, and the residence time deviation value respectively to obtain the target jitter value, the target fluctuation amount, and the target residence time deviation value. S12. Determine the target health level based on the target jitter value, the target fluctuation amount, the target residence time deviation value, and the synchronization loss ratio.

[0046] In this embodiment of the application, the min-max normalization algorithm can be used to normalize the jitter value, fluctuation amount, and residence time deviation value respectively to obtain the target jitter value, target fluctuation amount, and target residence time deviation value. For example, the jitter value is normalized as follows: x2=(x1-xmin) / (xmax-xmin); Where x2 represents the normalized jitter value (i.e., the target jitter value); x1 represents the jitter value; xmax represents the maximum jitter value within the preset time window; and xmin represents the minimum jitter value within the preset time window.

[0047] It should be explained that since the synchronization loss ratio is itself a value between 0 and 1, there is no need to normalize it.

[0048] Then, the target jitter value, target fluctuation amount, target residence time deviation value, and synchronization loss ratio are analyzed to determine the target health level.

[0049] In this way, by normalizing the jitter value, fluctuation amount, and dwell time deviation value, the differences in the dimensions and ranges of each indicator can be eliminated, avoiding the dominance of a single indicator in the evaluation. Combined with the synchronization loss ratio, the health level is comprehensively determined, which balances the coverage of multiple synchronization interference factors, improves the accuracy of health level classification, and provides a reliable basis for classification traffic suppression.

[0050] In some embodiments, determining the target health level based on the target jitter value, the target fluctuation amount, the target residence time deviation value, and the synchronization loss ratio includes: S21. Determine the target service scenario corresponding to the gPTP synchronization message; S22. Determine the target weight set corresponding to the target business scenario; the target weight set includes: a first weight corresponding to the target jitter value, a second weight corresponding to the target fluctuation amount, a third weight corresponding to the target residence time deviation value, and a fourth weight corresponding to the synchronization loss ratio; the sum of all weights in the target weight set is 1; S23. Determine the target health based on the first weight, the second weight, the third weight, the fourth weight, the target jitter value, the target fluctuation amount, the target residence time deviation value, and the synchronization loss ratio; S24. Determine the target health level based on the target health level.

[0051] In this embodiment, the target business scenario may include any of the following: advanced driver assistance scenario, in-vehicle infotainment scenario, vehicle network communication scenario, vehicle diagnostic scenario, etc., without limitation; the target health value ranges from 0 to 100%; the higher the target health value, the healthier the target; the target health level can be divided into three levels: level 0, level 1, and level 2. Among them, level 0 indicates normal, level 1 indicates slight disturbance, and level 2 indicates severe disturbance.

[0052] In a specific embodiment, the target service scenario corresponding to the gPTP synchronization message can be determined. Specifically, the protocol feature information of the gPTP synchronization message can be extracted, and the target service scenario can be determined based on the protocol feature information. Specifically, a mapping relationship between preset feature information and service scenarios can be stored in advance, and the target service scenario corresponding to the protocol feature information can be determined based on the mapping relationship.

[0053] In some embodiments, the vehicle system may include a scenario mode register, which pre-stores scenario configuration values ​​corresponding to each business scenario; by reading the current configuration value in the scenario mode register, the target business scenario can be matched and determined.

[0054] Next, the target weight set corresponding to the target business scenario can be determined. Specifically, the mapping relationship between the preset business scenario and the weight set can be stored in advance, and the target weight set corresponding to the target business scenario can be determined based on the mapping relationship.

[0055] In some embodiments, the first weight can be 0.15; the second weight can be 0.3; the third weight can be 0.15; and the fourth weight can be 0.4.

[0056] Then, a weighted calculation can be performed based on the first weight, second weight, third weight, fourth weight, target jitter value, target fluctuation amount, target residence time deviation value, and synchronization loss ratio to obtain the target anomaly degree. The target health degree is obtained by subtracting the target anomaly degree from the preset health degree upper limit. The preset health degree upper limit can be preset in advance or defaulted. Finally, the target health degree level can be determined based on the target health degree. Specifically, a preset mapping relationship between health degree and health degree level can be stored in advance, and the target health degree corresponding to the target health degree can be determined based on the mapping relationship.

[0057] In some embodiments, the preset health level limit can be 100%.

[0058] In some embodiments, if the target health is in the range of 80% to 100%, the target health level is 0; if the target health is in the range of 60% to 79%, the target health level is 1; and if the target health is in the range of 0% to 59%, the target health level is 2.

[0059] In this way, by matching a dedicated set of weights to calculate and classify health based on business scenarios, weights can be allocated differently according to the sensitivity of different businesses to synchronization indicators, avoiding the evaluation bias caused by fixed weights, improving the accuracy of health classification, and providing a basis for business-appropriate judgment for traffic suppression.

[0060] S203. Determine the target status label based on the target health level; the target status label includes any one of the following: normal label, disturbed label, and protected label.

[0061] In this embodiment of the application, if the target health level is 0, the target status label is a normal label; if the target health level is 1, the target status label is a disturbed label; if the target health level is 2, the target status label is a protected label.

[0062] S204. When the target status label includes the disturbed label or the protected label, determine the target suppression matrix table according to the target health level; determine the target suppression scheme according to the target suppression matrix table; the target suppression scheme is used to suppress the traffic of non-critical services in the vehicle system to ensure the traffic transmission of critical services in the preset critical service list.

[0063] In this embodiment of the application, when the target status label includes a disturbed label or a protected label, a target suppression matrix table is determined according to the target health level. Specifically, a pre-stored mapping relationship between a preset health level and a suppression matrix table can be used to determine the target corresponding to the target health level. Then, a target suppression scheme is generated according to the target suppression matrix table.

[0064] In some embodiments, please refer to Figure 4 , Figure 4 This is a flowchart of a method for determining a target suppression scheme according to an embodiment of this application. It can be seen that determining the target suppression scheme based on the target suppression matrix table includes, for example: Figure 4 The steps shown are as follows: S31. Identify the data stream of the vehicle system according to the preset flow classification table to obtain b service categories; b is a positive integer; the data stream of the vehicle system includes the gPTP synchronization message; S32. Determine b suppression operations based on the b service categories and the target suppression matrix table; S33. Determine the b priorities corresponding to the b business categories; S34. Determine the target suppression scheme based on the b priorities and the b suppression operations.

[0065] In this embodiment, the data streams of the vehicle system are identified according to a preset flow classification table to obtain b service categories. Specifically, the flow classification table may contain multiple flow identification rules, each of which includes a matching item and a corresponding service category. All data streams in the vehicle Ethernet within a preset time window are captured, and feature fields such as link identifier and packet type are extracted from each data stream. The extracted feature fields are compared with the rules in the flow classification table one by one. If a match is found, the service category corresponding to the data stream is marked. All data streams are traversed to complete the classification and identification, and b unique service categories are obtained.

[0066] In some embodiments, the following rules can be configured in the flow classification table: Data streams whose destination IP is an OTA server address and whose protocol type is TCP are marked as "OTA streams" in terms of service category. Data streams with a destination port of UDP 514 and a protocol type of UDP are matched and their service category is marked as "log stream"; Data streams whose destination MAC address is a broadcast address or multicast address are marked as "broadcast streams".

[0067] Next, based on the b business categories and the target suppression matrix table, b suppression operations can be determined. Specifically, for each business category, the corresponding suppression operation is queried in the target suppression matrix table to obtain the b suppression operations.

[0068] In some embodiments, when the target health level is level 1 (slightly disturbed), the target inhibition matrix table can be: [Matching Business: Log Stream] -> [Execute Action: Lower Priority]; [Matching Service: OTA Stream] -> [Execute Action: Bandwidth Limit 50%]; [Matching Service: Broadcast / Multicast Stream] -> [Execution Action: Rate Limit 100pps]; [Matching Service: Unknown Unicast Flood] -> [Execution Action: Collapse to Uplink Port].

[0069] In some embodiments, when the target health level is level 2 (severely disturbed), the target inhibition matrix table can be: [Matching Service: Log Stream] -> [Execute Action: Bandwidth Limit 10%]; [Matching Service: OTA Stream] -> [Execution Action: Directly Block / Discard]; [Matching Service: Broadcast / Multicast Stream] -> [Execution Action: Rate Limit 10pps]; [Matching Service: Unknown Unicast Flood] -> [Execution Action: Completely Close].

[0070] It should be noted that the target suppression matrix table above is only an example, and can be flexibly set according to the actual situation in specific implementation.

[0071] Furthermore, b priorities corresponding to b business categories can be determined. Specifically, a pre-stored mapping relationship between business categories and priorities can be used to determine the b priorities corresponding to the b business categories. Finally, a target suppression scheme can be determined based on the b priorities and b suppression operations.

[0072] In this way, by dividing the business categories based on the flow classification table, generating corresponding suppression operations by combining the suppression matrix table, and then matching the priority of various services to form a suppression scheme, traffic control can be implemented differently according to the importance of the services, taking into account the transmission needs of gPTP synchronization messages and various services. The flow control is more in line with the priority logic of the whole vehicle services.

[0073] In some embodiments, determining the target suppression scheme based on the b priorities and the b suppression operations includes: S41. Determine the execution order of the first operation corresponding to the b suppression operations according to the b priorities; wherein, the higher the priority, the later the order of the corresponding suppression operation. S42. Determine the target suppression scheme based on the execution order of the first operation and the b suppression operations.

[0074] In this embodiment of the application, the execution order of the first operation corresponding to the b suppression operations is determined according to b priorities. Specifically, the b suppression operations are sorted in ascending order according to the priority of their corresponding business categories. The suppression operations with lower priorities are sorted first and executed first, while the suppression operations with higher priorities are sorted last and executed later. After sorting, the execution order of the first operation is obtained. Then, the target suppression scheme is determined according to the execution order of the first operation and the b suppression operations.

[0075] In this way, by arranging suppression operations in reverse order according to service priority, first performing rate limiting on low-priority services and delaying the restriction on high-priority services, the critical services and gPTP synchronization message traffic can be protected to the greatest extent, avoiding the premature suppression of high-priority services and improving the transmission stability of the vehicle's core services in synchronization anomaly scenarios.

[0076] In some embodiments, determining the target suppression scheme based on the execution order of the first operation and the b suppression operations includes: S51. Determine the business categories that are in the preset key business list among the b business categories to obtain c business categories; c is a positive integer less than or equal to b; S52. Obtain the c guarantee operations corresponding to the c service categories; each guarantee operation corresponds to one service category; S53. Determine the c suppression operations corresponding to the c service categories in the b suppression operations; S54. Replace the c suppression operations in the b suppression operations with the c safeguard operations to obtain b target suppression operations; S55. Determine the target suppression scheme based on the execution order of the first operation and the b target suppression operations.

[0077] In this embodiment of the application, the list of key business operations can be preset in advance or be set by default.

[0078] In a specific embodiment, the business categories that are in the preset key business list among b business categories can be determined to obtain c business categories. Specifically, the business categories in the b business categories can be compared one by one with the business categories in the preset key business list to filter out the business categories that are in the preset key business list, thus obtaining c key business categories. Next, c guarantee operations corresponding to the c business categories can be obtained. Specifically, a preset mapping relationship between business categories and guarantee operations can be stored in advance, and the c guarantee operations corresponding to the c business categories can be determined based on this mapping relationship. For example, assuming that a certain business category among the c business categories is a control message, its corresponding guarantee operation is: guaranteeing a minimum transmission bandwidth of 2Mbps, and setting the gate time window of this business category to always open (i.e., not restricted by the gate table, and can pass at any time).

[0079] In some embodiments, the preset critical service list may include at least one of the following: synchronization messages, control messages, diagnostic keep-alive messages, necessary management messages, etc., without limitation.

[0080] Next, we can determine the c suppression operations corresponding to the c business categories in the b suppression operations. Specifically, we can determine the c suppression operations corresponding to the c business categories based on the mapping relationship between business categories and suppression operations. Then, we replace the c suppression operations in the b suppression operations with c guarantee operations to obtain b target suppression operations. Specifically, based on the business category, we replace each suppression operation in the c suppression operations with a guarantee operation corresponding to the same business category to obtain b target suppression operations. Finally, we determine the target suppression scheme based on the execution order of the first operation and the b target suppression operations. Specifically, the target suppression scheme can be composed of the execution order of the first operation and the b target suppression operations.

[0081] In this way, by screening critical services and replacing their corresponding suppression operations with safeguard operations, and then combining the priority execution order to form the final suppression scheme, it is possible to implement tiered flow control for non-critical services, while ensuring that critical services are exempt from suppression and receive dedicated safeguards, thereby avoiding the impact of traffic control on core services and improving the accuracy of vehicle network traffic control and the reliability of critical service transmission.

[0082] S205. Execute the target suppression scheme.

[0083] In this embodiment of the application, the target suppression scheme includes a first operation execution order and b target suppression operations.

[0084] In a specific embodiment, b target suppression operations can be executed sequentially according to the first operation execution order, thereby suppressing traffic of non-critical services and ensuring traffic transmission of critical services.

[0085] S206. Obtain a health levels within a preset time period; a is a positive integer.

[0086] In this embodiment of the application, the preset time period can be preset in advance or defaulted.

[0087] In a specific embodiment, a preset time period can be equally divided according to a preset time window to obtain a time window. For example, if the preset time period is 600ms and the preset time window is 200ms, then a=3. Then, the health level corresponding to each time window in these a time windows is determined to obtain a health level. Specifically, the method for obtaining a health level can be the same as the method for obtaining the target health level.

[0088] S207. Determine the target inhibition result based on the a health levels; the target inhibition result includes any of the following: inhibition successful, inhibition failed.

[0089] In this embodiment, the number d of targets with a health level of 0 is counted out of a health levels. The target ratio is obtained by dividing d by a. When the target ratio is greater than or equal to a preset ratio, and the health level corresponding to the last time window in the a time windows is 0, the target suppression result is determined to include suppression success; otherwise, the target suppression result is determined to include suppression failure. The preset ratio can be preset in advance or defaulted.

[0090] In some embodiments, starting from the last time window of the 'a' time windows and tracing back, if there are N consecutive health levels of 0, then the target suppression result is determined to include suppression success; otherwise, the target suppression result is determined to include suppression failure. Here, N is a preset value, and N is less than a. For example, suppose a is 5, N=3, and the 'a' health levels are: level 2, level 1, level 0, level 0, level 0; starting from the last time window and tracing back, if there are 3 consecutive health levels of 0, then the target suppression result is determined to include suppression success.

[0091] In some embodiments, the preset ratio can be 0.6.

[0092] In this way, by combining the percentage of health compliance across multiple time periods with the status determination of the last time period, the misjudgment caused by occasional fluctuations in single-point sampling is avoided, and the current synchronization status has been stably restored. This improves the accuracy and robustness of the suppression effectiveness determination and provides a reliable basis for subsequent adjustments to traffic control strategies.

[0093] S208. When the target suppression result includes the suppression success, determine the target recovery scheme corresponding to the target suppression scheme; execute the target recovery scheme; the target recovery scheme is used to release the suppression of traffic of non-critical services in the vehicle system.

[0094] In this embodiment of the application, the target recovery scheme may include a second operation execution order and b recovery operations.

[0095] In a specific embodiment, when the target suppression result includes successful suppression, the target recovery scheme corresponding to the target suppression scheme is determined; then, the target recovery scheme is executed. Specifically, b recovery operations can be executed sequentially according to the second operation execution order.

[0096] When the target suppression result includes suppression failure, the currently executed target suppression scheme remains unchanged, and the synchronization quality acquisition module is controlled to continuously collect the synchronization quality indicators of subsequent time windows. Based on the acquisition results, the health level corresponding to each window is recalculated. When the health level of multiple consecutive time windows is 0, the suppression is judged to be successful. At this time, the target recovery scheme can be executed. Otherwise, a preset alarm message can be issued to indicate that there is an anomaly in the system.

[0097] In some embodiments, determining the target recovery scheme corresponding to the target suppression scheme includes: S61. Determine the recovery operation corresponding to each suppression operation in the target suppression scheme to obtain b recovery operations; S62. Determine the second operation execution order based on the first operation execution order; the order of the second operation execution order is the reverse of the order of the first operation execution order. S63. Determine the target recovery scheme according to the execution order of the second operation and the b recovery operations.

[0098] In this embodiment of the application, the recovery operation corresponding to each suppression operation in the target suppression scheme is determined to obtain b recovery operations. Specifically, the target suppression scheme contains b suppression operations, which can be a pre-stored mapping relationship between the suppression operations and the recovery operations. Based on this mapping relationship, the b recovery operations corresponding to the b suppression operations are determined. For example, assuming that a certain suppression operation is "bandwidth rate limit 50%", its corresponding recovery operation can be "remove the bandwidth rate limit and restore the original bandwidth quota of the service".

[0099] Next, the execution order of the second operation can be determined based on the execution order of the first operation. Specifically, the execution order of the first operation is to suppress low-priority services first and then suppress high-priority services. The execution order of the first operation can be reversed to obtain the reverse execution order of the second operation, that is, to restore high-priority services first and then restore low-priority services. Finally, the target recovery plan can be determined based on the execution order of the second operation and b recovery operations. Specifically, the target recovery plan can be composed of the execution order of the second operation and b recovery operations.

[0100] In this way, by matching recovery operations with suppression operations one by one and releasing the flow limit in reverse execution order, high-priority service bandwidth is restored first, core services are prevented from being delayed in recovery, traffic control is smoothly lifted, and gPTP synchronization services are guaranteed to quickly resume normal transmission.

[0101] In some embodiments, please refer to Figure 5 , Figure 5 This is a flowchart illustrating the workflow of a gPTP health-based flow control method provided in this application embodiment; the workflow of this method is as follows: 1. Message event collection: Collect gPTP synchronization messages transmitted through the vehicle's Ethernet port, record the timestamps of each message's transmission and reception, and continuously collect raw data of message events.

[0102] 2. Calculation of synchronous quality indicators: Based on the collected message timestamps, the synchronization quality indicators such as message arrival jitter, message loss rate, and transmission latency are statistically analyzed, and then the health status of gPTP is obtained through weighted calculation.

[0103] 3. Status judgment: The current health level is determined based on the health status of gPTP. If the current health level is level 1 or 2, the synchronization quality is deemed to be degraded, and the traffic suppression process is initiated. If the current health level is level 0, it means that everything is normal, and normal traffic scheduling is maintained.

[0104] 4. Inhibit: Execute traffic suppression logic: Based on the preset flow classification table, distinguish between critical synchronization services and non-critical services, generate orderly suppression operations, implement bandwidth rate limiting and queue rate limiting for low-priority data streams such as OTA and background logs, and configure dedicated bandwidth guarantee for gPTP synchronization messages to reduce network load interference to synchronization.

[0105] 5. Delayed recovery: A hysteresis-based decision mechanism is used to remove traffic suppression: the synchronization health of multiple consecutive time windows is continuously collected, and suppression is considered successful only when the health of N consecutive windows meets the standard; recovery operations are performed in the reverse order of the rate limiting operation to remove the rate limiting of each service in turn; if the synchronization quality does not meet the standard within the observation period, an abnormal alarm is output to maintain the current suppression strategy for continuous control.

[0106] In some embodiments, a flow control process of an in-vehicle system may be as follows: S1. Collect the timestamp of the Sync message, count the arrival interval of 10 consecutive messages, and calculate the jitter value of the synchronization message as 800ns and the message loss rate as 5%. S2. Calculate the synchronization health score using a weighted average of jitter value and message loss rate. The resulting synchronization health score is 65%, corresponding to a health level of 2. At this point, the status label can be set to a protection label. S3. Based on the status label and the flow classification table, query the corresponding suppression matrix table and issue an ACL to limit the OTA background flow to 10Mbps. S4. Add the synchronization message to the service whitelist, configure a dedicated queue, and ensure a minimum bandwidth of 2Mbps for the synchronization stream; S5. If the health status of three consecutive time windows is 85%, 92%, and 95% after continuous monitoring, and the recovery judgment conditions are met, the OTA rate limiting ACL is revoked in the reverse order of the rate limiting to complete the traffic recovery.

[0107] In some embodiments, the control module of the vehicle system may maintain a general state machine, which is specifically as follows:

[0108] As can be seen, this general state machine forms a complete closed loop of "normal monitoring - abnormal early warning observation - traffic protection and suppression - graded hysteresis recovery". Based on the dynamic switching control strategy of gPTP synchronization health, it relies on multi-level state hysteresis logic to avoid network oscillation caused by frequent switching of traffic strategy, and stably ensure the synchronization quality of vehicle clock.

[0109] In some embodiments, the regional controller synchronously executes background OTA download tasks, while the log reporting task configuration is abnormal, generating continuous large traffic data and consuming network bandwidth. The vehicle system detects that the packet arrival jitter and dwell time deviation corresponding to the gPTP synchronization health level are continuously deteriorating, and then performs tiered traffic suppression: firstly, it performs scheduling and degradation processing on the log reporting stream, then implements bandwidth rate limiting on the background OTA download stream, and simultaneously reduces the flooding range of unknown unicast packets to reduce network load interference. After traffic control, the gPTP synchronization health level returns to the normal range, and the vehicle system then gradually removes restrictions in reverse order, restoring normal transmission permissions for the log reporting stream and the background OTA stream sequentially.

[0110] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a control module provided in an embodiment of this application; it can be seen that the control module may include an on-board switching chip.

[0111] In some embodiments, the software implementation of the method of this application on the vehicle-mounted switching chip is as follows: (1) Statistical data collection: The port counter, queue counter, address table status, trap statistics and timestamp statistics are read periodically through the software interface of the vehicle-mounted switching chip to form a fixed monitoring window.

[0112] (2) Status maintenance: Maintain the candidate exception table, whitelist table, recovery timer and port role table in the CPU management or main control software.

[0113] (3) Policy issuance: Based on the status determination results, issue ACL / TCAM rules, learning control commands, priority mapping configurations, rate limiter parameters, mirroring policies, flood domain control commands or queue redirection commands.

[0114] (4) Recovery rollback: During recovery, all traffic control policies are not fully released directly, but are gradually released in reverse order of the policy issuance sequence to ensure a smooth transition of network status.

[0115] (5) Platform Adaptation: The method of this application does not depend on a specific model of switching chip. Any vehicle-mounted switching chip with hardware timestamp capture and traffic management functions can be used as a deployment platform. During implementation, the configuration parameters such as monitoring window length, queue priority mapping relationship and number of ACL rules can be adjusted adaptively according to the hardware resources of the specific chip to achieve an equivalent implementation of the method of this application.

[0116] In some embodiments, the method of this application can be deployed on a software platform of BCM89272 or similar Broadcom automotive switching chips.

[0117] In summary, the gPTP health-based flow control method described in this application determines the target health level by acquiring the target basic data of the gPTP synchronization message and matches four status labels—normal, disturbed, protected, and recovering—based on the target health level. When a disturbed or protected label is identified, a corresponding suppression matrix table is matched according to the target health level to generate an appropriate target suppression scheme. Flow control is only applied to non-critical service data streams, while transmission resources are reserved for data streams in a preset critical service list, avoiding the impact of a single rate-limiting strategy on critical service communication. After executing the target suppression scheme, multiple health levels within a preset time period are collected, and the suppression effect is comprehensively evaluated. If suppression is successful, a target recovery scheme is initiated to orderly release flow control on non-critical service data streams, achieving hierarchical and differentiated dynamic control during gPTP anomalies. This effectively reduces the interference of non-critical service traffic on synchronization messages, ensures the stability of time synchronization transmission of vehicle-mounted critical services, and thus effectively improves the flow control effect.

[0118] Please see Figure 7 , Figure 7 This is a schematic diagram of a flow control device based on gPTP health status provided in an embodiment of this application, applied to the control module of an in-vehicle system. The flow control device 700 based on gPTP health status includes: an acquisition unit 701, a determination unit 702, and a flow control unit 703, wherein: The acquisition unit 701 is used to acquire the target basic data corresponding to the gPTP synchronization message; The determining unit 702 is used to determine the target health level based on the target basic data; and to determine the target status label according to the target health level; the target status label includes any one of the following: normal label, disturbed label, and protected label; The flow control unit 703 is configured to, when the target status label includes the disturbed label or the protected label, determine a target suppression matrix table based on the target health level; determine a target suppression scheme based on the target suppression matrix table; the target suppression scheme is used to suppress the traffic of non-critical services in the vehicle system to ensure the traffic transmission of critical services in the preset critical service list; and execute the target suppression scheme. The acquisition unit 701 is further configured to acquire a health levels within a preset time period; where a is a positive integer. The determining unit 702 is further configured to determine the target suppression result based on the a health levels; the target suppression result includes any one of the following: suppression success, suppression failure; when the target suppression result includes suppression success, determine the target recovery scheme corresponding to the target suppression scheme; execute the target recovery scheme; the target recovery scheme is used to release the suppression of traffic for non-critical services in the vehicle system.

[0119] In specific implementations, the gPTP health-based flow control device 700 described in the embodiments of the present invention can also execute other implementations described in the gPTP health-based flow control method provided in the embodiments of the present invention, which will not be repeated here.

[0120] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include a processor, a memory, a communication interface, and one or more programs. The processor, memory, and communication interface can be interconnected via a bus. The one or more programs are stored in the memory and configured to be executed by the processor. In this embodiment, the programs include instructions for performing some or all of the steps described in the above method embodiments.

[0121] The processor can be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, cells, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The communication unit can be a communication interface, transceiver, transceiver circuit, etc., and the storage unit can be a memory.

[0122] The memory can be volatile or non-volatile, or a combination of both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0123] It is understood that electronic devices may include more or fewer structural elements than those shown in the above block diagram, such as power modules, physical buttons, Wi-Fi modules, speakers, Bluetooth modules, sensors, display modules, etc., without limitation.

[0124] This application also provides a computer-readable storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the methods described in the above method embodiments, wherein the computer includes an electronic device.

[0125] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package, and the computer may include an electronic device.

[0126] It should be noted that, for the sake of simplicity, the foregoing method embodiments 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, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0127] 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.

[0128] In the several 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 the units described above 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 interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0129] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0130] The steps of the methods or algorithms described in the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in RAM, flash memory, ROM, EPROM, electrically erasable programmable read-only memory (EEPROM), registers, hard disk, portable hard disk, read-only optical disk (CD-ROM), or any other form of storage medium well known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Furthermore, the ASIC can reside in a terminal device or management device. Alternatively, the processor and storage medium can exist as discrete components in the terminal device or management device.

[0131] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in the embodiments of this application can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated.

[0132] The aforementioned computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media.

[0133] The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).

[0134] The modules / units included in the various devices and products described in the above embodiments can be software modules / units, hardware modules / units, or a combination of both. For example, for devices and products applied to or integrated into a chip, all modules / units can be implemented using hardware methods such as circuits, or at least some modules / units can be implemented using software programs that run on a processor integrated within the chip, while the remaining (if any) modules / units can be implemented using hardware methods such as circuits. For devices and products applied to or integrated into a chip module, all modules / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components of the chip module, or at least some modules / units can be implemented using hardware methods such as circuits. The implementation is achieved through a software program that runs on the processor integrated within the chip module. The remaining modules / units (if any) can be implemented using hardware methods such as circuits. For various devices and products applied to or integrated into terminal equipment, each of their modules / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components within the terminal equipment. Alternatively, at least some modules / units can be implemented through a software program that runs on the processor integrated within the terminal equipment, while the remaining modules / units (if any) can be implemented using hardware methods such as circuits.

[0135] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the embodiments of this application. It should be understood that the above descriptions are merely specific embodiments of the embodiments of this application and are not intended to limit the protection scope of the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solutions of the embodiments of this application should be included within the protection scope of the embodiments of this application.

Claims

1. A flow control method based on gPTP health status, characterized in that, The method, applied to a control module of an in-vehicle system, includes: Obtain the target basic data corresponding to the gPTP synchronization message; The target's health level is determined based on the aforementioned basic target data; A target status label is determined based on the target health level; the target status label includes any of the following: normal label, disturbed label, and protected label; When the target status label includes the disturbed label or the protected label, a target suppression matrix table is determined according to the target health level; a target suppression scheme is determined according to the target suppression matrix table; the target suppression scheme is used to suppress the traffic of non-critical services in the vehicle system to ensure the traffic transmission of critical services in the preset critical service list; Execute the target suppression scheme; Retrieve *a* health levels within a preset time period; where *a* is a positive integer. The target inhibition result is determined based on the aforementioned health level a; the target inhibition result includes any of the following: inhibition successful, inhibition failed; When the target suppression result includes the suppression success, a target recovery scheme corresponding to the target suppression scheme is determined; the target recovery scheme is executed; the target recovery scheme is used to release the suppression of traffic for non-critical services in the vehicle system.

2. The method as described in claim 1, characterized in that, The target basic data includes: message jitter value, fluctuation of the time synchronization correction value corresponding to the message, residence time deviation value, and synchronization loss ratio; Determining the target health level based on the target's basic data includes: The jitter value, the fluctuation amount, and the residence time deviation value are normalized respectively to obtain the target jitter value, the target fluctuation amount, and the target residence time deviation value. The target health level is determined based on the target jitter value, the target fluctuation amount, the target residence time deviation value, and the synchronization loss ratio.

3. The method as described in claim 2, characterized in that, The determination of the target health level based on the target jitter value, the target fluctuation amount, the target residence time deviation value, and the synchronization loss ratio includes: Determine the target service scenario corresponding to the gPTP synchronization message; Determine the target weight set corresponding to the target business scenario; the target weight set includes: a first weight corresponding to the target jitter value, a second weight corresponding to the target fluctuation amount, a third weight corresponding to the target residence time deviation value, and a fourth weight corresponding to the synchronization loss ratio; the sum of all weights in the target weight set is 1; The target health is determined based on the first weight, the second weight, the third weight, the fourth weight, the target jitter value, the target fluctuation amount, the target residence time deviation value, and the synchronization loss ratio. The target health level is determined based on the target health level.

4. The method according to any one of claims 1-3, characterized in that, The step of determining the target suppression scheme based on the target suppression matrix table includes: The data stream of the vehicle system is identified according to a preset flow classification table to obtain b service categories; b is a positive integer; the data stream of the vehicle system includes the gPTP synchronization message; Based on the b business categories and the target suppression matrix table, determine b suppression operations; Determine the b priorities corresponding to the b business categories; The target suppression scheme is determined based on the b priorities and the b suppression operations.

5. The method as described in claim 4, characterized in that, The step of determining the target suppression scheme based on the b priorities and the b suppression operations includes: Based on the b priorities, the execution order of the first operation corresponding to the b suppression operations is determined; wherein, the higher the priority, the later the order of the corresponding suppression operation. The target suppression scheme is determined based on the execution order of the first operation and the b suppression operations.

6. The method as described in claim 5, characterized in that, The step of determining the target suppression scheme based on the execution order of the first operation and the b suppression operations includes: Determine the business categories that are in the preset key business list from the b business categories to obtain c business categories; c is a positive integer less than or equal to b. Obtain c support operations corresponding to the c business categories; each support operation corresponds to one business category. Determine the c suppression operations corresponding to the c service categories in the b suppression operations; By replacing the c suppression operations in the b suppression operations with the c safeguard operations, b target suppression operations are obtained; The target suppression scheme is determined based on the execution order of the first operation and the b target suppression operations.

7. The method as described in claim 6, characterized in that, Determining the target recovery scheme corresponding to the target suppression scheme includes: Determine the recovery operation corresponding to each suppression operation in the target suppression scheme to obtain b recovery operations; The second operation execution order is determined based on the first operation execution order; the second operation execution order is the reverse of the first operation execution order. The target recovery scheme is determined based on the execution order of the second operation and the b recovery operations.

8. A flow control device based on gPTP health status, characterized in that, A control module applied to an in-vehicle system, the device comprising: an acquisition unit, a determination unit, and a flow control unit, wherein: The acquisition unit is used to acquire the target basic data corresponding to the gPTP synchronization message; The determining unit is configured to determine the target health level based on the target basic data; and determine the target status label according to the target health level; the target status label includes any one of the following: normal label, disturbed label, and protected label; The traffic control unit is configured to, when the target status label includes the disturbed label or the protected label, determine a target suppression matrix table based on the target health level; determine a target suppression scheme based on the target suppression matrix table; the target suppression scheme is used to suppress the traffic of non-critical services in the vehicle system to ensure the traffic transmission of critical services in the preset critical service list; and execute the target suppression scheme. The acquisition unit is further configured to acquire a health levels within a preset time period; where a is a positive integer. The determining unit is further configured to determine the target suppression result based on the a health levels; the target suppression result includes any one of the following: suppression success, suppression failure; when the target suppression result includes suppression success, determine the target recovery scheme corresponding to the target suppression scheme; execute the target recovery scheme; the target recovery scheme is used to release the suppression of traffic for non-critical services in the vehicle system.

9. An electronic device, characterized in that, include: Processor, memory, communication interface, and one or more programs; The one or more programs are stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps of the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, A computer program for storing electronic data interchange, wherein the computer program causes a computer to perform the method as described in any one of claims 1-7.