Data synchronization processing method

The delay time of the target slave node is determined by the master node and the execution time of the slave node is unified, which solves the problem of ECU parts time synchronization in smart cars and improves the safety of vehicle operation.

CN120528541APending Publication Date: 2025-08-22CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510581009.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-08-22

AI Technical Summary

Technical Problem

In smart cars, multiple ECU parts require precise time synchronization to ensure coordinated work, but the prior art is difficult to effectively solve the data inconsistency caused by time out of synchronization, which may lead to vehicle safety risks.

Method used

A data synchronization processing method is provided, which determines the delay time of the target slave node through the master node, and controls the execution time of all slave nodes based on the target synchronization time, eliminates the clock out-of-synchronization problem caused by network transmission delay, and realizes the synchronization processing of multiple target slave nodes.

Benefits of technology

Improve the safety of vehicle operation, ensure that relevant functional ECU parts share and process data at the same time, and avoid security risks caused by clock out of synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120528541A_ABST
    Figure CN120528541A_ABST
Patent Text Reader

Abstract

The invention provides a data synchronization processing method, which is applied to an electronic and electrical system, and the electronic and electrical system at least comprises a master node and a plurality of slave nodes. The method comprises the steps of determining at least two target slave nodes based on an execution command under the condition that a master node obtains the execution command; under the condition that the functions of the target slave nodes are mutually dependent, target delay time from the master node to each target slave node is determined; determining target synchronization time based on the target delay time of all the target slave nodes; and determining the execution time of all the target slave nodes for executing the execution command based on the target synchronization time. Therefore, the problem that clocks of the target slave nodes are not synchronous due to network transmission delay is effectively solved, synchronous processing between related function ECU parts is coordinated, data can be shared and processed at the same time point, finally, work synchronization of the multiple target slave nodes is achieved, and the safety of vehicle operation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of clock synchronization, and in particular to a data synchronization processing method. Background Art

[0002] Smart cars are being equipped with an increasing number of functions and ECUs (Electronic Control Units). Multiple ECUs must work together to ensure safe and efficient vehicle operation. For example, the camera ECU captures road images, the radar ECU detects obstacles, and the brake ECU controls the braking system. These ECUs require precise time synchronization to ensure they share and process data at the same time. If the camera and radar ECUs are out of sync, there will be a time difference between the image captured by the camera and the obstacle data detected by the radar. This can cause the brake ECU to receive inconsistent information, making it unable to correctly determine when to brake, potentially leading to a traffic accident.

[0003] Therefore, there is an urgent need for a time synchronization method for controlling related ECUs to work synchronously. Summary of the Invention

[0004] The present application provides a data synchronization processing method that can coordinate the synchronization processing between related functional ECU components, enable them to work synchronously, and improve the safety of vehicle operation.

[0005] A first aspect of an embodiment of the present application provides a data synchronization processing method, which is applied to an electronic and electrical system, wherein the electronic and electrical system includes at least a master node and multiple slave nodes; the method includes: In a case where the master node obtains an execution command, determining at least two target slave nodes based on the execution command; In a case where the functions of the target slave nodes are mutually dependent, determining a target delay time from the master node to each of the target slave nodes; Determining a target synchronization time based on target delay times of all the target slave nodes; An execution time for all the target slave nodes to execute the execution command is determined based on the target synchronization time.

[0006] Optionally, determining a target synchronization time based on target delay times of all the target slave nodes includes: In the case where the multiple target delay times are different, the longest target delay time among the target delay times of all the target slave nodes is determined as the target synchronization time.

[0007] Optionally, determining a target synchronization time based on target delay times of all the target slave nodes includes: In the case that a plurality of target delay times are the same, one target delay time is selected from the target delay times of all the target slave nodes and is determined as the target synchronization time.

[0008] Optionally, determining a target delay time from the master node to each of the target slave nodes includes: For any of the target slave nodes, determining a plurality of nodes included in a communication path from the master node to the target slave node; The target delay time from the master node to the target slave node is determined according to the delay time between every two adjacent nodes on the communication path.

[0009] Optionally, the method further includes: Based on the network load rate, a delay time between every two adjacent nodes on the communication path is determined.

[0010] Optionally, the method further includes: Determine the data sender and data receiver in two adjacent nodes; The data sender sends a synchronization request message to the data receiver; wherein the synchronization request message carries the request sending time; After receiving the synchronization request message, the data receiver feeds back a response message to the data sender; wherein the response message carries the request reception time for the synchronization request message; The delay time between two adjacent nodes is determined according to the request sending time and the request receiving time.

[0011] Optionally, the synchronization request message includes: message type, network load rate, number corresponding to the communication path and delay time; wherein, The message type is used to determine whether the message is the synchronization request message, so that the data receiver responds and returns the response message when it determines that the synchronization request message has been received; The network load rate is used to reflect the congestion level of the communication path; The numbers corresponding to the communication paths are used to distinguish different paths from the data sender to the data receiver; The delay time is used to represent the time consumed by the data sender to transmit data to the data receiver through the communication path.

[0012] Optionally, the method further includes: For any of the communication paths, the actual delay time of the communication path is greater than the delay time determined by the network load rate or the synchronization request message.

[0013] Optionally, for any target slave node, when there are multiple communication paths from the master node to the target slave node, determining a target delay time from the master node to the target slave node includes: The shortest delay time among the delay times corresponding to all communication paths is determined as the target delay time from the master node to the target slave node.

[0014] Optionally, the electronic and electrical system is an automotive electronic and electrical system, and the automotive electronic and electrical system includes: at least one first controller and at least one second controller; Wherein, all or part of the first controllers communicate with each other; the first controller communicates with all or part of the second controllers; The master node is deployed on the first controller, which is a domain controller; and the slave node is deployed on the second controller.

[0015] Compared with the prior art, this application has the following advantages: An embodiment of the present application provides a data synchronization processing method for an electronic and electrical system, the electronic and electrical system comprising at least a master node and multiple slave nodes. The method comprises: when the master node receives an execution command, determining at least two target slave nodes based on the execution command; when the target slave nodes are functionally interdependent, determining a target delay time from the master node to each target slave node; determining a target synchronization time based on the target delay times of all target slave nodes; and determining an execution time for all target slave nodes to execute the execution command based on the target synchronization time. Thus, for the functionally interdependent target slave nodes, a unified delay time is determined based on the target delay times of each of these target slave nodes, and then a unified execution time is determined. All target slave nodes are then instructed to execute the execution command according to this unified execution time, thereby effectively eliminating the problem of target slave node clock asynchrony caused by network transmission delays. Furthermore, the method coordinates the synchronization processing between related functional ECUs, enabling them to share and process data at the same time point, ultimately achieving the synchronization of multiple target slave nodes and improving vehicle operation safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0017] Figure 1 This is a schematic diagram of the architecture of an electronic and electrical system in one embodiment of the present application; Figure 2 This is a flowchart of a data synchronization processing method in one embodiment of the present application; Figure 3 This is a schematic diagram of the architecture of an electronic and electrical system in another embodiment of the present application; Figure 4 This is a schematic diagram of the functional modules of each node of an electronic and electrical system in one embodiment of the present application; Figure 5 This is a schematic diagram of the interaction between nodes in one embodiment of the present application; Figure 6 This is a schematic diagram of the structure of a synchronization request message in an embodiment of the present application; Figure 7 This is a schematic diagram of the structure of an automotive electrical and electronic system in one embodiment of the present application; Figure 8 It is a structural diagram of an automotive electrical and electronic system in another embodiment of the present application. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0019] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the architecture of an electronic and electrical system proposed in one embodiment of the present application. Figure 1 As shown, the electronic and electrical system includes at least a master node (TMaster) and multiple slave nodes (TSlave). There can be one or more master nodes, one master node is connected to at least two slave nodes, and each master node and each slave node have different functions.

[0020] For example, when this electronic and electrical system is applied to a vehicle system, the master node can be a domain controller such as a smart cockpit CDC (Cockpit Domain Controller) or a vehicle controller VDC (Vehicle Domain Controller), and the slave node can be a camera ECU (Electronic Control Unit), radar ECU, brake ECU, powertrain ECU, torque distribution ECU, body stability control ECU, steering ECU, seat control ECU, air conditioning ECU, audio ECU, etc.

[0021] It should be noted that all master and slave nodes have the same base time, or in other words, the time errors of all nodes are within an acceptable range, so their times can be roughly considered consistent. For example, the current base time of all nodes is 12:13:01:030 (12:13:01:030).

[0022] Please refer to Figure 2 , Figure 2 This is a flow chart of a data synchronization processing method in one embodiment of the present application. Figure 2 As shown in FIG, the data synchronization process between nodes in the electronic and electrical system mainly includes: S201: When the master node obtains an execution command, at least two target slave nodes are determined based on the execution command.

[0023] In this embodiment, the execution command is a functional instruction from the upper-layer application, which is used to instruct the electronic and electrical system to implement the corresponding function. For example, the execution command includes an execution command to turn on the ventilation mode, or an execution command to adjust the seat, turn on the air conditioner, etc.

[0024] The master node is primarily responsible for forwarding execution commands to the corresponding target slave nodes, which are the functional components necessary to complete the execution command. For example, if the execution command is to turn on ventilation mode, the target slave nodes include at least the window ECU and the air conditioning ECU.

[0025] In the process of executing the execution command, the master node first needs to determine the target slave node related to the execution command from multiple slave nodes.

[0026] S202: In the case where the functions of the target slave nodes are mutually dependent, determine a target delay time from the master node to each target slave node.

[0027] In this embodiment, the functions of two or more target slave nodes are interdependent, which means that these target slave nodes need to work together to achieve the corresponding functions, that is, the target slave nodes that are functionally interdependent refer to the target slave nodes that need to synchronize actions or share data during the execution of the execution command.

[0028] For example, during adaptive cruise control, the execution command requires dynamic speed adjustment based on the speed of the preceding vehicle. This requires precise coordination between the brake ECU and the powertrain ECU within the target slave node. In other words, the brake ECU and the powertrain ECU are functionally interdependent target slave nodes, and can be referred to as a group of target nodes to be synchronized. On slippery roads, when a wheel slip is detected, the execution command requires vehicle stability. In this case, the torque distribution ECU and the brake ECU must precisely coordinate to transfer torque to the other wheel and ensure vehicle stability. In this case, the torque distribution ECU and the brake ECU can be a group of target slave nodes to be synchronized. When the vehicle deviates from its lane, the execution command requires vehicle posture adjustment. In this case, the body stability control ECU and the steering ECU must coordinate to adjust the vehicle posture through braking and steering. In this case, the body stability control ECU and the steering ECU can be a group of target slave nodes to be synchronized. Furthermore, in some personalized scenarios, when the driver selects "Sport Mode," the seat control ECU, air conditioning ECU, and audio ECU must synchronize to provide an immersive experience. In this case, the seat control ECU, air conditioning ECU, and audio ECU can be a group of target slave nodes to be synchronized.

[0029] It's easy to understand that different execution commands require different target slave nodes to be synchronized. For example, in one execution command, slave node A needs to form a target node group with slave node B, while in the next execution command, slave node A needs to form a target node group with slave node C.

[0030] In this embodiment, the target delay time refers to the time required for data or signals (such as execution commands) to be transmitted from the master node to the target slave node, that is, the time delay generated on the communication path between nodes.

[0031] In practice, the master node can pre-measure the delay time from its connection to each slave node and store it in a network delay table (i.e., the network delay table contains the delay time from the master node to each of its associated slave nodes). When functional synchronization is required, the master node can directly obtain the target delay time for each target slave node by looking up the table. This not only improves the synchronization efficiency of the entire process but also facilitates management. As you can easily understand, each master node has its own corresponding network delay table.

[0032] Considering that the target delay time needs to be detected in a timely manner to accurately reflect the network delay on the current communication path, and thus determine the accurate synchronization time to achieve functional synchronization of multiple target slave nodes to be synchronized, it is necessary to maintain and update the network delay table in a timely manner to ensure the validity of the delay time.

[0033] In specific implementations, different update strategies can be used for different situations. For example, for communication paths with frequent and volatile data traffic, real-time delay detection can be performed, while for communication paths with less traffic and low volume, regular detection can be performed, such as every three minutes, to conserve computing resources and avoid unnecessary energy consumption.

[0034] Furthermore, the target delay time is affected by multiple factors such as bus type, packet size, network topology, and environmental interference. For example, the delay of the CAN bus is usually between 100 microseconds and 1 millisecond, affected by the baud rate. The delay of Ethernet can be as low as 10 microseconds to 100 microseconds, but is greatly affected by network congestion. The delay of FlexRay is usually between 50 microseconds and 500 microseconds, which is suitable for high-real-time scenarios. At the same time, the larger the packet size, the longer the transmission time. For example, the transmission time of a 100-byte packet is longer than that of a 10-byte packet. In the network topology, the delay of the star topology is usually lower than that of the bus topology because the data does not need to pass through multiple nodes. In addition, environmental interference such as electromagnetic interference and temperature changes can also cause delay fluctuations.

[0035] Therefore, the master node needs to accurately determine the target delay time to each target slave node to lay an accurate data foundation for the functional synchronization of subsequent target slave nodes.

[0036] S203: Determine a target synchronization time based on the target delay times of all target slave nodes.

[0037] In this embodiment, the target synchronization time refers to a unified delay time determined according to the delays of all target slave nodes.

[0038] The master node controls all target slave nodes uniformly by determining a unified delay time based on the delay conditions of all target slave nodes.

[0039] S204: Determine the execution time of the execution command of all target slave nodes based on the target synchronization time.

[0040] In this embodiment, after the master node determines the target synchronization time based on the target delay time to each target slave node, it can specifically specify the execution time for all target slave nodes to execute the execution command, so that these target slave nodes execute the execution command according to the execution time, ensuring that these target slave nodes act synchronously.

[0041] For example, assuming the current base time for all nodes is 08:00:00:000:000 (eight o'clock, in units of hours, minutes, seconds, milliseconds, and microseconds), and the target synchronization time is 3000us, the final execution time for this synchronization action is determined to be 08:00:00:003:000 (eight o'clock, zero minutes, zero seconds, and three milliseconds). Then, the target slave nodes with interdependent functions will all begin executing their actions at this execution time of 08:00:00:003:000, thus achieving action synchronization.

[0042] It should be noted that for target slave nodes whose functions are not mutually dependent, there is no need to delay the target synchronization time before execution. They can be executed directly after receiving the execution command normally, avoiding causing disorder to their own working logic.

[0043] The present application provides a data synchronization mechanism. For target slave nodes with interdependent functions, a unified delay time is determined based on the target delay time of each target slave node, and then a unified execution time is determined. Then, all target slave nodes are allowed to execute execution commands according to this unified execution time, so as to effectively eliminate the problem of target slave node clock asynchrony caused by network transmission delay, and then coordinate the synchronization processing between related functional ECU components, so that they can share and process data at the same time point, and finally realize the working synchronization of multiple target slave nodes and improve the safety of vehicle operation.

[0044] Furthermore, in the case where multiple target delay times are different, the longest target delay time among the target delay times of all target slave nodes is determined as the target synchronization time.

[0045] In this embodiment, after determining the target delay time to each target slave node, the master node can understand the network delay situation of each target slave node. Since the communication paths from the master node to different target slave nodes are usually different, the target delay time from the master node to each target slave node is usually different.

[0046] For example, when a vehicle is changing lanes to the left, the two target slave nodes to be synchronized are the left headlight ECU and the left taillight ECU. Assuming the current base time for all nodes is 10:00:00:000:000, the master node detects a target delay of 800us to the left headlight ECU and a target delay of 900us to the left taillight ECU. If the master node uses the smaller of these delays, 800us, as the target synchronization time, the specific execution time is 10:00:00:000:800. However, since the master node's data transmission to the left taillight ECU requires at least a 900us delay before reaching the left taillight ECU, the left taillight ECU has not yet received the synchronization data at 10:00:00:000:800. Consequently, the left headlight illuminates first, followed by the left taillight, resulting in an incorrect vehicle status display and the inability to provide normal left lane change information.

[0047] For example, during a vehicle braking process, the two target slave nodes to be synchronized are the camera ECU and the radar ECU. Assuming the current base time for all nodes is 10:00:00:000:000, the master node detects a target delay of 1200us to the camera ECU and 1400us to the radar ECU. If the master node uses the maximum of 1400us as the unified delay, i.e., the target synchronization time, then the specific execution time is 10:00:00:001:400. Since the latency on the communication path is shorter for the camera ECU, it will receive the synchronization data first, for example, at 10:00:00:001:200. However, the camera ECU does not perform any action (such as acquiring an image for obstacle detection) but instead waits until 10:00:00:001:400 before executing the action. Assuming the radar ECU receives the data packet at exactly 10:00:00:001:400 (ignoring the time required for packet parsing), it will immediately execute an action (such as collecting radar point clouds for obstacle detection). This allows the camera ECU and radar ECU to begin executing actions simultaneously, allowing the brake ECU to make braking decisions based on the complete obstacle information provided by both, improving vehicle safety and avoiding a situation where the camera ECU executes actions first and transmits obstacle detection information to the brake ECU in advance, resulting in the brake ECU only being able to make braking decisions based on only one piece of obstacle information.

[0048] Therefore, in order to ensure that each target slave node can achieve functional synchronization, this embodiment uses the maximum of the target delay times of each target slave node, that is, the maximum target delay time, as the target synchronization time this time, so as to avoid the target slave node with short communication delay taking action first, resulting in the inability to achieve the synchronous control function.

[0049] Optionally, when multiple target delay times are the same, one target delay time is selected from the target delay times of all target slave nodes and is determined as the target synchronization time.

[0050] It is easy to understand that for some special target slave nodes, the target delay times of the target slave nodes may also be the same. In this case, the master node can determine the target synchronization time based on the target delay time of any one of them.

[0051] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the architecture of an electronic and electrical system in another embodiment of the present application. Figure 3 As shown in FIG, the electronic and electrical system further includes an agent node (TAgent), which can be independent of the master node or integrated into the master node. When the agent node is independent of the master node, as shown in FIG. Figure 3 As shown, the master node can be connected to one or more proxy nodes, and each proxy node is connected to one or more slave nodes.

[0052] For example, when this electronic and electrical system is applied to a vehicle system, the proxy node can be a data transfer device such as a vehicle integration gateway (VIU). Specifically, the proxy node has routing capabilities, forwarding data from the master node to slave nodes. When the proxy node is integrated into the master node, the master node also has routing capabilities.

[0053] In addition, the master node also has a global reference clock management function, which is used to determine the global reference time of the entire system and send it to each agent node and slave node, so that all nodes in the system have the same reference time, ensuring the accuracy and reliability of communication.

[0054] Specifically, when the electronic and electrical architecture includes a master node and a slave node, the process mainly includes: The master node determines the global reference time and sends it to the slave nodes; The slave node adjusts its local time based on the received global reference time.

[0055] When the E / E architecture includes master nodes, agent nodes, and slave nodes, the process mainly includes: The master node determines the global reference time and sends it to the proxy node; The proxy node forwards the global reference time to the slave node, and the proxy node adjusts the local time based on the global reference time; The slave node adjusts its local time based on the received global reference time.

[0056] like Figure 3 As shown, in this embodiment, the master node has two different clocks: a network clock and a local clock. The network clock is obtained by synchronizing the master node with an external time source (such as GPS, atomic clocks, or high-precision time servers) via a network protocol (such as NTP or PTP). The local clock is the master node's own clock, typically based on a crystal oscillator or other hardware timer. The local clock is independent of the network clock and is used for internal device time management and event scheduling. This means the local clock is independent of the network and can operate independently even when disconnected.

[0057] The master node selects a clock source from the network clock and its local clock to determine the global reference time. Generally, the network clock takes precedence over the local clock. Therefore, the master node selects the network clock as the global reference time and then transmits it to each proxy or slave node. After receiving the global reference time, each proxy node forwards it to each slave node. Simultaneously, each proxy and slave node uses the received global reference time to update and maintain its own local time. This ensures that all master, proxy, and slave nodes have the same reference time, laying the foundation for subsequent multi-node functional synchronization.

[0058] For example, the master node or the proxy node can obtain the specific time when the synchronization action is executed by adding the target synchronization time to the current reference time (the current reference time of the target slave node is the same as it).

[0059] Furthermore, there can be two master nodes, and the two master nodes are in a master-backup relationship with each other. Figure 3 As shown, when the electronic and electrical system of the present application is applied to a vehicle system, among the two master nodes, master node 1 can be the CDC of the vehicle, and master node 2 can be the VDC of the vehicle, and the CDC and VDC are in a master-backup relationship with each other.

[0060] In this scenario, the master node also performs active / standby management. In the event of a failure, it automatically switches to another master node to ensure the continued availability of the time source and the proper functioning of the time synchronization mechanism. For example, if the clock source selection function of the master node CDC fails and the global reference time cannot be determined, it automatically switches to the master node VDC to determine the global reference time and control time synchronization. Thus, by providing two master nodes that serve as both active and standby nodes, high availability, reliability, and continuity of the electrical and electronic system are ensured, avoiding single points of failure.

[0061] In addition, if Figure 3 As shown, the master node also has a time synchronization network path management function, which is used to manage the delay time of the communication path from the master node to the related proxy node or slave node to ensure the validity of the target delay time to the target slave node.

[0062] Further, Figure 4 1 is a schematic diagram of the functional modules of each node of an electronic and electrical system in one embodiment of the present application. Figure 4 As shown in the figure, the master node first obtains a network clock protocol message from the cloud server TSP (Telematics Service Provider) and parses it to obtain the network time. The master node also maintains its own local time. At this point, the master node selects a clock source and determines a global reference time based on its local time and the obtained network time. This global reference time is then distributed to each proxy node and slave node.

[0063] Each proxy node and slave node receives the global reference time sent by the master node and updates its local time accordingly.

[0064] Since both proxy and slave nodes can potentially serve as target slave nodes for synchronization, they both have clock synchronization processing capabilities, enabling them to execute corresponding functions when their local time reaches the execution time, thus achieving functional synchronization. Since the master node only controls the synchronization of other nodes and does not synchronize as a controlled node, it has a clock synchronization provisioning function, providing specific synchronization execution times for the nodes being controlled.

[0065] In addition, master, proxy, and slave nodes all feature network congestion monitoring and channel selection. The congestion monitoring function monitors the network load on communication paths during regular data transmission to identify congestion. The channel selection function selects the most appropriate path for data transmission. For example, it selects the channel with the lowest network load to ensure data integrity.

[0066] Optionally, determining a target delay time from the master node to each target slave node includes: For any target slave node, multiple nodes included in the communication path from the master node to the target slave node are determined; and a target delay time from the master node to the target slave node is determined based on the delay time between each two adjacent nodes on the communication path.

[0067] In this embodiment, the communication path from the master node to a target slave node may include multiple transit nodes, which may be master nodes or proxy nodes. In other words, a data packet from the master node may need to be forwarded through the master node, one or more proxy nodes, and other transit nodes before ultimately reaching the target slave node.

[0068] After determining the transit nodes that need to be passed on the communication path, the master node determines the target delay time through the communication path to the target slave node based on the delay time between each two adjacent nodes on the communication path.

[0069] For example, for a communication path from master node 1 to target slave node 1: master node 1 - proxy node 3 - proxy node 4 - target slave node 1. Assuming that there is a 500us delay at each node, the path delay time of the communication path is 1500us.

[0070] This embodiment accumulates the single-hop delays between each adjacent node on a communication path to ultimately derive the total delay for the entire path. This more accurately reflects the actual path status and provides a more accurate calculated path delay, helping to improve the accuracy of subsequent multi-node time synchronization. Furthermore, by analyzing each delay segment, bottlenecks can be identified and faults located. For example, a sudden increase in the delay between proxy node 4 and target slave node 1 could indicate an overload or link failure at proxy node 4.

[0071] Optionally, the delay time between two nodes is calculated by: Based on the network load rate, the delay time between each two adjacent nodes on the communication path is determined.

[0072] In this embodiment, a relationship model between the network load rate and the delay time can be established, the current network load rate between the two nodes is input into the model, and the delay time between the two nodes is predicted using the model.

[0073] Illustratively, the relationship model may be a linear model, an exponential model, or a model based on queue theory (such as an M / M / 1 queue model).

[0074] In addition, the delay time between two nodes can also be determined by message request. The details are as follows: Determine the data sender and data receiver in two adjacent nodes; the data sender sends a synchronization request message to the data receiver; wherein the synchronization request message carries the request sending time; after receiving the synchronization request message, the data receiver feeds back a response message to the data sender; wherein the response message carries the request receiving time for the synchronization request message; determine the delay time between the two adjacent nodes based on the request sending time and the request receiving time.

[0075] Please refer to Figure 5 , Figure 5 This is a schematic diagram of the interaction between nodes in one embodiment of the present application. Figure 5 As shown, for two nodes in a communication process, the data initiator is defined as the master node, the data receiver is defined as the slave node, and the delay time between the two nodes is measured in microseconds. By exchanging messages between the two nodes, the delay time between the two nodes can be accurately detected. It should be understood that the data sender can be a master node or a proxy node of the aforementioned electronic and electrical system, and the data receiver can be a proxy node or a slave node of the aforementioned electronic and electrical system.

[0076] Specifically, during the communication process, first, the master node sends a synchronization request message to the slave node. The synchronization request message carries the request sending time. The slave node receives the synchronization request message, records the request receiving time (both the master node and the slave node use the global reference time as the time reference point), and feeds back a response message to the master node. The response message carries the request receiving time for the synchronization request message. The master node receives the response message and determines the delay time of the synchronization request based on the request sending time and the request receiving time. At the same time, the response sending time of the response message fed back by the slave node and the response receiving time of the response message received by the master node can also be recorded accordingly, thereby determining the delay time of the response process based on the response sending time and the response receiving time.

[0077] like Figure 5 As shown in the figure, assuming that the master node sends the request at t0 and the slave node receives the request at t1, the request delay between the master and the slave is t1-t0, which is the time difference between t1 and t0. Assuming that the slave node sends the response at t1 and the master node receives the response at t2, the response delay between the master and the slave is t2-t1, which is the time difference between t2 and t1.

[0078] In specific implementation, multiple request delay times can be obtained through multiple request tests, and then the average value is taken as the final delay time between the two nodes. Figure 5 As shown, through three master-slave requests, three request delay times are measured: t1-t0, t3-t2, and t5-t4. The final delay time is: ((t1-t0)+(t3-t2)+(t5-t4)) / 3, which improves the accuracy of delay time detection.

[0079] For further information, please refer to Figure 6 , Figure 6 This is a schematic diagram of the structure of a synchronization request message in an embodiment of the present application. Figure 6As shown in the figure, assuming the synchronization request message uses an Ethernet frame, the message includes: an Ethernet header, which is the header of the Ethernet frame and contains the source / destination MAC addresses and type identifier, used for link-layer addressing and protocol identification. An IP header, which is the network-layer header and contains the source / destination IP addresses (4 bytes each), is responsible for logical addressing and routing, enabling end-to-end data transmission across the network. A TCP / UDP header, where the TCP header (20 bytes) is a connection-oriented, reliable transport protocol header that provides reliable transmission, flow control, and congestion control. The UDP header (8 bytes) is a connectionless, lightweight transport protocol header used for low-latency, low-overhead transmission (such as DNS and video streaming). A data field, which contains the data to be transmitted. A 4-byte CRC (Cyclic Redundancy Check) field at the end of the Ethernet frame, is used to detect bit errors (such as noise) during frame transmission and determine data transmission integrity.

[0080] In this application, a time synchronization header (22 bytes in length) is added to the data field to mark relevant information during the time synchronization process. Specifically, the time synchronization header includes at least the message type, network load rate, communication path number, and delay time. Among them: The message type is used to determine whether the message is a synchronization request message, so that the data receiver can respond if it determines that the synchronization request message has been received, and return a response message to the data sender.

[0081] For example, if the message type is "1", it means that the message is a time synchronization message, and if the message type is "0", it means that the message is a normal data message. The message type occupies 1 byte.

[0082] The network load rate is used to reflect the congestion level of the communication path.

[0083] For example, a network load rate of 90% means that the ratio of the network's actual bandwidth to the total bandwidth at that moment is 90%, indicating that the network utilization is high and congestion may be occurring. The network load rate occupies 1 byte.

[0084] The number corresponding to the communication path is used to distinguish different paths from the data sender to the data receiver.

[0085] For example, assuming that the data sender is node A and the data receiver is node B, the corresponding communication path number can be simply abbreviated as AB. The number corresponding to the communication path occupies 16 bytes.

[0086] The delay time is used to characterize the time consumed by the data sender to transmit data to the data receiver through the communication path, including the request delay time for the data sender to send a synchronization request to the data receiver (i.e. Figure 6 The master-to-slave delay in the data transmission direction is the delay time of the data receiving direction to the data sending direction (i.e. Figure 6 slave to master delay in the .

[0087] Exemplarily, the request delay time and the response delay time each occupy 4 bytes, and the unit of the request delay time and the response delay time is us.

[0088] This embodiment adds a time synchronization header to the Ethernet message structure to test and record the delay time between nodes, thereby assisting the master node or agent node in the above-mentioned electronic and electrical system to achieve the purpose of synchronous control of multiple target slave nodes without affecting the normal data transmission process between nodes.

[0089] For any communication path, the actual delay time of the communication path is greater than the delay time calculated by means of network load rate or message request.

[0090] In this embodiment, when calculating the delay time between two nodes based on the network load rate or message request method, only some factors are often considered, while some influencing factors are ignored, resulting in the calculated delay time being shorter than the delay time in the actual application scenario.

[0091] For example, when using a model that compares network load rate and latency to predict the latency between two nodes, the model may only account for transmission and propagation delays, while ignoring processing delays, serialization delays, and protocol processing time. For example, the time it takes a router or switch to process a packet may increase due to high CPU load. Furthermore, load rate-based models assume smooth traffic flow, but in reality, traffic can be bursty, leading to increased instantaneous queuing delays. Furthermore, the load rate may not fully reflect congestion conditions over a short period of time. When measuring latency using message requests (such as Ping), the measurement results may be inaccurate due to the priority processing of ICMP messages or different processing strategies of intermediate devices.

[0092] Therefore, in this embodiment, after calculating the delay between two nodes using the network load rate or message request method, a value slightly larger than this time can be used as the actual delay time during the synchronization control application process. For example, the calculated delay time can be increased by 1.1 times, and the increased value is then used as the actual delay time.

[0093] Optionally, for any target slave node, when there are multiple communication paths from the master node to the target slave node, determining a target delay time from the master node to the target slave node includes: The shortest delay time among the delay times corresponding to all communication paths is determined as the target delay time from the master node to the target slave node.

[0094] In this embodiment, there may be multiple communication paths from the master node to the target slave node, and the delay times of different network channels are different.

[0095] For example, the communication path from master node 1 to target slave node 1 may include: path A, master node 1-agent node 2-target slave node 1, with a path delay time of 1000us; path B, master node 1-agent node 3-agent node 4-target slave node 1, with a path delay time of 1500us.

[0096] In the multi-node synchronization control process, for any target slave node, the master node first needs to determine the path delay time of all communication paths to the target slave node, and then select the most appropriate communication path from multiple communication paths to perform time synchronization control.

[0097] Specifically, during the selection process, the master node selects the communication path with the shortest latency as the target communication path to the target slave node, and uses the path delay corresponding to this target communication path as the target delay to the target slave node. Because the shortest latency means the fastest response, it is more suitable for scenarios with high real-time requirements, such as time synchronization and financial transactions. Furthermore, the shortest path delay means lower network load on that path, smoother data transmission, and more stable data transmission quality (low packet loss and low jitter).

[0098] For example, in the above example, master node 1 will choose to go through path A to target slave node 1, and determine the target delay time to target slave node 1 to be 1000us.

[0099] Optionally, the above method further includes: When all communication paths to a target slave node are disconnected, the master node generates an alarm message, which is used to prompt the user that time synchronization of the target slave node cannot be achieved.

[0100] In this embodiment, if all communication paths between the master node and one of the multiple target slave nodes to be synchronized are disconnected, that is, the master node cannot measure the target delay time to the target slave node, this indicates that the system network may have a fault. In this case, an alarm message is generated to inform the user that time synchronization with the target slave node cannot be achieved.

[0101] On this basis, users can further use the alarm information to quickly locate the fault boundary and accurately isolate the problem point. On the one hand, the alarm information clearly points to the specific target slave node (rather than the general "network anomaly"), which can narrow the scope of troubleshooting. On the other hand, combined with the path detection log (such as the last available delay data), the specific fault type can be quickly determined, such as network failure, target slave node downtime, or configuration error. For example, if all paths from the master node to the target slave node A are disconnected, but the path to the target slave node B is normal, then the problem with the master node itself can be ruled out, and the focus can be on checking the access link or firewall rules of the target slave node A.

[0102] Thus, through the alarm, the risk of "false synchronization" is avoided, and the master node is prevented from continuing to use expired delay time data, causing the target slave node to think that the synchronization is normal (in fact, it has drifted), thereby causing a chain reaction failure.

[0103] Please refer to Figure 7 , Figure 7 FIG. 1 is a schematic diagram of the structure of an automotive electrical and electronic system in one embodiment of the present application. Figure 7 As shown in the figure, the electronic and electrical architecture adopts an Ethernet ring network architecture design. The advantages of the ring network architecture are that it supports SOA (Service-oriented Architecture) and communication channel protection, supports the nearby access of each ECU component according to functional classification, and saves wiring harness costs.

[0104] like Figure 7 As shown, the automotive electronic and electrical system includes: the electronic and electrical system is an automotive electronic and electrical system, and the automotive electronic and electrical system includes: at least one first controller 710 and at least two second controllers 720; wherein, all first controllers 710 or part of the first controllers 710 communicate with each other; the first controller 710 and all or part of the second controllers 720 communicate with each other; wherein, the master node is deployed on the first controller 710, and the first controller 710 is a domain controller; and the slave node is deployed on the second controller 720.

[0105] Among them, multiple first controllers 710, or the first controller 710 and all or part of the second controllers 720, can be connected to each other through multiple networks, such as CAN network (Controller Area Network, serial communication protocol), Ethernet, WiFi (Wireless Fidelity, mobile hotspot), 5G (5th Generation Mobile Communication Technology, fifth generation mobile communication technology), etc.

[0106] Furthermore, if Figure 8 As shown, the automotive electrical and electronic system also includes one or more third controllers 730. The multiple third controllers 730 communicate with each other, the first controller 710 communicates with the third controllers 730, and the third controller 730 communicates with the second controller 720. The third controller 730 is used to coordinately control the multiple second controllers 720 and automotive components within a specific location area of ​​the vehicle. Proxy nodes are deployed on the third controllers 730. In this case, the proxy nodes are independent of the master node.

[0107] When the electronic and electrical system of the present application is as follows Figure 8 In the automotive electronic and electrical system shown, the master node is deployed on the first controller 710, which can be a domain controller such as CDC and VDC; the slave node is deployed on the second controller 720, which can be a camera ECU, radar ECU, seat control ECU, air conditioning ECU, audio ECU, left headlight ECU, right headlight ECU, left taillight ECU, right taillight ECU, etc., and the proxy node is deployed on the third controller 730, which can be a VIU, etc.

[0108] For example, assuming the master node is the vehicle's VDC, the execution command is a headlight on command or a headlight off command, and the at least two target slave nodes that this function depends on are at least two headlight ECUs in the vehicle, the synchronous control process includes: The vehicle's VDC determines the target synchronization time based on the target delay time to each headlight ECU, and sends the target synchronization time and light on / off command to each headlight ECU; Each headlight ECU executes the light on / off command after delaying the target synchronization time.

[0109] In this embodiment, assuming that the two headlight ECUs to be synchronized are the left rear headlight ECU and the right rear headlight ECU, the master node VDC needs to control the synchronization of the two ECUs so that the left rear headlight and the right rear headlight can be turned on or off at the same time. Figure 8As shown, assuming that the master node VDC is the first controller, the target slave node left rear headlight ECU is Figure 8 The second controller a in the right rear headlight ECU is Figure 7 The second controller d.

[0110] In specific implementations, the first controller (the master node VDC) first detects the delay time of each communication path between node second controller a and node second controller d based on the network load rate. The delay time detection method is described above and will not be repeated here.

[0111] like Figure 8 As shown, the paths from the first controller (master node VDC) to the second controller a include: path 1, first controller → third controller A → second controller a, with a path delay of 1500us; path 2, first controller → third controller B → third controller A → second controller a, with a path delay of 1800us.

[0112] The paths from the first controller (master node VDC) to the second controller d include: Path 1, first controller → third controller B → second controller d, with a path delay of 1700 μs; Path 2, first controller → third controller A → third controller B → second controller d, with a path delay of 2000 μs.

[0113] It is easy to understand that the path from the first controller (master node VDC) to the node second controller a and the second controller d also includes other paths, and only a few of them are listed here for ease of description.

[0114] Next, the first controller (master node VDC) will select the path with the shortest delay as the target communication path to the second controller a and the second controller d based on the delay time of each communication path to the second controller a and the second controller d, and use the path delay time corresponding to the target communication path as the target delay time to the second controller a (second controller d).

[0115] For example, in the paths listed above, the first controller (the primary node VDC) will select path 1 to the second node controller a with a target delay of 1500 μs, and simultaneously select path 1 to the second node controller d with a target delay of 1700 μs.

[0116] Then, in order to ensure that each target slave node can achieve functional synchronization, the master node will use the maximum of the target delay times of each target slave node, that is, the maximum target delay time, as the target synchronization time this time, and send it to the target slave nodes to be synchronized respectively.

[0117] In this embodiment, the first controller (master node VDC) uses 1700 μs as the target synchronization time, and sends the target synchronization time and the light on / off instruction to the second controller a and the second controller d respectively.

[0118] After receiving the target synchronization time and the on / off command, second controllers a and d delay the target synchronization time and then execute the on / off command, thereby simultaneously turning the lights on or off. This synchronizes the control of the vehicle's left rear headlight (second controller a) and right rear headlight (second controller d) through the first controller (master node VDC).

[0119] This embodiment monitors the network channel load and calculates the delay time in real time to provide a clock synchronization mechanism, achieve precise time synchronization between distributed systems, and coordinate the synchronous processing between related functional ECU components, so that they can share and process data at the same time point, ultimately improving the safety of vehicle operation.

[0120] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0121] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0122] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0123] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0125] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0126] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.

[0127] The above is a detailed introduction to a data synchronization processing method provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data synchronization processing method, characterized in that: The method is applied to an electronic and electrical system, which includes at least a master node and a plurality of slave nodes; the method includes: In a case where the master node obtains an execution command, determining at least two target slave nodes based on the execution command; In a case where the functions of the target slave nodes are mutually dependent, determining a target delay time from the master node to each of the target slave nodes; Determining a target synchronization time based on target delay times of all the target slave nodes; An execution time for all the target slave nodes to execute the execution command is determined based on the target synchronization time.

2. The method according to claim 1, characterized in that Determining a target synchronization time based on the target delay times of all the target slave nodes includes: In the case where the multiple target delay times are different, the longest target delay time among the target delay times of all the target slave nodes is determined as the target synchronization time.

3. The method according to claim 1, characterized in that Determining a target synchronization time based on the target delay times of all the target slave nodes includes: In the case that a plurality of target delay times are the same, one target delay time is selected from the target delay times of all the target slave nodes and is determined as the target synchronization time.

4. The method according to claim 1, wherein Determining a target delay time from the master node to each of the target slave nodes includes: For any of the target slave nodes, determining a plurality of nodes included in a communication path from the master node to the target slave node; The target delay time from the master node to the target slave node is determined according to the delay time between every two adjacent nodes on the communication path.

5. The method according to claim 4, characterized in that The method further comprises: Based on the network load rate, a delay time between every two adjacent nodes on the communication path is determined.

6. The method according to claim 4, characterized in that The method further comprises: Determine the data sender and data receiver in two adjacent nodes; The data sender sends a synchronization request message to the data receiver; wherein the synchronization request message carries the request sending time; After receiving the synchronization request message, the data receiver feeds back a response message to the data sender; wherein the response message carries the request reception time for the synchronization request message; The delay time between two adjacent nodes is determined according to the request sending time and the request receiving time.

7. The method according to claim 6, characterized in that The synchronization request message includes: message type, network load rate, communication path corresponding number and delay time; wherein, The message type is used to determine whether the message is the synchronization request message, so that the data receiver responds and returns the response message when it determines that the synchronization request message has been received; The network load rate is used to reflect the congestion level of the communication path; The numbers corresponding to the communication paths are used to distinguish different paths from the data sender to the data receiver; The delay time is used to represent the time consumed by the data sender to transmit data to the data receiver through the communication path.

8. The method according to claim 5 or 6, characterized in that The method further comprises: For any of the communication paths, the actual delay time of the communication path is greater than the delay time determined by claim 5 or 6.

9. The method according to claim 1, characterized in that For any of the target slave nodes, when there are multiple communication paths from the master node to the target slave node, determining a target delay time from the master node to the target slave node includes: The shortest delay time among the delay times corresponding to all communication paths is determined as the target delay time from the master node to the target slave node.

10. The method according to claim 1, characterized in that The electronic and electrical system is an automotive electronic and electrical system, and the automotive electronic and electrical system includes: at least one first controller and at least two second controllers; Wherein, all or part of the first controllers communicate with each other; the first controller communicates with all or part of the second controllers; The master node is deployed on the first controller, which is a domain controller; and the slave node is deployed on the second controller.

Citation Information

Patent Citations

  • Clock synchronization method, device and system in distributed system

    CN114124276A

  • Time synchronization method and device, control node and computer readable storage medium

    CN117938296A

  • Data processing method, device and equipment, medium and vehicle

    CN117998463A

  • Transmission duration report and transmission target time allocation for controller area network synchronization

    US20200295966A1