Data transmission method and device, computer equipment, storage medium and program product

By using the synchronous calibration mechanism to adjust the time delay compensation parameters and local clock of the MCU in multi-MCU systems, the problem of inconsistent data transmission delay between MCUs is solved, and the performance and real-time of the system are improved.

CN119945610APending Publication Date: 2025-05-06镁佳(北京)科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510109134.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In multi-MCU systems, due to differences in processing power, load conditions and physical connection distance between MCUs, data transmission delays are inconsistent, affecting the overall performance and real-time nature of the system, which may lead to data transmission errors or disordered command execution order.

Method used

Through a preset synchronization calibration mechanism, the time delay compensation parameters of each MCU are determined, and the broadcast synchronization signal is sent to each MCU, adjusting its local clock to ensure that all MCUs can synchronize to the same point in time when receiving the broadcast synchronization signal.

Benefits of technology

It realizes that data transmission between each MCU is more accurate and efficient, avoids data transmission errors or disordered command execution sequence caused by time out of synchronization, and improves the overall operating efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119945610A_ABST
    Figure CN119945610A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and discloses a data transmission method and device, computer equipment, a storage medium and a program product. The method comprises the following steps: determining a time delay compensation parameter of each controller according to a preset synchronous calibration mechanism; sending a broadcast synchronization signal to each controller, and according to the broadcast synchronization signal, controlling a target controller to adjust the current time of a local clock of the target controller according to the broadcast synchronization signal and the time delay compensation parameter of the target controller to obtain the first target time of the local clock of the target controller; wherein the target controller is any one of the controllers; and realizing data transmission among the controllers according to the first target time of the local clock of the target controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a data transmission method, device, computer equipment, storage medium and program product. Background Art

[0002] In modern electronic systems, with the continuous increase in functions and the improvement in complexity, a single microcontroller unit (MCU) often cannot meet the system requirements. Therefore, the architecture of multiple MCUs working together has become more and more common. This multi-MCU system architecture not only improves the processing power of the system through distributed processing, but also enhances the flexibility and scalability of the system. In order to achieve effective collaboration between these MCUs, the data transmission mechanism between the host and the MCU is particularly important. An efficient and orderly data transmission method is essential to ensure the overall performance and real-time performance of the system.

[0003] At present, the data transmission between the host and multiple MCUs mainly adopts the following methods: Single interface serial communication: The host communicates with multiple MCUs through a shared serial communication interface (such as UART, SPI or I2C). Multiple independent channels parallel communication: The host communicates with multiple MCUs simultaneously through multiple independent communication channels (such as multiple UART interfaces, Ethernet ports, etc.).

[0004] However, due to differences in processing power, load conditions, and physical connection distances of different MCUs, the data transmission delays between them are inconsistent. This inconsistency not only affects the overall performance and real-time performance of the system, but may also lead to data transmission errors or confusion in the order of command execution. Summary of the invention

[0005] In view of this, the present invention provides a data transmission method, apparatus, computer equipment, storage medium and program product.

[0006] In a first aspect, the present invention provides a data transmission method, the method comprising: determining a time delay compensation parameter of each controller according to a preset synchronization calibration mechanism; sending a broadcast synchronization signal to each controller, and controlling a target controller according to the broadcast synchronization signal; adjusting the current time of a local clock of the target controller according to the broadcast synchronization signal and the time delay compensation parameter of the target controller to obtain a first target time of the local clock of the target controller; wherein the target controller is any one of each controller; and realizing data transmission between the controllers according to the first target time of the local clock of the target controller.

[0007] The data transmission method provided in this embodiment can accurately measure the time delay of each MCU and calculate the corresponding time delay compensation parameters through a preset synchronization calibration mechanism. These parameters are used to adjust the local clock of the MCU to ensure that all MCUs can synchronize to the same time point when receiving the broadcast synchronization signal.

[0008] At the same time, by adjusting the local clock of the MCU, the clocks of all MCUs are kept consistent with the broadcast synchronization signal, thus establishing a unified time base. Under this time base, data transmission between MCUs can be carried out more accurately and efficiently, avoiding data transmission errors or disordered command execution order caused by time asynchrony. In addition, since all MCUs work under a unified time base, task allocation and data transmission between MCUs can be coordinated more efficiently, thereby improving the overall operation efficiency of the system.

[0009] In one possible implementation, a preset synchronization calibration mechanism is determined, including: obtaining the response delay time of each controller; detecting whether the response delay time of the target controller exceeds the delay time threshold; if the response delay time of the target controller exceeds the delay time threshold, determining the time delay compensation parameter of the target controller according to the average value of the response delay time of each controller; and determining the preset synchronization calibration mechanism according to the time delay compensation parameter of the target controller.

[0010] The data transmission method provided in this embodiment can timely discover and solve potential delay problems by accurately measuring and monitoring the response delay time of each controller, thereby avoiding system instability due to excessive delay. The synchronous calibration mechanism can ensure that all controllers are consistent in time, reducing system errors and instability factors caused by time asynchrony. In addition, the time delay compensation parameters of the target controller are determined based on the average value of the response delay time of each controller, which can more accurately compensate for the delay, thereby improving the response speed and performance of the system.

[0011] In one possible implementation, a broadcast synchronization signal is sent to each controller, including: obtaining the communication traffic of each controller; detecting whether the communication traffic exceeds the traffic threshold; if the communication traffic exceeds the traffic threshold, reducing the initial time interval to obtain the target time interval, and sending a test pulse signal to each controller according to the target time; if the communication traffic does not exceed the traffic threshold, sending a test pulse signal to each controller according to the initial time interval.

[0012] The data transmission method provided in this embodiment can dynamically respond to traffic changes by monitoring communication traffic in real time. When the traffic is too high, reducing the time interval can more effectively monitor the network status and promptly discover and solve potential communication bottlenecks or overload problems. In addition, by detecting and responding to the increase in communication traffic in advance, measures can be taken before network congestion occurs, thereby avoiding problems such as increased delays, packet loss, or reduced service quality caused by network congestion.

[0013] In one possible implementation, a target controller is controlled according to a broadcast synchronization signal, and the current time of the local clock of the target controller is adjusted according to the broadcast synchronization signal and the time delay compensation parameter of the target controller to obtain a first target time of the local clock of the target controller, including: determining a second target time according to the broadcast synchronization signal; determining a difference between the second target time and the current time of the local clock of the target controller according to the time delay compensation parameter of the target controller; detecting whether the difference exceeds a difference threshold; if the difference does not exceed the difference threshold, adjusting the current time of the local clock to the second target time corresponding to the broadcast synchronization signal according to the time delay compensation parameter to obtain the adjusted current time, and using the adjusted current time as the first target time.

[0014] The data transmission method provided in this embodiment can broadcast a synchronization signal so that all controllers can receive a unified time reference, which helps to reduce the time asynchronization problem caused by the drift of each clock. By adjusting the local clock using the time delay compensation parameter, the time error can be further reduced and the time synchronization accuracy of the entire system can be improved.

[0015] At the same time, when the time difference between the local clock and the broadcast synchronization signal is within an acceptable range (ie, does not exceed the difference threshold), adjusting the local clock can ensure that the system continues to operate stably and avoid system failures or anomalies caused by time asynchrony.

[0016] In one possible implementation, the method also includes: receiving a calibration signal sent by the target controller; detecting whether the first target time of the target controller is accurate based on the calibration signal; if the first target time and the second target time of the target controller are the same, determining that the first target time of the target controller is accurate; if the first target time and the second target time of the target controller are not the same, determining that the first target time of the target controller is inaccurate.

[0017] The data transmission method provided in this embodiment can accurately detect the time synchronization state of the target controller by comparing the first target time of the target controller with the second target time corresponding to the broadcast synchronization signal. When the two times are the same, it means that the time synchronization of the target controller is accurate; when the times are different, it indicates that there is a time asynchrony problem, and corresponding measures need to be taken to adjust.

[0018] At the same time, through regular calibration and testing, time asynchrony problems can be discovered and resolved in a timely manner, thereby enhancing the reliability and stability of the system and avoiding system failures or anomalies caused by time errors.

[0019] In one possible implementation, data transmission between controllers is achieved based on a first target time of a local clock of a target controller, including: detecting whether there is a communication anomaly between multiple data transmission packets of the target controller; if there is a communication anomaly between multiple data transmission packets of the target controller, adjusting the transmission time between the multiple data transmission packets so that the multiple data transmission packets are transmitted according to a preset time period; detecting the number of data transmission packets lost by the target controller; if the number of data transmission packets lost by the target controller is greater than a loss threshold, adjusting the parameters of a transmission channel of the target controller to obtain target parameters; and executing transmission of other data transmission packets according to the target parameters to achieve data transmission between controllers.

[0020] The data transmission method provided in this embodiment can timely discover and solve potential transmission problems by detecting communication anomalies between data transmission packets, thereby ensuring the integrity and accuracy of the data. Adjusting the transmission time between data transmission packets can avoid data loss or delay caused by transmission conflicts or congestion, and further improve the reliability of data transmission. In addition, when it is detected that the number of data transmission packets lost by the target controller exceeds the loss threshold, the parameters of the transmission channel are adjusted to optimize the transmission efficiency and stability of the channel. By adjusting channel parameters such as frequency, bandwidth, modulation mode, etc., the transmission quality of the signal can be improved, and the influence of interference and noise can be reduced, thereby improving the rate and stability of data transmission.

[0021] In a second aspect, the present invention provides a data transmission device, which includes: a determination module, used to determine the time delay compensation parameters of each controller according to a preset synchronization calibration mechanism; an adjustment module, used to send a broadcast synchronization signal to each controller, and control the target controller according to the broadcast synchronization signal; according to the broadcast synchronization signal and the time delay compensation parameters of the target controller, the current time of the local clock of the target controller is adjusted to obtain a first target time of the local clock of the target controller; wherein the target controller is any one of each controller; a data transmission module, used to realize data transmission between each controller according to the first target time of the local clock of the target controller.

[0022] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the data transmission method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0023] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the data transmission method of the first aspect or any corresponding embodiment thereof.

[0024] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the data transmission method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0026] Figure 1 is a flow chart of a data transmission method according to an embodiment of the present invention;

[0027] Figure 2 is a structural block diagram of a data transmission device according to an embodiment of the present invention;

[0028] Figure 3 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0030] At present, the data transmission between the host and multiple MCUs mainly adopts the following methods: Single interface serial communication: The host communicates with multiple MCUs through a shared serial communication interface (such as UART, SPI or I2C). Multiple independent channels parallel communication: The host communicates with multiple MCUs simultaneously through multiple independent communication channels (such as multiple UART interfaces, Ethernet ports, etc.).

[0031] However, due to differences in processing power, load conditions, and physical connection distances of different MCUs, the data transmission delays between them are inconsistent. This inconsistency not only affects the overall performance and real-time performance of the system, but may also lead to data transmission errors or confusion in the order of command execution.

[0032] According to an embodiment of the present invention, a data transmission method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0033] In this embodiment, a data transmission method is provided, which can be used in computer devices, such as computers, servers, etc. Figure 1 is a flow chart of a data transmission method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0034] Step S101, determining the time delay compensation parameters of each controller according to a preset synchronization calibration mechanism.

[0035] The preset synchronization calibration mechanism may represent a preset rule or algorithm for determining the time delay compensation parameters of each controller to ensure that the time of all controllers can be kept consistent. The time delay compensation parameters are used to adjust the local clock of the controller to compensate for the time deviation caused by factors such as network delay and hardware differences. Specifically, a central node (such as a master controller) is required to collect the time information of all controllers, and based on this information and the preset synchronization calibration mechanism (such as NTP, PTP and other protocols), the time delay compensation parameters of each controller are calculated.

[0036] Step S102, sending a broadcast synchronization signal to each controller, and controlling the target controller according to the broadcast synchronization signal; adjusting the current time of the local clock of the target controller according to the broadcast synchronization signal and the time delay compensation parameter of the target controller to obtain the first target time of the local clock of the target controller; wherein the target controller is any one of each controller.

[0037] The controller may be a microcontroller unit (MCU) or other controllers, which are not specifically limited here. Specifically, the central node sends a broadcast synchronization signal to all controllers. After receiving this signal, each controller (as the target controller) adjusts its local clock according to its own time delay compensation parameter to ensure that the time of all controllers can be consistent.

[0038] Step S103: implementing data transmission between controllers according to the first target time of the local clock of the target controller.

[0039] After all controllers have synchronized their time, they can transfer data based on this time consistency. For example, you can set a global timestamp and all data transfers are based on this timestamp.

[0040] As an example, there is a distributed system that contains multiple controllers that need to work together to complete a task. In order to ensure that the task can proceed smoothly, all controllers need to have a consistent time reference. At this time, the above synchronization calibration mechanism can be used to ensure that the time of all controllers is consistent.

[0041] For example, there are three controllers A, B, and C, and their times are 12:00:00, 12:00:01, and 12:00:02, respectively. According to the preset synchronization calibration mechanism, the time delay compensation parameters of A, B, and C are calculated to be 0, -1, and -2 seconds, respectively. Then, the central node sends a broadcast synchronization signal to A, B, and C. After receiving the signal, A, B, and C adjust their local clocks according to their own time delay compensation parameters. After the adjustment, the time of A, B, and C is all 12:00:00, and they can then transmit data based on this time consistency.

[0042] The data transmission method provided in this embodiment can accurately measure the time delay of each MCU and calculate the corresponding time delay compensation parameters through a preset synchronization calibration mechanism. These parameters are used to adjust the local clock of the MCU to ensure that all MCUs can synchronize to the same time point when receiving the broadcast synchronization signal.

[0043] At the same time, by adjusting the local clock of the MCU, the clocks of all MCUs are kept consistent with the broadcast synchronization signal, thus establishing a unified time base. Under this time base, data transmission between MCUs can be carried out more accurately and efficiently, avoiding data transmission errors or disordered command execution order caused by time asynchrony. In addition, since all MCUs work under a unified time base, task allocation and data transmission between MCUs can be coordinated more efficiently, thereby improving the overall operation efficiency of the system.

[0044] In a possible implementation, determining a preset synchronization calibration mechanism includes:

[0045] Step a1, obtaining the response delay time of each controller.

[0046] The response delay time can characterize the time from sending a request or command to receiving a response. It measures the response speed of the system or device. Specifically, by sending a test signal or command to each controller and measuring the time difference from sending the signal to receiving the response, the response delay time of each controller is obtained.

[0047] As an example, the ping command is used to measure the network latency and thus estimate the response latency of the controller.

[0048] As an example, a request data packet in a specific format is sent to the controller, and the timestamps of sending and receiving are recorded, and then the time difference is calculated.

[0049] Step a2: Detect whether the response delay time of the target controller exceeds a delay time threshold.

[0050] The target controller may be any one of the controllers, that is, each controller needs to detect whether its response delay time exceeds the delay time threshold.

[0051] As an example, if the preset delay time threshold is 100 milliseconds, and the response delay time of the target controller is 120 milliseconds, it is determined to exceed the threshold.

[0052] As an example, for a system with high real-time requirements, the delay time threshold may be set to 50 milliseconds or lower.

[0053] Step a3: if the response delay time of the target controller exceeds the delay time threshold, determine the time delay compensation parameter of the target controller according to the average value of the response delay time of each controller.

[0054] When the response delay time of the target controller exceeds a threshold, the average value of the response delay times of all controllers is calculated, and the difference between the average value and the delay time of the target controller is used as a time delay compensation parameter.

[0055] As an example, if the average response delay time of all controllers is 80 milliseconds and the delay time of the target controller is 120 milliseconds, the time delay compensation parameter is 40 milliseconds (a negative value indicates that the time needs to be adjusted forward).

[0056] Step a4: determining a preset synchronization calibration mechanism according to the time delay compensation parameter of the target controller.

[0057] According to the time delay compensation parameters determined in step a3, the preset synchronization calibration mechanism is adjusted to ensure the time consistency among all controllers.

[0058] As an example, if NTP (Network Time Protocol) is used for time synchronization, corresponding delay compensation parameters may be set in the NTP server to adjust the time of the target controller.

[0059] In specific implementation, the response delay time Δt of each MCU after receiving the broadcast signal and feeding it back to the host is measured. i .

[0060] If Δt i >T, then let timeDelayCompensation i =α*(Δt i Δt_ave), otherwise let timeDelayCompensation i =0, where α is the proportional factor, T is the maximum tolerable delay threshold, and Δt_ave is the average delay;

[0061] Check whether any MCU fails to complete communication. If existsM is not received, the error code Error1 is returned.

[0062] The calculated time delay compensation parameters are written into the corresponding MCU configuration and recorded in the system log.

[0063] For example: there is a system with three controllers: controllers A, B and C. Through step a1, their response delay times are obtained as 80 milliseconds, 120 milliseconds and 90 milliseconds respectively. The preset delay time threshold is 100 milliseconds. In step a2, we detect that the response delay time of controller B exceeds the threshold. In step a3, the average value of the response delay time of all controllers is calculated as (80+120+90) / 3=100 milliseconds. Then, the time delay compensation parameter of controller B is determined to be 100 milliseconds (average value)-120 milliseconds (delay time of controller B)=-20 milliseconds (indicating that it needs to be adjusted forward by 20 milliseconds). Finally, in step a4, the preset synchronization calibration mechanism is adjusted according to the time delay compensation parameter of controller B to ensure the time consistency between all controllers. For example, if NTP is used for time synchronization, the corresponding delay compensation parameter can be set to -20 milliseconds in the NTP server.

[0064] The data transmission method provided in this embodiment can timely discover and solve potential delay problems by accurately measuring and monitoring the response delay time of each controller, thereby avoiding system instability due to excessive delay. The synchronous calibration mechanism can ensure that all controllers are consistent in time, reducing system errors and instability factors caused by time asynchrony. In addition, the time delay compensation parameters of the target controller are determined based on the average value of the response delay time of each controller, which can more accurately compensate for the delay, thereby improving the response speed and performance of the system.

[0065] In a possible implementation, sending a broadcast synchronization signal to each controller in step S102 includes:

[0066] Step b1, obtaining the communication flow of each controller.

[0067] Communication traffic can represent the amount of data transmitted through the communication network within a certain period of time. It measures the busyness of the network. Specifically, the communication traffic data of each controller within a certain period of time can be obtained by monitoring network traffic or reading related logs.

[0068] As an example, a network traffic monitoring tool (such as Wireshark, NetFlow, etc.) is used to capture and analyze the communication traffic of each controller in real time.

[0069] As an example, the communication flow data of each controller is extracted from the log of the network equipment (such as router, switch).

[0070] Step b2: Detect whether the communication flow exceeds the flow threshold.

[0071] The flow threshold can be used to determine whether the communication flow is too high, thereby triggering corresponding adjustment measures. The communication flow of each controller is compared with the preset flow threshold to determine whether it exceeds the threshold.

[0072] As an example, if the preset traffic threshold is 100 Mbps, and the communication traffic of a certain controller reaches 120 Mbps, it is determined to exceed the threshold.

[0073] Step b3: if the communication flow exceeds the flow threshold, reduce the initial time interval to obtain the target time interval, and send a test pulse signal to each controller according to the target time.

[0074] When it is detected that the communication traffic exceeds the threshold, the initial time interval is adjusted according to certain rules (such as proportional reduction, fixed reduction value, etc.) to obtain a new time interval (target time interval), and a test pulse signal is sent to each controller according to this time interval to detect the network status and the response speed of the controller more frequently.

[0075] As an example, if the initial time interval is 1 second, when the communication flow exceeds the threshold, it is reduced to 0.5 seconds as the target time interval.

[0076] As an example, the target time interval may be dynamically adjusted according to the degree of excess of the communication traffic. For example, when the threshold is exceeded by 10%, the time interval is reduced by 10%, and when the threshold is exceeded by 20%, the time interval is reduced by 20%.

[0077] Step b4: If the communication flow rate does not exceed the flow rate threshold, a test pulse signal is sent to each controller according to the initial time interval.

[0078] When the communication flow rate does not exceed the threshold, the initial time interval is kept unchanged, and a test pulse signal is sent to each controller according to the time interval.

[0079] For example: there is a system with three controllers, and the initial time interval is set to 1 second. By monitoring the network traffic, it is found that the communication traffic of controller C has reached 150Mbps, while the preset traffic threshold is 100Mbps. In step b2, it is detected that the communication traffic of controller C exceeds the threshold. In step b3, it is decided to reduce the initial time interval from 1 second to 0.5 seconds (assuming that a proportional reduction method is adopted, and the reduction ratio is 50%), and the target time interval is 0.5 seconds. Then, a test pulse signal is sent to each controller (including controller C) at this time interval to detect the network status and the response speed of the controller more frequently. If the communication traffic of other controllers does not exceed the threshold, the initial time interval will be kept unchanged in step b4, and test pulse signals will be sent to them at a time interval of 1 second.

[0080] In the specific implementation, initialize the timer Timer, set the initial period as BasePeriod; if there is no data interaction within the BasePeriod time period, the host sends a random early or delayed test pulse with a certain probability; dynamically adjust the next broadcast period according to the network traffic, that is, ifnetworkFlow>ThresholdthenadjustBasePeriod*=βelsetain the original value; β<1 is the contraction coefficient. Monitor the online status of the MCUs in the current system. If the offline MCU fails to connect for more than three times, execute the re-pairing process or issue an alarm.

[0081] The data transmission method provided in this embodiment can dynamically respond to traffic changes by monitoring communication traffic in real time. When the traffic is too high, reducing the time interval can more effectively monitor the network status and promptly discover and solve potential communication bottlenecks or overload problems. In addition, by detecting and responding to the increase in communication traffic in advance, measures can be taken before network congestion occurs, thereby avoiding problems such as increased delays, packet loss, or reduced service quality caused by network congestion.

[0082] In a possible implementation, in the above step S102, according to the broadcast synchronization signal, the target controller is controlled to adjust the current time of the local clock of the target controller according to the broadcast synchronization signal and the time delay compensation parameter of the target controller to obtain the first target time of the local clock of the target controller, including:

[0083] Step c1, determining a second target time according to a broadcast synchronization signal.

[0084] The broadcast synchronization signal may represent a signal sent by a central node or a time server, which is used to synchronize the time of each controller or device in the network. The second target time may represent a time point determined according to the broadcast synchronization signal, as the time to which each controller or device should be synchronized. Specifically, the broadcast synchronization signal is received, and the time point information is extracted from it as the second target time.

[0085] Step c2: determining the difference between the second target time and the current time of the local clock of the target controller according to the time delay compensation parameter of the target controller.

[0086] The difference between the current time of the local clock of the target controller and the second target time is calculated. When calculating, the time delay compensation parameter needs to be considered to more accurately reflect the actual time deviation.

[0087] As an example, if the current time of the local clock of the target controller is 12:00:00, the second target time is 12:00:05, and the time delay compensation parameter is -1 second (indicating that the local clock is 1 second slower than the actual time), the difference is 4 seconds (12:00:05-12:00:00+1 second=12:00:06-12:00:00=6 seconds-2 seconds compensated delay=4 seconds actual difference, but here for simplified explanation, the compensation parameter adjustment calculation process is not directly applied, but is used to understand the factors to be considered when calculating the difference). However, in actual operation, the local clock is usually adjusted according to the compensation parameter first, and then the difference is calculated.

[0088] Step c3, detecting whether the difference exceeds a difference threshold.

[0089] Step c4, if the difference does not exceed the difference threshold, adjust the current time of the local clock to the second target time corresponding to the broadcast synchronization signal according to the time delay compensation parameter, obtain the adjusted current time, and use the adjusted current time as the first target time.

[0090] The calculated difference is compared with the preset difference threshold to determine whether the difference is within the acceptable range. When the difference does not exceed the threshold, it is considered that the local clock is close enough to the second target time, but it still needs to be fine-tuned according to the time delay compensation parameter to ensure the accuracy of synchronization. The adjusted time is used as the first target time for subsequent synchronization operations or as a reference time point.

[0091] As an example, if the current time of the local clock is 12:00:00, the second target time is 12:00:05, and the time delay compensation parameter is -1 second (network delay and other factors have been taken into account), the local clock is first adjusted forward by 1 second to 11:59:59, but because the second target time is 12:00:05, the local clock is finally adjusted to 12:00:04 (considering that the "actual" time after the compensation parameter should be 1 second faster than 11:59:59, but there is still a 1 second deviation from the second target time, here it is simplified to directly adjust to the point closest to the second target time but not exceeding it, and a more sophisticated adjustment algorithm may be used in actual operation). However, this statement is for explaining the concept, and the compensation parameter and the second target time should be directly applied to determine the final time during actual adjustment. A more accurate approach is to first adjust the local clock according to the compensation parameter to eliminate the known delay, and then compare the adjusted time with the second target time. If there is still a slight deviation and the deviation is within the acceptable range (i.e., it does not exceed the difference threshold), it may be chosen not to make further adjustments or to make fine adjustments. In this example, it is assumed that such an adjustment has been made and a result close enough to the second target time is obtained, and the result is used as the adjusted current time (ie, the first target time).

[0092] The data transmission method provided in this embodiment can broadcast a synchronization signal so that all controllers can receive a unified time reference, which helps to reduce the time asynchronization problem caused by the drift of each clock. By adjusting the local clock using the time delay compensation parameter, the time error can be further reduced and the time synchronization accuracy of the entire system can be improved.

[0093] At the same time, when the time difference between the local clock and the broadcast synchronization signal is within an acceptable range (ie, does not exceed the difference threshold), adjusting the local clock can ensure that the system continues to operate stably and avoid system failures or anomalies caused by time asynchrony.

[0094] In a possible implementation, the method further includes:

[0095] Step d1, receiving a calibration signal sent by a target controller.

[0096] The calibration signal may be a signal sent by the target controller to verify or calibrate the accuracy of its time synchronization. The signal may include timestamp information. Specifically, the central node or the server responsible for time synchronization receives the calibration signal from the target controller. The signal is actively sent by the target controller after the synchronization process is completed to verify the accuracy of its time synchronization.

[0097] As an example, after the synchronization process is completed, the target controller immediately sends a calibration signal including a current timestamp (ie, the first target time) to the central node.

[0098] Optionally, the calibration signal may also include other information, such as an identifier of the controller, synchronization status, etc., to help the central node perform more comprehensive verification.

[0099] Step d2: detecting whether the first target time of the target controller is accurate based on the calibration signal.

[0100] After receiving the calibration signal, the central node parses out the timestamp information (ie, the first target time) therein, and compares it with the second target time set in the broadcast synchronization signal to detect the time synchronization accuracy of the target controller.

[0101] As an example, the central node compares the first target time and the second target time, and if the two are exactly the same or the difference is within a preset error range, it is considered that the time synchronization of the target controller is accurate.

[0102] As an example, if the central node finds that there is a significant difference between the first target time and the second target time (outside a preset error range), further diagnosis or adjustment process may be triggered.

[0103] Step d3: If the first target time and the second target time of the target controller are the same, it is determined that the first target time of the target controller is accurate.

[0104] If, after comparison, the first target time of the target controller is completely identical to the second target time set in the broadcast synchronization signal, the central node determines that the time synchronization of the target controller is accurate.

[0105] Step d4: If the first target time and the second target time of the target controller are not the same, it is determined that the first target time of the target controller is inaccurate.

[0106] If, after comparison, the first target time of the target controller is different from the second target time set in the broadcast synchronization signal, the central node determines that the time synchronization of the target controller is inaccurate and may need to take further measures to correct the time deviation.

[0107] For example, there is a network system with multiple controllers, one of which participates in the time synchronization process as the target controller. The second target time set by the broadcast synchronization signal is 12:00:00. After receiving the synchronization signal and applying the time delay compensation parameters, the target controller sets its own first target time and then sends a calibration signal containing the timestamp to the central node. The central node receives and parses the calibration signal and finds that the first target time is 12:00:00, which is exactly the same as the second target time. Therefore, the central node determines that the time synchronization of the target controller is accurate and records the successful synchronization operation.

[0108] The data transmission method provided in this embodiment can accurately detect the time synchronization state of the target controller by comparing the first target time of the target controller with the second target time corresponding to the broadcast synchronization signal. When the two times are the same, it means that the time synchronization of the target controller is accurate; when the times are different, it indicates that there is a time asynchrony problem, and corresponding measures need to be taken to adjust.

[0109] At the same time, through regular calibration and testing, time asynchrony problems can be discovered and resolved in a timely manner, thereby enhancing the reliability and stability of the system and avoiding system failures or anomalies caused by time errors.

[0110] In a possible implementation, the above step S103 includes:

[0111] Step e1, detecting whether there is communication abnormality between multiple data transmission packets of the target controller.

[0112] Through network monitoring tools or algorithms, detect whether there are communication anomalies such as interruptions, delays or errors in the data transmission process of the target controller.

[0113] As an example, a network performance analysis tool is used to detect indicators such as the arrival time, packet size, and packet loss rate of data transmission packets of a target controller in real time to determine whether there is a communication anomaly.

[0114] As an example, by comparing the sequence numbers or timestamps of adjacent data transmission packets, it is detected whether there are communication anomalies such as data packet loss or disorder.

[0115] Step e2: if there is a communication anomaly between the multiple data transmission packets of the target controller, adjust the transmission time between the multiple data transmission packets so that the multiple data transmission packets are transmitted according to a preset time period.

[0116] When a communication anomaly is detected, the transmission interval or retransmission strategy of the data transmission packet is adjusted so that the data transmission packet can be stably transmitted according to the preset time period.

[0117] As an example, when a communication anomaly caused by network congestion is detected, the sending interval of the data transmission packet is increased to reduce the impact of the network congestion.

[0118] As an example, when packet loss is detected, a retransmission strategy is implemented and an appropriate delay is added when retransmitting to avoid collisions with subsequent packets.

[0119] Step e3, detecting the number of data transmission packets lost by the target controller.

[0120] Counts the number of data transmission packets that the target controller fails to receive successfully during the data transmission process.

[0121] Step e4: if the number of data transmission packets lost by the target controller is greater than the loss threshold, the parameters of the transmission channel of the target controller are adjusted to obtain target parameters.

[0122] When the number of lost data transmission packets exceeds a preset loss threshold, the transmission channel parameters (such as transmission rate, modulation mode, encoding mode, etc.) of the target controller are adjusted to optimize data transmission performance.

[0123] Step e5, executing the transmission of other data transmission packets according to the target parameters, so as to transmit data between various controllers.

[0124] After adjusting the transmission channel parameters, subsequent data transmission packets are transmitted according to the new parameter settings to ensure stable and efficient data transmission between the various controllers.

[0125] In specific implementation, when it is detected that the interval between two consecutive data packets is less than MinGap, the possibility of conflict is reduced by introducing a random waiting time randDelay; each time a complete transaction processing TaskComplete is successfully completed, the performance indicator table PerformanceTable is updated; if the accumulated number of lost packets LostPackets exceeds the tolerance LossLimit, the channel parameters or retransmission mechanism strategy are adjusted; the performance of all completed optimization processes is evaluated and the subsequent level of optimization intensity or mode is determined.

[0126] In a possible implementation, each MCU performs a data transmission protocol optimization process according to the adjusted synchronization state, specifically: when it is detected that the interval between two consecutive data packets is less than MinGap, the possibility of conflict is reduced by introducing a random waiting time randDelay; each time a complete transaction processing TaskComplete is successfully completed, the performance indicator table PerformanceTable is updated; if the accumulated number of lost packets LostPackets exceeds the tolerance LossLimit, the channel parameters or retransmission mechanism strategy are adjusted;

[0127] Evaluate the performance of all optimized processes and decide what level of optimization intensity or mode to adopt in the future; According to one embodiment, the preset synchronization calibration mechanism specifically includes the following steps: define the synchronization reference SourceSyncClock originating from the host and serving as the reference clock for the entire system; determine the expected minimum and maximum allowable offsets MinShift and MaxShift between each device; calculate the relative offset δ t (Current moment) whether MinShift≤δ is satisfied t (DeviceID)≤MaxShift; Execute a snapshot to read all associated state variables SnapshotVars for all active MCUs at hand;

[0128] More specifically, the snapshot reading steps are further refined into the following:

[0129] Lock the bus to prevent data from being tampered with during external access, using the lock flag BusLock;

[0130] Search for each known target MCU address Adresses and start the polling mechanism to collect the necessary operation information PollInfo (AddrList);

[0131] If PollingFailRate exceeds the limit (> FailThreshold), increase redundancy to improve collection accuracy Redundance++;

[0132] Finally, a dataset RecordDataSet containing timestamps and attributes of each node is formed as the basis for the next step;

[0133] The implementation method for finally forming a data set containing timestamps and attributes of each node is as follows:

[0134] Assign a unique increasing serial number SN+=1 to each snapshot for subsequent sorting and comparison;

[0135] Add the environmental factor tag EnvTag to describe the characteristics of the working environment at that time, such as additional variables such as temperature and humidity;

[0136] Scan and check if there is a vacancy in the formed dataset FieldVoidCheck&&!isPresent();

[0137] Before saving to the database, the consistency needs to be verified again using ValidationCheck(recordData) to ensure complete and reliable data input;

[0138] According to one embodiment, when executing the consistency verification step before saving to the database, the following actions are specifically involved:

[0139] Get the latest version hash value HashLatest and compare it with the newly calculated NewHashValue of the record hash to be saved. Only when they are consistent can the save be allowed to continue;

[0140] Whether to activate the DeepVerifyFlag control switch according to the configuration settings, and the shallow verification ShallowVerify is sufficient by default;

[0141] If inconsistency occurs and deepverifytrue, the difference details DetailDiffReport will be recorded for subsequent analysis;

[0142] Only when all the above conditions are met will the actual data persistence operation PersistentCommit (recordDataToDB) be performed to ensure data stability and consistency;

[0143] According to one embodiment, before ensuring the stability and consistency of data, the following prerequisites must be met:

[0144] Confirm again that the data to be stored does not have the risk of dirty reads or lost updates.

[0145] Check whether the scope of influence ChangeScope before and after the current transaction is committed has any overlapped parts to prevent the occurrence of double calculation;

[0146] Verify whether the transaction isolation level TransactionIsolation meets the required serialization requirements and is above the Serializablelevel standard;

[0147] After completing the above checks and meeting all requirements, the final submission action FinalizeWrite(recordDataSet) is initiated to ensure that each singleton operation is atomic;

[0148] Before final submission, ensuring all data stability and consistency checks have been completed, this should also include:

[0149] Run the pre-write simulation test PredictiveInsertTest to predict the change trend of space allocation and link resource utilization that may be caused by the write operation;

[0150] Enable the backup policy SnapshotPolicy to keep a copy in a remote location to ensure disaster recovery capabilities and improve business continuity;

[0151] Generate a detailed change log LogOfChanges, detailing the specific matters involved in this change and the impact assessment ImpactAnalysis;

[0152] Once a potential risk RiskIndicator is found, the early warning system AlarmModule will be automatically called to notify the management personnel to take action in time.

[0153] The data transmission method provided in this embodiment can timely discover and solve potential transmission problems by detecting communication anomalies between data transmission packets, thereby ensuring the integrity and accuracy of the data. Adjusting the transmission time between data transmission packets can avoid data loss or delay caused by transmission conflicts or congestion, and further improve the reliability of data transmission. In addition, when it is detected that the number of data transmission packets lost by the target controller exceeds the loss threshold, the parameters of the transmission channel are adjusted to optimize the transmission efficiency and stability of the channel. By adjusting channel parameters such as frequency, bandwidth, modulation mode, etc., the transmission quality of the signal can be improved, and the influence of interference and noise can be reduced, thereby improving the rate and stability of data transmission.

[0154] In a possible implementation, the data transmission method of the present invention includes the following steps, aiming to solve the problem of inconsistent synchronous communication delays among multiple MCUs and ensure the optimization and efficiency of the data transmission protocol.

[0155] 1. Determination of time delay compensation parameters: First, the time delay compensation parameters of each MCU are determined based on the preset synchronization calibration mechanism. This stage is the basic step to achieve subsequent precise synchronization. In actual situations, due to the influence of multiple factors such as network environment, hardware conditions, signal strength, etc., different MCUs will produce different time differences when receiving the same signal. In order to eliminate the interference caused by this difference and accurately calibrate these time gaps, this method designs a specific algorithm to calculate the time delay value of each MCU without changing the existing communication protocol, providing a reliable reference for the subsequent data transmission process.

[0156] 2. Broadcast synchronization signal: After obtaining the time difference between all MCUs participating in the communication and the main device (i.e., the host in this method), the synchronization signal is periodically issued. At this time, the central control unit in the system, the host, continuously transmits the standard time reference signal to each connected slave unit (each MCU) according to the set frequency. The purpose of this operation is to maintain a stable and continuous time reference, so that each node works under the same timing, and ensure the accuracy and timeliness of data transmission in the entire network.

[0157] 3. Adjust the local clock synchronization status: The next stage is to let each MCU that receives the standard time scale adjust its system clock settings according to its corresponding time delay, so as to achieve the purpose of calibrating the clock deviation of all subsystems. This means that even if they have differences in geographical location or link characteristics, they can coordinate and operate as if they are in the same time and space at the information exchange level, which is a key measure to improve synchronization quality.

[0158] 4. Optimized execution of data transmission protocol: After the above steps, the system has established an effective synchronization system framework. What needs to be done in the end is to guide these MCUs that have been successfully aligned to the same pace to implement their respective tasks according to the optimal strategy. According to the characteristics of data volume, type and purpose, choose the appropriate information processing method, and reasonably allocate resources, plan priorities, control traffic and other factors to ensure that the content transmitted on each channel is fast and accurate while achieving the most economical operating cost; at the same time, make feedback adjustments in real time by continuously monitoring the current working status.

[0159] More specifically, first, the time delay compensation parameters of each MCU are determined based on the preset synchronization calibration mechanism. The key to this stage is to ensure that all MCUs can achieve high-precision synchronization between their local clocks and the host's clock, and accurately quantify the propagation delay difference between them. Specifically, a timestamp protocol (such as Precision Time Protocol, PTP) can be used to implement this function. PTP can transmit very accurate time information on the network, allowing each node to perform adaptive clock correction by measuring the message round-trip time. In actual implementation, the host sends a time packet containing its current system timestamp to each MCU. When these packets arrive at different MCUs, each MCU immediately returns confirmation information to the host, and attaches the exact time point when they received the original packet as the local reception timestamp. The host p calculates the network round-trip time of each MCU based on the sending time and the return time information recorded by itself, and uses this as half of the delay reference value to derive the inherent one-way propagation delay of each device as the time delay compensation parameter unique to the MCU. For example, assuming there are three MCUs A, B, and C, after initializing the communication, the host will find the different times it takes for the synchronization command to reach each terminal and then be confirmed and replied, and then calculate and set the corresponding adjustment factor for subsequent data communication.

[0160] Next, the second step is to periodically send synchronization pulses or signals to all multiple MCU units subordinate to it according to a predetermined cycle. This timing helps maintain a unified time reference system to support continuous and stable coordinated operations. Generally speaking, the host can use a fixed interval (such as once per second or less) to spread the broadcast message containing the latest time scale identification code at that time through a high-speed and stable physical channel. It is worth noting that the predetermined period here should be carefully considered: it should not be too fast to avoid wasting processing resources and bandwidth, nor should it be too sparse to affect synchronization accuracy and instant response capabilities. For example, in a specific IoT application environment, in the factory automation production line monitoring scenario, considering that the robot's motion accuracy needs to be maintained at a high level and there are strict requirements for real-time performance, it can be selected to perform such a global reset activity twice per second to ensure that even if individual abnormal jumps occur, the normal rhythm can be quickly returned to the pace.

[0161] Next is the third part - updating its internal working parameters based on the knowledge obtained in the previous step. In other words, all slaves will use the specific values ​​obtained from the previous analysis to revise their own working rhythm. To facilitate the explanation of this problem, let's focus on this multi-sensor acquisition architecture: Assume that there are dozens or even hundreds of different types of sensor components distributed on site, each of which is equipped with a dedicated MCU to collect specific types of sensor data and transmit it back to the central data center. If these small but not negligible differences are ignored and indiscriminate synchronization is performed directly, it will inevitably cause error drift problems and eventually lead to the failure of the overall system. Therefore, once the expected value of the propagation delay between each node is obtained through precise measurement, the internal timing management module of each associated MCU can be fine-tuned based on this result so that it can correctly reflect the current optimal relative position relationship. In this way, even sensors that are far apart and geographically different can complete the same instruction operation task at a nearly consistent speed, which improves the efficiency of cooperation and also enhances the reliability level.

[0162] Finally, it is the construction link of the optimized data transmission rule system. The core concept here is to establish a highly ordered and mutually compatible data interaction mode based on the established timeline. In simple terms, it is a specially designed data exchange process planning scheme to solve the problem of communication delay uncertainty between multiple MCUs under the premise of the above series of efforts; it covers common elements such as frame synchronization header definition and error detection coding addition, and also includes a complete set of feedback confirmation and automatic retry supplementary strategies to minimize the frequency of random interruptions caused by link quality problems to ensure high-efficiency operation. For example, in a smart home control system, the smart appliance controllers in each room work independently but must work together to achieve substantial overall control. When a user triggers a global switch request to change the state of a group of lights, if the timing arrangement between all sub-units is not ensured in advance, some devices may not be able to respond or act too late. In order to avoid this situation, all relevant MCUs must first be adjusted to the same channel through the above synchronization correction process and then jointly comply with the pre-agreed communication protocol for information transmission. This not only overcomes the natural time difference caused by distance, but more importantly, greatly improves the accuracy and consistency of command issuance, making the final home experience smoother and more comfortable. In summary, through this series of rigorous technical means, we can effectively ensure that even in a more complex network topology environment, we can still accurately and accurately and in real time exchange various valuable information between many distributed units safely and smoothly.

[0163] Next, in order to make the content more logical and coherent, each step will be defined and supplemented in a step-by-step manner.

[0164] First, the first step of the method for transmitting data between a host and multiple MCUs is defined in detail. At this stage, it involves determining the time delay compensation parameters of each MCU based on a preset synchronization calibration mechanism. This operation is completed by measuring the feedback time Δti of the MCU after receiving the broadcast signal. For example, in one embodiment, if the response delay time of MCU1 exceeds the threshold T, timeDelayCompensationi=α*(Δti-Δt_ave) is set, where α is an adjustable proportional factor, usually between 0.5 and 1 to ensure moderate compensation accuracy, and Δt_ave represents the average delay. If the delay is within an acceptable range, timeDelayCompensationi is set to 0. In addition, it is necessary to ensure that all communications are smooth. If there is an unsuccessful connection attempt, the error code Error1 is returned, and the time delay compensation value is recorded in the corresponding MCU and system log to ensure that subsequent operations are traceable and controllable.

[0165] Secondly, the description of the second specific step focuses on how to send synchronization signals from the master device to all subordinate MCUs according to a predetermined period. This step initially sets a timer Timer and defines its basic interval as BasePeriod, which usually ranges from a few milliseconds to hundreds of milliseconds and is optimized according to network conditions. When there is no data transmission for a period of time, a random test pulse can be sent with a certain probability to check the link quality. If the detected data traffic exceeds a preset limit Threshold, the next sending cycle is adjusted to adapt to the changing needs. For example, the size of the current cycle can be shrunk, and the BasePeriod can be reduced using a scaling factor β (generally less than 1); at the same time, the online status of each MCU is continuously monitored. If the offline MCU cannot be restored online after multiple retries, an alarm is triggered or an attempt is made to re-pair.

[0166] The third specific step is to describe the MCU's adjustment of local clock synchronization based on the calculated time delay compensation parameters. In this step, the MCU saves the time difference TimeOffset from the previous step to adjust its own clock tick count SystemTick. Specifically,

[0167] AdjustedTick=SystemTick+TimeOffset as the new clock reference. This step ensures that the MCU can remain consistent with the clock source even in the face of inevitable time difference fluctuations. In the case of significant deviation from the normal range |Counter-TimeOffset|>MaxDifference, it will be immediately reported to the host to indicate a synchronization problem. Each successful synchronization status will be fed back to the central controller for monitoring, and once SynchronizationStatus==Unsuccessful is encountered, a reset process is initiated to quickly restore normal operation order.

[0168] Next, we will explore in depth a series of optimization measures applied in the data packet transmission process. In this section, the method includes introducing a random wait randDelay to avoid excessive collision probability between two adjacent messages. Whenever a complete transaction ends and the task processing is completed TaskComplete, the performance evaluation module automatically updates the key indicators in the internal statistics PerformanceTable to prepare for subsequent evaluation. In addition, when it is detected that the accumulated number of lost packets LostPackets exceeds the allowable upper limit LossLimit, the channel parameters will be dynamically adjusted or the retransmission mechanism will be strengthened, ultimately maximizing the communication efficiency of the entire system. A comprehensive performance evaluation of the optimization process can also help identify whether further improvements or maintenance of existing solutions are needed, thereby determining the direction and intensity of future optimization.

[0169] Going deeper, we return to the initial preliminary step, which is to define the overall synchronization mechanism of the system and the related parameter configuration. In this process, the maximum and minimum offset limits MinShift and MaxShift allowed between each device are specified. For example, in a specific application scenario, it is assumed that the minimum allowable difference is set to 1 microsecond to ensure close coordination; the maximum tolerance is set to 300 microseconds to prevent excessive deviations from damaging the synergy. It is then necessary to calculate the real-time relative offset at each time point δt (DeviceID) and verify whether it is within the expected range MinShift≤δt≤MaxShift to ensure that all MCUs follow the same time base reference.

[0170] Let's go deeper into the detailed description of the snapshot reading process. One of the key points here is the control of the bus lock mechanism BusLock to ensure that there is no risk of tampering during data collection. The system uses known address Adresses to poll PollInfo (AddrList), access each associated node in turn to obtain the latest runtime information, and enhance redundancy Redundance according to actual conditions to compensate for errors caused by potential errors, especially when the query failure rate PollingFailRate exceeds FailThreshold.

[0171] The final step is to construct a data record set containing complete time and status attributes. To this end, a unique index number is assigned to each acquired snapshot data with a separately incremented sequence identifier SN, and an information tag EnvTag describing the physical characteristics of the working environment (such as temperature, humidity, etc.) is added to improve the effectiveness and accuracy of the data for future analysis. Then check whether there is an empty field FieldVoidCheck&!isPresent() phenomenon in the constructed data set, and use the final consistency check VerificationCheck(RecordDataSet) to maintain data integrity to meet the requirements of the final check before storage.

[0172] Finally, it is refined to multiple prerequisites that need to be met before consistency verification. Only after ensuring that the data to be written does not have any risks such as dirty reads, duplicate submissions, or violations of the necessary transaction isolation standards TransactionalIsolationLevel = SerializableLevel, can the actual execution of the save command PersistentCommit() action be allowed.

[0173] On the basis of the detailed specific operations mentioned above, more inspection measures will be added. For example, the predictive simulation PredictiveInsertTest is rehearsed to understand the possible storage needs and their consequences in advance; the snapshot archive backup strategy SnapshotPolicy is adopted to improve emergency response capabilities and ensure high availability and fault tolerance and recovery. In addition, a detailed change record log LogOfChanges is created, covering the comparison before and after the modification and the comprehensive analysis ImpactAnalysis of the expected impact; and a complete alarm system is established. When any potential threat RiskIndicator emerges, the alarm AlarmModule will respond immediately to guide users to make correct response decisions.

[0174] The data transmission method provided in this embodiment integrates both software and hardware considerations. Not only does it use scientific algorithms to solve the objective and influential physical time delay obstacle, but it also improves overall work efficiency by optimizing the configuration of the data transmission protocol at the software level. Specifically, it enables all participants to share the concept of the same moment by quantifying and solving potential asynchrony risks in advance, and interaction on this basis will not be slowed down by waiting; in addition, under the premise of clear rules, parameters are dynamically adjusted to ensure that the service quality remains stable and reliable at a high level.

[0175] In this embodiment, a data transmission device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0176] This embodiment provides a data transmission device, such as Figure 2 As shown, it includes: a determination module 201, used to determine the time delay compensation parameters of each controller according to a preset synchronization calibration mechanism; an adjustment module 202, used to send a broadcast synchronization signal to each controller, and control the target controller according to the broadcast synchronization signal; according to the broadcast synchronization signal, the current time of the local clock of the target controller is adjusted according to the broadcast synchronization signal and the time delay compensation parameters of the target controller to obtain the first target time of the local clock of the target controller; wherein the target controller is any one of each controller; a data transmission module 203, used to realize data transmission between each controller according to the first target time of the local clock of the target controller.

[0177] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0178] The data transmission device in this embodiment is presented in the form of a functional unit, where the functional unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0179] The embodiment of the present invention also provides a computer device having the above Figure 2 The data transmission device shown.

[0180] See also Figure 3 , Figure 3 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 3 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 3 A processor 10 is taken as an example.

[0181] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0182] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0183] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0184] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0185] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0186] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0187] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0188] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A data transmission method, characterized in that: The method comprises: Determine the time delay compensation parameters of each controller according to a preset synchronization calibration mechanism; Sending a broadcast synchronization signal to each of the controllers, and controlling the target controller according to the broadcast synchronization signal to adjust the current time of the local clock of the target controller according to the broadcast synchronization signal and the time delay compensation parameter of the target controller to obtain a first target time of the local clock of the target controller; wherein the target controller is any one of the controllers; Data transmission between the controllers is achieved according to the first target time of the local clock of the target controller.

2. The data transmission method according to claim 1, characterized in that: Determine the preset synchronization calibration mechanism, including: Get the response delay time of each controller; Detect whether the response delay time of the target controller exceeds the delay time threshold; If the response delay time of the target controller exceeds the delay time threshold, determining a time delay compensation parameter of the target controller according to an average value of the response delay time of each controller; A preset synchronization calibration mechanism is determined according to the time delay compensation parameter of the target controller.

3. The data transmission method according to claim 1, characterized in that: The sending a broadcast synchronization signal to each of the controllers comprises: Get the communication traffic of each controller; Detecting whether the communication flow exceeds a flow threshold; If the communication flow exceeds the flow threshold, the initial time interval is reduced to obtain a target time interval, and a test pulse signal is sent to each controller according to the target time; If the communication flow does not exceed the flow threshold, a test pulse signal is sent to each controller according to an initial time interval.

4. The data transmission method according to claim 1, characterized in that: The step of controlling the target controller according to the broadcast synchronization signal to adjust the current time of the local clock of the target controller according to the broadcast synchronization signal and the time delay compensation parameter of the target controller to obtain a first target time of the local clock of the target controller includes: determining a second target time according to the broadcast synchronization signal; determining, according to a time delay compensation parameter of the target controller, a difference between the second target time and a current time of a local clock of the target controller; Detecting whether the difference exceeds a difference threshold; If the difference does not exceed the difference threshold, the current time of the local clock is adjusted to the second target time corresponding to the broadcast synchronization signal according to the time delay compensation parameter to obtain the adjusted current time, and the adjusted current time is used as the first target time.

5. The data transmission method according to claim 4, characterized in that: The method further comprises: receiving a calibration signal sent by a target controller; detecting whether a first target time of the target controller is accurate based on the calibration signal; If the first target time of the target controller is the same as the second target time, then determining that the first target time of the target controller is accurate; If the first target time of the target controller is different from the second target time, it is determined that the first target time of the target controller is inaccurate.

6. The data transmission method according to claim 1, characterized in that: According to the first target time of the local clock of the target controller, data transmission between the controllers is realized, including: Detect whether there is communication anomaly between multiple data transmission packets of the target controller; If there is a communication anomaly between the multiple data transmission packets of the target controller, adjusting the transmission time between the multiple data transmission packets so that the multiple data transmission packets are transmitted according to a preset time period; Detect the number of data transmission packets lost by the target controller; If the number of data transmission packets lost by the target controller is greater than a loss threshold, adjusting the parameters of the transmission channel of the target controller to obtain target parameters; The transmission of other data transmission packets is performed according to the target parameters to transmit data between the controllers.

7. A data transmission device, characterized in that: The device comprises: A determination module, used to determine the time delay compensation parameters of each controller according to a preset synchronization calibration mechanism; an adjustment module, configured to send a broadcast synchronization signal to each of the controllers, and control the target controller according to the broadcast synchronization signal to adjust the current time of the local clock of the target controller according to the broadcast synchronization signal and the time delay compensation parameter of the target controller to obtain a first target time of the local clock of the target controller; wherein the target controller is any one of the controllers; The data transmission module is used to realize data transmission between various controllers according to the first target time of the local clock of the target controller.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data transmission method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data transmission method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the data transmission method according to any one of claims 1 to 6.