Clock de-jitter method, system, and vehicle
Patent Information
- Application Number
- CN202611277943.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-10-16
AI Technical Summary
[0003]本申请提供了一种时钟去抖方法、系统和车辆,该方法解决了车载分布式音频系统中,当车载娱乐主机的内部存在异常时,可能引发音频媒体报文的放映时间或基准时钟报文的时钟信息超差,导致音频系统播放质量下降甚至出现中断的问题,能够去除音频媒体报文或基准时钟报文的抖动,在车载娱乐主机的内部存在异常时保证音频系统的正常工作
[0003] This application provides a clock jitter removal method, system, and vehicle. The method addresses the problem that in in-vehicle distributed audio systems, when there is an internal anomaly in the in-vehicle entertainment head unit, the playback time of audio media messages or the clock information of the reference clock message may exceed the tolerance, leading to a decrease in the playback quality of the audio system or even interruption. The method can remove jitter in audio media messages or reference clock messages, ensuring the normal operation of the audio system when there is an internal anomaly in the in-vehicle entertainment head unit.
Smart Images

Figure CN122932877A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent connected vehicle technology, and more specifically, to clock de-jittering methods, systems, and vehicles in the field of intelligent connected vehicle technology. Background Technology
[0002] In in-vehicle distributed audio systems, when there are abnormalities in the software or hardware of the clock source ECU, it may cause the AAF (AVTP Audio Format) playback time or CRF (Clock Reference Format) clock information to be out of tolerance, resulting in a decrease in the playback quality of the audio system or even interruption. This problem urgently needs to be solved. Summary of the Invention
[0003] This application provides a clock jitter removal method, system, and vehicle. The method addresses the problem that in in-vehicle distributed audio systems, when there is an internal anomaly in the in-vehicle entertainment head unit, the playback time of audio media messages or the clock information of the reference clock message may exceed the tolerance, leading to a decrease in the playback quality of the audio system or even interruption. The method can remove jitter in audio media messages or reference clock messages, ensuring the normal operation of the audio system when there is an internal anomaly in the in-vehicle entertainment head unit.
[0004] In a first aspect, a clock dejittering method is provided, the method comprising: responding to receiving current message information sent by an on-board unit; determining at least one target control node based on the current message information, and sending the current message information and / or a backup message corresponding to the current message information to the at least one target control node; responding to receiving a target clock source fed back by the at least one target control node based on the current message information and / or the backup message, calibrating the current clock according to the target clock source, and / or calibrating the current playback time in response to receiving a playback time fed back by the at least one target control node based on the current message information.
[0005] The above technical solution identifies the reference clock and audio playback time through the current message information. For global clock jitter, a backup message is used for multi-node collaborative negotiation and dynamic switching of reliable clock sources. For playback time jitter, only the playback time is corrected locally to avoid minor playback timing anomalies triggering a global clock reset, reducing audio transient pops and stutters. Redundant clock control nodes send the original reference clock message and the backup reference clock message to at least one target control node. At least one target control node performs timing jitter verification and feeds back the target clock source. The final clock source is determined based on the cross-verification results of multiple nodes, overcoming the misjudgment defects caused by single-node independent judgment. By correcting the audio playback time of the corresponding target control node through at least one target control node, the reliability of the clock is improved, ensuring uninterrupted transmission of audio data streams.
[0006] Secondly, a clock jitter reduction system is provided, comprising: a message receiving module, configured to determine a current jitter type based on the current message information in response to receiving current message information sent by an on-board host; a message sending module, configured to determine at least one target control node based on the current message information, and send the current message information and / or a backup message corresponding to the current message information to the at least one target control node; and a calibration module, configured to calibrate the current clock based on the target clock source fed back by the at least one target control node based on the current message information and / or the backup message, and / or calibrate the current playback time based on the playback time fed back by the at least one target control node based on the current message information.
[0007] Thirdly, a vehicle is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the clock de-jittering method described above.
[0008] Fourthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.
[0009] Fifthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof. Attached Figure Description
[0010] Figure 1 This is a schematic diagram of an existing in-vehicle distributed audio system; Figure 2 This is a schematic diagram illustrating time synchronization between various ECUs in the prior art; Figure 3 An example diagram illustrating the synchronization of playback time in existing technologies; Figure 4 A schematic diagram illustrating the transmission of media clocks using CRF in existing technology; Figure 5 A flowchart of the clock debouncing method provided in the embodiments of this application; Figure 6 This is a schematic diagram of Ethernet data flow in existing technologies. Figure 7 This is a schematic diagram of an Ethernet data flow provided in an embodiment of this application; Figure 8A schematic diagram of the exchange between the HUT and each ZCU node provided in the embodiments of this application; Figure 9 A flowchart illustrating the working process of the redundant clock control node provided in this application embodiment; Figure 10 A flowchart illustrating the working process of the next-level ZCU of the redundant clock control node provided in this application embodiment; Figure 11 A flowchart illustrating the workflow of the second target control node provided in this application embodiment; Figure 12 A flowchart illustrating the workflow of the audio source ECU (i.e., HUT) provided in the embodiments of this application; Figure 13 A block diagram of the clock debouncing method system provided in the embodiments of this application; Figure 14 This is a schematic diagram of the vehicle structure according to an embodiment of this application. Detailed Implementation
[0011] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text 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, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0012] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0013] like Figure 1 As shown, the in-vehicle distributed audio system refers to an in-vehicle audio system that connects the speakers to the ZCU drive system nearby, eliminating the need for a separate in-vehicle power amplifier ECU, saving audio cable length, and achieving the goal of reducing the cost and weight of the entire vehicle.
[0014] Playback in a distributed audio system is achieved through the coordinated use of three Ethernet protocols: ① gPTP, or clock synchronization protocol, is used in distributed audio systems to achieve time unification and accuracy calibration between the HUT and each ZCU, and time synchronization between each ECU is as follows: Figure 2 As shown.
[0015] ② The IEEE 1722 protocol AAF (AVTP Audio Format) format enables Ethernet packetization of audio signals. This data packet contains the playback time, and each ZCU uses this playback time for synchronized playback. Figure 3 As shown.
[0016] ③ The IEEE 1722 protocol CRF (Clock Reference Format) uses the media clock of the sending node as a reference. Internally, it packages time information at a fixed rhythm for media clock recovery at the playback node, ensuring the distributed audio system operates on a unified media clock reference. CRF transmits the media clock as follows: Figure 4 As shown.
[0017] In a distributed audio system, when a software or hardware malfunction occurs within the audio source ECU (usually a HUT), it can cause audio clock output problems, including: The standard playback interval for 48kHz audio frames is 125μs. Jitter in the playback time information of AAF messages and the imbalance of intervals will cause ZCU playback timing to be disordered and phase shift to occur. Jitter in the CRF message clock information will cause the audio clock recovered by ZCU to be unable to maintain a stable 48KHz, ultimately degrading the audio playback effect.
[0018] The technical terms used in the embodiments of this application are explained as follows: ECU: Electronic Control Unit. The ECUs mentioned in this article are all ECUs with bus communication capabilities.
[0019] In-vehicle Ethernet: An Ethernet bus suitable for in-vehicle environments, enabling point-to-point communication. Communication between multiple ECUs requires forwarding via a switch. The Ethernet packet data field length is up to 1500 bytes, and communication is conducted at 100Mbps or 1000Mbps. It is suitable for transmitting large data streams such as audio and video.
[0020] IEEE Std 1722 (AVTP) is an Ethernet transmission protocol that includes various encapsulation types. Among them, AAF can directly encapsulate digital audio signals and specify playback time; CRF can encapsulate time information at certain time intervals for media clock recovery.
[0021] HUT: In-vehicle entertainment system, a type of in-vehicle ECU.
[0022] ZCU: Area Controller, a type of vehicle ECU.
[0023] Figure 5This is a schematic flowchart of a clock debouncing method provided in an embodiment of this application.
[0024] This application selects the next-level ZCU of the audio source HUT as the redundant clock control node in the vehicle's distributed audio system, for example, by... Figure 1 In this context, ZCU_L is defined as a redundant clock control node, and the next-level ZCU of the redundant clock control node serves as the first target control node (i.e., Figure 1 In this context, ZCU_B is defined as the first target control node, and the next-level ZCU of the first target control node serves as the second target control node (i.e., Figure 1 ZCU_R is defined as the second target control node, where the redundant clock control node has the following functions: ① Publish a backup CRF message to the first target control node; ② Check the clock accuracy in the CRF message sent by the HUT; ③ Check the time information in the AAF message sent by the HUT; ④ Publish abnormal information to the HUT when the information in the CRF message or AAF message is abnormal; ⑤ When the HUT has a clock accuracy problem, temporarily take over the clock source of the audio system.
[0025] Existing distributed audio systems obtain Ethernet data streams such as Figure 6 As shown, this solution is in Figure 6 Based on this, add the following Ethernet data streams, such as Figure 7 As shown: ① The redundant clock control node sends a CRF backup message to the first target control node; ② The redundant clock control node adds information feedback messages to the audio source HUT; ③ The first target control node sends a clock selection message to the redundant clock control node; ④ Add clock negotiation messages between the first target control node and the second target control node.
[0026] The sending conditions for CRF backup messages, information feedback messages, clock selection messages, and clock negotiation messages are as follows: ① CRF Backup Message: For each CRF message received by the redundant clock control node from the audio source HUT, the first target control node sends a CRF backup message. ② Information feedback message: When the jitter of the CRF or AAF time information sent by the audio source HUT exceeds the tolerance, or when the redundant clock control node takes over the system clock source, the redundant clock control node sends an information feedback message to the audio source HUT. ③ Clock negotiation message: After receiving each CRF message and CRF backup message, the first target control node exchanges clock negotiation messages with the second target control node; ④ Clock Selection Message: After the first target control node and the second target control node complete clock negotiation, the first target control node sends a clock selection message to the clock redundant clock control node.
[0027] The `crf_data` consists of one or more time information segments, each 8 bytes long. The CRF backup message sends the time information according to the internal media clock frequency of the redundant clock control node. A reserved bit `r` is enabled; when `r=0`, it means the redundant clock control node has not taken over the audio system clock source; when `r=1`, it means the redundant clock control node has taken over the audio system clock source.
[0028] The information feedback message uses the UDP protocol, and the data content definition of the information feedback message is shown in Table 1.
[0029] Table 1
[0030] ③ The clock negotiation message uses the UDP protocol, and the data content definition of the clock negotiation message is shown in Table 2.
[0031] Table 2
[0032] ④ The clock selection message uses the UDP protocol, and the data content definition of the clock selection message is shown in Table 3.
[0033] Table 3
[0034] For example, such as Figure 5 As shown, the method includes: In step S501, in response to receiving the current message information sent by the vehicle host.
[0035] The current message information sent by the vehicle entertainment host (HUT) includes the original reference clock message (CRF message) and the original audio media message (AAF message). The vehicle entertainment host sends the original reference clock message and the original audio media message to the redundant clock control node (ZCU_L).
[0036] In step S502, at least one target control node is determined based on the current message information, and the current message information and / or the backup message corresponding to the current message information are sent to at least one target control node.
[0037] Optionally, in some embodiments, determining at least one target control node based on the current message information includes: parsing the current message information to obtain an original reference clock message and an original audio media message; in response to the original reference clock message, determining a first target control node and a second target control node, wherein the second target control node is a subordinate node of the first target control node; and in response to the original audio media message, determining the first target control node and the second target control node.
[0038] Specifically, after receiving the current message information sent by the vehicle entertainment host HUT, the redundant clock control node ZCU_L parses the message type and distinguishes between two types of messages: ① Original reference clock message (CRF), which carries the global system clock reference; ② Original audio media message (AAF), which carries audio data and playback timestamp.
[0039] The redundant clock control node ZCU_L identifies the current message as the original reference clock message and determines at least one target control node as the first target control node ZCU_B and the second target control node ZCU_R.
[0040] 1) The redundant clock control node ZCU_L sends the original CRF message and the generated backup CRF message to the first target control node ZCU_B; 2) After receiving the message, the first target control node ZCU_B forwards it to the second target control node ZCU_R; 3) The first target control node ZCU_B and the second target control node ZCU_R independently perform clock jitter verification and clock negotiation based on the original CRF message and the backup CRF, and feed back the target clock source.
[0041] The redundant clock control node ZCU_L identifies the current message as an original audio media message, and similarly determines the target control nodes as the first target control node ZCU_B and the second target control node ZCU_R.
[0042] 1) ZCU_L forwards the original AAF message to ZCU_B, and ZCU_B continues to forward the AAF message to ZCU_R; 2) ZCU_B and ZCU_R independently determine playback time jitter based on AAF messages; 3) ZCU_B and ZCU_R independently determine the local playback time based on the judgment result of the playback time jitter, which is used for the audio scheduling of their respective nodes.
[0043] Through the above technical solution, the system can identify two types of messages: the original reference clock message and the original audio media message. For the original and backup messages sent by the global clock, the target clock source is selected through collaborative verification and negotiation by multi-level target control nodes. For AAF playback time jitter, each domain controller independently corrects its local playback time without initiating cross-node negotiation. This avoids minor audio playback timing fluctuations triggering global clock resynchronization, effectively reducing audio stuttering and popping sounds.
[0044] In step S503, in response to receiving a target clock source fed back by at least one target control node based on the current message information and / or a backup message, the current clock is calibrated according to the target clock source, and / or in response to receiving a playback time fed back by at least one target control node based on the current message information, the current playback time is calibrated.
[0045] Optionally, in some embodiments, in response to receiving a target clock source fed back by at least one target control node based on current message information and / or backup message, calibrating the current clock according to the target clock source, and / or in response to receiving a playback time fed back by at least one target control node based on current message information, calibrating the current playback time, the method further includes: generating a backup message in response to the original reference clock message, verifying whether the original reference clock message and the backup message meet a first jitter condition through the first target control node and the second target control node, and determining the target clock source according to the verification result of the first jitter condition; in response to the original audio media message, verifying whether the original audio media message meets a second jitter condition through the first target control node and the second target control node, and determining the current playback time according to the verification result of the second jitter condition.
[0046] The specific processing flow for the original reference clock message is as follows: After receiving the original CRF message from the on-board host, the redundant clock control node ZCU_L generates the corresponding backup CRF message. The redundant clock control node ZCU_L sends the original CRF message and the backup CRF message to the next lower first target control node ZCU_B; the first target control node ZCU_B then forwards the message to ZCU_R.
[0047] The first target control node ZCU_B and the second target control node ZCU_R independently verify whether the original CRF message and the backup CRF message meet the first jitter condition.
[0048] The first target control node ZCU_B and the second target control node ZCU_R will feed back the results of the verification of the original CRF message and the backup CRF message through clock negotiation messages.
[0049] ZCU_L, in conjunction with the verification results of ZCU_B and the second target control node ZCU_R, determines the target clock source (either the original CRF or the backup CRF).
[0050] HUT calibrates its local media clock based on the target clock source, while all domain controllers calibrate their local media clocks based on the same target clock source.
[0051] The redundant clock control node specifically addresses the AAF audio media message processing flow: ZCU_L receives AAF messages sent by the vehicle host and forwards the AAF messages to ZCU_B and ZCU_R. ZCU_B and ZCU_R independently verify the playback time of AAF messages to determine whether the playback time of AAF messages meets the second jitter condition. Based on the verification results of ZCU_B and ZCU_R on whether the playback time of the AAF message meets the second jitter condition, ZCU_B and ZCU_R independently determine the local playback time for their own audio DAC scheduling.
[0052] The above technical solution addresses the issue of redundant global clock switching by using multi-level target control node cross-verification and negotiation between the original CRF message and backup CRF messages to determine the target clock source for the original reference clock message. For the original audio media message, each domain controller independently corrects its local playback time without negotiation. By relying on multi-node cross-verification, the risk of erroneous clock source switching is reduced, while additional network interaction messages are minimized, effectively suppressing multi-channel audio desynchronization and stuttering issues caused by in-vehicle Ethernet transmission jitter. Optionally, in some embodiments, in response to generating a backup message in response to the original reference clock message, the first target control node and the second target control node verify whether the original reference clock message and the backup message meet the first jitter condition, and determine the target clock source based on the verification result of the first jitter condition, including: identifying the current flag bit of the backup message through the first target control node; if the current flag bit is valid, sending the clock information carried by the backup message and the clock negotiation message to the second target control node, the second target control node verifying whether the clock information carried by the backup message meets the first jitter condition based on the clock negotiation message; if the clock information carried by the backup message does not meet the first jitter condition, determining the clock information carried by the backup message as the target clock source; if the current flag bit is invalid, verifying whether the original reference clock message and the backup message meet the first jitter condition through the first target control node and the second target control node, and determining the target clock source based on the verification result of the first jitter condition.
[0053] Specifically, after receiving the original reference clock message, the redundant clock control node ZCU_L first parses the clock information of the original CRF message to determine whether it meets the first jitter condition. Even if the redundant clock control node determines that the original CRF message does not meet the first jitter condition, it still needs to generate a backup CRF message to ZCU_B and ZCU_R, and ZCU_B and ZCU_R negotiate to confirm the target clock source. If the redundant clock control node determines that the original CRF message meets the first jitter condition, it generates an information feedback message to HUT to inform the CRF message that there is a jitter error.
[0054] After receiving the backup CRF message and the original CRF message sent by the redundant clock control node, ZCU_B identifies the current flag bit r reserved in the backup CRF.
[0055] When the current flag bit r=1 in the current backup message, the current flag bit is determined to be valid, indicating that the redundant clock control node (i.e., ZCU_L) has taken over the clock source of the vehicle audio system. Once the flag is set to 1, it will be continuously latched and will only be reset to 0 when the vehicle is powered off and woken up or the system is reinitialized, representing that the redundant clock has been in control for a long time until the vehicle goes into sleep mode. When the current flag bit r=0 in the current backup message, the current flag bit is determined to be invalid, indicating that the redundant clock control node has not taken over the system clock source.
[0056] With the current flag r=1 in the backup message, a clock negotiation message (including planned clock source=0xFF; determined clock source=0x01) and a backup CRF message are sent to the second target control node ZCU_R. After the second target control node ZCU_R verifies that the backup CRF message does not meet the first jitter condition based on the clock negotiation message, the first target control node sends a clock selection message (select clock source=0x01, select backup CRF message) to the redundant clock control node. At the same time, ZCU_L sends an information feedback message to the audio source HUT. When HUT receives the information feedback message (take over system clock source=0x01) sent by the redundant clock control node ZCU_L, HUT immediately initializes the local media clock module according to the timing stamp and reference frequency carried in the backup CRF message. All subsequent audio streams in the entire network are based on the timing of the backup CRF. If the second target control node ZCU_R verifies the backup CRF message and meets the first jitter condition, the dual-path complete verification negotiation process of the original CRF and backup CRF is restarted. ZCU_B verifies the original CRF and backup CRF again and exchanges clock negotiation messages with ZCU_R again. The two levels re-vote for the target clock source.
[0057] When the current flag r=0 in the current backup message, it means that the redundant clock control node ZCU_L only provides backup clock options and does not actively take over the system clock. The first target control node ZCU_B and the second target control node ZCU_R need to perform hierarchical verification of the backup CRF message and the original reference clock message. The target clock source is determined by negotiating the verification results of the backup CRF message and the original reference clock message by the first target control node ZCU_B and the second target control node ZCU_R.
[0058] Therefore, when the flag bit is invalid, the dual-clock cross-negotiation process begins. The first target control node and the second target control node simultaneously verify the original reference clock message and the backup message, and collaboratively vote on the target clock source. When the flag bit is valid, it is determined that the system has switched to backup clock takeover. Only the validity of the backup message is verified, and the original reference clock message is no longer continuously compared. The flag bit is latched until the system is reinitialized. This reduces redundant verification and network negotiation messages, prevents instantaneous disturbances of the original clock from causing clock source switching, avoids audio stuttering and popping sounds, ensures the timing continuity of the distributed vehicle audio system, and improves the smooth switching capability between primary and backup clocks.
[0059] Optionally, in some embodiments, verifying whether the original reference clock message and backup message meet the first jitter condition through the first target control node and the second target control node, and determining the target clock source based on the verification result of the first jitter condition, includes: verifying whether the clock information carried in the original reference clock message meets the first jitter condition through the first target control node; if the clock information carried in the original reference clock message does not meet the first jitter condition, sending a clock negotiation message and the original reference clock message to the second target control node; verifying whether the clock information carried in the original reference clock message meets the first jitter condition through the second target control node based on the clock negotiation message; if the clock information carried in the original reference clock message does not meet the first jitter condition, using the clock information carried in the original reference clock message as the target clock source; and if the upstream node of the first target control node, the first target control node, and the second target control node all determine that the original reference clock message meets the first jitter condition, using the clock information carried in the backup message as the target clock source.
[0060] Specifically, the method for determining the target clock source based on the verification results of the backup message and the original reference clock message by the first target control node and the second target control node is as follows: The first target control node ZCU_B uses the CRF jitter detection algorithm to re-verify whether the original reference clock message meets the first jitter condition: Case 1: If the original reference clock message of the first target control node ZCU_B does not meet the first jitter condition.
[0061] At this time, the first target control node ZCU_B sends the clock negotiation message to the second target control node ZCU_R. The negotiation message parameters include: planned clock source = 0x00 (corresponding to the original reference clock message), determined clock source = 0xFF (the clock source is not locked yet), and the original reference clock message is attached. The second target control node ZCU_R receives the clock negotiation message and the original reference clock message, and performs a secondary verification to check whether the original reference clock message has excessive jitter.
[0062] If the second target control node ZCU_R also verifies the original reference clock message without jitter exceeding the tolerance, it indicates that the verification by the first target control node ZCU_B and the second target control node ZCU_R is consistent. Therefore, the clock carried in the original reference clock message is determined to be reliable, and the clock information carried in the original reference clock message is set as the target clock source. The second target control node ZCU_R sends a clock negotiation message back to the upstream first target control node ZCU_B. The first target control node ZCU_B summarizes this and sends a clock selection message to the HUT. The HUT uniformly uses the clock information carried in the original reference clock message as the target clock source.
[0063] If the second target control node ZCU_R verifies the original reference clock message and finds jitter exceeding the tolerance, the second target control node ZCU_R will determine whether the backup CRF message also has jitter exceeding the tolerance.
[0064] (1) If the second target control node ZCU_R verifies the backup CRF message and there is jitter exceeding the tolerance, the second target control node ZCU_R sends a negotiation message to the first target control node ZCU_B (planned clock source = 0xFF; determined clock source = 0X00). HUT uses the clock information carried by the original reference clock message as the target clock source.
[0065] (2) If the backup CRF message of the second target control node ZCU_R does not meet the first jitter condition, a clock negotiation message (including determining the clock source = 0x01) is sent to the first target control node ZCU_B. The first target control node ZCU_B sends a clock selection message (selecting the clock source = 0x01) to the redundant clock control node. The redundant clock control node sends an information feedback message to HUT. HUT uses the clock information carried by the backup CRF message to initialize the local media clock.
[0066] Case 2: If the original reference clock message of the first target control node ZCU_B has excessive jitter, the first target control node ZCU_B checks the backup CRF message and determines whether the backup CRF message meets the first jitter condition.
[0067] 1. If the first target control node ZCU_B verifies that the backup CRF message does not meet the first jitter condition, it sends a clock negotiation message (including planned clock source = 0x01; determined clock source = 0xFF) and a backup CRF message to the second target control node ZCU_R. The second target control node ZCU_R verifies whether the backup CRF message meets the first jitter condition based on the clock negotiation message.
[0068] (1) If the backup CRF message of the second target control node ZCU_R does not meet the first jitter condition, a clock negotiation message (including determining the clock source = 0x01) is sent to the first target control node ZCU_B. The first target control node ZCU_B sends a clock selection message (selecting the clock source = 0x01) to the redundant clock control node. The redundant clock control node sends an information feedback message to HUT. HUT uses the clock information carried by the backup CRF message to initialize the local media clock. (2) If the backup CRF message of the second target control node ZCU_R meets the first jitter condition, then a negotiation message (planned clock source = 0xFF; determined clock source = 0X00) is sent to the first target control node ZCU_B. HUT uses the clock information carried by the original reference clock message as the target clock source.
[0069] 2. If the first target control node ZCU_B verifies that the backup CRF message meets the first jitter condition, it sends a clock negotiation message (including planned clock source = 0xFF; determined clock source = 0x00) to the second target control node ZCU_R. The second target control node ZCU_R verifies whether the backup CRF message meets the first jitter condition based on the clock negotiation message.
[0070] (1) If the backup CRF message of the second target control node ZCU_R meets the first jitter condition, then a negotiation message (planned clock source = 0xFF; determined clock source = 0X00) is sent to the first target control node ZCU_B. HUT uses the clock information carried by the original reference clock message as the target clock source. (2) If the backup CRF message of the second target control node ZCU_R does not meet the first jitter condition, a clock negotiation message (including determining the clock source = 0x01) is sent to the first target control node ZCU_B. The first target control node ZCU_B sends a clock selection message (selecting the clock source = 0x01) to the redundant clock control node. The redundant clock control node sends an information feedback message to HUT. HUT uniformly uses the clock information carried by the backup CRF message as its own media clock.
[0071] When the first target control node's upstream node (i.e., the redundant clock control node), the first target control node, and the second target control node all determine that the original reference clock message meets the first jitter condition, the clock information carried in the backup message is used as the target clock source, and HUT initializes the local media clock according to the clock information carried in the backup message.
[0072] The above technical solution employs a two-level progressive cross-verification mechanism involving a first target control node and a second target control node. It prioritizes verifying the original reference clock message. The two-level domain controllers interact via clock negotiation messages to reach a consensus and determine the target clock source. When the original reference clock timing is normal, the original reference clock message is used first. If the original reference clock jitter exceeds the limit, a backup message timing verification comparison is initiated. This two-level independent verification reduces the risk of single-point switching errors, and the progressive verification reduces computing power and network message overhead. Simultaneously, it forms a timing closed loop for multi-level domain controller collaborative decision-making and linkage with the audio source ECU. While ensuring the priority use of the original clock, it achieves smooth redundant switching between primary and backup clocks, effectively suppressing audio asynchrony and instantaneous popping sounds caused by vehicle network jitter, and improving the timing robustness of the distributed vehicle audio system.
[0073] Optionally, in some embodiments, verifying whether the clock information carried in the original reference clock message meets the first jitter condition further includes: obtaining the reference frequency and timestamp interval carried in the first frame reference clock message information; calculating the first standard deviation of adjacent clock information based on the reference frequency and timestamp interval of the first frame reference clock message information; and calculating the current deviation of adjacent clock information in the original reference clock message; determining that the clock information carried in the original reference clock message meets the first jitter condition when the ratio of the current deviation to the first standard deviation is greater than a first preset ratio, or when the ratio of the current deviation to the first standard deviation is less than a second preset ratio.
[0074] The first preset ratio and the third preset ratio can be thresholds preset by the user, thresholds obtained through a limited number of experiments, or thresholds obtained through a limited number of computer simulations; no specific limitations are imposed here.
[0075] In this embodiment of the application, the first preset ratio is 1.2, the second preset ratio is 0.8, the third preset ratio is 1.2, and the fourth preset ratio is 0.8 as examples.
[0076] Specifically, the method for detecting whether the clock information carried in the original reference clock message meets the first jitter condition is as follows: Based on the base_frequency in the first CRF message in the current message information, the internal audio clock is set to the corresponding output sampling frequency f. base If base_frequency is 48000, then f baseIt was set to 48kHz; Based on the base frequency (base_frequency) and timestamp interval (timestamp_interval) in the CRF message, the first standard deviation Δt of every two adjacent time information in the CRF message data (crf_data) can be obtained. CRF : First Δt CRF =timestamp_interval / base_frequency Based on the time difference between every two adjacent time information in crf_data, the current deviation Δt of adjacent clock information in the original reference clock message can be obtained. CRFn : Δt CRFn =Media clock count value CRF_timestamp in the current clock information n - The media clock count value CRF_timestamp in the clock information of the previous moment. n-1 .
[0077] Each Δt CRFn With Δt CRF A comparison is made, and if the current deviation exceeds a certain threshold, the CRF clock information jitter is determined to be out of tolerance. For example, when Δt CRFn With Δt CRF When the ratio is greater than 1.2, or Δt CRFn With Δt CRF If the ratio is less than 0.8, the CRF clock information jitter is considered to be out of tolerance.
[0078] That is, calculate the ratio of the current deviation to the first standard deviation, a = Δt. CRFn / Δt CRF When a > 1.2 or a < 0.8, it is determined that the CRF clock information has jitter exceeding the tolerance, that is, the clock information carried by the original reference clock message meets the first jitter condition.
[0079] The method for detecting whether the clock information carried in the backup CRF message meets the first jitter condition is the same as the method for detecting whether the clock information carried in the original CRF message meets the first jitter condition.
[0080] The above technical solution calculates the theoretical standard frame interval based on the CRF message reference frequency and timestamp interval. It uses the ratio of the actual frame interval to the theoretical interval to identify whether the clock information meets the jitter limit. It does not require separate configuration of absolute time thresholds for different sampling rates. Bidirectional interval detection can completely identify two types of timing anomalies: clock lead and lag. The algorithm has low computational load and is suitable for the real-time monitoring requirements of vehicle-mounted embedded domain control. Multi-level domain control cross-verification reduces the risk of clock source mis-switching and provides a reliable quantitative basis for the smooth switching of primary and backup clocks in distributed audio systems.
[0081] Optionally, in some embodiments, in response to the original audio media message, the first target control node and the second target control node verify whether the original audio media message meets the second jitter condition, and determine the current playback time based on the verification result of the second jitter condition, including: If the first target control node determines that the playback time carried by the original audio media message does not meet the second jitter condition, the playback time carried by the original audio media message is taken as the current playback time of the first target control node. If the first target control node determines that the playback time carried by the original audio media message meets the second jitter condition, the playback time carried by the original audio media message is corrected according to the second standard deviation, and the corrected playback time is taken as the current playback time of the first target control node. If the second target control node determines that the playback time carried by the original audio media message does not meet the second jitter condition, the playback time carried by the original audio media message is taken as the current playback time of the second target control node. If the first target control node determines that the playback time carried by the original audio media message meets the second jitter condition, the playback time carried by the original audio media message is corrected according to the second standard deviation, and the corrected playback time is taken as the current playback time of the second target control node.
[0082] Since the transmission delay of Ethernet packets in the ZCU_L→ZCU_B and ZCU_B→ZCU_R segments may be inconsistent, the network delay of the same AAF frame arriving at the two nodes is different. Each node needs to compensate for the timing offset separately based on its own local CRF clock. Therefore, the first target control node and the second target control node need to independently perform jitter error detection and correct the playback time of the AAF packets.
[0083] Specifically, if the first target control node ZCU_B determines that the playback time carried in the original audio media message does not have jitter or excessive deviation, it means that the playback timing is normal. At this time, no timestamp correction is made, the audio playback timing is completely aligned with the audio source distribution timing, and no additional timing compensation is required. The playback time carried in the original audio media message is used as the current playback time of the first target control node.
[0084] If the first target control node ZCU_B determines that the playback time carried in the original audio media message has jitter exceeding the tolerance, it uses the local stable CRF global clock as the reference and calculates according to the second standard deviation Δt. AAF Regenerate compliant playback times and eliminate offset jitter, specifically: The corrected standard playback time T of the previous frame is cached. last , with T last As the benchmark, the second standard deviation Δt is superimposed. AAF Generate the current playback time: T new =T last +Δt AAF Using the corrected T new Instead of using the playback time AAF_timestamp carried in the AAF message, the first target control node uses the corrected T... new As of the current screening time.
[0085] If the second target control node ZCU_B determines that the playback time carried in the original audio media message does not have jitter or exceed the tolerance, it means that the playback timing is normal. At this time, no timestamp correction is made, the audio playback timing is completely aligned with the audio source sending timing, and no additional timing compensation is required. The playback time carried in the original audio media message is used as the current playback time of the second target control node.
[0086] If the second target control node ZCU_R determines that the playback time carried in the original audio media message has excessive jitter, it uses the local stable CRF global clock as a reference and calculates according to the second standard deviation Δt. AAF Regenerate compliant playback time and eliminate offset jitter, specifically by buffering the corrected standard playback time T of the previous frame. last , with T last As the benchmark, the second standard deviation Δt is superimposed. AAF Generate the current playback time: T new =T last +Δt AAF Using the corrected T new The playback time AAF_timestamp carried in the AAF message is replaced by the playback time T in the second target control node ZCU_R. new As of the current screening time.
[0087] Through the above technical solution, the projection time of AAF is corrected only within a single target control node, without sending timing anomaly negotiation messages upstream, and without disturbing the unified CRF global clock reference of the entire vehicle. This achieves isolation of two types of timing faults and avoids audio popping, drop-off, and timing jitter caused by frequent global clock synchronization. In jitter exceeding limits, the projection time is generated recursively by relying on a fixed second standard deviation, which is simple and has low computational overhead. The projection time correction does not require additional negotiation messages between ZCU_B and ZCU_R; clock negotiation messages are only generated in the CRF clock master / slave switching scenario, reducing network load and saving vehicle Ethernet bandwidth resources.
[0088] Optionally, in some embodiments, verifying whether the playback time carried by the original audio media message meets the second jitter condition further includes: calculating the second standard deviation corresponding to the playback time carried by the audio media messages of adjacent frames, and calculating the current deviation between the playback time carried by the original audio media message and the playback time carried by the previous frame audio media message; when the ratio of the current deviation to the second standard deviation is greater than a third preset ratio, or the ratio of the current deviation to the second standard deviation is less than a fourth preset ratio, it is determined that the playback time carried by the original audio media message meets the second jitter condition.
[0089] Specifically, the method for detecting whether the playback time carried in the original audio media message meets the second jitter condition is as follows: Add an AAF playback time information jitter detection algorithm to all ZCUs (i.e., redundant clock control nodes, first target control nodes, and second target control nodes) to detect whether the playback time information jitter carried by AAF messages exceeds the tolerance.
[0090] First, the audio frame data length (stream_data_length), bit depth (bit_depth), and number of audio channels per frame (channels_per_frame) are determined through the AAF message, and then the number of samples (sample_per_frame) in each AAF message is calculated. sample_per_frame=stream_data_length / (bit_depth channels_per_frame).
[0091] Based on the number of samples per frame (sample_per_frame) and the sampling frequency (f) in each AAF message frame. base The standard deviation Δt of the playback time between any two adjacent AAF messages was calculated. AAF(i.e., the second standard deviation); Second standard deviation Δt AAF =Sample_per_frame / f base ; Based on the difference in AVTP protocol layer timestamps (avtp_stamp) between two adjacent AAF frames, the current deviation Δt between the playback time carried in the original audio media message and the playback time carried in the previous audio media message can be obtained. AAFn : Current deviation Δt AAFn =The playback time AAF_timestamp carried in the original audio media message n - The playback time (AAF_timestamp) carried in the previous frame's audio media message. n-1 ; The current deviation Δt AAFn With the second standard deviation Δt AAF A comparison is performed, and when the deviation exceeds a certain threshold, the AAF message playback time information jitter is determined to be out of tolerance. For example, when Δt AAFn With Δt AAF The ratio is greater than 1.2, or Δt AAFn With Δt AAF When the ratio is less than 0.8, it is determined that the AAF message playback time information has jitter exceeding the tolerance.
[0092] That is, calculate the ratio b = Δt between the current deviation and the second standard deviation. AAFn / Δt AAF When b > 1.2 or b < 0.8, the jitter of the AAF message playback time information is determined to be out of tolerance, that is, the playback time carried by the original audio media message is determined to meet the second jitter condition.
[0093] The above technical solution calculates the theoretical standard frame interval based on the audio parameters of the AAF message, and uses the ratio of the actual interval between adjacent frames to the theoretical interval to detect jitter deviations in playback time. Each domain controller independently performs AAF jitter detection, and the detection results are only used for local playback time correction. No cross-node negotiation of playback time is carried out, which realizes hierarchical isolation of timing faults, reduces the probability of miscorrection, and suppresses playback stuttering and timing drift phenomena in distributed vehicle audio systems.
[0094] To enable those skilled in the art to further understand the clock dejittering method of the embodiments of this application, the following detailed description is provided in conjunction with specific embodiments, such as... Figure 8 As shown.
[0095] The vehicle entertainment system (HUT) outputs CRF reference clock messages and AAF audio media messages, and forwards them to the redundant clock control node (ZCU_L).
[0096] After receiving the CRF reference clock message, the redundant clock control node (ZCU_L) runs the CRF jitter detection algorithm and the AAF jitter detection algorithm to determine whether the clock information carried in the CRF message has jitter exceeding the tolerance, and whether the playback time carried in the AAF message has jitter exceeding the tolerance.
[0097] 1. If the redundant clock control node (ZCU_L) determines that the clock information carried in the CRF message has jitter exceeding the tolerance, it sends an information feedback message to the HUT to notify that the CRF message has jitter exceeding the tolerance, and generates a backup CRF message. It then forwards the CRF message and the backup CRF message to the first target control node (ZCU_B). If the redundant clock control node (ZCU_L) determines that the clock information carried in the CRF message does not have jitter exceeding the tolerance, but does not directly lock the target clock source, it still needs to rely on the downstream ZCU_B and ZCU_R to verify the original CRF message and negotiate and vote to realize multi-node verification to determine the target clock source and avoid single-point misjudgment by ZCU_L.
[0098] If the redundant clock control node (ZCU_L) determines that the clock information carried in the CRF message does not have excessive jitter: ZCU_L sends the original CRF message and the backup CRF message together to the first target control node ZCU_B.
[0099] ZCU_B receives two packets and independently performs jitter detection on the original CRF. If ZCU_B also determines that the original CRF has no jitter exceeding the tolerance, then the assembled clock negotiation message (planned clock source = 0x00, determined clock source = 0xFF) is sent to ZCU_R along with the original CRF; ZCU_R Independent Secondary Verification of the Original CRF; If the conclusions of the two-level verifications, ZCU_B and ZCU_R, are consistent, they jointly confirm that the original CRF timing sequence is reliable. ZCU_R sends a negotiation message back to ZCU_L, and ZCU_B summarizes the two-level verification results and reports them to ZCU_L. ZCU_L determines the original CRF as the target clock source; ZCU_L, ZCU_B, and ZCU_R each calibrate their local media clocks according to the original CRF.
[0100] HUT only performs media clock module initialization when the target clock source is determined to be the clock information of the backup CRF message.
[0101] If the redundant clock control node (ZCU_L) determines that the clock information carried in the CRF message has excessive jitter: The first target control node (ZCU_B) verifies the jitter of the CRF message and the backup CRF, and sends a clock negotiation message (including the planned clock source and the determined clock source) to the second target control node (ZCU_R) based on the jitter of the CRF message and the backup CRF.
[0102] The second target control node (ZCU_R) verifies the jitter of the CRF message and backup CRF based on the clock negotiation message sent by the first target control node (ZCU_B), and sends a clock negotiation message (including the planned clock source and the determined clock source) to the first target control node (ZCU_B) based on the jitter of the CRF message and backup CRF.
[0103] The first target control node (ZCU_B) generates a clock selection message and reports it to the redundant clock control node (ZCU_L), informing it of the clock source selected through global negotiation (original CRF message or backup CRF message).
[0104] ZCU_L parses the clock selection message to determine whether it needs to take over the system clock: If it is determined that the clock source has been taken over, an information feedback message is sent to HUT (take over system clock source = 0x01 or take over system clock source = 0x00).
[0105] Upon receiving the takeover signal, HUT immediately reinitializes the local clock module and calibrates the clock information in the in-vehicle entertainment system based on the clock source of the takenover system.
[0106] 2. If the redundant clock control node (ZCU_L) determines that the playback time carried by the AAF message has jitter exceeding the tolerance, it forwards the AAF message to the first target control node ZCU_B and the second target control node (ZCU_R). The first target control node ZCU_B and the second target control node (ZCU_R) respectively determine whether the playback time carried by the AAF message has jitter exceeding the tolerance.
[0107] If the first target control node ZCU_B determines that the playback time carried by the AAF message has jitter exceeding the tolerance, then the first target control node ZCU_B corrects the playback time carried by the AAF message and sets the playback time according to the corrected playback time. If the first target control node ZCU_B determines that the playback time carried by the AAF message does not have jitter exceeding the tolerance, then the first target control node ZCU_B sets the playback time according to the playback time carried by the AAF message. If the second target control node ZCU_R determines that the playback time carried in the AAF message has jitter exceeding the tolerance, it corrects the playback time carried in the AAF message, and HUT sets the playback time according to the corrected playback time; if the second target control node ZCU_R determines that the playback time carried in the AAF message does not have jitter exceeding the tolerance, it sets the playback time of the second target control node ZCU_R according to the playback time carried in the AAF message.
[0108] The working process of redundant clock control nodes is as follows Figure 9 As shown: Step 1: The redundant clock control node receives a CRF or AAF message and identifies the message type.
[0109] 1. When the message type is AAF, Determine if the playback time of AAF is jittered beyond acceptable limits.
[0110] Case 1: If there is no jitter error in the AAF playback time, the redundant clock control node uses the original AAF_timestamp in the AAF message as the playback time of the redundant clock control node.
[0111] Scenario 2: The playback time is jittery and out of tolerance.
[0112] ① The redundant clock control node sends an information feedback message to the upstream audio source HUT. The information feedback message fields are configured as follows: CRF jitter out-of-tolerance flag = 0x00, out-of-tolerance CRF serial number = 0x00; AAF jitter out-of-tolerance flag = 0x01, out-of-tolerance AAF sequence number = current faulty AAF message number; Take over the system clock source = 0x00 (only for AAF failures, do not switch the global CRF clock).
[0113] ② Local Corrected Playback Time: Based on the local stable clock, the playback time of the redundant clock control node is reset according to the theoretical standard interval Δt_AAF.
[0114] Without modifying the AAF packets forwarded over the network, only a corrected playback timestamp is generated in the local memory of ZCU_L to eliminate timing offset and avoid audio stuttering and popping.
[0115] 2. When the message type is a CRF message: Determine if the clock of the CRF has excessive jitter.
[0116] Case 1: If the CRF clock does not have jitter exceeding the tolerance, then calibrate the ZCU_L local clock according to the original CRF message; No fault reporting is required; backup CRF messages are sent directly to downstream devices.
[0117] Scenario 2: The CRF clock exhibits excessive jitter. ① The redundant clock control node sends an information feedback message to the audio source HUT. The message field configuration is as follows: CRF jitter out-of-tolerance flag = 0x01, out-of-tolerance CRF sequence number = fault message number; AAF jitter out-of-tolerance flag = 0x00, out-of-tolerance AAF serial number = 0x00; Take over the system clock source = 0x00 (only report faults, do not take over the clock temporarily).
[0118] ② The redundant clock control node sends a CRF backup message to the next level ZCU_B.
[0119] After downstream ZCU_B and ZCU_R complete clock negotiation, ZCU_B sends a clock selection message upwards, and ZCU_L receives it and executes a global clock takeover decision.
[0120] Step 2: Determine the clock source selection field in the clock selection message.
[0121] Branch A: Select clock source = 0x00 (i.e., the negotiation result is to use the original CRF), then calibrate the local clock according to the original CRF message, do not enable redundant takeover, and the backup CRF is only used as a backup.
[0122] Branch B: Select clock source = 0x01 (i.e., the negotiation result is to select backup CRF, which requires redundant takeover of the global clock).
[0123] ① Set the reserved flag r inside the backup CRF message to 1; ② Send a feedback message to the audio source HUT to indicate that the system clock source has been taken over. Message field configuration: CRF jitter out-of-tolerance flag = 0x00, AAF jitter out-of-tolerance flag = 0x00; Take over the system clock source = 0x01, and inform HUT to switch to the backup CRF as the global clock reference.
[0124] ③ After receiving the message, the audio source will immediately reinitialize the local media clock and synchronize the audio of the entire vehicle with the backup CRF timing.
[0125] The workflow of the ZCU (i.e., the first target control node) at the next level of the redundant clock control node is as follows: Figure 10 As shown: The first target control node ZCU_B receives CRF messages / AAF messages / CRF backup messages sent from the upstream and forwards them to the next level ZCU_R. After forwarding, the messages are processed in two main branches according to their type: the AAF audio branch and the CRF + backup CRF clock branch.
[0126] 1. When the message type is AAF, determine whether the playback time jitter exceeds the tolerance.
[0127] Case 1: If there is no jitter exceeding the tolerance during playback time, the playback time of the first target control node is directly corrected based on the AAF_timestamp contained in the AAF message, and the local audio playback is scheduled using the native timestamp. Scenario 2: Playback time jitter exceeds tolerance The projection time of the first target control node is recalculated according to the second standard deviation of AAF.
[0128] 2. When the message type is a CRF message: Upon receiving the CRF backup message, first read the internal flag bit r of the backup CRF, dividing it into two main sub-branches: r=1 and r=0. Sub-branch 2.1: Backup CRF message flag r=1 (indicating that ZCU_L has taken over the global system clock).
[0129] The clock negotiation message is sent to the lower-level ZCU_R: planned clock source = 0xFF, determined clock source = 0x01. The first target control node ZCU_B sends a clock selection message (selected clock source = 0x01) to the redundant clock control node and calibrates the clock of the HUT according to the clock information carried by the backup CRF.
[0130] Sub-branch 2.2: The backup CRF message flag bit r=0 (representing that ZCU_L has not taken over the clock), requires performing layered verification of timing jitter in the original CRF and backup CRF, with three layers of judgment: First layer: Verify whether the original CRF clock jitter exceeds the tolerance.
[0131] The original CRF clock does not have jitter exceeding the tolerance: the original CRF is determined to be reliable, a clock negotiation message is sent to ZCU_R (planned clock source = 0xFF, determined clock source = 0x00), a clock selection message is sent to ZCU_L to select clock source = 0x00, and the local clock is calibrated according to the original CRF; If the original CRF clock exhibits excessive jitter, then verify whether the backup CRF clock also exhibits excessive jitter. (1) If the backup CRF has jitter exceeding the tolerance, send a clock negotiation message (planned clock source = 0xFF, determined clock source = 0x00, and the original CRF is used temporarily by default) to ZCU_R. ZCU_B determines the clock source (determined clock source = 0x00) based on the clock negotiation message sent by ZCU_R. (2) No jitter in backup CRF: If the backup CRF is deemed reliable, a clock negotiation message is sent to ZCU_R (planned clock source = 0x01, confirmed clock source = 0xFF), and waits for ZCU_R negotiation feedback.
[0132] After ZCU_R completes the jitter tolerance check on the backup CRF message, it sends a clock negotiation message upwards. ZCU_B reads the clock source field from the message and processes the result in two ways: (1) Determine the clock source = 0x00 (ZCU_R recognizes the original CRF) Send a clock selection message to ZCU_L: Select clock source = 0x00. HUT calibrates its own global audio clock based on the original CRF message. (2) Determine the clock source = 0x01 (ZCU_R approved backup CRF) Send a clock selection message to ZCU_L: Select clock source = 0x01. HUT initializes the local media clock based on the clock information in the backup CRF message.
[0133] The workflow of the second target control node is as follows: Figure 11 As shown: After the second target control node receives the two types of messages transmitted from the upstream, the first step is to distinguish the message types and divide them into two independent logics: the AAF audio processing branch and the CRF clock negotiation branch.
[0134] Branch 1: Message type is AAF: The AAF jitter detection algorithm is executed to determine whether there is jitter exceeding the tolerance during the playback time.
[0135] 1) There is no excessive jitter during playback. The playback time of the second target control node is directly based on the AAF_timestamp playback timestamp contained in the AAF message. 2) There is excessive jitter during the screening time. The playback time of the second target control node is recalculated and set according to the second standard deviation to compensate for network transmission jitter and avoid speaker stuttering, popping, and audio-visual desynchronization.
[0136] Branch 2: Message type is CRF: Upon receiving the clock negotiation message from upstream ZCU_B, two main decision paths are established based on the planned clock source field in the negotiation message: Path 1: Planned clock source = 0xFF (indicating that the upstream has not yet locked the recommended clock source and is waiting for verification feedback from this node). Further analysis of the clock source determination field in the negotiation message: Determine clock source = 0x00: This means that the upstream prefers to use the original CRF. ZCU_R sends a clock negotiation message to the next higher level ZCU_B. The field configuration is: Planned clock source = 0xFF, Determine clock source = 0x00. The local system directly uses the original CRF message as the target clock source.
[0137] Determine clock source = 0x01: This indicates that the upstream prefers to use the backup CRF. ZCU_R sends a clock negotiation message to the next higher level ZCU_B. The field configuration is: Planned clock source = 0xFF, Determine clock source = 0x01. The local media clock is initialized directly based on the CRF backup message.
[0138] Path 2: Planned clock source = 0x01 (upstream recommends prioritizing verification of backup CRF), ZCU_R independently completes two-layer clock jitter verification: First layer: Verify the original CRF clock jitter The original CRF has no jitter exceeding the tolerance, and sends a negotiation message upward (planned clock source = 0xFF, determined clock source = 0x00). The HUT uses the original CRF as its local clock. If the original CRF has excessive jitter, then check if the clock of the CRF backup message has excessive jitter: (1) The backup CRF has jitter exceeding the tolerance: This indicates that both clocks are faulty. A negotiation message is sent upwards (planned clock source = 0xFF, confirmed clock source = 0x00). HUT temporarily uses the original CRF as the local clock. (2) No jitter in the time information of the backup CRF: The backup clock is determined to be reliable. A negotiation message is sent upward (planned clock source = 0xFF, determined clock source = 0x01). The HUT initializes the local media clock according to the backup CRF message.
[0139] The workflow of the vehicle infotainment system (HUT) is as follows: Figure 12 As shown: The audio source ECU receives the feedback message sent by ZCU_L and begins to parse the message fields step by step.
[0140] 1. Determine if AAF jitter exceeds tolerance.
[0141] Read the AAF jitter error flag field of the message: If the AAF jitter flag is 0x01, it means that the AAF audio playback timestamp jitter exceeds the limit, and an AAF clock information synchronization operation with the local media clock will be performed immediately.
[0142] If the AAF jitter out-of-tolerance flag is 0x00, it indicates that there is no AAF timing fault, and proceeds to the next level to determine the CRF clock status.
[0143] 2. Determine if CRF jitter exceeds tolerance Read the CRF jitter error flag field of the message: If the CRF jitter flag is 0x01, it means that the timing jitter of the original global reference clock (CRF) exceeds the limit, and an operation to synchronize the CRF clock information with the local media clock will be performed immediately.
[0144] If the CRF jitter out-of-tolerance flag is 0x00, it means that neither AAF nor CRF has a separate jitter fault, and the process proceeds to the third level to determine whether to enable the redundant backup clock.
[0145] 3. Determine the clock source of the takeover system. Read the message to take over the system clock source field: If the system clock source is 0x01, the backup CRF clock is deemed reliable, and ZCU_L officially takes over the vehicle audio system clock, immediately initializing the local media clock.
[0146] If all flags are 0x00, it means that there are no timing abnormalities in the AAF and CRF messages, and there is no need to perform clock synchronization / initialization operations.
[0147] In summary, according to the clock jitter removal method of this application embodiment, the redundant clock control node determines at least one target control node based on the current message information sent by the vehicle host, and sends the current message information and / or the corresponding backup message to the at least one target control node; in response to receiving the target clock source fed back by the at least one target control node based on the current message information and / or the backup message, the current clock is calibrated according to the target clock source, and / or in response to receiving the playback time fed back by the at least one target control node based on the current message information, the current playback time is calibrated. This method solves the problem in the vehicle distributed audio system where, when there is an internal anomaly in the vehicle entertainment host, the playback time of the audio media message or the clock information of the reference clock message may exceed the tolerance, leading to a decrease in the playback quality of the audio system or even interruption. It can remove the jitter of the audio media message or the reference clock message, ensuring the normal operation of the audio system when there is an internal anomaly in the vehicle entertainment host.
[0148] Figure 13 This is a schematic diagram of the structure of a clock debouncing system provided in an embodiment of this application.
[0149] For example, such as Figure 13 As shown, the clock dejitter system 10 may include: a message receiving module 100, a message sending module 200, and a calibration module 300.
[0150] The message receiving module 100 is used to respond to receiving current message information sent by the vehicle host; the message sending module is used to determine at least one target control node based on the current message information, and send the current message information and / or the backup message corresponding to the current message information to at least one target control node; the calibration module is used to calibrate the current clock based on the target clock source fed back by at least one target control node based on the current message information and / or the backup message, and / or calibrate the current playback time based on the playback time fed back by at least one target control node based on the current message information.
[0151] Optionally, in some embodiments, the message sending module 200 is configured to: parse the current message information to obtain the original reference clock message and the original audio media message; in response to the original reference clock message, determine the first target control node and the second target control node, wherein the second target control node is a subordinate node of the first target control node; and in response to the original audio media message, determine the first target control node and the second target control node.
[0152] Optionally, in some embodiments, the calibration module 300 is configured to: generate a backup message in response to the original reference clock message; verify whether the original reference clock message and the backup message meet the first jitter condition through the first target control node and the second target control node; and determine the target clock source based on the verification result of the first jitter condition; and in response to the original audio media message, verify whether the original audio media message meets the second jitter condition through the first target control node and the second target control node; and determine the current playback time based on the verification result of the second jitter condition.
[0153] Optionally, in some embodiments, in response to the original reference clock message, when determining the target clock source based on the verification results of the first target control node and the second target control node regarding whether the original reference clock message and / or backup message meet the first jitter condition, the calibration module 300 is configured to: The current flag bit of the backup message is identified by the first target control node; When the current flag bit is valid, the clock information carried by the backup message and the clock negotiation message are sent to the second target control node. The second target control node verifies whether the clock information carried by the backup message meets the first jitter condition based on the clock negotiation message. If the clock information carried by the backup message does not meet the first jitter condition, the clock information carried by the backup message is determined as the target clock source. When the current flag bit is invalid, the original reference clock message and backup message are verified by the first target control node and the second target control node to see if they meet the first jitter condition, and the target clock source is determined based on the verification result of the first jitter condition.
[0154] Optionally, in some embodiments, the calibration module 300 is further configured to: verify whether the clock information carried in the original reference clock message meets the first jitter condition through the first target control node; if the clock information carried in the original reference clock message does not meet the first jitter condition as verified by the first target control node, send a clock negotiation message and the original reference clock message to the second target control node; verify whether the clock information carried in the original reference clock message meets the first jitter condition based on the clock negotiation message by the second target control node; if the clock information carried in the original reference clock message does not meet the first jitter condition as verified by the second target control node, use the clock information carried in the original reference clock message as the target clock source.
[0155] Optionally, in some embodiments, the calibration module 300 is further configured to: obtain the reference frequency and timestamp interval carried in the first frame reference clock message information; calculate the first standard deviation of adjacent clock information based on the reference frequency and timestamp interval of the first frame reference clock message information; and calculate the current deviation of adjacent clock information in the original reference clock message; and determine that the clock information carried in the original reference clock message meets the first jitter condition when the ratio of the current deviation to the first standard deviation is greater than a first preset ratio, or the ratio of the current deviation to the first standard deviation is less than a second preset ratio. Optionally, in some embodiments, when calibrating the current playback time corresponding to the first target control node and the second target control node based on the verification results of whether the original audio media message meets the second jitter condition according to the original audio media message, the calibration module 300 is further configured to: If the first target control node determines that the playback time carried by the original audio media message does not meet the second jitter condition, the playback time carried by the original audio media message is taken as the current playback time of the first target control node. If the first target control node determines that the playback time carried by the original audio media message meets the second jitter condition, the playback time carried by the original audio media message is corrected according to the second standard deviation, and the corrected playback time is taken as the current playback time of the first target control node. If the second target control node determines that the playback time carried by the original audio media message does not meet the second jitter condition, the playback time carried by the original audio media message is taken as the current playback time of the second target control node. If the first target control node determines that the playback time carried by the original audio media message meets the second jitter condition, the playback time carried by the original audio media message is corrected according to the second standard deviation, and the corrected playback time is taken as the current playback time of the second target control node.
[0156] Optionally, in some embodiments, the calibration module 300 is further configured to: calculate the second standard deviation corresponding to the playback time carried by the audio media message of the adjacent frame time, and calculate the current deviation between the playback time carried by the original audio media message and the playback time carried by the previous frame audio media message; when the ratio of the current deviation to the second standard deviation is greater than a third preset ratio, or the ratio of the current deviation to the second standard deviation is less than a fourth preset ratio, determine that the playback time carried by the original audio media message meets the second jitter condition.
[0157] In summary, according to the clock jitter removal system of this application embodiment, the redundant clock control node determines at least one target control node based on the current message information sent by the vehicle host, and sends the current message information and / or the corresponding backup message to the at least one target control node; in response to receiving the target clock source fed back by the at least one target control node based on the current message information and / or the backup message, the current clock is calibrated according to the target clock source, and / or in response to receiving the playback time fed back by the at least one target control node based on the current message information, the current playback time is calibrated. This method solves the problem in the vehicle distributed audio system where, when there is an internal anomaly in the vehicle entertainment host, the playback time of the audio media message or the clock information of the reference clock message may exceed the tolerance, leading to a decrease in the playback quality of the audio system or even interruption. It can remove the jitter of the audio media message or the reference clock message, ensuring the normal operation of the audio system when there is an internal anomaly in the vehicle entertainment host.
[0158] Figure 14 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: The memory 1401, the processor 1402, and the computer program stored on the memory 1401 and capable of running on the processor 1402.
[0159] When the processor 1402 executes the program, it implements the clock debouncing method provided in the above embodiments.
[0160] Furthermore, electronic devices also include: Communication interface 1403 is used for communication between memory 1401 and processor 1402.
[0161] The memory 1401 is used to store computer programs that can run on the processor 1402.
[0162] The memory 1401 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage.
[0163] If the memory 1401, processor 1402, and communication interface 1403 are implemented independently, then the communication interface 1403, memory 1401, and processor 1402 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 14 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0164] Optionally, in a specific implementation, if the memory 1401, processor 1402, and communication interface 1403 are integrated on a single chip, then the memory 1401, processor 1402, and communication interface 1403 can communicate with each other through an internal interface.
[0165] The processor 1402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. This embodiment also provides a computer-readable storage medium storing computer program code that, when executed on a computer, causes the computer to perform the aforementioned method steps to implement the clock debouncing method provided in the above embodiments.
[0166] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement a clock dejittering method provided in the above embodiment.
[0167] In this embodiment, the device, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0168] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. 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.
[0169] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, 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, mechanical, or other forms.
[0170] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A clock debouncing method, characterized in that, Includes the following steps: In response to receiving the current message information sent by the on-board unit; Based on the current message information, at least one target control node is determined, and the current message information and / or the backup message corresponding to the current message information are sent to the at least one target control node; In response to receiving a target clock source fed back by the at least one target control node based on the current message information and / or the backup message, the current clock is calibrated according to the target clock source, and / or in response to receiving a playback time fed back by the at least one target control node based on the current message information, the current playback time is calibrated.
2. The method according to claim 1, characterized in that, The step of determining at least one target control node based on the current message information includes: The original reference clock message and the original audio media message are obtained by parsing the current message information; In response to the original reference clock message, a first target control node and a second target control node are determined, wherein the second target control node is a subordinate node of the first target control node; In response to the original audio media message, the first target control node and the second target control node are determined.
3. The method according to claim 2, characterized in that, In response to receiving a target clock source fed back by the at least one target control node based on the current message information and / or the backup message, calibrating the current clock according to the target clock source, and / or in response to receiving a playback time fed back by the at least one target control node based on the current message information, calibrating the current playback time, the method further includes: In response to the original reference clock message, a backup message is generated. The original reference clock message and the backup message are verified by the first target control node and the second target control node to see if they meet the first jitter condition. The target clock source is determined based on the verification result of the first jitter condition. In response to the original audio media message, the first target control node and the second target control node verify whether the original audio media message meets the second jitter condition, and determine the current playback time based on the verification result of the second jitter condition.
4. The method according to claim 3, characterized in that, In response to the original reference clock message, a backup message is generated. The original reference clock message and the backup message are verified by the first target control node and the second target control node to determine whether they meet the first jitter condition. The target clock source is then determined based on the verification result of the first jitter condition. This includes: The current flag bit of the backup message is identified by the first target control node; When the current flag bit is valid, the first target control node sends the clock information carried in the backup message and the clock negotiation message to the second target control node. The second target control node verifies whether the clock information carried in the backup message meets the first jitter condition based on the clock negotiation message. If the clock information carried in the backup message does not meet the first jitter condition, the clock information carried in the backup message is determined as the target clock source. If the current flag bit is invalid, the first target control node and the second target control node verify whether the original reference clock message and the backup message meet the first jitter condition, and determine the target clock source based on the verification result of the first jitter condition.
5. The method according to claim 4, characterized in that, The step of verifying whether the original reference clock message and the backup message meet the first jitter condition through the first target control node and the second target control node, and determining the target clock source based on the verification result of the first jitter condition, includes: The first target control node verifies whether the clock information carried in the original reference clock message meets the first jitter condition. If the clock information carried in the original reference clock message does not meet the first jitter condition, the first target control node sends a clock negotiation message and the original reference clock message to the second target control node. The second target control node verifies whether the clock information carried in the original reference clock message meets the first jitter condition based on the clock negotiation message. If the clock information carried in the original reference clock message does not meet the first jitter condition, the clock information carried in the original reference clock message is used as the target clock source. When the upstream node of the first target control node, the first target control node, and the second target control node all determine that the original reference clock message meets the first jitter condition, the clock information carried in the backup message is used as the target clock source.
6. The method according to claim 5, characterized in that, The step of verifying whether the clock information carried in the original reference clock message satisfies the first jitter condition further includes: Obtain the reference frequency and timestamp interval carried in the first frame of reference clock message information, calculate the first standard deviation of adjacent clock information based on the reference frequency and timestamp interval of the first frame of reference clock message information, and calculate the current deviation of adjacent clock information in the original reference clock message; When the ratio of the current deviation to the first standard deviation is greater than a first preset ratio, or when the ratio of the current deviation to the first standard deviation is less than a second preset ratio, it is determined that the clock information carried by the original reference clock message satisfies the first jitter condition.
7. The method according to claim 3, characterized in that, In response to the original audio media message, the first target control node and the second target control node verify whether the original audio media message meets the second jitter condition, and determine the current playback time based on the verification result of the second jitter condition, including: If the first target control node determines that the playback time carried by the original audio media message does not meet the second jitter condition, the playback time carried by the original audio media message is taken as the current playback time of the first target control node. If the first target control node determines that the playback time carried by the original audio media message meets the second jitter condition, the playback time carried by the original audio media message is corrected according to the second standard deviation, and the corrected playback time is taken as the current playback time of the first target control node. If the second target control node determines that the playback time carried by the original audio media message does not meet the second jitter condition, the playback time carried by the original audio media message is taken as the current playback time of the second target control node. If the first target control node determines that the playback time carried by the original audio media message meets the second jitter condition, the playback time carried by the original audio media message is corrected according to the second standard deviation, and the corrected playback time is taken as the current playback time of the second target control node.
8. The method according to claim 7, characterized in that, Verifying whether the playback time carried in the original audio media message meets the second jitter condition also includes: Calculate the second standard deviation of the playback time carried by the audio media messages of adjacent frames, and calculate the current deviation between the playback time carried by the original audio media message and the playback time carried by the previous frame audio media message. When the ratio of the current deviation to the second standard deviation is greater than a third preset ratio, or when the ratio of the current deviation to the second standard deviation is less than a fourth preset ratio, it is determined that the playback time carried by the original audio media message meets the second jitter condition.
9. A clock debouncing system, characterized in that, include: The message receiving module is used to respond to receiving current message information sent by the vehicle host and determine the current jitter type based on the current message information; The message sending module is used to determine at least one target control node based on the current message information, and send the current message information and / or the backup message corresponding to the current message information to the at least one target control node; The calibration module is configured to calibrate the current clock according to the target clock source in response to receiving a target clock source fed back by the at least one target control node based on the current message information and / or the backup message, and / or calibrate the current playback time in response to receiving a playback time fed back by the at least one target control node based on the current message information.
10. A vehicle, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the clock dejittering method as described in any one of claims 1-8.