CN-122027637-A - Data transmission synchronization method, system, electronic equipment and storage medium
Abstract
The invention relates to the technical field of data transmission and provides a data transmission synchronization method, a system, electronic equipment and a storage medium, wherein the method comprises the steps of obtaining a write request to be sent to destination equipment, distributing a slot position identifier to the write request, updating a sending transaction count value corresponding to the slot position identifier, sending the write request carrying an active equipment identifier and the slot position identifier to the destination equipment, responding to a synchronization instruction aiming at the slot position identifier, generating a synchronization message and sending the synchronization message to the destination equipment, receiving a confirmation message from the destination equipment, determining that the execution of the synchronization instruction is completed based on the confirmation message, and sending the confirmation message under the condition that the consistency check of the destination equipment is passed. The invention realizes the data strong sequence assurance independent of the physical transmission path by introducing the slot position identification and the hardware verification mechanism of transaction counting at the source end and the destination end, thereby solving the data consistency problem under multiple paths and realizing the decoupling of software and hardware.
Inventors
- Request for anonymity
- Request for anonymity
Assignees
- 上海壁仞科技股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260115
Claims (13)
- 1. The data transmission synchronization method is characterized by being applied to source equipment and comprising the following steps of: Acquiring a write request to be sent to destination equipment, distributing a slot position identifier to the write request, and updating a sending transaction count value corresponding to the slot position identifier; Transmitting the write request carrying the active equipment identifier and the slot position identifier to the destination equipment so that the destination equipment updates a received transaction count value based on the source equipment identifier and the slot position identifier; Generating a synchronization message in response to a synchronization instruction aiming at the slot position identifier, and sending the synchronization message to the destination terminal equipment, wherein the synchronization message carries the source equipment identifier, the slot position identifier and a sending transaction count value currently corresponding to the slot position identifier and is used for indicating the destination terminal equipment to carry out consistency verification based on the sending transaction count value and the receiving transaction count value; And receiving an acknowledgement message from the destination terminal equipment, and determining that the synchronous instruction execution is completed based on the acknowledgement message, wherein the acknowledgement message is sent by the destination terminal equipment under the condition that the consistency check is passed.
- 2. The method of claim 1, wherein the allocating slot identifiers to the write requests comprises: Acquiring a currently available slot resource from a circular buffer queue as the slot identifier; the determining, based on the acknowledgement message, that the synchronous instruction execution is completed further comprises: and releasing the corresponding slot resources according to the slot identifiers carried in the confirmation message.
- 3. The data transmission synchronization method according to claim 1, wherein the generating a synchronization message in response to a synchronization instruction for the slot identification and transmitting the synchronization message to the destination device includes: detecting the number of currently available slot resources in response to a synchronization instruction for the slot identification; If the number of the currently available slot resources is larger than a preset threshold, generating a synchronous message, sending the synchronous message to the destination terminal equipment, and recording a return identifier corresponding to the current synchronous instruction; and if the number of the currently available slot resources is smaller than or equal to the preset threshold value, suspending sending the synchronous message, and executing merging processing operation.
- 4. The data transmission synchronization method of claim 3, wherein the step of performing a combining process operation comprises: Recording a return identifier corresponding to the current synchronous instruction, and marking the current slot position identifier as a merging state; Multiplexing the slot position identification in the merging state for the new write request when the new write request to be sent is acquired, and carrying out accumulated update on the sending transaction count value corresponding to the slot position identification in the merging state; and responding to the received new synchronous instruction, recording a return identifier corresponding to the new synchronous instruction, and keeping a state of suspending sending the synchronous message.
- 5. The data transmission synchronization method according to claim 4, further comprising, after the step of performing the combining processing operation: Generating a merging synchronous message when the quantity of the currently available slot resources is detected to be recovered to be larger than the preset threshold value, wherein the merging synchronous message carries a slot identifier in the merging state and the updated sending transaction count value; And sending the combined synchronization message to the destination terminal equipment.
- 6. The data transmission synchronization method according to claim 5, wherein the receiving an acknowledgement message from the destination device and determining that the synchronization instruction execution is completed based on the acknowledgement message comprises: receiving an acknowledgement message from the destination device for the combined synchronization message; Searching a plurality of return identifiers associated with the slot identifiers according to the slot identifiers carried in the confirmation message; and determining that the execution of the corresponding synchronous instructions is completed based on the searched return identifications, and releasing the resources corresponding to the slot identifications.
- 7. The method for synchronizing data transmission according to any one of claims 1 to 6, wherein the sending the synchronization message to the destination device comprises: When a plurality of destination terminal devices exist, the synchronous message is sent to the plurality of destination terminal devices in a multicast mode, and the return identification corresponding to the synchronous instruction and the number of target devices are recorded; the receiving the confirmation message from the destination device and determining that the execution of the synchronous instruction is completed based on the confirmation message comprises: Subtracting one from the number of the target devices when receiving a confirmation message returned by the destination device; And under the condition that the number of the target devices is reduced to zero, determining that all the target end devices have completed consistency verification.
- 8. A data transmission synchronization method, applied to a destination device, comprising: Receiving a write request sent by source equipment, and updating a received transaction count value according to a source equipment identifier and a slot position identifier carried in the write request; Receiving a synchronization message sent by the source terminal equipment, wherein the synchronization message carries the source equipment identification, the slot position identification and a sending transaction count value corresponding to the slot position identification currently, and the synchronization message is generated by the source terminal equipment in response to a synchronization instruction aiming at the slot position identification; And responding to the synchronous message, determining a current received transaction count value based on the source equipment identifier and the slot position identifier, performing consistency check according to the transmitted transaction count value and the current received transaction count value, and sending a confirmation message to the source equipment under the condition that the check is passed, so that the source equipment determines that the synchronous instruction execution is completed based on the confirmation message.
- 9. The method for synchronizing data transmission according to claim 8, wherein updating the received transaction count value according to the source device identifier and the slot identifier carried in the write request comprises: according to the source equipment identifier and the slot position identifier carried in the write request, searching whether a standard entry matched with the source equipment identifier and the slot position identifier exists in a standard count table; If a matched standard entry exists, updating the received transaction count value in the matched standard entry; if no matched standard entry exists, detecting whether a preset merging entry is in an enabling state in the standard count table, and judging whether the merging entry hits in the merging count table according to the source equipment identifier and the slot position identifier under the condition that the merging entry is in the enabling state; if hit, the received transaction count value is updated in the merge entry; if not, a new standard entry is allocated in the standard count table, and the received transaction count value is updated in the new standard entry.
- 10. The method for synchronizing data transmission according to claim 8, wherein the determining, in response to the synchronization message, a current received transaction count value based on the source device identifier and the slot identifier, performing a consistency check according to the transmitted transaction count value and the current received transaction count value, and if the check passes, sending a confirmation message to the source device, includes: in response to the synchronization message, marking the arrival state of the synchronization message as arrived, and determining a current received transaction count value based on the source device identification and the slot identification; Determining a transaction count value to be completed based on the sending transaction count value and the current receiving transaction count value; If the count value of the transaction to be completed is zero, determining that the consistency check passes, and sending the confirmation message to the source terminal equipment; And if the to-be-completed transaction count value is not zero, waiting for a new write request to arrive, and when the new write request is received, decrementing the to-be-completed transaction count value until the to-be-completed transaction count value is zero, and sending the confirmation message.
- 11. The data transmission synchronization system is characterized by comprising source end equipment and destination end equipment, wherein the source end equipment and the destination end equipment are connected through an internet, and the source end equipment and the destination end equipment are located in the same chip package or in different chip packages; the source device is configured to implement the data transmission synchronization method according to any one of claims 1 to 7; The destination device is configured to implement the data transmission synchronization method according to any one of claims 8 to 10.
- 12. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, characterized in that the processor implements the data transmission synchronization method according to any one of claims 1 to 10 when executing the computer program.
- 13. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the data transmission synchronization method according to any of claims 1 to 10.
Description
Data transmission synchronization method, system, electronic equipment and storage medium Technical Field The present invention relates to the field of data transmission technologies, and in particular, to a data transmission synchronization method, a system, an electronic device, and a storage medium. Background With the rapid development of high-performance computing and artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) technologies, the computing power of graphics processors (Graphics Processing Unit, GPU) is continuously improved, and the requirements on data transmission bandwidth and interconnection architecture are increasingly increased. In modern GPU interconnect technology, chip architectures are evolving from single chip (SINGLE DIE) to Dual Die (Dual Die) and even more complex multi-chip package architectures in pursuit of higher performance and greater throughput. When data transmission is performed, ensuring the strong sequence (ordering) of the data, namely the consistency of the data, is the key of stable operation of the system. However, in the multipath transmission scenario, it is difficult to guarantee the arrival sequence of the data and the synchronization instruction by using the existing transmission technology, that is, ordering cannot be guaranteed, so that a data consistency risk is caused. In addition, to solve the order problem, the existing scheme often requires the software layer to perceive the underlying hardware topology to perform complex adaptation, which results in high coupling of software and hardware, and reduces the flexibility and portability of the system. Disclosure of Invention The invention provides a data transmission synchronization method, a system, electronic equipment and a storage medium, which are used for solving the defects that the data sequence cannot be ensured due to multipath transmission in the related technology, so that the data consistency problem and the high coupling of software and hardware are caused. The invention provides a data transmission synchronization method, which is applied to source equipment and comprises the following steps: Acquiring a write request to be sent to destination equipment, distributing a slot position identifier to the write request, and updating a sending transaction count value corresponding to the slot position identifier; Transmitting the write request carrying the active equipment identifier and the slot position identifier to the destination equipment so that the destination equipment updates a received transaction count value based on the source equipment identifier and the slot position identifier; Generating a synchronization message in response to a synchronization instruction aiming at the slot position identifier, and sending the synchronization message to the destination terminal equipment, wherein the synchronization message carries the source equipment identifier, the slot position identifier and a sending transaction count value currently corresponding to the slot position identifier and is used for indicating the destination terminal equipment to carry out consistency verification based on the sending transaction count value and the receiving transaction count value; And receiving an acknowledgement message from the destination terminal equipment, and determining that the synchronous instruction execution is completed based on the acknowledgement message, wherein the acknowledgement message is sent by the destination terminal equipment under the condition that the consistency check is passed. According to the data transmission synchronization method provided by the invention, the allocation of the slot identification to the write request comprises the following steps: Acquiring a currently available slot resource from a circular buffer queue as the slot identifier; the determining, based on the acknowledgement message, that the synchronous instruction execution is completed further comprises: and releasing the corresponding slot resources according to the slot identifiers carried in the confirmation message. According to the data transmission synchronization method provided by the invention, the response to the synchronization instruction aiming at the slot position identification generates a synchronization message and sends the synchronization message to the destination terminal equipment, and the method comprises the following steps: detecting the number of currently available slot resources in response to a synchronization instruction for the slot identification; If the number of the currently available slot resources is larger than a preset threshold, generating a synchronous message, sending the synchronous message to the destination terminal equipment, and recording a return identifier corresponding to the current synchronous instruction; and if the number of the currently available slot resources is smaller than or equal to the preset threshold value, suspending sending the synchronous