Data transmission method, device and related equipment
Through link training and timer synchronization, the master node transmits instructions including the effective time to the slave node, which solves the problem of unstable instruction execution delay from slave nodes in the communication system and realizes the synchronous execution of multiple slave nodes.
Patent Information
- Application Number
- CN202210651666.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-28
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-12-28
AI Technical Summary
In a communication system, variable delays may occur when a master node transmits instructions to multiple slave nodes, causing jitter in the execution of instructions by the slave nodes, which in turn causes multiple slave nodes to be unable to execute instructions synchronously.
By performing link training between the master node and the slave node, the timer is obtained and synchronized. When the master node sends a preset instruction, it includes the instruction effective time, which is greater than or equal to the sum of the instruction sending time and the maximum link delay. Ensure that the slave node executes the instruction from the timing to the moment when the instruction takes effect to avoid jitter.
It realizes that when the master node transmits instructions to multiple slave nodes with no fixed delay, it ensures that the slave nodes execute instructions simultaneously, avoids the jitter of instruction execution, and ensures the synchronous execution of multiple slave nodes.
Smart Images

Figure CN115396056B_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202080004787.2, and the original application date is December 28, 2020. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a data transmission method, device and related equipment. Background Art
[0003] In a communication system, multiple devices communicate with each other. The master node (instruction sender) sometimes expects multiple slave nodes (instruction receivers) to synchronously execute the instructions it sends at a certain time to obtain data obtained by multiple slave nodes at the same time, such as a multi-domain controller (MDC) in an in-vehicle communication network that controls multiple cameras to take photos synchronously.
[0004] At present, when the master node sends instructions to each slave node, the master node usually divides the instructions to be sent into multiple data blocks with a fixed order and transmits them to the slave nodes. In the process of transmitting multiple data blocks to each slave node, some data block transmission errors may occur. For example, after the master node has sent data 2, when it should send data block 3, it sends data block 4 instead, and omits the sending of data block 3. In the case of data block transmission errors, the master node will reschedule the transmission of the erroneous data block, which usually causes an unfixed delay in the transmission of the instruction, thereby causing jitters in the execution time of each slave node. In the case that the execution time of some or all of the multiple slave nodes is jittered, the multiple slave nodes will have the problem of being unable to synchronize the execution time of the instructions.
[0005] Therefore, how to synchronize the execution of instructions by multiple slave nodes when there is an unfixed delay in transmitting instructions from the master node to multiple slave nodes is a problem that needs to be solved. Summary of the invention
[0006] The embodiments of the present application provide a data transmission method, apparatus and related equipment to achieve synchronization of the execution time of multiple slave nodes when a master node transmits instructions to multiple slave nodes and there is an irregular delay.
[0007] In a first aspect, a data transmission method is provided, the method being applied to a master node, comprising:
[0008] The master node sends a first synchronization time;
[0009] The first synchronization time is used to synchronize the first slave node timer with the master node timer;
[0010] The master node sends a first preset instruction;
[0011] Among them, the first preset instruction includes a first instruction effective time, and the first instruction effective time is used to indicate the time when the first slave node executes the first preset instruction. The first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the first link is the link between the master node and the first slave node.
[0012] In the above scheme, the master node sends a first synchronization moment to the first slave node, instructing the first slave node to synchronize the first slave node timer with the master node timer according to the first synchronization moment. When the two timers are synchronized, the master node sends a first preset instruction including the first instruction effective moment (the first instruction effective moment includes the maximum delay of the first link) to the first slave node, so that the first slave node executes the first preset instruction when the timing reaches the first instruction effective moment, thereby avoiding jitter in the moment when the first slave node executes the instruction sent by the master node when there is an irregular delay in transmitting instructions from the master node to the first slave node.
[0013] In a possible implementation, the method further includes:
[0014] The master node sends a second synchronization time;
[0015] The second synchronization time is used to synchronize the second slave node timer with the master node timer;
[0016] The master node sends a second preset instruction;
[0017] Among them, the second preset instruction includes the second instruction effective time, the second instruction effective time is used to indicate the time when the second slave node executes the second preset instruction, the second instruction effective time is greater than or equal to the sum of the sending time of the second preset instruction and the maximum delay of the second link, the second instruction effective time is the same as the first instruction effective time, and the second link is the link between the master node and the second slave node.
[0018] In the above scheme, the master node sends a second synchronization moment to the second slave node, instructing the second slave node to synchronize the second slave node timer with the master node timer according to the second synchronization moment. When the two timers are synchronized, the master node sends a second preset instruction including the second instruction effective moment (the second instruction effective moment includes the maximum delay of the second link) to the second slave node, so that the second slave node executes the second preset instruction when the timing reaches the second instruction effective moment. Since the second instruction effective moment and the first instruction effective moment are the same moment, the moment when the second slave node executes the second preset instruction and the moment when the first slave node executes the first preset instruction can be synchronized.
[0019] In a possible implementation, the method further includes:
[0020] The first slave node sends a third synchronization time to the second slave node;
[0021] The third synchronization time is used to achieve synchronization between the second slave node timer and the first slave node timer;
[0022] The master node sends a second preset instruction;
[0023] The first slave node forwards the second preset instruction to the second slave node;
[0024] Among them, the second preset instruction includes the second instruction effective time, the second instruction effective time is used to indicate the time when the second slave node executes the second preset instruction, the second instruction effective time is greater than or equal to the time when the master node sends the second preset instruction to the first slave node, the maximum delay of the first link and the maximum delay of the third link, the second instruction effective time is the same as the first instruction effective time, and the third link is the link between the first slave node and the second slave node.
[0025] In the above scheme, when the second slave node timer is synchronized with the first slave node timer, the master node sends the second preset instruction including the second instruction effective time (the second instruction effective time includes the maximum delay of the second link) to the first slave node, and the first slave node forwards the second preset instruction to the second slave node, so that the second slave node executes the second preset instruction when the timing reaches the second instruction effective time. Since the second instruction effective time and the first instruction effective time are the same time, the time when the second slave node executes the second preset instruction and the time when the first slave node executes the first preset instruction can be synchronized.
[0026] In one possible implementation, the first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
[0027] When the first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture, the above scheme can realize the synchronous picture taking of the first slave node and the second slave node; when the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display, the above scheme can realize the synchronous display of the first slave node and the second slave node.
[0028] In a second aspect, a data transmission method is provided, the method being applied to a slave node, comprising:
[0029] The first slave node receives a first synchronization time;
[0030] The first synchronization time is used to synchronize the first slave node timer with the master node timer;
[0031] The first slave node receives a first preset instruction;
[0032] The first preset instruction includes a first instruction effective time, the first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the first link is a link between the first slave node and the master node;
[0033] The first slave node executes the first preset instruction when the first instruction takes effect.
[0034] In a possible implementation, the method further includes:
[0035] The second slave node receives a second synchronization time;
[0036] The second synchronization time is used to synchronize the second slave node timer with the master node timer;
[0037] The second slave node receives a second preset instruction;
[0038] The second preset instruction includes a second instruction effective time, the second instruction effective time is greater than or equal to the sum of the sending time of the second preset instruction and the maximum delay of the second link, the second instruction effective time is the same as the first instruction effective time, and the second link is a link between the master node and the second slave node;
[0039] The second slave node executes the second preset instruction when the second instruction takes effect.
[0040] In a possible implementation, the method further includes:
[0041] The first slave node sends a third synchronization time to the second slave node;
[0042] The third synchronization time is used to achieve synchronization between the second slave node timer and the first slave node timer;
[0043] The first slave node sends a second preset instruction to the second slave node;
[0044] Among them, the second preset instruction includes the second instruction effective time, the second instruction effective time is used to indicate the time when the second slave node executes the second preset instruction, the second instruction effective time is greater than or equal to the sum of the time when the first slave node sends the second preset instruction to the second slave node and the maximum delay of the third link, the second instruction effective time is the same as the first instruction effective time, and the third link is the link between the first slave node and the second slave node.
[0045] In a possible implementation manner, the second preset instruction is generated by the master node or by the first slave node.
[0046] In one possible implementation, the first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
[0047] In a third aspect, a data transmission method is provided, the method being applied to a data transmission system, the data transmission system comprising a master node and a first slave node, the method comprising:
[0048] The master node sends a first synchronization time to the first slave node;
[0049] The first synchronization time is used to synchronize the first slave node timer with the master node timer;
[0050] The master node sends a first preset instruction to the first slave node;
[0051] The first preset instruction includes a first instruction effective time, the first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the first link is the link between the master node and the first slave node;
[0052] The first slave node executes the first preset instruction when the first instruction takes effect.
[0053] In a possible implementation, the data transmission system further includes a second slave node, and the method further includes: the master node sending a second synchronization time to the second slave node;
[0054] The second synchronization time is used to synchronize the second slave node timer with the master node timer;
[0055] The master node sends a second preset instruction to the second slave node;
[0056] The second preset instruction includes a second instruction effective time, the second instruction effective time is greater than or equal to the sum of the sending time of the second preset instruction and the maximum delay of the second link, the second instruction effective time and the first instruction effective time are the same time, and the second link is a link between the master node and the second slave node;
[0057] The second slave node executes the second preset instruction when the second instruction takes effect.
[0058] In a possible implementation manner, the data transmission system further includes a second slave node, and the method further includes:
[0059] The first slave node sends a third synchronization time to the second slave node;
[0060] The third synchronization time is used to achieve synchronization between the second slave node timer and the first slave node timer;
[0061] The first slave node sends a second preset instruction to the second slave node;
[0062] The second preset instruction includes a second instruction effective time, the second instruction effective time is greater than or equal to the sum of the time when the first slave node sends the second preset instruction to the second slave node and the maximum delay of the third link, the second instruction effective time is the same as the first instruction effective time, and the third link is a link between the first slave node and the second slave node;
[0063] The second slave node executes the second preset instruction when the second instruction takes effect.
[0064] In a possible implementation manner, the second preset instruction is generated by the master node or by the first slave node.
[0065] In one possible implementation, the first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
[0066] In a fourth aspect, a data transmission method is provided, the method being applied to a master node, comprising:
[0067] The master node receives a fourth synchronization time;
[0068] The fourth synchronization time is used to achieve synchronization between the master node timer and the first slave node timer;
[0069] The master node sends a first preset instruction;
[0070] Among them, the first preset instruction includes a first instruction effective time, and the first instruction effective time is used to indicate the time when the first slave node executes the first preset instruction. The first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the first link is the link between the master node and the first slave node.
[0071] In the above scheme, the master node receives the fourth synchronization moment sent by the slave node, and synchronizes the master node timer with the slave node timer according to the fourth synchronization moment. When the two timers are synchronized, the master node sends the first preset instruction including the effective moment of the first instruction to the first slave node, so that the first slave node executes the first preset instruction when the timing reaches the effective moment of the first instruction, thereby avoiding the jitter of the moment when the first slave node executes the instruction sent by the master node when there is an unfixed delay in transmitting instructions from the master node to the first slave node.
[0072] In a possible implementation, the method further includes:
[0073] The first slave node sends a third synchronization time to the second slave node;
[0074] The third synchronization time is used to achieve synchronization between the second slave node timer and the first slave node timer;
[0075] The master node sends a second preset instruction;
[0076] The first slave node forwards the second preset instruction to the second slave node;
[0077] Among them, the second preset instruction includes the second instruction effective time, the second instruction effective time is used to indicate the time when the second slave node executes the second preset instruction, the second instruction effective time is greater than or equal to the time when the master node sends the second preset instruction to the first slave node, the maximum delay of the first link and the maximum delay of the third link, the second instruction effective time is the same as the first instruction effective time, and the third link is the link between the first slave node and the second slave node.
[0078] In one possible implementation, the first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
[0079] In a fifth aspect, a data transmission method is provided, the method being applied to a slave node, comprising:
[0080] The first slave node sends a fourth synchronization time;
[0081] The fourth synchronization time is used to achieve synchronization between the master node timer and the first slave node timer;
[0082] The first slave node receives a first preset instruction;
[0083] The first preset instruction includes a first instruction effective time, the first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the first link is a link between the first slave node and the master node;
[0084] The first slave node executes the first preset instruction when the first instruction takes effect.
[0085] In a possible implementation, the method further includes:
[0086] The first slave node sends a third synchronization time to the second slave node;
[0087] The third synchronization time is used to achieve synchronization between the second slave node timer and the first slave node timer;
[0088] The first slave node sends a second preset instruction to the second slave node;
[0089] Among them, the second preset instruction includes the second instruction effective time, the second instruction effective time is used to indicate the time when the second slave node executes the second preset instruction, the second instruction effective time is greater than or equal to the sum of the time when the first slave node sends the second preset instruction to the second slave node and the maximum delay of the third link, the second instruction effective time is the same as the first instruction effective time, and the third link is the link between the first slave node and the second slave node.
[0090] In a possible implementation manner, the second preset instruction is generated by the master node or by the first slave node.
[0091] In one possible implementation, the first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
[0092] In a sixth aspect, a data transmission method is provided, the method being applied to a data transmission system, the data transmission system comprising a master node and a first slave node, the method comprising:
[0093] The first slave node sends a fourth synchronization time to the master node; the fourth synchronization time is used to synchronize the master node timer with the first slave node timer;
[0094] The master node sends a first preset instruction to the first slave node;
[0095] The first preset instruction includes a first instruction effective time, the first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the first link is the link between the master node and the first slave node;
[0096] The first slave node executes the first preset instruction when the first instruction takes effect.
[0097] In a possible implementation manner, the data transmission system further includes a second slave node, and the method further includes:
[0098] The first slave node sends a third synchronization time to the second slave node;
[0099] The third synchronization time is used to achieve synchronization between the second slave node timer and the first slave node timer;
[0100] The first slave node sends a second preset instruction to the second slave node;
[0101] The second preset instruction includes a second instruction effective time, the second instruction effective time is greater than or equal to the sum of the time when the first slave node sends the second preset instruction to the second slave node and the maximum delay of the third link, the second instruction effective time is the same as the first instruction effective time, and the third link is a link between the first slave node and the second slave node;
[0102] The second slave node executes the second preset instruction when the second instruction takes effect.
[0103] In a possible implementation manner, the second preset instruction is generated by the master node or by the first slave node.
[0104] In one possible implementation, the first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
[0105] In a seventh aspect, a data transmission method is provided, the method being applied to a master node, comprising:
[0106] The master node obtains a first timing difference and sends the first timing difference;
[0107] The first timing difference is used to achieve synchronization between a first slave node timer and a master node timer, the first timing difference is a timing difference between the master node timer and the first slave node timer when first link training is completed, and the first link is a link between the master node and the first slave node;
[0108] The master node sends a first preset instruction;
[0109] Among them, the first preset instruction includes a first instruction effective time, and the first instruction effective time is used to indicate the time when the first slave node executes the first preset instruction, and the first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link.
[0110] In the above scheme, the master node sends a first timing difference to the first slave node, instructing the first slave node to synchronize the first slave node timer with the master node timer according to the first timing difference. When the two timers are synchronized, the master node sends a first preset instruction including the effective time of the first instruction to the first slave node, so that the first slave node executes the first preset instruction when the timing reaches the effective time of the first instruction, thereby avoiding jitter in the time when the first slave node executes the instruction sent by the master node when there is an unfixed delay in transmitting instructions from the master node to the first slave node.
[0111] In a possible implementation, the method further includes:
[0112] The master node obtains a second timing difference and sends the second timing difference;
[0113] The second timing difference is used to achieve synchronization between the second slave node timer and the master node timer, the second timing difference is the timing difference between the master node timer and the second slave node timer when the second link training is completed, and the second link is the link between the master node and the second slave node;
[0114] The master node sends a second preset instruction;
[0115] Among them, the second preset instruction includes the second instruction effective time, the second instruction effective time is used to indicate the time when the second slave node executes the second preset instruction, the second instruction effective time is greater than or equal to the sum of the sending time of the second preset instruction and the maximum delay of the second link, and the second instruction effective time is the same as the first instruction effective time.
[0116] In the above scheme, the master node sends a second timing difference to the second slave node, instructing the second slave node to synchronize the second slave node timer with the master node timer according to the second timing difference. When the two timers are synchronized, the master node sends a second preset instruction including the effective time of the second instruction to the second slave node, so that the second slave node executes the second preset instruction when the timing reaches the effective time of the second instruction. Since the effective time of the second instruction and the effective time of the first instruction are the same, the time when the second slave node executes the second preset instruction and the time when the first slave node executes the first preset instruction can be synchronized.
[0117] In a possible implementation, the method further includes:
[0118] The first slave node obtains a third timing difference, and sends the third timing difference to the second slave node;
[0119] The third timing difference is used to synchronize the second slave node timer with the first slave node timer, the third timing difference is the timing difference between the first slave node timer and the second slave node timer when the third link training is completed, and the third link is the link between the first slave node and the second slave node;
[0120] The master node sends a second preset instruction;
[0121] The first slave node forwards the second preset instruction to the second slave node;
[0122] Among them, the second preset instruction includes the second instruction effective time, the second instruction effective time is used to indicate the time when the second slave node executes the second preset instruction, the second instruction effective time is greater than or equal to the time when the master node sends the second preset instruction to the first slave node, the maximum delay of the first link and the maximum delay of the third link, and the second instruction effective time is the same as the first instruction effective time.
[0123] In one possible implementation, the first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
[0124] In an eighth aspect, a data transmission method is provided, the method being applied to a slave node, comprising:
[0125] The first slave node receives a first timing difference;
[0126] The first timing difference is used to achieve synchronization between a first slave node timer and a master node timer, the first timing difference is a timing difference between the master node timer and the first slave node timer when first link training is completed, and the first link is a link between the first slave node and the master node;
[0127] The first slave node receives a first preset instruction;
[0128] The first preset instruction includes a first instruction effective time, and the first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link;
[0129] The first slave node executes the first preset instruction when the first instruction takes effect.
[0130] In a possible implementation, the method further includes:
[0131] The second slave node receives a second timing difference;
[0132] The second timing difference is used to achieve synchronization between the second slave node timer and the master node timer;
[0133] The second slave node receives a second preset instruction;
[0134] The second preset instruction includes a second instruction effective time, the second instruction effective time is greater than or equal to the sum of the sending time of the second preset instruction and the maximum delay of the second link, the second instruction effective time is the same as the first instruction effective time, and the second link is a link between the master node and the second slave node;
[0135] The second slave node executes the second preset instruction at the second instruction effective time.
[0136] In a possible implementation, the method further includes:
[0137] The first slave node acquires a third timing difference, and sends the third timing difference to the second slave node;
[0138] The third timing difference is used to synchronize the second slave node timer with the first slave node timer, the second timing difference is the timing difference between the first slave node timer and the second slave node timer when the third link training is completed, and the third link is the link between the first slave node and the second slave node;
[0139] The first slave node sends a second preset instruction to the second slave node;
[0140] Among them, the second preset instruction includes the second instruction effective time, the second instruction effective time is used to indicate the time when the second slave node executes the second preset instruction, the second instruction effective time is greater than or equal to the sum of the time when the first slave node sends the second preset instruction to the second slave node and the maximum delay of the third link, and the second instruction effective time is the same as the first instruction effective time.
[0141] In a possible implementation manner, the second preset instruction is generated by the master node or by the first slave node.
[0142] In one possible implementation, the first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
[0143] In a ninth aspect, a data transmission method is provided, the method being applied to a data transmission system, the data transmission system comprising a master node and a first slave node, the method comprising:
[0144] The master node acquires a first timing difference, and sends the first timing difference to the first slave node;
[0145] The first timing difference is used to achieve synchronization between the first slave node timer and the master node timer;
[0146] The master node sends a first preset instruction to the first slave node;
[0147] The first preset instruction includes a first instruction effective time, the first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the first link is the link between the master node and the first slave node;
[0148] The first slave node executes the first preset instruction when the first instruction takes effect.
[0149] In a possible implementation manner, the data transmission system further includes a second slave node, and the method further includes:
[0150] The master node obtains a second timing difference, and sends the second timing difference to the second slave node;
[0151] The second timing difference is used to achieve synchronization between the second slave node timer and the master node timer;
[0152] The master node sends a second preset instruction to the second slave node;
[0153] The second preset instruction includes a second instruction effective time, the second instruction effective time is greater than or equal to the sum of the sending time of the second preset instruction and the maximum delay of the second link, the second instruction effective time and the first instruction effective time are the same time, and the second link is a link between the master node and the second slave node;
[0154] The second slave node executes the second preset instruction when the second instruction takes effect.
[0155] In a possible implementation manner, the data transmission system further includes a second slave node, and the method further includes:
[0156] The first slave node obtains a third timing difference, and sends the third timing difference to the second slave node;
[0157] The third timing difference is used to achieve synchronization between the second slave node timer and the first slave node timer, and the third timing difference is the timing difference between the first slave node timer and the second slave node timer when the third link training is completed;
[0158] The first slave node sends a second preset instruction to the second slave node;
[0159] The second preset instruction includes a second instruction effective time, the second instruction effective time is greater than or equal to the sum of the time when the master node sends the second preset instruction to the first slave node, the maximum delay of the first link, and the maximum delay of the third link, the second instruction effective time is the same as the first instruction effective time, and the third link is a link between the first slave node and the second slave node;
[0160] The second slave node executes the second preset instruction when the second instruction takes effect.
[0161] In a possible implementation manner, the second preset instruction is generated by the master node or by the first slave node.
[0162] In one possible implementation, the first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
[0163] In a tenth aspect, a data transmission device is provided, the device being applied to a master node, comprising:
[0164] A sending module, used for sending a first synchronization moment;
[0165] The first synchronization time is used to synchronize the first slave node timer with the master node timer;
[0166] The sending module is further used to send a first preset instruction;
[0167] Among them, the first preset instruction includes a first instruction effective time, and the first instruction effective time is used to indicate the time when the first slave node executes the first preset instruction. The first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the first link is the link between the master node and the first slave node.
[0168] In a possible implementation, the sending module is further configured to:
[0169] Sending a second synchronization time;
[0170] The second synchronization time is used to synchronize the second slave node timer with the master node timer;
[0171] Sending a second preset instruction;
[0172] Among them, the second preset instruction includes the second instruction effective time, the second instruction effective time is used to indicate the time when the second slave node executes the second preset instruction, the second instruction effective time is greater than or equal to the sum of the sending time of the second preset instruction and the maximum delay of the second link, the second instruction effective time is the same as the first instruction effective time, and the second link is the link between the master node and the second slave node.
[0173] In one possible implementation, the first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
[0174] In an eleventh aspect, a data transmission device is provided, the device comprising a first sub-device, the first sub-device is applied to a first slave node, and the first sub-device comprises:
[0175] A first receiving module, used for receiving a first synchronization time;
[0176] The first synchronization time is used to synchronize the first slave node timer with the master node timer;
[0177] The first receiving module is further used to receive a first preset instruction;
[0178] The first preset instruction includes a first instruction effective time, the first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the first link is a link between the first slave node and the master node;
[0179] The first execution module is used to execute the first preset instruction when the first instruction takes effect.
[0180] In a possible implementation, the system further includes a second sub-device, which is applied to the second slave node, and includes:
[0181] A second receiving module, used for receiving a second synchronization time;
[0182] The second synchronization time is used to synchronize the second slave node timer with the master node timer;
[0183] The second receiving module is further used to receive a second preset instruction;
[0184] The second preset instruction includes a second instruction effective time, the second instruction effective time is greater than or equal to the sum of the sending time of the second preset instruction and the maximum delay of the second link, the second instruction effective time is the same as the first instruction effective time, and the second link is a link between the master node and the second slave node;
[0185] The second execution module is used to execute the second preset instruction when the second instruction takes effect.
[0186] In a possible implementation manner, the first sub-device further includes:
[0187] A sending module, used for sending a second synchronization time to a second slave node;
[0188] The second synchronization time is used to achieve synchronization between the second slave node timer and the first slave node timer;
[0189] The sending module is further used to send a second preset instruction to the second slave node;
[0190] Among them, the second preset instruction includes the second instruction effective time, the second instruction effective time is used to indicate the time when the second slave node executes the second preset instruction, the second instruction effective time is greater than or equal to the sum of the time when the first slave node sends the second preset instruction to the second slave node and the maximum delay of the third link, the second instruction effective time is the same as the first instruction effective time, and the third link is the link between the first slave node and the second slave node.
[0191] In a possible implementation manner, the second preset instruction is generated by the master node or by the first slave node.
[0192] In one possible implementation, the first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
[0193] In a twelfth aspect, a data transmission system is provided, the system comprising the data transmission device described in the tenth aspect and the data transmission device described in the eleventh aspect.
[0194] In a thirteenth aspect, a data transmission device is provided, the device being applied to a master node, comprising:
[0195] A receiving module, used for receiving a fourth synchronization time;
[0196] The fourth synchronization time is used to achieve synchronization between the master node timer and the first slave node timer;
[0197] A sending module, used for sending a first preset instruction;
[0198] Among them, the first preset instruction includes a first instruction effective time, and the first instruction effective time is used to indicate the time when the first slave node executes the first preset instruction. The first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the first link is the link between the master node and the first slave node.
[0199] In a possible implementation, the first preset instruction is used to instruct the first camera to take a photo; or, the first preset instruction is used to instruct the first display device to display.
[0200] In a fourteenth aspect, a data transmission device is provided, the device being applied to a first slave node, comprising:
[0201] A sending module, used for sending a fourth synchronization time;
[0202] The fourth synchronization time is used to achieve synchronization between the master node timer and the first slave node timer;
[0203] A receiving module, used for receiving a first preset instruction;
[0204] The first preset instruction includes a first instruction effective time, the first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the first link is a link between the first slave node and the master node;
[0205] An execution module is used to execute the first preset instruction when the first instruction takes effect.
[0206] In a possible implementation, the sending module is further configured to:
[0207] Sending a third synchronization time to the second slave node;
[0208] The third synchronization time is used to achieve synchronization between the second slave node timer and the first slave node timer;
[0209] Sending a second preset instruction to the second slave node;
[0210] Among them, the second preset instruction includes the second instruction effective time, the second instruction effective time is used to indicate the time when the second slave node executes the second preset instruction, the second instruction effective time is greater than or equal to the sum of the time when the first slave node sends the second preset instruction to the second slave node and the maximum delay of the third link, the second instruction effective time is the same as the first instruction effective time, and the third link is the link between the first slave node and the second slave node.
[0211] In a possible implementation manner, the second preset instruction is generated by the master node or by the first slave node.
[0212] In one possible implementation, the first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
[0213] In a fifteenth aspect, a data transmission system is provided, the system comprising the data transmission device described in the thirteenth aspect and the data transmission device described in the fourteenth aspect.
[0214] In a sixteenth aspect, a data transmission device is provided, the device being applied to a master node, comprising:
[0215] A sending module, used for acquiring a first timing difference and sending the first timing difference;
[0216] The first timing difference is used to achieve synchronization between a first slave node timer and a master node timer, the first timing difference is a timing difference between the master node timer and the first slave node timer when first link training is completed, and the first link is a link between the master node and the first slave node;
[0217] The sending module is further used to send a first preset instruction;
[0218] Among them, the first preset instruction includes a first instruction effective time, and the first instruction effective time is used to indicate the time when the first slave node executes the first preset instruction, and the first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link.
[0219] In a possible implementation, the sending module is further configured to:
[0220] Obtaining a second timing difference, and sending the second timing difference;
[0221] The second timing difference is used to achieve synchronization between the second slave node timer and the master node timer, the second timing difference is the timing difference between the master node timer and the second slave node timer when the second link training is completed, and the second link is the link between the master node and the second slave node;
[0222] Sending a second preset instruction;
[0223] Among them, the second preset instruction includes the second instruction effective time, the second instruction effective time is used to indicate the time when the second slave node executes the second preset instruction, the second instruction effective time is greater than or equal to the sum of the sending time of the second preset instruction and the maximum delay of the second link, and the second instruction effective time is the same as the first instruction effective time.
[0224] In one possible implementation, the first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
[0225] In a seventeenth aspect, a data transmission device is provided, the system comprising a first sub-device, the first sub-device is applied to a first slave node, and the first sub-device comprises:
[0226] A first receiving module, configured to receive a first timing difference;
[0227] The first timing difference is used to achieve synchronization between a first slave node timer and a master node timer, the first timing difference is a timing difference between the master node timer and the first slave node timer when first link training is completed, and the first link is a link between the first slave node and the master node;
[0228] The first receiving module is further used to receive a first preset instruction;
[0229] The first preset instruction includes a first instruction effective time, and the first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link;
[0230] The first execution module is used to execute the first preset instruction when the first instruction takes effect.
[0231] In a possible implementation, the system further includes a second sub-device, which is applied to the second slave node, and includes:
[0232] A second receiving module, used for receiving a second timing difference;
[0233] The second timing difference is used to achieve synchronization between the second slave node timer and the master node timer, and the second timing difference is the timing difference between the master node timer and the second slave node timer when the second link training is completed;
[0234] The second receiving module is further used to receive a second preset instruction;
[0235] The second preset instruction includes a second instruction effective time, the second instruction effective time is greater than or equal to the sum of the sending time of the second preset instruction and the maximum delay of the second link, the second instruction effective time is the same as the first instruction effective time, and the second link is a link between the master node and the second slave node;
[0236] The second execution module is used to execute the second preset instruction when the second instruction takes effect.
[0237] In a possible implementation manner, the first sub-device further includes:
[0238] A sending module, used for acquiring a third timing difference and sending the third timing difference to the second slave node;
[0239] The third timing difference is used to synchronize the second slave node timer with the first slave node timer, the third timing difference is the timing difference between the first slave node timer and the second slave node timer when the third link training is completed, and the third link is the link between the first slave node and the second slave node;
[0240] The sending module is further used to send a second preset instruction to the second slave node;
[0241] Among them, the second preset instruction includes the second instruction effective time, the second instruction effective time is used to indicate the time when the second slave node executes the second preset instruction, the second instruction effective time is greater than or equal to the sum of the time when the first slave node sends the second preset instruction to the second slave node and the maximum delay of the third link, and the second instruction effective time is the same as the first instruction effective time.
[0242] In a possible implementation manner, the second preset instruction is generated by the master node or by the first slave node.
[0243] In one possible implementation, the first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
[0244] In the eighteenth aspect, a data transmission system is provided, the system comprising the data transmission device described in the sixteenth aspect and the data transmission device described in the seventeenth aspect.
[0245] In the nineteenth aspect, a data transmission device is provided, comprising a processor and a memory; the memory is used to store instructions, and the processor is used to execute the instructions. When the processor executes the instructions, the data transmission device executes the method as described in the first aspect, or executes the method as described in the fourth aspect, or executes the method as described in the seventh aspect.
[0246] In the twentieth aspect, a data transmission device is provided, comprising a processor and a memory; the memory is used to store instructions, and the processor is used to execute the instructions. When the processor executes the instructions, the data transmission device executes the method as described in the second aspect, or executes the method as described in the fifth aspect, or executes the method as described in the eighth aspect.
[0247] In the twenty-first aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed, the method described in any one of the first to ninth aspects above is executed.
[0248] In aspect twenty-second, an electronic device is provided, comprising one or more processors, wherein the one or more processors are coupled to a memory, wherein a computer program is stored in the memory, and the processor is used to execute the computer program stored in the memory to implement a method as described in any one of aspects one to nine above.
[0249] In the twenty-third aspect, a computer program product is provided, comprising a computer program, which, when read and executed by a computing device, enables the computing device to execute the method described in any one of the first to ninth aspects above.
[0250] In the twenty-fourth aspect, a vehicle is provided, comprising the data transmission device described in the tenth aspect and the data transmission device described in the eleventh aspect, or comprising the data transmission device described in the thirteenth aspect and the data transmission device described in the fourteenth aspect, or comprising the data transmission device described in the sixteenth aspect and the data transmission device described in the seventeenth aspect, or comprising the data transmission device described in the nineteenth aspect and the data transmission device described in the twentieth aspect, or comprising the data transmission system described in any one of the twelfth aspect, the fifteenth aspect, and the eighteenth aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0251] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0252] Figure 1 A schematic diagram of the structure of a communication system involved in an embodiment of the present application;
[0253] Figure 2 A flowchart of a link training method according to an embodiment of the present application;
[0254] Figure 3 A schematic diagram of the states of a master node and a slave node during a link training process involved in an embodiment of the present application;
[0255] Figure 4 An interactive schematic diagram of a data transmission method provided in an embodiment of the present application;
[0256] Figure 5 A schematic diagram of transmission of a first training frame and a second training frame involved in an embodiment of the present application;
[0257] Figure 6 An interactive schematic diagram of a data transmission method provided in an embodiment of the present application;
[0258] Figure 7 An interactive schematic diagram of a data transmission method provided in an embodiment of the present application;
[0259] Figure 8 A schematic diagram of the structure of another communication system involved in an embodiment of the present application;
[0260] Fig. 9 A schematic diagram of the structure of an in-vehicle camera system involved in an embodiment of the present application;
[0261] Fig.10 A schematic diagram of a vehicle implementing synchronous photography according to an embodiment of the present application;
[0262] Fig.11 An interactive schematic diagram of a synchronous execution instruction method provided in an embodiment of the present application;
[0263] Fig.12 An interactive schematic diagram of a synchronous execution instruction method provided in an embodiment of the present application;
[0264] Fig.13 An interactive schematic diagram of a synchronous execution instruction method provided in an embodiment of the present application;
[0265] Fig.14An interactive schematic diagram of a synchronous execution instruction method provided in an embodiment of the present application;
[0266] Fig.15 An interactive schematic diagram of a synchronous execution instruction method provided in an embodiment of the present application;
[0267] Fig.16 An interactive schematic diagram of a synchronous execution instruction method provided in an embodiment of the present application;
[0268] Fig.17 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;
[0269] Fig.18 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;
[0270] Fig.19 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;
[0271] Fig. 20 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;
[0272] Fig.21 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0273] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0274] The terms "first" and "second" in the embodiments of the present application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0275] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, ab, ac, bc or abc, where a, b, c can be single or multiple.
[0276] Any embodiment or design described in this application as "exemplary" or "for example" should not be interpreted as being preferred or advantageous over other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a specific way.
[0277] First, the communication system involved in the embodiment of the present application is introduced. Figure 1 , Figure 1 A schematic diagram of the structure of a communication system provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the communication system at least includes: node 1 and node 2. These two nodes are network nodes, capable of wired communication or wireless communication. The communication link between node 1 and node 2 can be two nodes in the in-vehicle network, such as the communication link between the MDC and the sensor, the communication link between the deserializer (DES) connected to the MDC and the serializer (SER) connected to the sensor, the communication link between the cockpit domain controller (CDC) and the display device (such as a display screen), the communication link between the SER connected to the CDC and the DES connected to the display device, etc. The network elements in the in-vehicle network can be as follows: sensors (such as microphones, millimeter-wave radars, lidars, ultrasonic radars, cameras, global positioning system (GPS) modules, inertial measurement units (IMUs), speed sensors, acceleration sensors, humidity sensors, light intensity sensors and other in-vehicle sensors); playback devices (such as display devices, external amplifiers, speakers, etc.); switches (undertaking routing and switching functions, which are switches or routers that aggregate and transfer various data services, such as audio and video, synchronization messages, control messages, etc.); controllers / computing centers / storage centers (undertaking the calculation and control of a certain function, which can be independent or integrated with the gateway. Specifically, they can be in-vehicle computing platforms or in-vehicle computers, domain controllers, multi-domain controllers, such as autonomous driving controllers, infotainment controllers, etc., or data centers that store important data, such as the in-vehicle driving recorder).
[0278] In addition, node 1 and node 2 may also be two nodes in other communication networks, such as nodes in mobile terminals, monitoring equipment, smart homes, etc., and the embodiments of the present application do not make specific limitations.
[0279] It should be noted that in the specific implementation, Figure 1The communication system shown may include more nodes, for example, may also include node 3 and node 4, node 1 communicates with node 3, node 2 communicates with node 4, or node 1 is connected to node 4 via node 3, etc., which is not specifically limited here.
[0280] exist Figure 1 In the communication system shown, a master node (referring to the node sending the instruction, which may be node 1 or node 2) may have a data block transmission error in the process of transmitting the instruction divided into multiple data blocks with a fixed order to each of the multiple slave nodes (referring to the node receiving the instruction). In the case of a data block transmission error, the master node will reschedule the transmission of the erroneous data block. Since the retransmission of the data block will cause an unfixed delay in the transmission of the complete instruction, the moment when each slave node receives the complete instruction and executes the instruction will be jittered. In the case that the moment when some or all of the multiple slave nodes execute the instruction is jittered, there is a problem that the moment when the multiple slave nodes execute the instruction cannot be synchronized.
[0281] The embodiments of the present application provide a data transmission method, an apparatus, and related equipment. Before introducing the data transmission method provided by the embodiments of the present application, the link training concept and link training process involved in the embodiments of the present application are first introduced.
[0282] The purpose of link training is to achieve clock synchronization, scrambling synchronization, capability negotiation, etc. between the two nodes, so as to establish a reliable communication link between the two nodes. In the communication system, before the master node and the slave node start normal communication (for example, the master node sends instructions to the slave node or the slave node sends data to the master node), the link training process between the master node and the slave node must be completed first.
[0283] Combine the following Figure 2 and Figure 3 The link training process is introduced in detail, including: Figure 2 This is a flow chart of a link training method involved in an embodiment of the present application, which shows the process that a master node and a slave node may go through when performing link training. Figure 3 A schematic diagram of the states of a master node and a slave node during a link training process provided in an embodiment of the present application shows the state nodes that the master node and the slave node may experience when performing link training.
[0284] like Figure 2 As shown, the link training method may include the following process:
[0285] S101, the master node starts the master node timer.
[0286] S102: The master node sends at least one first training frame to the slave node.
[0287] S103: The slave node receives at least one first training frame sent by the master node, and trains the link between the slave node and the master node according to the at least one first training frame.
[0288] S104. The slave node sends at least one second training frame to the master node.
[0289] S105. The master node receives at least one second training frame sent by the slave node, and trains the link between the slave node and the master node according to the at least one second training frame.
[0290] like Figure 3 As shown, after the link training starts, the master node first enters the training state, starts the master node timer, and starts sending at least one first training frame to the slave node. After receiving any one of the at least one first training frame sent by the master node, the slave node also enters the training state and starts sending at least one second training frame to the master node.
[0291] In a specific implementation, the slave node timer may be started after the link training starts, or when entering the training state, or when entering the training countdown state described below or the data transmission state, which is not specifically limited here. When the master node or slave node timer is started, the initial value may be 0 or not 0, which is not specifically limited here.
[0292] After the slave node and the master node synchronously enter the training state, the two parties exchange training information. Specifically, the first training frame includes the first training information, and the second training frame includes the second training information. The two parties implement clock synchronization, scrambling code synchronization, and capability negotiation based on the training information sent by the other party. After the master node and the slave node have sent a certain number of first training frames and second training frames to achieve the purposes of clock synchronization, scrambling code synchronization, and capability negotiation, the slave node will send the first feedback information to the master node indicating that it can enter the training countdown state. After receiving the first feedback information, the master node can enter the training countdown state. When the master node enters the training countdown state, it will send the second feedback information to the slave node indicating that it has entered the training countdown state. After receiving the second feedback information sent by the master node, the slave node also enters the training countdown state.
[0293] After entering the training countdown state, the master node starts to send the last few remaining first training frames to the slave node, and the slave node also sends the last few remaining second training frames to the master node. Usually, after entering the training countdown state, the number of training frames sent to each other by the master node and the slave node is the same. After the master node and the slave node have sent the last few remaining first training frames and second training frames to each other, the master node and the slave node automatically enter the data transmission state.
[0294] After the slave node and the master node synchronously enter the data transmission state, data transmission or instruction transmission can be performed between the master node and the slave node.
[0295] The following section provides an exemplary introduction to the data transmission method provided in the embodiments of the present application.
[0296] In a data transmission method, the master node can send a synchronization time to the slave node during the process of training the link between the master node and the slave node, thereby instructing the slave node to synchronize the slave node timer with the master node timer according to the synchronization time. When the two timers are synchronized, the master node will then send an instruction including the instruction effective time (the instruction effective time includes the maximum delay of the link between the master node and the slave node) to the slave node, so that the slave node executes the instruction sent by the master node when the timing reaches the instruction effective time, thereby avoiding jitter in the time when the slave node executes the instruction sent by the master node when there is an unfixed delay in transmitting the instruction from the master node to the slave node.
[0297] In order to more clearly understand the data transmission method provided by the above embodiment of the present application, the following interactive diagram of the method is provided. Figure 4 As shown, the method may include the following steps:
[0298] S201. The master node sends a synchronization time to the slave node during the process of training the link between the master node and the slave node.
[0299] In a specific implementation, when the master node enters the training countdown state, it will determine the number of first training frames to be sent next (the preset number is used below to represent the number of first training frames to be sent next determined by the master node when entering the training countdown state). When the master node has sent the preset number of first training frames, it automatically enters the data transmission state.
[0300] In a specific implementation, after the master node enters the training countdown state, it sends a preset number of first training frames to the slave node, and each first training frame may include a remaining first training frame count, and the remaining first training frame count identifies the number of first training frames remaining to be sent. For example, the remaining first training frame count is 3, which means that after the master node completes the sending of the current first training frame, it still needs to complete the sending of 3 first training frames.
[0301] In some cases, since the rate at which the master node transmits training frames to the slave node is greater than the rate at which the slave node transmits training frames to the master node, the remaining first training frame count may also represent the number of groups of remaining first training subframes to be sent. The number of first training subframes in a group is the number of first training subframes that the master node can send within the duration of the slave node sending a second training frame, such as Figure 5As shown, while the slave node is transmitting a second training frame, the master node can transmit 8 first training subframes, that is, the time when the master node sends 8 first training subframes is aligned with the time when it receives a second training frame, and the time when the slave node sends a second training frame is aligned with the time when it receives 8 first training subframes. Then, the master node can simultaneously complete the reception of a second training frame and the sending of 8 first training subframes, and the slave node can simultaneously complete the sending of a second training frame and the receiving of 8 first training subframes, and the two nodes can start the next state without extra waiting time.
[0302] In a specific embodiment of the present application, the master node can calculate the synchronization time based on the remaining first training frame count and the first training frame duration. For example, assuming that when the master node completes the sending of the current first training frame, the master node timer runs to 14μs, the remaining first training frame count is 3, and the duration of each first training frame is 2μs, that is, the master node sends a first training frame every 2μs, then the master node can determine the synchronization time = 14μs + 3*2μs = 20μs.
[0303] In a specific embodiment of the present application, after entering the training countdown state, the master node may carry the synchronization time in part or all of the preset number of first training frames to be sent, so as to send the synchronization time to the slave node.
[0304] S202. The slave node receives the synchronization time sent by the master node, and synchronizes the slave node timer with the master node timer according to the synchronization time.
[0305] As can be seen from the above, the master node calculates the synchronization time based on the remaining first training frame count and the first training frame duration. It can be understood that when the first training frame with the remaining first training frame count is sent, the master node timer will count to the synchronization time. To achieve synchronization between the slave node timer and the master node timer, the slave node needs to send the second training frame with the remaining second training frame count, and the value of the slave node timer is also the synchronization time.
[0306] In a specific implementation, if the slave node timer hits the synchronization moment when the slave node sends the second training frame with the remaining second training frame count, the slave node does not need to adjust the value of the slave node timer; if the slave node timer does not hit the synchronization moment when the slave node sends the second training frame with the remaining second training frame count, the slave node can adjust the slave node timer and adjust the value of the slave node timer to the synchronization moment.
[0307] The following takes the example that the remaining first training frame count and the remaining second training frame count are both 3, the duration of the first training frame and the second training frame are both 2μs, and the synchronization time is 20μs to illustrate how the slave node timer and the master node timer are synchronized according to the synchronization time.
[0308] Assuming that the slave node timer runs to 14μs when the slave node completes the reception of the current first training frame (i.e., the fourth to last first training frame), the slave node timer will count to 20μs when the slave node sends the remaining three second training frames, and the slave node does not need to adjust the value of the slave node timer. Assuming that the slave node timer runs to 12μs when the slave node completes the reception of the current first training frame, the slave node timer will count to 18μs when the slave node sends the remaining three second training frames, and the slave node can adjust the value of the slave node timer from 18μs to 20μs according to the synchronization time 20μs.
[0309] S203: The master node sends a preset instruction including the time at which the instruction takes effect to the slave node.
[0310] The instruction effective time is used to indicate the time when the slave node executes the preset instruction.
[0311] In a specific embodiment of the present application, before the master node sends a preset instruction including the instruction effective time to the slave node, the master node can first determine the sending time of the preset instruction (i.e., the time when the master node sends the preset instruction to the slave node), and determine the instruction effective time according to the sending time of the preset instruction and the maximum delay of the link between the master node and the slave node. Specifically, the instruction effective time is greater than or equal to the sum of the sending time of the preset instruction and the maximum delay of the link between the master node and the slave node. Among them, delay refers to the time required for a message to be transmitted from one node to another, which includes one or more of transmission delay, propagation delay, processing delay and queuing delay.
[0312] It can be seen that when the master node sends a preset instruction to the slave node, it has taken into account the possibility of data transmission errors and non-fixed delays in the transmission of the preset instruction. That is to say, even if a data transmission error occurs during the process of the master node sending the preset instruction to the slave node, the master node retransmits the data, or non-fixed delays occur in the transmission of the preset instruction, since the instruction takes effect at a time greater than or equal to the sum of the sending time of the preset instruction and the maximum delay of the link between the master node and the slave node, it can also ensure that the slave node can execute the preset instruction when the timing reaches the instruction taking effect time.
[0313] For example, assuming that the maximum delay of the link between the master node and the slave node is 3μs, and the master node determines that the sending time of the preset instruction is 22μs when the master node timer counts to 20μs, the master node can calculate that the sum of the sending time of the preset instruction 22μs and the maximum delay of the link between the master node and the slave node 3μs is 25μs, then the instruction effective time determined by the master node can be any time greater than or equal to 25μs, such as 25μs, 26μs, etc., which is not specifically limited here.
[0314] Assume that the instruction takes effect at 25μs. Since the preset instruction is sent at 22μs, the master node will send the preset instruction including the instruction effective time of 25μs to the slave node when the timing reaches 22μs. If during the instruction transmission process, the actual delay of the link between the master node and the slave node is less than 3μs, the slave node will receive the preset instruction before the timing reaches 25μs. Since the instruction takes effect at 25μs, even if the slave node receives the preset instruction before the timing reaches 25μs, the slave node will wait until the timing reaches 25μs before executing the preset instruction. If during the instruction transmission process, the actual delay of the link between the master node and the slave node is equal to 3μs, the slave node will receive the preset instruction when the timing reaches 25μs, and the slave node can directly execute the preset instruction when receiving the preset instruction.
[0315] In a specific implementation, the preset instruction may be any instruction, such as a photographing instruction for instructing a camera to take a picture, or a display instruction for instructing a display device to display, etc., which is not specifically limited here.
[0316] S204. The slave node receives a preset instruction including the instruction effective time sent by the master node, and executes the preset instruction when the timing reaches the instruction effective time.
[0317] Another data transmission method provided in an embodiment of the present application is introduced below.
[0318] In this data transmission method, the master node can receive the synchronization time sent by the slave node during the process of training the link between the master node and the slave node, and synchronize the master node timer with the slave node timer according to the synchronization time. When the two timers are synchronized, the master node will then send an instruction including the instruction effective time to the slave node, so that the slave node executes the instruction sent by the master node when the timing reaches the instruction effective time, thereby avoiding jitter in the time when the slave node executes the instruction sent by the master node when there is an unfixed delay in transmitting the instruction from the master node to the slave node.
[0319] In order to more clearly understand the data transmission method provided by the above embodiment of the present application, the following interactive diagram of the method is provided. Figure 6As shown, the method may include the following steps:
[0320] S301. The slave node sends a synchronization time to the master node during the process of training the link between the slave node and the master node.
[0321] In a specific implementation, after entering the training countdown state, the slave node determines the remaining second training frame count according to the remaining first training frame count included in the first training frame sent by the master node. Usually, the remaining second training frame count is equal to the remaining first training frame count. The remaining second training frame count identifies the number of second training frames remaining to be sent.
[0322] In some cases, since the rate at which the slave node transmits training frames to the master node is greater than the rate at which the master node transmits training frames to the slave node, the above-mentioned remaining second training frame count can also represent the number of groups of second training subframes remaining to be sent. The number of second training subframes in a group is the number of second training subframes that the slave node can send within the time it takes for the master node to send a first training frame.
[0323] In a specific embodiment of the present application, the slave node can calculate the synchronization time according to the remaining number of second training frames and the second training frame duration, and then carry the synchronization time in the second training frame to be sent to send the synchronization time to the master node.
[0324] S302: The master node receives the synchronization time sent by the slave node, and synchronizes the master node timer with the slave node timer according to the synchronization time.
[0325] The process of the master node realizing synchronization of the master node timer and the slave node timer according to the synchronization time is the same as the above Figure 2 The process of synchronizing the slave node timer with the master node timer according to the synchronization time in S202 of the illustrated embodiment is similar. For details, please refer to S202 and related descriptions, which will not be elaborated here.
[0326] S303: The master node sends a preset instruction including the time at which the instruction takes effect to the slave node.
[0327] S304, the slave node receives a preset instruction including the instruction effective time sent by the master node, and executes the preset instruction when the timing reaches the instruction effective time.
[0328] It can be seen that S303 and S304 are the same as above Figure 5 S203 and S204 in the illustrated embodiment correspond to each other in the same manner. For details, please refer to S203, S204 and related descriptions, which will not be elaborated here.
[0329] Another data transmission method provided in an embodiment of the present application is introduced below.
[0330] In this data transmission method, the master node can obtain the timing difference between the master node timer and the slave node timer when the link training is completed during the process of training the link between the master node and the slave node or when the link training is completed, and then send the timing difference to the slave node to instruct the slave node to synchronize the slave node timer with the master node timer according to the timing difference. When the two timers are synchronized, the master node will then send a preset instruction including the time when the instruction takes effect to the slave node, so that the slave node can execute the instruction sent by the master node when the timing reaches the time when the instruction takes effect, thereby avoiding jitter in the time when the slave node executes the instruction sent by the master node when there is an unfixed delay in transmitting the instruction from the master node to the slave node.
[0331] In order to more clearly understand the data transmission method provided by the above embodiment of the present application, the following interactive diagram of the method is provided. Figure 7 As shown, the method may include the following steps:
[0332] S401. The master node obtains a timing difference during the process of training a link between the master node and a slave node or when the link training is completed, and sends the timing difference to the slave node.
[0333] In one possible implementation, during the process of training the link between the master node and the slave node, the master node receives the value t1 of the slave node timer when the link training is completed and sent by the slave node, and then calculates the timing difference t2-t1 based on t1 and the value t2 of the master node timer when the link training is completed.
[0334] In a specific implementation, after entering the training countdown state, the master node can pre-calculate the value t2 of the master node timer when the link training is completed. After entering the training countdown state, the slave node can also pre-calculate the value t1 of the slave node timer when the link training is completed. For example, when the slave node enters the training countdown state, the value t1 of the slave node timer is 3μs, the remaining second training frame count is 2, and the duration of each second training frame is 2μs. Then the slave node can pre-calculate the value t1 of the slave node timer when the link training is completed = 3μs + 2*2μs = 7μs.
[0335] In this implementation, after entering the training countdown state, the slave node may carry the value t1 of the slave node timer in the second training frame to be sent, thereby sending the value t1 of the slave node timer to the master node.
[0336] In another possible implementation, when the link training between the master node and the slave node is completed, the master node receives the value t1 of the slave node timer when the link training is completed, which is sent by the slave node. After receiving t1, the master node can calculate the timing difference t2-t1 based on t1 and the value t2 of the master node timer when the link training is completed.
[0337] For example, when link training is completed, the value t2 of the master node timer is 8 μs, and the value t1 of the slave node timer is 5 μs, then the timing difference obtained by the master node is t2-t1=3 μs.
[0338] For the sake of simplicity, the present embodiment does not describe the link training process between the slave node and the master node. Figure 2 and Figure 3 and related descriptions.
[0339] S402: The slave node receives the timing difference sent by the master node, and synchronizes the slave node timer with the master node timer according to the timing difference.
[0340] Continuing with the example of when the link training is completed, the value of the master node timer is 8μs, the value of the slave node timer is 5μs, and the timing difference obtained by the master node is 3μs, it is assumed that the master node sends the timing difference to the slave node when the value of the master node timer is 8μs and the value of the slave node timer is 5μs. Since there may be non-fixed delays in the data transmission process, it is assumed that the delay is 2μs, that is, the slave node receives the timing difference when the master node timer times to 10μs and the slave node timer times to 7μs. The slave node adjusts the value of the slave node timer to 10μs based on the timing difference of 3μs, which is the same as the value of 10μs of the master node timer, thereby realizing the synchronization of the slave node timer and the master node timer.
[0341] S403: The master node sends a preset instruction including the time at which the instruction takes effect to the slave node.
[0342] S404, the slave node receives a preset instruction including the instruction effective time sent by the master node, and executes the preset instruction when the timing reaches the instruction effective time.
[0343] It can be seen that S403 and S404 are the same as above Figure 5 S203 and S204 in the illustrated embodiment correspond to each other in the same manner. For details, please refer to S203, S204 and related descriptions, which will not be elaborated here.
[0344] It can be seen that in the above data transmission method, the master node sends a preset instruction including the time when the instruction takes effect to the slave node after the slave node timer is synchronized with the master node timer, so that the slave node can execute the preset instruction when the timing reaches the time when the instruction takes effect, avoiding jitter in the time when the slave node executes the preset instruction sent by the master node.
[0345] On the basis of the above-mentioned data transmission method provided in the embodiment of the present application, the embodiment of the present application also provides a method, apparatus and related equipment for synchronously executing instructions, which is used to realize the time synchronization of a master node controlling multiple slave nodes to execute instructions.
[0346] In order to facilitate understanding of the method for synchronously executing instructions provided in an embodiment of the present application, the communication system involved in the method for synchronously executing instructions is first introduced below.
[0347] See also Figure 8 , Figure 8 A schematic diagram of the structure of a communication system provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, the communication system includes: node 1, node 2 and node 3. The three nodes are network nodes, wherein node 1 performs wired or wireless communication with node 2 and node 3 respectively. In a specific implementation, node 2 and node 3 may or may not communicate with each other, or node 2 may indirectly communicate with node 3 through node 1, which is not specifically limited here.
[0348] Figure 8 The communication network shown including node 1, node 2 and node 3 can be an in-vehicle communication network, or a communication network of a mobile terminal, a monitoring device, a smart home, etc., and the embodiments of the present application do not make specific limitations.
[0349] It should be noted that in the specific implementation, Figure 8 The communication system shown may include more nodes, for example, may also include node 4 and node 5, node 1 communicates with node 4 and node 5 respectively, or node 1 is connected to node 5 through node 4, etc., which is not specifically limited here.
[0350] At present, in some scenarios where a master node needs to control multiple slave nodes to execute instructions synchronously, for example, in order to improve the comfort, convenience and safety of vehicle driving, cars are generally equipped with advanced driving assistant systems (ADAS) containing multiple cameras, or even fully automatic driving systems containing multiple cameras, which use multiple cameras to simultaneously collect environmental information around the car, making it convenient for the driver to observe or for the automatic driving vehicle to identify the state of the vehicle's surrounding environment, so as to achieve various complex auxiliary driving functions such as collision avoidance, reversing images, and 360° panoramic images. Therefore, how to realize an MDC to control multiple cameras to synchronously execute photo commands in the in-vehicle communication network has become a hot topic in the field of automobile driving research. However, in the specific implementation, since each slave node may have an unfixed delay when transmitting data to the master node, and the master node may also have an unfixed delay when transmitting instructions to each slave node, this usually causes jitters at the time when the master node sends instructions to each slave node, and causes jitters at the time when each slave node executes instructions, and then the problem of multiple slave nodes being unable to synchronize the time when executing instructions occurs.
[0351] In order to more clearly understand the problems existing in the above-mentioned existing synchronous execution instruction method, the following is an example of an MDC controlling multiple cameras in the existing in-vehicle communication network to synchronously execute photo-taking instructions to explain.
[0352] like Fig. 9 As shown, in the current in-vehicle communication network, usually one MDC is connected to one DES. One DES has four ports, and the four ports are connected to four SERs respectively. The four SERs are connected to a camera respectively. The MDC sends a triggering photo command to the four SERs through the DES. The four SERs trigger the corresponding cameras to take photos according to the triggering photo command, so that one MDC controls four cameras to take photos synchronously. It can be understood that Fig. 9 The DES shown is equivalent to the master node that controls multiple slave nodes to synchronously execute instructions, and the four SERs are equivalent to multiple slave nodes.
[0353] At present, when SER1, SER2, SER3 and SER4 transmit each frame of image to DES, each frame of image is divided into multiple rows of data blocks (pixel points) and transmitted row by row, wherein each frame of image includes the Xth row identifier, and the Xth row identifier is used to identify the starting position of the first data block of the Xth row of each frame of image. When SER1 transmits a frame of image P1 to DES, SER2 transmits a frame of image P2 to DES, SER3 transmits a frame of image P3 to DES, and SER4 transmits a frame of image P4 to DES, the four frames of image P1, P2, P3 and P4 transmitted by the four SERs to DES are the four SEs controlled by DES. R synchronously executes the triggering photo command to trigger the four cameras to synchronously take photos to obtain the image. DES records the moment of receiving the Xth row mark of image P1 as T1, the moment of receiving the Xth row mark of image P2 as T2, the moment of receiving the Xth row mark of image P3 as T3, and the moment of receiving the Xth row mark of image P4 as T4. After obtaining T1, T2, T3 and T4, DES can adjust the moment of sending the triggering photo command to the four SERs according to the difference between T1, T2, T3 and T4, so as to realize that the four SERs synchronously execute the triggering photo command to trigger the four cameras to take photos synchronously. Specifically, Fig.10 shown.
[0354] However, in the process of transmitting images to DES, some data blocks may be transmitted incorrectly. In the event of a data block transmission error, the SER among the four SERs that has the data block transmission error will reschedule the transmission of the erroneous data block, which usually causes jitter in the time marked in the Xth row corresponding to the SER with the data block transmission error recorded by DES, thereby causing jitter in the time when DES sends a trigger photo-taking instruction to the SER. Therefore, it is impossible to guarantee that the four SERs trigger the four cameras to take photos synchronously at the same time.
[0355] The embodiments of the present application provide a method, apparatus and related equipment for synchronously executing instructions, which can ensure the synchronization of the execution of instructions by multiple slave nodes. Specifically, for example, an MDC in the above-mentioned in-vehicle communication network controls multiple cameras to take pictures synchronously. Other methods, such as a CDC controlling multiple display devices to display synchronously, etc.
[0356] The following section provides an exemplary introduction to the synchronous execution instruction method provided in an embodiment of the present application.
[0357] In a synchronous execution instruction method, the master node can send a first synchronization moment to the first slave node during the training of the first link (the link between the master node and the first slave node) to instruct the first slave node to synchronize the first slave node timer with the master node timer according to the first synchronization moment, and send a second synchronization moment to the second slave node during the training of the second link (the link between the master node and the second slave node) to instruct the second slave node to synchronize the second slave node timer with the master node timer according to the second synchronization moment, thereby achieving synchronization of the first slave node timer and the second slave node timer with the master node timer.
[0358] In the case where the first slave node timer and the second slave node timer are both synchronized with the master node timer, the master node sends the first preset instruction including the first instruction effective time to the first slave node, and sends the second preset instruction including the second instruction effective time to the second slave node, so that the first slave node and the second slave node can correspondingly execute the first preset instruction and the second preset instruction sent by the master node when the first instruction effective time and the second instruction effective time are counted, thereby avoiding the jitter of the moment when the first slave node executes the first preset instruction sent by the master node and the jitter of the moment when the second slave node executes the second preset instruction sent by the master node. In addition, since the second instruction effective time and the first instruction effective time are the same time, the moment when the first slave node executes the first preset instruction and the moment when the second slave node executes the second preset instruction can also be synchronized.
[0359] In order to more clearly understand the synchronous execution instruction method provided by the above embodiment of the present application, the following interactive diagram of the method is provided. Fig.11 As shown, the method may include the following steps:
[0360] S501. During training of a first link, a master node sends a first synchronization time to a first slave node.
[0361] S502: The master node sends a second synchronization time to the second slave node during training of the second link.
[0362] S503: The first slave node receives the first synchronization time sent by the master node, and synchronizes the first slave node timer with the master node timer according to the first synchronization time.
[0363] S504: The second slave node receives the second synchronization time sent by the master node, and synchronizes the second slave node timer with the master node timer according to the second synchronization time.
[0364] It can be understood that since the first slave node timer is synchronized with the master node timer and the second slave node timer is synchronized with the master node timer, the second slave node timer is also synchronized with the first slave node timer.
[0365] S505: The master node sends a first preset instruction including a first instruction effective time to the first slave node.
[0366] The first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the sending time of the first preset instruction is the time when the master node sends the first preset instruction to the first slave node.
[0367] S506: The master node sends a second preset instruction including a second instruction effective time to the second slave node.
[0368] Among them, the time when the second instruction takes effect is greater than or equal to the sum of the time when the second preset instruction is sent and the maximum delay of the second link, the time when the second instruction takes effect and the time when the first instruction takes effect are the same time, and the time when the second preset instruction is sent is the time when the master node sends the second preset instruction to the second slave node.
[0369] In a specific embodiment of the present application, before the master node sends a first preset instruction including the effective time of the first instruction to the first slave node and sends a second preset instruction including the effective time of the second instruction to the second slave node, the master node can first determine the sending time of the first preset instruction and the sending time of the second preset instruction, and determine the first instruction effective time and the second instruction effective time based on the sending time of the first preset instruction, the sending time of the second preset instruction, the maximum delay of the first link and the maximum delay of the second link.
[0370] Further, the master node may determine the first instruction effective time and the second instruction effective time by the following steps:
[0371] In the first step, the master node determines whether the first moment is greater than the second moment.
[0372] The first moment is the sum of the sending moment of the first preset instruction and the maximum delay of the first link, and the second moment is the sum of the sending moment of the second preset instruction and the maximum delay of the second link.
[0373] In the second step, when the master node determines that the first moment is greater than the second moment, the master node determines the effective moment of the first instruction based on the first moment, wherein the effective moment of the first instruction is greater than or equal to the first moment; when the master node determines that the first moment is less than or equal to the second moment, the master node determines the effective moment of the first instruction based on the second moment, wherein the effective moment of the first instruction is greater than or equal to the second moment.
[0374] As can be seen from the above, the second instruction effective time is the same as the first instruction effective time. According to the above steps, the first instruction effective time is determined, that is, the second instruction effective time is determined.
[0375] For example, assuming that the time when the first slave node timer, the second slave node timer are synchronized with the master node timer is 20μs, the time when the first preset instruction and the time when the second preset instruction are sent determined by the master node are both 22μs, the maximum delay of the first link is 2μs, and the maximum delay of the second link is 4μs, then the master node can deduce that the first moment is 24μs and the second moment is 26μs. The master node determines that the second moment is greater than the first moment. Therefore, the time when the first instruction takes effect determined by the master node only needs to be greater than or equal to the second moment 26μs, which can be 26μs or 27μs, etc., and the embodiments of the present application are not limited to this.
[0376] When the first instruction takes effect at a time when the second instruction takes effect at a time when both are 26μs, even if the first slave node receives the first preset instruction before or at 24μs, the first slave node will wait until 26μs to execute the first preset instruction, and if the second slave node receives the second preset instruction before 26μs, the second slave node will wait until 26μs to execute the second preset instruction, thereby ensuring synchronization of the execution of instructions by both nodes.
[0377] S507: The first slave node receives a first preset instruction including a first instruction effective time sent by the master node, and executes the first preset instruction when the timing reaches the first instruction effective time.
[0378] S508. The second slave node receives the second preset instruction including the second instruction effective time sent by the master node, and executes the second preset instruction when the timing reaches the second instruction effective time.
[0379] As can be seen from the above, the second instruction takes effect at the same time as the first instruction takes effect. Therefore, the first slave node and the second slave node execute the instruction when the timing reaches the same time, that is, the timing of the execution of the instruction by the two is synchronized. Another synchronous instruction execution method provided by an embodiment of the present application is introduced below.
[0380] In the synchronous execution instruction method, the master node can obtain the first timing difference during the training of the first link or when the training of the first link is completed, and obtain the second timing difference during the training of the second link or when the training of the second link is completed, and then send the first timing difference to the first slave node to instruct the first slave node to synchronize the first slave node timer with the master node timer according to the first timing difference, and send the second timing difference to the second slave node to instruct the second slave node to synchronize the second slave node timer with the master node timer according to the second timing difference, thereby achieving synchronization of the first slave node timer and the second slave node timer with the master node timer.
[0381] In the case where the first slave node timer and the second slave node timer are both synchronized with the master node timer, the master node sends the first preset instruction including the first instruction effective time to the first slave node, and sends the second preset instruction including the second instruction effective time to the second slave node, so that the first slave node and the second slave node can correspondingly execute the first preset instruction and the second preset instruction sent by the master node when the first instruction effective time and the second instruction effective time are counted, thereby avoiding the jitter of the moment when the first slave node executes the first preset instruction sent by the master node and the jitter of the moment when the second slave node executes the second preset instruction sent by the master node. In addition, since the second instruction effective time and the first instruction effective time are the same time, the moment when the first slave node executes the first preset instruction and the moment when the second slave node executes the second preset instruction can also be synchronized.
[0382] In order to more clearly understand the synchronous execution instruction method provided by the above embodiment of the present application, the following is an interactive schematic diagram of the synchronous execution instruction method. Fig.12 As shown, the method may include the following steps:
[0383] S601: During the process of training a first link or when the training of the first link is completed, the master node obtains a first timing difference and sends the first timing difference to a first slave node.
[0384] The first timing difference is the timing difference between the master node timer and the first slave node timer when the first link training is completed.
[0385] S602: The master node obtains a second timing difference during the process of training the second link or when the training of the second link is completed, and sends the second timing difference to the second slave node.
[0386] The second timing difference is the timing difference between the master node timer and the second slave node timer when the second link training is completed.
[0387] S603: The first slave node receives a first timing difference sent by the master node, and synchronizes the first slave node timer with the master node timer according to the first timing difference.
[0388] S604: The second slave node receives the second timing difference sent by the master node, and synchronizes the second slave node timer with the master node timer according to the second timing difference.
[0389] S605: The master node sends a first preset instruction including a first instruction effective time to the first slave node.
[0390] S606: The master node sends a second preset instruction including a second instruction effective time to the second slave node.
[0391] S607: The first slave node receives a first preset instruction including a first instruction effective time sent by the master node, and executes the first preset instruction when the timing reaches the first instruction effective time.
[0392] S608. The second slave node receives the second preset instruction including the second instruction effective time sent by the master node, and executes the second preset instruction when the timing reaches the second instruction effective time.
[0393] It can be seen that S605 to S608 and Fig.11 S505 to S508 shown in the figure correspond to each other. For details, please refer to the above Fig.11 And related descriptions will not be elaborated here.
[0394] It is understandable that in a specific implementation, the following situations may also exist:
[0395] Exemplarily, the first slave node timer is successfully synchronized with the master node timer, and the first slave node successfully receives the first preset instruction and executes the first preset instruction when the first instruction takes effect, while the second slave node timer is not successfully synchronized with the master node timer, resulting in the second slave node failing to execute the instruction synchronously with the first slave node even though it receives the second preset instruction sent by the master node.
[0396] Exemplarily, the first slave node timer is successfully synchronized with the master node timer, and the first slave node successfully receives the first preset instruction and executes the first preset instruction when the first instruction takes effect, while the second slave node timer is successfully synchronized with the master node timer, but the second link is disconnected after the synchronization is successful, resulting in the second slave node not receiving the second preset instruction sent by the master node, and the second slave node failing to execute the instruction synchronously with the first slave node.
[0397] For the above exemplary situation, the master node can re-train the second link before sending a new first preset instruction to the first slave node, and calculate a new second synchronization moment or obtain a new second timing difference, and send it to the second slave node, so that the second slave node can synchronize the second slave node timer with the master node timer according to the new second synchronization moment or the new second timing difference.
[0398] It can be understood that when the second slave node achieves synchronization of the second slave node timer with the master node timer according to the new second synchronization moment or the new second timing difference, since the first slave node timer is already synchronized with the master node timer, the second slave node timer is also synchronized with the first slave node timer.
[0399] In the case where the second slave node timer, the first slave node timer, and the master node timer are synchronized, the master node may send a new first preset instruction including a new first instruction effective time to the first slave node, so that the first slave node executes the new first preset instruction when the time reaches the new first instruction effective time, and send a new second preset instruction including a new second instruction effective time to the second slave node, so that the second slave node executes the new second preset instruction when the time reaches the new second instruction effective time. Wherein, the new first instruction effective time is greater than or equal to the sum of the sending time of the new first preset instruction and the maximum delay of the first link, the new second instruction effective time is greater than or equal to the sum of the sending time of the new second preset instruction and the maximum delay of the second link, and the new second instruction effective time and the new first instruction effective time are the same time.
[0400] In addition, in a specific implementation, there may be a scenario where the master node and the first slave node can communicate directly, the first slave node and the second slave node can communicate directly, but the master node and the second slave node cannot communicate directly, and the master node cannot communicate indirectly with the second slave node through the first slave node, but it is necessary to implement a scenario where the first slave node and the second slave node execute instructions synchronously. Figure 8 Taking the communication system shown in the figure as an example, assuming that node 2 is the master node, node 1 is the first slave node, and node 3 is the second slave node, node 2 can communicate directly with node 1, and node 1 can communicate directly with node 3, but node 2 cannot communicate directly with node 3, and node 2 cannot communicate with node 3 through node 1, but it is necessary to synchronize the time when nodes 1 and 3 execute instructions. In this case, the synchronization of the time when the first slave node and the second slave node execute instructions can be achieved through the following two exemplary synchronous execution instruction methods.
[0401] like Fig.13 As shown, the first method may include the following steps:
[0402] S701. During training of a first link, a master node sends a first synchronization time to a first slave node.
[0403] S702: The first slave node receives a first synchronization time sent by the master node, and synchronizes a first slave node timer with a master node timer according to the first synchronization time.
[0404] S703: The first slave node sends a third synchronization time to the second slave node during training of the third link.
[0405] The third link is a link between the first slave node and the second slave node.
[0406] S704: The second slave node receives the third synchronization time sent by the first slave node, and synchronizes the second slave node timer with the first slave node timer according to the third synchronization time.
[0407] S705: The master node sends a third preset instruction including a third instruction effective time to the first slave node.
[0408] Among them, the time when the third instruction takes effect is greater than or equal to the sum of the sending time of the third preset instruction, the maximum delay of the first link and the maximum delay of the third link. The sending time of the third preset instruction is the time when the master node sends the third preset instruction to the first slave node.
[0409] S706: The first slave node receives a third preset instruction including a third instruction effective time sent by the master node, and executes the third preset instruction when the timing reaches the third instruction effective time.
[0410] S707: The first slave node sends a fourth preset instruction including a fourth instruction effective time to the second slave node.
[0411] Among them, the fourth instruction takes effect time is greater than or equal to the sum of the sending time of the fourth preset instruction and the maximum delay of the third link, the fourth instruction takes effect time and the third instruction takes effect time are the same time, and the sending time of the fourth preset instruction is the time when the first slave node sends the fourth preset instruction to the second slave node.
[0412] S708. The second slave node receives the fourth preset instruction including the fourth instruction effective time sent by the first slave node, and executes the fourth preset instruction when the timing reaches the fourth instruction effective time.
[0413] In a possible implementation, before the master node sends the third preset instruction including the effective time of the third instruction to the first slave node, the master node may first determine the sending time of the third preset instruction, and determine the effective time of the third instruction based on the sending time of the third preset instruction, the maximum delay of the first link, and the maximum delay of the third link; after the master node sends the third preset instruction including the effective time of the third instruction to the first slave node, the first slave node determines the sending time of the fourth preset instruction based on the effective time of the third instruction.
[0414] Further, the third instruction effective time determined by the master node may be greater than or equal to the sending time of the third preset instruction + the maximum delay of the first link + the maximum delay of the third link.
[0415] As can be seen from the above, the fourth instruction effective time is the same as the third instruction effective time. According to the above steps, the third instruction effective time is determined, that is, the fourth instruction effective time is determined.
[0416] Continuing with the example that the time when the first slave node timer, the second slave node timer are synchronized with the master node timer is 20μs, the time when the master node determines that the third preset instruction is sent is 22μs, the maximum delay of the first link is 2μs, and the maximum delay of the third link is 4μs, the sending time of the third preset instruction is 22μs + the maximum delay of the first link is 2μs + the maximum delay of the third link is 4μs = 28μs, then the time when the third instruction takes effect determined by the master node only needs to be greater than or equal to 28μs.
[0417] When the third instruction effective time and the fourth instruction effective time are both 28μs, since the sending time of the third preset instruction is 22μs and the maximum delay of the first link is 2μs, the first slave node can receive the third preset instruction including the third instruction effective time 28μs before or when the timing reaches 24μs. Assuming that the first slave node receives the third preset instruction when the timing reaches 24μs, since the maximum delay of the third link is 4μs, the first slave node needs to ensure that the second slave node also executes the fourth preset instruction when the timing reaches 28μs, then the first slave node can determine the sending time of the fourth preset instruction to be 24μs, so that the second slave node can receive the fourth preset instruction before or when the timing reaches 28μs, and then the second slave node can also execute the fourth preset instruction when the timing reaches 28μs, which is synchronized with the first slave node executing the third preset instruction when the timing reaches 28μs.
[0418] like Fig.14 As shown, the second method may include the following steps:
[0419] S801: During the process of training a first link or when the training of the first link is completed, the master node obtains a first timing difference and sends the first timing difference to a first slave node.
[0420] S802: The first slave node receives a first timing difference sent by the master node, and synchronizes the first slave node timer with the master node timer according to the first timing difference.
[0421] S803: The first slave node obtains a third timing difference during the process of training the third link or when the training of the third link is completed, and sends the third timing difference to the second slave node.
[0422] The third timing difference is the timing difference between the first slave node timer and the second slave node timer when the third link training is completed.
[0423] S804: The second slave node receives the third timing difference sent by the first slave node, and synchronizes the second slave node timer with the first slave node timer according to the third timing difference.
[0424] S805. The master node sends a third preset instruction including a third instruction effective time to the first slave node.
[0425] S806. The first slave node receives the third preset instruction including the third instruction effective time sent by the master node, and executes the third preset instruction when the timing reaches the third instruction effective time.
[0426] S807: The first slave node sends a fourth preset instruction including a fourth instruction effective time to the second slave node.
[0427] S808. The second slave node receives the fourth preset instruction including the fourth instruction effective time sent by the first slave node, and executes the fourth preset instruction when the timing reaches the fourth instruction effective time.
[0428] It can be seen that S805 to S808 and Fig.13 S705 to S708 shown in the figure correspond to each other. For details, please refer to the above Fig.13 And related descriptions will not be elaborated here.
[0429] It is understandable that in a specific implementation, the following situations may also exist:
[0430] Exemplarily, the first slave node timer is successfully synchronized with the master node timer, and the first slave node successfully receives the third preset instruction and executes the third preset instruction when the third instruction takes effect, while the second slave node timer is not successfully synchronized with the first slave node timer, resulting in the second slave node receiving the fourth preset instruction but failing to execute the instruction synchronously with the first slave node.
[0431] Exemplarily, the first slave node timer is successfully synchronized with the master node timer, and the first slave node successfully receives the third preset instruction and executes the third preset instruction when the third instruction takes effect, and the second slave node timer is successfully synchronized with the first slave node timer, but the third link is disconnected after the synchronization is successful, resulting in the second slave node not receiving the fourth preset instruction sent by the first slave node, and the second slave node fails to execute the instruction synchronously with the first slave node.
[0432] For the above exemplary situation, the first slave node can re-train the third link, calculate a new third synchronization moment or obtain a new third timing difference, and send it to the second slave node, so that the second slave node can synchronize the second slave node timer with the first slave node timer according to the new third synchronization moment or the new third timing difference.
[0433] It can be understood that when the second slave node synchronizes the second slave node timer with the first slave node timer according to the new third synchronization moment or the new third timing difference, since the first slave node timer is already synchronized with the master node timer, the second slave node timer is also synchronized with the master node timer.
[0434] In the case where the second slave node timer, the first slave node timer, and the master node timer are synchronized, the master node may send a new third preset instruction including a new third instruction effective time to the first slave node, and after receiving the new third preset instruction, the first slave node may execute the new third preset instruction when the time reaches the new third instruction effective time, and send a new fourth preset instruction including a new fourth instruction effective time to the second slave node, so that the second slave node executes the new fourth preset instruction when the time reaches the new fourth instruction effective time. Wherein, the new third instruction effective time is greater than or equal to the sum of the sending time of the new third preset instruction, the maximum delay of the first link, and the maximum delay of the third link, the new fourth instruction effective time is greater than or equal to the sum of the time when the first slave node sends the new fourth preset instruction to the second slave node and the maximum delay of the third link, and the new fourth instruction effective time and the new third instruction effective time are the same time.
[0435] In a specific implementation, there may also be a scenario where the master node and the first slave node can communicate directly, the first slave node and the second slave node can communicate directly, but the master node and the second slave node cannot communicate directly, and the master node cannot communicate indirectly with the second slave node through the first slave node, but it is necessary to implement a scenario where the first slave node and the second slave node execute instructions synchronously. Figure 8Taking the communication system shown in the figure as an example, assuming that node 2 is the master node, node 1 is the first slave node, and node 3 is the second slave node, node 2 can communicate directly with node 1, node 1 can communicate directly with node 3, node 2 cannot communicate directly with node 3, but node 2 can communicate indirectly with node 3 through node 1, and it is necessary to synchronize the time when node 1 and node 3 execute instructions. In this case, the synchronization of the time when the first slave node and the second slave node execute instructions can be achieved through the following two exemplary synchronous execution instruction methods.
[0436] like Fig.15 As shown, the first method may include the following steps:
[0437] S901. During training of a first link, a master node sends a first synchronization time to a first slave node.
[0438] S902. The first slave node receives a first synchronization time sent by the master node, and synchronizes a first slave node timer with a master node timer according to the first synchronization time.
[0439] S903: The first slave node sends a third synchronization time to the second slave node during training of the third link.
[0440] S904. The second slave node receives the third synchronization time sent by the first slave node, and synchronizes the second slave node timer with the first slave node timer according to the third synchronization time.
[0441] S905. The master node sends a third preset instruction including a third instruction effective time and a fifth preset instruction including a fifth instruction effective time to the first slave node.
[0442] S906. The first slave node receives the third preset instruction including the effective time of the third instruction and the fifth preset instruction including the effective time of the fifth instruction sent by the master node, and executes the third preset instruction when the timing reaches the effective time of the third instruction.
[0443] S907: The first slave node sends a fifth preset instruction including a fifth instruction effective time to the second slave node.
[0444] S908. The second slave node receives the fifth preset instruction including the fifth instruction effective time sent by the first slave node, and executes the fifth preset instruction when the timing reaches the fifth instruction effective time.
[0445] In this embodiment, before the master node sends the third preset instruction including the third instruction effective time and the fifth preset instruction including the fifth instruction effective time to the first slave node, the master node may first determine the sending time of the third preset instruction, then determine the sending time of the fifth preset instruction according to the sending time of the third preset instruction and the maximum delay of the first link, and finally determine the fifth instruction effective time according to the sending time of the fifth preset instruction and the maximum delay of the third link. Among them, the sending time of the fifth preset instruction is the time when the first slave node sends the fifth preset instruction to the second slave node.
[0446] Furthermore, the sending time of the fifth preset instruction determined by the master node is greater than or equal to the sum of the sending time of the third preset instruction and the maximum delay of the first link, and the effective time of the fifth instruction determined by the master node is greater than or equal to the sum of the sending time of the fifth preset instruction and the maximum delay of the third link.
[0447] It can be seen from the above that the third instruction takes effect at the same time as the fifth instruction takes effect. The fifth instruction takes effect at the same time as determined according to the above steps, that is, the third instruction takes effect at the same time.
[0448] In a specific implementation, the fifth preset instruction sent by the master node to the first slave node may include the sending time of the fifth preset instruction, and the sending time of the fifth preset instruction is used for the first slave node to send the fifth preset instruction to the second slave node when the timing reaches the sending time of the fifth preset instruction.
[0449] Continuing with the example that the time when the first slave node timer, the second slave node timer are synchronized with the master node timer is 20μs, the sending time of the third preset instruction determined by the master node is 22μs, the maximum delay of the first link is 2μs, and the maximum delay of the third link is 4μs, the sending time of the third preset instruction 22μs + the maximum delay of the first link is 2μs = 24μs, then the master node can determine that the sending time of the fifth preset instruction only needs to be greater than or equal to 24μs.
[0450] When the sending time of the fifth preset instruction is 24 μs, the sending time of the fifth preset instruction 24 μs + the maximum delay of the third link 4 μs = 28 μs, then the fifth instruction effective time determined by the master node only needs to be greater than or equal to 28 μs.
[0451] When the fifth instruction takes effect at a time point of 28 μs and the third instruction takes effect at a time point of 28 μs, since the sending time point of the third preset instruction is 22 μs and the maximum delay of the first link is 2 μs, the first slave node can receive the third preset instruction including the third instruction taking effect at a time point of 28 μs and the fifth preset instruction including the fifth instruction taking effect at a time point of 28 μs before or when the timing reaches 24 μs. Assuming that the first slave node receives the third preset instruction and the fifth preset instruction when the timing reaches 24 μs, since the sending time point of the fifth preset instruction is 24 μs, the first slave node will send the fifth preset instruction to the second slave node when the timing reaches 24 μs, and the maximum delay of the third link is 4 μs, the second slave node can receive the fifth preset instruction before or when the timing reaches 28 μs, and then the second slave node can also execute the fifth preset instruction when the timing reaches 28 μs, which is synchronized with the execution of the third preset instruction by the first slave node when the timing reaches 28 μs.
[0452] like Fig.16 As shown, the second method may include the following steps:
[0453] S1001: During the process of training a first link or when the training of the first link is completed, the master node obtains a first timing difference and sends the first timing difference to a first slave node.
[0454] S1002: The first slave node receives a first timing difference sent by the master node, and synchronizes the first slave node timer with the master node timer according to the first timing difference.
[0455] S1003: The first slave node obtains a third timing difference during the process of training the third link or when the training of the third link is completed, and sends the third timing difference to the second slave node.
[0456] S1004: The second slave node receives the third timing difference sent by the first slave node, and synchronizes the second slave node timer with the first slave node timer according to the third timing difference.
[0457] S1005. The master node sends a third preset instruction including a third instruction effective time and a fifth preset instruction including a fifth instruction effective time to the first slave node.
[0458] S1006. The first slave node receives a third preset instruction including a third instruction effective time and a fifth preset instruction including a fifth instruction effective time sent by the master node, and executes the third preset instruction when the timing reaches the third instruction effective time.
[0459] S1007. The first slave node sends a fifth preset instruction including a fifth instruction effective time to the second slave node.
[0460] S1008. The second slave node receives the fifth preset instruction including the fifth instruction effective time sent by the first slave node, and executes the fifth preset instruction when the timing reaches the fifth instruction effective time.
[0461] It can be seen that S1005 to S1008 and Fig.15 S905 to S908 shown in the figure correspond to each other. For details, please refer to the above Fig.15 And related descriptions will not be elaborated here.
[0462] It is understandable that in a specific implementation, the following situations may also exist:
[0463] Exemplarily, the first slave node timer is successfully synchronized with the master node timer, and the first slave node successfully receives the third preset instruction and executes the third preset instruction when the third instruction takes effect, while the second slave node timer is not successfully synchronized with the first slave node timer, resulting in the second slave node receiving the fifth preset instruction but failing to execute the instruction synchronously with the first slave node.
[0464] Exemplarily, the first slave node timer is successfully synchronized with the master node timer, and the first slave node successfully receives the third preset instruction and executes the third preset instruction when the third instruction takes effect, and the second slave node timer is successfully synchronized with the first slave node timer, but the third link is disconnected after the synchronization is successful, resulting in the second slave node not receiving the fifth preset instruction sent by the first slave node, and the second slave node fails to execute the instruction synchronously with the first slave node.
[0465] Exemplarily, the first slave node timer is successfully synchronized with the master node timer, the second slave node timer is successfully synchronized with the first slave node timer, and the first slave node successfully receives the third preset instruction and executes the third preset instruction when the third instruction takes effect, but the first slave node misses the fifth preset instruction, resulting in the first slave node failing to send the fifth preset instruction to the second slave node, thereby resulting in the second slave node failing to execute instructions synchronously with the first slave node.
[0466] For the first two exemplary cases mentioned above, the first slave node can re-train the third link, calculate a new third synchronization moment or obtain a new third timing difference, and send it to the second slave node, so that the second slave node can synchronize the second slave node timer with the first slave node timer according to the new third synchronization moment or the new third timing difference.
[0467] It can be understood that when the second slave node synchronizes the second slave node timer with the first slave node timer according to the new third synchronization moment or the new third timing difference, since the first slave node timer is already synchronized with the master node timer, the second slave node timer is also synchronized with the master node timer.
[0468] In the case where the second slave node timer, the first slave node timer, and the master node timer are synchronized, the master node may send a new third preset instruction including a new third instruction effective time and a new fifth preset instruction including a new fifth instruction effective time to the first slave node. After receiving the new third preset instruction and the new fifth preset instruction, the first slave node may execute the new third preset instruction when the time reaches the new third instruction effective time, and send a new fifth preset instruction including a new fifth instruction effective time to the second slave node, so that the second slave node executes the new fifth preset instruction when the time reaches the new fifth instruction effective time. The new third instruction effective time is greater than or equal to the sum of the sending time of the new third preset instruction, the maximum delay of the first link, and the maximum delay of the third link, the new fifth instruction effective time is greater than or equal to the sum of the time when the first slave node sends the new fifth preset instruction to the second slave node and the maximum delay of the third link, and the new fifth instruction effective time and the new third instruction effective time are the same time.
[0469] For the last exemplary case mentioned above, since the second slave node timer, the second slave node timer, and the master node timer are already synchronized, there is no need to perform link training and timer synchronization. The master node only needs to send a new third preset instruction including a new third instruction effective time and a new fifth preset instruction including a new fifth instruction effective time to the first slave node. After receiving the new third preset instruction and the new fifth preset instruction, the first slave node can execute the new third preset instruction when the timing reaches the new third instruction effective time, and send a new fifth preset instruction including a new fifth instruction effective time to the second slave node, so that the second slave node executes the new fifth preset instruction when the timing reaches the new fifth instruction effective time.
[0470] In the specific implementation, Figures 11 to 16 The first preset instruction, the second preset instruction, the third preset instruction, the fourth preset instruction, and the fifth preset instruction in the illustrated embodiment may be any instruction, such as a photographing instruction for instructing a camera to take a picture, or a display instruction for instructing a display device to display, etc., which are not specifically limited here. It can be understood that in the case where the first preset instruction, the second preset instruction, the third preset instruction, the fourth preset instruction, and the fifth preset instruction are photographing instructions, the synchronous execution instruction method provided in the above embodiment of the present application can realize the synchronous photographing of the first slave node and the second slave node, and in the case where the first preset instruction, the second preset instruction, the third preset instruction, the fourth preset instruction, and the fifth preset instruction are display instructions, the synchronous execution instruction method provided in the above embodiment of the present application can realize the synchronous display of the first slave node and the second slave node.
[0471] It should be noted that for the sake of simplicity, the above Figures 11 to 16 The embodiment shown does not describe the training process of the first link, the training process of the second link, and the training process of the third link in detail. The training processes of the above links are similar to those of Figure 2 as well as Figure 3 The link training process described is similar, please refer to the above Figure 2 , Figure 3 And related descriptions will not be elaborated here.
[0472] For simplicity of presentation, Fig.11 , Fig.13 as well as Fig.15 The illustrated embodiment does not describe in detail the synchronization process of the first slave node realizing synchronization of the first slave node timer with the master node timer according to the first synchronization moment, the second slave node realizing synchronization of the second slave node timer with the master node timer according to the second synchronization moment, and the second slave node realizing synchronization of the second slave node timer with the first slave node timer according to the third synchronization moment. The process of realizing timer synchronization of the above nodes is the same as Figure 4 The process of realizing synchronization of the slave node timer with the master node timer according to the synchronization time described in the description is similar, and the specific reference can be made to the above Figure 4 And related descriptions will not be elaborated here.
[0473] For simplicity of presentation, Fig.12 , Fig.14 as well as Fig.16 The illustrated embodiment does not describe the process of obtaining the first timing difference value by the master node, the second timing difference value by the master node, the third timing difference value by the first slave node, etc. The process of obtaining the timing difference value by the above nodes is the same as that of Figure 6 The process of obtaining the timing difference of the master node is similar. For details, please refer to the above Figure 6 And related descriptions will not be elaborated here. Fig.12 , Fig.14 as well as Fig.16 The illustrated embodiment also does not describe in detail the synchronization process of the first slave node realizing synchronization of the first slave node timer with the master node timer according to the first timing difference, the second slave node realizing synchronization of the second slave node timer with the master node timer according to the second timing difference, and the second slave node realizing synchronization of the second slave node timer with the first slave node timer according to the third timing difference. The process of realizing timer synchronization of the above nodes is not described in detail. Figure 7 The process of realizing synchronization of the slave node timer with the master node timer according to the timing difference is similar to that shown in FIG. Figure 7 And related descriptions will not be elaborated here.
[0474] In combination with the relevant description in the above embodiments, the relevant devices applicable to the present application are introduced below.
[0475] See also Fig.17 , Fig.17 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application, the data transmission device can be applied to the master node described above, such as Fig.17 As shown, the data transmission device 100 includes a sending module 110. In addition to the sending module 110, it may also include a receiving module 120, wherein:
[0476] The sending module 110 is used to send data to other devices. For example, the sending module 110 is used to execute Figure 4 In the embodiment shown, steps S201 and S203 performed by the master node or used to perform Figure 7 In the embodiment shown, steps S401 and S403 are performed by the master node. For example, the sending module 110 is used to perform Fig.11 In the illustrated embodiment, steps S501 , S502 , S505 and S506 are performed by a master node.
[0477] The receiving module 120 is used to receive data sent by other devices. For example, the receiving module 120 is used to receive Figure 6 The synchronization time sent by the slave node in the illustrated embodiment.
[0478] Optionally, the data transmission device 100 may further include a synchronization module ( Fig.17 ), used to synchronize the master node timer with other device timers, for example, the synchronization module is used to execute Figure 6 Step S302 executed by the master node.
[0479] Optionally, the data transmission device 100 may further include a storage module ( Fig.17 ) and a processing module ( Fig.17 The storage module is used to store program codes and data of the data transmission device 100, for example, to store program codes for synchronizing the master node timer with the slave node timer according to the received synchronization moment. The processing module is used to call the program codes in the storage module to implement the implementation steps with the data transmission device 100 as the execution subject, and / or to perform other content steps of the technology described in this application.
[0480] Among them, the processing module can be a processor or a controller, for example, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic boxes, modules and circuits described in combination with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, etc. The sending module 110 and the receiving module 120 can be communication interfaces, transceivers, transceiver circuits, etc., wherein the communication interface is a general term and can include one or more interfaces, and the storage module can be a memory, or other services or modules for providing storage functions.
[0481] Specifically, the specific implementation of various operations performed by the above-mentioned device 100 can refer to the specific operations performed by the master node in the above-mentioned method embodiment, which will not be repeated here.
[0482] It should be understood that the data transmission device 100 is only an example provided in the embodiment of the present application, and the data transmission device 100 may have more Fig.17 The components shown may be more or less than the components, may be combined with two or more components, or may be implemented with a different configuration of components.
[0483] See also Fig.18 , Fig.18 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application, the data transmission device can be applied to the first slave node mentioned above, such as Fig.18 As shown, the data transmission device 200 includes a receiving module 210 and an execution module 220. On the basis of including the receiving module 210 and the execution module 220, it can also include a sending module 230, wherein:
[0484] The receiving module 210 is used to receive data sent by other devices. For example, the receiving module 210 is used to receive Fig.11 In the embodiment shown, the first synchronization time sent by the master node or for receiving Fig.13 The first timing difference value sent by the master node in the illustrated embodiment.
[0485] The execution module 220 is used to execute instructions sent by other devices. For example, the execution module 220 is used to execute Fig.13In the illustrated embodiment, step S706 is performed by the first slave node.
[0486] The sending module 230 is used to send data to other devices. For example, the sending module 230 is used to execute Fig.13 In the embodiment shown, steps S703 and S707 executed by the first slave node or used to execute Fig.16 In the illustrated embodiment, steps S1003 and S1007 are performed by the first slave node.
[0487] Optionally, the data transmission device 200 may further include a synchronization module ( Fig.18 The synchronization module is used to synchronize the first slave node timer with other device timers. For example, the synchronization module is used to execute Fig.11 In the illustrated embodiment, step S503 is performed by the first slave node.
[0488] Optionally, the data transmission device 200 may further include a storage module and a processing module ( Fig.18 The storage module is used to store program codes and data of the data transmission device 200, for example, to store program codes for synchronizing the first slave node timer with the master node timer according to the received third synchronization moment. The processing module is also used to call the program codes in the storage module to implement the implementation steps with the data transmission device 200 as the execution subject, and / or to perform other content steps of the technology described in this application.
[0489] Specifically, the specific implementation of various operations performed by the above-mentioned device 200 can refer to the specific operations of the above-mentioned method embodiment, which will not be repeated here.
[0490] It should be understood that the data transmission device 200 is only an example provided in the embodiment of the present application, and the data transmission device 200 may have more Fig.18 The components shown may be more or less than the components, may be combined with two or more components, or may be implemented with a different configuration of components.
[0491] See also Fig.19 , Fig.19 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application, the data transmission device can be applied to the second slave node mentioned above, such as Fig.19 As shown, the data transmission device 300 includes a receiving module 310 and an execution module 320, wherein:
[0492] The receiving module 310 is used to receive data sent by other devices. For example, the receiving module 210 is used to receive Fig.11 In the embodiment shown, the second synchronization time sent by the master node or for receiving Fig.12The second timing difference value sent by the master node in the illustrated embodiment.
[0493] The execution module 320 is used to execute instructions sent by other devices. For example, the execution module 320 is used to execute Fig.13 In the illustrated embodiment, step S708 is performed by the second slave node.
[0494] Optionally, the data transmission device 300 may further include a sending module ( Fig.19 ), used to send data to other devices.
[0495] Optionally, the data transmission device 300 may further include a synchronization module ( Fig.19 The synchronization module is used to synchronize the second slave node timer with other device timers. For example, the synchronization module is used to execute Fig.11 In the illustrated embodiment, step S504 is performed by the second slave node.
[0496] Optionally, the data transmission device 300 may further include a storage module and a processing module ( Fig.19 The storage module is used to store program codes and data of the data transmission device 300, for example, to store program codes for synchronizing the second slave node timer with the master node timer according to the received second synchronization moment. The processing module is also used to call the program codes in the storage module to implement the implementation steps with the data transmission device 300 as the execution subject, and / or to perform other content steps of the technology described in this application.
[0497] Specifically, the specific implementation of various operations performed by the above-mentioned device 300 can refer to the specific operations of the above-mentioned method embodiment, which will not be repeated here.
[0498] It should be understood that the data transmission device 300 is only an example provided in the embodiment of the present application, and the data transmission device 300 may have more Fig.19 The components shown may be more or less than the components, may be combined with two or more components, or may be implemented with a different configuration of components.
[0499] See also Fig. 20 , Fig. 20 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application, which can be applied to the master node, the first slave node or the second slave node described above, wherein the data transmission device 400 includes: a processor 410, a transceiver 420 and a memory 430, wherein the processor 410, the transceiver 420 and the memory 430 are interconnected via a bus 440, wherein:
[0500] The processor 410 may be composed of one or more general-purpose processors, such as a CPU, or a combination of a CPU and a hardware chip. The hardware chip may be an ASIC, a programmable logic device (PLD) or a combination thereof. The PLD may be a complex programmable logic device (CPLD), an FPGA, a generic array logic (GAL) or any combination thereof.
[0501] The transceiver 420 is used to communicate with other devices.
[0502] The memory 430 may include a volatile memory, such as a random access memory (RAM); the memory may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); the memory 430 may also include a combination of the above types of memory.
[0503] The memory 430 may be used to store program codes and data, so that the processor 410 may call the program codes stored in the memory 430 to implement the functions of the sending module and / or receiving module involved in the embodiments of the present application.
[0504] The bus 440 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus 440 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 20 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0505] It should be understood that Fig. 20 The data transmission device 400 shown may be a chip or a circuit, for example, a chip or a circuit that can be set in a terminal device or a communication device. The transceiver 420 may also be a communication interface. As an implementation, the function of the transceiver 420 may be implemented by a transceiver circuit or a dedicated transceiver chip.
[0506] Specifically, the specific implementation of various operations performed by the above-mentioned data transmission device 400 can refer to the specific operations performed by the master node or the slave node in the above-mentioned method embodiment, which will not be repeated here.
[0507] It should be understood that the data transmission device 400 is only an example provided in the embodiment of the present application, and the data transmission device 400 may have more Fig. 20 The components shown may be more or less than the components, may be combined with two or more components, or may be implemented with a different configuration of components.
[0508] The present application also provides an electronic device, Fig.21 FIG. 5 is a schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present application. Fig.21 As shown, the electronic device 500 includes: a processor 510, a communication interface 520 and a memory 530. The processor 510, the communication interface 520 and the memory 530 may be interconnected via an internal bus 540, or may communicate via other means such as wireless transmission.
[0509] The present application embodiment takes the connection through bus 540 as an example, and bus 540 may be a PCI bus or an EISA bus, etc. Bus 540 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.21 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0510] The processor 510 may be composed of at least one general-purpose processor, such as a CPU, or a combination of a CPU and a hardware chip. The hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. The processor 510 executes various types of digital storage instructions, such as software or firmware programs stored in the memory 530, which enables the electronic device 500 to provide a wide variety of services.
[0511] The memory 530 is used to store program codes and is controlled by the processor 510 to execute the above Figures 11 to 16 The processing steps performed by the master node, the first slave node, and the second slave node in any embodiment may be specifically referred to above. Figures 11 to 16 The relevant description of the embodiments shown in any figure will not be elaborated here.
[0512] The memory 530 may include a volatile memory, such as a RAM; the memory 530 may also include a non-volatile memory, such as a ROM, a flash memory, a HDD or a SSD; the memory 530 may also include a combination of the above types.
[0513] The communication interface 520 can be a wired interface (such as an Ethernet interface), an internal interface (such as a high-speed serial computer expansion bus (Peripheral Component Interconnect express, PCIE) bus interface), a wired interface (such as an Ethernet interface) or a wireless interface (such as a cellular network interface or a wireless local area network interface) for communicating with other devices or modules.
[0514] Need to explain, Fig.21 This is only a possible implementation of the embodiment of the present application. In practical applications, the electronic device may also include more or fewer components, which is not limited here. Figures 11 to 16 The relevant explanations in the embodiments are not repeated here.
[0515] The present application also provides a vehicle, wherein the vehicle may include the above-mentioned Fig.17 The data transmission device 100 shown, and / or Fig.18 The data transmission device 200 shown, and / or Fig.19 A data transmission device 300 is shown.
[0516] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a processor, Figures 11 to 16 The method flow shown in any one of the figures is realized.
[0517] The present application also provides a computer program product. When the computer program product is run on a processor, Figures 11 to 16 The method flow shown in any one of the figures is realized.
[0518] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0519] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0520] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0521] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0522] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0523] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0524] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0525] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk. The above is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A data transmission method, characterized in that: The method is applied to the master node, comprising: The master node sends a first synchronization time, where the first synchronization time is calculated according to the number of multiple first training frames sent by the master node during link training between the master node and the slave node and the duration of the multiple first training frames, where the duration of the multiple first training frames is the time used to send the multiple first training frames; The first synchronization time is used to synchronize the first slave node timer with the master node timer; The master node sends a first preset instruction; Among them, the first preset instruction includes a first instruction effective time, and the first instruction effective time is used to indicate the time when the first slave node executes the first preset instruction. The first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the first link is the link between the master node and the first slave node.
2. The method according to claim 1, characterized in that The method further comprises: The master node sends a second synchronization time; The second synchronization time is used to synchronize the second slave node timer with the master node timer; The master node sends a second preset instruction; Among them, the second preset instruction includes the second instruction effective time, the second instruction effective time is used to indicate the time when the second slave node executes the second preset instruction, the second instruction effective time is greater than or equal to the sum of the sending time of the second preset instruction and the maximum delay of the second link, the second instruction effective time is the same as the first instruction effective time, and the second link is the link between the master node and the second slave node.
3. The method according to claim 2, characterized in that The first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
4. A data transmission method, characterized in that: The method is applied to a slave node and comprises: The first slave node receives a first synchronization time, where the first synchronization time is calculated according to the number of multiple first training frames sent by the master node and the duration of the multiple first training frames during the link training between the master node and the slave node, where the duration of the multiple first training frames is the time used to send the multiple first training frames; The first synchronization time is used to synchronize the first slave node timer with the master node timer; The first slave node receives a first preset instruction; The first preset instruction includes a first instruction effective time, the first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the first link is a link between the first slave node and the master node; The first slave node executes the first preset instruction when the first instruction takes effect.
5. The method according to claim 4, characterized in that The method further comprises: The second slave node receives a second synchronization time; The second synchronization time is used to synchronize the second slave node timer with the master node timer; The second slave node receives a second preset instruction; The second preset instruction includes a second instruction effective time, the second instruction effective time is greater than or equal to the sum of the sending time of the second preset instruction and the maximum delay of the second link, the second instruction effective time is the same as the first instruction effective time, and the second link is a link between the master node and the second slave node; The second slave node executes the second preset instruction when the second instruction takes effect.
6. The method according to claim 5, characterized in that The first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
7. A data transmission method, characterized in that: The method is applied to a data transmission system, the data transmission system includes a master node and a first slave node, and the method includes: The master node sends a first synchronization time to the first slave node, where the first synchronization time is calculated according to the number of multiple first training frames sent by the master node during link training between the master node and the slave node and the duration of the multiple first training frames, where the duration of the multiple first training frames is the time used to send the multiple first training frames; The first synchronization time is used to synchronize the first slave node timer with the master node timer; The master node sends a first preset instruction to the first slave node; The first preset instruction includes a first instruction effective time, the first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the first link is a link between the master node and the first slave node; The first slave node executes the first preset instruction when the first instruction takes effect.
8. The method according to claim 7, characterized in that The data transmission system further includes a second slave node, and the method further includes: The master node sends a second synchronization time to the second slave node; The second synchronization time is used to synchronize the second slave node timer with the master node timer; The master node sends a second preset instruction to the second slave node; The second preset instruction includes a second instruction effective time, the second instruction effective time is greater than or equal to the sum of the sending time of the second preset instruction and the maximum delay of the second link, the second instruction effective time is the same as the first instruction effective time, and the second link is a link between the master node and the second slave node; The second slave node executes the second preset instruction when the second instruction takes effect.
9. The method according to claim 8, characterized in that The first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
10. A data transmission device, characterized in that: The device is applied to a master node and includes: A sending module, used to send a first synchronization moment, where the first synchronization moment is calculated according to the number of multiple first training frames sent by the master node during the link training between the master node and the slave node and the duration of the multiple first training frames, where the duration of the multiple first training frames is the time used to send the multiple first training frames; The first synchronization time is used to synchronize the first slave node timer with the master node timer; The sending module is further used to send a first preset instruction; Among them, the first preset instruction includes a first instruction effective time, and the first instruction effective time is used to indicate the time when the first slave node executes the first preset instruction. The first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the first link is the link between the master node and the first slave node.
11. The device according to claim 10, characterized in that The sending module is also used for: Sending a second synchronization time; The second synchronization time is used to synchronize the second slave node timer with the master node timer; Sending a second preset instruction; Among them, the second preset instruction includes the second instruction effective time, the second instruction effective time is used to indicate the time when the second slave node executes the second preset instruction, the second instruction effective time is greater than or equal to the sum of the time of sending the second preset instruction and the maximum delay of the second link, the second instruction effective time is the same as the first instruction effective time, and the second link is the link between the master node and the second slave node.
12. The device according to claim 11, characterized in that The first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
13. A data transmission device, characterized in that: The device includes a first sub-device, the first sub-device is applied to a first slave node, and the first sub-device includes: A first receiving module is used to receive a first synchronization moment, where the first synchronization moment is calculated according to the number of multiple first training frames sent by the master node and the duration of the multiple first training frames during the link training between the master node and the slave node, where the duration of the multiple first training frames is the time used to send the multiple first training frames; The first synchronization time is used to synchronize the first slave node timer with the master node timer; The first receiving module is further used to receive a first preset instruction; The first preset instruction includes a first instruction effective time, the first instruction effective time is greater than or equal to the sum of the sending time of the first preset instruction and the maximum delay of the first link, and the first link is a link between the first slave node and the master node; The first execution module is used to execute the first preset instruction when the first instruction takes effect.
14. The data transmission device according to claim 13, characterized in that: The device further includes a second sub-device, which is applied to a second slave node, and includes: A second receiving module, used for receiving a second synchronization time; The second synchronization time is used to synchronize the second slave node timer with the master node timer; The second receiving module is further used to receive a second preset instruction; The second preset instruction includes a second instruction effective time, the second instruction effective time is greater than or equal to the sum of the sending time of the second preset instruction and the maximum delay of the second link, the second instruction effective time is the same as the first instruction effective time, and the second link is a link between the master node and the second slave node; The second execution module is used to execute the second preset instruction when the second instruction takes effect.
15. The data transmission device according to claim 14, characterized in that: The first preset instruction is used to instruct the first camera to take a picture, and the second preset instruction is used to instruct the second camera to take a picture; or, the first preset instruction is used to instruct the first display device to display, and the second preset instruction is used to instruct the second display device to display.
16. A data transmission system, characterized in that: The system comprises the data transmission device according to any one of claims 10 to 12 and the data transmission device according to any one of claims 13 to 15.
17. A data transmission device, characterized in that: The device comprises a processor and a memory; the memory is used to store instructions, and the processor is used to execute the instructions. When the processor executes the instructions, the data transmission device executes the method according to any one of claims 1 to 3.
18. A data transmission device, characterized in that: The device comprises a processor and a memory; the memory is used to store instructions, and the processor is used to execute the instructions. When the processor executes the instructions, the data transmission device executes the method according to any one of claims 4 to 6.
19. A computer-readable storage medium, characterized in that: The computer-readable medium stores computer-readable instructions, and when the computer-readable instructions are executed, the method according to any one of claims 1 to 9 is executed.
20. An electronic device, characterized in that: The method comprises one or more processors, wherein the one or more processors are coupled to a memory, wherein a computer program is stored in the memory, and the processor is used to execute the computer program stored in the memory to implement the method according to any one of claims 1 to 9.
