A data transmission method and related device

By generating synchronous information packets only in the target packets that meet preset conditions in the on-chip network, the hardware consumption problem caused by excessive synchronous information packets is solved, and efficient data transmission monitoring is achieved in scenarios with a large number of data packets.

CN119441133BActive Publication Date: 2025-07-11ZHONGHAO XINYING (HANGZHOU) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510019395.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-07-11
Estimated Expiration
2045-01-07

AI Technical Summary

Technical Problem

In the data transmission process of on-chip networks, in order to track the operating status, the number of synchronous information packets matches the number of target data packets, resulting in large hardware consumption, especially in application scenarios where the number of data packets is large.

Method used

By generating synchronization packets only in target packets that meet preset conditions, rather than in each target packet generating synchronization packets, the preset conditions can include the head and tail packets or serial numbers of the target packets that meet specific conditions, reducing the number of synchronization packets.

Benefits of technology

It significantly reduces the number of synchronous information packets and reduces hardware consumption during data transmission. Especially in scenarios where the number of target data packets is large, data transmission abnormalities can be monitored in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441133B_ABST
    Figure CN119441133B_ABST
Patent Text Reader

Abstract

The present application discloses a data transmission method and its related device, relating to the technical field of data transmission. The data transmission method is applied to a data sending device, and the data transmission method includes: receiving a read command; based on the read command, sending a current target data packet to the data receiving device; if the currently sent target data packet meets a preset condition, generating a current synchronization information packet based on the current target data packet; and sending the current synchronization information packet to the data receiving device. By generating corresponding synchronization information packets for target data packets that meet the preset conditions, the number of generated synchronization information packets is significantly less than the number of each target data packet in the present application. In an application scenario with a large number of target data packets, the number of synchronization information packets can be significantly reduced, that is, the hardware consumption during data transmission can be significantly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data transmission, and specifically provides a data transmission method and related devices thereof. Background Art

[0002] Direct Memory Access (DMA) technology is a technology for data transmission between storage devices. With the development of the chip industry, the application field of direct memory access technology has become more and more extensive, and the Network on Chip (NoC) has emerged as the times require. The Network on Chip (NoC) is a network for transporting data, and the direct memory access technology is a method for data transportation. When the Network on Chip based on direct memory access technology performs data transmission, the progress and speed of data transmission are opaque to the control module. To understand the operating state of the Network on Chip in more detail, it is necessary to monitor the progress and speed of data transmission, and thus it is necessary to track and monitor the data transmitted based on memory access technology. In the prior art, a method of sending a synchronization information packet for each transmitted target data packet is adopted, so that the control module can timely understand the operating state of the Network on Chip. It should be noted that if the target data packets and the synchronization information packets are in one-to-one correspondence, in the application scenario where the number of target data packets is large, the number of synchronization information packets is also large, increasing the hardware consumption during data transmission. Summary of the Invention

[0003] The purpose of this application is to provide a data transmission method and related devices thereof, so as to solve the technical problem that in the prior art, in order to track the operating state of the Network on Chip, in the application scenario where the number of data packets is large, the number of synchronization information packets is also large, increasing the hardware consumption during data transmission.

[0004] To achieve the above purpose, this application provides the following technical solutions:

[0005] In a first aspect, this application proposes a technical solution for a data sending device, and the data sending device includes:

[0006] A first data transceiver module, configured to receive a read command; the read command is obtained by a data receiving device based on a descriptor; the read command at least includes the source address, quantity, and length of each target data packet to be read;

[0007] And, based on the read command, send the current target data packet to the data receiving device; the current target data packet is any one of the target data packets;

[0008] A first data processing module, configured to generate a current synchronization information packet based on the current target data packet if the currently sent target data packet meets a preset condition; the current synchronization information packet at least includes the sending sequence number of the current target data packet among each target data packet; the number of synchronization information packets is less than the number of target data packets;

[0009] The first data transceiver module is further configured to send the current synchronization information packet to the data receiving device, so that the data receiving device can determine whether data transmission is abnormal based on the current synchronization information packet.

[0010] In a second aspect, the present application proposes a technical solution for a data receiving device, and the data receiving device includes:

[0011] A second data processing module, configured to generate a read command based on a descriptor; the descriptor is obtained in advance; the read command at least includes the source address, quantity, and length of each target data packet to be read;

[0012] A second data transceiver module, configured to send the read command to the data sending device, so that the data sending device can sequentially send each target data packet to the data receiving device based on the read command;

[0013] And, configured to receive a current target data packet and a current synchronization information packet; the current synchronization information packet is generated and sent by the data sending device based on a current target data packet that meets a preset condition; the current synchronization information packet at least includes the sending sequence number of the current target data packet among each target data packet; the number of synchronization information packets is less than the number of target data packets;

[0014] The second data processing module is further configured to determine whether data transmission is abnormal based on the current synchronization information packet and each received target data packet.

[0015] In a third aspect, the present application proposes a technical solution for a data transmission method, and the data transmission method is applied to a data sending device, and the data transmission method includes:

[0016] Receiving a read command; the read command is obtained by the data receiving device based on a descriptor; the read command at least includes the source address, quantity, and length of each target data packet to be read;

[0017] Based on the read command, sending a current target data packet to the data receiving device; the current target data packet is any one of each target data packet;

[0018] If the currently targeted data packet to be sent meets the preset conditions, a current synchronization information packet is generated based on the currently targeted data packet; the current synchronization information packet at least includes the transmission sequence number of the currently targeted data packet among all the targeted data packets; the number of synchronization information packets is less than the number of targeted data packets;

[0019] The current synchronization information packet is sent to the data receiving device so that the data receiving device can determine whether data transmission is abnormal based on the current synchronization information packet.

[0020] In a fourth aspect, the present application proposes a technical solution for a data transmission method. This data transmission method is applied to a data receiving device, and the data transmission method includes:

[0021] A read command is generated based on a descriptor; the descriptor is obtained in advance; the read command at least includes the source address, quantity, and length of each targeted data packet to be read;

[0022] The read command is sent to the data sending device so that the data sending device can sequentially send each targeted data packet to the data receiving device based on the read command;

[0023] The currently targeted data packet and the current synchronization information packet are received; the current synchronization information packet is generated and sent by the data sending device based on the currently targeted data packet that meets the preset conditions; the current synchronization information packet at least includes the transmission sequence number of the currently targeted data packet among all the targeted data packets; the number of synchronization information packets is less than the number of targeted data packets;

[0024] Based on the current synchronization information packet and each received targeted data packet, it is determined whether data transmission is abnormal.

[0025] In a fifth aspect, the present application proposes a technical solution for a data transmission device. This data transmission device includes:

[0026] A data receiving device for generating a read command based on a descriptor; the descriptor is obtained in advance; the read command at least includes the source address, quantity, and length of each targeted data packet to be read;

[0027] And for sending the read command to the data sending device;

[0028] A data sending device for receiving the read command;

[0029] And based on the read command, sending the currently targeted data packet to the data receiving device; the currently targeted data packet is any one of all the targeted data packets;

[0030] And, if the currently targeted data packet to be sent meets the preset conditions, a current synchronization information packet is generated based on the currently targeted data packet; the current synchronization information packet at least includes the transmission sequence number of the currently targeted data packet among all the targeted data packets; the number of synchronization information packets is less than the number of targeted data packets;

[0031] And, the current synchronization information packet is sent to the data receiving device;

[0032] The data receiving device is further configured to receive the currently targeted data packet and the current synchronization information packet;

[0033] And, based on the current synchronization information packet and each received targeted data packet, it is determined whether the data transmission is abnormal.

[0034] In a sixth aspect, the present application proposes a technical solution for a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the data transmission method described in any one of the third aspects, or implements the data transmission method described in any one of the fourth aspects.

[0035] Compared with the prior art, the beneficial effects of the present application are:

[0036] By generating corresponding synchronization information packets for the targeted data packets that meet the preset conditions, compared with the generation method in the prior art where the targeted data packets and the synchronization information packets are generated one by one, the number of synchronization information packets in the present application is significantly less than the number of each targeted data packet. That is to say, the data transmission method proposed in the present application can significantly reduce the number of synchronization information packets in the application scenario where the number of targeted data packets is large, that is, significantly reduce the hardware consumption during data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 is a schematic flowchart of a data transmission method proposed by an embodiment of the present application;

[0038] Figure 2 is a schematic structural diagram of a data sending device proposed by an embodiment of the present application;

[0039] Figure 3 is a schematic structural diagram of a data receiving device proposed by an embodiment of the present application;

[0040] Figure 4 is a schematic structural diagram of a data transmission device proposed by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0041] In the description, claims, and accompanying drawings of the embodiments of the present application, terms such as "first" and "second" are used to distinguish similar objects (for example, the first data transceiver module and the second data transceiver module respectively represent different data transceiver modules, and others are similar), and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments described here can be implemented in an order different from that shown or described here. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules does not necessarily limit to those steps or modules clearly listed, but may include other steps or modules not clearly listed or inherent to these processes, methods, products, or devices. The division of modules in the embodiments of the present application is only a logical division, and there may be other division methods in actual implementation. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the shown or discussed coupling, direct coupling, or communication connection to each other can be through some interfaces, and the indirect coupling and communication connection between modules can be in electrical or other similar forms, which are not limited in the embodiments of the present application. And the modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed to multiple circuit modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.

[0042] To solve the technical problem in the background art that in the application scenario with a large number of data packets, the number of synchronization packets is also large, increasing the hardware consumption during data transmission, the present application proposes a data transmission method to solve the above technical problem.

[0043] The following introduces an exemplary process of a data transmission method provided by the present application. Figure 1 It is a schematic flowchart of a data transmission method provided by an embodiment of the present application. This specification provides method or process operation steps as shown in the embodiment or flowchart, but based on routine or non-creative labor, it may include more or fewer operation steps. The step order listed in the embodiment is only one of many execution orders and does not represent the only execution order. In actual execution, it can be executed in the order of the method or process shown in the embodiment or the drawing, or executed in parallel (for example, in an environment of parallel processors or multi-threaded processing). Specifically, such as Figure 1As shown, the data sending device of this exemplary process refers to any device capable of sending data, and the data receiving device refers to any device capable of receiving data. For example, the data sending device can be a chip capable of sending data, and the data receiving device can be a chip capable of receiving data. Of course, in some cases, the data receiving device can be a data sending device with data receiving function, and the data sending device can also be a data receiving device with data receiving function. The data receiving device and the data sending device can also be different transceiver ports in the same terminal device.

[0044] Before understanding the embodiments of the present application, it should be clear that in an operation of direct memory access, the descriptor sends information such as the source address, destination address, total number of data packets, and length of data transfer to the direct memory access controller. Based on the received descriptor, the direct memory access controller generates a read command and a write command. The read command goes to the source address to read data, and the write command carries the read data packet to the destination address to write data. During this process, the direct memory access controller simultaneously generates a synchronization information packet to report the data transfer progress to the upper layer in real time. This is a mature technology and will not be elaborated hereinafter.

[0045] Specifically, as Figure 1 shown, the data transmission method of the embodiment of the present application is executed interactively by the data sending device and the data receiving device. This data transmission method includes steps S01 to S10.

[0046] Step S01, the data receiving device generates a read command based on the descriptor.

[0047] It should be clear that the descriptor is obtained in advance. Generally, the descriptor is generated by various data transmission programs during execution. This is a mature technology and will not be elaborated here. The read command at least includes the source address, quantity, and length of each target data packet to be read. Generating read commands and write commands based on the descriptor is a mature technology and will not be elaborated here.

[0048] Step S02, the data receiving device sends the read command to the data sending device.

[0049] It should be clear that sending data (i.e., the read command) is a mature technology and will not be elaborated here.

[0050] Step S03, the data sending device receives the read command.

[0051] It should be clear that receiving data (i.e., the read command) is also a mature technology and will not be elaborated here.

[0052] Step S04, the data sending device sends the current target data packet to the data receiving device based on the read command.

[0053] It should be clear that sending data (i.e., the current target data packet) is a mature technology and will not be elaborated here.

[0054] Step S05, the data receiving device receives the current target data packet.

[0055] It should be clear that receiving data (i.e., the current target data packet) is also a mature technology and will not be elaborated here.

[0056] Step S06, if the currently sent target data packet meets the preset conditions, then generate a current synchronization information packet based on the current target data packet.

[0057] As can be seen from the background technology, in the prior art, the synchronization information packet and the target data packet are in one-to-one correspondence, that is, the number of synchronization information packets is equal to the number of each target data packet. In an application scenario with a large number of target data packets, it will lead to a large number of synchronization information packets, thereby increasing the hardware consumption of data transmission. In order to reduce the number of synchronization information packets, in the embodiments of the present application, only the target data packets that meet the preset conditions generate corresponding synchronization information packets, while the target data packets that do not meet the preset conditions do not generate corresponding synchronization information packets. That is to say, in the embodiments of the present application, the number of synchronization information packets must be less than the number of target data packets.

[0058] It can be understood that the data sending device and the data receiving device in the embodiments of the present application can also be only used for sending and receiving synchronization information packets, rather than for sending and receiving target data packets. That is, in the same sending end device, the target data packet and the synchronization information packet can be sent through different sending ports respectively, and in the corresponding receiving end device, the target data packet and the synchronization information packet can also be received through different receiving ports respectively.

[0059] In the embodiments of the present application, the preset conditions can be any conditions that can reduce the number of synchronization information packets. For example, the preset conditions can be at least as shown in the following two embodiments.

[0060] The first embodiment of the preset conditions

[0061] In this embodiment, if the current target data packet is the target data packet with the earliest transmission sequence number among all target data packets (hereinafter referred to as the first target data packet) or the current target data packet is the target data packet with the latest transmission sequence number among all target data packets (hereinafter referred to as the second target data packet), it is determined that the current target data packet meets the preset condition. That is to say, in the embodiment of the present application, after receiving the read command, the data sending device only generates corresponding synchronization information packets for the first target data packet and the second target data packet. Compared with the prior art, it can greatly reduce the number of synchronization information packets, that is, reduce the hardware consumption of data transmission. In other words, in this embodiment, if the synchronization information packet corresponding to the first target data packet is received, it indicates that this data transmission starts; if the synchronization information packet corresponding to the second target data packet is received, it indicates that this data transmission ends.

[0062] Embodiment two of the preset condition

[0063] In application scenarios where the number of all target data packets is relatively large (for example, several hundred thousand or several million), if only the first target data packet and the second target data packet are used to generate synchronization information packets, other target data packets located between the first target data packet and the second target data packet cannot be monitored. In other words, if a transmission anomaly occurs in other target data packets located between the first target data packet and the second target data packet, the anomaly cannot be detected in a timely manner.

[0064] In order to be able to timely detect whether there is an anomaly in the transmission of some target data packets during the transmission process, in addition to the target data packets at the beginning and end, in this embodiment, if the number of all target data packets is greater than a preset value, and the transmission sequence number of the current target data packet is equal to a positive integer multiple of the preset value, it is determined that the current target data packet meets the preset condition; the preset value is a positive integer greater than or equal to 2.

[0065] It is easy to understand that assuming that based on the read command, n target data packets need to be transmitted from the data sending device to the data receiving device, and the preset value is x; where n is a positive integer greater than or equal to 1, and x is a positive integer greater than or equal to 2; then in this embodiment, at most only [n / x] synchronization information packets need to be generated and sent, where [ ] represents taking the smallest positive integer of the value inside the brackets. Compared with the prior art where n target data packets need to generate n synchronization information packets, the embodiment of the present application can greatly reduce the number of generated and transmitted synchronization information packets, that is, it can reduce the hardware consumption during data transmission.

[0066] In a specific embodiment of the present application, assuming that based on a read command, 12,800 target data packets need to be transmitted from a data sending device to a data receiving device. If the preset value is 2, only 6,400 synchronization information packets (excluding the synchronization information packets corresponding to the first and last target data packets) need to be generated; if the preset value is 128, only 100 synchronization information packets (excluding the synchronization information packets corresponding to the first and last target data packets) need to be generated, and so on. It is easy to understand that if the preset value is 128, after the data receiving device receives the 128th target data packet, if it does not receive or receives in advance the synchronization information packet corresponding to the 128th target data packet, then an abnormality must have occurred in the transmission of the 1st to 128th target data packets. Similarly, if the data receiving device does not receive or receives in advance the synchronization information packet corresponding to the 256th target data packet after receiving the 256th target data packet, then an abnormality must have occurred in the transmission of the 129th to 256th target data packets, and so on. That is to say, this embodiment can be applied to application scenarios with a large number of target data packets, and when a problem occurs in the transmission of the target data packets, it can timely detect the transmission abnormality and lock the scope of the transmission abnormality.

[0067] It should be clear that in this embodiment, if the preset value is larger, then when a transmission abnormality occurs, the scope of subsequent locking of the transmission abnormality is also larger; if the preset value is smaller, then when a transmission abnormality occurs, the scope of subsequent locking of the transmission abnormality is also smaller.

[0068] In the embodiment of the present application, the preset value can be any appropriate value. For example, the preset value can be 2 or 128, etc. It is easy to understand that if the preset value is a fixed value and the preset value is small (for example, the preset value is equal to 3 or 4, etc.), then in an application scenario with a large number of target data packets, the number of synchronization information packets is still large, resulting in a relatively high hardware consumption during data transmission; if the preset value is a fixed value and the preset value is large (for example, the preset value is equal to 128 or 256, etc.), then in an application scenario with a small number of target data packets, the number of synchronization information packets is too small to monitor other target data packets between the first target data packet and the second target data packet.

[0069] In order to make the preset value applicable to both application scenarios with a large number of target data packets and those with a small number of target data packets, in the embodiments of the present application, the preset value can be a dynamic value. That is to say, the preset value and the number of target data packets can be in a direct proportional relationship. Suppose, based on a read command, n target data packets need to be transmitted from a data sending device to a data receiving device, then the preset value can be [n / k], where [ ] represents taking the smallest positive integer of the data within the brackets, and k is a positive integer greater than or equal to 1. It is easy to understand that in this embodiment, the number of synchronization information packets is k. In a specific embodiment of the present application, k can be 100 or 200, etc., and of course, it can also be other suitable values. So far, all of the second embodiment of the preset conditions have been introduced.

[0070] It should be noted that in the embodiments of the present application, corresponding synchronization information packets can be generated only based on the head and tail target data packets of each target data packet as described in the first embodiment of the preset conditions to monitor the data transmission process and determine whether the data transmission process is abnormal. Of course, corresponding synchronization information packets can also be generated only based on other target data packets of each target data packet located between the head and tail target data packets as described in the second embodiment of the preset conditions to monitor the data transmission process and determine whether the data transmission process is abnormal. It is also possible to generate corresponding synchronization information packets both based on the head and tail target data packets of each target data packet and based on other target data packets of each target data packet located between the head and tail target data packets to monitor the data transmission process and determine whether the data transmission process is abnormal.

[0071] As can be seen from the foregoing, the synchronization information packet is to understand the operating state of the network-on-chip in more detail. That is to say, in the embodiments of the present application, the synchronization information packet can be a data packet containing any information of the corresponding target data packet. For example, the current synchronization information packet at least includes the sending sequence number of the current target data packet among all target data packets. It is easy to understand that suppose, based on a read command, n target data packets need to be transmitted from a data sending device to a data receiving device, where n is a positive integer greater than or equal to 1. If the sending sequence number in the current synchronization information packet of the data sending device is m, where m is a positive integer greater than or equal to 1 and less than or equal to n, it means that m target data have been sent. If the data receiving device receives the current synchronization information packet with the sending sequence number m, it means that m target data have been received. In other words, in this embodiment, through the sending sequence number in the current synchronization information packet, at least the transmission progress of the network-on-chip data can be understood.

[0072] It is easy to understand that in the embodiments of the present application, a string of multiple characters can be used in the current synchronization information packet to represent the actual transmission sequence number of the current synchronization information packet. If a string of multiple characters is used to represent the actual transmission sequence number of the current synchronization information packet, in an application scenario with a large number of target data packets, the string will be relatively long; in an application scenario with a small number of target data packets, the string will be relatively short. That is to say, in different application scenarios, the number of characters in the string will be inconsistent. It is easy to understand that if the number of characters in the string is not uniform, it will be difficult for the data sending device to accurately generate a synchronization information packet with the transmission sequence number of the target data packet, and it will also be difficult for the data receiving device to read the transmission sequence number of the corresponding target data packet based on the synchronization information packet.

[0073] To facilitate the data sending device to generate a synchronization information packet and also facilitate the data receiving device to read the transmission sequence number information in the synchronization information packet, in an embodiment of the present application, the current synchronization information packet includes at least a start flag and an end flag. The data sending device is configured to set the start flag to 1 if the current target data packet is the target data packet with the earliest transmission sequence number among all target data packets (i.e., the first target data packet), otherwise, set it to 0; if the current target data packet is the target data packet with the latest transmission sequence number among all target data packets (i.e., the second target data packet), then set the end flag to 1, otherwise, set it to 0. It is easy to understand that if the subsequent data receiving device reads a synchronization information packet with the start flag being 1, the target data packet corresponding to this synchronization information packet must be the target data packet with the earliest transmission sequence number among all target data packets (i.e., the first target data packet), that is, the data transmission has started; if the subsequent data receiving device reads a synchronization information packet with the end flag being 1, the target data packet corresponding to this synchronization information packet must be the target data packet with the latest transmission sequence number among all target data packets (i.e., the second target data packet), that is, the data transmission has ended.

[0074] It should be clear that in this embodiment, by setting the start flag and the end flag, only a two-character string is needed to identify the first target data packet and the second target data packet among all target data packets. In other words, in this embodiment, the character length of the string used to represent the transmission sequence numbers of the first target data packet and the second target data packet in the synchronization information packets corresponding to the first target data packet and the second target data packet is not affected by the number of all target data packets, and it always only needs two character lengths. It is easy to understand that compared with generating a string with a variable character length, the difficulty of generating and reading a string with a fixed character length is also reduced.

[0075] Further, to facilitate the data sending device to generate a synchronization information packet and also facilitate the data receiving device to read the transmission sequence number information in the synchronization information packet, in an embodiment of the present application, the current synchronization information packet further includes an intermediate flag. The data sending device is further configured to set the intermediate flag to 1 if the transmission sequence number of the current target data packet is equal to a positive integer multiple of the preset value, and otherwise, set it to 0. In this embodiment, if the preset value is y, and the subsequent data receiving device reads the i-th synchronization information packet with the intermediate flag being 1, it indicates that the transmission of y×i target data packets has been completed. That is to say, in the embodiments of the present application, at most only three strings (i.e., the start flag, the intermediate flag, and the end flag) are required to complete the transmission of the transmission sequence numbers of all target data packets, and no further elaboration will be made here.

[0076] Step S07, the data sending device sends the current synchronization information packet to the data receiving device.

[0077] It should be clear that sending data (i.e., the current synchronization information packet) is a mature technology and will not be elaborated here.

[0078] Step S08, the data receiving device receives the current synchronization information packet.

[0079] It should be clear that receiving data (i.e., the current synchronization information packet) is also a mature technology and will not be elaborated here.

[0080] Step S09, the data sending device determines whether the data transmission is abnormal based on the current synchronization information packet and each received target data packet.

[0081] In the embodiments of the present application, if the data receiving device issues a read command and the data receiving device does not receive the target data packet, it indicates that the data transmission must have been abnormal. The reasons for the abnormality may be that the read command transmission is blocked, or an incorrect read command is generated, or the target data packet transmission is blocked, etc. If the data receiving device issues a read command and the data receiving device receives the target data packet but does not receive the corresponding synchronization information packet, it indicates that the data sending device is likely to have generated an abnormal synchronization information packet or lost a packet, etc.

[0082] In an embodiment of the present application, to facilitate identifying a target data packet uniquely corresponding to a synchronization information packet, the target data packet and the synchronization information packet can be the same data packet. That is to say, the synchronization information described above (for example, the transmission sequence number described above or the operation code described below, etc.) can be written into the target data packet. If the target data packet and the synchronization information packet are not the same data packet, the data sending device can set the sending order of the synchronization information packet after or before the corresponding target data packet, and the sending orders of the synchronization information packet and the corresponding target data packet are adjacent. To avoid redundancy, the embodiments of the present application are described only by taking the application scenario where the sending order of the synchronization information packet is set after the corresponding target data packet as an example.

[0083] In this embodiment, on the premise that the data receiving device issues a read command, if the data receiving device receives the first target data packet sent by the data sending device and the first flag in the received synchronization information packet is 0, it indicates that the data transmission must have an abnormality. If the data receiving device receives the last target data packet sent by the data sending device and the last flag in the received synchronization information packet is 0, it indicates that the data transmission must have an abnormality.

[0084] In an embodiment of the present application, a first counter and a second counter can be set in the data receiving device. The first counter is used to accumulate the number of target data packets received by the data receiving device from the data sending device after the data receiving device issues a read command; the second counter is used to accumulate the number of synchronization information packets with a middle flag of 1 received by the data receiving device from the data sending device after the data receiving device issues a read command. It is easy to understand that if there is no abnormality in the transmission process of each target data packet, the following formula must be satisfied:

[0085] F = y×i

[0086] where y represents a preset value; F represents the accumulated value of the first counter; i represents the accumulated value of the second counter. That is to say, if F is equal to y×i, the transmission of the ((i - 1)×y + 1)-th to y×i-th target data packets is very likely to have no abnormality; if F is not equal to y×i, the transmission of the ((i - 1)×y + 1)-th to y×i-th target data packets must have an abnormality. In an embodiment of the present application, if a synchronization information packet with a last flag of 1 is received, it indicates that the entire data transmission has been completed, and the accumulated value of the first counter is equal to the total number of target data packets in the command symbol. If the above formula is always satisfied during the transmission process, it indicates that the entire data transmission process has no abnormality. If a synchronization information packet with a last flag of 1 is received, the first counter and the second counter can be reset.

[0087] In an embodiment of the present application, the synchronization information packet may further include an operation code, which is used to represent the type of the corresponding target data packet and what operation the target data packet is used to perform. Since the operation code is a mature technology, it will not be elaborated here.

[0088] In an embodiment of the present application, the synchronization information packet may further include a tracking number. The tracking number is an independent number, carried by the descriptor and written into the synchronization information packet. This number will not change during any single DMA transfer, and will not be the same during any two DMA transfers. It is a distinguishing flag between independent DMA transfers. The tracking number is at least used to represent the initial source address of the corresponding target data packet. That is to say, in an embodiment of the present application, the initial source address of the corresponding target data packet can be obtained through the tracking number.

[0089] In an embodiment of the present application, the synchronization information packet may further include a timestamp. The timestamp is at least used to represent the generation time of the corresponding target data packet. If the synchronization information packet includes a timestamp, then subsequently, based on the synchronization information packets corresponding to the first target data packet and the second target data packet, the total duration of this data transmission can be calculated, and then based on the total duration, it can be determined whether the data transmission network quality and efficiency are abnormal.

[0090] In an embodiment of the present application, in response to receiving a synchronization information packet and determining that the data transmission is normal based on this synchronization information packet, each received target data packet that has not been written to the destination address can be written to the destination address based on the write command.

[0091] It can be understood that during the data transmission process of the embodiment of the present application, within the time period between receiving two synchronization information packets, several target data packets will be received. If it can be determined that the data transmission during this time period is normal based on the subsequent synchronization information packet, then the several target data packets within this time period can be written to the corresponding destination addresses.

[0092] It should be clear that writing data to the target address is a mature technology and will not be elaborated here.

[0093] In an embodiment of the present application, by generating corresponding synchronization information packets for target data packets that meet preset conditions, compared with the prior art in which target data packets and synchronization information packets are generated one by one, the number of each synchronization information packet in the present application is significantly smaller than the number of each target data packet. That is to say, the data transmission method proposed in the present application can significantly reduce the number of synchronization information packets in an application scenario with a large number of target data packets, that is, significantly reduce the hardware consumption during data transmission.

[0094] After introducing a data sending method proposed in an embodiment of the present application, the following introduces a data sending device proposed in the present application, as Figure 2As shown, the data sending device 10 includes:

[0095] A first data transceiver module 11, configured to receive a read command; the read command is obtained by the data receiving device 20 based on a descriptor; the read command at least includes the source address, quantity, and length of each target data packet to be read;

[0096] And, based on the read command, send the current target data packet to the data receiving device 20; the current target data packet is any one of the target data packets;

[0097] A first data processing module 12, configured to, if the currently sent target data packet meets a preset condition, generate a current synchronization information packet based on the current target data packet; the current synchronization information packet at least includes the sending sequence number of the current target data packet among the target data packets; the number of synchronization information packets is less than the number of target data packets;

[0098] The first data transceiver module 11 is further configured to send the current synchronization information packet to the data receiving device 20, so that the data receiving device 20 can determine whether data transmission is abnormal based on the current synchronization information packet.

[0099] As a specific embodiment of the present application, the first data processing module 12 is further configured to determine that the current target data packet meets the preset condition if the current target data packet is the target data packet with the earliest sending sequence number among the target data packets or the current target data packet is the target data packet with the latest sending sequence number among the target data packets.

[0100] As a specific embodiment of the present application, the current synchronization information packet at least includes a start flag and an end flag; the first data processing module 12 is further configured to set the start flag to 1 if the current target data packet is the target data packet with the earliest sending sequence number among the target data packets, otherwise, set it to 0; set the end flag to 1 if the current target data packet is the target data packet with the latest sending sequence number among the target data packets, otherwise, set it to 0.

[0101] As a specific embodiment of the present application, the first data processing module 12 is further configured to determine that the current target data packet meets the preset condition if the number of target data packets is greater than a preset value and the sending sequence number of the current target data packet is an integer multiple of the preset value; the preset value is a positive integer greater than or equal to 2.

[0102] As a specific embodiment of the present application, the current synchronization information packet further includes an intermediate flag; if the sending sequence number of the current target data packet is an integer multiple of the preset value, set the intermediate flag to 1, otherwise, set it to 0.

[0103] In an embodiment of the present application, the data sending device generates corresponding synchronization information packets for target data packets that meet preset conditions. Compared with the generation method in the prior art where target data packets and synchronization information packets are generated one by one, the number of each synchronization information packet in the present application is significantly smaller than the number of each target data packet. That is to say, the data sending device proposed in the present application can significantly reduce the number of synchronization information packets in an application scenario with a large number of target data packets, that is, significantly reduce the hardware consumption during data transmission.

[0104] After introducing a data sending device proposed in an embodiment of the present application, the following introduces a data receiving device proposed in the present application. As Figure 3 shown, the data receiving device 20 includes:

[0105] A second data processing module 22, configured to generate a read command based on a descriptor; the descriptor is obtained in advance; the read command at least includes the source address, quantity, and length of each target data packet to be read;

[0106] A second data transceiver module 21, configured to send the read command to the data sending device 10, so that the data sending device 10 can sequentially send each target data packet to the data receiving device 20 based on the read command;

[0107] And, configured to receive a current target data packet and a current synchronization information packet; the current synchronization information packet is generated and sent by the data sending device 10 based on the current target data packet that meets preset conditions; the current synchronization information packet at least includes the sending sequence number of the current target data packet among all target data packets; the number of synchronization information packets is less than the number of target data packets;

[0108] The second data processing module 22 is further configured to determine whether data transmission is abnormal based on the current synchronization information packet and each received target data packet.

[0109] As a specific embodiment in the present application, the current synchronization information packet at least includes a start flag and an end flag; the start flag and the end flag are determined by the data sending device 10 according to the sending sequence number of the current target data packet among all target data packets;

[0110] The start flag is 1 or 0; where, when the start flag is 1, it indicates that the corresponding current target data packet is the target data packet with the earliest sending sequence number among all target data packets; when the start flag is 0, it indicates that the corresponding current target data packet is not the target data packet with the earliest sending sequence number among all target data packets;

[0111] The tail flag is 1 or 0; where, when the tail flag is 1, it indicates that the corresponding current target data packet is the target data packet with the last transmission sequence number among all target data packets; when the tail flag is 0, it indicates that the corresponding current target data packet is not the target data packet with the last transmission sequence number among all target data packets.

[0112] As a specific embodiment of the present application, the second data processing module 22 is further configured to determine that data transmission is abnormal if the second data transceiver module 21 issues the read command and the second data transceiver module 21 does not receive the target data packet; or does not receive the synchronization information packet; or the head flag in the synchronization information packet corresponding to the target data packet with the earliest transmission sequence number among all target data packets is 0; or the tail flag in the synchronization information packet corresponding to the target data packet with the last transmission sequence number among all target data packets is 0.

[0113] As a specific embodiment of the present application, the current synchronization information packet further includes an intermediate flag; the intermediate flag is determined by the data sending device 10 according to the transmission sequence number of the current target data packet among all target data packets;

[0114] The intermediate flag is 1 or 0; where, when the intermediate flag is 1, it indicates that the transmission sequence number of the corresponding current target data packet is an integer multiple of a preset value; when the intermediate flag is 0, it indicates that the transmission sequence number of the corresponding current target data packet is not an integer multiple of the preset value; the preset value is a positive integer greater than or equal to 2.

[0115] As a specific embodiment of the present application, the second data processing module 22 is further configured to determine that data transmission is abnormal if the transmission sequence number of the target data packet is an integer multiple of the preset value and the intermediate flag in the synchronization information packet corresponding to the target data packet is 0.

[0116] In the embodiment of the present application, the data receiving device generates corresponding synchronization information packets for target data packets that meet preset conditions. Compared with the prior art in which target data packets and synchronization information packets are generated one by one, the number of each synchronization information packet in the present application is significantly smaller than the number of each target data packet. That is to say, the data receiving device proposed in the present application can significantly reduce the number of synchronization information packets in an application scenario with a large number of target data packets, that is, significantly reduce the hardware consumption during data transmission.

[0117] After introducing a data receiving device proposed in the embodiment of the present application, the following introduces a data transmission device proposed in the present application, as Figure 4 shown, the data transmission device 1 includes:

[0118] A data receiving device 20, configured to generate a read command based on a descriptor; the descriptor is obtained in advance; the read command at least includes the source address, quantity, and length of each target data packet to be read;

[0119] and configured to send the read command to a data sending device 10;

[0120] The data sending device 10 is configured to receive the read command;

[0121] and based on the read command, send a current target data packet to the data receiving device 20; the current target data packet is any one of the target data packets;

[0122] and if the sent current target data packet meets a preset condition, generate a current synchronization information packet based on the current target data packet; the current synchronization information packet at least includes the sending sequence number of the current target data packet among the target data packets; the number of synchronization information packets is less than the number of target data packets;

[0123] and send the current synchronization information packet to the data receiving device 20;

[0124] The data receiving device 20 is further configured to receive the current target data packet and the current synchronization information packet;

[0125] and based on the current synchronization information packet and the received target data packets, determine whether data transmission is abnormal.

[0126] As a specific embodiment in the present application, the data sending device 10 is further configured to determine that the current target data packet meets the preset condition if the current target data packet is the target data packet with the earliest sending sequence number among the target data packets or the current target data packet is the target data packet with the latest sending sequence number among the target data packets.

[0127] As a specific embodiment in the present application, the current synchronization information packet at least includes a start flag and an end flag;

[0128] The data sending device 10 is further configured to set the start flag to 1 if the current target data packet is the target data packet with the earliest sending sequence number among the target data packets, otherwise set it to 0; set the end flag to 1 if the current target data packet is the target data packet with the latest sending sequence number among the target data packets, otherwise set it to 0;

[0129] The data receiving device 20 is further configured to determine that data transmission is abnormal if the second data transceiver module 21 issues the read command and the second data transceiver module 21 does not receive the target data packet; or does not receive the synchronization information packet; or the start flag in the synchronization information packet corresponding to the target data packet with the earliest transmission sequence number among all target data packets is 0; or the end flag in the synchronization information packet corresponding to the target data packet with the latest transmission sequence number among all target data packets is 0.

[0130] As a specific embodiment of the present application, the data sending device 10 is further configured to determine that the current target data packet meets the preset condition if the number of all target data packets is greater than a preset value and the transmission sequence number of the current target data packet is an integer multiple of the preset value; the preset value is a positive integer greater than or equal to 2.

[0131] As a specific embodiment of the present application, the current synchronization information packet further includes a middle flag.

[0132] The data sending device 10 is further configured to set the middle flag to 1 if the transmission sequence number of the current target data packet is an integer multiple of the preset value, otherwise, set it to 0.

[0133] The data receiving device 20 is further configured to determine that data transmission is abnormal if the transmission sequence number of the target data packet is an integer multiple of the preset value and the middle flag in the synchronization information packet corresponding to the target data packet is 0.

[0134] In the embodiment of the present application, the data transmission device generates corresponding synchronization information packets for target data packets that meet the preset conditions. Compared with the generation method in the prior art where target data packets and synchronization information packets are generated one by one, the number of each synchronization information packet in the present application is significantly smaller than the number of each target data packet. That is to say, the data transmission device proposed in the present application can significantly reduce the number of synchronization information packets in the application scenario where the number of target data packets is large, that is, significantly reduce the hardware consumption during data transmission.

[0135] After introducing a data transmission device proposed in the embodiment of the present application, the following introduces a computer-readable storage medium proposed in the present application. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the data transmission method described in any one of the above.

[0136] In the above embodiments, the descriptions of each embodiment have their own focuses. For parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0137] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and modules described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0138] In several embodiments provided in the embodiments of the present application, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces, and the indirect coupling or communication connection of the devices or modules can be in electrical, mechanical, or other forms.

[0139] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0140] In addition, in each embodiment of the embodiments of the present application, the various functional modules can be integrated in a processing module, or each module can exist physically alone, or two or more modules can be integrated in one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0141] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product.

[0142] The computer program product includes one or more computer instructions. When the computer program is loaded and executed on a computer, the processes or functions described in the embodiments of the present application are all or partially generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more integrated available media. The available medium may be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

[0143] The technical solutions provided in the embodiments of the present application have been introduced in detail above. Specific examples are used in the embodiments of the present application to illustrate the principles and implementation manners of the embodiments of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the embodiments of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the embodiments of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation on the embodiments of the present application.

Claims

1. A data sending device, characterized in that, Including: A first data transceiver module, configured to receive a read command; The read command is obtained by a data receiving device based on a descriptor; The read command at least includes the source address, quantity, and length of each target data packet to be read; And, based on the read command, send the current target data packet to the data receiving device; the current target data packet is any one of the target data packets; A first data processing module, configured to generate a current synchronization information packet based on the current target data packet if the sent current target data packet meets a preset condition; the current synchronization information packet at least includes the sending sequence number of the current target data packet among the target data packets; The quantity of the synchronization information packets is less than the quantity of the target data packets; And, if the quantity of each target data packet is greater than a preset value, and the sending sequence number of the current target data packet is equal to a positive integer multiple of the preset value, it is determined that the current target data packet meets the preset condition; the preset value is a positive integer greater than or equal to 2; The first data transceiver module is further configured to send the current synchronization information packet to the data receiving device, so that the data receiving device can determine whether data transmission is abnormal based on the current synchronization information packet.

2. The data sending device according to claim 1, characterized in that, The first data processing module is further configured to determine that the current target data packet meets the preset condition if the current target data packet is the target data packet with the earliest sending sequence number among the target data packets or the current target data packet is the target data packet with the latest sending sequence number among the target data packets.

3. The data sending device according to claim 2, wherein The current synchronization information packet at least includes a start flag and an end flag; the first data processing module is further configured to set the start flag to 1 if the current target data packet is the target data packet with the earliest sending sequence number among the target data packets, otherwise, set it to 0; If the current target data packet is the target data packet with the latest sending sequence number among the target data packets, set the end flag to 1, otherwise, set it to 0.

4. The data sending device according to any one of claims 1 to 3, characterized in that The current synchronization information packet further includes an intermediate flag; if the sending sequence number of the current target data packet is equal to a positive integer multiple of the preset value, set the intermediate flag to 1, otherwise, set it to 0.

5. A data receiving device, characterized in that, Including: A second data processing module, configured to generate a read command based on a descriptor; The descriptor is obtained in advance; The read command at least includes the source address, quantity, and length of each target data packet to be read; A second data transceiver module, configured to send the read command to a data sending device, so that the data sending device can sequentially send each target data packet to the data receiving device based on the read command; And, configured to receive the current target data packet and the current synchronization information packet; the current synchronization information packet is generated and sent by the data sending device based on the current target data packet that meets the preset condition; the current synchronization information packet at least includes the sending sequence number of the current target data packet among the target data packets; the quantity of the synchronization information packets is less than the quantity of the target data packets; The current synchronization information packet further includes an intermediate flag; the intermediate flag is determined by the data sending device according to the sending sequence number of the current target data packet among the target data packets. The intermediate flag is 1 or 0; wherein, when the intermediate flag is 1, it indicates that the transmission sequence number of the corresponding current target data packet is an integral multiple of a preset value; when the intermediate flag is 0, it indicates that the transmission sequence number of the corresponding current target data packet is not an integral multiple of the preset value; the preset value is a positive integer greater than or equal to 2; The second data processing module is further configured to determine whether data transmission is abnormal based on the current synchronization information packet and each received target data packet.

6. The data receiving device according to claim 5, wherein The current synchronization information packet at least includes a start flag and an end flag; the start flag and the end flag are determined by the data sending device according to the transmission sequence number of the current target data packet among each target data packet; The start flag is 1 or 0; wherein, when the start flag is 1, it indicates that the corresponding current target data packet is the target data packet with the earliest transmission sequence number among each target data packet; when the start flag is 0, it indicates that the corresponding current target data packet is not the target data packet with the earliest transmission sequence number among each target data packet; The end flag is 1 or 0; wherein, when the end flag is 1, it indicates that the corresponding current target data packet is the target data packet with the latest transmission sequence number among each target data packet; when the end flag is 0, it indicates that the corresponding current target data packet is not the target data packet with the latest transmission sequence number among each target data packet.

7. The data receiving device according to claim 6, wherein The second data processing module is further configured to determine that data transmission is abnormal if the second data transceiver module issues the read command and the second data transceiver module does not receive the target data packet; or does not receive the synchronization information packet; or the start flag in the synchronization information packet corresponding to the target data packet with the earliest transmission sequence number among each target data packet is 0; or the end flag in the synchronization information packet corresponding to the target data packet with the latest transmission sequence number among each target data packet is 0.

8. The data receiving device according to claim 7, characterized in that The second data processing module is further configured to determine that data transmission is abnormal if the transmission sequence number of the target data packet is an integral multiple of the preset value and the intermediate flag in the synchronization information packet corresponding to the target data packet is 0.

9. A data transmission method, applied to a data sending device, characterized in that, The method includes: Receiving a read command; the read command is obtained by the data receiving device based on a descriptor; the read command at least includes the source address, quantity, and length of each target data packet to be read; Based on the read command, sending a current target data packet to the data receiving device; the current target data packet is any one of each target data packet; If the sent current target data packet meets a preset condition, generating a current synchronization information packet based on the current target data packet; the current synchronization information packet at least includes the transmission sequence number of the current target data packet among each target data packet; the number of synchronization information packets is less than the number of target data packets; If the number of target data packets is greater than a preset value and the transmission sequence number of the current target data packet is an integral multiple of the preset value, it is determined that the current target data packet meets the preset condition; the preset value is a positive integer greater than or equal to 2; Sending the current synchronization information packet to the data receiving device so that the data receiving device can determine whether data transmission is abnormal based on the current synchronization information packet.

10. The data transmission method according to claim 9, wherein If the current target data packet is the target data packet with the earliest transmission sequence number among all target data packets or the current target data packet is the target data packet with the latest transmission sequence number among all target data packets, it is determined that the current target data packet meets the preset conditions.

11. The data transmission method according to claim 10, wherein The current synchronization information packet includes at least a start flag and an end flag; generating the current synchronization information packet based on the current target data packet includes: If the current target data packet is the target data packet with the earliest transmission sequence number among all target data packets, set the start flag to 1 to generate the current synchronization information packet; otherwise, set the start flag to 0 to generate the current synchronization information packet; If the current target data packet is the target data packet with the latest transmission sequence number among all target data packets, set the end flag to 1 to generate the current synchronization information packet; otherwise, set the end flag to 0 to generate the current synchronization information packet.

12. The data transmission method according to claim 11, wherein The current synchronization information packet further includes a middle flag; generating the current synchronization information packet based on the current target data packet further includes: If the transmission sequence number of the current target data packet is equal to a positive integer multiple of the preset value, set the middle flag to 1 to generate the current synchronization information packet; otherwise, set the middle flag to 0 to generate the current synchronization information packet.

13. A data transmission method, applied to a data receiving device, characterized in that, The method includes: Generating a read command based on a descriptor; the descriptor is obtained in advance; the read command includes at least the source address, quantity, and length of each target data packet to be read; Sending the read command to a data sending device so that the data sending device can sequentially send each target data packet to the data receiving device based on the read command; Receiving a current target data packet and a current synchronization information packet; the current synchronization information packet is generated and sent by the data sending device based on a current target data packet that meets the preset conditions; the current synchronization information packet includes at least the transmission sequence number of the current target data packet among all target data packets; the number of synchronization information packets is less than the number of target data packets; The current synchronization information packet further includes a middle flag; The current synchronization information packet is generated by the data sending device based on a current target data packet that meets the preset conditions, and further includes: If the transmission sequence number of the current target data packet is equal to a positive integer multiple of the preset value, the data sending device sets the middle flag to 1 to generate the current synchronization information packet; otherwise, the data sending device sets the middle flag to 0 to generate the current synchronization information packet; Determining whether data transmission is abnormal based on the current synchronization information packet and each received target data packet.

14. The data transmission method according to claim 13, wherein The current synchronization information packet includes at least a start flag and an end flag; The current synchronization information packet is generated by the data sending device based on a current target data packet that meets the preset conditions, and includes: If the current target data packet is the target data packet with the earliest transmission sequence number among all target data packets, the data sending device sets the start flag to 1 to generate the current synchronization information packet; otherwise, the data sending device sets the start flag to 0 to generate the current synchronization information packet; If the current target data packet is the target data packet with the last transmission sequence number among all target data packets, the data sending device sets the tail flag to 1 to generate a current synchronization information packet; otherwise, the data sending device sets the tail flag to 0 to generate a current synchronization information packet.

15. The data transmission method according to claim 14, wherein Determining whether data transmission is abnormal based on the current synchronization information packet and each received target data packet includes: If the read command is issued and no target data packet is received; or, no synchronization information packet is received; or, the head flag in the synchronization information packet corresponding to the target data packet with the earliest transmission sequence number among all target data packets is 0; or, the tail flag in the synchronization information packet corresponding to the target data packet with the last transmission sequence number among all target data packets is 0; then it is determined that data transmission is abnormal.

16. The data transmission method according to claim 15, wherein Determining whether data transmission is abnormal based on the current synchronization information packet and each received target data packet further includes: If the transmission sequence number of a target data packet is an integer multiple of the preset value and the middle flag in the synchronization information packet corresponding to the target data packet is 0, then it is determined that data transmission is abnormal.

17. A data transmission device, characterized in that, Including: A data receiving device for generating a read command based on a descriptor; The descriptor is obtained in advance; The read command at least includes the source address, quantity, and length of each target data packet to be read; And for sending the read command to a data sending device; A data sending device for receiving the read command; And based on the read command, sending a current target data packet to the data receiving device; the current target data packet is any one of all target data packets; And if the currently sent target data packet meets a preset condition, generating a current synchronization information packet based on the current target data packet; the current synchronization information packet at least includes the transmission sequence number of the current target data packet among all target data packets; The quantity of synchronization information packets is less than the quantity of target data packets; And if the quantity of all target data packets is greater than a preset value and the transmission sequence number of the current target data packet is an integer multiple of the preset value, it is determined that the current target data packet meets the preset condition; the preset value is a positive integer greater than or equal to 2; And sending the current synchronization information packet to the data receiving device; The data receiving device is further configured to receive the current target data packet and the current synchronization information packet; And determining whether data transmission is abnormal based on the current synchronization information packet and each received target data packet.

18. The data transmission device according to claim 17, wherein The data sending device is further configured to determine that the current target data packet meets the preset condition if the current target data packet is the target data packet with the earliest transmission sequence number among all target data packets or the current target data packet is the target data packet with the last transmission sequence number among all target data packets.

19. The data transmission device according to claim 18, characterized in that, The current synchronization information packet at least includes a head flag and a tail flag; The data sending device is further configured to set the head flag to 1 if the current target data packet is the target data packet with the earliest transmission sequence number among all target data packets, otherwise, set it to 0; If the current target data packet is the target data packet with the last transmission sequence number among all target data packets, set the tail flag to 1; otherwise, set it to 0. The data receiving device is further configured to determine that data transmission is abnormal if the data receiving device issues the read command and the data receiving device does not receive the target data packet; or does not receive the synchronization information packet; or the head flag in the synchronization information packet corresponding to the target data packet with the earliest transmission sequence number among all target data packets is 0; or the tail flag in the synchronization information packet corresponding to the target data packet with the last transmission sequence number among all target data packets is 0.

20. The data transmission device according to claim 19, characterized in that, The current synchronization information packet further includes an intermediate flag. The data sending device is further configured to set the intermediate flag to 1 if the transmission sequence number of the current target data packet is an integer multiple of the preset value; otherwise, set it to 0. The data receiving device is further configured to determine that data transmission is abnormal if the transmission sequence number of the target data packet is an integer multiple of the preset value and the intermediate flag in the synchronization information packet corresponding to the target data packet is 0.

21. A computer-readable storage medium, characterized in that, A computer program is stored thereon, and when the computer program is executed by a processor, it implements the data transmission method according to any one of claims 9 to 12, or implements the data transmission method according to any one of claims 13 to 16.

Citation Information

Patent Citations

  • Data transmission method and related device

    CN116614445A

  • Data transmission device, reception device, transmission method, and transmission system

    CN116996460A