Data transmission method and related device

By generating synchronous information packets for target data packets that meet preset conditions, the hardware consumption problem caused by the excessive number of synchronous information packets in the prior art is solved, and efficient data transmission in large-scale data transmission scenarios is achieved.

CN119441133AActive Publication Date: 2025-02-14ZHONGHAO XINYING (HANGZHOU) TECHNOLOGY CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the application scenario where the number of data packets is large, the number of synchronized information packets in the prior art is also large, which increases the hardware consumption during data transmission.

Method used

A data transmission method is proposed, by generating corresponding synchronization information packets for target packets that meet preset conditions, and not generating synchronization information packets for all target packets. The preset condition may be that the sending sequence number of the target data packet is the first or the last, or the sending sequence number is equal to a positive integer multiple of the preset value.

Benefits of technology

This significantly reduces the number of synchronized information packets and reduces hardware consumption during data transmission, especially in scenarios where the number of target data packets is large.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441133A_ABST
    Figure CN119441133A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method and a related device thereof, and relates to the technical field of data transmission. The data transmission method is applied to the data sending device. The data transmission method comprises the following steps: receiving a read command; sending a current target data packet to the data receiving device based on the read command; if the sent current target data packet meets the 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. The corresponding synchronization information packets are generated for the target data packets meeting the preset conditions, and the number of the generated synchronization information packets is obviously smaller than the number of the target data packets. In an application scene with a large number of target data packets, the number of synchronization information packets can be obviously reduced, i.e., hardware consumption during data transmission is obviously reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Direct Memory Access (DMA) is a technology used to transfer data 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 on-chip networks have emerged. Network on Chip (NoC) is a network used to transfer data, and direct memory access technology is a method of data transfer. When the on-chip network based on direct memory access technology performs data transmission, the progress and speed of data transmission are opaque to the control module. In order to understand the operating status of the on-chip network in more detail, it is necessary to monitor the progress and speed of data transmission, and it is necessary to track and monitor the data transmitted based on memory access technology. In the prior art, a method is adopted in which a synchronization information packet is sent for each target data packet transmitted, so that the control module can timely understand the operating status of the on-chip network. It should be noted that if the target data packet corresponds to the synchronization information packet one by one, then in the application scenario with a large number of target data packets, the number of synchronization information packets is also large, which increases the hardware consumption during data transmission. Summary of the invention

[0003] The purpose of the present application is to provide a data transmission method and related devices to solve the technical problem that in order to track the operating status of the on-chip network in the prior art, in an application scenario with a large number of data packets, the number of synchronization information packets is also large, which increases the hardware consumption during data transmission.

[0004] To achieve the above objectives, this application provides the following technical solutions: In a first aspect, the present application proposes a technical solution of a data sending device, the data sending device comprising: A first data transceiver module is used to receive a read command; the read command is obtained by the data receiving device based on the 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, sending a 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 current target data packet being sent meets a preset condition; the current synchronization information packet at least includes a sending sequence number of the current target data packet in each target data packet; and the number of synchronization information packets is less than the number of target data packets; The first data transceiver module is further used to send the current synchronization information packet to the data receiving device, so that the data receiving device can determine whether the data transmission is abnormal based on the current synchronization information packet.

[0005] In a second aspect, the present application proposes a technical solution of a data receiving device, the data receiving device comprising: A second data processing module is used to generate a read command based on the descriptor; the descriptor is acquired 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 is used to send the read command to the data sending device, so that the data sending device can send each target data packet to the data receiving device in sequence based on the read command; and, for 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 the current target data packet that meets the preset conditions; the current synchronization information packet at least includes the sending sequence number of the current target data packet in each target data packet; the number of synchronization information packets is less than the number of target data packets; The second data processing module is further used to determine whether the data transmission is abnormal based on the current synchronization information packet and each received target data packet.

[0006] In a third aspect, the present application proposes a technical solution of a data transmission method, which is applied to a data sending device, and the data transmission method includes: Receive a read command; the read command is obtained by the data receiving device based on the descriptor; the read command includes at least the source address, quantity and length of each target data packet to be read; Based on the read command, a current target data packet is sent to the data receiving device; the current target data packet is any one of the target data packets; If the current target data packet sent meets the preset conditions, a current synchronization information packet is generated 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 in each target data packet; the number of synchronization information packets is less than the number of target data packets; The current synchronization information packet is sent to the data receiving device, so that the data receiving device can determine whether the data transmission is abnormal based on the current synchronization information packet.

[0007] In a fourth aspect, the present application proposes a technical solution of a data transmission method, which is applied to a data receiving device, and the data transmission method includes: Generate a read command based on the descriptor; the descriptor is acquired 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 send each target data packet to the data receiving device in sequence based on the read command; 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 the current target data packet that meets the preset conditions; the current synchronization information packet at least includes the sending sequence number of the current target data packet in each target data packet; the number of synchronization information packets is less than the number of target data packets; Based on the current synchronization information packet and each received target data packet, it is determined whether the data transmission is abnormal.

[0008] In a fifth aspect, the present application proposes a technical solution for a data transmission device, the data transmission device comprising: A data receiving device, used for generating a read command based on a descriptor; the descriptor is acquired in advance; the read command includes at least the source address, quantity and length of each target data packet to be read; and, used for sending the read command to a data sending device; A data sending device, used for receiving a 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 the target data packets; And, if the current target data packet sent meets the preset conditions, a current synchronization information packet is generated 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 in each target data packet; the number of synchronization information packets is less than the number of target data packets; and, sending the current synchronization information packet to the data receiving device; The data receiving device is also used to receive the current target data packet and the current synchronization information packet; And, based on the current synchronization information packet and each received target data packet, it is determined whether the data transmission is abnormal.

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

[0010] Compared with the prior art, the beneficial effects of this application are: The present application generates corresponding synchronization information packets for target data packets that meet preset conditions. Compared with the one-to-one generation method of target data packets and synchronization information packets in the prior art, the number of synchronization information packets in the present application is significantly smaller than the number of each target data packet. In other words, the data transmission method proposed in the present application can significantly reduce the number of synchronization information packets in application scenarios with a large number of target data packets, that is, significantly reduce the hardware consumption during data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 A flowchart of a data transmission method proposed in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a data sending device proposed in an embodiment of the present application; Figure 3 A schematic diagram of the structure of a data receiving device proposed in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a data transmission device proposed in an embodiment of the present application. DETAILED DESCRIPTION

[0012] The terms "first", "second", etc. in the specification and claims of the embodiments of the present application and the above-mentioned drawings are used to distinguish similar objects (for example, the first data transceiver module and the second data transceiver module are respectively represented as different data transceiver modules, and the others are similar), and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described here can be implemented in an order other than the content illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules that are clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The division of modules that appear in the embodiments of the present application is only a logical division, and there may be other division methods when implemented in actual applications, such as multiple modules can be combined or integrated in another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling between modules, and the communication connection may be electrical or other similar forms, which are not limited in the embodiments of the present application. Moreover, the modules or submodules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in multiple circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0013] In order to solve the technical problem that the direct memory access technology proposed in the background technology has a large number of synchronous information packets in application scenarios with a large number of data packets, which increases the hardware consumption during data transmission, the present application proposes a data transmission method to solve the above technical problem.

[0014] The following introduces an exemplary process of a data transmission method provided by the present application. Figure 1 It is a flowchart of a data transmission method provided in an embodiment of the present application. This specification provides method or process operation steps as shown in the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one of many execution orders and does not represent the only execution order. In actual execution, the method or process shown in the embodiment or the drawings may be executed in sequence or in parallel (for example, in a parallel processor or multi-threaded processing environment). Specifically, Figure 1 As shown, the data sending device of the 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 may be a chip capable of sending data, and the data receiving device may be a chip capable of receiving data. Of course, in some cases, the data receiving device may be a data sending device with a data receiving function, and the data sending device may also be a data receiving device with a data receiving function. The data receiving device and the data sending device may also be different transceiver ports in the same terminal device.

[0015] Before understanding the embodiments of the present application, it should be clear that in a direct memory access operation, the descriptor sends the source address, destination address, total number and length of data packets and other information of the data transfer to the direct memory access controller. The direct memory access controller generates read commands and write commands based on the received descriptors. The read command goes to the source address to read data, and the write command carries the read-back data packet to the destination address to write data. In this process, the direct memory access controller also generates a synchronization information packet to report the data transfer progress to the upper layer in real time. It is a mature technology and will not be described in detail later.

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

[0017] Step S01: The data receiving device generates a read command based on a descriptor.

[0018] It should be clear that the descriptor is obtained in advance, and the general descriptor is generated by various data transmission programs when they are executed, which is a mature technology and will not be described in detail 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 descriptors is a mature technology and will not be described in detail here.

[0019] Step S02: the data receiving device sends a read command to the data sending device.

[0020] It should be clear that sending data (ie, reading commands) is a mature technology and will not be described in detail here.

[0021] Step S03: the data sending device receives a read command.

[0022] It should be clear that receiving data (ie, reading commands) is also a mature technology and will not be described in detail here.

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

[0024] It should be clear that sending data (that is, the current target data packet) is a mature technology and will not be described in detail here.

[0025] Step S05: the data receiving device receives the current target data packet.

[0026] It should be clear that receiving data (ie, the current target data packet) is also a mature technology and will not be described in detail here.

[0027] Step S06: if the sent current target data packet meets the preset condition, a current synchronization information packet is generated based on the current target data packet.

[0028] As can be seen from the background technology, in the prior art, the synchronization information packets and the target data packets correspond one to one, that is, the number of synchronization information packets is equal to the number of each target data packet. In the application scenario where the number of target data packets is large, the number of synchronization information packets will be large, thereby increasing the hardware consumption of data transmission. In order to reduce the number of synchronization information packets, in an embodiment of the present application, only the target data packets that meet the preset conditions will generate corresponding synchronization information packets, and the target data packets that do not meet the preset conditions will not generate corresponding synchronization information packets. In other words, in an embodiment of the present application, the number of synchronization information packets must be less than the number of target data packets.

[0029] It is understandable that the data sending device and the data receiving device in the embodiment of the present application can also be used only for sending and receiving synchronization information packets, but not 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 respectively through different sending ports, and in the corresponding receiving end device, the target data packet and the synchronization information packet can also be received respectively through different receiving ports.

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

[0031] Example 1 of Preset Conditions In this embodiment, if the current target data packet is the target data packet with the earliest sending 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 last sending sequence number among all target data packets (hereinafter referred to as the second target data packet), then it is determined that the current target data packet meets the preset conditions. That is to say, in the embodiment of the present application, after the data sending device receives the read command, it 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 means that the data transmission has started; if the synchronization information packet corresponding to the second target data packet is received, it means that the data transmission has ended.

[0032] Example 2 of Preset Conditions In an application scenario where the number of target data packets is large (e.g., hundreds of thousands or millions), if synchronization information packets are only generated for the first target data packet and the second target data packet, other target data packets between the first target data packet and the second target data packet cannot be monitored. In other words, if other target data packets between the first target data packet and the second target data packet have transmission anomalies, the anomalies cannot be detected in time.

[0033] In order to be able to timely monitor whether the transmission of some target data packets other than the first and last target data packets is abnormal in the application scenario where the number of target data packets is large, in the present embodiment, 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 equal to a positive integer multiple of the preset value, then the current target data packet is determined to meet the preset conditions; the preset value is a positive integer greater than or equal to 2.

[0034] It is easy to understand that, assuming that based on a read command, n target data packets need to be transmitted from a data sending device to a data receiving device, and the preset value is x; wherein 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 [n / x] synchronization information packets need to be generated and sent, wherein [ ] represents the smallest positive integer for the value in the brackets. Compared with the prior art in which n target data packets need to generate n synchronization information packets, the embodiments of the present application can significantly reduce the number of synchronization information packets generated and transmitted, that is, it can reduce the hardware consumption during data transmission.

[0035] In a specific embodiment of the present application, assuming that based on a read command, 12800 target data packets need to be transmitted from a data sending device to a data receiving device, if the preset value is 2, only 6400 (excluding the synchronization information packets corresponding to the first and last target data packets) synchronization information packets need to be generated; if the preset value is 128, only 100 (excluding the synchronization information packets corresponding to the first and last target data packets) synchronization information packets need to be generated, and so on. It is easy to understand that if the preset value is 128, after receiving the 128th target data packet, if the data receiving device does not receive or receives in advance the synchronization information packet corresponding to the 128th target data packet, then the transmission of the 1st to 128th target data packets must have been abnormal. 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 the transmission of the 129th to 256th target data packets must have been abnormal, and so on. That is to say, this embodiment is applicable to application scenarios with a large number of target data packets, and when problems occur in the transmission of target data packets, the transmission anomaly can be discovered in time and the scope of the transmission anomaly can be locked.

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

[0037] In the embodiments of the present application, the preset value may be any suitable value. For example, the preset value may 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 the application scenario with more target data packets, the number of synchronization information packets is still large, so that the hardware consumption during data transmission is still high; 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 the application scenario with fewer target data packets, the number of synchronization information packets is too small, and other target data packets between the first target data packet and the second target data packet cannot be monitored.

[0038] In order to make the preset value applicable to both application scenarios with more target data packets and application scenarios with fewer target data packets, in an embodiment of the present application, the preset value can be a dynamic value. That is to say, the preset value can be in direct proportion to the number of target data packets. Assuming that based on a read command, n target data packets need to be transmitted from a data sending device to a data receiving device, the preset value can be [n / k], where [ ] represents the smallest positive integer for the data in brackets, where 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. At this point, the second embodiment of the preset condition has been fully introduced.

[0039] It should be noted that in the embodiments of the present application, corresponding synchronization information packets can be generated based only on the first and last target data packets of each target data packet as described in the first embodiment of the preset conditions, so as 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 based only on other target data packets between the first and last target data packets of each target data packet as described in the second embodiment of the preset conditions, so as 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 based on both the first and last target data packets of each target data packet and the other target data packets between the first and last target data packets of each target data packet, so as to monitor the data transmission process and determine whether the data transmission process is abnormal.

[0040] As can be seen from the foregoing, the synchronization information packet is for a more detailed understanding of the operating status of the on-chip network. That is to say, in an embodiment of the present application, the synchronization information packet may 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 in each target data packet. It is easy to understand that, assuming that 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 the sending of m target data has been completed. If the data receiving device receives the current synchronization information packet with a sending sequence number of m, it means that the reception of m target data has been completed. In other words, in this embodiment, the transmission progress of the on-chip network data can be at least understood through the sending sequence number in the current synchronization information packet.

[0041] It is easy to understand that in the embodiments of the present application, a character string of multiple characters can be used in the current synchronization information packet to represent the actual sending sequence number of the current synchronization information packet. If a character string of multiple characters is used to represent the actual sending sequence number of the current synchronization information packet, the character string will be longer in application scenarios with more target data packets, and the character string will be shorter in application scenarios with fewer target data packets. In other words, the number of characters in the character string will be inconsistent in different application scenarios. It is easy to understand that if the number of characters in the character string is not uniform, it is difficult for the data sending device to accurately generate a synchronization information packet with the sending sequence number of the target data packet, and it is also difficult for the data receiving device to read the sending sequence number of the corresponding target data packet based on the synchronization information packet.

[0042] In order to facilitate the data sending device to generate a synchronization information packet and also facilitate the data receiving device to read the sending sequence number information in the synchronization information packet, in one embodiment of the present application, the current synchronization information packet at least includes a head mark and a tail mark. The data sending device is used to set the head mark to 1 if the current target data packet is the target data packet with the first sending sequence number among each target data packet (that is, the first target data packet), otherwise, it is set to 0; if the current target data packet is the target data packet with the last sending sequence number among each target data packet (that is, the second target data packet), the tail mark is set to 1, otherwise, it is set to 0. It is easy to understand that if the subsequent data receiving device reads a synchronization information packet with a head mark of 1, the target data packet corresponding to the synchronization information packet must be the target data packet with the first sending sequence number among each target data packet (that is, the first target data packet), that is, this data transmission has begun; if the subsequent data receiving device reads a synchronization information packet with a tail mark of 1, the target data packet corresponding to the synchronization information packet must be the target data packet with the last sending sequence number among each target data packet (that is, the second target data packet), that is, this data transmission has ended.

[0043] It should be clear that in this embodiment, by setting the first mark and the tail mark, the first target data packet and the second target data packet in each target data packet can be identified by a character string of two characters. In other words, the character length of the character string used to represent the sending sequence number of the first target data packet and the second target data packet in the synchronization information packet corresponding to the first target data packet and the second target data packet in this embodiment is not affected by the number of each target data packet, and it only needs two characters. It is easy to understand that compared with generating a character string with a non-fixed character length, the difficulty of generating and reading the character string with a fixed character length is also reduced.

[0044] Furthermore, in order to facilitate the data sending device to generate a synchronization information packet and also facilitate the data receiving device to read the sending sequence number information in the synchronization information packet, in one embodiment of the present application, the current synchronization information packet also includes an intermediate mark. The data sending device is also used to set the intermediate mark to 1 if the sending sequence number of the current target data packet is equal to a positive integer multiple of the preset value, otherwise, it is set 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 mark 1, it means that the transmission of y×i target data packets has been completed. That is to say, in the embodiment of the present application, only three character strings (i.e., the first mark, the middle mark, and the tail mark) are required at most to complete the transmission of the sending sequence numbers of all target data packets, which will not be described in detail here.

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

[0046] It should be clear that sending data (ie, the current synchronization information packet) is a mature technology and will not be described in detail here.

[0047] Step S08: the data receiving device receives the current synchronization information packet.

[0048] It should be clear that receiving data (ie, the current synchronization information packet) is also a mature technology and will not be described in detail here.

[0049] 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.

[0050] In the embodiment 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 means that the data transmission must be abnormal, and the abnormal reason may be that the read command transmission is blocked, or an erroneous 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 means that the data sending device is likely to generate an abnormal synchronization information packet or generate packet loss, etc.

[0051] In an embodiment of the present application, in order to facilitate identification of a target data packet that uniquely corresponds to a synchronization information packet, the target data packet and the synchronization information packet may be the same data packet, that is, the synchronization information described above (for example, the sending sequence number described above or the operation code described below, etc.) may 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 may set the sending order of the synchronization information packet to after or before the corresponding target data packet, and the sending order of the synchronization information packet and the corresponding target data packet are adjacent. In order to avoid redundancy, the present application only takes the application scenario in which the sending order of the synchronization information packet is set to after the corresponding target data packet as an example to illustrate the various embodiments in the present application.

[0052] In this embodiment, under 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 mark in the received synchronization information packet is 0, it means that the data transmission must be abnormal. If the data receiving device receives the last target data packet sent by the data sending device, and the tail mark in the received synchronization information packet is 0, it means that the data transmission must be abnormal.

[0053] In the embodiment of the present application, a first counter and a second counter may be set in the data receiving device, the first counter being used to accumulate the number of target data packets sent by the data sending device after the data receiving device issues a read command; the second counter being used to accumulate the number of synchronization information packets with an intermediate mark of 1 sent by the data sending device after the data receiving device issues a read command. It is easy to understand that if there is no abnormality during the transmission of each target data packet, the following formula must be satisfied: F=y×i Among them, y represents a preset value; F represents the cumulative value of the first counter; i represents the cumulative value of the second counter. That is to say, if F is equal to y×i, the transmission of the (i-1)×y+1 to y×i target data packets is highly likely to be normal; if F is not equal to y×i, the transmission of the (i-1)×y+1 to y×i target data packets must have produced an abnormality. In an embodiment of the present application, if a synchronization information packet with a tail mark of 1 is received, it means that the entire data transmission has been completed, and the cumulative value of the first counter is equal to the total number of target data packets in the command symbol, and the above formula is always satisfied during the transmission process, which means that there is no abnormality in the entire data transmission process. If a synchronization information packet with a tail mark of 1 is received, the first counter and the second counter can be reset.

[0054] In the embodiment of the present application, the synchronization information packet may further include an operation code, and the operation code is used to indicate the type of the corresponding target data packet and the operation that the target data packet is used to perform. Since the operation code is a mature technology, it will not be described in detail here.

[0055] In an embodiment of the present application, the synchronization information packet may further include a tracking number, which is an independent number carried by the descriptor and written into the synchronization information packet. This number will not change in any DMA transfer, and this number will not be the same in any two DMA transfers. It is a distinguishing mark between independent DMA transfers. The tracking number is at least used to indicate 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.

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

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

[0058] It can be understood that during the data transmission process of the embodiment of the present application, several target data packets will be received in the time period between the receipt of two synchronization information packets. If it can be determined based on the subsequent synchronization information packet that there is no abnormality in the data transmission in this time period, then the several target data packets in this time period can be written to the corresponding destination address.

[0059] It should be clear that writing data to a target address is a mature technology and will not be described in detail here.

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

[0061] 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. Figure 2 As shown, the data sending device 10 includes: The first data transceiver module 11 is used to receive a read command; the read command is obtained by the data receiving device 20 based on the 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, sending a current target data packet to the data receiving device 20; the current target data packet is any one of the target data packets; The first data processing module 12 is used to generate a current synchronization information packet based on the current target data packet if the current target data packet meets the preset conditions; the current synchronization information packet at least includes the sending sequence number of the current target data packet in each target data packet; the number of synchronization information packets is less than the number of target data packets; 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 the data transmission is abnormal based on the current synchronization information packet.

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

[0063] As a specific embodiment of the present application, the current synchronization information packet includes at least a head mark and a tail mark; the first data processing module 12 is also used to set the head mark to 1 if the current target data packet is the target data packet with the earliest sending sequence number among all target data packets, otherwise, it is set to 0; if the current target data packet is the target data packet with the last sending sequence number among all target data packets, the tail mark is set to 1, otherwise, it is set to 0.

[0064] As a specific embodiment of the present application, the first data processing module 12 is also used to determine that the current target data packet meets the preset conditions if the number 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; the preset value is a positive integer greater than or equal to 2.

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

[0066] In the embodiment of the present application, the data sending device generates a corresponding synchronization information packet for a target data packet that meets the preset conditions. Compared with the one-to-one generation method of the target data packet and the synchronization information packet in the prior art, the number of each synchronization information packet in the present application is significantly smaller than the number of each target data packet. In other words, 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.

[0067] 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. Figure 3 As shown, the data receiving device 20 includes: The second data processing module 22 is used to generate a read command based on the 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; The second data transceiver module 21 is used to send the read command to the data sending device 10, so that the data sending device 10 can send each target data packet to the data receiving device 20 in sequence based on the read command; and, for 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 10 based on the current target data packet that meets the preset conditions; the current synchronization information packet at least includes the sending sequence number of the current target data packet in each target data packet; the number of synchronization information packets is less than the number of target data packets; 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.

[0068] As a specific embodiment of the present application, the current synchronization information packet at least includes a head mark and a tail mark; the head mark and the tail mark are determined by the data sending device 10 according to the sending sequence number of the current target data packet in each target data packet; The first mark is 1 or 0; wherein, when the first mark is 1, it indicates that the corresponding current target data packet is the target data packet with the first transmission sequence number among all target data packets; when the first mark is 0, it indicates that the corresponding current target data packet is not the target data packet with the first transmission sequence number among all target data packets; The tail mark is 1 or 0; wherein, when the tail mark is 1, it indicates that the corresponding current target data packet is the target data packet with the last sending sequence number among all target data packets; when the tail mark is 0, it indicates that the corresponding current target data packet is not the target data packet with the last sending sequence number among all target data packets.

[0069] As a specific embodiment of the present application, the second data processing module 22 is also used to determine that the 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 first mark in the synchronization information packet corresponding to the target data packet with the earliest sending sequence number in each target data packet is 0; or, the tail mark in the synchronization information packet corresponding to the target data packet with the latest sending sequence number in each target data packet is 0.

[0070] As a specific embodiment of the present application, the current synchronization information packet further includes an intermediate mark; the intermediate mark is determined by the data sending device 10 according to the sending sequence number of the current target data packet in each target data packet; The intermediate mark is 1 or 0; when the intermediate mark is 1, it indicates that the corresponding sending sequence number of the current target data packet is equal to a positive integer multiple of the preset value; when the intermediate mark is 0, it indicates that the corresponding sending sequence number of the current target data packet is not equal to a positive integer multiple of the preset value; the preset value is a positive integer greater than or equal to 2.

[0071] As a specific embodiment of the present application, the second data processing module 22 is also used to determine that the data transmission is abnormal if the sending sequence number of the target data packet is equal to a positive integer multiple of the preset value, and the middle mark in the synchronization information packet corresponding to the target data packet is 0.

[0072] In the embodiment of the present application, the data receiving device generates a corresponding synchronization information packet for a target data packet that meets the preset conditions. Compared with the one-to-one generation method of the target data packet and the synchronization information packet in the prior art, the number of each synchronization information packet in the present application is significantly smaller than the number of each target data packet. In other words, 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.

[0073] After introducing a data receiving device proposed in an embodiment of the present application, the following introduces a data transmission device proposed in the present application, such as Figure 4 As shown, the data transmission device 1 includes: The data receiving device 20 is used to generate 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; and, used to send the read command to the data sending device 10; The data sending device 10 is used to receive a read command; And, based on the read command, sending a current target data packet to the data receiving device 20; the current target data packet is any one of the target data packets; And, if the current target data packet sent meets the preset conditions, a current synchronization information packet is generated 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 in each target data packet; the number of synchronization information packets is less than the number of target data packets; and, sending the current synchronization information packet to the data receiving device 20; The data receiving device 20 is also used to receive the current target data packet and the current synchronization information packet; And, based on the current synchronization information packet and each received target data packet, it is determined whether the data transmission is abnormal.

[0074] As a specific embodiment of the present application, the data sending device 10 is also used to determine that the current target data packet meets the preset conditions if the current target data packet is the target data packet with the earliest sending sequence number among all target data packets or the current target data packet is the target data packet with the latest sending sequence number among all target data packets.

[0075] As a specific embodiment of the present application, the current synchronization information packet at least includes a head mark and a tail mark; The data sending device 10 is further configured to set the head flag to 1 if the current target data packet is the target data packet with the first sending sequence number among the target data packets, otherwise, to 0; if the current target data packet is the target data packet with the last sending sequence number among the target data packets, then set the tail flag to 1, otherwise, to 0; The data receiving device 20 is also used 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 first mark in the synchronization information packet corresponding to the target data packet with the earliest sending sequence number in each target data packet is 0; or, the tail mark in the synchronization information packet corresponding to the target data packet with the latest sending sequence number in each target data packet is 0.

[0076] As a specific embodiment of the present application, the data sending device 10 is also used to determine that the current target data packet meets the preset conditions if the number 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; the preset value is a positive integer greater than or equal to 2.

[0077] As a specific embodiment of the present application, the current synchronization information packet further includes an intermediate marker; The data sending device 10 is further configured to set the intermediate flag to 1 if the sending sequence number of the current target data packet is equal to a positive integer multiple of the preset value, and to set the intermediate flag to 0 otherwise; The data receiving device 20 is further configured to determine that data transmission is abnormal if the sending sequence number of the target data packet is equal to a positive integer multiple of the preset value and the middle mark in the synchronization information packet corresponding to the target data packet is 0.

[0078] In the embodiment of the present application, the data transmission device generates a corresponding synchronization information packet for a target data packet that meets the preset conditions. Compared with the one-to-one generation method of the target data packet and the synchronization information packet in the prior art, the number of each synchronization information packet in the present application is significantly smaller than the number of each target data packet. In other words, the data transmission device proposed in the present application can significantly reduce the number of synchronization information packets in the application scenario with a large number of target data packets, that is, significantly reduce the hardware consumption during data transmission.

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

[0080] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0081] 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 aforementioned method embodiments and will not be repeated here.

[0082] In the 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 only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

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

[0084] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. 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.

[0085] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0086] The computer program product includes one or more computer instructions. When the computer program is loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means to another website site, computer, server, or data center. 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 a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0087] The technical solutions provided in the embodiments of the present application are introduced in detail above. The principles and implementation methods of the embodiments of the present application are explained by using specific examples in the embodiments of the present application. The description of the above embodiments is only used to help understand the methods and core ideas of the embodiments of the present application. At the same time, for those skilled in the art, according to the ideas of the embodiments of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the embodiments of the present application.

Claims

1. A data sending device, characterized in that: include: A first data transceiver module, used for receiving a read command; The read command is obtained by the data receiving device based on the 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, sending a 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 current target data packet being sent meets a preset condition; the current synchronization information packet at least includes a sending sequence number of the current target data packet in each target data packet; and the number of synchronization information packets is less than the number of target data packets; The first data transceiver module is further used to send the current synchronization information packet to the data receiving device, so that the data receiving device can determine whether the data transmission is abnormal based on the current synchronization information packet.

2. The data transmission device according to claim 1, characterized in that: The first data processing module is also used to determine that the current target data packet meets the preset conditions if the current target data packet is the target data packet with the earliest sending sequence number among all target data packets or the current target data packet is the target data packet with the latest sending sequence number among all target data packets.

3. The data transmission device according to claim 2, characterized in that: The current synchronization information packet at least includes a head mark and a tail mark; the first data processing module is further used to set the head mark to 1 if the current target data packet is the target data packet with the first 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 last sending sequence number among all target data packets, the tail flag is set to 1, otherwise, it is set to 0.

4. The data transmission device according to any one of claims 1 to 3, characterized in that: The first data processing module is also used to determine that the current target data packet meets the preset conditions if the number 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; the preset value is a positive integer greater than or equal to 2.

5. The data transmission device according to claim 4, characterized in that: The current synchronization information packet also includes an intermediate mark; if the sending sequence number of the current target data packet is equal to a positive integer multiple of the preset value, the intermediate mark is set to 1, otherwise, it is set to 0.

6. A data receiving device, characterized in that: include: A second data processing module is used to generate a read command based on the descriptor; the descriptor is acquired 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 is used to send the read command to the data sending device, so that the data sending device can send each target data packet to the data receiving device in sequence based on the read command; and, for 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 the current target data packet that meets the preset conditions; the current synchronization information packet at least includes the sending sequence number of the current target data packet in each target data packet; the number of synchronization information packets is less than the number of target data packets; The second data processing module is further used to determine whether the data transmission is abnormal based on the current synchronization information packet and each received target data packet.

7. The data receiving device according to claim 6, characterized in that: The current synchronization information packet at least includes a head mark and a tail mark; the head mark and the tail mark are determined by the data sending device according to the sending sequence number of the current target data packet in each target data packet; The first mark is 1 or 0; wherein, when the first mark is 1, it indicates that the corresponding current target data packet is the target data packet with the first transmission sequence number among all target data packets; when the first mark is 0, it indicates that the corresponding current target data packet is not the target data packet with the first transmission sequence number among all target data packets; The tail mark is 1 or 0; wherein, when the tail mark is 1, it indicates that the corresponding current target data packet is the target data packet with the last sending sequence number among all target data packets; when the tail mark is 0, it indicates that the corresponding current target data packet is not the target data packet with the last sending sequence number among all target data packets.

8. The data receiving device according to claim 7, characterized in that: The second data processing module is also used 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 first mark in the synchronization information packet corresponding to the target data packet with the earliest sending sequence number among each target data packet is 0; or, the tail mark in the synchronization information packet corresponding to the target data packet with the latest sending sequence number among each target data packet is 0.

9. The data receiving device according to any one of claims 6 to 8, characterized in that: The current synchronization information packet also includes an intermediate mark; the intermediate mark is determined by the data sending device according to the sending sequence number of the current target data packet in each target data packet; The intermediate mark is 1 or 0; when the intermediate mark is 1, it indicates that the corresponding sending sequence number of the current target data packet is equal to a positive integer multiple of the preset value; when the intermediate mark is 0, it indicates that the corresponding sending sequence number of the current target data packet is not equal to a positive integer multiple of the preset value; the preset value is a positive integer greater than or equal to 2.

10. The data receiving device according to claim 9, characterized in that: The second data processing module is further configured to determine that data transmission is abnormal if the sending sequence number of the target data packet is equal to a positive integer multiple of the preset value and the middle mark in the synchronization information packet corresponding to the target data packet is 0.

11. A data transmission method, applied to a data sending device, characterized in that: The method comprises: Receive a read command; the read command is obtained by the data receiving device based on the descriptor; the read command includes at least the source address, quantity and length of each target data packet to be read; Based on the read command, a current target data packet is sent to the data receiving device; the current target data packet is any one of the target data packets; If the current target data packet sent meets the preset conditions, a current synchronization information packet is generated 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 in each target data packet; the number of synchronization information packets is less than the number of target data packets; The current synchronization information packet is sent to the data receiving device, so that the data receiving device can determine whether the data transmission is abnormal based on the current synchronization information packet.

12. The data transmission method according to claim 11, characterized in that: 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, it is determined that the current target data packet meets the preset condition.

13. The data transmission method according to claim 12, characterized in that: The current synchronization information packet at least includes a head mark and a tail mark; the 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 first transmission sequence number among the target data packets, the first mark is set to 1 to generate the current synchronization information packet; otherwise, the first mark is set to 0 to generate the current synchronization information packet; If the current target data packet is the target data packet with the last sending sequence number among all target data packets, the tail mark is set to 1 to generate the current synchronization information packet; otherwise, the tail mark is set to 0 to generate the current synchronization information packet.

14. The data transmission method according to any one of claims 11 to 13, characterized in that: 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 equal to a positive integer multiple of the preset value, then 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.

15. The data transmission method according to claim 14, characterized in that: The current synchronization information packet also includes an intermediate mark; the generating of the current synchronization information packet based on the current target data packet also includes: If the sending sequence number of the current target data packet is equal to a positive integer multiple of the preset value, the intermediate mark is set to 1 to generate the current synchronization information packet; otherwise, the intermediate mark is set to 0 to generate the current synchronization information packet.

16. A data transmission method, applied to a data receiving device, characterized in that: The method comprises: Generate a read command based on the descriptor; the descriptor is acquired 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 send each target data packet to the data receiving device in sequence based on the read command; 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 the current target data packet that meets the preset conditions; the current synchronization information packet at least includes the sending sequence number of the current target data packet in each target data packet; the number of synchronization information packets is less than the number of target data packets; Based on the current synchronization information packet and each received target data packet, it is determined whether the data transmission is abnormal.

17. The data transmission method according to claim 16, characterized in that: The current synchronization information packet at least includes a head mark and a tail mark; 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 first transmission sequence number among the target data packets, the data sending device sets the first mark to 1 to generate the current synchronization information packet; otherwise, the data sending device sets the first mark to 0 to generate the current synchronization information packet; If the current target data packet is the target data packet with the last sending sequence number among all target data packets, the data sending device sets the tail mark to 1 to generate the current synchronization information packet; otherwise, the data sending device sets the tail mark to 0 to generate the current synchronization information packet.

18. The data transmission method according to claim 17, characterized in that: The 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 the target data packet is not received; or, the synchronization information packet is not received; or, the head mark in the synchronization information packet corresponding to the target data packet with the earliest sending sequence number among the target data packets is 0; or, the tail mark in the synchronization information packet corresponding to the target data packet with the latest sending sequence number among the target data packets is 0; then the data transmission is determined to be abnormal.

19. The data transmission method according to any one of claims 16 to 18, characterized in that: The current synchronization information packet also includes an intermediate marker; The current synchronization information packet is generated by the data sending device based on the current target data packet that meets the preset conditions, and also includes: If the sending sequence number of the current target data packet is equal to a positive integer multiple of a preset value, the data sending device sets the intermediate mark to 1 to generate a current synchronization information packet; otherwise, the data sending device sets the intermediate mark to 0 to generate a current synchronization information packet.

20. The data transmission method according to claim 19, characterized in that: The method of determining whether data transmission is abnormal based on the current synchronization information packet and each received target data packet also includes: if the sending sequence number of the target data packet is equal to a positive integer multiple of the preset value, and the middle mark in the synchronization information packet corresponding to the target data packet is 0, then determining that the data transmission is abnormal.

21. A data transmission device, characterized in that: include: A data receiving device, used for generating a read command based on the descriptor; The descriptor is pre-acquired; The read command at least includes the source address, quantity and length of each target data packet to be read; and, used for sending the read command to a data sending device; A data sending device, used for receiving a 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 the target data packets; And, if the current target data packet sent meets the preset condition, a current synchronization information packet is generated 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 in each target data packet; The number of synchronization packets is less than the number of target data packets; and, sending the current synchronization information packet to the data receiving device; The data receiving device is also used to receive the current target data packet and the current synchronization information packet; And, based on the current synchronization information packet and each received target data packet, it is determined whether the data transmission is abnormal.

22. The data transmission device according to claim 21, characterized in that: The data sending device is also used to determine that the current target data packet meets the preset conditions if the current target data packet is the target data packet with the earliest sending sequence number among all the target data packets or the current target data packet is the target data packet with the latest sending sequence number among all the target data packets.

23. The data transmission device according to claim 22, characterized in that: The current synchronization information packet at least includes a head mark and a tail mark; The data sending device is further used for setting the first flag to 1 if the current target data packet is the target data packet with the first sending sequence number among the target data packets, and setting it to 0 otherwise; If the current target data packet is the target data packet with the last sending sequence number among all target data packets, the tail flag is set to 1, otherwise, it is set to 0; The data receiving device is also used 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 mark in the synchronization information packet corresponding to the target data packet with the earliest sending sequence number among the target data packets is 0; or the tail mark in the synchronization information packet corresponding to the target data packet with the latest sending sequence number among the target data packets is 0.

24. The data transmission device according to any one of claims 21 to 23, characterized in that: The data sending device is also used to determine that the current target data packet meets the preset conditions if the number 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; the preset value is a positive integer greater than or equal to 2.

25. The data transmission device according to claim 24, characterized in that: The current synchronization information packet also includes an intermediate marker; The data sending device is further configured to set the intermediate flag to 1 if the sending sequence number of the current target data packet is equal to a positive integer multiple of the preset value, and to set the intermediate flag to 0 otherwise; The data receiving device is further configured to determine that data transmission is abnormal if the sending sequence number of the target data packet is equal to a positive integer multiple of the preset value and the middle mark in the synchronization information packet corresponding to the target data packet is 0.

26. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the data transmission method according to any one of claims 11 to 15 is implemented, or the data transmission method according to any one of claims 16 to 20 is implemented.

Citation Information

Patent Citations

  • Point to multiple point data allocation DMA controller realization method

    CN101334761A

  • Multi-core and multi-threading processor-based functional macropipeline implementing method

    CN102331923A

  • Data handling method, system and related device

    CN116339640A

  • Data transmission method and related device

    CN116614445A

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

    CN116996460A