Data transmission method and device, electronic equipment and storage medium

By using batch interval time and frame parameters based on flow control information during data transmission, the continuous frame data can be sent in batches at regular intervals, which solves the delay problem caused by waiting for the receiver to reply in the UDS protocol and improves the efficiency and orderliness of data transmission.

CN121125016APending Publication Date: 2025-12-12GUANGZHOU AUTOMOBILE GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511264315.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-04
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

In existing technologies, when using the UDS protocol for multi-frame data transmission, the time delay caused by waiting for the receiving end to reply with a flow control frame message affects data transmission efficiency and processing progress. This may cause the controller to refuse to process the diagnostic messages from the host computer, especially in time-sensitive diagnostic scenarios.

Method used

By acquiring the data to be transmitted, determining the first frame and subsequent frames, and based on the batch interval time and flow control frame parameters in the existing or newly added flow control information, the system can send the subsequent frames in batches at regular intervals, avoiding the time delay caused by waiting for a response from the receiving end.

Benefits of technology

It accelerates the transmission speed of continuous frame data, improves the overall data transmission efficiency, avoids data transmission timeout, and ensures the orderliness and efficiency of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121125016A_ABST
    Figure CN121125016A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data transmission method and device, electronic equipment and a storage medium, and the data transmission method is applied to a transmitting end, and comprises the steps: obtaining to-be-transmitted data, determining first frame data, at least one continuous frame data and a target transmission path according to the to-be-transmitted data, the target transmission path is a transmission path from the sending end to the receiving end; sending the first frame data to a receiving end; and when the target transmission path is an existing transmission path, obtaining existing flow control information corresponding to the target transmission path, and sending all continuous frame data to a receiving end based on batch interval time and flow control frame parameters in the existing flow control information. According to the invention, after the sending end sends the first frame data, the batch timing sending of the continuous frame data is automatically realized based on the reusable batch interval time and the flow control frame parameters in the existing flow control information, the transmission speed of the continuous frame data is accelerated, and the overall data transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data transmission technology, and in particular to a data transmission method, apparatus, electronic device, and storage medium. Background Technology

[0002] Unified Diagnostic Services (UDS) is a universal application-layer transport protocol for vehicles, widely used in scenarios such as over-the-air (OTA) software upgrades, fault detection, and end-of-life (EOL) electrical diagnostics. In existing technologies, during multi-frame data transmission using the UDS protocol, a flow control frame message must be received from the receiver before sending subsequent frames. This delay can lead to data transmission timeouts, impacting data transmission efficiency and data processing. For example, in time-sensitive diagnostic scenarios, data transmission timeouts can cause the controller to refuse to process diagnostic messages from the host computer, disrupting the normal diagnostic process. Summary of the Invention

[0003] This application provides a data transmission method, apparatus, electronic device, and storage medium, aiming to improve the problem of latency and reduced transmission efficiency in existing data transmission methods.

[0004] A data transmission method, comprising: Acquire the data to be transmitted, and determine the first frame data, at least one consecutive frame data, and the target transmission path based on the data to be transmitted, wherein the target transmission path is the transmission path between the sending end and the receiving end. The first frame of data is sent to the receiving end; When the target transmission path is an existing transmission path, the existing flow control information corresponding to the target transmission path is obtained, and based on the batch interval time and flow control frame parameters in the existing flow control information, all the continuous frame data is sent to the receiving end.

[0005] This embodiment acquires the data to be transmitted, determines the first frame and at least one consecutive frame based on the data, determines the target transmission path (the path between the sender and receiver), and sends the first frame to the receiver. If the target transmission path is an existing path, it acquires the existing flow control information corresponding to the target path. Based on the batch interval and flow control frame parameters in the existing flow control information, it sends all consecutive frame data to the receiver. In this embodiment, after sending the first frame, the sender automatically performs batch-based timed transmission of consecutive frame data based on the reusable batch interval and flow control frame parameters in the existing flow control information. This avoids the time delay caused by waiting for the receiver to reply with flow control frame parameters each time, thus accelerating the transmission speed of consecutive frame data and improving overall data transmission efficiency. Specifically, the sender uses the batch interval as a fixed waiting time between batches and the flow control frame parameters as control parameters within each batch, achieving precise control over the batch transmission of consecutive frame data.

[0006] Furthermore, after sending the first frame data to the receiving end, the process further includes: When the target transmission path is a new transmission path, the newly added flow control information fed back by the receiving end is obtained, and based on the batch interval time and flow control frame parameters in the newly added flow control information, all the continuous frame data is sent to the receiving end.

[0007] In this embodiment, when the target transmission path is a new transmission path, the sending end needs to obtain new flow control information based on the feedback from the receiving end regarding the first frame data. Based on the new flow control information, the continuous frame data can be automatically sent in batches at regular intervals, which can also speed up the transmission speed of continuous frame data and improve the overall data transmission efficiency.

[0008] Further, the step of sending all the consecutive frame data to the receiving end based on the batch interval time and flow control frame parameters in the existing flow control information includes: Based on the flow control frame parameters in the existing flow control information, determine the consecutive frame limit transmission amount and consecutive frame interval time; If the consecutive frame transmission limit is greater than zero, then when the first transmission waiting time reaches the batch interval time, the consecutive frame data corresponding to the consecutive frame transmission limit is sent to the receiving end in a batch according to the consecutive frame interval time, until all the consecutive frame data is sent; wherein, the first transmission waiting time is the waiting time after the first frame data is sent to the receiving end, or the waiting time between sending adjacent batches of consecutive frame data to the receiving end. If the number of consecutive frames to be sent is zero, then when the first sending waiting time reaches the batch interval time, all the consecutive frame data are sent to the receiving end according to the consecutive frame interval time.

[0009] In this embodiment, when the continuous frame transmission limit in the flow control frame parameters is greater than zero, the sending end continuously performs continuous frame interval transmission operations with the batch interval time as the transmission waiting time until the remaining number of untransmitted continuous frame data is zero, without waiting for a reply from the receiving end after transmitting the first frame data and each batch of continuous frame data. This embodiment can achieve continuous batch transmission of continuous frame data according to a fixed period, realizing continuous and smooth data transmission, effectively avoiding data transmission timeouts, and improving the orderliness and efficiency of data transmission. Furthermore, when the continuous frame transmission limit in the flow control frame parameters is equal to zero, the sending end uses the batch interval time as the transmission waiting time, transmitting all continuous frame data within the same batch according to the continuous frame interval time, without waiting for a reply from the receiving end after transmitting the first frame data before transmitting continuous frame data, thus improving data transmission efficiency.

[0010] Further, before obtaining the new flow control information fed back by the receiving end, the process includes: The first frame data is sent to the receiving end through the intermediate device. If the receiving end receives the first frame reception time, flow control frame reception time, and flow control frame parameters sent by the intermediate device, the batch interval time is determined based on the first frame reception time and the flow control frame reception time, and the new flow control information is generated based on the batch interval time and the flow control frame parameters. The first frame reception time refers to the time when the intermediate device receives the first frame data; the flow control frame parameters refer to the parameters sent by the receiving end to the intermediate device after receiving the first frame data, used to characterize data reception restrictions; and the flow control frame reception time refers to the time when the intermediate device receives the flow control frame parameters.

[0011] In this embodiment, during the process of the sending end transmitting the data to be transmitted to the receiving end for the first time, the batch interval time is determined according to the first frame reception time and the flow control frame reception time, and new flow control information is generated according to the batch interval time and the flow control frame parameters, providing a reusable control parameter basis for subsequent continuous frame data transmission and the next multi-frame data transmission.

[0012] Further, the step of sending all the consecutive frame data to the receiving end based on the batch interval time and flow control frame parameters in the newly added flow control information includes: Based on the flow control frame parameters in the newly added flow control information, determine the consecutive frame limit transmission amount and consecutive frame interval time; If the consecutive frame transmission limit is greater than zero, then the consecutive frame data corresponding to the consecutive frame transmission limit will be sent to the receiving end in a batch according to the consecutive frame interval time. If the remaining number of the unsent consecutive frame data is greater than zero, then when the second transmission waiting time reaches the batch interval time, the consecutive frame data corresponding to the consecutive frame transmission limit is sent to the receiving end in a batch according to the consecutive frame interval time, until all the consecutive frame data is sent; wherein, the second transmission waiting time is the waiting time between sending adjacent batches of consecutive frame data to the receiving end.

[0013] In this embodiment, during the process of the sending end transmitting the data to be transmitted to the receiving end for the first time, after generating new flow control information based on the batch interval time and flow control frame parameters, the first batch of continuous frame data is transmitted directly. At the same time, the new flow control information is used to realize the batch timed transmission of continuous frame data, which improves the overall data transmission efficiency.

[0014] Furthermore, after determining the continuous frame limit transmission amount and continuous frame interval time based on the flow control frame parameters in the newly added flow control information, the method further includes: If the number of consecutive frames to be sent is zero, then all the consecutive frame data are sent to the receiving end according to the consecutive frame interval.

[0015] In this embodiment, during the process of transmitting the data to be transmitted to the receiving end for the first time, the sending end generates new flow control information based on the batch interval time and flow control frame parameters, and then sends all consecutive frame data in the same batch according to the consecutive frame interval time, avoiding invalid waiting time judgment and improving the efficiency of data transmission.

[0016] Further, determining the first frame of data, at least one consecutive frame of data, and the target transmission path based on the data to be transmitted includes: When the length of the data to be transmitted is greater than a preset length threshold, the data to be transmitted is split according to a preset splitting rule to obtain the first frame data and at least one consecutive frame data. The target transmission path is determined based on the intermediate device identifier and the receiving end identifier in the data to be transmitted.

[0017] In this embodiment, the sending end splits data to be transmitted that is longer than a preset length threshold into a first frame and at least one consecutive frame. This ensures that each frame conforms to protocol requirements and guarantees successful data transmission. Simultaneously, it helps the sending end process consecutive frames in batches, improving data transmission speed and processing efficiency.

[0018] A data transmission device, comprising: The data acquisition module is used to acquire data to be transmitted, and determine the first frame data, at least one consecutive frame data and the target transmission path based on the data to be transmitted, wherein the target transmission path is the transmission path between the sending end and the receiving end. The first frame data sending module is used to send the first frame data to the receiving end; The continuous frame data transmission module is used to obtain existing flow control information corresponding to the target transmission path when the target transmission path is an existing transmission path, and send all the continuous frame data to the receiving end based on the batch interval time and flow control frame parameters in the existing flow control information.

[0019] An electronic device includes a processor and a memory, wherein, Memory, used to store computer programs; The processor is used to execute the program stored in the memory to implement the above data transfer method.

[0020] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described data transmission method. Attached Figure Description

[0021] Figure 1 This is a flowchart of a data transmission method provided in an embodiment of this application; Figure 2 This is an interaction diagram of a data transmission method provided in an embodiment of this application; Figure 3 This is a flowchart illustrating step S102 of a data transmission method provided in an embodiment of this application; Figure 4 This is a flowchart illustrating step S103 of a data transmission method provided in an embodiment of this application; Figure 5 This is a flowchart illustrating step S301 of a data transmission method provided in an embodiment of this application; Figure 6 This is another flowchart illustrating step S301 in a data transmission method provided in an embodiment of this application; Figure 7 This is a flowchart illustrating step S601 of a data transmission method provided in an embodiment of this application; Figure 8 This is a flowchart illustrating step S101 of a data transmission method provided in an embodiment of this application; Figure 9 This is a structural diagram of the data transmission device provided in the embodiments of this application; Figure 10 This is a structural diagram of the electronic device provided in the embodiments of this application. Detailed Implementation

[0022] To make the technical problems, technical solutions, and beneficial effects solved by this application clearer, the following detailed description is provided in conjunction with embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0023] Terminology Explanation In the data transmission method implemented in this application, the sending end, intermediate device, and receiving end form a data transmission path. The sending end and intermediate device are connected, and the intermediate device and receiving end are also connected. The sending end first sends the data to be transmitted to the intermediate device, which then sends the data to the receiving end. Specifically, in a vehicle diagnostic scenario, the sending end is a host computer, the intermediate device is a bus device, and the receiving end is the device under test (DUT). Specifically, the host computer can be a vehicle diagnostic computer, and the DUT can be a control unit in the vehicle used to implement specific functions, such as an engine control unit, battery management unit, or a body control unit that controls headlights, windows, wipers, etc. The host computer transmits data to the DUT through a bus device interface (such as CAN, LIN, Ethernet, etc.), and the DUT receives, processes, and responds to diagnostic requests from the host computer (vehicle diagnostic computer).

[0024] In this application, the data to be transmitted refers to the data that needs to be transmitted from the sending end to the receiving end. The preset length threshold is a pre-defined critical value for determining whether the data to be transmitted can be transmitted in a single frame. When the data length of the data to be transmitted is less than or equal to the preset length threshold, the sending end sends the data to be transmitted to the receiving end in a single frame via an intermediate device. When the data length of the data to be transmitted is greater than the preset length threshold, the sending end sends the data to be transmitted in multiple frames via an intermediate device in batches. When transmitting in multiple frames, the sending end splits the data to be transmitted into a first frame and at least one consecutive frame according to a preset splitting rule. The preset splitting rule is a pre-defined criterion for splitting the data to be transmitted according to its length. The first frame refers to the first data frame in a multi-frame transmission, which includes the total data length information of the data to be transmitted (FF_DL field). Consecutive frame data refers to the subsequent data frames in a multi-frame transmission, excluding the first data frame, and each consecutive frame includes its own consecutive frame sequence number information (SN field).

[0025] In this application, the target transmission path refers to the transmission path of the data to be transmitted from the sending end to the receiving end, that is, the data transmission path composed of a specified sending end, intermediate device, and receiving end. After a communication connection is established between the sending end and the intermediate device, and between the intermediate device and the receiving end, the sending end needs to transmit data generated at different times to the receiving end along the target transmission path, thereby triggering the process of multiple data transmission methods. An existing transmission path refers to a transmission path in which the sending end, intermediate device, and receiving end have already completed data transmission processes. A new transmission path refers to a transmission path in which the sending end, intermediate device, and receiving end have not yet completed data transmission processes.

[0026] New flow control information refers to the parameter information recorded by the sending end during the initial transmission of data to the receiving end, used to control the batch-timed transmission of continuous frame data. This new flow control information can be used as existing flow control information for subsequent data transmissions from the sending end to the receiving end. Existing flow control information refers to the parameter information used to control the batch-timed transmission of continuous frame data, which can be repeatedly invoked during the transmission of data from the sending end to the receiving end. When the communication connection between the sending end and the intermediate device, or between the intermediate device and the receiving end, is lost, the sending end will clear the existing flow control information.

[0027] Existing flow control information includes batch interval time and flow control frame parameters. The batch interval time refers to the specified interval between batches of consecutive frame data sent by the sending end to the receiving end. Flow control frame parameters are limiting parameters used to characterize the receiving end's ability to receive consecutive frame data from the same batch. During the initial transmission of data to the receiving end, the sending end sends the first frame of data to an intermediate device. The intermediate device records the first frame reception time and sends the received first frame of data to the receiving end. After receiving the first frame of data, the receiving end generates flow control frame parameters and sends them to the intermediate device. Upon receiving the flow control frame parameters, the intermediate device records the flow control frame reception time and sends the first frame reception time, the flow control frame reception time, and the flow control frame parameters to the sending end. The sending end uses the difference between the first frame reception time and the flow control frame reception time as the batch interval time and generates new flow control information based on the batch interval time and the flow control frame parameters. The first frame reception time refers to the time when the intermediate device receives the first frame of data, denoted by Tsf. The flow control frame reception time refers to the time when the intermediate device receives the flow control frame parameters, denoted by Tfl. The batch interval time is specifically the time difference between the first frame reception time and the flow control frame reception time corresponding to the intermediate device, denoted by Tn, i.e., Tn = Tfl - Tsf. Flow control frame parameters refer to the parameters sent by the receiving end to the intermediate device after receiving the first frame of data, used to characterize data reception limitations; that is, the receiving end's reception capability parameters for consecutive frames in the same batch. Flow control frame parameters include the consecutive frame transmission limit and the consecutive frame interval time. The consecutive frame transmission limit refers to the maximum number of consecutive frames of data that the receiving end can receive in a batch, i.e., the maximum number of consecutive frames of data that the sending end can send in the same batch, denoted by BS. The consecutive frame transmission limit can be a positive integer or zero. The consecutive frame interval time refers to the minimum interval time when the sending end sends multiple consecutive frames of data in the same batch, i.e., the interval time between adjacent consecutive frames of data in the same batch, denoted by TStmin.

[0028] The transmission latency refers to the waiting time between the start of a batch of consecutive frame data by the sending end and the end of the last transmission of the first frame or consecutive frame data. The first transmission latency is the waiting time after sending the first frame data to the receiving end when the target transmission path is an existing transmission path, or the waiting time between sending adjacent batches of consecutive frame data to the receiving end. The second transmission latency is the waiting time between sending adjacent batches of consecutive frame data to the receiving end when the target transmission path is a new transmission path.

[0029] Please refer to Figure 2The sending end sends the first frame of data to the intermediate device, which then sends the received first frame of data to the receiving end. Upon receiving the first frame, the receiving end generates flow control frame parameters and sends them to the intermediate device. The intermediate device, upon receiving the flow control frame parameters, sends them back to the sending end. After receiving the flow control frame parameters, the sending end sends the data to be transmitted to the receiving end in batches through the intermediate device. Here, T1 represents the time elapsed since the sending end sent the data to the intermediate device, T2 represents the time elapsed since the intermediate device sent the data to the receiving end, Tecu represents the time elapsed since the receiving end processed the data, T3 represents the time elapsed since the receiving end sent the data to the intermediate device, and T4 represents the time elapsed since the intermediate device sent the data to the sending end. The time elapsed from sending the first frame of data to receiving the flow control frame parameters is T1 + T2 + Tecu + T3 + T4. According to the current data transmission method, after sending the previous batch of consecutive frames of data to the receiving end, the sending end still needs to wait for the receiving end to reply with the flow control frame parameters before it can send the next batch of consecutive frames of data. That is, according to the existing data transmission method, in the process of the sending end transmitting data to the receiving end each time, the waiting time between the sending end transmitting the first frame of data and the first batch of consecutive frames of data, as well as between two adjacent batches of consecutive frames of data, is "T1+T2+Tecu+T3+T4".

[0030] In this application, existing flow control information can be repeatedly invoked. The batch interval time in the existing flow control information is specifically the time difference between the first frame reception time and the flow control frame reception time corresponding to the intermediate device, i.e., the batch interval time is T2+Tecu+T3. T1 and T4 are delays related to the sending end program design, while "T2+Tecu+T3" is a relatively fixed delay determined by the intermediate device and the receiving end. Therefore, this application uses "T2+Tecu+T3" as a fixed transmission waiting time, no longer specifically considering the delay of the receiving end's response, thus optimizing the time synchronization problem. According to the data transmission method of this application, during the process of the sending end transmitting the data to be transmitted to the receiving end for the first time, the waiting time between the sending end transmitting the first frame data and the first batch of consecutive frame data is "T1+T2+Tecu+T3+T4", and the waiting time between subsequent adjacent batches of consecutive frame data is "T2+Tecu+T3". Furthermore, in each subsequent transmission of data to the receiver after the first transmission, the waiting time between the first frame and the first batch of consecutive frames, as well as between two adjacent batches of consecutive frames, is "T2 + Tecu + T3". Therefore, this application, based on the reusable batch interval time and flow control frame parameters in existing flow control information, automatically implements batch-based timed transmission of subsequent consecutive frames, avoiding the time delay caused by waiting for the receiver to reply with flow control frame parameters each time, thus accelerating the transmission speed of consecutive frame data and improving the overall data transmission efficiency.

[0031] This application provides a data transmission method, which is illustrated using an example of the method being applied to a sending end in a data transmission path. Please refer to [link / reference needed]. Figure 1 This includes the following steps: S101: Obtain the data to be transmitted, and determine the first frame data, at least one consecutive frame data and the target transmission path based on the data to be transmitted, wherein the target transmission path is the transmission path between the sending end and the receiving end. S102: Send the first frame data to the receiving end; S103: When the target transmission path is an existing transmission path, obtain the existing flow control information corresponding to the target transmission path, and send all the continuous frame data to the receiving end based on the batch interval time and flow control frame parameters in the existing flow control information.

[0032] Understandably, the sending end acquires the data to be transmitted. When the data cannot be transmitted in a single frame, it splits the data into a first frame and at least one consecutive frame. The data to be transmitted also includes an intermediate device identifier and a receiver identifier. The sending end determines the designated intermediate device based on the intermediate device identifier and the designated receiver based on the receiver identifier. Based on the sending end, the designated intermediate device, and the receiver, a target transmission path is determined. The sending end sends the first frame to the intermediate device, and the intermediate device sends the received first frame to the receiver, completing the transmission of the first frame. After sending the first frame, if the sending end determines that the target transmission path is an existing path, it indicates that the sending end has previously completed the process of transmitting the data to the receiver, meaning it is not the first time the sending end has transmitted the data to the receiver. Therefore, the sending end must have recorded existing flow control information corresponding to the target transmission path. At this point, the sending end extracts the batch interval time and flow control frame parameters from the existing flow control information. The batch interval time is used as the waiting time between batches, and the flow control frame parameters are used as the control parameters within a batch, thus enabling all consecutive frames to be transmitted to the receiver via the intermediate device.

[0033] Specifically, starting from sending the first frame of data, when the waiting time reaches the batch interval, the sending end selects the first batch of consecutive frame data from all consecutive frame data according to the flow control frame parameters, and sends the first batch of consecutive frame data to the receiving end through an intermediate device. After sending the first batch of consecutive frame data, if there are still consecutive frame data that have not yet been sent, the sending end continues to select the next batch of consecutive frame data from all consecutive frame data according to the flow control frame parameters when the waiting time reaches the batch interval, and sends the next batch of consecutive frame data to the receiving end through an intermediate device, until all consecutive frame data has been sent.

[0034] In this embodiment, after sending the first frame of data, the sending end automatically performs batch-based timed transmission of continuous frame data based on the reusable batch interval time and flow control frame parameters in the existing flow control information. This avoids the time delay caused by waiting for the receiving end to reply with flow control frame parameters each time, thus accelerating the transmission speed of continuous frame data and improving the overall data transmission efficiency. Specifically, the sending end uses the batch interval time as a fixed waiting time between batches and the flow control frame parameters as control parameters within each batch, achieving precise control over the batch-based transmission of continuous frame data.

[0035] In one embodiment, in step S102, please refer to... Figure 3 That is, after sending the first frame data to the receiving end, the method further includes the following steps: S301: When the target transmission path is a new transmission path, obtain the new flow control information fed back by the receiving end, and send all the continuous frame data to the receiving end based on the batch interval time and flow control frame parameters in the new flow control information.

[0036] Understandably, after the sending end sends the first frame of data to the receiving end, if the target transmission path is a new transmission path, it indicates that the process of the sending end transmitting the data to be transmitted to the receiving end has not been completed before. That is, the sending end is transmitting the data to be transmitted to the receiving end for the first time, and there is no existing flow control information. At this time, after sending the first frame of data to the receiving end through the intermediate device, the sending end needs to wait to receive the flow control frame parameters sent by the receiving end through the intermediate device, and generate new flow control information based on the flow control frame parameters. Then, based on the batch interval time and flow control frame parameters in the new flow control information, the sending end sends all consecutive frame data to the receiving end.

[0037] In this implementation, when the target transmission path is a new transmission path, the sending end needs to obtain new flow control information based on the feedback from the receiving end regarding the first frame data. Based on the new flow control information, the continuous frame data can be automatically sent in batches at regular intervals, which can also speed up the transmission speed of continuous frame data and improve the overall data transmission efficiency.

[0038] In one embodiment, in step S103, please refer to... Figure 4 That is, sending all the consecutive frame data to the receiving end based on the batch interval time and flow control frame parameters in the existing flow control information includes the following steps: S401: Determine the continuous frame limit transmission amount and continuous frame interval time based on the flow control frame parameters in the existing flow control information; S402: If the consecutive frame transmission limit is greater than zero, then when the first transmission waiting time reaches the batch interval time, the consecutive frame data corresponding to the consecutive frame transmission limit is sent to the receiving end in batches according to the consecutive frame interval time, until all the consecutive frame data is sent; wherein, the first transmission waiting time is the waiting time after the first frame data is sent to the receiving end, or the waiting time between sending adjacent batches of consecutive frame data to the receiving end; S403: If the number of consecutive frames to be sent is zero, then when the first sending waiting time reaches the batch interval time, all the consecutive frame data are sent to the receiving end according to the consecutive frame interval time.

[0039] Understandably, flow control frame parameters include the consecutive frame transmission limit and the consecutive frame interval. The consecutive frame transmission limit indicates the maximum number of consecutive frames that the sender can transmit within the same batch. The consecutive frame interval indicates the time interval between adjacent consecutive frames when the sender transmits multiple consecutive frames within the same batch. The consecutive frame transmission limit can be a positive integer or zero. When the consecutive frame transmission limit is greater than zero, it indicates that there is a specific limit to the maximum number of consecutive frames that the receiver can receive in a batch, and the sender needs to divide all consecutive frames into one or more batches and send them to the receiver through an intermediate device.

[0040] Specifically, when the first transmission waiting time after sending the first frame of data to the intermediate device reaches the batch interval, the sending end performs a continuous frame interval transmission operation. The continuous frame interval transmission operation includes: transmitting continuous frame data corresponding to the continuous frame transmission limit to the receiving end through the intermediate device according to the continuous frame interval. For example, when the batch interval is 3 seconds, the continuous frame transmission limit is 5, and the continuous frame interval is 1 second, when the sending end's transmission waiting time after sending the first frame of data to the intermediate device reaches 3 seconds, it selects 5 frames from all continuous frame data as the first batch of continuous frame data, and transmits the first batch of continuous frame data to the receiving end through the intermediate device with an interval of 1 second between adjacent continuous frame data. Then, after sending the previous batch of continuous frame data, the sending end obtains the remaining number of untransmitted continuous frame data and determines whether the remaining number of frames is greater than zero. If the remaining number of frames is greater than zero, the continuous frame interval transmission operation continues, using the batch interval time as the transmission waiting time, until the remaining number of untransmitted continuous frame data is zero. At this point, the continuous frame interval transmission operation stops, and it is confirmed that all continuous frame data has been transmitted. Specifically, in the last batch of continuous frame data, the number of continuous frames may be less than the continuous frame transmission limit. When the continuous frame transmission limit in the flow control frame parameters is greater than zero, the sending end must check whether the remaining number of untransmitted continuous frame data is greater than zero after each continuous frame interval transmission operation. If the remaining number of frames is equal to zero, it is confirmed that all continuous frame data has been transmitted, and the continuous frame interval transmission operation no longer needs to be performed.

[0041] Furthermore, when the consecutive frame transmission limit is zero, it indicates that there is no limit to the maximum number of consecutive frames that the receiving end can receive in a single batch. When the sending end's transmission waiting time after sending the first frame to the intermediate device reaches the batch interval, it sends all consecutive frame data to the receiving end through the intermediate device according to the consecutive frame interval. In this case, the sending end can send all consecutive frame data within the same batch according to the consecutive frame interval, without needing to perform consecutive frame interval transmission operations in multiple batches with the batch interval as the transmission waiting time.

[0042] In this embodiment, when the continuous frame transmission limit in the flow control frame parameters is greater than zero, the sending end continuously performs continuous frame interval transmission operations with the batch interval time as the transmission waiting time until the remaining number of untransmitted continuous frame data is zero, without waiting for a reply from the receiving end after transmitting the first frame data and each batch of continuous frame data. This embodiment can achieve continuous batch transmission of continuous frame data according to a fixed period, realizing continuous and smooth data transmission, effectively avoiding data transmission timeouts, and improving the orderliness and efficiency of data transmission. Furthermore, when the continuous frame transmission limit in the flow control frame parameters is equal to zero, the sending end uses the batch interval time as the transmission waiting time, transmitting all continuous frame data within the same batch according to the continuous frame interval time, without waiting for a reply from the receiving end after transmitting the first frame data before transmitting continuous frame data, thus improving data transmission efficiency.

[0043] In one embodiment, in step S301, please refer to... Figure 5 The target transmission path is the transmission path between the sending end, the intermediate device, and the receiving end; that is, before obtaining the new flow control information fed back by the receiving end, the following steps are included: S501: The first frame data is sent to the receiving end through the intermediate device. If the first frame reception time, flow control frame reception time, and flow control frame parameters are received from the intermediate device, the batch interval time is determined based on the first frame reception time and the flow control frame reception time, and the new flow control information is generated based on the batch interval time and the flow control frame parameters. Wherein, the first frame reception time refers to the time point at which the intermediate device receives the first frame data; the flow control frame parameters refer to the parameters sent by the receiving end to the intermediate device after receiving the first frame data to characterize data reception restrictions; and the flow control frame reception time refers to the time point at which the intermediate device receives the flow control frame parameters.

[0044] Understandably, after sending the first frame of data to the receiving end via an intermediate device, the sending end needs to wait to receive the first frame reception time, flow control frame reception time, and flow control frame parameters sent by the intermediate device. The first frame reception time is the time point recorded by the intermediate device when it receives the first frame of data, and the flow control frame reception time is the time point recorded by the intermediate device when it receives the flow control frame parameters. The flow control frame parameters are parameters sent by the receiving end to the intermediate device after receiving the first frame of data, representing data reception limitations. The first frame reception time and the flow control frame reception time are hardware device-side time parameters corresponding to the intermediate device. The difference between the first frame reception time and the flow control frame reception time is used as a reusable batch interval time, which can be used as a fixed sending waiting time in subsequent data transmission processes, without specifically considering the delay of the receiving end's response, thus optimizing the time synchronization problem caused by delay. The sending end generates existing flow control information based on the batch interval time and the flow control frame parameters, which serves as a unified continuous frame data transmission control parameter in subsequent data transmission processes. Based on the batch interval time and the flow control frame parameters, the sending end sends all continuous frame data to the receiving end via the intermediate device.

[0045] In this embodiment, during the process of the sending end transmitting the data to be transmitted to the receiving end for the first time, the batch interval time is determined according to the first frame reception time and the flow control frame reception time, and new flow control information is generated according to the batch interval time and the flow control frame parameters, providing a reusable control parameter basis for subsequent continuous frame data transmission and the next multi-frame data transmission.

[0046] In one embodiment, in step S301, please refer to... Figure 6 That is, based on the batch interval time and flow control frame parameters in the newly added flow control information, sending all the consecutive frame data to the receiving end includes the following steps: S601: Determine the continuous frame limit transmission amount and continuous frame interval time based on the flow control frame parameters in the newly added flow control information; S602: If the consecutive frame limit transmission amount is greater than zero, then according to the consecutive frame interval time, the consecutive frame data corresponding to the consecutive frame limit transmission amount is sent to the receiving end in a batch; S603: If the remaining number of the continuous frame data that has not yet been sent is greater than zero, then when the second sending waiting time reaches the batch interval time, the continuous frame data corresponding to the continuous frame limit sending amount is sent to the receiving end in a batch according to the continuous frame interval time, until all the continuous frame data is sent; wherein, the second sending waiting time is the waiting time between sending adjacent batches of continuous frame data to the receiving end.

[0047] Understandably, during the initial transmission of data from the sending end to the receiving end, when the sending end receives the first frame reception time, flow control frame reception time, and flow control frame parameters from the intermediate device, it indicates that the sending end's waiting time after sending the first frame data to the intermediate device has necessarily exceeded the batch interval time in the newly added flow control information. At this point, if the continuous frame limit transmission quantity is greater than zero, the sending end directly executes the continuous frame interval transmission operation, sending the first batch of continuous frame data to the receiving end through the intermediate device. Next, after sending the previous batch of continuous frame data, the sending end obtains the remaining number of frames in the unsent continuous frame data and determines whether the remaining number is greater than zero. If the remaining number of frames is greater than zero, the continuous frame interval transmission operation for the next batch of continuous frame data is continuously executed, using the batch interval time as the second transmission waiting time, until the remaining number of frames in the unsent continuous frame data is zero. At this point, the continuous frame interval transmission operation stops, and all continuous frame data transmission is confirmed to be complete. This embodiment, by explicitly defining a remaining frame count of zero as the confirmation condition for transmission completion, can accurately determine the end time of data transmission.

[0048] In this embodiment, during the process of the sending end transmitting the data to be transmitted to the receiving end for the first time, after generating new flow control information based on the batch interval time and flow control frame parameters, the first batch of continuous frame data is transmitted directly. At the same time, the new flow control information is used to realize the batch timed transmission of continuous frame data, which improves the overall data transmission efficiency.

[0049] In one embodiment, in step S601, please refer to... Figure 7 That is, after determining the continuous frame limit transmission amount and continuous frame interval time based on the flow control frame parameters in the newly added flow control information, the method further includes the following steps: S701: If the number of consecutive frames to be sent is zero, then all the consecutive frame data are sent to the receiving end according to the consecutive frame interval time.

[0050] Understandably, during the initial transmission of data from the sending end to the receiving end, when the sending end receives the first frame reception time, flow control frame reception time, and flow control frame parameters from the intermediate device, it indicates that the sending end's waiting time after sending the first frame data to the intermediate device has necessarily exceeded the batch interval time in the newly added flow control information. At this point, if the consecutive frame transmission limit is zero, all consecutive frame data will be directly transmitted to the receiving end through the intermediate device according to the consecutive frame interval time.

[0051] In this embodiment, during the process of transmitting the data to be transmitted to the receiving end for the first time, the sending end generates new flow control information based on the batch interval time and flow control frame parameters, and then sends all consecutive frame data in the same batch according to the consecutive frame interval time, avoiding invalid waiting time judgment and improving the efficiency of data transmission.

[0052] In one embodiment, in step S101, please refer to... Figure 8 That is, determining the first frame of data, at least one consecutive frame of data, and the target transmission path based on the data to be transmitted includes the following steps: S801: When the length of the data to be transmitted is greater than a preset length threshold, the data to be transmitted is split according to a preset splitting rule to obtain the first frame data and at least one consecutive frame data. S802: Determine the target transmission path based on the intermediate device identifier and the receiving end identifier in the data to be transmitted.

[0053] Understandably, after acquiring the data to be transmitted, the sending end compares the data length of the data to be transmitted with a preset length threshold. When the data length of the data to be transmitted exceeds the preset length threshold, it indicates that the data to be transmitted cannot be sent to the receiving end as a single frame. The sending end then splits the data to be transmitted, obtaining a first frame and at least one consecutive frame. The preset splitting rule is a pre-defined criterion for splitting the data to be transmitted according to its length. The preset splitting rule includes the data length requirements and data field requirements for the first frame and each consecutive frame, which can be adjusted as needed. Specifically, the first frame needs to include total data length information (FF_DL field) and specific bytes of data, such as 6 bytes. Each consecutive frame needs to include sequence number information (SN field) and specific bytes of data, such as 7 bytes. The FF_DL field represents the data length of the data to be transmitted, and the SN field indicates which consecutive frame is being transmitted. The data to be transmitted also includes an intermediate device identifier and a receiving end identifier. The sending end determines the specified intermediate device based on the intermediate device identifier and the specified receiving end based on the receiving end identifier. The target transmission path is then determined based on the sending end, the specified intermediate device, and the receiving end.

[0054] In another embodiment, acquiring the data to be transmitted includes: acquiring the data to be transmitted when the transmission switch is detected to be in an "on" state. Specifically, the sending end pre-sets a function option for user selection, which corresponds to different transmission switch states, namely, an "on" state and a "off" state. The transmission switch state is a functional description used to characterize whether data transmission is performed based on existing flow control information. When the sending end detects that the transmission switch is in an "on" state, the sending end acquires the data to be transmitted and triggers the subsequent process of the data transmission method in this application. When the sending end detects that the transmission switch is in a "off" state, the sending end does not trigger the process of the data transmission method in this application. This allows users to choose to enable the transmission function according to their needs, reflecting the flexibility of the data transmission method.

[0055] In this embodiment, the sending end splits data to be transmitted that is longer than a preset length threshold into a first frame and at least one consecutive frame. This ensures that each frame conforms to protocol requirements and guarantees successful data transmission. Simultaneously, it helps the sending end process consecutive frames in batches, improving data transmission speed and processing efficiency.

[0056] This application also provides a data transmission device 90, please refer to... Figure 9 The system includes: a data acquisition module 901, used to acquire data to be transmitted, and determine a first frame of data, at least one consecutive frame of data, and a target transmission path based on the data to be transmitted, wherein the target transmission path is a transmission path between the sending end and the receiving end; a first frame of data transmission module 902, used to send the first frame of data to the receiving end; and a consecutive frame of data transmission module 903, used to acquire existing flow control information corresponding to the target transmission path when the target transmission path is an existing transmission path, and send all the consecutive frame of data to the receiving end based on the batch interval time and flow control frame parameters in the existing flow control information.

[0057] This application also provides an electronic device 100, please refer to... Figure 10 It includes a memory 101 and a processor 102, wherein the memory 101 is used to store computer programs; and the processor 102 is used to execute the programs stored in the memory 101 to implement the data transmission method described in any embodiment of this application.

[0058] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the data transmission method described in any embodiment of this application.

[0059] In this application, "multiple" refers to two or more.

[0060] The terms “first,” “second,” “third,” “fourth,” etc., in this application (if present) are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0061] Unless otherwise specified, all steps in this application may be performed sequentially or randomly. For example, if the method includes steps A and B, it means that the method may include steps A and B performed sequentially, or it may include steps B and A performed sequentially. For example, if the method may also include step C, it means that step C may be added to the method in any order. For example, the method may include steps A, B, and C, or it may include steps A, C, and B, or it may include steps C, A, and B, etc.

[0062] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A data transmission method, applied at a sending end, characterized in that, include: Acquire the data to be transmitted, and determine the first frame data, at least one consecutive frame data, and the target transmission path based on the data to be transmitted, wherein the target transmission path is the transmission path between the sending end and the receiving end. The first frame of data is sent to the receiving end; When the target transmission path is an existing transmission path, the existing flow control information corresponding to the target transmission path is obtained, and based on the batch interval time and flow control frame parameters in the existing flow control information, all the continuous frame data is sent to the receiving end.

2. The data transmission method according to claim 1, characterized in that, After sending the first frame data to the receiving end, the method further includes: When the target transmission path is a new transmission path, the newly added flow control information fed back by the receiving end is obtained, and based on the batch interval time and flow control frame parameters in the newly added flow control information, all the continuous frame data is sent to the receiving end.

3. The data transmission method according to claim 1, characterized in that, The step of sending all the consecutive frame data to the receiving end based on the batch interval time and flow control frame parameters in the existing flow control information includes: Based on the flow control frame parameters in the existing flow control information, determine the consecutive frame limit transmission amount and consecutive frame interval time; If the consecutive frame transmission limit is greater than zero, then when the first transmission waiting time reaches the batch interval time, the consecutive frame data corresponding to the consecutive frame transmission limit is sent to the receiving end in a batch according to the consecutive frame interval time, until all the consecutive frame data is sent; wherein, the first transmission waiting time is the waiting time after the first frame data is sent to the receiving end, or the waiting time between sending adjacent batches of consecutive frame data to the receiving end. If the number of consecutive frames to be sent is zero, then when the first sending waiting time reaches the batch interval time, all the consecutive frame data are sent to the receiving end according to the consecutive frame interval time.

4. The data transmission method according to claim 2, characterized in that, The target transmission path is the transmission path between the sending end, the intermediate device, and the receiving end; Before obtaining the new flow control information fed back by the receiving end, the following steps are included: The first frame data is sent to the receiving end through the intermediate device. If the receiving end receives the first frame reception time, flow control frame reception time, and flow control frame parameters sent by the intermediate device, the batch interval time is determined based on the first frame reception time and the flow control frame reception time, and the new flow control information is generated based on the batch interval time and the flow control frame parameters. The first frame reception time refers to the time when the intermediate device receives the first frame data; the flow control frame parameters refer to the parameters sent by the receiving end to the intermediate device after receiving the first frame data, used to characterize data reception restrictions; and the flow control frame reception time refers to the time when the intermediate device receives the flow control frame parameters.

5. The data transmission method according to claim 2, characterized in that, The step of sending all the consecutive frame data to the receiving end based on the batch interval time and flow control frame parameters in the newly added flow control information includes: Based on the flow control frame parameters in the newly added flow control information, determine the consecutive frame limit transmission amount and consecutive frame interval time; If the consecutive frame transmission limit is greater than zero, then the consecutive frame data corresponding to the consecutive frame transmission limit will be sent to the receiving end in a batch according to the consecutive frame interval time. If the remaining number of the unsent consecutive frame data is greater than zero, then when the second transmission waiting time reaches the batch interval time, the consecutive frame data corresponding to the consecutive frame transmission limit is sent to the receiving end in a batch according to the consecutive frame interval time, until all the consecutive frame data is sent; wherein, the second transmission waiting time is the waiting time between sending adjacent batches of consecutive frame data to the receiving end.

6. The data transmission method according to claim 5, characterized in that, After determining the consecutive frame transmission limit and consecutive frame interval based on the flow control frame parameters in the newly added flow control information, the method further includes: If the number of consecutive frames to be sent is zero, then all the consecutive frame data are sent to the receiving end according to the consecutive frame interval.

7. The data transmission method according to claim 1, characterized in that, The step of determining the first frame of data, at least one consecutive frame of data, and the target transmission path based on the data to be transmitted includes: When the length of the data to be transmitted is greater than a preset length threshold, the data to be transmitted is split according to a preset splitting rule to obtain the first frame data and at least one consecutive frame data. The target transmission path is determined based on the intermediate device identifier and the receiving end identifier in the data to be transmitted.

8. A data transmission device, characterized in that, include: The data acquisition module is used to acquire data to be transmitted, and determine the first frame data, at least one consecutive frame data and the target transmission path based on the data to be transmitted, wherein the target transmission path is the transmission path between the sending end and the receiving end. The first frame data sending module is used to send the first frame data to the receiving end; The continuous frame data transmission module is used to obtain existing flow control information corresponding to the target transmission path when the target transmission path is an existing transmission path, and send all the continuous frame data to the receiving end based on the batch interval time and flow control frame parameters in the existing flow control information.

9. An electronic device, characterized in that, Including processor and memory, among which, Memory, used to store computer programs; A processor for executing a program stored in memory to implement the data transmission method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the data transmission method according to any one of claims 1-7.