WO2022140995A1 - 数据传输方法、装置及相关设备 - Google Patents

数据传输方法、装置及相关设备 Download PDF

Info

Publication number
WO2022140995A1
WO2022140995A1 PCT/CN2020/140399 CN2020140399W WO2022140995A1 WO 2022140995 A1 WO2022140995 A1 WO 2022140995A1 CN 2020140399 W CN2020140399 W CN 2020140399W WO 2022140995 A1 WO2022140995 A1 WO 2022140995A1
Authority
WO
WIPO (PCT)
Prior art keywords
slave node
instruction
preset
link
node
Prior art date
Application number
PCT/CN2020/140399
Other languages
English (en)
French (fr)
Inventor
李超
张兴新
鲍鹏鑫
刘济凌
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2020/140399 priority Critical patent/WO2022140995A1/zh
Priority to EP20967345.8A priority patent/EP4258575A4/en
Priority to CN202080004787.2A priority patent/CN112740579B/zh
Priority to CN202210651666.8A priority patent/CN115396056A/zh
Publication of WO2022140995A1 publication Critical patent/WO2022140995A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/28Timers or timing mechanisms used in protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays

Definitions

  • the present application relates to the field of computer technology, and in particular, to a data transmission method, apparatus and related equipment.
  • the master node In a communication system, multiple devices communicate, and the master node (command sender) sometimes expects multiple slave nodes (command receiver) to synchronously execute the commands sent by themselves at a certain time, so as to obtain multiple slave nodes at the same time.
  • the data obtained at all times such as the scene in which a multi-domain controller (MDC) in the in-vehicle communication network controls multiple cameras to take pictures synchronously.
  • MDC multi-domain controller
  • the master node when the master node sends an instruction to each slave node, the master node usually divides the instruction to be sent into multiple data blocks with a fixed order and transmits it to the slave node, and the master node transmits multiple data blocks to each slave node. During the process, 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, and the transmission of data block 3 is omitted. In the case of a transmission error, the master node will reschedule the transmission of the wrongly transmitted data block, which usually leads to an irregular delay in the transmission of the command, which causes jitter when each slave node executes the command. In the case where jitter occurs when some or all of the slave nodes execute instructions, the problem occurs that the times when the multiple slave nodes execute instructions cannot be synchronized.
  • the embodiments of the present application provide a data transmission method, apparatus, and related equipment, so as to realize synchronization of the execution time of multiple slave nodes when there is an unfixed delay in transmitting instructions from a master node to multiple slave nodes.
  • a data transmission method is provided, and the method is applied to a master node, including:
  • the first synchronization moment is used to realize the synchronization of the first slave node timer and the master node timer;
  • the first preset instruction includes a first instruction effective time
  • the first instruction effective time is used to instruct the first slave node to execute 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 command and the maximum delay of the first link, where the first link is the link between the master node and the first slave node.
  • the master node instructs the first slave node to realize the synchronization of the first slave node timer and the master node timer according to the first synchronization time by sending the first synchronization time to the first slave node.
  • the master node then sends the first preset command including the first command effective time (the first command effective time includes the maximum delay of the first link) to the first slave node, so that the first slave node is timed to
  • the first preset command is executed when the first command takes effect, so as to avoid jitter at the moment when the first slave node executes the command sent by the master node under the condition that there will be an unfixed delay in transmitting the command from the master node to the first slave node .
  • the method further includes:
  • the second synchronization moment is used to realize the synchronization of the second slave node timer and the master node timer;
  • the second preset instruction includes the second instruction effective time
  • the second instruction effective time is used to instruct the second slave node to execute 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 command and the maximum delay of the second link
  • the second command effective time is the same as the first command effective time
  • the second link is the the link between the master node and the second slave node.
  • the master node instructs the second slave node to realize the synchronization of the second slave node timer and the master node timer according to the second synchronization time by sending the second synchronization time to the second slave node.
  • the master node then sends the second preset command including the second command effective time (the second command effective time includes the maximum delay of the second link) to the second slave node, so that the second slave node is timing to When the second command takes effect, the second preset command is executed. Since the second command takes effect and the first command takes effect at the same time, it can be realized that the second slave node executes the second preset command and the first slave node. The timing of executing the first preset instruction is synchronized.
  • the method further includes:
  • the first slave node sends a third synchronization moment to the second slave node
  • the third synchronization moment is used to realize the synchronization of the second slave node timer and the first slave node timer;
  • the first slave node forwards the second preset instruction to the second slave node
  • the second preset instruction includes the second instruction effective time
  • the second instruction effective time is used to instruct the second slave node to execute the second preset instruction
  • the second instruction effective time greater than or equal to the sum of the moment when the master node sends the second preset command to the first slave node, the maximum delay of the first link and the maximum delay of the third link
  • the first The effective time of the second instruction is the same as the effective time of the first instruction
  • the third link is a link between the first slave node and the second slave node.
  • the master node when the second slave node timer is synchronized with the first slave node timer, the master node will include the second command effective time (the second command effective time includes the maximum delay of the second link).
  • Two preset instructions are sent 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 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 time, the time when the second slave node executes the second preset instruction can be synchronized with the time when the first slave node executes the first preset instruction.
  • the first preset instruction is used to instruct the first camera to take a photo
  • the second preset instruction is used to instruct the second camera to take a photo
  • the first preset instruction It is used to instruct the first display device to display
  • the second preset instruction is used to instruct the second display device to display.
  • the above solution can realize that the first slave node and the second slave node take photos synchronously;
  • the above solution can realize synchronous display of the first slave node and the second slave node.
  • a data transmission method is provided, and the method is applied to a slave node, including:
  • the first slave node receives the first synchronization moment
  • the first synchronization moment is used to realize the synchronization of the first slave node timer and the master node timer;
  • the first slave node receives a first preset instruction
  • the first preset instruction includes the 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, the first link is the 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.
  • the method further includes:
  • the second slave node receives the second synchronization moment
  • the second synchronization moment is used to realize the synchronization of the second slave node timer and the master node timer;
  • the second slave node receives a second preset instruction
  • the second preset instruction includes the 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 The effective time of the second instruction is the same as the effective time of the first instruction, and the second link is the 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.
  • the method further includes:
  • the first slave node sends a third synchronization moment to the second slave node
  • the third synchronization moment is used to realize the synchronization of the second slave node timer and the first slave node timer;
  • the second preset instruction includes the second instruction effective time
  • the second instruction effective time is used to instruct the second slave node to execute the second preset instruction
  • the second instruction effective time greater than or equal to the sum of the time when the first slave node sends the second preset command to the second slave node and the maximum delay of the third link, the time when the second command takes effect and the first The instruction takes effect at the same time
  • the third link is a link between the first slave node and the second slave node.
  • the second preset instruction is generated by the master node or generated by the first slave node.
  • the first preset instruction is used to instruct the first camera to take a photo
  • the second preset instruction is used to instruct the second camera to take a photo
  • the first preset instruction It is used to instruct the first display device to display
  • the second preset instruction is used to instruct the second display device to display.
  • a data transmission method is provided, 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 first synchronization moment is used to realize the synchronization of the first slave node timer and the master node timer;
  • the first preset instruction includes the 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.
  • a 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.
  • the data transmission system further includes a second slave node
  • the method further includes: the master node sending a second synchronization moment to the second slave node;
  • the second synchronization moment is used to realize the synchronization of the second slave node timer and the master node timer;
  • the second preset instruction includes the 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 The second instruction effective time and the first instruction effective time are the same time, and the second link is the 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.
  • the data transmission system further includes a second slave node
  • the method further includes:
  • the third synchronization moment is used to realize the synchronization of the second slave node timer and the first slave node timer;
  • the second preset instruction includes a second instruction effective time, and the second instruction effective time is greater than or equal to the time when the first slave node sends the second preset instruction to the second slave node and The sum of the maximum delays of the third link, the effective time of the second instruction is the same as the effective time of the first instruction, and the third link is between the first slave node and the second slave node link;
  • the second slave node executes the second preset instruction when the second instruction takes effect.
  • the second preset instruction is generated by the master node or generated by the first slave node.
  • the first preset instruction is used to instruct the first camera to take a photo
  • the second preset instruction is used to instruct the second camera to take a photo
  • the first preset instruction It is used to instruct the first display device to display
  • the second preset instruction is used to instruct the second display device to display.
  • a data transmission method is provided, and the method is applied to a master node, including:
  • the fourth synchronization moment is used to realize the synchronization of the master node timer and the first slave node timer;
  • the first preset instruction includes a first instruction effective time
  • the first instruction effective time is used to instruct the first slave node to execute 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 command and the maximum delay of the first link, where the first link is the link between the master node and the first slave node.
  • the master node realizes the synchronization of the master node timer and the slave node timer according to the fourth synchronization time by receiving the fourth synchronization time sent by the slave node.
  • the master node will then include The first preset command at the time when the first command takes effect is sent to the first slave node, so that the first slave node executes the first preset command when timing to the time when the first command takes effect, so as to realize the transmission from the master node to the first slave node
  • the command has an unfixed delay, the jitter at the moment when the first slave node executes the command sent by the master node is avoided.
  • the method further includes:
  • the third synchronization moment is used to realize the synchronization of the second slave node timer and the first slave node timer;
  • the first slave node forwards the second preset instruction to the second slave node
  • the second preset instruction includes the second instruction effective time
  • the second instruction effective time is used to instruct the second slave node to execute the second preset instruction
  • the second instruction effective time greater than or equal to the sum of the moment when the master node sends the second preset command to the first slave node, the maximum delay of the first link and the maximum delay of the third link
  • the first The effective time of the second instruction is the same as the effective time of the first instruction
  • the third link is a link between the first slave node and the second slave node.
  • the first preset instruction is used to instruct the first camera to take a photo
  • the second preset instruction is used to instruct the second camera to take a photo
  • the first preset instruction It is used to instruct the first display device to display
  • the second preset instruction is used to instruct the second display device to display.
  • a fifth aspect provides a data transmission method, the method is applied to a slave node, including:
  • the first slave node sends the fourth synchronization moment
  • the fourth synchronization moment is used to realize the synchronization of the master node timer and the first slave node timer;
  • the first slave node receives a first preset instruction
  • the first preset instruction includes the 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, the first link is the 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.
  • the method further includes:
  • the first slave node sends a third synchronization moment to the second slave node
  • the third synchronization moment is used to realize the synchronization of the second slave node timer and the first slave node timer;
  • the second preset instruction includes the second instruction effective time
  • the second instruction effective time is used to instruct the second slave node to execute the second preset instruction
  • the second instruction effective time greater than or equal to the sum of the time when the first slave node sends the second preset command to the second slave node and the maximum delay of the third link, the time when the second command takes effect and the first The instruction takes effect at the same time
  • the third link is a link between the first slave node and the second slave node.
  • the second preset instruction is generated by the master node or generated by the first slave node.
  • the first preset instruction is used to instruct the first camera to take a photo
  • the second preset instruction is used to instruct the second camera to take a photo
  • the first preset instruction It is used to instruct the first display device to display
  • the second preset instruction is used to instruct the second display device to display.
  • a data transmission method is provided, 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 first slave node sends a fourth synchronization time to the master node; the fourth synchronization time is used to synchronize the master node timer and the first slave node timer;
  • the first preset instruction includes the 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.
  • a 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.
  • the data transmission system further includes a second slave node
  • the method further includes:
  • the third synchronization moment is used to realize the synchronization of the second slave node timer and the first slave node timer;
  • the second preset instruction includes a second instruction effective time, and the second instruction effective time is greater than or equal to the time when the first slave node sends the second preset instruction to the second slave node and The sum of the maximum delays of the third link, the effective time of the second instruction is the same as the effective time of the first instruction, and the third link is between the first slave node and the second slave node link;
  • the second slave node executes the second preset instruction when the second instruction takes effect.
  • the second preset instruction is generated by the master node or generated by the first slave node.
  • the first preset instruction is used to instruct the first camera to take a photo
  • the second preset instruction is used to instruct the second camera to take a photo
  • the first preset instruction It is used to instruct the first display device to display
  • the second preset instruction is used to instruct the second display device to display.
  • a data transmission method is provided, and the method is applied to the master node, including:
  • the master node obtains the first timing difference, and sends the first timing difference
  • the first timing difference is used to synchronize the first slave node timer and the master node timer, and the first timing difference value is the master node timer and the first time when the first link training is completed.
  • the timing difference value of the slave node timer, the first link is the link between the master node and the first slave node;
  • the first preset instruction includes a first instruction effective time
  • the first instruction effective time is used to instruct the first slave node to execute the first preset instruction
  • the first instruction effective time It is greater than or equal to the sum of the sending moment of the first preset command and the maximum delay of the first link.
  • the master node instructs the first slave node to realize the synchronization of the first slave node timer and the master node timer according to the first timing difference value by sending the first timing difference value to the first slave node.
  • the master node then sends the 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 timing to the effective time of the first instruction, thereby
  • the jitter of the moment when the first slave node executes the instruction sent by the master node is avoided.
  • the method further includes:
  • the master node obtains the second timing difference, and sends the second timing difference
  • the second timing difference is used to realize the synchronization of the second slave node timer and the master node timer, and the second timing difference value is the master node timer and the second timing difference when the second link training is completed.
  • the timing difference value of the slave node timer, the second link is the link between the master node and the second slave node;
  • the second preset instruction includes the second instruction effective time
  • the second instruction effective time is used to instruct the second slave node to execute the second preset instruction time
  • the second instruction effective time It is greater than or equal to the sum of the sending time of the second preset command and the maximum delay of the second link, and the effective time of the second command is the same as the effective time of the first command.
  • the master node instructs the second slave node to synchronize the second slave node timer and the master node timer according to the second timing difference value by sending the second timing difference value to the second slave node.
  • the master node sends the second preset instruction including the second instruction effective time 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.
  • the effective time of the second instruction and the effective time of the first instruction are the same time, so the time when the second slave node executes the second preset instruction can be synchronized with the time when the first slave node executes the first preset instruction.
  • the method further includes:
  • the first slave node obtains the third timing difference value, and sends the third timing difference value to the second slave node;
  • the third timing difference is used to synchronize the second slave node timer with the first slave node timer, and the third timing difference value is the timing of the first slave node when the third link training is completed the timing difference between the timer and the timer of the second slave node, and the third link is the link between the first slave node and the second slave node;
  • the first slave node forwards the second preset instruction to the second slave node
  • the second preset instruction includes the second instruction effective time
  • the second instruction effective time is used to instruct the second slave node to execute the second preset instruction
  • the second instruction effective time greater than or equal to the time when the master node sends the second preset command to the first slave node, the sum of the maximum delay of the first link and the maximum delay of the third link, the second command The effective time is the same as the effective time of the first instruction.
  • the first preset instruction is used to instruct the first camera to take a photo
  • the second preset instruction is used to instruct the second camera to take a photo
  • the first preset instruction It is used to instruct the first display device to display
  • the second preset instruction is used to instruct the second display device to display.
  • a data transmission method is provided, and the method is applied to a slave node, including:
  • the first slave node receives the first timing difference
  • the first timing difference is used to synchronize the first slave node timer and the master node timer, and the first timing difference value is the master node timer and the first time when the first link training is completed.
  • the timing difference of the slave node timer, the first link is the link between the first slave node and the master node;
  • the first slave node receives a first preset instruction
  • the first preset instruction includes the 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;
  • the first slave node executes the first preset instruction when the first instruction takes effect.
  • the method further includes:
  • the second slave node receives the second timing difference
  • the second timing difference is used to realize the synchronization of the second slave node timer and the master node timer;
  • the second slave node receives a second preset instruction
  • the second preset instruction includes the 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 The effective time of the second instruction is the same as the effective time of the first instruction, and the second link is the 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.
  • the method further includes:
  • the third timing difference is used to synchronize the second slave node timer with the first slave node timer, and the second timing difference value is the timing of the first slave node when the third link training is completed the timing difference between the timer and the timer of the second slave node, and the third link is the link between the first slave node and the second slave node;
  • the second preset instruction includes the second instruction effective time, the second instruction effective time is used to instruct the second slave node to execute the second preset instruction, and the second instruction effective time greater than or equal to the sum of the time when the first slave node sends the second preset command to the second slave node and the maximum delay of the third link, the time when the second command takes effect and the first The command takes effect at the same time.
  • the second preset instruction is generated by the master node or generated by the first slave node.
  • the first preset instruction is used to instruct the first camera to take a photo
  • the second preset instruction is used to instruct the second camera to take a photo
  • the first preset instruction It is used to instruct the first display device to display
  • the second preset instruction is used to instruct the second display device to display.
  • a data transmission method is provided, 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 first timing difference is used to realize the synchronization of the first slave node timer and the master node timer;
  • the first preset instruction includes the 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.
  • a 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.
  • the data transmission system further includes a second slave node
  • the method further includes:
  • the second timing difference is used to realize the synchronization of the second slave node timer and the master node timer;
  • the second preset instruction includes the 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 The second instruction effective time and the first instruction effective time are the same time, and the second link is the 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.
  • the data transmission system further includes a second slave node
  • the method further includes:
  • the third timing difference is used to synchronize the second slave node timer with the first slave node timer, and the third timing difference value is the timing of the first slave node when the third link training is completed the timing difference between the timer and the second slave node timer;
  • the second preset instruction includes the second instruction effective time, 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 The sum of the maximum delay of the first link and the maximum delay of the third link, the time when the second command takes effect is the same as the time when the first command takes effect, and the third link is the first slave node a link with the second slave node;
  • the second slave node executes the second preset instruction when the second instruction takes effect.
  • the second preset instruction is generated by the master node or generated by the first slave node.
  • the first preset instruction is used to instruct the first camera to take a photo
  • the second preset instruction is used to instruct the second camera to take a photo
  • the first preset instruction It is used to instruct the first display device to display
  • the second preset instruction is used to instruct the second display device to display.
  • a tenth aspect provides a data transmission apparatus, the apparatus is applied to a master node, including:
  • a sending module for sending the first synchronization moment
  • the first synchronization moment is used to realize the synchronization of the first slave node timer and the master node timer;
  • the sending module is further configured to send the first preset instruction
  • the first preset instruction includes a first instruction effective time
  • the first instruction effective time is used to instruct the first slave node to execute 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 command and the maximum delay of the first link, where the first link is the link between the master node and the first slave node.
  • the sending module is further configured to:
  • the second synchronization moment is used to realize the synchronization of the second slave node timer and the master node timer;
  • the second preset instruction includes the second instruction effective time
  • the second instruction effective time is used to instruct the second slave node to execute 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 command and the maximum delay of the second link
  • the second command effective time is the same as the first command effective time
  • the second link is the the link between the master node and the second slave node.
  • the first preset instruction is used to instruct the first camera to take a photo
  • the second preset instruction is used to instruct the second camera to take a photo
  • the first preset instruction It is used to instruct the first display device to display
  • the second preset instruction is used to instruct the second display device to display.
  • a data transmission 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 configured to receive the first synchronization moment
  • the first synchronization moment is used to realize the synchronization of the first slave node timer and the master node timer;
  • the first receiving module is further configured to receive a first preset instruction
  • the first preset instruction includes the 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, the first link is the link between the first slave node and the master node;
  • a first execution module configured to execute the first preset instruction when the first instruction takes effect.
  • system further includes a second sub-device, the second sub-device is applied to the second slave node, and the second sub-device includes:
  • a second receiving module configured to receive the second synchronization moment
  • the second synchronization moment is used to realize the synchronization of the second slave node timer and the master node timer;
  • the second receiving module is further configured to receive a second preset instruction
  • the second preset instruction includes the 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 The effective time of the second instruction is the same as the effective time of the first instruction, and the second link is the link between the master node and the second slave node;
  • the second execution module is configured to execute the second preset instruction when the second instruction takes effect.
  • the first sub-device further includes:
  • a sending module configured to send the second synchronization moment to the second slave node
  • the second synchronization moment is used to realize the synchronization of the second slave node timer and the first slave node timer;
  • the sending module is further configured to send a second preset instruction to the second slave node
  • the second preset instruction includes the second instruction effective time
  • the second instruction effective time is used to instruct the second slave node to execute the second preset instruction
  • the second instruction effective time greater than or equal to the sum of the time when the first slave node sends the second preset command to the second slave node and the maximum delay of the third link, the time when the second command takes effect and the first The instruction takes effect at the same time
  • the third link is a link between the first slave node and the second slave node.
  • the second preset instruction is generated by the master node or generated by the first slave node.
  • the first preset instruction is used to instruct the first camera to take a photo
  • the second preset instruction is used to instruct the second camera to take a photo
  • the first preset instruction It is used to instruct the first display device to display
  • the second preset instruction is used to instruct the second display device to display.
  • a twelfth aspect provides a data transmission system, the system comprising the data transmission device described in the tenth aspect and the data transmission device described in the eleventh aspect.
  • a thirteenth aspect provides a data transmission apparatus, the apparatus is applied to a master node, including:
  • a receiving module for receiving the fourth synchronization moment
  • the fourth synchronization moment is used to realize the synchronization of the master node timer and the first slave node timer;
  • a sending module configured to send the first preset command
  • the first preset instruction includes a first instruction effective time
  • the first instruction effective time is used to instruct the first slave node to execute 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 command and the maximum delay of the first link, where the first link is the link between the master node and the first slave node.
  • the first preset instruction is used to instruct the first camera to take a picture; or, the first preset instruction is used to instruct the first display device to display.
  • a fourteenth aspect provides a data transmission apparatus, the apparatus is applied to the first slave node, including:
  • a sending module for sending the fourth synchronization moment
  • the fourth synchronization moment is used to realize the synchronization of the master node timer and the first slave node timer;
  • a receiving module for receiving the first preset command
  • the first preset instruction includes the 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, the first link is the link between the first slave node and the master node;
  • the execution module is configured to execute the first preset instruction when the first instruction takes effect.
  • the sending module is further configured to:
  • the third synchronization moment is used to realize the synchronization of the second slave node timer and the first slave node timer;
  • the second preset instruction includes the second instruction effective time
  • the second instruction effective time is used to instruct the second slave node to execute the second preset instruction
  • the second instruction effective time greater than or equal to the sum of the time when the first slave node sends the second preset command to the second slave node and the maximum delay of the third link, the time when the second command takes effect and the first The instruction takes effect at the same time
  • the third link is a link between the first slave node and the second slave node.
  • the second preset instruction is generated by the master node or generated by the first slave node.
  • the first preset instruction is used to instruct the first camera to take a photo
  • the second preset instruction is used to instruct the second camera to take a photo
  • the first preset instruction It is used to instruct the first display device to display
  • the second preset instruction is used to instruct the second display device to display.
  • a fifteenth aspect provides a data transmission system, the system comprising the data transmission device of the thirteenth aspect and the data transmission device of the fourteenth aspect.
  • a sixteenth aspect provides a data transmission apparatus, the apparatus is applied to a master node, including:
  • a sending module configured to obtain the first timing difference and send the first timing difference
  • the first timing difference is used to synchronize the first slave node timer and the master node timer, and the first timing difference value is the master node timer and the first time when the first link training is completed.
  • the timing difference value of the slave node timer, the first link is the link between the master node and the first slave node;
  • the sending module is further configured to send the first preset instruction
  • the first preset instruction includes a first instruction effective time
  • the first instruction effective time is used to instruct the first slave node to execute the first preset instruction
  • the first instruction effective time It is greater than or equal to the sum of the sending moment of the first preset command and the maximum delay of the first link.
  • the sending module is further configured to:
  • the second timing difference is used to realize the synchronization of the second slave node timer and the master node timer, and the second timing difference value is the master node timer and the second timing difference when the second link training is completed.
  • the timing difference value of the slave node timer, the second link is the link between the master node and the second slave node;
  • the second preset instruction includes the second instruction effective time
  • the second instruction effective time is used to instruct the second slave node to execute the second preset instruction
  • the second instruction effective time It is greater than or equal to the sum of the sending time of the second preset command and the maximum delay of the second link, and the effective time of the second command is the same as the effective time of the first command.
  • the first preset instruction is used to instruct the first camera to take a photo
  • the second preset instruction is used to instruct the second camera to take a photo
  • the first preset instruction It is used to instruct the first display device to display
  • the second preset instruction is used to instruct the second display device to display.
  • a seventeenth aspect provides a data transmission device, the system 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 configured to receive the first timing difference
  • the first timing difference is used to synchronize the first slave node timer and the master node timer, and the first timing difference value is the master node timer and the first time when the first link training is completed.
  • the timing difference of the slave node timer, the first link is the link between the first slave node and the master node;
  • the first receiving module is further configured to receive a first preset instruction
  • the first preset instruction includes the 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;
  • a first execution module configured to execute the first preset instruction when the first instruction takes effect.
  • system further includes a second sub-device, the second sub-device is applied to the second slave node, and the second sub-device includes:
  • a second receiving module configured to receive the second timing difference
  • the second timing difference is used to synchronize the second slave node timer and the master node timer, and the second timing difference is the master node timer and the master node timer when the second link training is completed.
  • the second receiving module is further configured to receive a second preset instruction
  • the second preset instruction includes the 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 The effective time of the second instruction is the same as the effective time of the first instruction, and the second link is the link between the master node and the second slave node;
  • the second execution module is configured to execute the second preset instruction when the second instruction takes effect.
  • the first sub-device further includes:
  • a sending module configured to obtain a third timing difference value, and send the third timing difference value to the second slave node
  • the third timing difference is used to synchronize the second slave node timer with the first slave node timer, and the third timing difference value is the timing of the first slave node when the third link training is completed the timing difference between the timer and the timer of the second slave node, and the third link is the link between the first slave node and the second slave node;
  • the sending module is further configured to send a second preset instruction to the second slave node
  • the second preset instruction includes the second instruction effective time
  • the second instruction effective time is used to instruct the second slave node to execute the second preset instruction time
  • the second instruction effective time greater than or equal to the sum of the time when the first slave node sends the second preset command to the second slave node and the maximum delay of the third link, the time when the second command takes effect and the A command takes effect at the same time.
  • the second preset instruction is generated by the master node or generated by the first slave node.
  • the first preset instruction is used to instruct the first camera to take a photo
  • the second preset instruction is used to instruct the second camera to take a photo
  • the first preset instruction It is used to instruct the first display device to display
  • the second preset instruction is used to instruct the second display device to display.
  • a data transmission system comprising the data transmission device according to the sixteenth aspect and the data transmission device according to the seventeenth aspect.
  • a nineteenth aspect provides a data transmission apparatus, the apparatus includes a processor and a memory; the memory is used for storing instructions, the processor is used for executing the instructions, and when the processor executes the instructions , the data transmission apparatus 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.
  • a data transmission apparatus in a twentieth aspect, includes a processor and a memory; the memory is used for storing instructions, the processor is used for executing the instructions, and when the processor executes the instructions , the data transmission apparatus 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.
  • a twenty-first aspect provides a computer-readable storage medium, where computer-readable instructions are stored in the computer-readable medium, and when the computer-readable instructions are executed, the first to ninth aspects described above are performed The method of any one of the aspects.
  • an electronic device comprising one or more processors coupled to a memory having a computer program stored thereon, the processors configured to execute the The computer program stored on the memory is used to implement the method according to any one of the above-mentioned first to ninth aspects.
  • a twenty-third aspect provides a computer program product, comprising a computer program, which, when the computer program is read and executed by a computing device, causes the computing device to perform any one of the first to ninth aspects above the method described in the aspect.
  • a twenty-fourth aspect provides a vehicle, comprising the data transmission device of the tenth aspect and the data transmission device of the eleventh aspect, or the data transmission device of the thirteenth aspect and The data transmission device according to the fourteenth aspect above, or the data transmission device according to the sixteenth aspect and the data transmission device according to the seventeenth aspect, or the data transmission device according to the nineteenth aspect.
  • FIG. 1 is a schematic structural diagram of a communication system involved in an embodiment of the application
  • FIG. 2 is a schematic flowchart of a link training method involved in an embodiment of the present application
  • FIG. 3 is a schematic diagram of the states of a master node and a slave node in a link training process involved in an embodiment of the application;
  • FIG. 4 is an interactive schematic diagram of a data transmission method provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of transmission of a first training frame and a second training frame involved in an embodiment of the application;
  • FIG. 6 is an interactive schematic diagram of a data transmission method provided by an embodiment of the present application.
  • FIG. 7 is an interactive schematic diagram of a data transmission method provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of another communication system involved in an embodiment of the application.
  • FIG. 9 is a schematic structural diagram of an in-vehicle camera system according to an embodiment of the application.
  • FIG. 10 is a schematic diagram of a vehicle according to an embodiment of the application implementing synchronous photography
  • FIG. 11 is an interactive schematic diagram of a method for synchronously executing instructions according to an embodiment of the present application.
  • FIG. 12 is an interactive schematic diagram of a method for synchronously executing instructions according to an embodiment of the present application.
  • FIG. 13 is an interactive schematic diagram of a method for synchronously executing instructions according to an embodiment of the present application
  • FIG. 14 is an interactive schematic diagram of a method for synchronously executing instructions according to an embodiment of the present application.
  • FIG. 15 is an interactive schematic diagram of a method for synchronously executing instructions according to an embodiment of the present application.
  • FIG. 16 is an interactive schematic diagram of a method for synchronously executing instructions according to an embodiment of the present application.
  • FIG. 17 is a schematic structural diagram of a data transmission apparatus provided by an embodiment of the present application.
  • FIG. 18 is a schematic structural diagram of a data transmission apparatus provided by an embodiment of the present application.
  • FIG. 19 is a schematic structural diagram of a data transmission apparatus provided by an embodiment of the application.
  • FIG. 20 is a schematic structural diagram of a data transmission apparatus according to an embodiment of the present application.
  • FIG. 21 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • first and second in the embodiments of the present application are only used for the purpose of description, and cannot be understood as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
  • “at least one” refers to one or more, and “multiple” refers to two or more.
  • “And/or”, which describes the association relationship of the associated objects indicates that there can be three kinds of relationships, for example, A and/or B, which can indicate: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A, B can be singular or plural.
  • the character “/” generally indicates that the associated objects are an "or” relationship.
  • “At least one of the following” or similar expressions refers to any combination of these items, including any combination of a single item(s) or a plurality of items(s).
  • At least one (a) of a, b or c may represent: a, b, c, a-b, a-c, b-c or a-b-c, wherein a, b, c may be single or multiple.
  • FIG. 1 is a schematic structural diagram of a communication system provided by an embodiment of the present application.
  • the communication system at least includes: a node 1 and a node 2 .
  • These two nodes are network nodes capable of wired 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 deserializer (deserializer, abbreviated as DES) connected to the MDC, and the communication link between the MDC and the sensor.
  • DES deserializer
  • the communication link between the connected serializer serializer, referred to as SER
  • the communication link between the cockpit domain controller (CDC) and the display device such as the display screen
  • the communication link connected to the CDC The communication link between the SER and the DES connected to the display device, etc.
  • the network elements in the in-vehicle network can be as follows: sensors (such as microphone, millimeter wave radar, lidar, ultrasonic radar, camera, global positioning system (GPS) module, inertial measurement unit (IMU), speed Sensors, acceleration sensors, humidity sensors, light intensity sensors and other on-board sensors); playback devices (such as display devices, external power amplifiers, speakers, etc.); , such as audio and video, synchronization messages, control messages, etc.); controller/computing center/storage center (undertaking the calculation and control of a certain function, which can be independent or integrated with the gateway, specifically an on-board computing platform or on-board computer, Domain controllers, multi-domain controllers, such as autopilot controllers, infotainment controllers, etc., can also be data centers, storing important data, such as driving recorders in the car, etc.).
  • sensors such as microphone, millimeter wave radar, lidar, ultrasonic radar, camera, global positioning system (GPS) module, inertial measurement unit (IMU), speed
  • node 1 and node 2 may also be two nodes in other communication networks, such as nodes in a network such as a mobile terminal, a monitoring device, and a smart home, which are not specifically limited in this embodiment of the present application.
  • the communication system shown in FIG. 1 may include more nodes, for example, node 3 and node 4, node 1 communicates with node 3, node 2 communicates with node 4 Communication, or the node 1 connects to the node 4 through the node 3, etc., are not specifically limited here.
  • the master node (referring to the node sending the instruction, which can be node 1 or node 2) transmits to each slave node in multiple slave nodes (referring to the node receiving the instruction) is divided into
  • data block transmission errors may occur.
  • the master node will reschedule the transmission of the wrong data blocks.
  • the transmission will lead to an indeterminate delay in the transmission of the complete instruction, resulting in jitter when each slave node receives the complete instruction and executes the instruction.
  • jitter occurs when some or all of the plurality of slave nodes execute commands, there is a problem that the time when the plurality of slave nodes execute commands cannot be synchronized.
  • Embodiments of the present application provide a data transmission method, 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 introduced.
  • the purpose of link training is mainly to achieve clock synchronization, scrambling code synchronization, and capability negotiation between two nodes, so as to establish a reliable communication link between the two nodes.
  • the link training process between the master node and the slave node needs to be completed first.
  • FIG. 2 is a schematic flowchart of a link training method involved in an embodiment of the present application, indicating that the master node and the slave node may perform link training during link training.
  • FIG. 3 is a schematic diagram of the states of the master node and the slave node in the link training process provided by the embodiment of the present application, which shows the state nodes that the master node and the slave node may experience during link training.
  • the link training method may include the following processes:
  • the master node starts the master node timer.
  • the master node sends at least one first training frame to the slave node.
  • 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.
  • the slave node sends at least one second training frame to the master node.
  • 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.
  • the master node first enters the training state, starts the master node timer, and starts to send at least one first training frame to the slave node.
  • the slave node receives at least one first training frame sent by the master node.
  • the training state is also entered, and at least one second training frame is sent to the master node.
  • the slave node timer can be started after link training starts, or when it enters the training state, or when it enters the training countdown state described below or when the data transmission state is started. , which is not specifically limited here.
  • the initial value may be 0 or not, which is not specifically limited here.
  • the two parties exchange training information.
  • the first training frame includes the first training information
  • the second training frame includes the second training information.
  • the slave node will send the first training frame to the master node indicating that it can enter the training countdown state.
  • the master node can enter the training countdown state after receiving the first feedback information.
  • the master node When the master node enters the training countdown state, it will send second feedback information to the slave node indicating that it has entered the training countdown state, and the slave node also enters the training countdown state after receiving the second feedback information sent by the master node.
  • the master node After entering the training countdown state, the master node starts to send the last remaining first training frames to the slave node, and the slave node also sends the last remaining second training frames to the master node. Usually, after entering the training countdown state , the number of training frames sent by the master node and the slave node to each other is the same. After the master node and the slave node send the last remaining first training frames and second training frames to each other, the master node and the slave node automatically enter the data transfer status.
  • the master node can instruct the slave node to realize the slave node timer and the master node according to the synchronization time by sending the synchronization time to the slave node in the process of training the link between the master node and the slave node. Synchronization of node timers. In the case that the two timers are synchronized, the master node sends the command including the command effective time (the command effective time includes the maximum delay of the link between the master node and the slave node) to the slave node.
  • the slave node executes the instruction sent by the master node from the time to the time when the instruction takes effect, so as to avoid the time when the slave node executes the instruction sent by the master node in the case of an irregular delay in the transmission of instructions from the master node to the slave node. jitter.
  • the method may include the following steps:
  • the master node sends a synchronization time to the slave node in the process of training the link between the master node and the slave node.
  • the master node when the master node enters the training countdown state, it will determine the number of the first training frames to be sent next (the preset number below indicates the number of first training frames to be sent next determined by the master node when entering the training countdown state. The number of one training frame), the master node automatically enters the data transmission state after sending the preset number of first training frames.
  • each first training frame may include the count of the remaining first training frames, and the count of the remaining first training frames. Identifies the remaining number of the first training frame to be sent. For example, the remaining first training frame count is 3, indicating that the master node needs to complete the sending of three first training frames after completing the sending of the current first training frame.
  • the above-mentioned remaining first training frame count may also represent the group 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.
  • the slave node is transmitting a
  • 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 slave node sends one
  • the time of the second training frame is aligned with the time of receiving 8 first training subframes
  • the master node can simultaneously complete the reception of one second training frame and the transmission of 8 first training subframes
  • the slave node can simultaneously complete a
  • the two nodes can start the next state without extra waiting time.
  • the master node may carry the synchronization time in some or all of the first training frames of the preset number to be sent, so as to transmit the synchronization time to the slave node.
  • Sync time may be carried in some or all of the first training frames of the preset number to be sent, so as to transmit the synchronization time to the slave node.
  • 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.
  • the master node calculates the synchronization time according to the count of the remaining first training frames and the duration of the first training frame. time to synchronization time.
  • the slave node needs to have the value of the slave node timer also be the synchronization moment when the second training frame counted by the remaining second training frame is sent.
  • the slave node if the slave node timer just timed to the synchronization time when the slave node finished sending the second training frame counted by the remaining second training frame, the slave node does not need to adjust the value of the slave node timer; When the node finishes sending the second training frame counted by the remaining second training frame, the slave node timer does not count to the synchronization time, then the slave node can adjust the slave node timer, and adjust the value of the slave node timer to the synchronization time .
  • the following takes the remaining first training frame count and the remaining second training frame count as 3, the duration of the first training frame and the second training frame as 2 ⁇ s, and the synchronization time as 20 ⁇ s.
  • the synchronization of the timer and the master node timer will be described.
  • the slave node timer runs to 14 ⁇ s, then when the slave node finishes sending the remaining 3 second training frames, the slave node will The node timer will count to 20 ⁇ s, and the slave node does not need to adjust the value of the slave node timer.
  • the slave node timer runs to 12 ⁇ s, then when the slave node finishes sending the remaining 3 second training frames, the slave node timer will count to 18 ⁇ s, and the slave node can The value of the slave node timer is adjusted from 18 ⁇ s to 20 ⁇ s according to the synchronization time of 20 ⁇ s.
  • S203 The master node sends a preset command including the time when the command takes effect to the slave node.
  • the command effective time is used to indicate the time when the slave node executes the preset command.
  • the master node may first determine the sending time of the preset instruction (that is, the time when the master node sends the preset instruction to the slave node). ), and determine the command effective time according to the sending time of the preset command and the maximum delay of the link between the master node and the slave node. Specifically, the command effective time is greater than or equal to the sending time of the preset command and the master node and the slave node. The sum of the maximum delays of links between nodes. The delay refers to the time required for a packet to be transmitted from one node to another node, which includes one or more of sending delay, propagation delay, processing delay and queuing delay.
  • the master node when the master node sends the preset command to the slave node, it has already taken into account the possibility of a data transmission error during the transmission of the preset command and the possibility of an irregular delay in the transmission of the preset command, that is to say , even if the master node sends a preset command to the slave node, a data transmission error occurs, the master node retransmits data, or the transmission of the preset command has an unfixed delay, because the command effective time is greater than Or equal to the sum of the sending time of the preset command and the maximum delay of the link between the master node and the slave node, and it can also ensure that the slave node can execute the preset command from the timing to the time when the command takes effect.
  • the master node can calculate the preset command. Assuming that the sum of the command sending time of 22 ⁇ s and the maximum delay of the link between the master node and the slave node of 3 ⁇ s is 25 ⁇ s, then the command 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.
  • the master node will send a preset command including the command effective time 25 ⁇ s to the slave node when the timer reaches 22 ⁇ s.
  • the actual delay of the link between the node and the slave node is less than 3 ⁇ s, then the slave node will receive the preset command before timing to 25 ⁇ s.
  • the slave node will also wait for the timing to 25 ⁇ s before executing the preset command; if during this command 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 When the preset command is received when the timer reaches 25 ⁇ s, the slave node can directly execute the preset command when receiving the preset command.
  • the preset instruction may be any instruction, such as a photographing instruction for instructing the camera to take a photo, or a display instruction for instructing the display device to display, etc., which are not specifically limited here.
  • the slave node receives the preset instruction including the effective time of the instruction sent by the master node, and executes the preset instruction when the timing reaches the effective time of the instruction.
  • the master node can receive the synchronization time sent by the slave node in the process of training the link between the master node and the slave node, and realize the synchronization between the master node timer and the slave node timer according to the synchronization time. Synchronization, when the two timers are synchronized, the master node sends the instruction including the effective time of the instruction to the slave node, so that the slave node executes the instruction sent by the master node when timing to the effective time of the instruction, so that the master node can send the instruction to the slave node. In the case where the slave node transmits an instruction with an irregular delay, the jitter at the moment when the slave node executes the instruction sent by the master node is avoided.
  • the method may include the following steps:
  • the slave node sends the synchronization time to the master node in the process of training the link between the slave node and the master node.
  • the slave node after the slave node enters the training countdown state, it will determine 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 the same as the remaining second training frame count. The remaining first training frame counts are equal. The remaining second training frame count identifies the remaining number of second training frames to be sent.
  • the above-mentioned remaining second training frame count may also represent the group of remaining second training subframes to be sent.
  • the number of second training subframes in a group is the number of second training subframes that can be sent by the slave node within the duration that the master node sends one first training frame.
  • the slave node can calculate the synchronization time according to the remaining number of second training frames and the duration of the second training frame, and then carry the synchronization time in the second training frame to be sent, so as to send the synchronization time to the master node. time.
  • the master node receives the synchronization time sent by the slave node, and realizes the synchronization of the master node timer and the slave node timer according to the synchronization time.
  • the process that the master node realizes the synchronization of the master node timer and the slave node timer according to the synchronization time is the same as the process of the slave node realizing the synchronization between the slave node timer and the master node timer according to the synchronization time in S202 in the embodiment shown in FIG. 2 above.
  • the synchronization process is similar. For details, please refer to S202 and related descriptions, which will not be repeated here.
  • S303 The master node sends a preset command including the time when the command takes effect to the slave node.
  • the slave node receives the preset instruction including the effective time of the instruction sent by the master node, and executes the preset instruction when the timing reaches the effective time of the instruction.
  • S303 and S304 are the same as S203 and S204 in the above-mentioned embodiment shown in FIG. 5 .
  • S203 and S204 and related descriptions please refer to S203 and S204 and related descriptions, which will not be repeated here.
  • the master node can obtain the master node timer and the slave node 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.
  • the timing difference value of the timer and then send the timing difference value to the slave node to instruct the slave node to synchronize the slave node timer and the master node timer according to the timing difference value.
  • the master node When the two timers are synchronized, the master node Then, the preset command including the command effective time is sent to the slave node, so that the slave node can execute the command sent by the master node from the time to the command effective time, so as to realize that there will be an irregular delay in the transmission of the command from the master node to the slave node. In this case, the jitter of the moment when the slave node executes the command sent by the master node is avoided.
  • the method may include the following steps:
  • the master node acquires a timing difference value in the process of training the link between the master node and the slave node or when the link training is completed, and sends the timing difference value to the slave node.
  • the master node receives the value t1 of the slave node's timer sent by the slave node when the link training is completed, and then according to t1
  • the timing difference t2-t1 is obtained by calculating the value t2 of the master node's timer when the link training is completed.
  • the master node after the master node enters the training countdown state, it can pre-calculate the value t2 of the master node's timer when the link training is completed.
  • the slave node may carry the value t1 of the slave node timer in the second training frame to be sent, so as to transmit the value t1 of the slave node timer to the master node.
  • the master node 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 sent by the slave node, and the master node is in the After receiving t1, the timing difference value t2-t1 can be calculated according to t1 and the value t2 of the master node timer when the link training is completed.
  • this embodiment of the present application does not describe the link training process between the slave node and the master node, and for details, reference may be made to the foregoing FIG. 2 and FIG. 3 and related descriptions.
  • the slave node receives the timing difference value sent by the master node, and synchronizes the slave node timer and the master node timer according to the timing difference value.
  • the slave node timer value of 8 ⁇ s the slave node timer value of 5 ⁇ s, and the timing difference obtained by the master node as 3 ⁇ s when the link training is completed, assuming that the master node is in the master node timer value.
  • the timing difference value is sent to the slave node. Since there may be a variable delay in the process of data transmission, the delay is assumed to be 2 ⁇ s, that is to say, the slave node is in the master node timer.
  • the slave node timer receives the timing difference when it counts to 7 ⁇ s, and the slave node adjusts the value of the slave node timer to 10 ⁇ s according to the timing difference value of 3 ⁇ s, which is the same as the master node timer value of 10 ⁇ s. Synchronization of node timers with master node timers.
  • the master node sends a preset command including the time when the command takes effect to the slave node.
  • the slave node receives the preset instruction including the effective time of the instruction sent by the master node, and executes the preset instruction when the timing reaches the effective time of the instruction.
  • S403 and S404 are the same as S203 and S204 in the above embodiment shown in FIG. 5 .
  • S203 and S204 and related descriptions please refer to S203 and S204 and related descriptions, which will not be repeated here.
  • the master node sends a preset command including the command effective time to the slave node after the slave node timer is synchronized with the master node timer, so that the slave node can time the time to the command effective time.
  • the preset command is executed, the jitter of the moment when the slave node executes the preset command sent by the master node is avoided.
  • the embodiments of the present application further provide a method, apparatus and related equipment for synchronously executing instructions, which are used to synchronize the time when one master node controls multiple slave nodes to execute instructions.
  • FIG. 8 is a schematic structural diagram of a communication system provided by an embodiment of the present application.
  • the communication system includes: node 1 , node 2 , and node 3 .
  • These three nodes are network nodes, wherein node 1 communicates with node 2 and node 3 via wired or wireless communication.
  • node 2 and node 3 may or may not communicate with each other, or node 2 may Node 1 and node 3 perform indirect communication, which is not specifically limited here.
  • the communication network including node 1, node 2, and node 3 shown in FIG. 8 may be an in-vehicle communication network, or may be a communication network such as a mobile terminal, a monitoring device, and a smart home, which is not specifically limited in this embodiment of the present application.
  • the communication system shown in FIG. 8 may include more nodes, for example, node 4 and node 5 may also be included, and node 1 communicates with node 4 and node 5 respectively, or the node 1 is connected to node 5 through node 4, etc., which is not specifically limited here.
  • Driving assistance system advanced driving assistant system
  • ADAS advanced driving assistant system
  • ADAS advanced driving assistant system
  • each slave node since each slave node transmits data to the master node, the There may be a variable delay, and there may also be a variable delay when the master node transmits instructions to each slave node, which usually causes jitter when the master node sends instructions to each slave node, and causes each slave node. The moment when the node executes the instruction jitters, and then there is a problem that the moment when multiple slave nodes execute the instruction cannot be synchronized.
  • one MDC is connected to one DES
  • one DES has four ports
  • the four ports are correspondingly connected to four SERs
  • each of the four SERs is connected to one
  • the MDC sends a photo-triggering command to the four SERs through DES
  • the four SERs respectively trigger the corresponding camera to take a photo according to the photo-triggering command, so that one MDC controls the four cameras to take photos synchronously.
  • the DES shown in FIG. 9 is equivalent to the above-mentioned master node that controls multiple slave nodes to execute instructions synchronously
  • the four SERs are equivalent to multiple slave nodes.
  • each frame of image is divided into multi-line data blocks (pixels) and transmitted line by line, wherein each frame of image includes the first The X line is marked, and the X line is used to identify the starting position of the first data block of the Xth line of each frame of image.
  • a frame of image P1 is transmitted to DES
  • SER2 is transmitted to DES
  • a frame of image P2 is transmitted
  • SER3 is transmitted to DES
  • DES transmits one frame of image P3
  • SER4 transmits one frame of image P4 to DES.
  • the four frames of images P1, P2, P3 and P4 transmitted from four SERs to DES are controlled by DES to execute the four SERs synchronously and trigger the photographing command to trigger four cameras.
  • DES records the moment of receiving the mark of the Xth row of the image P1 as T1, the moment of receiving the mark of the Xth row of the image P2 is recorded as T2, and the moment of receiving the mark of the Xth row of the image P3 is recorded as T2.
  • the time of the image P4 is recorded as T3, and the time when the X-th line of the image P4 is received is recorded as T4.
  • some data block transmission errors may occur in the four SERs.
  • the data block is rescheduled for transmission, which usually causes jitter at the time of the X-th line marked by the SER with a data block transmission error recorded by the DES, which causes jitter when the DES sends the triggering command to the SER. It is guaranteed that the four SERs trigger the four cameras at the same moment to take pictures synchronously.
  • the embodiments of the present application provide a method, device, and related equipment for synchronously executing instructions, which can ensure the synchronization of the time when multiple slave nodes execute instructions.
  • one MDC in the above-mentioned in-vehicle communication network can control multiple cameras to take pictures synchronously.
  • Others for example, a CDC can control multiple display devices to display synchronously.
  • the master node may send the first synchronization moment to the first slave node during the training process of the first link (the link between the master node and the first slave node). , to instruct the first slave node to synchronize the timer of the first slave node with the timer of the master node according to the first synchronization moment, and to perform synchronization on the second link (the link between the master node and the second slave node)
  • the training process by sending the second synchronization time 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 synchronization time, so as to realize the first slave node timing
  • Both the master node timer and the second slave node timer are synchronized with the master node timer.
  • the master node sends the first preset command including the effective time of the first command to the first slave node, and sends the first preset command to the first slave node.
  • the second preset instruction including the effective time of the second instruction is sent to the second slave node, so that the first slave node and the second slave node can correspondingly execute the master node when timing to the effective time of the first instruction and the effective time of the second instruction.
  • the sent first preset command and second preset command avoid jitter at the moment when the first slave node executes the first preset command sent by the master node and the second slave node executes the second preset command sent by the master node.
  • the jitter of time since the effective time of the second instruction and the effective time of the first instruction are the same time, the time when the first slave node executes the first preset instruction and the time when the second slave node executes the second preset instruction can also be synchronized.
  • the method may include the following steps:
  • the master node sends the first synchronization time to the first slave node.
  • the master node sends the second synchronization time to the second slave node.
  • 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.
  • 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.
  • the second slave node timer is also synchronized with the first slave node timer.
  • the master node sends a first preset instruction including the effective time of the first instruction to the first slave node.
  • the effective time of the first command is greater than or equal to the sum of the sending time of the first preset command and the maximum delay of the first link, and the sending time of the first preset command is sent by the master node to the first slave node. time of the command.
  • the master node sends a second preset command including the second command effective time to the second slave node.
  • the effective time of the second command is greater than or equal to the sum of the sending time of the second preset command and the maximum delay of the second link, the effective time of the second command and the effective time of the first command are the same time, and the second preset The sending moment of the command is the moment when the master node sends the second preset command to the second slave node.
  • the master node before the master node sends the first preset instruction including the effective time of the first instruction to the first slave node and sends the 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 command and the sending time of the second preset command, and according to the sending time of the first preset command, the sending time of the second preset command, the maximum value of the first link The time delay and the maximum time delay of the second link determine the effective time of the first instruction and the effective time of the second instruction.
  • the master node can determine the effective time of the first instruction and the effective time of the second instruction through the following steps:
  • the master node determines whether the first moment is greater than the second moment.
  • the first time is the sum of the sending time of the first preset command and the maximum delay of the first link
  • the second time is the sum of the sending time of the second preset command and the maximum delay of the second link.
  • the master node determines the effective time of the first instruction according to the first time, wherein the effective time of the first instruction is greater than or equal to the first time;
  • the first instruction effective time is determined according to the second time, wherein the first instruction effective time is greater than or equal to the second time.
  • the effective time of the second instruction is the same as the effective time of the first instruction, and the effective time of the first instruction is determined according to the above steps, that is, the effective time of the second instruction is determined.
  • the master node determines the sending time of the first preset command and the sending time of the second preset command Both are 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 obtain that the first moment is 24 ⁇ s, the second moment is 26 ⁇ s, and the master node determines the second moment is greater than the first time, so the effective time of the first instruction determined by the master node only needs to be greater than or equal to 26 ⁇ s of the second time, which may be 26 ⁇ s or 27 ⁇ s, etc., which is not limited in this embodiment of the present application.
  • the first slave node will wait for the timing.
  • the first preset command will be executed when it reaches 26 ⁇ s, and the second slave node will receive the second preset command before the timing reaches 26 ⁇ s.
  • the second slave node will also wait until the timing reaches 26 ⁇ s before executing the second preset command. The time when the two execute the instruction is synchronized.
  • the first slave node receives the first preset instruction including the effective time of the first instruction sent by the master node, and executes the first preset instruction when the timing reaches the effective time of the first instruction.
  • the second slave node receives the second preset instruction including the effective time of the second instruction sent by the master node, and executes the second preset instruction when the timing reaches the effective time of the second instruction.
  • the effective time of the second instruction is the same as the effective time of the first instruction. Therefore, the first slave node and the second slave node execute the instruction at the same time, that is, the execution of the instruction by the two is realized. time synchronization. Another method for synchronously executing instructions provided by the embodiments of the present application will be introduced below.
  • the master node may acquire the first timing difference during the process of training the first link or when the training of the first link is completed, and the master node may acquire the first timing difference while training the second link.
  • the second timing difference value is obtained, and then the first timing difference value is sent to the first slave node to instruct the first slave node to implement the first timing difference value according to the first timing difference value.
  • Synchronization of the slave node timer with the master node timer and sending a second timing difference value to the second slave node to instruct the second slave node to realize the synchronization between the second slave node node timer and the master node timer according to the second timing difference value Synchronization, so that both the first slave node timer and the second slave node timer are synchronized with the master node timer.
  • the master node sends the first preset command including the effective time of the first command to the first slave node, and sends the first preset command to the first slave node.
  • the second preset instruction including the effective time of the second instruction is sent to the second slave node, so that the first slave node and the second slave node can correspondingly execute the master node when timing to the effective time of the first instruction and the effective time of the second instruction.
  • the sent first preset command and second preset command avoid jitter at the moment when the first slave node executes the first preset command sent by the master node and the second slave node executes the second preset command sent by the master node.
  • the jitter of time since the effective time of the second instruction and the effective time of the first instruction are the same time, the time when the first slave node executes the first preset instruction and the time when the second slave node executes the second preset instruction can also be synchronized.
  • the method may include the following steps:
  • the master node acquires a first timing difference value in the process of training the first link or when the first link training is completed, and sends the first timing difference value to the first slave node.
  • the first timing difference is the timing difference between the timer of the master node and the timer of the first slave node when the first link training is completed.
  • the master node acquires 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.
  • the second timing difference is the timing difference between the timer of the master node and the timer of the second slave node when the second link training is completed.
  • the first slave node receives the first timing difference value sent by the master node, and synchronizes the first slave node timer with the master node timer according to the first timing difference value.
  • the second slave node receives the second timing difference value sent by the master node, and synchronizes the second slave node timer with the master node timer according to the second timing difference value.
  • the master node sends a first preset instruction including the effective time of the first instruction to the first slave node.
  • the master node sends a second preset command including the second command effective time to the second slave node.
  • the first slave node receives the first preset instruction including the effective time of the first instruction sent by the master node, and executes the first preset instruction when the timing reaches the effective time of the first instruction.
  • 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 effective time of the second instruction.
  • S605 to S608 correspond to the same as S505 to S508 shown in FIG. 11 .
  • FIG. 11 For details, please refer to FIG. 11 and related descriptions above, which will not be repeated here.
  • the first slave node timer is successfully synchronized with the master node timer, and the first slave node successfully receives the first preset command and executes the first preset command when the first command takes effect, and the second The failure of synchronization between the timer of the slave node and the timer of the master node results in a situation that the second slave node fails to execute the instruction synchronously with the first slave node even though it receives the second preset command sent by the master node.
  • the first slave node timer is successfully synchronized with the master node timer, and the first slave node successfully receives the first preset command and executes the first preset command when the first command takes effect, and the second The timer of the slave node is successfully synchronized with the timer of the master node, but the second link is disconnected after the synchronization is successful, so that the second slave node does not receive the second preset command sent by the master node, and the second slave node fails to communicate with the first node.
  • the slave node executes instructions synchronously.
  • the master node may retrain the second link, and calculate a new second synchronization time or obtain a new second synchronization time.
  • the timing difference value is sent 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.
  • the second slave node realizes the synchronization of the second slave node timer and the master node timer according to the new second synchronization time or the new second timing difference, because the first slave node timer and the The master node timer is already synchronized, then the second slave node timer is also synchronized with the first slave node timer.
  • the master node may send a new first preset command including the new first command effective time to the first slave node, Make the first slave node execute the new first preset instruction when timing to the effective time of the new first instruction, and send a new second preset instruction including the new second instruction effective time to the second slave node, so that The second slave node executes the new second preset instruction when the timing reaches the effective time of the new second instruction.
  • the effective time of the new first command is greater than or equal to the sum of the sending time of the new first preset command and the maximum delay of the first link, and the effective time of the new second command is greater than or equal to the new second preset
  • the sum of the command sending time and the maximum delay of the second link, the new second command effective time and the new first command effective time are the same time.
  • node 2 is the master node
  • node 1 is the first slave node
  • 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 communication
  • node 2 cannot communicate with node 3 through node 1, but it is necessary to synchronize the time when node 1 and node 3 execute instructions.
  • the time synchronization of the execution of the instruction by the first slave node and the second slave node can be achieved through the following two exemplary methods of executing instructions synchronously.
  • the first method may include the following steps:
  • the master node sends the first synchronization time to the first slave node.
  • 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.
  • the third link is a link between the first slave node and the second slave node.
  • 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.
  • S705 The master node sends a third preset command including the effective time of the third command to the first slave node.
  • the effective time of the third command is greater than or equal to the sum of the sending time of the third preset command, the maximum delay of the first link and the maximum delay of the third link, and the sending time of the third preset command is the master node The moment when the third preset command is sent to the first slave node.
  • the first slave node receives the third preset instruction including the effective time of the third instruction sent by the master node, and executes the third preset instruction when the timing reaches the effective time of the third instruction.
  • the first slave node sends a fourth preset instruction including the fourth instruction effective time to the second slave node.
  • the effective time of the fourth instruction 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 effective time of the fourth instruction and the effective time of the third instruction are the same time, and the fourth preset
  • the sending moment of the instruction is the moment when the first slave node sends the fourth preset instruction to the second slave node.
  • 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.
  • the master node may first determine the sending time of the third preset command, and according to The sending time of the third preset command, the maximum delay of the first link, and the maximum delay of the third link determine the effective time of the third command, and the master node will set the third preset including the effective time of the third command
  • the first slave node determines the sending time of the fourth preset instruction according to the effective time of the third instruction.
  • the effective time of the third command determined by the master node may be greater than or equal to the sending time of the third preset command + the maximum delay of the first link + the maximum delay of the third link.
  • the effective time of the fourth instruction is the same as the effective time of the third instruction, and the effective time of the third instruction is determined according to the above steps, that is, the effective time of the fourth instruction is determined.
  • the sending time of the third preset command determined by the master node is 22 ⁇ s
  • the maximum delay of the first link is 2 ⁇ s
  • the maximum delay of the third link is 4 ⁇ s as an example
  • the master node determines the The effective time of the third command only needs to be greater than or equal to 28 ⁇ s.
  • the first slave node can time Before 24 ⁇ s or when the timer reaches 24 ⁇ s, the third preset command including the third command effective time of 28 ⁇ s is received.
  • the first slave node receives the third preset command when the timer reaches 24 ⁇ s.
  • the maximum delay is 4 ⁇ s.
  • the first slave node needs to ensure that the second slave node also executes the fourth preset command when the timing reaches 28 ⁇ s.
  • the first slave node can determine the sending time of the fourth preset command as 24 ⁇ s, so that the first The second slave node can receive the fourth preset command before the timing reaches 28 ⁇ s or when the timing reaches 28 ⁇ s, and then the second slave node can also execute the fourth preset command when the timing reaches 28 ⁇ s.
  • the execution of the third preset instruction at 28 ⁇ s is synchronous.
  • the second method may include the following steps:
  • the master node acquires a first timing difference value in the process of training the first link or when the first link training is completed, and sends the first timing difference value to the first slave node.
  • the first slave node receives the first timing difference value sent by the master node, and synchronizes the first slave node timer with the master node timer according to the first timing difference value.
  • the first slave node acquires a third timing difference value during the process of training the third link or when the third link training is completed, and sends the third timing difference value to the second slave node.
  • the third timing difference is a timing difference between the timer of the first slave node and the timer of the second slave node when the third link training is completed.
  • the second slave node receives the third timing difference value 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 value.
  • the master node sends a third preset command including the effective time of the third command to the first slave node.
  • the first slave node receives the third preset instruction including the effective time of the third instruction sent by the master node, and executes the third preset instruction when the timing reaches the effective time of the third instruction.
  • the first slave node sends a fourth preset instruction including the effective time of the fourth instruction to the second slave node.
  • the second slave node receives the fourth preset instruction including the effective time of the fourth instruction sent by the first slave node, and executes the fourth preset instruction when the timing reaches the effective time of the fourth instruction.
  • S805 to S808 correspond to the same as S705 to S708 shown in FIG. 13 .
  • the first slave node timer is successfully synchronized with the master node timer, and the first slave node successfully receives the third preset command and executes the third preset command when the third command takes effect, and the second Failure to synchronize the timer of the slave node with the timer of the first slave node successfully results in a situation that the second slave node fails to execute the instruction synchronously with the first slave node even though it receives the fourth preset instruction.
  • the first slave node timer is successfully synchronized with the master node timer, and the first slave node successfully receives the third preset command and executes the third preset command when the third command takes effect, and the second The timer of the slave node is successfully synchronized with the timer of the first slave node, but the third link is disconnected after the synchronization is successful, so that the second slave node does not receive the fourth preset command sent by the first slave node. Failed to execute instruction synchronously with the first slave node.
  • the first slave node may retrain the third link, and obtain a new third synchronization moment or obtain a new third timing difference, and send it to the second slave node, so that the third
  • 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.
  • the second slave node synchronizes the timer of the second slave node with the timer of the first slave node according to the new third synchronization moment or the new third timing difference, because the first slave node time If the timer of the second slave node is synchronized with the master node timer, the second slave node timer is also synchronized with the master node timer.
  • the master node may send to the first slave node a new third preset command including the time when the new third command takes effect.
  • the first slave node may execute the new third preset instruction when the timing reaches the effective time of the new third instruction, and send the new fourth instruction to the second slave node.
  • the new fourth preset instruction at the effective time, so that the second slave node executes the new fourth preset instruction when the timing reaches the effective time of the new fourth instruction.
  • the effective time of the new third command is greater than or equal to the sending time of the new third preset command, the sum of the maximum delay of the first link and the maximum delay of the third link, and the effective time of the new fourth command greater than or equal to the sum of the moment when the first slave node sends a new fourth preset command to the second slave node and the maximum delay of the third link, the new fourth command effective time and the new third command effective time are the same moment.
  • node 2 is the master node
  • node 1 is the first slave node
  • 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
  • Node 2 can communicate with node 3 indirectly through node 1, and it is necessary to synchronize the moment when node 1 and node 3 execute instructions.
  • the time synchronization of the execution of the instruction by the first slave node and the second slave node can be achieved by the following two exemplary methods of executing instructions synchronously.
  • the first method may include the following steps:
  • the master node sends the first synchronization time to the first slave node.
  • 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.
  • the first slave node sends the third synchronization time to the second slave node.
  • 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.
  • the master node sends a third preset instruction including the effective time of the third instruction and a fifth preset instruction including the effective time of the fifth instruction to the first slave node.
  • 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 set command.
  • the first slave node sends a fifth preset instruction including the effective time of the fifth instruction to the second slave node.
  • the second slave node receives the fifth preset instruction including the effective time of the fifth instruction sent by the first slave node, and executes the fifth preset instruction when the timing reaches the effective time of the fifth instruction.
  • the master node may first determine the third preset instruction Set the sending time of the command, then determine the sending time of the fifth preset command according to the sending time of the third preset command and the maximum delay of the first link, and finally determine the sending time of the fifth preset command according to the sending time of the fifth preset command, the third link The maximum delay time determines the effective time of the fifth instruction.
  • the sending moment of the fifth preset command is the moment when the first slave node sends the fifth preset command to the second slave node.
  • the sending time of the fifth preset command determined by the master node is greater than or equal to the sum of the sending time of the third preset command and the maximum delay of the first link, and the effective time of the fifth command determined by the master node is greater than or equal to The sum of the sending moment of the fifth preset command and the maximum delay of the third link.
  • the effective time of the third instruction is the same as the effective time of the fifth instruction, and the effective time of the fifth instruction is determined according to the above steps, that is, the effective time of the third instruction is determined.
  • the fifth preset command sent by the master node to the first slave node may include the sending time of the fifth preset command, and the sending time of the fifth preset command is used by the first slave node to time the clock to the fifth preset command.
  • the fifth preset instruction is sent to the second slave node when the preset instruction is sent.
  • the master node can determine the sending time of the fifth preset command It only needs to be greater than or equal to 24 ⁇ s.
  • the sending time of the fifth preset command is 24 ⁇ s
  • the effective time of the fifth command determined by the master node only needs to be greater than or Equal to 28 ⁇ s.
  • the first slave node can time The third preset command including the third command effective time of 28 ⁇ s and the fifth preset command including the fifth command effective time of 28 ⁇ s are received before 24 ⁇ s or when the timing reaches 24 ⁇ s, assuming that the first slave node receives it when the timing reaches 24 ⁇ s.
  • the first slave node will send the fifth preset command to the second slave node when the timing reaches 24 ⁇ s.
  • the maximum delay of the channel is 4 ⁇ s, then the second slave node can receive the fifth preset command before the timing reaches 28 ⁇ s or at 28 ⁇ s, and then the second slave node can also execute the fifth preset command when the timing reaches 28 ⁇ s. It is synchronized with the execution of the third preset instruction by the first slave node when the timing reaches 28 ⁇ s.
  • the second method may include the following steps:
  • the master node acquires a first timing difference value in the process of training the first link or when the first link training is completed, and sends the first timing difference value to the first slave node.
  • the first slave node receives the first timing difference value sent by the master node, and realizes synchronization between the first slave node timer and the master node timer according to the first timing difference value.
  • the first slave node acquires a third timing difference value in the process of training the third link or when the third link training is completed, and sends the third timing difference value to the second slave node.
  • the second slave node receives the third timing difference value sent by the first slave node, and realizes the synchronization between the second slave node timer and the first slave node timer according to the third timing difference value.
  • the master node sends a third preset instruction including the effective time of the third instruction and a fifth preset instruction including the effective time of the fifth instruction to the first slave node.
  • the first slave node receives the third preset command including the effective time of the third command and the fifth preset command including the effective time of the fifth command sent by the master node, and executes the third preset command when the time reaches the effective time of the third command set command.
  • the first slave node sends a fifth preset instruction including the effective time of the fifth instruction to the second slave node.
  • the second slave node receives the fifth preset instruction including the effective time of the fifth instruction sent by the first slave node, and executes the fifth preset instruction when the timing reaches the effective time of the fifth instruction.
  • S1005 to S1008 correspond to the same as S905 to S908 shown in FIG. 15 .
  • FIG. 15 and related descriptions above please refer to FIG. 15 and related descriptions above, which will not be repeated here.
  • the first slave node timer is successfully synchronized with the master node timer, and the first slave node successfully receives the third preset command and executes the third preset command when the third command takes effect, and the second Failure to synchronize the timer of the slave node with the timer of the first slave node successfully results in a situation that the second slave node fails to execute the instruction synchronously with the first slave node even though it receives the fifth preset instruction.
  • the first slave node timer is successfully synchronized with the master node timer, and the first slave node successfully receives the third preset command and executes the third preset command when the third command takes effect, and the second The timer of the slave node is successfully synchronized with the timer of the first slave node, but the third link is disconnected after the synchronization is successful, so that the second slave node does not receive the fifth preset command sent by the first slave node. Failed to execute instruction synchronously with the first slave node.
  • 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
  • the first slave node successfully receives the third preset
  • the third preset instruction is executed when the three instructions take effect, but the first slave node misses the fifth preset instruction, which causes the first slave node to fail to send the fifth preset instruction to the second slave node, thus causing the second slave node to fail to send the fifth preset instruction.
  • the first slave node can retrain the third link, and obtain a new third synchronization moment or obtain a new third timing difference, and send the data to the second slave node. , so that the second slave node can synchronize the timer of the second slave node with the timer of the first slave node according to the new third synchronization moment or the new third timing difference.
  • the second slave node synchronizes the timer of the second slave node with the timer of the first slave node according to the new third synchronization moment or the new third timing difference, because the first slave node time If the timer of the second slave node is synchronized with the master node timer, the second slave node timer is also synchronized with the master node timer.
  • the master node may send a new third preset command including the new third command effective time and the first slave node to the first slave node.
  • Including the new fifth preset instruction when the new fifth instruction takes effect after the first slave node receives the new third preset instruction and the new fifth preset instruction, it can time to the new third instruction Execute a new third preset instruction at the effective time, and send a new fifth preset instruction including the new fifth instruction effective time to the second slave node, so that the second slave node is timing to the new fifth A new fifth preset instruction is executed when the instruction takes effect.
  • the effective time of the new third command is greater than or equal to the sending time of the new third preset command, the sum of the maximum delay of the first link and the maximum delay of the third link, and the effective time of the new fifth command greater than or equal to the sum of the moment when the first slave node sends a new fifth preset command to the second slave node and the maximum delay of the third link, the new fifth command effective time and the new third command effective time are the same moment.
  • the new third preset instruction including the effective time of the new third instruction and a new fifth preset instruction including the effective time of the new fifth instruction to the first slave node, and the first slave node is receiving
  • the new third preset instruction may be executed when the timing reaches the effective time of the new third instruction, and the new third preset instruction may be sent to the second slave node including the new first instruction.
  • the first preset instruction, the second preset instruction, the third preset instruction, the fourth preset instruction, and the fifth preset instruction in the embodiments shown in FIG. 11 to FIG. 16 can be any instruction, For example, a photographing instruction for instructing the camera to take a picture, or a display instruction for instructing the display device to perform display, etc., are not specifically limited here.
  • first preset instruction, second preset instruction, third preset instruction, fourth preset instruction, and fifth preset instruction are photographing instructions
  • All the instruction methods can realize the synchronous photographing of the first slave node and the second slave node
  • the first preset instruction, the second preset instruction, the third preset instruction, the fourth preset instruction, and the fifth preset instruction are all
  • all the methods for synchronously executing an instruction provided by the above embodiments of the present application can implement the synchronous display of the first slave node and the second slave node.
  • FIG. 11 to FIG. 16 do not describe the training process of the first link, the training process of the second link, and the training process of the third link.
  • the training process of the path is similar to the link training process described in FIG. 2 and FIG. 3 .
  • FIG. 2 For details, reference may be made to the above-mentioned FIG. 2 , FIG. 3 and related descriptions, which will not be repeated here.
  • the embodiments shown in FIG. 11 , FIG. 13 and FIG. 15 do not realize the synchronization of the first slave node timer and the master node timer according to the first synchronization moment, and the second slave node according to the second synchronization time.
  • the synchronization process will be described in detail.
  • the process of realizing the timer synchronization is similar to the process in which the slave node realizes the synchronization of the slave node timer and the master node timer according to the synchronization time described in FIG. 4.
  • the slave node realizes the synchronization of the slave node timer and the master node timer according to the synchronization time described in FIG. 4.
  • the embodiments shown in FIG. 12 , FIG. 14 and FIG. 16 do not acquire the timing difference for the master node to obtain the first timing difference value, the master node to obtain the second timing difference value, the first slave node to obtain the third timing difference value, etc.
  • the value process is described in detail.
  • the process of acquiring the timing difference by the above node is similar to the process of acquiring the timing difference by the master node shown in FIG. 6 .
  • the embodiments shown in FIG. 12, FIG. 14 and FIG. 16 also do not implement synchronization of the first slave node timer with the master node timer according to the first timing difference value for the first slave node, and the second slave node according to the second timing difference value.
  • the synchronization process of realizing the synchronization between the second slave node timer and the master node timer, and the second slave node realizing the synchronization between the second slave node timer and the first slave node timer according to the third timing difference will be described.
  • the above node The process of realizing the timer synchronization is similar to the process in which the slave node realizes the synchronization of the slave node timer and the master node timer according to the timing difference shown in FIG. 7 .
  • FIG. 7 For details, please refer to the above FIG. 7 and related descriptions. Expand the details.
  • FIG. 17 is a schematic structural diagram of a data transmission apparatus provided by an embodiment of the present application.
  • the data transmission apparatus may be applied to the master node described above.
  • the data transmission apparatus 100 Including the sending module 110, on the basis of the sending module 110, it may also include the receiving module 120, wherein,
  • the sending module 110 is used to send data to other devices.
  • the sending module 110 is used to perform steps S201 and S203 performed by the master node in the embodiment shown in FIG. 4 or to perform steps S201 and S203 performed by the master node in the embodiment shown in FIG. 7 .
  • steps S401 and S403 for example, the sending module 110 is configured to perform steps S501, S502, S505 and S506 performed by the master node in the embodiment shown in FIG. 11 .
  • the receiving module 120 is configured to receive data sent by other devices.
  • the receiving module 120 is configured to receive the synchronization moment sent by the slave node in the embodiment shown in FIG. 6 .
  • the data transmission apparatus 100 may further include a synchronization module (not shown in FIG. 17 ), which is used to realize the synchronization between the timer of the master node and the timers of other devices. Step S302 performed by the node.
  • a synchronization module (not shown in FIG. 17 ), which is used to realize the synchronization between the timer of the master node and the timers of other devices. Step S302 performed by the node.
  • the data transmission apparatus 100 may further include a storage module (not shown in FIG. 17 ) and a processing module (not shown in FIG. 17 ).
  • the storage module is used for storing program codes and data of the data transmission device 100, for example, storing program codes for realizing synchronization of the master node timer and the slave node timer according to the received synchronization time.
  • the processing module is used to call the program code in the storage module to implement the implementation steps with the data transmission apparatus 100 as the execution body, and/or to perform other content steps of the technology described in this application.
  • the processing module may be a processor or a controller, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (application-specific integrated circuit) circuit, ASIC), field programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination comprising one or more microprocessors, and the like.
  • the sending module 110 and the receiving module 120 may be a communication interface, a transceiver, a transceiver circuit, etc., where the communication interface is a general term and may include one or more interfaces, and the storage module may be a memory, or other services for providing storage functions or module.
  • the data transmission apparatus 100 is only an example provided by the embodiment of the present application, and the data transmission apparatus 100 may have more or less components than those shown in FIG. 17 , and two or more components may be combined , or can be implemented with different configurations of components.
  • FIG. 18 is a schematic structural diagram of a data transmission apparatus provided by an embodiment of the present application.
  • the data transmission apparatus may be applied to the first slave node described above.
  • the data transmission apparatus 200 includes a receiving module 210 and an executing module 220, and on the basis of including the receiving module 210 and the executing module 220, it can also include a sending module 230, wherein,
  • the receiving module 210 is used to receive data sent by other devices.
  • the receiving module 210 is used to receive the first synchronization moment sent by the master node in the embodiment shown in FIG. 11 or to receive the first synchronization moment sent by the master node in the embodiment shown in FIG. The first timing difference sent.
  • the execution module 220 is configured to execute instructions sent by other devices.
  • the execution module 230 is configured to execute step S706 executed by the first slave node in the embodiment shown in FIG. 13 .
  • the sending module 230 is used to send data to other devices.
  • the sending module 230 is used to perform steps S703 and S707 performed by the first slave node in the embodiment shown in FIG. Steps S1003 and S1007 performed by the first slave node.
  • the data transmission apparatus 200 may further include a synchronization module (not shown in FIG. 18 ), the synchronization module is used to realize the synchronization of the timer of the first slave node and the timers of other devices, for example, the synchronization module is used to execute the In the embodiment shown in 11, step S503 is performed by the first slave node.
  • a synchronization module (not shown in FIG. 18 )
  • the synchronization module is used to realize the synchronization of the timer of the first slave node and the timers of other devices, for example, the synchronization module is used to execute the In the embodiment shown in 11, step S503 is performed by the first slave node.
  • the data transmission apparatus 200 may further include a storage module and a processing module (not shown in FIG. 18 ).
  • the storage module is used for storing program codes and data of the data transmission device 200, for example, storing program codes for realizing the synchronization of the first slave node timer and the master node timer according to the received third synchronization moment.
  • the processing module is further configured to invoke the program code in the storage module to implement the implementation steps with the data transmission apparatus 200 as the execution body, and/or to execute other content steps of the technology described in this application.
  • the data transmission apparatus 200 is only an example provided by the embodiments of the present application, and the data transmission apparatus 200 may have more or less components than those shown in FIG. 18 , and two or more components may be combined , or can be implemented with different configurations of components.
  • FIG. 19 is a schematic structural diagram of a data transmission apparatus provided by an embodiment of the present application.
  • the data transmission apparatus may be applied to the second slave node described above.
  • the data transmission apparatus 300 includes a receiving module 310 and an executing module 320, wherein,
  • the receiving module 310 is used to receive data sent by other devices.
  • the receiving module 210 is used to receive the second synchronization moment sent by the master node in the embodiment shown in FIG. 11 or used to receive data sent by the master node in the embodiment shown in FIG. The second timing difference sent.
  • the execution module 320 is configured to execute instructions sent by other devices.
  • the execution module 230 is configured to execute step S708 executed by the second slave node in the embodiment shown in FIG. 13 .
  • the data transmission apparatus 300 may further include a sending module (not shown in FIG. 19 ) for sending data to other devices.
  • a sending module (not shown in FIG. 19 ) for sending data to other devices.
  • the data transmission apparatus 300 may further include a synchronization module (not shown in FIG. 19 ), and the synchronization module is used to realize the synchronization between the timer of the second slave node and the timer of other devices.
  • the synchronization module is used to execute the In the embodiment shown in 11, step S504 is performed by the second slave node.
  • the data transmission apparatus 300 may further include a storage module and a processing module (not shown in FIG. 19 ).
  • the storage module is used for storing program codes and data of the data transmission device 300, for example, storing program codes for realizing the synchronization of the second slave node timer and the master node timer according to the received second synchronization moment.
  • the processing module is further configured to invoke the program code in the storage module to implement the implementation steps with the data transmission apparatus 300 as the execution body, and/or to execute other content steps of the technology described in this application.
  • the data transmission apparatus 300 is only an example provided by the embodiments of the present application, and the data transmission apparatus 300 may have more or less components than those shown in FIG. 19 , and two or more components may be combined , or can be implemented with different configurations of components.
  • FIG. 20 is a schematic structural diagram of a data transmission apparatus provided by an embodiment of the present application.
  • the data transmission apparatus may be applied to the above-mentioned master node, first slave node, or second slave node.
  • the data transmission apparatus 400 includes: a processor 410, a transceiver 420 and a memory 430, the processor 410, the transceiver 420 and the memory 430 are connected to each other through a bus 440, wherein,
  • 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 above-mentioned hardware chip may be an ASIC, a programmable logic device (PLD) or a combination thereof.
  • PLD programmable logic device
  • the above-mentioned PLD may be a complex programmable logic device (CPLD), an FPGA, a generic array logic (GAL) or any combination thereof.
  • the transceiver 420 is used to communicate with other devices.
  • the memory 430 may include volatile memory (volatile memory), such as random access memory (random access memory, RAM); the memory may also include non-volatile memory (non-volatile memory), such as read-only memory (read-only memory) memory, ROM), flash memory (flash memory), hard disk drive (HDD) or solid-state drive (solid-state drive, SSD); the memory 430 may also include a combination of the above-mentioned types of memory.
  • volatile memory such as random access memory (random access memory, RAM
  • non-volatile memory such as read-only memory (read-only memory) memory, ROM), flash memory (flash memory), hard disk drive (HDD) or solid-state drive (solid-state drive, SSD
  • the memory 430 may also include a combination of the above-mentioned types of memory.
  • the memory 430 may be used to store program codes and data, so that the processor 410 can call the program codes stored in the memory 430 to implement functions of modules such as the sending module and/or the receiving module involved in the embodiments of the present application.
  • the bus 440 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA for short) bus or the like.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus 440 can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is shown in FIG. 20, but it does not mean that there is only one bus or one type of bus.
  • the data transmission apparatus 400 shown in FIG. 20 may be a chip or a circuit, for example, a chip or a circuit that may be provided in a terminal device or a communication device.
  • the transceiver 420 described above may also be a communication interface.
  • the function of the transceiver 420 may be implemented by a transceiver circuit or a dedicated transceiver chip.
  • the data transmission device 400 is only an example provided by the embodiment of the present application, and the data transmission device 400 may have more or less components than those shown in FIG. 20 , and two or more components may be combined , or can be implemented with different configurations of components.
  • FIG. 21 is a schematic structural diagram of an electronic device 500 provided by an embodiment of the present application.
  • 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 can be connected to each other through the internal bus 540 , and can also communicate through other means such as wireless transmission.
  • the embodiment of the present application takes the connection through the bus 540 as an example, and the bus 540 may be a PCI bus or an EISA bus or the like.
  • the bus 540 can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is shown in FIG. 21, but it does not mean that there is only one bus or one type of bus.
  • 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 above-mentioned hardware chip may be an ASIC, a PLD or a combination thereof.
  • the above PLD can be CPLD, FPGA, GAL or any combination thereof.
  • Processor 510 executes various types of digitally stored instructions, such as software or firmware programs stored in memory 530, which enable electronic device 500 to provide a wide variety of services.
  • the memory 530 is used to store program codes, and is controlled and executed by the processor 510, so as to execute the processing steps performed by the master node, the first slave node, and the second slave node in any one of the embodiments of FIG. 11 to FIG. 16 ,
  • the memory 530 is used to store program codes, and is controlled and executed by the processor 510, so as to execute the processing steps performed by the master node, the first slave node, and the second slave node in any one of the embodiments of FIG. 11 to FIG. 16 ,
  • FIG. 11 to FIG. 16 For details, reference may be made to the relevant description of the embodiment shown in any of the above-mentioned FIG. 11 to FIG. 16 , which will not be repeated here.
  • the memory 530 may include volatile memory, such as RAM; the memory 530 may also include non-volatile memory, such as ROM, flash memory (Flash Memory), HDD or SSD; the memory 530 may also include a combination of the above types.
  • 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 using a wireless local area network interface) to communicate with other devices or modules.
  • a wired interface such as an Ethernet interface
  • PCIE Peripheral Component Interconnect express
  • FIG. 21 is only a possible implementation manner of the embodiment of the present application.
  • the electronic device may further include more or less components, which is not limited here.
  • Embodiments of the present application further provide a vehicle, and the vehicle may include the data transmission device 100 shown in FIG. 17 , and/or the data transmission device 200 shown in FIG. 18 , and/or the data transmission device shown in FIG. 19 .
  • Transmission device 300 may include the data transmission device 100 shown in FIG. 17 , and/or the data transmission device 200 shown in FIG. 18 , and/or the data transmission device shown in FIG. 19 .
  • Embodiments of the present application further provide a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium runs on a processor, the method flow shown in any of FIG. 11 to FIG. 16 is implemented. .
  • the embodiment of the present application further provides a computer program product, when the computer program product is executed on a processor, the method flow shown in any one of FIG. 11 to FIG. 16 is implemented.
  • the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not be dealt with in the embodiments of the present application. implementation constitutes any limitation.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer-readable storage medium.
  • the technical solution of the present application or a part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium and includes several instructions to make a computer device (which may be A personal computer, a server, or a network device, etc.) executes all or part of the steps of the methods of the various embodiments of the present application.
  • the aforementioned storage medium includes: a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk and other mediums that can store program codes.

Abstract

本申请公开了数据传输方法、装置及相关设备,方法包括:主节点向第一从节点发送第一同步时刻,向第二从节点发送第二同步时刻,其中,第一同步时刻用于实现第一从节点计时器与主节点计时器的同步,第二同步时刻用于实现第二从节点计时器与主节点计时器的同步;主节点向第一从节点发送第一预设指令,向第二从节点发送第二预设指令,其中,第一预设指令包括第一指令生效时刻,第一指令生效时刻用于指示第一从节点执行第一预设指令的时刻,第二预设指令包括第二指令生效时刻,第二指令生效时刻用于指示第二从节点执行第二预设指令的时刻,第二指令生效时刻和第一指令生效时刻是相同的时刻。该方法可以实现多个从节点执行指令的时刻同步。

Description

数据传输方法、装置及相关设备 技术领域
本申请涉及计算机技术领域,尤其涉及一种数据传输方法、装置及相关设备。
背景技术
通信系统中,多个设备进行通信,主节点(指令发送方)有时会期望多个从节点(指令接收方)在某个确定的时刻同步执行自己发送的指令,以获取多个从节点在同一时刻获取的数据,如车内通信网络中一个多域控制器(multi-domain controller,MDC)控制多个摄像头进行同步拍照的场景。
目前,主节点在向每个从节点发送指令时,主节点通常会将待发送的指令分成多个具有固定顺序的数据块向从节点传输,主节点在向每个从节点传输多个数据块的过程中,可能会出现部分数据块传输错误,例如,主节点在发送完数据2,该发送数据块3时,却发送成了数据块4,遗漏了数据块3的发送,在出现数据块传输错误的情况下,主节点会对传输错误的数据块重新调度传输,这通常会导致指令的传输出现不固定时延,从而导致每个从节点执行指令的时刻产生抖动。在多个从节点中的部分或者全部从节点执行指令的时刻产生了抖动的情况下,会出现多个从节点执行指令的时刻无法同步的问题。
因此,如何在主节点向多个从节点传输指令会出现不固定时延的情况下,实现多个从节点执行指令的时刻同步,是需要解决的问题。
发明内容
本申请实施例提供了数据传输方法、装置以及相关设备,以在主节点向多个从节点传输指令会出现不固定时延的情况下,实现多个从节点执行指令时刻的同步。
第一方面,提供了一种数据传输方法,所述方法应用于主节点,包括:
所述主节点发送第一同步时刻;
所述第一同步时刻用于实现第一从节点计时器与主节点计时器的同步;
所述主节点发送第一预设指令;
其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻用于指示所述第一从节点执行所述第一预设指令的时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述主节点与所述第一从节点之间的链路。
上述方案中,主节点通过向第一从节点发送第一同步时刻,指示第一从节点根据第一同步时刻实现第一从节点计时器与主节点计时器的同步,在二者计时器同步的情况下,主节点再将包括第一指令生效时刻(第一指令生效时刻包括第一链路的最大时延)的第一预设指令发送给第一从节点,使得第一从节点在计时至第一指令生效时刻时执行第一预设指令,从而实现在主节点向第一从节点传输指令会出现不固定时延的情况下,避免第一从节点执行主节点发送的指令的时刻的抖动。
在一种可能的实现方式中,所述方法还包括:
所述主节点发送第二同步时刻;
所述第二同步时刻用于实现第二从节点计时器与主节点计时器的同步;
所述主节点发送第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第二链路为所述主节点与所述第二从节点之间的链路。
上述方案中,主节点通过向第二从节点发送第二同步时刻,指示第二从节点根据第二同步时刻实现第二从节点计时器与主节点计时器的同步,在二者计时器同步的情况下,主节点再将包括第二指令生效时刻(第二指令生效时刻包括第二链路的最大时延)的第二预设指令发送给第二从节点,使得第二从节点在计时至第二指令生效时刻时执行第二预设指令,由于第二指令生效时刻和第一指令生效时刻是相同的时刻,因此可以实现第二从节点执行第二预设指令的时刻和第一从节点执行第一预设指令的时刻同步。
在一种可能的实现方式中,所述方法还包括:
所述第一从节点向第二从节点发送第三同步时刻;
所述第三同步时刻用于实现第二从节点计时器与所述第一从节点计时器的同步;
所述主节点发送第二预设指令;
所述第一从节点向所述第二从节点转发所述第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述主节点向所述第一从节点发送所述第二预设指令的时刻、所述第一链路的最大时延以及第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路。
上述方案中,主节点在第二从节点计时器与第一从节点计时器同步的情况下,将包括第二指令生效时刻(第二指令生效时刻包括第二链路的最大时延)的第二预设指令发送给第一从节点,由第一从节点将第二预设指令转发给第二从节点,使得第二从节点在计时至第二指令生效时刻时执行第二预设指令,由于第二指令生效时刻和第一指令生效时刻是相同的时刻,因此可以实现第二从节点执行第二预设指令的时刻和第一从节点执行第一预设指令的时刻同步。
在一种可能的实现方式中,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
在第一预设指令用于指示第一摄像头进行拍照,第二预设指令用于指示第二摄像头进行拍照的情况下,上述方案可以实现第一从节点和第二从节点同步拍照;在第一预设指令用于指示第一显示设备进行显示,第二预设指令用于指示第二显示设备进行显示的情况下,上述方案可以实现第一从节点和第二从节点同步显示。
第二方面,提供了一种数据传输方法,所述方法应用于从节点,包括:
第一从节点接收第一同步时刻;
所述第一同步时刻用于实现第一从节点计时器与主节点计时器的同步;
所述第一从节点接收第一预设指令;
其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述第一从节点与所述主节点之间的链路;
所述第一从节点在所述第一指令生效时刻时执行所述第一预设指令。
在一种可能的实现方式中,所述方法还包括:
第二从节点接收第二同步时刻;
所述第二同步时刻用于实现第二从节点计时器与主节点计时器的同步;
所述第二从节点接收第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第二链路为所述主节点与所述第二从节点之间的链路;
所述第二从节点在所述第二指令生效时刻时执行所述第二预设指令。
在一种可能的实现方式中,所述方法还包括:
所述第一从节点向第二从节点发送第三同步时刻;
所述第三同步时刻用于实现第二从节点计时器与所述第一从节点计时器的同步;
所述第一从节点向所述第二从节点发送第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第一从节点向所述第二从节点发送所述第二预设指令的时刻与第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路。
在一种可能的实现方式中,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
在一种可能的实现方式中,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
第三方面,提供了一种数据传输方法,所述方法应用于数据传输系统,所述数据传输系统包括主节点和第一从节点,所述方法包括:
所述主节点向所述第一从节点发送第一同步时刻;
所述第一同步时刻用于实现第一从节点计时器与主节点计时器的同步;
所述主节点向所述第一从节点发送第一预设指令;
其中,所述第一预设指令包括第一指令生效时刻所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述主节点与所述第一从节点之间的链路;
所述第一从节点在所述第一指令生效时刻执行所述第一预设指令。
在一种可能的实现方式中,所述数据传输系统还包括第二从节点,所述方法还包括:所述主节点向所述第二从节点发送第二同步时刻;
所述第二同步时刻用于实现第二从节点计时器与主节点计时器的同步;
所述主节点向所述第二从节点发送第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻是相同的时刻,所述第二链路为所述主节点与所述第二从节点之间的链路;
所述第二从节点在所述第二指令生效时刻时执行所述第二预设指令。
在一种可能的实现方式中,所述数据传输系统还包括第二从节点,所述方法还包括:
所述第一从节点向所述第二从节点发送第三同步时刻;
所述第三同步时刻用于实现第二从节点计时器与所述第一从节点计时器的同步;
所述第一从节点向所述第二从节点发送第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于所述第一从节点向所述第二从节点发送所述第二预设指令的时刻与第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路;
所述第二从节点在所述第二指令生效时刻时执行所述第二预设指令。
在一种可能的实现方式中,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
在一种可能的实现方式中,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
第四方面,提供了一种数据传输方法,所述方法应用于主节点,包括:
所述主节点接收第四同步时刻;
所述第四同步时刻用于实现主节点计时器与第一从节点计时器的同步;
所述主节点发送第一预设指令;
其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻用于指示所述第一从节点执行所述第一预设指令的时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述主节点与所述第一从节点之间的链路。
上述方案中,主节点通过接收从节点发送的第四同步时刻,根据第四同步时刻实现主节点计时器与从节点计时器的同步,在二者计时器同步的情况下,主节点再将包括第一指令生效时刻的第一预设指令发送给第一从节点,使得第一从节点在计时至第一指令生效时刻时执行第一预设指令,从而实现在主节点向第一从节点传输指令会出现不固定时延的情况下,避免第一从节点执行主节点发送的指令的时刻的抖动。
在一种可能的实现方式中,所述方法还包括:
所述第一从节点向所述第二从节点发送第三同步时刻;
所述第三同步时刻用于实现第二从节点计时器与所述第一从节点计时器的同步;
所述主节点发送第二预设指令;
所述第一从节点向所述第二从节点转发所述第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述 第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述主节点向所述第一从节点发送所述第二预设指令的时刻、所述第一链路的最大时延以及第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路。
在一种可能的实现方式中,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
第五方面,提供了一种数据传输方法,所述方法应用于从节点,包括:
第一从节点发送第四同步时刻;
所述第四同步时刻用于实现主节点计时器与第一从节点计时器的同步;
所述第一从节点接收第一预设指令;
其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述第一从节点与所述主节点之间的链路;
所述第一从节点在所述第一指令生效时刻时执行所述第一预设指令。
在一种可能的实现方式中,所述方法还包括:
所述第一从节点向第二从节点发送第三同步时刻;
所述第三同步时刻用于实现第二从节点计时器与所述第一从节点计时器的同步;
所述第一从节点向所述第二从节点发送第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第一从节点向所述第二从节点发送所述第二预设指令的时刻与第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路。
在一种可能的实现方式中,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
在一种可能的实现方式中,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
第六方面,提供了一种数据传输方法,所述方法应用于数据传输系统,所述数据传输系统包括主节点和第一从节点,所述方法包括:
所述第一从节点向所述主节点发送第四同步时刻;所述第四同步时刻用于实现主节点计时器与第一从节点计时器的同步;
所述主节点向所述第一从节点发送第一预设指令;
其中,所述第一预设指令包括第一指令生效时刻所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述主节点与所述第一从节点之间的链路;
所述第一从节点在所述第一指令生效时刻执行所述第一预设指令。
在一种可能的实现方式中,所述数据传输系统还包括第二从节点,所述方法还包括:
所述第一从节点向所述第二从节点发送第三同步时刻;
所述第三同步时刻用于实现所述二从节点计时器与所述第一从节点计时器的同步;
所述第一从节点向所述第二从节点发送第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于所述第一从节点向所述第二从节点发送所述第二预设指令的时刻与第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路;
所述第二从节点在所述第二指令生效时刻时执行所述第二预设指令。
在一种可能的实现方式中,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
在一种可能的实现方式中,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
第七方面,提供了一种数据传输方法,所述方法应用于主节点,包括:
主节点获取第一计时差值,并发送所述第一计时差值;
所述第一计时差值用于实现第一从节点计时器与主节点计时器的同步,所述第一计时差值为第一链路训练完成时所述主节点计时器与所述第一从节点计时器的计时差值,所述第一链路为所述主节点与所述第一从节点之间的链路;
所述主节点发送第一预设指令;
其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻用于指示所述第一从节点执行所述第一预设指令的时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和。
上述方案中,主节点通过向第一从节点发送第一计时差值,指示第一从节点根据第一计时差值实现第一从节点计时器与主节点计时器的同步,在二者计时器同步的情况下,主节点再将包括第一指令生效时刻的第一预设指令发送给第一从节点,使得第一从节点在计时至第一指令生效时刻时执行第一预设指令,从而实现在主节点向第一从节点传输指令会出现不固定时延的情况下,避免第一从节点执行主节点发送的指令的时刻的抖动。
在一种可能的实现方式中,所述方法还包括:
所述主节点获取第二计时差值,并发送所述第二计时差值;
所述第二计时差值用于实现第二从节点计时器与主节点计时器的同步,所述第二计时差值为第二链路训练完成时所述主节点计时器与所述第二从节点计时器的计时差值,所述第二链路为所述主节点与所述第二从节点之间的链路;
所述主节点发送第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同。
上述方案中,主节点通过向第二从节点发送第二计时差值,指示第二从节点根据第二计时差值实现第二从节点计时器与主节点计时器的同步,在二者计时器同步的情况下,主节点再将包括第二指令生效时刻的第二预设指令发送给第二从节点,使得第二从节点在计时至第二指令生效时刻时执行第二预设指令,由于第二指令生效时刻和第一指令生效时刻是相同的时刻,因此可以实现第二从节点执行第二预设指令的时刻和第一从节点执行第一预设指令的时刻同步。
在一种可能的实现方式中,所述方法还包括:
所述第一从节点获取第三计时差值,并向第二从节点发送第三计时差值;
所述第三计时差值用于实现第二从节点计时器与所述第一从节点计时器的同步,所述第三计时差值为第三链路训练完成时所述第一从节点计时器与所述第二从节点计时器的计时差值,所述第三链路为所述第一从节点与所述第二从节点之间的链路;
所述主节点发送第二预设指令;
所述第一从节点向所述第二从节点转发所述第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述主节点向所述第一从节点发送所述第二预设指令的时刻、第一链路的最大时延以及第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同。
在一种可能的实现方式中,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
第八方面,提供了一种数据传输方法,所述方法应用于从节点,包括:
第一从节点接收第一计时差值;
所述第一计时差值用于实现第一从节点计时器与主节点计时器的同步,所述第一计时差值为第一链路训练完成时所述主节点计时器与所述第一从节点计时器的计时差值,所述第一链路为所述第一从节点与所述主节点之间的链路;
所述第一从节点接收第一预设指令;
其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和;
所述第一从节点在所述第一指令生效时刻时执行所述第一预设指令。
在一种可能的实现方式中,所述方法还包括:
第二从节点接收第二计时差值;
所述第二计时差值用于实现第二从节点计时器与主节点计时器的同步;
所述第二从节点接收第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第二链路为所述主节点与所述第二从节点之间的链路;
所述第二从节点在第二指令生效时刻时执行所述第二预设指令。
在一种可能的实现方式中,所述方法还包括:
所述第一从节点获取第三计时差值,并向第二从节点发送所述第三计时差值;
所述第三计时差值用于实现第二从节点计时器与所述第一从节点计时器的同步,所述第二计时差值为第三链路训练完成时所述第一从节点计时器与所述第二从节点计时器的计时差值,所述第三链路为所述第一从节点与所述第二从节点之间的链路;
所述第一从节点向所述第二从节点发送第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第一从节点向所述第二从节点发送所述第二预设指令的时刻与第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同。
在一种可能的实现方式中,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
在一种可能的实现方式中,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
第九方面,提供了一种数据传输方法,所述方法应用于数据传输系统,所述数据传输系统包括主节点和第一从节点,所述方法包括:
所述主节点获取第一计时差值,并向所述第一从节点发送第一计时差值;
所述第一计时差值用于实现第一从节点计时器与主节点计时器的同步;
所述主节点向所述第一从节点发送第一预设指令;
其中,所述第一预设指令包括第一指令生效时刻所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述主节点与所述第一从节点之间的链路;
所述第一从节点在所述第一指令生效时刻执行所述第一预设指令。
在一种可能的实现方式中,所述数据传输系统还包括第二从节点,所述方法还包括:
所述主节点获取第二计时差值,并向所述第二从节点发送第二计时差值;
所述第二计时差值用于实现第二从节点计时器与主节点计时器的同步;
所述主节点向所述第二从节点发送第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻是相同的时刻,所述第二链路为所述主节点与所述第二从节点之间的链路;
所述第二从节点在所述第二指令生效时刻时执行所述第二预设指令。
在一种可能的实现方式中,所述数据传输系统还包括第二从节点,所述方法还包括:
所述第一从节点获取第三计时差值,并向所述第二从节点发送第三计时差值;
所述第三计时差值用于实现第二从节点计时器与所述第一从节点计时器的同步,所述第三计时差值为第三链路训练完成时所述第一从节点计时器与所述第二从节点计时器的计时差值;
所述第一从节点向所述第二从节点发送第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于 所述主节点向所述第一从节点发送所述第二预设指令的时刻、所述第一链路的最大时延以及第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路;
所述第二从节点在所述第二指令生效时刻时执行所述第二预设指令。
在一种可能的实现方式中,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
在一种可能的实现方式中,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
第十方面,提供了一种数据传输装置,所述装置应用于主节点,包括:
发送模块,用于发送第一同步时刻;
所述第一同步时刻用于实现第一从节点计时器与主节点计时器的同步;
所述发送模块,还用于发送第一预设指令;
其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻用于指示所述第一从节点执行所述第一预设指令的时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述主节点与所述第一从节点之间的链路。
在一种可能的实现方式中,所述发送模块还用于:
发送第二同步时刻;
所述第二同步时刻用于实现第二从节点计时器与主节点计时器的同步;
发送第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第二链路为所述主节点与所述第二从节点之间的链路。
在一种可能的实现方式中,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
第十一方面,提供了一种数据传输装置,所述装置包括第一子装置,所述第一子装置应用于第一从节点,所述第一子装置包括:
第一接收模块,用于接收第一同步时刻;
所述第一同步时刻用于实现第一从节点计时器与主节点计时器的同步;
所述第一接收模块,还用于接收第一预设指令;
其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述第一从节点与所述主节点之间的链路;
第一执行模块,用于在所述第一指令生效时刻时执行所述第一预设指令。
在一种可能的实现方式中,所述系统还包括第二子装置,所述第二子装置应用于第二从 节点,所述第二子装置包括:
第二接收模块,用于接收第二同步时刻;
所述第二同步时刻用于实现第二从节点计时器与主节点计时器的同步;
所述第二接收模块,还用于接收第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第二链路为所述主节点与所述第二从节点之间的链路;
第二执行模块,用于在所述第二指令生效时刻时执行所述第二预设指令。
在一种可能的实现方式中,所述第一子装置还包括:
发送模块,用于向第二从节点发送第二同步时刻;
所述第二同步时刻用于实现第二从节点计时器与所述第一从节点计时器的同步;
所述发送模块,还用于向所述第二从节点发送第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第一从节点向所述第二从节点发送所述第二预设指令的时刻与第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路。
在一种可能的实现方式中,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
在一种可能的实现方式中,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
第十二方面,提供了一种数据传输系统,所述系统包括上述第十方面所述的数据传输装置和上述第十一方面所述的数据传输装置。
第十三方面,提供了一种数据传输装置,所述装置应用于主节点,包括:
接收模块,用于接收第四同步时刻;
所述第四同步时刻用于实现主节点计时器与第一从节点计时器的同步;
发送模块,用于发送第一预设指令;
其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻用于指示所述第一从节点执行所述第一预设指令的时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述主节点与所述第一从节点之间的链路。
在一种可能的实现方式中,所述第一预设指令用于指示第一摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示。
第十四方面,提供了一种数据传输装置,所述装置应用于第一从节点,包括:
发送模块,用于发送第四同步时刻;
所述第四同步时刻用于实现主节点计时器与第一从节点计时器的同步;
接收模块,用于接收第一预设指令;
其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述第一从节点与所述主节点之间的链路;
执行模块,用于在所述第一指令生效时刻时执行所述第一预设指令。
在一种可能的实现方式中,所述发送模块还用于:
向第二从节点发送第三同步时刻;
所述第三同步时刻用于实现第二从节点计时器与所述第一从节点计时器的同步;
向所述第二从节点发送第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第一从节点向所述第二从节点发送所述第二预设指令的时刻与第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路。
在一种可能的实现方式中,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
在一种可能的实现方式中,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
第十五方面,提供了一种数据传输系统,所述系统包括上述第十三方面所述的数据传输装置和上述第十四方面所述的数据传输装置。
第十六方面,提供了一种数据传输装置,所述装置应用于主节点,包括:
发送模块,用于获取第一计时差值,并发送所述第一计时差值;
所述第一计时差值用于实现第一从节点计时器与主节点计时器的同步,所述第一计时差值为第一链路训练完成时所述主节点计时器与所述第一从节点计时器的计时差值,所述第一链路为所述主节点与所述第一从节点之间的链路;
所述发送模块,还用于发送第一预设指令;
其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻用于指示所述第一从节点执行所述第一预设指令的时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和。
在一种可能的实现方式中,所述发送模块还用于:
获取第二计时差值,并发送所述第二计时差值;
所述第二计时差值用于实现第二从节点计时器与主节点计时器的同步,所述第二计时差值为第二链路训练完成时所述主节点计时器与所述第二从节点计时器的计时差值,所述第二链路为所述主节点与所述第二从节点之间的链路;
发送第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效 时刻相同。
在一种可能的实现方式中,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
第十七方面,提供了一种数据传输装置,所述系统包括第一子装置,所述第一子装置应用于第一从节点,所述第一子装置包括:
第一接收模块,用于接收第一计时差值;
所述第一计时差值用于实现第一从节点计时器与主节点计时器的同步,所述第一计时差值为第一链路训练完成时所述主节点计时器与所述第一从节点计时器的计时差值,所述第一链路为所述第一从节点与所述主节点之间的链路;
所述第一接收模块,还用于接收第一预设指令;
其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和;
第一执行模块,用于在所述第一指令生效时刻时执行所述第一预设指令。
在一种可能的实现方式中,所述系统还包括第二子装置,所述第二子装置应用于第二从节点,所述第二子装置包括:
第二接收模块,用于接收第二计时差值;
所述第二计时差值用于实现第二从节点计时器与所述主节点计时器的同步,所述第二计时差值为第二链路训练完成时所述主节点计时器与所述第二从节点计时器的计时差值;
所述第二接收模块,还用于接收第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第二链路为所述主节点与所述第二从节点之间的链路;
第二执行模块,用于在第二指令生效时刻时执行所述第二预设指令。
在一种可能的实现方式中,所述第一子装置还包括:
发送模块,用于获取第三计时差值,并向第二从节点发送所述第三计时差值;
所述第三计时差值用于实现第二从节点计时器与所述第一从节点计时器的同步,所述第三计时差值为第三链路训练完成时所述第一从节点计时器与所述第二从节点计时器的计时差值,所述第三链路为所述第一从节点与所述第二从节点之间的链路;
所述发送模块,还用于向所述第二从节点发送第二预设指令;
其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第一从节点向所述第二从节点发送所述第二预设指令的时刻与第第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同。
在一种可能的实现方式中,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
在一种可能的实现方式中,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进 行显示,所述第二预设指令用于指示第二显示设备进行显示。
第十八方面,提供了一种数据传输系统,所述系统包括上述第十六方面所述的数据传输装置和上述第十七方面所述的数据传输装置。
第十九方面,提供了一种数据传输装置,所述装置包括处理器和存储器;所述存储器用于存储指令,所述处理器用于执行所述指令,当所述处理器执行所述指令时,所述数据传输装置执行如第一方面所述的方法,或执行如第四方面所述的方法,或执行如第七方面所述的方法。
第二十方面,提供了一种数据传输装置,所述装置包括处理器和存储器;所述存储器用于存储指令,所述处理器用于执行所述指令,当所述处理器执行所述指令时,所述数据传输装置执行如第二方面所述的方法,或执行如第五方面所述的方法,或执行如第八方面所述的方法。
第二十一方面,提供了一种计算机可读存储介质,所述计算机可读介质存储有计算机可读指令,当所述计算机可读指令被运行时,执行如上述第一方面至第九方面中任一方面所述的方法。
第二十二方面,提供了一种电子设备,包括一个或多个处理器,所述一个或多个处理器与存储器耦合,所述存储器上存储有计算机程序,所述处理器用于执行所述存储器上存储的所述计算机程序,以实现如上述第一方面至第九方面中任一方面所述的方法。
第二十三方面,提供了一种计算机程序产品,包括计算机程序,当所述计算机程序被计算设备读取并执行时,使得所述计算设备执行如上述第一方面至第九方面中任一方面所述的方法。
第二十四方面,提供了一种车辆,包括上述第十方面所述的数据传输装置和上述第十一方面所述的数据传输装置,或者包括上述第十三方面所述的数据传输装置和上述第十四方面所述的数据传输装置,或者包括上述第十六方面所述的数据传输装置和上述第十七方面所述的数据传输装置,或者包括上述第十九方面所述的数据传输装置和上述第二十方面所述的数据传输装置,或者包括上述第十二方面、第十五方面、第十八方面任一方面所述的数据传输系统。
附图说明
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例涉及的一种通信系统的结构示意图;
图2为本申请实施例涉及的一种链路训练方法的流程示意图;
图3为本申请实施例涉及的一种链路训练过程中主节点和从节点的状态的示意图;
图4为本申请实施例提供的一种数据传输方法的交互示意图;
图5为本申请实施例涉及的一种第一训练帧和第二训练帧传输示意图;
图6为本申请实施例提供的一种数据传输方法的交互示意图;
图7为本申请实施例提供的一种数据传输方法的交互示意图;
图8为本申请实施例涉及的另一种通信系统的结构示意图;
图9为本申请实施例涉及的一种车内摄像系统的结构示意图;
图10为本申请实施例涉及的一种车辆实现同步拍照的示意图;
图11为本申请实施例提供的一种同步执行指令方法的交互示意图;
图12为本申请实施例提供的一种同步执行指令方法的交互示意图;
图13为本申请实施例提供的一种同步执行指令方法的交互示意图;
图14为本申请实施例提供的一种同步执行指令方法的交互示意图;
图15为本申请实施例提供的一种同步执行指令方法的交互示意图;
图16为本申请实施例提供的一种同步执行指令方法的交互示意图;
图17为本申请实施例提供的一种数据传输装置的结构示意图;
图18为本申请实施例提供的一种数据传输装置的结构示意图;
图19为本申请实施例提供的一种数据传输装置的结构示意图;
图20为本申请实施例提供的一种数据传输装置的结构示意图;
图21为本申请实施例提供的一种电子设备的结构示意图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
本申请实施例中的术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下中的至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a、b、c、a-b、a-c、b-c或a-b-c,其中a、b、c可以是单个,也可以是多个。
本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
首先对本申请实施例涉及的通信系统进行介绍。请参阅图1,图1为本申请实施例提供的一种通信系统的结构示意图,如图1所示,该通信系统至少包括:节点1和节点2。这两个节点为网络节点,能够进行有线通信或无线通信。节点1和节点2之间的通信链路可以为车内网络中的两个节点,例如MDC与传感器之间的通信链路、与MDC连接的解串器(deserializer,简称为DES)和与传感器连接的串行器(serializer,简称为SER)之间的通信链路,驾舱域控制器(cockpit domain controller,CDC)到显示设备(如显示屏)之间的通信链路,与CDC连接的SER和与显示设备连接的DES之间的通信链路等。车内网络中的网元可以如下:传感器(如麦克风、毫米波雷达、激光雷达、超声波雷达、摄像头、全球定位系统(global positioning system,GPS)模块、惯性传感器(inertial measurement unit,IMU)、速度传感器、加速度传 感器、湿度传感器、光强度传感器等车载传感器);播放设备(如显示设备、外置功放、扬声器等);交换机(承担路由交换功能,是一个交换机或路由器,汇聚中转各种数据业务,如音视频、同步消息、控制消息等);控制器/计算中心/存储中心(承担某一个功能的计算和控制,可以独立也可以与网关集成,具体的可以是车载计算平台或车载电脑、域控制器、多域控制器,如自动驾驶控制器、信息娱乐控制器等,也可以是数据中心,存储重要的数据,如车内的行车记录仪等)。
另外,节点1和节点2也可以是其他通信网络中的两个节点,例如移动终端、监控设备、智能家居等网络中的节点,本申请实施例不作具体限定。
需要说明的是,在具体实现中,图1所示的通信系统中可以包括更多的节点,例如,还可以包括节点3和节点4,节点1与节点3进行通信,节点2与节点4进行通信,或者节点1通过节点3连接节点4等,此处不作具体限定。
在图1所示的通信系统中,主节点(指发送指令的节点,可以为节点1或者节点2)在向多个从节点(指接收指令的节点)中的每个从节点传输被分割成多个具有固定顺序的数据块的指令的过程中,可能会出现数据块传输错误,在出现数据块传输错误的情况下,主节点会对传输错误的数据块重新调度传输,由于数据块的重传会导致完整指令的传输出现不固定时延,从而导致每个从节点接收到完整指令以及执行指令的时刻产生抖动。在多个从节点中的部分或者全部从节点执行指令的时刻产生了抖动的情况下,存在多个从节点执行指令的时刻无法同步的问题。
本申请实施例提供了数据传输方法、装置及相关设备,在介绍本申请实施例提供的数据传输方法之前,先对本申请实施例中涉及到的链路训练概念及链路训练过程进行介绍。
链路训练,其目的主要是为了实现两节点时钟同步、扰码同步、能力协商等,以建立两节点之间可靠的通信链路。通信系统中,主节点和从节点开始正常通信(例如主节点向从节点发送指令或者从节点向主节点发送数据等)前,均需要先完成主节点和从节点之间的链路训练过程。
下面结合图2和图3对链路训练过程进行详细介绍,其中,图2为本申请实施例涉及的一种链路训练方法的流程示意图,表明了进行链路训练时主节点和从节点可能经历的流程,图3为本申请实施例提供的一种链路训练过程中主节点和从节点的状态的示意图,表明了进行链路训练时主节点和从节点可能经历的状态节点。
如图2所示,链路训练方法可以包括如下流程:
S101、主节点开启主节点计时器。
S102、主节点向从节点发送至少一个第一训练帧。
S103、从节点接收主节点发送的至少一个第一训练帧,根据至少一个第一训练帧对从节点与主节点之间的链路进行训练。
S104、从节点向主节点发送至少一个第二训练帧。
S105、主节点接收从节点发送的至少一个第二训练帧,根据至少一个第二训练帧对从节点与主节点之间的链路进行训练。
如图3所示,在链路训练开始后,主节点先进入训练状态,开启主节点计时器,开始向从节点发送至少一个第一训练帧,从节点在接收到主节点发送的至少一个第一训练帧中的任意一 个第一训练帧之后,也进入训练状态,开始向主节点发送至少一个第二训练帧。
在具体实现中,从节点计时器可以是在链路训练开始后开启的,也可以是在进入训练状态时开启的,还可以是进入下文所述的训练倒数状态时或者数据传输状态时开启的,此处不作具体限定。主节点或者从节点计时器开启时,初始值可以为0,也可以不为0,此处不作具体限定。
在从节点和主节点同步进入训练状态之后,双方进行训练信息交互,具体地,第一训练帧中包括第一训练信息,第二训练帧中包括第二训练信息,双方根据对方发送的训练信息实现时钟同步、扰码同步和能力协商等。主节点和从节点在发送了一定数量的第一训练帧和第二训练帧实现了时钟同步、扰码同步和能力协商等目的之后,从节点会向主节点发送表示可以进入训练倒数状态的第一反馈信息,主节点在接收到第一反馈信息后,便可以进入训练倒数状态。主节点在进入训练倒数状态时,会向从节点发送表示自身已经进入训练倒数状态的第二反馈信息,从节点在接收到主节点发送的第二反馈信息后,也进入训练倒数状态。
在进入训练倒数状态后,主节点开始向从节点发送最后剩余的若干个第一训练帧,从节点也会向主节点发送最后剩余的若干个第二训练帧,通常,在进入训练倒数状态后,主节点和从节点互相发送的训练帧的数量是相同的,在主节点和从节点互相发送完最后剩余的若干个第一训练帧和第二训练帧之后,主节点和从节点自动进入数据传输状态。
在从节点和主节点同步进入数据传输状态后,主节点和从节点之间可以进行数据传输或者指令传输。
以下部分对本申请实施例提供的数据传输方法进行示例性介绍。
在一种数据传输方法中,主节点可以在对主节点与从节点之间的链路进行训练的过程中,通过向从节点发送同步时刻,指示从节点根据同步时刻实现从节点计时器与主节点计时器的同步,在二者计时器同步的情况下,主节点再将包括指令生效时刻(指令生效时刻包括主节点与从节点之间的链路的最大时延)的指令发送给从节点,使得从节点在计时至指令生效时刻时执行主节点发送的指令,从而实现在主节点向从节点传输指令会出现不固定时延的情况下,避免从节点执行主节点发送的指令的时刻的抖动。
为了便于更清楚地理解上述本申请实施例提供的一种数据传输方法,下面提供该方法的交互示意图,如图4所示,该方法可以包括如下步骤:
S201、主节点在对主节点与从节点之间的链路进行训练的过程中,向从节点发送同步时刻。
在具体实现中,主节点在进入训练倒数状态时,会确定接下来要发送的第一训练帧的数量(以下以预设数量表示主节点在进入训练倒数状态时确定的接下来要发送的第一训练帧的数量),主节点在发送完预设数量的第一训练帧时,自动进入数据传输状态。
在具体实现中,主节点在进入训练倒数状态后,向从节点发送的预设数量的第一训练帧中,每个第一训练帧可以包括剩余第一训练帧计数,剩余第一训练帧计数标识第一训练帧剩余待发送个数,例如剩余第一训练帧计数为3,表示主节点在完成当前第一训练帧的发送后,还需要完成3个第一训练帧的发送。
一些情况下,由于主节点向从节点传输训练帧的速率大于从节点向主节点传输训练帧的速率,因此,上述剩余第一训练帧计数也可以表示剩余待发送的第一训练子帧的组数,一个组内的第一训练子帧个数为从节点发送一个第二训练帧的时长内主节点能够发送的第一训练子帧 的个数,如图5所示,从节点在传输一个第二训练帧的同时,主节点能够传输8个第一训练子帧,也就是说,主节点发送8个第一训练子帧的时间和接收一个第二训练帧的时间对齐,从节点发送一个第二训练帧的时间和接收8个第一训练子帧的时间对齐,那么主节点能够同时完成一个第二训练帧的接收和8个第一训练子帧的发送,以及从节点能够同时完成一个第二训练帧的发送和8个第一训练子帧的接收,两个节点无需多余等待时间便可开启下一个状态。
在本申请具体的实施例中,主节点可以根据剩余第一训练帧计数和第一训练帧时长计算得到同步时刻,例如,假设主节点在完成当前第一训练帧的发送时,主节点计时器运行至14μs,剩余第一训练帧计数为3,每个第一训练帧的时长为2μs,也就是主节点每2μs发送一个第一训练帧,则主节点可以确定同步时刻=14μs+3*2μs=20μs。
在本申请具体的实施例中,主节点在进入训练倒数状态后,可以在将要发送的预设数量的第一训练帧中的部分或者全部第一训练帧中携带同步时刻,实现向从节点发送同步时刻。
S202、从节点接收主节点发送的同步时刻,根据同步时刻实现从节点计时器与主节点计时器的同步。
由上文可知,主节点是根据剩余第一训练帧计数和第一训练帧时长计算得到同步时刻,可以理解,在发送完剩余第一训练帧计数的第一训练帧时,主节点计时器会计时至同步时刻。要实现从节点计时器与主节点计时器的同步,则从节点需要在发送完剩余第二训练帧计数的第二训练帧时,从节点计时器的值也为同步时刻。
在具体实现中,若从节点在发送完剩余第二训练帧计数的第二训练帧时,从节点计时器正好计时至同步时刻,则从节点无需对从节点计时器的值进行调整;若从节点在发送完剩余第二训练帧计数的第二训练帧时,从节点计时器没有计时至同步时刻,则从节点可以对从节点计时器进行调整,将从节点计时器的值调整成同步时刻。
下面以剩余第一训练帧计数和剩余第二训练帧计数均为3、第一训练帧和第二训练帧的时长均为2μs以及同步时刻为20μs为例,对从节点根据同步时刻实现从节点计时器与主节点计时器的同步进行说明。
假设从节点在完成当前第一训练帧(即倒数第四个第一训练帧)的接收时,从节点计时器运行至14μs,则从节点在发送完剩余的3个第二训练帧时,从节点计时器会计时至20μs,从节点无需对从节点计时器的值进行调整。假设从节点在完成当前第一训练帧的接收时,从节点计时器运行至12μs,则从节点在发送完剩余的3个第二训练帧时,从节点计时器会计时至18μs,从节点可以根据同步时刻20μs将从节点计时器的值从18μs调整成20μs。
S203、主节点向从节点发送包括指令生效时刻的预设指令。
其中,指令生效时刻用于指示从节点执行预设指令的时刻。
在本申请具体的实施例中,在主节点向从节点发送包括指令生效时刻的预设指令之前,主节点可以先确定预设指令的发送时刻(即主节点向从节点发送预设指令的时刻),并根据预设指令的发送时刻以及主节点和从节点之间的链路的最大时延确定指令生效时刻,具体地,指令生效时刻大于或者等于预设指令的发送时刻与主节点和从节点之间的链路的最大时延之和。其中,时延是指一个报文从一个节点传到另一个节点所需要的时间,其包括了发送时延、传播时延、处理时延和排队时延中的一种或多种。
可以看出,主节点在向从节点发送预设指令时,已经将预设指令在传输过程中发生数据传 输错误、预设指令的传输出现不固定时延的可能性考虑在内,也就是说,即便主节点在向从节点发送预设指令的过程中,发生了数据传输错误、主节点进行了数据重传或预设指令的传输出现了不固定时延的情况下,由于指令生效时刻大于或者等于预设指令的发送时刻与主节点和从节点之间的链路的最大时延之和,也可以保证从节点能够在计时至指令生效时刻时执行预设指令。
举例来讲,假设主节点和从节点之间的链路的最大时延为3μs,主节点在主节点计时器计时至20μs时确定预设指令的发送时刻为22μs,则主节点可以计算得到预设指令的发送时刻22μs和主节点与从节点之间的链路的最大时延3μs的和为25μs,那么主节点确定的指令生效时刻可以为大于或者等于25μs的任意时刻,例如25μs、26μs等,此处不作具体限定。
假设指令生效时刻为25μs,由于预设指令的发送时刻为22μs,因此主节点会在计时至22μs时向从节点发送包括指令生效时刻25μs的预设指令,若在此次指令传输过程中,主节点和从节点之间的链路的实际时延小于3μs,那么从节点会在计时至25μs前接收到预设指令,由于指令生效时刻是25μs,因此即便从节点在计时至25μs前接收到预设指令,那么从节点也会等待计时至25μs时再执行预设指令;若在此次指令传输过程中,主节点和从节点之间的链路的实际时延等于3μs,则从节点会在计时至25μs时接收到预设指令,那么从节点可以在接收到预设指令时直接执行预设指令。
在具体实现中,预设指令可以为任何指令,如用于指示摄像头进行拍照的拍照指令,或者用于指示显示设备进行显示的显示指令等,此处不作具体限定。
S204、从节点接收主节点发送的包括指令生效时刻的预设指令,在计时至指令生效时刻时执行预设指令。
下面对本申请实施例提供的另一种数据传输方法进行介绍。
在该数据传输方法中,主节点可以在对主节点与从节点之间的链路进行训练的过程中,接收从节点发送的同步时刻,根据同步时刻实现主节点计时器与从节点计时器的同步,在二者计时器同步的情况下,主节点再将包括指令生效时刻的指令发送给从节点,使得从节点在计时至指令生效时刻时执行主节点发送的指令,从而实现在主节点向从节点传输指令会出现不固定时延的情况下,避免从节点执行主节点发送的指令的时刻的抖动。
为了便于更清楚地理解上述本申请实施例提供的一种数据传输方法,下面提供该方法的交互示意图,如图6所示,该方法可以包括如下步骤:
S301、从节点在对从节点与主节点之间的链路进行训练的过程中,向主节点发送同步时刻。
在具体实现中,从节点在进入训练倒数态后,会根据主节点发送的第一训练帧中包括的剩余第一训练帧计数确定剩余第二训练帧计数,通常,剩余第二训练帧计数与剩余第一训练帧计数是相等的。其中,剩余第二训练帧计数标识第二训练帧剩余待发送个数。
一些情况下,由于从节点向主节点传输训练帧的速率大于主节点向从节点传输训练帧的速率,因此,上述剩余第二训练帧计数也可以表示剩余待发送的第二训练子帧的组数,一个组内的第二训练子帧个数为主节点发送一个第一训练帧的时长内从节点能够发送的第二训练子帧的个数。
在本申请具体的实施例中,从节点可以根据剩余第二训练帧数和第二训练帧时长计算得到同步时刻,然后在将要发送的第二训练帧中携带同步时刻,实现向主节点发送同步时刻。
S302、主节点接收从节点发送的同步时刻,根据同步时刻实现主节点计时器与从节点计时器的同步。
其中,主节点根据同步时刻实现主节点计时器与从节点计时器的同步的过程与上述图2所示实施例中的S202所述从节点根据同步时刻实现从节点计时器与主节点计时器的同步的过程相类似,具体可以参考S202以及相关描述,此处不再展开赘述。
S303、主节点向从节点发送包括指令生效时刻的预设指令。
S304、从节点接收主节点发送的包括指令生效时刻的预设指令,在计时至指令生效时刻时执行预设指令。
可以看出,S303和S304与上述图5所示实施例中的S203、S204对应相同,具体可以参考S203、S204以及相关描述,此处不再展开赘述。
下面对本申请实施例提供的又一种数据传输方法进行介绍。
在该数据传输方法中,主节点可以在对主节点与从节点之间的链路进行训练的过程中或者在链路训练完成的情况下,获取链路训练完成时主节点计时器与从节点计时器的计时差值,然后向从节点发送该计时差值,以指示从节点根据计时差值实现从节点计时器与主节点计时器的同步,在二者计时器同步的情况下,主节点再将包括指令生效时刻的预设指令发送给从节点,使得从节点可以在计时至指令生效时刻时执行主节点发送的指令,从而实现在主节点向从节点传输指令会出现不固定时延的情况下,避免从节点执行主节点发送的指令的时刻的抖动。
为了便于更清楚地理解上述本申请实施例提供的一种数据传输方法,下面提供该方法的交互示意图,如图7所示,该方法可以包括如下步骤:
S401、主节点在对主节点与从节点之间的链路进行训练的过程中或者在链路训练完成的情况下,获取计时差值,并向从节点发送计时差值。
在一种可能的实施方式中,主节点在对主节点与从节点之间的链路进行训练的过程中,接收从节点发送的链路训练完成时从节点计时器的值t1,然后根据t1和链路训练完成时主节点计时器的值t2计算得到计时差值t2-t1。
在具体实现中,主节点在进入训练倒数状态后,可以预先计算得到链路训练完成时主节点计时器的值t2,从节点在进入训练倒数状态后,也可以预先计算得到链路训练完成时从节点计时器的值t1,例如,从节点在进入训练倒数状态时,从节点计时器的值t1为3μs,剩余第二训练帧计数为2,每个第二训练帧时长为2μs,那么从节点可以预先计算得到链路训练完成时从节点计时器的值t1=3μs+2*2μs=7μs。
在该实施方式中,从节点在进入训练倒数状态后,可以在将要发送的第二训练帧中携带从节点计时器的值t1,实现向主节点发送从节点计时器的值t1。
在另一种可能的实施方式中,主节点在主节点与从节点之间的链路训练完成的情况下,接收从节点发送的链路训练完成时从节点计时器的值t1,主节点在接收到t1后,可以根据t1和链路训练完成时主节点计时器的值t2计算得到计时差值t2-t1。
例如,在链路训练完成时主节点计时器的值t2为8μs,从节点计时器的值t1为5μs,则主节点获取的计时差值为t2-t1=3μs。
为了简便陈述,本申请实施例没有对从节点与主节点之间的链路训练过程进行描述,具体可以参考上述图2和图3以及相关描述。
S402、从节点接收主节点发送的计时差值,根据计时差值实现从节点计时器与主节点计时器的同步。
继续以在链路训练完成时,主节点计时器的值为8μs,从节点计时器的值为5μs,主节点获取的计时差值为3μs为例,假设主节点是在主节点计时器的值为8μs,从节点计时器的值为5μs时,向从节点发送计时差值,由于数据传输的过程可能存在不固定时延,假设时延为2μs,也就是说从节点是在主节点计时器计时至10μs,从节点计时器计时至7μs时接收到计时差值,从节点根据该计时差值3μs将从节点计时器的值调整成10μs,与主节点计时器的值10μs相同,从而实现从节点计时器与主节点计时器的同步。
S403、主节点向从节点发送包括指令生效时刻的预设指令。
S404、从节点接收主节点发送的包括指令生效时刻的预设指令,在计时至指令生效时刻时执行预设指令。
可以看出,S403和S404与上述图5所示实施例中的S203、S204对应相同,具体可以参考S203、S204以及相关描述,此处不再展开赘述。
可以看出,上述数据传输方法中,主节点均是在从节点计时器与主节点计时器同步之后,向从节点发送包括指令生效时刻的预设指令,使得从节点能够在计时至指令生效时刻时执行预设指令,避免了从节点执行主节点发送的预设指令的时刻的抖动。
在本申请实施例提供的上述数据传输方法的基础上,本申请实施例还提供同步执行指令的方法、装置和相关设备,用于实现一个主节点控制多个从节点执行指令的时刻同步。
为了便于理解本申请实施例提供的同步执行指令的方法,下面先对同步执行指令方法涉及的通信系统进行介绍。请参阅图8,图8为本申请实施例提供的一种通信系统的结构示意图,如图8所示,该通信系统包括:节点1、节点2和节点3。这三个节点为网络节点,其中,节点1分别与节点2和节点3进行有线通信或无线通信,在具体实现中,节点2和节点3之间可以通信也可以不通信,或者节点2可以通过节点1与节点3进行间接通信,此处不作具体限定。
图8所示的包括节点1、节点2和节点3的通信网络可以为车内通信网络,也可以是移动终端、监控设备、智能家居等通信网络,本申请实施例不做具体限定。
需要说明的是,在具体实现中,图8所示的通信系统中可以包括更多的节点,例如,还可以包括节点4和节点5,节点1分别与节点4和节点5进行通信,或者节点1通过节点4连接节点5等,此处不作具体限定。
目前,在一些需要实现一个主节点控制多个从节点同步执行指令的场景中,例如,为了提高车辆驾驶的舒适性、方便性和安全性等,汽车一般都配置了包含有多个摄像头的高级驾驶辅助系统(advanced driving assistant system,ADAS),甚至是包含有多个摄像头的全自动驾驶系统,利用多个摄像头同时对汽车周围的环境信息进行采集,方便驾驶员观察或者自动驾驶车辆识别车辆周围环境状态,以实现碰撞避免、倒车影像、360°全景影像等多种复杂的辅助驾驶功能。因此,如何在车内通信网络中,实现一个MDC控制多个摄像头同步执行拍照指令,已经成为汽车驾驶领域研究的热点,然而,在具体实现中,由于每个从节点向主节点传输数据时均可能会出现不固定时延,主节点向每个从节点传输指令时也可能会出现不固定时延,这通常会导致主节点向每个从节点发送指令的时刻产生抖动,以及导致每个从节点执行指令的时刻产生抖动,进而出现多个从节点执行指令的时刻无法同步的问题。
为了便于更清楚地理解上述现有的同步执行指令方法存在的问题,以下以现有的车内通信网络中一个MDC控制多个摄像头同步执行拍照指令的方法为例进行解释说明。
如图9所示,目前的车内通信网络中,通常是一个MDC与一个DES连接,一个DES上有四个端口,该四个端口对应与四个SER进行连接,四个SER又各自连接一个摄像头,MDC通过DES分别向四个SER发送触发拍照指令,四个SER分别根据触发拍照指令触发对应的摄像头进行拍照,以实现一个MDC控制四个摄像头同步拍照。可以理解,图9所示的DES相当于上述控制多个从节点同步执行指令的主节点,四个SER相当于多个从节点。
目前,SER1、SER2、SER3和SER4在向DES传输每一帧图像时,是将每帧图像分割成多行数据块(像素点),一行一行进行传输的,其中,每帧图像中均包括第X行标识,第X行标识用于标识每帧图像的第X行的第一个数据块的起始位置,在SER1向DES传输一帧图像P1,SER2向DES传输一帧图像P2,SER3向DES传输一帧图像P3,SER4向DES传输一帧图像P4,其中,四个SER向DES传输的四帧图像P1、P2、P3和P4是DES控制四个SER同步执行触发拍照指令触发四个摄像头进行同步拍照获得的图像,DES将接收到图像P1的第X行标识的时刻记录为T1,将接收到图像P2的第X行标识的时刻记录为T2,将接收到图像P3的第X行标识的时刻记录为T3,将接收到图像P4的第X行标识的时刻记录为T4,DES在获取到T1、T2、T3和T4后,可以根据T1、T2、T3和T4之间的差值调整自身向四个SER发出触发拍照指令的时刻,以实现四个SER同步执行触发拍照指令触发四个摄像头进行同步拍照,具体如图10所示。
然而,四个SER在向DES传输图像的过程中,可能会出现部分数据块传输错误,在出现数据块传输错误的情况下,四个SER中出现了数据块传输错误的SER会对传输错误的数据块重新调度传输,这通常会导致DES记录的出现了数据块传输错误的SER对应的第X行标识的时刻产生抖动,从而导致DES向该SER发出触发拍照指令的时刻产生抖动,因而也无法保证四个SER在相同的时刻触发四个摄像头进行同步拍照。
本申请实施例提供同步执行指令方法、装置及相关设备,可以保证多个从节点执行指令的时刻同步,具体地,例如实现上述车内通信网络中一个MDC控制多个摄像头同步拍照,其他的,例如实现一个CDC控制多个显示设备同步显示等。
以下部分对本申请实施例提供的同步执行指令方法进行示例性介绍。
在一种同步执行指令方法中,主节点可以在对第一链路(为主节点与第一从节点之间的链路)进行训练的过程中,通过向第一从节点发送第一同步时刻,以指示第一从节点根据第一同步时刻实现第一从节点计时器与主节点计时器的同步,以及在对第二链路(为主节点与第二从节点之间的链路)进行训练的过程中,通过向第二从节点发送第二同步时刻,以指示第二从节点根据第二同步时刻实现第二从节点计时器与主节点计时器的同步,从而实现第一从节点计时器、第二从节点计时器均与主节点计时器同步。
在第一从节点计时器、第二从节点计时器均与主节点计时器同步的情况下,主节点再将包括第一指令生效时刻的第一预设指令发送给第一从节点,以及将包括第二指令生效时刻的第二预设指令发送给第二从节点,使得第一从节点和第二从节点能够对应在计时至第一指令生效时刻和第二指令生效时刻时对应执行主节点发送的第一预设指令和第二预设指令,避免了第一从节点执行主节点发送的第一预设指令的时刻的抖动以及第二从节点执行主节点发送的第二预 设指令的时刻的抖动。另外,由于第二指令生效时刻和第一指令生效时刻是相同的时刻,因此也可以实现第一从节点执行第一预设指令的时刻和第二从节点执行第二预设指令的时刻同步。
为了便于更清楚地理解上述本申请实施例提供的一种同步执行指令方法,下面提供该方法的交互示意图,如图11所示,该方法可以包括如下步骤:
S501、主节点在对第一链路进行训练的过程中,向第一从节点发送第一同步时刻。
S502、主节点在对第二链路进行训练的过程中,向第二从节点发送第二同步时刻。
S503、第一从节点接收主节点发送的第一同步时刻,根据第一同步时刻实现第一从节点计时器与主节点计时器的同步。
S504、第二从节点接收主节点发送的第二同步时刻,根据第二同步时刻实现第二从节点计时器与主节点计时器的同步。
可以理解,由于第一从节点计时器与主节点计时器同步,第二从节点计时器与主节点计时器同步,因此第二从节点计时器与第一从节点计时器也同步。
S505、主节点向第一从节点发送包括第一指令生效时刻的第一预设指令。
其中,第一指令生效时刻大于或者等于第一预设指令的发送时刻与第一链路的最大时延之和,第一预设指令的发送时刻为主节点向第一从节点发送第一预设指令的时刻。
S506、主节点向第二从节点发送包括第二指令生效时刻的第二预设指令。
其中,第二指令生效时刻大于或者等于第二预设指令的发送时刻与第二链路的最大时延之和,第二指令生效时刻和第一指令生效时刻是相同的时刻,第二预设指令的发送时刻为主节点向第二从节点发送第二预设指令的时刻。
在本申请具体的实施例中,在主节点向第一从节点发送包括第一指令生效时刻的第一预设指令以及向第二从节点发送包括第二指令生效时刻的第二预设指令之前,主节点可以先确定第一预设指令的发送时刻和第二预设指令的发送时刻,并根据第一预设指令的发送时刻、第二预设指令的发送时刻、第一链路的最大时延和第二链路的最大时延确定第一指令生效时刻和第二指令生效时刻。
进一步地,主节点可以通过以下步骤确定第一指令生效时刻和第二指令生效时刻:
第一步、主节点确定第一时刻是否大于第二时刻。
其中,第一时刻为第一预设指令的发送时刻与第一链路的最大时延之和,第二时刻为第二预设指令的发送时刻与第二链路的最大时延之和。
第二步、主节点在确定第一时刻大于第二时刻的情况下,根据第一时刻确定第一指令生效时刻,其中,第一指令生效时刻大于或者等于第一时刻;主节点在确定第一时刻小于或者等于第二时刻的情况下,根据第二时刻确定第一指令生效时刻,其中,第一指令生效时刻大于或者等于第二时刻。
由上文可知,第二指令生效时刻与第一指令生效时刻是相同的时刻,根据上述步骤确定了第一指令生效时刻,即确定了第二指令生效时刻。
举例来讲,假设第一从节点计时器、第二从节点计时器与主节点计时器同步的时刻为20μs,主节点确定的第一预设指令的发送时刻和第二预设指令的发送时刻均为22μs,第一链路的最大时延为2μs,第二链路的最大时延为4μs,则主节点可以得出第一时刻为24μs,第二时刻为26μs,主节点确定第二时刻大于第一时刻,因此主节点确定的第一指令生效时刻只需大于或 者等于第二时刻26μs即可,其可以为26μs或者27μs等,本申请实施例对此不作限定。
在第一指令生效时刻和第二指令生效时刻均为26μs的情况下,即便第一从节点在计时至24μs前或者计时至24μs时接收到第一预设指令,第一从节点也会等待计时至26μs时再执行第一预设指令,以及第二从节点在计时至26μs前接收到第二预设指令,第二从节点也会等待计时至26μs时再执行第二预设指令,可以保证二者执行指令的时刻同步。
S507、第一从节点接收主节点发送的包括第一指令生效时刻的第一预设指令,在计时至第一指令生效时刻时执行第一预设指令。
S508、第二从节点接收主节点发送的包括第二指令生效时刻的第二预设指令,在计时至第二指令生效时刻时执行第二预设指令。
由上文可知,第二指令生效时刻与第一指令生效时刻是相同的时刻,因此,第一从节点和第二从节点是在计时至相同的时刻时执行指令,即实现了二者执行指令的时刻同步。下面对本申请实施例提供的另一种同步执行指令方法进行介绍。
在该同步执行指令方法中,主节点可以在对第一链路进行训练的过程中或者在第一链路训练完成的情况下,获取第一计时差值,以及在对第二链路进行训练的过程中或者在第二链路训练完成的情况下,获取第二计时差值,然后向第一从节点发送第一计时差值,以指示第一从节点根据第一计时差值实现第一从节点计时器与主节点计时器的同步,以及向第二从节点发送第二计时差值,以指示第二从节点根据第二计时差值实现第二从节点计时器与主节点计时器的同步,从而实现第一从节点计时器、第二从节点计时器均与主节点计时器同步。
在第一从节点计时器、第二从节点计时器均与主节点计时器同步的情况下,主节点再将包括第一指令生效时刻的第一预设指令发送给第一从节点,以及将包括第二指令生效时刻的第二预设指令发送给第二从节点,使得第一从节点和第二从节点能够对应在计时至第一指令生效时刻和第二指令生效时刻时对应执行主节点发送的第一预设指令和第二预设指令,避免了第一从节点执行主节点发送的第一预设指令的时刻的抖动以及第二从节点执行主节点发送的第二预设指令的时刻的抖动。另外,由于第二指令生效时刻和第一指令生效时刻是相同的时刻,因此也可以实现第一从节点执行第一预设指令的时刻和第二从节点执行第二预设指令的时刻同步。
为了便于更清楚地理解上述本申请实施例提供的一种同步执行指令方法,下面提供该同步执行指令方法的交互示意图,如图12所示,该方法可以包括如下步骤:
S601、主节点在对第一链路进行训练的过程中或者在第一链路训练完成的情况下,获取第一计时差值,并向第一从节点发送第一计时差值。
其中,第一计时差值为第一链路训练完成时主节点计时器与第一从节点计时器的计时差值。
S602、主节点在对第二链路进行训练的过程中或者在第二链路训练完成的情况下,获取第二计时差值,并向第二从节点发送第二计时差值。
其中,第二计时差值为第二链路训练完成时主节点计时器与第二从节点计时器的计时差值。
S603、第一从节点接收主节点发送的第一计时差值,根据第一计时差值实现第一从节点计时器与主节点计时器的同步。
S604、第二从节点接收主节点发送的第二计时差值,根据第二计时差值实现第二从节点计时器与主节点计时器的同步。
S605、主节点向第一从节点发送包括第一指令生效时刻的第一预设指令。
S606、主节点向第二从节点发送包括第二指令生效时刻的第二预设指令。
S607、第一从节点接收主节点发送的包括第一指令生效时刻的第一预设指令,在计时至第一指令生效时刻时执行第一预设指令。
S608、第二从节点接收主节点发送的包括第二指令生效时刻在内的第二预设指令,在计时至第二指令生效时刻时执行第二预设指令。
可以看出,S605至S608与图11所示的S505至S508对应相同,具体可以参考上述图11以及相关描述,此处不再展开赘述。
可以理解,在具体实现中,还可能存在以下情况:
示例性的,第一从节点计时器与主节点计时器同步成功,且第一从节点成功接收到第一预设指令并在第一指令生效时刻时执行了第一预设指令,而第二从节点计时器与主节点计时器没有同步成功导致第二从节点即便接收到主节点发送的第二预设指令但未能与第一从节点同步执行指令的情况。
示例性的,第一从节点计时器与主节点计时器同步成功,且第一从节点成功接收到第一预设指令并在第一指令生效时刻时执行了第一预设指令,而第二从节点计时器与主节点计时器同步成功,但在同步成功后第二链路断开,导致第二从节点没有接收到主节点发送的第二预设指令,第二从节点未能与第一从节点同步执行指令的情况。
针对上述示例性的情况,主节点可以在向第一从节点发送新的第一预设指令之前,重新对第二链路进行训练,并计算得到新的第二同步时刻或者获取新的第二计时差值,并向第二从节点发送,使得第二从节点可以根据新的第二同步时刻或者新的第二计时差值实现第二从节点计时器与主节点计时器的同步。
可以理解,在第二从节点根据新的第二同步时刻或者新的第二计时差值实现了第二从节点计时器与主节点计时器的同步的情况下,由于第一从节点计时器与主节点计时器已经是同步的,那么第二从节点计时器与第一从节点计时器也是同步的。
在第二从节点计时器、第一从节点计时器、主节点计时器同步的情况下,主节点可以向第一从节点发送包括新的第一指令生效时刻的新的第一预设指令,使得第一从节点在计时至新的第一指令生效时刻时执行新的第一预设指令,以及向第二从节点发送包括新的第二指令生效时刻的新的第二预设指令,使得第二从节点在计时至新的第二指令生效时刻时执行新的第二预设指令。其中,新的第一指令生效时刻大于或者等于新的第一预设指令的发送时刻与第一链路的最大时延之和,新的第二指令生效时刻大于或者等于新的第二预设指令的发送时刻与第二链路的最大时延之和,新的第二指令生效时刻和新的第一指令生效时刻是相同的时刻。
另外,在具体实现中,还可能存在主节点与第一从节点之间可以直接通信,第一从节点与第二从节点之间可以直接通信,而主节点和第二从节点之间不能直接通信,且主节点也不能通过第一从节点与第二从节点进行间接通信,但是需要实现第一从节点和第二从节点同步执行指令的场景,继续以图8所示的通信系统为例,假设节点2为主节点,节点1为第一从节点,节点3为第二从节点,节点2可以与节点1直接通信,节点1可以与节点3直接通信,但节点2不能和节点3直接通信,且节点2也不能通过节点1与节点3通信,但需要实现节点1和节点3执行指令的时刻同步。在这种情况下,可以通过以下两种示例性的同步执行指 令方法实现第一从节点和第二从节点执行指令的时刻同步。
如图13所示,第一种方法可以包括如下步骤:
S701、主节点在对第一链路进行训练的过程中,向第一从节点发送第一同步时刻。
S702、第一从节点接收主节点发送的第一同步时刻,根据第一同步时刻实现第一从节点计时器与主节点计时器的同步。
S703、第一从节点在对第三链路进行训练的过程中,向第二从节点发送第三同步时刻。
其中,第三链路为第一从节点与第二从节点之间的链路。
S704、第二从节点接收第一从节点发送的第三同步时刻,根据第三同步时刻实现第二从节点计时器与第一从节点计时器的同步。
S705、主节点向第一从节点发送包括第三指令生效时刻的第三预设指令。
其中,第三指令生效时刻大于或者等于第三预设指令的发送时刻、第一链路的最大时延以及第三链路的最大时延之和,第三预设指令的发送时刻为主节点向第一从节点发送第三预设指令的时刻。
S706、第一从节点接收主节点发送的包括第三指令生效时刻的第三预设指令,在计时至第三指令生效时刻时执行第三预设指令。
S707、第一从节点向第二从节点发送包括第四指令生效时刻在内的第四预设指令。
其中,第四指令生效时刻大于或者等于第四预设指令的发送时刻和第三链路的最大时延之和,第四指令生效时刻和第三指令生效时刻是相同的时刻,第四预设指令的发送时刻为第一从节点向第二从节点发送第四预设指令的时刻。
S708、第二从节点接收第一从节点发送的包括第四指令生效时刻在内的第四预设指令,在计时至第四指令生效时刻时执行第四预设指令。
在一种可能的实施方式中,主节点在向第一从节点发送包括第三指令生效时刻在内的第三预设指令之前,主节点可以先确定第三预设指令的发送时刻,并根据第三预设指令的发送时刻、第一链路的最大时延、第三链路的最大时延确定第三指令生效时刻,在主节点将包括第三指令生效时刻在内的第三预设指令发送至第一从节点之后,第一从节点根据第三指令生效时刻确定第四预设指令的发送时刻。
进一步地,主节点确定的第三指令生效时刻可以大于或者等于第三预设指令的发送时刻+第一链路的最大时延+第三链路的最大时延。
由上文可知,第四指令生效时刻与第三指令生效时刻是相同的时刻,根据上述步骤确定了第三指令生效时刻,即确定了第四指令生效时刻。
继续以第一从节点计时器、第二从节点计时器与主节点计时器同步的时刻为20μs,主节点确定的第三预设指令的发送时刻为22μs,第一链路的最大时延为2μs,第三链路的最大时延为4μs为例,第三预设指令的发送时刻22μs+第一链路的最大时延2μs+第三链路的最大时延4μs=28μs,则主节点确定的第三指令生效时刻只需大于或者等于28μs即可。
在第三指令生效时刻和第四指令生效时刻均为28μs的情况下,由于第三预设指令的发送时刻为22μs,第一链路的最大时延为2μs,因此第一从节点可以在计时至24μs前或者计时至24μs时接收到包括第三指令生效时刻28μs在内的第三预设指令,假设第一从节点在计时至24μs时接收到第三预设指令,由于第三链路的最大时延为4μs,第一从节点需要确保第二从 节点也在计时至28μs时执行第四预设指令,则第一从节点可以将第四预设指令的发送时刻确定为24μs,这样第二从节点可以在计时至28μs前或者计时至28μs时接收到第四预设指令,然后第二从节点也可以在计时至28μs时执行第四预设指令,这与第一从节点在计时至28μs时执行第三预设指令是同步的。
如图14所示,第二种方法可以包括如下步骤:
S801、主节点在对第一链路进行训练的过程中或者在第一链路训练完成的情况下,获取第一计时差值,并向第一从节点发送第一计时差值。
S802、第一从节点接收主节点发送的第一计时差值,根据第一计时差值实现第一从节点计时器与主节点计时器的同步。
S803、第一从节点在对第三链路进行训练的过程中或者在第三链路训练完成的情况下,获取第三计时差值,并向第二从节点发送第三计时差值。
其中,第三计时差值为第三链路训练完成时第一从节点计时器与第二从节点计时器的计时差值。
S804、第二从节点接收第一从节点发送的第三计时差值,根据第三计时差值实现第二从节点计时器与第一从节点计时器的同步。
S805、主节点向第一从节点发送包括第三指令生效时刻的第三预设指令。
S806、第一从节点接收主节点发送的包括第三指令生效时刻的第三预设指令,在计时至第三指令生效时刻时执行第三预设指令。
S807、第一从节点向第二从节点发送包括第四指令生效时刻的第四预设指令。
S808、第二从节点接收第一从节点发送的包括第四指令生效时刻的第四预设指令,在计时至第四指令生效时刻时执行第四预设指令。
可以看出,S805至S808与图13所示的S705至S708对应相同,具体可以参考上述图13以及相关描述,此处不再展开赘述。
可以理解,在具体实现中,还可能存在以下情况:
示例性的,第一从节点计时器与主节点计时器同步成功,且第一从节点成功接收到第三预设指令并在第三指令生效时刻时执行了第三预设指令,而第二从节点计时器与第一从节点计时器没有同步成功导致第二从节点即便接收到第四预设指令但未能与第一从节点同步执行指令的情况。
示例性的,第一从节点计时器与主节点计时器同步成功,且第一从节点成功接收到第三预设指令并在第三指令生效时刻时执行了第三预设指令,而第二从节点计时器与第一从节点计时器同步成功,但在同步成功后第三链路断开,导致第二从节点没有接收到第一从节点发送的第四预设指令,第二从节点未能与第一从节点同步执行指令的情况。
针对上述示例性的情况,第一从节点可以重新对第三链路进行训练,并计算得到新的第三同步时刻或者获取新的第三计时差值,并向第二从节点发送,使得第二从节点可以根据新的第三同步时刻或者新的第三计时差值实现第二从节点计时器与第一从节点计时器的同步。
可以理解,在第二从节点根据新的第三同步时刻或者新的第三计时差值实现了第二从节点计时器与第一从节点计时器的同步的情况下,由于第一从节点计时器与主节点计时器已经是同步的,那么第二从节点计时器与主节点计时器也是同步的。
在第二从节点计时器、第一从节点计时器、主节点计时器同步的情况下,主节点可以向第一从节点发送包括新的第三指令生效时刻的新的第三预设指令,第一从节点在接收到新的第三预设指令之后,可以在计时至新的第三指令生效时刻时执行新的第三预设指令,以及向第二从节点发送包括新的第四指令生效时刻的新的第四预设指令,使得第二从节点在计时至新的第四指令生效时刻时执行新的第四预设指令。其中,新的第三指令生效时刻大于或者等于新的第三预设指令的发送时刻、第一链路的最大时延以及第三链路的最大时延之和,新的第四指令生效时刻大于或者等于第一从节点向第二从节点发送新的第四预设指令的时刻与第三链路的最大时延之和,新的第四指令生效时刻和新的第三指令生效时刻是相同的时刻。
在具体实现中,还可能存在主节点与第一从节点之间可以直接通信,第一从节点与第二从节点之间可以直接通信,而主节点和第二从节点之间不能直接通信,且主节点也不能通过第一从节点与第二从节点进行间接通信,但是需要实现第一从节点和第二从节点同步执行指令的场景,继续以图8所示的通信系统为例,假设节点2为主节点,节点1为第一从节点,节点3为第二从节点,节点2可以与节点1直接通信,节点1可以与节点3直接通信,节点2不能和节点3直接通信,但节点2可以通过节点1与节点3间接通信,需要实现节点1和节点3执行指令的时刻同步。在这种情况下,可以通过以下两种示例性的同步执行指令方法实现第一从节点和第二从节点执行指令的时刻同步。
如图15所示,第一种方法可以包括如下步骤:
S901、主节点在对第一链路进行训练的过程中,向第一从节点发送第一同步时刻。
S902、第一从节点接收主节点发送的第一同步时刻,根据第一同步时刻实现第一从节点计时器与主节点计时器的同步。
S903、第一从节点在对第三链路进行训练的过程中,向第二从节点发送第三同步时刻。
S904、第二从节点接收第一从节点发送的第三同步时刻,根据第三同步时刻实现第二从节点计时器与第一从节点计时器的同步。
S905、主节点向第一从节点发送包括第三指令生效时刻的第三预设指令和包括第五指令生效时刻的第五预设指令。
S906、第一从节点接收主节点发送的包括第三指令生效时刻的第三预设指令和包括第五指令生效时刻的第五预设指令,在计时至第三指令生效时刻时执行第三预设指令。
S907、第一从节点向第二从节点发送包括第五指令生效时刻的第五预设指令。
S908、第二从节点接收第一从节点发送的包括第五指令生效时刻的第五预设指令,在计时至第五指令生效时刻时执行第五预设指令。
在本实施例中,主节点在向第一从节点发送包括第三指令生效时刻的第三预设指令和包括第五指令生效时刻的第五预设指令之前,主节点可以先确定第三预设指令的发送时刻,然后根据第三预设指令的发送时刻和第一链路的最大时延确定第五预设指令的发送时刻,最后根据第五预设指令的发送时刻、第三链路的最大时延确定第五指令生效时刻。其中,第五预设指令的发送时刻为第一从节点向第二从节点发送第五预设指令的时刻。
进一步地,主节点确定的第五预设指令的发送时刻大于或者等于第三预设指令的发送时刻和第一链路的最大时延之和,主节点确定的第五指令生效时刻大于或者等于第五预设指令的发送时刻与第三链路的最大时延之和。
由上文可知,第三指令生效时刻与第五指令生效时刻是相同的时刻,根据上述步骤确定了第五指令生效时刻,即确定了第三指令生效时刻。
在具体实现中,主节点向第一从节点发送的第五预设指令中可以包括第五预设指令的发送时刻,第五预设指令的发送时刻用于第一从节点在计时至第五预设指令的发送时刻时向第二从节点发送第五预设指令。
继续以第一从节点计时器、第二从节点计时器与主节点计时器同步的时刻为20μs,主节点确定的第三预设指令的发送时刻为22μs,第一链路的最大时延为2μs,第三链路的最大时延为4μs为例,第三预设指令的发送时刻22μs+第一链路的最大时延为2μs=24μs,则主节点可以确定第五预设指令的发送时刻只需大于或者等于24μs即可。
在第五预设指令的发送时刻为24μs的情况下,第五预设指令的发送时刻24μs+第三链路的最大时延4μs=28μs,则主节点确定的第五指令生效时刻只需大于或者等于28μs即可。
在第五指令生效时刻和第三指令生效时刻均为28μs的情况下,由于第三预设指令的发送时刻为22μs,第一链路的最大时延为2μs,因此第一从节点可以在计时至24μs前或者计时至24μs时接收到包括第三指令生效时刻28μs的第三预设指令和包括第五指令生效时刻28μs的第五预设指令,假设第一从节点在计时至24μs时接收到第三预设指令和第五预设指令,由于第五预设指令的发送时刻为24μs,则第一从节点会在计时至24μs时向第二从节点发送第五预设指令,第三链路的最大时延为4μs,则第二从节点可以在计时至28μs前或者28μs时接收到第五预设指令,然后第二从节点也可以在计时至28μs时执行第五预设指令,这与第一从节点在计时至28μs时执行第三预设指令是同步的。
如图16所示,第二种方法可以包括如下步骤:
S1001、主节点在对第一链路进行训练的过程中或者在第一链路训练完成的情况下,获取第一计时差值,并向第一从节点发送第一计时差值。
S1002、第一从节点接收主节点发送的第一计时差值,根据第一计时差值实现第一从节点计时器与主节点计时器的同步。
S1003、第一从节点在对第三链路进行训练的过程中或者在第三链路训练完成的情况下,获取第三计时差值,并向第二从节点发送第三计时差值。
S1004、第二从节点接收第一从节点发送的第三计时差值,根据第三计时差值实现第二从节点计时器与第一从节点计时器的同步。
S1005、主节点向第一从节点发送包括第三指令生效时刻的第三预设指令和包括第五指令生效时刻的第五预设指令。
S1006、第一从节点接收主节点发送的包括第三指令生效时刻的第三预设指令和包括第五指令生效时刻的第五预设指令,在计时至第三指令生效时刻时执行第三预设指令。
S1007、第一从节点向第二从节点发送包括第五指令生效时刻的第五预设指令。
S1008、第二从节点接收第一从节点发送的包括第五指令生效时刻的第五预设指令,在计时至第五指令生效时刻时执行第五预设指令。
可以看出,S1005至S1008与图15所示的S905至S908对应相同,具体可以参考上述图15以及相关描述,此处不再展开赘述。
可以理解,在具体实现中,还可能存在以下情况:
示例性的,第一从节点计时器与主节点计时器同步成功,且第一从节点成功接收到第三预设指令并在第三指令生效时刻时执行了第三预设指令,而第二从节点计时器与第一从节点计时器没有同步成功导致第二从节点即便接收到第五预设指令但未能与第一从节点同步执行指令的情况。
示例性的,第一从节点计时器与主节点计时器同步成功,且第一从节点成功接收到第三预设指令并在第三指令生效时刻时执行了第三预设指令,而第二从节点计时器与第一从节点计时器同步成功,但在同步成功后第三链路断开,导致第二从节点没有接收到第一从节点发送的第五预设指令,第二从节点未能与第一从节点同步执行指令的情况。
示例性的,第一从节点计时器与主节点计时器同步成功,第二从节点计时器与第一从节点计时器同步成功,且第一从节点成功接收到第三预设指令并在第三指令生效时刻时执行了第三预设指令,但第一从节点漏接第五预设指令,导致第一从节点未能向第二从节点发送第五预设指令,从而导致第二从节点未能与第一从节点同步执行指令的情况。
针对上述示例性的前两种情况,第一从节点可以重新对第三链路进行训练,并计算得到新的第三同步时刻或者获取新的第三计时差值,并向第二从节点发送,使得第二从节点可以根据新的第三同步时刻或者新的第三计时差值实现第二从节点计时器与第一从节点计时器的同步。
可以理解,在第二从节点根据新的第三同步时刻或者新的第三计时差值实现了第二从节点计时器与第一从节点计时器的同步的情况下,由于第一从节点计时器与主节点计时器已经是同步的,那么第二从节点计时器与主节点计时器也是同步的。
在第二从节点计时器、第一从节点计时器、主节点计时器同步的情况下,主节点可以向第一从节点发送包括新的第三指令生效时刻的新的第三预设指令和包括新的第五指令生效时刻的新的第五预设指令,第一从节点在接收到新的第三预设指令和新的第五预设指令之后,可以在计时至新的第三指令生效时刻时执行新的第三预设指令,以及向第二从节点发送包括新的第五指令生效时刻在内的新的第五预设指令,使得第二从节点在计时至新的第五指令生效时刻时执行新的第五预设指令。其中,新的第三指令生效时刻大于或者等于新的第三预设指令的发送时刻、第一链路的最大时延以及第三链路的最大时延之和,新的第五指令生效时刻大于或者等于第一从节点向第二从节点发送新的第五预设指令的时刻与第三链路的最大时延之和,新的第五指令生效时刻和新的第三指令生效时刻是相同的时刻。
针对上述示例性的最后一种情况,由于第二从节点计时器、第二从节点计时器、主节点计时器已经是同步的,无需再进行链路训练以及实现计时器同步等过程,主节点只需向第一从节点发送包括新的第三指令生效时刻的新的第三预设指令和包括新的第五指令生效时刻的新的第五预设指令即可,第一从节点在接收到新的第三预设指令和新的第五预设指令之后,可以在计时至新的第三指令生效时刻时执行新的第三预设指令,以及向第二从节点发送包括新的第五指令生效时刻的新的第五预设指令,使得第二从节点在计时至新的第五指令生效时刻时执行新的第五预设指令。
在具体实现中,图11至图16所示实施例中的第一预设指令、第二预设指令、第三预设指令、第四预设指令、第五预设指令可以为任何指令,如用于指示摄像头进行拍照的拍照指令,或者用于指示显示设备进行显示的显示指令等,此处不作具体限定。可以理解,在上述第一预设指令、第二预设指令、第三预设指令、第四预设指令、第五预设指令为拍照指令的情况下, 上述本申请实施例提供的同步执行指令方法均可以实现第一从节点和第二从节点同步拍照,在上述第一预设指令、第二预设指令、第三预设指令、第四预设指令、第五预设指令均为显示指令的情况下,上述本申请实施例提供的同步执行指令方法均可以实现第一从节点和第二从节点同步显示。
需要说明的是,为了简便陈述,上述图11至图16所示实施例没有对第一链路的训练过程、第二链路的训练过程、第三链路的训练过程进行展开描述,上述链路的训练过程均与图2以及图3所描述的链路训练过程相类似,具体可以参考上述图2、图3以及相关描述,此处不再展开赘述。
为了简便陈述,图11、图13以及图15所示实施例没有对第一从节点根据第一同步时刻实现第一从节点计时器与主节点计时器的同步、第二从节点根据第二同步时刻实现第二从节点计时器与主节点计时器的同步、第二从节点根据第三同步时刻实现第二从节点计时器与第一从节点计时器的同步等同步过程进行展开描述,上述节点实现计时器同步的过程均与图4所描述的从节点根据同步时刻实现从节点计时器与主节点计时器的同步的过程相类似,具体可以参考上述图4以及相关描述,此处不再展开赘述。
为了简便陈述,图12、图14以及图16所示实施例没有对主节点获取第一计时差值、主节点获取第二计时差值、第一从节点获取第三计时差值等获取计时差值过程进行展开描述,上述节点获取计时差值的过程均与图6所示的主节点获取计时差值的过程相类似,具体可以参考上述图6以及相关描述,此处不再展开赘述。图12、图14以及图16所示实施例也没有对第一从节点根据第一计时差值实现第一从节点计时器与主节点计时器的同步、第二从节点根据第二计时差值实现第二从节点计时器与主节点计时器的同步、第二从节点根据第三计时差值实现第二从节点计时器与第一从节点计时器的同步等同步过程进行展开描述,上述节点实现计时器同步的过程均与图7所示的从节点根据计时差值实现从节点计时器与主节点计时器的同步的过程相类似,具体可以参考上述图7以及相关描述,此处不再展开赘述。
结合上文实施例中的相关描述,下面介绍本申请适用的相关装置。
请参见图17,图17为本申请实施例提供的一种数据传输装置的结构示意图,该数据传输装置可以应用于上文所述的主节点,如图17所示,所述数据传输装置100包括发送模块110,在包括发送模块110的基础上,其还可以包括接收模块120,其中,
发送模块110用于向其他设备发送数据,例如,发送模块110用于执行图4所示实施例中由主节点执行的步骤S201和S203或者用于执行图7所示实施例中由主节点执行的步骤S401和S403,又例如,发送模块110用于执行图11所示实施例中由主节点执行的步骤S501、S502、S505和S506。
接收模块120用于接收其他设备发送的数据,例如,接收模块120用于接收图6所示实施例中由从节点发送的同步时刻。
可选地,该数据传输装置100还可包括同步模块(图17中未示出),用于实现主节点计时器与其他设备计时器的同步,例如,同步模块用于执行图6中由主节点执行的步骤S302。
可选地,该数据传输装置100还可包括存储模块(图17中未示出)和处理模块(图17中未示出)。该存储模块用于存储数据传输装置100的程序代码和数据,例如存储用于根据接收到的同步时刻实现主节点计时器与从节点计时器的同步的程序代码。处理模块用于调用该 存储模块中的程序代码以实现以数据传输装置100为执行主体的实施步骤,和/或用于执行本申请中所描述的技术的其他内容步骤。
其中,处理模块可以是处理器或控制器,例如可以是中央处理器(central processing unit,CPU),通用处理器,数字信号处理器(digital signal processor,DSP),专用集成电路(application-specific integrated circuit,ASIC),现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合等等。发送模块110和接收模块120可以是通信接口、收发器、收发电路等,其中,通信接口是统称,可以包括一个或多个接口,存储模块可以是存储器,或者其他用于提供存储功能的服务或模块。
具体地,上述装置100执行各种操作的具体实现可参照上述方法实施例由主节点执行的具体操作,在此不再赘述。
应当理解,数据传输装置100仅为本申请实施例提供的一个例子,并且,数据传输装置100可具有比图17示出的部件更多或更少的部件,可以组合两个或更多个部件,或者可具有部件的不同配置实现。
请参见图18,图18为本申请实施例提供的一种数据传输装置的结构示意图,该数据传输装置可以应用于上文所述第一从节点,如图18所示,所述数据传输装置200包括接收模块210和执行模块220,在包括接收模块210和执行模块220的基础上,其还可以包括发送模块230,其中,
接收模块210用于接收其他设备发送的数据,例如,接收模块210用于接收图11所示实施例中由主节点发送的第一同步时刻或者用于接收图13所示实施例中由主节点发送的第一计时差值。
执行模块220用于执行其他设备发送的指令,例如,执行模块230用于执行图13所示实施例中由第一从节点执行的步骤S706。
发送模块230用于向其他设备发送数据,例如,发送模块230用于执行图13所示实施例中由第一从节点执行的步骤S703和步骤S707或者用于执行图16所示实施例中由第一从节点执行的步骤S1003和步骤S1007。
可选地,该数据传输装置200还可包括同步模块(图18中未示出),同步模块用于实现第一从节点计时器与其他设备计时器的同步,例如,同步模块用于执行图11所示实施例中由第一从节点执行的步骤S503。
可选地,该数据传输装置200还可包括存储模块和处理模块(图18中未示出)。该存储模块用于存储数据传输装置200的程序代码和数据,例如存储用于根据接收到的第三同步时刻实现第一从节点计时器与主节点计时器的同步的程序代码。处理模块还用于调用该存储模块中的程序代码以实现以数据传输装置200为执行主体的实施步骤,和/或用于执行本申请中所描述的技术的其他内容步骤。
具体地,上述装置200执行各种操作的具体实现可参照上述方法实施例的具体操作,在此不再赘述。
应当理解,数据传输装置200仅为本申请实施例提供的一个例子,并且,数据传输装置 200可具有比图18示出的部件更多或更少的部件,可以组合两个或更多个部件,或者可具有部件的不同配置实现。
请参见图19,图19为本申请实施例提供的一种数据传输装置的结构示意图,该数据传输装置可以应用于上文所述第二从节点,如图19所示,所述数据传输装置300包括接收模块310和执行模块320,其中,
接收模块310用于接收其他设备发送的数据,例如,接收模块210用于接收图11所示实施例中由主节点发送的第二同步时刻或者用于接收图12所示实施例中由主节点发送的第二计时差值。
执行模块320,用于执行其他设备发送的指令,例如,执行模块230用于执行图13所示实施例中由第二从节点执行的步骤S708。
可选地,该数据传输装置300还可包括发送模块(图19中未示出),用于向其他设备发送数据。
可选地,该数据传输装置300还可包括同步模块(图19中未示出),同步模块用于实现第二从节点计时器与其他设备计时器的同步,例如,同步模块用于执行图11所示实施例中由第二从节点执行的步骤S504。
可选地,该数据传输装置300还可包括存储模块和处理模块(图19中未示出)。该存储模块用于存储数据传输装置300的程序代码和数据,例如存储用于根据接收到的第二同步时刻实现第二从节点计时器与主节点计时器的同步的程序代码。处理模块还用于调用该存储模块中的程序代码以实现以数据传输装置300为执行主体的实施步骤,和/或用于执行本申请中所描述的技术的其他内容步骤。
具体地,上述装置300执行各种操作的具体实现可参照上述方法实施例的具体操作,在此不再赘述。
应当理解,数据传输装置300仅为本申请实施例提供的一个例子,并且,数据传输装置300可具有比图19示出的部件更多或更少的部件,可以组合两个或更多个部件,或者可具有部件的不同配置实现。
请参见图20,图20为本申请实施例提供的一种数据传输装置的结构示意图,该数据传输装置可以应用于上文所述的主节点、第一从节点或者第二从节点,所述数据传输装置400包括:处理器410、收发器420以及存储器430,所述处理器410、收发器420以及存储器430通过总线440相互连接,其中,
所述处理器410可以由一个或者多个通用处理器构成,例如CPU,或者CPU和硬件芯片的组合。上述硬件芯片可以是ASIC,可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),FPGA,通用阵列逻辑(generic array logic,GAL)或其任意组合。
收发器420,用于和其他设备进行通信。
存储器430可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM);存储器也可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM)、快闪存储器(flash memory)、硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器430还可以包括上述种类的存储器的组合。
存储器430可用于存储程序代码和数据,以便于处理器410调用存储器430中存储的程序代码以实现本申请实施例中涉及的发送模块和/或接收模块等模块的功能。
总线440可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。总线440可以分为地址总线、数据总线、控制总线等。为便于表示,图20中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
应理解,图20所示的数据传输装置400可以是芯片或电路,例如可设置在终端设备或者通信装置内的芯片或电路。上述收发器420也可以是通信接口。作为一种实现方式,收发器420的功能可以考虑通过收发电路或者收发专用芯片实现。
具体地,上述数据传输装置400执行各种操作的具体实现可参照上述方法实施例中由主节点或者从节点执行的具体操作,在此不再赘述。
应当理解,数据传输装置400仅为本申请实施例提供的一个例子,并且,数据传输装置400可具有比图20示出的部件更多或更少的部件,可以组合两个或更多个部件,或者可具有部件的不同配置实现。
本申请实施例还提供一种电子设备,图21为本申请实施例提供的一种电子设备500的结构示意图。如图21所示,电子设备500包括:处理器510、通信接口520以及存储器530。其中,处理器510、通信接口520以及存储器530可以通过内部总线540相互连接,也可通过无线传输等其他手段实现通信。
本申请实施例以通过总线540连接为例,总线540可以是PCI总线或EISA总线等。总线540可以分为地址总线、数据总线、控制总线等。为便于表示,图21中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
所述处理器510可以由至少一个通用处理器构成,例如CPU,或者CPU和硬件芯片的组合。上述硬件芯片可以是ASIC、PLD或其组合。上述PLD可以是CPLD、FPGA、GAL或其任意组合。处理器510执行各种类型的数字存储指令,例如存储在存储器530中的软件或者固件程序,它能使电子设备500提供较宽的多种服务。
所述存储器530用于存储程序代码,并由处理器510来控制执行,以执行上述图11至图16任一实施例中由主节点、第一从节点、第二从节点执行的处理步骤,具体可以参考上述图11至图16任一图所示实施例的相关描述,此处不再展开赘述。
所述存储器530可以包括易失性存储器,例如RAM;存储器530也可以包括非易失性存储器,例如ROM、快闪存储器(Flash Memory)、HDD或SSD;存储器530还可以包括上述种类的组合。
通信接口520可以为有线接口(例如以太网接口),可以为内部接口(例如高速串行计算机扩展总线(Peripheral Component Interconnect express,PCIE)总线接口)、有线接口(例如以太网接口)或无线接口(例如蜂窝网络接口或使用无线局域网接口),用于与与其他设备或模块进行通信。
需要说明的,图21仅仅是本申请实施例的一种可能的实现方式,实际应用中,所述电子设备还可以包括更多或更少的部件,这里不作限制。关于本申请实施例中未示出或未描述的内容,可参见前述图11至图16所述实施例中的相关阐述,这里不再赘述。
本申请实施例还提供一种车辆,所述车辆中可以包括有上述图17所示的数据传输装置100,和/或图18所示的数据传输装置200,和/或图19所示的数据传输装置300。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在处理器上运行时,图11至图16任一图所示的方法流程得以实现。
本申请实施例还提供一种计算机程序产品,当所述计算机程序产品在处理器上运行时,图11至图16任一图所示的方法流程得以实现。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。以上,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (69)

  1. 一种数据传输方法,其特征在于,所述方法应用于主节点,包括:
    所述主节点发送第一同步时刻;
    所述第一同步时刻用于实现第一从节点计时器与主节点计时器的同步;
    所述主节点发送第一预设指令;
    其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻用于指示所述第一从节点执行所述第一预设指令的时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述主节点与所述第一从节点之间的链路。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述主节点发送第二同步时刻;
    所述第二同步时刻用于实现第二从节点计时器与主节点计时器的同步;
    所述主节点发送第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第二链路为所述主节点与所述第二从节点之间的链路。
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第一从节点向第二从节点发送第三同步时刻;
    所述第三同步时刻用于实现第二从节点计时器与所述第一从节点计时器的同步;
    所述主节点发送第二预设指令;
    所述第一从节点向所述第二从节点转发所述第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述主节点向所述第一从节点发送所述第二预设指令的时刻、所述第一链路的最大时延以及第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路。
  4. 根据权利要求2或3所述的方法,其特征在于,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
  5. 一种数据传输方法,其特征在于,所述方法应用于从节点,包括:
    第一从节点接收第一同步时刻;
    所述第一同步时刻用于实现第一从节点计时器与主节点计时器的同步;
    所述第一从节点接收第一预设指令;
    其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述第一从节点与所述主节点之间的链路;
    所述第一从节点在所述第一指令生效时刻时执行所述第一预设指令。
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    第二从节点接收第二同步时刻;
    所述第二同步时刻用于实现第二从节点计时器与主节点计时器的同步;
    所述第二从节点接收第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第二链路为所述主节点与所述第二从节点之间的链路;
    所述第二从节点在所述第二指令生效时刻时执行所述第二预设指令。
  7. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    所述第一从节点向第二从节点发送第三同步时刻;
    所述第三同步时刻用于实现第二从节点计时器与所述第一从节点计时器的同步;
    所述第一从节点向所述第二从节点发送第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第一从节点向所述第二从节点发送所述第二预设指令的时刻与第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路。
  8. 根据权利要求7所述的方法,其特征在于,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
  9. 根据权利要求6至8任一项所述的方法,其特征在于,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
  10. 一种数据传输方法,其特征在于,所述方法应用于数据传输系统,所述数据传输系统包括主节点和第一从节点,所述方法包括:
    所述主节点向所述第一从节点发送第一同步时刻;
    所述第一同步时刻用于实现第一从节点计时器与主节点计时器的同步;
    所述主节点向所述第一从节点发送第一预设指令;
    其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述主节点与所述第一从节点之间的链路;
    所述第一从节点在所述第一指令生效时刻执行所述第一预设指令。
  11. 根据权利要求10所述的方法,其特征在于,所述数据传输系统还包括第二从节点,所述方法还包括:
    所述主节点向所述第二从节点发送第二同步时刻;
    所述第二同步时刻用于实现第二从节点计时器与主节点计时器的同步;
    所述主节点向所述第二从节点发送第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第 一指令生效时刻相同,所述第二链路为所述主节点与所述第二从节点之间的链路;
    所述第二从节点在所述第二指令生效时刻时执行所述第二预设指令。
  12. 根据权利要求10所述的方法,其特征在于,所述数据传输系统还包括第二从节点,所述方法还包括:
    所述第一从节点向所述第二从节点发送第三同步时刻;
    所述第三同步时刻用于实现第二从节点计时器与所述第一从节点计时器的同步;
    所述第一从节点向所述第二从节点发送第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于所述第一从节点向所述第二从节点发送所述第二预设指令的时刻与第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路;
    所述第二从节点在所述第二指令生效时刻时执行所述第二预设指令。
  13. 根据权利要求12所述的方法,其特征在于,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
  14. 根据权利要求11至13任一项所述的方法,其特征在于,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
  15. 一种数据传输方法,其特征在于,所述方法应用于主节点,包括:
    所述主节点接收第四同步时刻;
    所述第四同步时刻用于实现主节点计时器与第一从节点计时器的同步;
    所述主节点发送第一预设指令;
    其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻用于指示所述第一从节点执行所述第一预设指令的时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述主节点与所述第一从节点之间的链路。
  16. 根据权利要求15所述的方法,其特征在于,所述方法还包括:
    所述第一从节点向所述第二从节点发送第三同步时刻;
    所述第三同步时刻用于实现第二从节点计时器与所述第一从节点计时器的同步;
    所述主节点发送第二预设指令;
    所述第一从节点向所述第二从节点转发所述第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述主节点向所述第一从节点发送所述第二预设指令的时刻、所述第一链路的最大时延以及第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路。
  17. 根据权利要求16所述的方法,其特征在于,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于 指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
  18. 一种数据传输方法,其特征在于,所述方法应用于从节点,包括:
    第一从节点发送第四同步时刻;
    所述第四同步时刻用于实现主节点计时器与第一从节点计时器的同步;
    所述第一从节点接收第一预设指令;
    其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述第一从节点与所述主节点之间的链路;
    所述第一从节点在所述第一指令生效时刻时执行所述第一预设指令。
  19. 根据权利要求18所述的方法,其特征在于,所述方法还包括:
    所述第一从节点向第二从节点发送第三同步时刻;
    所述第三同步时刻用于实现第二从节点计时器与所述第一从节点计时器的同步;
    所述第一从节点向所述第二从节点发送第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第一从节点向所述第二从节点发送所述第二预设指令的时刻与第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路。
  20. 根据权利要求19所述的方法,其特征在于,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
  21. 根据权利要求19或20所述的方法,其特征在于,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
  22. 一种数据传输方法,其特征在于,所述方法应用于数据传输系统,所述数据传输系统包括主节点和第一从节点,所述方法包括:
    所述第一从节点向所述主节点发送第四同步时刻;
    所述第四同步时刻用于实现主节点计时器与第一从节点计时器的同步;
    所述主节点向所述第一从节点发送第一预设指令;
    其中,所述第一预设指令包括第一指令生效时刻所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述主节点与所述第一从节点之间的链路;
    所述第一从节点在所述第一指令生效时刻执行所述第一预设指令。
  23. 根据权利要求22所述的方法,其特征在于,所述数据传输系统还包括第二从节点,所述方法还包括:
    所述第一从节点向所述第二从节点发送第三同步时刻;
    所述第三同步时刻用于实现所述二从节点计时器与所述第一从节点计时器的同步;
    所述第一从节点向所述第二从节点发送第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于 所述第一从节点向所述第二从节点发送所述第二预设指令的时刻与第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路;
    所述第二从节点在所述第二指令生效时刻时执行所述第二预设指令。
  24. 根据权利要求23所述的方法,其特征在于,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
  25. 根据权利要求23或24所述的方法,其特征在于,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
  26. 一种数据传输方法,其特征在于,所述方法应用于主节点,包括:
    所述主节点获取第一计时差值,并发送所述第一计时差值;
    所述第一计时差值用于实现第一从节点计时器与主节点计时器的同步,所述第一计时差值为第一链路训练完成时所述主节点计时器与所述第一从节点计时器的计时差值,所述第一链路为所述主节点与所述第一从节点之间的链路;
    所述主节点发送第一预设指令;
    其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻用于指示所述第一从节点执行所述第一预设指令的时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和。
  27. 根据权利要求26所述的方法,其特征在于,所述方法还包括:
    所述主节点获取第二计时差值,并发送所述第二计时差值;
    所述第二计时差值用于实现第二从节点计时器与主节点计时器的同步,所述第二计时差值为第二链路训练完成时所述主节点计时器与所述第二从节点计时器的计时差值,所述第二链路为所述主节点与所述第二从节点之间的链路;
    所述主节点发送第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同。
  28. 根据权利要求26所述的方法,其特征在于,所述方法还包括:
    所述第一从节点获取第三计时差值,并向第二从节点发送第三计时差值;
    所述第三计时差值用于实现第二从节点计时器与所述第一从节点计时器的同步,所述第三计时差值为第三链路训练完成时所述第一从节点计时器与所述第二从节点计时器的计时差值,所述第三链路为所述第一从节点与所述第二从节点之间的链路;
    所述主节点发送第二预设指令;
    所述第一从节点向所述第二从节点转发所述第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述主节点向所述第一从节点发送所述第二预设指令的时刻、第一链路的最大时延以及第三链路的最大 时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同。
  29. 根据权利要求27或28所述的方法,其特征在于,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
  30. 一种数据传输方法,其特征在于,所述方法应用于从节点,包括:
    第一从节点接收第一计时差值;
    所述第一计时差值用于实现第一从节点计时器与主节点计时器的同步,所述第一计时差值为第一链路训练完成时所述主节点计时器与所述第一从节点计时器的计时差值,所述第一链路为所述第一从节点与所述主节点之间的链路;
    所述第一从节点接收第一预设指令;
    其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和;
    所述第一从节点在所述第一指令生效时刻时执行所述第一预设指令。
  31. 根据权利要求30所述的方法,其特征在于,所述方法还包括:
    第二从节点接收第二计时差值;
    所述第二计时差值用于实现第二从节点计时器与主节点计时器的同步,所述第二计时差值为第二链路训练完成时所述主节点计时器与所述第二从节点计时器的计时差值,所述第二链路为所述主节点与所述第二从节点之间的链路;
    所述第二从节点接收第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同;
    所述第二从节点在第二指令生效时刻时执行所述第二预设指令。
  32. 根据权利要求30所述的方法,其特征在于,所述方法还包括:
    所述第一从节点获取第三计时差值,并向第二从节点发送所述第三计时差值;
    所述第三计时差值用于实现第二从节点计时器与所述第一从节点计时器的同步,所述第三计时差值为第三链路训练完成时所述第一从节点计时器与所述第二从节点计时器的计时差值,所述第三链路为所述第一从节点与所述第二从节点之间的链路;
    所述第一从节点向所述第二从节点发送第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第一从节点向所述第二从节点发送所述第二预设指令的时刻与第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同。
  33. 根据权利要求32所述的方法,其特征在于,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
  34. 根据权利要求31至33任一项所述的方法,其特征在于,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显 示。
  35. 一种数据传输方法,其特征在于,所述方法应用于数据传输系统,所述数据传输系统包括主节点和第一从节点,所述方法包括:
    所述主节点获取第一计时差值,并向所述第一从节点发送所述第一计时差值;
    所述第一计时差值用于实现第一从节点计时器与主节点计时器的同步,所述第一计时差值为第一链路训练完成时所述主节点计时器与所述第一从节点计时器的计时差值,所述第一链路为所述主节点与所述第一从节点之间的链路;
    所述主节点向所述第一从节点发送第一预设指令;
    其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和;
    所述第一从节点在所述第一指令生效时刻执行所述第一预设指令。
  36. 根据权利要求35所述的方法,其特征在于,所述数据传输系统还包括第二从节点,所述方法还包括:
    所述主节点获取第二计时差值,并向所述第二从节点发送所述第二计时差值;
    所述第二计时差值用于实现第二从节点计时器与主节点计时器的同步,所述第二计时差值为第二链路训练完成时所述主节点计时器与所述第二从节点计时器的计时差值,所述第二链路为所述主节点与所述第二从节点之间的链路;
    所述主节点向所述第二从节点发送第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于所述主节点向所述第二从节点发送第二预设指令的时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同;
    所述第二从节点在所述第二指令生效时刻时执行所述第二预设指令。
  37. 根据权利要求35所述的方法,其特征在于,所述数据传输系统还包括第二从节点,所述方法还包括:
    所述第一从节点获取第三计时差值,并向所述第二从节点发送第三计时差值;
    所述第三计时差值用于实现第二从节点计时器与所述第一从节点计时器的同步,所述第三计时差值为第三链路训练完成时所述第一从节点计时器与所述第二从节点计时器的计时差值,所述第三链路为所述第一从节点与所述第二从节点之间的链路;
    所述第一从节点向所述第二从节点发送第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于所述主节点向所述第一从节点发送所述第二预设指令的时刻、所述第一链路的最大时延以及第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同;
    所述第二从节点在所述第二指令生效时刻时执行所述第二预设指令。
  38. 根据权利要求37所述的方法,其特征在于,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
  39. 根据权利要求36至38任一项所述的方法,其特征在于,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显 示。
  40. 一种数据传输装置,其特征在于,所述装置应用于主节点,包括:
    发送模块,用于发送第一同步时刻;
    所述第一同步时刻用于实现第一从节点计时器与主节点计时器的同步;
    所述发送模块,还用于发送第一预设指令;
    其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻用于指示所述第一从节点执行所述第一预设指令的时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述主节点与所述第一从节点之间的链路。
  41. 根据权利要求40所述的装置,其特征在于,所述发送模块还用于:
    发送第二同步时刻;
    所述第二同步时刻用于实现第二从节点计时器与主节点计时器的同步;
    发送第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述发送第二预设指令的时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第二链路为所述主节点与所述第二从节点之间的链路。
  42. 根据权利要求41所述的装置,其特征在于,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
  43. 一种数据传输装置,其特征在于,所述装置包括第一子装置,所述第一子装置应用于第一从节点,所述第一子装置包括:
    第一接收模块,用于接收第一同步时刻;
    所述第一同步时刻用于实现第一从节点计时器与主节点计时器的同步;
    所述第一接收模块,还用于接收第一预设指令;
    其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述第一从节点与所述主节点之间的链路;
    第一执行模块,用于在所述第一指令生效时刻时执行所述第一预设指令。
  44. 根据权利要求43所述的数据传输装置,其特征在于,所述装置还包括第二子装置,所述第二子装置应用于第二从节点,所述第二子装置包括:
    第二接收模块,用于接收第二同步时刻;
    所述第二同步时刻用于实现第二从节点计时器与主节点计时器的同步;
    所述第二接收模块,还用于接收第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第二链路为所述主节点与所述第二从节点之间的链路;
    第二执行模块,用于在所述第二指令生效时刻时执行所述第二预设指令。
  45. 根据权利要求43或44所述的数据传输装置,其特征在于,所述第一子装置还包括:
    发送模块,用于向第二从节点发送第三同步时刻;
    所述第三同步时刻用于实现第二从节点计时器与所述第一从节点计时器的同步;
    所述发送模块,还用于向所述第二从节点发送第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第一从节点向所述第二从节点发送所述第二预设指令的时刻与第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路。
  46. 根据权利要求45所述的数据传输装置,其特征在于,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
  47. 根据权利要求44至46任一项所述的数据传输装置,其特征在于,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
  48. 一种数据传输系统,其特征在于,所述系统包括如权利要求40至42任一项所述的数据传输装置和如权利要求43至47任一项所述的数据传输装置。
  49. 一种数据传输装置,其特征在于,所述装置应用于主节点,包括:
    接收模块,用于接收第四同步时刻;
    所述第四同步时刻用于实现主节点计时器与第一从节点计时器的同步;
    发送模块,用于发送第一预设指令;
    其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻用于指示所述第一从节点执行所述第一预设指令的时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述主节点与所述第一从节点之间的链路。
  50. 根据权利要求49所述的装置,其特征在于,所述第一预设指令用于指示第一摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示。
  51. 一种数据传输装置,其特征在于,所述装置应用于第一从节点,包括:
    发送模块,用于发送第四同步时刻;
    所述第四同步时刻用于实现主节点计时器与第一从节点计时器的同步;
    接收模块,用于接收第一预设指令;
    其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和,所述第一链路为所述第一从节点与所述主节点之间的链路;
    执行模块,用于在所述第一指令生效时刻时执行所述第一预设指令。
  52. 根据权利要求51所述的装置,其特征在于,所述发送模块还用于:
    向第二从节点发送第三同步时刻;
    所述第三同步时刻用于实现第二从节点计时器与所述第一从节点计时器的同步;
    向所述第二从节点发送第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第一从节点向所述第二从节点发送所述第二预设指令的时刻与第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第三链路为所述第一从节点与所述第二从节点之间的链路。
  53. 根据权利要求52所述的装置,其特征在于,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
  54. 根据权利要求52或53所述的装置,其特征在于,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
  55. 一种数据传输系统,其特征在于,所述系统包括如权利要求49或50所述的数据传输装置和如权利要求51至54任一项所述的数据传输装置。
  56. 一种数据传输装置,其特征在于,所述装置应用于主节点,包括:
    发送模块,用于获取第一计时差值,并发送所述第一计时差值;
    所述第一计时差值用于实现第一从节点计时器与主节点计时器的同步,所述第一计时差值为第一链路训练完成时所述主节点计时器与所述第一从节点计时器的计时差值,所述第一链路为所述主节点与所述第一从节点之间的链路;
    所述发送模块,还用于发送第一预设指令;
    其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻用于指示所述第一从节点执行所述第一预设指令的时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和。
  57. 根据权利要求56所述的装置,其特征在于,所述发送模块还用于:
    获取第二计时差值,并发送所述第二计时差值;
    所述第二计时差值用于实现第二从节点计时器与主节点计时器的同步,所述第二计时差值为第二链路训练完成时所述主节点计时器与所述第二从节点计时器的计时差值,所述第二链路为所述主节点与所述第二从节点之间的链路;
    发送第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同。
  58. 根据权利要求57所述的装置,其特征在于,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
  59. 一种数据传输装置,其特征在于,所述系统包括第一子装置,所述第一子装置应用于第一从节点,所述第一子装置包括:
    第一接收模块,用于接收第一计时差值;
    所述第一计时差值用于实现第一从节点计时器与主节点计时器的同步,所述第一计时差值为第一链路训练完成时所述主节点计时器与所述第一从节点计时器的计时差值,所述第一链路为所述第一从节点与所述主节点之间的链路;
    所述第一接收模块,还用于接收第一预设指令;
    其中,所述第一预设指令包括第一指令生效时刻,所述第一指令生效时刻大于或者等于所述第一预设指令的发送时刻与第一链路的最大时延之和;
    第一执行模块,用于在所述第一指令生效时刻时执行所述第一预设指令。
  60. 根据权利要求59所述的数据传输装置,其特征在于,所述系统还包括第二子装置,所述第二子装置应用于第二从节点,所述第二子装置包括:
    第二接收模块,用于接收第二计时差值;
    所述第二计时差值用于实现第二从节点计时器与所述主节点计时器的同步,所述第二计时差值为第二链路训练完成时所述主节点计时器与所述第二从节点计时器的计时差值;
    所述第二接收模块,还用于接收第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻大于或者等于所述第二预设指令的发送时刻与第二链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同,所述第二链路为所述主节点与所述第二从节点之间的链路;
    第二执行模块,用于在第二指令生效时刻时执行所述第二预设指令。
  61. 根据权利要求59所述的数据传输装置,其特征在于,所述第一子装置还包括:
    发送模块,用于获取第三计时差值,并向第二从节点发送所述第三计时差值;
    所述第三计时差值用于实现第二从节点计时器与所述第一从节点计时器的同步,所述第三计时差值为第三链路训练完成时所述第一从节点计时器与所述第二从节点计时器的计时差值,所述第三链路为所述第一从节点与所述第二从节点之间的链路;
    所述发送模块,还用于向所述第二从节点发送第二预设指令;
    其中,所述第二预设指令包括第二指令生效时刻,所述第二指令生效时刻用于指示所述第二从节点执行所述第二预设指令的时刻,所述第二指令生效时刻大于或者等于所述第一从节点向所述第二从节点发送所述第二预设指令的时刻与第三链路的最大时延之和,所述第二指令生效时刻和所述第一指令生效时刻相同。
  62. 根据权利要求61所述的数据传输装置,其特征在于,所述第二预设指令由所述主节点生成或由所述第一从节点生成。
  63. 根据权利要求60至62任一项所述的数据传输装置,其特征在于,所述第一预设指令用于指示第一摄像头进行拍照,所述第二预设指令用于指示第二摄像头进行拍照;或者,所述第一预设指令用于指示第一显示设备进行显示,所述第二预设指令用于指示第二显示设备进行显示。
  64. 一种数据传输系统,其特征在于,所述系统包括如权利要求56至58任一项所述的数据传输装置和如权利要求59至63任一项所述的数据传输装置。
  65. 一种数据传输装置,其特征在于,所述装置包括处理器和存储器;所述存储器用于存储指令,所述处理器用于执行所述指令,当所述处理器执行所述指令时,所述数据传输装置执行如权利要求1至4任一项所述的方法,或执行如权利要求15至17任一项所述的方法, 或执行如权利要求26至29任一项所述的方法。
  66. 一种数据传输装置,其特征在于,所述装置包括处理器和存储器;所述存储器用于存储指令,所述处理器用于执行所述指令,当所述处理器执行所述指令时,所述数据传输装置执行如权利要求5至9任一项所述的方法,或执行如权利要求18至21任一项所述的方法,或执行权利要求30至34任一项所述的方法。
  67. 一种计算机可读存储介质,其特征在于,所述计算机可读介质存储有计算机可读指令,当所述计算机可读指令被运行时,执行如权利要求1至39任一项所述的方法。
  68. 一种电子设备,其特征在于,包括一个或多个处理器,所述一个或多个处理器与存储器耦合,所述存储器上存储有计算机程序,所述处理器用于执行所述存储器上存储的所述计算机程序,以实现如权利要求1至39任一项所述的方法。
  69. 一种计算机程序产品,其特征在于,包括计算机程序,当所述计算机程序被计算设备读取并执行时,使得所述计算设备执行如权利要求1至39任一项所述的方法。
PCT/CN2020/140399 2020-12-28 2020-12-28 数据传输方法、装置及相关设备 WO2022140995A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/CN2020/140399 WO2022140995A1 (zh) 2020-12-28 2020-12-28 数据传输方法、装置及相关设备
EP20967345.8A EP4258575A4 (en) 2020-12-28 2020-12-28 DATA TRANSMISSION METHOD AND APPARATUS AND ASSOCIATED DEVICE
CN202080004787.2A CN112740579B (zh) 2020-12-28 2020-12-28 数据传输方法、装置及相关设备
CN202210651666.8A CN115396056A (zh) 2020-12-28 2020-12-28 数据传输方法、装置及相关设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/140399 WO2022140995A1 (zh) 2020-12-28 2020-12-28 数据传输方法、装置及相关设备

Publications (1)

Publication Number Publication Date
WO2022140995A1 true WO2022140995A1 (zh) 2022-07-07

Family

ID=75609538

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/140399 WO2022140995A1 (zh) 2020-12-28 2020-12-28 数据传输方法、装置及相关设备

Country Status (3)

Country Link
EP (1) EP4258575A4 (zh)
CN (2) CN115396056A (zh)
WO (1) WO2022140995A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116880339B (zh) * 2023-09-07 2023-11-28 北京控达科技有限公司 基于双mcu的数据周期同步方法及系统

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104467928A (zh) * 2013-09-18 2015-03-25 华为技术有限公司 一种终端设备之间协作的方法和设备
CN105680972A (zh) * 2016-01-20 2016-06-15 山东大学 机器人集群协同任务网络同步控制方法
CN106791203A (zh) * 2017-02-27 2017-05-31 维沃移动通信有限公司 一种拍照闪光的控制方法及移动终端
US20170366430A1 (en) * 2016-06-20 2017-12-21 Hyundai Motor Company Operation method of communication node for detecting link errors in network
CN108183965A (zh) * 2018-01-15 2018-06-19 郑州云海信息技术有限公司 一种数据同步方法、装置、设备、系统及可读存储介质
CN109413812A (zh) * 2018-08-31 2019-03-01 杭州古北电子科技有限公司 一种多设备同步执行指令的方法
US20200052877A1 (en) * 2015-06-11 2020-02-13 Avago Technologies International Sales Pte. Limited Synchronization and training stage operation
CN111193570A (zh) * 2019-12-30 2020-05-22 北京凯视达科技有限公司 指令执行的方法、装置、系统、介质和电子设备

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012092892A2 (zh) * 2012-02-01 2012-07-12 华为技术有限公司 时间同步方法和设备及系统
JP6846111B2 (ja) * 2016-02-26 2021-03-24 オムロン株式会社 マスタ装置、スレーブ装置、情報処理装置、イベントログ収集システム、マスタ装置の制御方法、スレーブ装置の制御方法、および制御プログラム
CN106131407A (zh) * 2016-07-11 2016-11-16 深圳看到科技有限公司 拍摄同步方法及同步装置
CN106455038A (zh) * 2016-10-10 2017-02-22 海能达通信股份有限公司 主节点、从节点以及同步信息自校正方法
CN107104749A (zh) * 2017-04-05 2017-08-29 北京航天自动控制研究所 时钟同步方法及装置
WO2019096118A1 (en) * 2017-11-14 2019-05-23 Telefonaktiebolaget Lm Ericsson (Publ) Feedback transmissions for mixed services
WO2019127447A1 (zh) * 2017-12-29 2019-07-04 华为技术有限公司 用于时间同步的方法、装置和系统
CN108429597A (zh) * 2018-02-07 2018-08-21 网宿科技股份有限公司 电子设备、时间同步方法及模块

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104467928A (zh) * 2013-09-18 2015-03-25 华为技术有限公司 一种终端设备之间协作的方法和设备
US20200052877A1 (en) * 2015-06-11 2020-02-13 Avago Technologies International Sales Pte. Limited Synchronization and training stage operation
CN105680972A (zh) * 2016-01-20 2016-06-15 山东大学 机器人集群协同任务网络同步控制方法
US20170366430A1 (en) * 2016-06-20 2017-12-21 Hyundai Motor Company Operation method of communication node for detecting link errors in network
CN106791203A (zh) * 2017-02-27 2017-05-31 维沃移动通信有限公司 一种拍照闪光的控制方法及移动终端
CN108183965A (zh) * 2018-01-15 2018-06-19 郑州云海信息技术有限公司 一种数据同步方法、装置、设备、系统及可读存储介质
CN109413812A (zh) * 2018-08-31 2019-03-01 杭州古北电子科技有限公司 一种多设备同步执行指令的方法
CN111193570A (zh) * 2019-12-30 2020-05-22 北京凯视达科技有限公司 指令执行的方法、装置、系统、介质和电子设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4258575A4 *

Also Published As

Publication number Publication date
CN112740579A (zh) 2021-04-30
EP4258575A4 (en) 2024-01-24
EP4258575A1 (en) 2023-10-11
CN115396056A (zh) 2022-11-25
CN112740579B (zh) 2022-06-14

Similar Documents

Publication Publication Date Title
EP3706010B1 (en) Enabling sync header suppression latency optimization in the presence of retimers for serial interconnect
US9282232B2 (en) Collaborative image control
US11743109B2 (en) Link layer communication by multiple link layer encodings for computer buses
CN114185829B (zh) 用于多种通信业务的共享的资源
US11979481B2 (en) Time synchronisation
US20190043446A1 (en) Synchronization of a display device in a system including multiple display devices
WO2018076354A1 (zh) 图像数据的帧同步方法、图像信号处理装置及终端
WO2022140995A1 (zh) 数据传输方法、装置及相关设备
CN113992469B (zh) 数据融合方法、装置、电子设备和计算机可读介质
JP2016005214A (ja) ネットワークシステム、車載システム、時刻同期方法、ノードおよびプログラム
JP2007251826A (ja) 車載データベースシステム
WO2022147798A1 (zh) 一种发送装置、数据传输系统和数据传输方法
KR20190079511A (ko) 차량 탑재 시스템 및 그 제어 방법
JPH01500396A (ja) データ送信装置を信号回線に接続する方法と装置
US11789891B2 (en) Multi-device read protocol using a single device group read command
JP2019140643A (ja) 伝送装置
WO2023083271A1 (zh) 数据同步装置及其方法、计算机可读存储介质
WO2021049354A1 (ja) 通信装置および通信方法、並びにプログラム
US20230297525A1 (en) High speed interface for multi image sensor device
CN117373229A (zh) 辅助驾驶和流媒体集成装置以及车辆
CN117156071A (zh) 辅助驾驶影像同步系统和方法
JPH0221743A (ja) 単線シリアル通信方法及びシリアルデータ通信装置
JP2004266564A (ja) 通信システム
JP2000349775A (ja) 車両情報伝送装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20967345

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020967345

Country of ref document: EP

Effective date: 20230705

NENP Non-entry into the national phase

Ref country code: DE