Data transmission method, program product, terminal device and data transmission system
Patent Information
- Application Number
- CN202611098424.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-09-25
AI Technical Summary
当数据传输链路恢复后,大量重复的补发数据会集中涌入云端服务单元,从而造成云端数据过载溢出并且导致服务降级甚至不可用
其中,所述终端设备能够经由所述网关与所述云端服务单元建立通信连接并实施根据本发明的数据传输方法。
Smart Images

Figure CN122824732A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data transmission technology, and in particular to a data transmission method for terminal devices. The invention also relates to a corresponding computer program product, a corresponding terminal device, and a corresponding data transmission system. Background Technology
[0002] In data transmission systems, terminal devices (such as vehicle-mounted terminal devices, especially vehicle-mounted telematics terminals) typically need to periodically upload real-time monitoring (RTM) data to a cloud service unit via the network. To ensure reliable data transmission, if the terminal device does not receive an ACK (acknowledgment character) from the cloud service unit in a timely manner after sending data, it will initiate a retransmission mechanism to resend the data.
[0003] However, in real-world network environments, data transmission links may experience high latency or brief interruptions due to network congestion, signal fluctuations, cloud service overload, or gateway failures. During the data transmission link recovery process, terminal devices continuously resend data. Once the data transmission link is restored, a large influx of resent data floods the cloud service unit, causing cloud data overload and leading to service degradation or even unavailability. Summary of the Invention
[0004] Therefore, the purpose of this invention is to propose an improved data transmission method for terminal devices, which can avoid impacting cloud service units by limiting the frequency of data retransmission.
[0005] The present invention also aims to provide a corresponding computer program product, a corresponding terminal device, and a corresponding data transmission system.
[0006] According to a first aspect of the present invention, a data transmission method for a terminal device is provided, wherein the data transmission method includes at least the following steps: S1: The terminal device sends real-time monitoring data to the cloud service unit at a first time interval; S2: If the terminal device does not receive a response message regarding the real-time monitoring data within the first time threshold, the real-time monitoring data will be moved into the retransmission queue; S3: Resend the real-time monitoring data in the resend queue at a second time interval and record the number of times the real-time monitoring data is resent, and send an echo request to the gateway to detect network connectivity; S4: If the connection between the terminal device and the gateway is confirmed to be normal according to the echo request, and the number of times the real-time monitoring data is resent reaches the first threshold, stop the resentment of the real-time monitoring data and move the real-time monitoring data from the resentment queue to the waiting queue; S5: When the waiting queue is not empty, the terminal device sends a handshake message to the cloud service unit at a third time interval; S6: When the terminal device receives a normal response from the cloud service unit regarding the handshake message, it sends the data in the waiting queue until the waiting queue is empty.
[0007] Compared to existing technologies, in the data transmission method for terminal devices according to the present invention, when the terminal device sends real-time monitoring data to the cloud service unit but does not receive a related response, on the one hand, the real-time monitoring data is moved to a retransmission queue, retransmitted, and the number of retransmissions is recorded; on the other hand, an echo request is sent to the gateway to detect whether the connection between the terminal device and the gateway is normal. This allows for flexible implementation of corresponding measures for different operating conditions. If the connection between the terminal device and the gateway is confirmed to be normal, it can be determined that the connection between the gateway and the cloud service unit is abnormal. In this case, when the number of retransmissions of real-time monitoring data reaches the first threshold, the retransmission of real-time monitoring data is stopped, and the real-time monitoring data is moved from the retransmission queue to the waiting queue, thereby limiting the frequency of real-time monitoring data retransmission and preventing unlimited retransmissions. When the waiting queue is not empty, the terminal device sends a handshake message to the cloud service unit to detect whether the data transmission link with the cloud service unit has returned to normal. Only when the terminal device receives a normal response from the cloud service unit does it send data from the waiting queue until the waiting queue is empty. This avoids the data transmission link being occupied by a large amount of retransmission data and prevents it from impacting the cloud service unit in a short period of time, thereby ensuring the service quality of the cloud service unit.
[0008] For example, the data transmission method additionally includes step S7: if the connection between the terminal device and the gateway is confirmed to be abnormal according to the echo request, the real-time monitoring data is moved from the retransmission queue to the storage queue and the retransmission of the real-time monitoring data is stopped, wherein the data in the storage queue is sent after the connection between the terminal device and the gateway is restored to normal.
[0009] For example, if a response to the echo request is received within the second time threshold, it confirms that the connection between the terminal device and the gateway is normal.
[0010] For example, an echo request is sent to the gateway at a fourth time interval and the number of echo requests is recorded. If the number of echo requests reaches the second threshold and no response information is received, it is confirmed that the connection between the terminal device and the gateway is abnormal.
[0011] For example, when an abnormal connection is confirmed between the terminal device and the gateway, subsequent data from the terminal device is directly stored in the storage queue.
[0012] For example, the data transmission method additionally includes step S8: when the terminal device does not receive a normal response regarding the handshake message, the data in the waiting queue remains in a non-transmission state, and the handshake message is continuously sent to the cloud service unit at the third time interval.
[0013] For example, in step S8, subsequent data from the terminal device is moved into the waiting queue when the number of resends reaches the third threshold, wherein the third threshold is less than or equal to the first number threshold.
[0014] For example, if no successful acknowledgment response to the handshake message is received within a third time threshold, it is considered that no normal response to the handshake message has been received, wherein the third time threshold is less than the third time interval.
[0015] For example, the product of the second time interval and the third threshold is not an integer multiple of the third time interval.
[0016] For example, the data transmission method additionally includes step S9: if data transmission in the waiting queue fails, the failed data is re-entered into the waiting queue and step S5 is re-executed.
[0017] According to a second aspect of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by one or more processors, the processors are capable of executing the data transmission method according to the present invention.
[0018] According to a third aspect of the present invention, a terminal device, particularly an in-vehicle terminal device, is provided, wherein the terminal device is configured to implement the data transmission method according to the present invention using a computer program product according to the present invention.
[0019] According to a fourth aspect of the present invention, a data transmission system is provided, wherein the data transmission system comprises at least: - The terminal device according to the present invention; - Gateway; and - Cloud service unit The terminal device is able to establish a communication connection with the cloud service unit via the gateway and implement the data transmission method according to the present invention. Attached Figure Description
[0020] The invention will now be described in more detail with reference to the accompanying drawings, which will provide a better understanding of its principles, features, and advantages. The drawings include: Figure 1 A schematic connection block diagram of a data transmission system according to an exemplary embodiment of the present invention is shown; Figure 2 A schematic flowchart of a data transmission method for a terminal device according to an exemplary embodiment of the present invention is shown; Figure 3 A diagram showing the relationship between different data queues of a terminal device according to an exemplary embodiment of the present invention is illustrated. Detailed Implementation
[0021] To make the technical problems to be solved, the technical solutions, and the beneficial technical effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and several exemplary embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of protection of this invention.
[0022] Furthermore, in describing representative embodiments, the specification may have presented methods and / or processes as a specific sequence of steps. However, the method or process should not be limited to the specific order of steps described herein, to the extent that it does not depend on such a specific order. As will be understood by those skilled in the art, other sequences of steps are also possible. Therefore, the specific order of steps set forth in the specification should not be construed as a limitation of the claims. Moreover, the claims concerning the method and / or process should not be limited to the steps performed in the written order, and those skilled in the art will readily understand that these orders can be varied and still remain within the spirit and scope of the embodiments of this application.
[0023] Figure 1 A schematic connection block diagram of a data transmission system 100 according to an exemplary embodiment of the present invention is shown.
[0024] like Figure 1As shown, the data transmission system 100 according to the present invention includes a terminal device 10, which is particularly an in-vehicle terminal device, such as an in-vehicle telematics unit (TCU). This terminal device can be deployed in a vehicle and has functions such as collecting real-time monitoring data, periodic reporting, queue management, data caching, data scheduling, and sending and receiving handshake messages. Here, the terminal device 10 can form multiple data queues, and different processing measures can be taken for the data in different data queues.
[0025] like Figure 1 As shown, the data transmission system 100 includes a gateway 20, which is deployed between the terminal device 10 and the cloud service unit 30. As an intermediate access and forwarding node for communication between the vehicle and the cloud, the gateway 20 has network address translation, routing forwarding, and optional data caching functions. Here, the gateway 20 is connected to the terminal device 10 via a wired connection (such as Ethernet or CAN bus) or a short-range wireless connection on one side, and to the cloud service unit 30 via a cellular network (4G / 5G) on the other side, to forward data sent by the terminal device 10 and response information from the cloud service unit 30.
[0026] like Figure 1 As shown, the data transmission system 100 also includes a cloud service unit 30, which is deployed on a cloud server and may include multiple modules such as a data receiving module, a data processing module, and a data distribution module. The data receiving module is configured to receive data sent by the terminal device 10.
[0027] Here, there is a first transmission link L1 between the terminal device 10 and the gateway 20, and a second transmission link L2 between the gateway 20 and the cloud service unit 30. Any abnormality in either transmission link will affect the data transmission between the terminal device 10 and the cloud service unit 30.
[0028] Figure 2 A schematic flowchart of a data transmission method for a terminal device 10 according to an exemplary embodiment of the present invention is shown. Figure 3 A diagram showing the relationship between different data queues of a terminal device 10 according to an exemplary embodiment of the present invention is provided.
[0029] like Figure 2 and Figure 3 As shown, the data transmission method according to the present invention includes the following steps: S1: The terminal device 10 sends real-time monitoring data to the cloud service unit 30 via the gateway 20 at a first time interval, for example, 30 seconds. At this time, the real-time monitoring data is in the normal sending queue D1.
[0030] Here, if the cloud service unit 30 receives the real-time monitoring data, it will send a response message, such as an acknowledgment character (ACK), to the terminal device 10. After receiving the response message, the terminal device 10 confirms that the real-time monitoring data has been successfully sent to the cloud service unit 30, and the data transmission process ends. This situation only occurs when both the first transmission link L1 between the terminal device 10 and the gateway 20 and the second transmission link L2 between the gateway 20 and the cloud service unit 30 are properly connected.
[0031] S2: If the terminal device 10 does not receive a response regarding the real-time monitoring data sent in step S1 within a first time threshold, for example, 10 seconds, the real-time monitoring data is moved from the normal transmission queue D1 to the retransmission queue D2. In this case, either the first transmission link L1 connection between the terminal device 10 and the gateway 20 is abnormal, or the second transmission link L2 connection between the gateway 20 and the cloud service unit 30 is abnormal.
[0032] S3: Resend the real-time monitoring data in the resend queue D2 at a second time interval, for example, 10 seconds, and record the number of times the real-time monitoring data is resent. Send an echo request (ICMP Ping) to the gateway 20 to detect network connectivity, which indicates the connection status of the first transmission link L1 between the terminal device 10 and the gateway 20.
[0033] S4: If the connection between terminal device 10 and gateway 20 is confirmed to be normal according to the echo request, it indicates that the connection of the second transmission link L2 between gateway 20 and cloud service unit 30 is abnormal. In this case, if the number of times the real-time monitoring data in the resend queue D2 is resent reaches the first threshold, such as 20 times, then the resend of the real-time monitoring data is stopped and the real-time monitoring data is moved from the resend queue D2 to the waiting queue D3.
[0034] S5: When the waiting queue D3 is not empty, that is, when there is data in the waiting queue D3, the terminal device 10 sends a handshake message to the cloud service unit 30 at a third time interval, for example, 7 seconds. The handshake message is a lightweight probe request and is used to detect whether the link has been restored.
[0035] S6: When the terminal device 10 receives a normal response from the cloud service unit 30 regarding the handshake message, such as HTTP 200 OK, it indicates that the second transmission link L2 between the gateway 20 and the cloud service unit 30 has been restored to normal. Then, the data in the waiting queue D3 is sent until the waiting queue D3 is empty.
[0036] Here, when the second transmission link L2 between gateway 20 and cloud service unit 30 returns to normal, the data in retransmission queue D2 is automatically sent, while the data in waiting queue D3 is sent only when a normal response to the handshake message is received. The data transmission of these two queues does not affect each other.
[0037] Therefore, by specifically analyzing the reasons for connection anomalies and setting up an additional waiting queue D3, the number of data resends can be effectively limited, and the large amount of resend data that would overwhelm the cloud service unit 30 when communication returns to normal can be prevented.
[0038] Here, the various time intervals, time thresholds, and number of times thresholds can be derived in advance from experimental and / or empirical data. Of course, other values that are considered meaningful by those skilled in the art can also be considered.
[0039] For example, such as Figure 2 As shown, the data transmission method further includes step S7, which is optionally implemented after step S3: if the connection between terminal device 10 and gateway 20 is confirmed to be abnormal according to the echo request, it indicates that the current network is unavailable. This usually occurs in places with poor or no signal, such as tunnels or underground parking garages. In this case, the real-time monitoring data is moved from the retransmission queue D2 to the storage queue D4 and the retransmission of real-time monitoring data is stopped. In particular, as Figure 3 As shown, when a connection anomaly is confirmed between terminal device 10 and gateway 20, subsequent data from terminal device 10 is directly stored in storage queue D4 to minimize resource waste. Data in storage queue D4 is sent after the connection between terminal device 10 and gateway 20 is restored.
[0040] In particular, a second time threshold is set for the echo request, for example, 3 seconds. If the terminal device 10 receives the response information of the gateway 20 regarding the echo request within the second time threshold, it is confirmed that the first transmission link L1 between the terminal device 10 and the gateway 20 is connected normally.
[0041] Conversely, if terminal device 10 does not receive a response to the echo request within the second time threshold, it indicates that the first transmission link L1 may be experiencing a connection anomaly. For example, an echo request is sent to gateway 20 at a fourth time interval (e.g., 10 seconds), and the number of echo requests is recorded. If the number of echo requests reaches the second threshold, e.g., 3 times, and no response is received, then a connection anomaly between terminal device 10 and gateway 20 is confirmed. This effectively eliminates the possibility of network fluctuations and avoids the erroneous transfer of real-time monitoring data into storage queue D4.
[0042] For example, such as Figure 2As shown, the data transmission method further includes step S8, which is optionally implemented after step S5: when the terminal device 10 does not receive a normal response to the handshake message, the data in the waiting queue D3 remains in a non-transmission state. This can prevent the data sent by the retransmission queue D2 and the waiting queue D3 from simultaneously impacting the cloud service unit when the link is restored, and continuously send handshake messages to the cloud service unit 30 at a third time interval, such as 7 seconds, in order to obtain the status of the transmission link in a timely manner.
[0043] Here, if no successful acknowledgment response for the handshake message is received within a third time threshold, for example, 3 seconds, it is considered that no normal response to the handshake message has been received, and handshake messages continue to be sent at a third time interval, wherein the third time threshold is less than the third time interval, so as to obtain a corresponding response in a timely manner for each handshake message.
[0044] Here, when the terminal device 10 receives an error response to the handshake message within the third time threshold, such as 403 Forbidden or 400 Bad Request, it also assumes that it has not received a successful acknowledgment of the handshake message and continues to send the handshake message at the third time interval.
[0045] For example, in step S8, after the subsequent data of the terminal device 10 is moved into the retransmission queue D2, it is moved into the waiting queue D3 when the number of retransmissions reaches the third threshold. The third threshold is less than or equal to the first threshold. This allows for a targeted reduction in the amount of retransmission data when an anomaly is found in the second transmission link L2 between the gateway 20 and the cloud service unit 30. By changing the retransmission number threshold, subsequent data can be moved from the retransmission queue D2 into the waiting queue D3 more quickly, which further reduces the load pressure on the cloud service unit 30 caused by the retransmission data.
[0046] For example, the product of the second time interval (e.g., 10 seconds) and the third threshold (e.g., 10 times) during subsequent data retransmission is not an integer multiple of the third time interval (e.g., 7 seconds) for sending the handshake message. By constraining the relevant time parameters to non-integer multiple relationships, it is possible to prevent the terminal device 10 from simultaneously performing retransmission operations and moving subsequent data from the retransmission queue D2 to the waiting queue D3 while also sending the handshake message, thereby preventing resource overload of the terminal device 10.
[0047] For example, such as Figure 2As shown, the data transmission method additionally includes step S9: if data transmission in waiting queue D3 fails, i.e., no acknowledgment is received after transmission, which may indicate that the cloud service unit 30 has encountered another problem, the failed data is re-entered into waiting queue D3, for example, by being placed at the end of the queue according to the first-in-first-out principle to maintain the order of the remaining data in waiting queue D3, and step S5 is re-executed, with the terminal device 10 re-sending a handshake message to the cloud service unit 30 to confirm the connection status between the terminal device 10 and the cloud service unit 30. Here, step S9 can be performed during the implementation of step S8.
[0048] According to the present invention, a computer program product is provided, comprising a computer program that, when executed by one or more processors, enables the processors to perform the data transmission method according to the present invention.
[0049] According to the present invention, a terminal device 10, particularly an in-vehicle terminal device, is also provided, wherein the terminal device is capable of implementing the data transmission method according to the present invention using a computer program product according to the present invention. Here, the terminal device 10 is associated with the data transmission system 100 according to the present invention.
[0050] The foregoing description of the embodiments is limited to the framework of the examples given. Of course, the various features of the embodiments can be freely combined with each other without departing from the framework of the invention, as long as it is technically meaningful.
[0051] Other advantages and alternative embodiments of the present invention will be apparent to those skilled in the art. Therefore, the present invention is not, in its broader sense, limited to the specific details, representative structures, and exemplary embodiments shown and described. Rather, those skilled in the art can make various modifications and substitutions without departing from the basic spirit and scope of the invention.
Claims
1. A data transmission method for a terminal device (10), characterized in that, The data transmission method includes at least the following steps: S1: The terminal device (10) sends real-time monitoring data to the cloud service unit (30) at a first time interval; S2: If the terminal device (10) does not receive a response message regarding the real-time monitoring data within the first time threshold, the real-time monitoring data is moved into the retransmission queue (D2). S3: Resend the real-time monitoring data in the resend queue (D2) at a second time interval and record the number of times the real-time monitoring data is resent, and send an echo request to the gateway (20) to detect network connectivity; S4: If the connection between the terminal device (10) and the gateway (20) is normal according to the echo request, and the number of times the real-time monitoring data is resent reaches the first threshold, stop the resentment of the real-time monitoring data and move the real-time monitoring data from the resentment queue (D2) to the waiting queue (D3). S5: When the waiting queue (D3) is not empty, the terminal device (10) sends a handshake message to the cloud service unit (30) at a third time interval; S6: When the terminal device (10) receives a normal response from the cloud service unit (30) regarding the handshake message, it sends the data in the waiting queue (D3) until the waiting queue (D3) is empty.
2. The data transmission method according to claim 1, characterized in that, The data transmission method additionally includes step S7: if the connection between the terminal device (10) and the gateway (20) is confirmed to be abnormal according to the echo request, the real-time monitoring data is moved from the retransmission queue (D2) to the storage queue (D4) and the retransmission of the real-time monitoring data is stopped, wherein the data in the storage queue (D4) is sent after the connection between the terminal device (10) and the gateway (20) is restored to normal.
3. The data transmission method according to claim 2, characterized in that, If a response to the echo request is received within the second time threshold, it confirms that the connection between the terminal device (10) and the gateway (20) is normal; and / or An echo request is sent to the gateway (20) at a fourth time interval, and the number of echo requests is recorded. If the number of echo requests reaches the second threshold and no response is received, then the connection between the terminal device (10) and the gateway (20) is confirmed to be abnormal; and / or When it is confirmed that the connection between the terminal device (10) and the gateway (20) is abnormal, the subsequent data of the terminal device (10) is directly stored in the storage queue (D4).
4. The data transmission method according to any one of claims 1 to 3, characterized in that, The data transmission method additionally includes step S8: when the terminal device (10) does not receive a normal response to the handshake message, the data in the waiting queue (D3) remains in a non-transmission state and continues to send handshake messages to the cloud service unit (30) at the third time interval.
5. The data transmission method according to claim 4, characterized in that, In step S8, subsequent data from the terminal device (10) is moved into the waiting queue (D3) when the number of retransmissions reaches the third threshold, wherein the third threshold is less than or equal to the first threshold; and / or If no successful acknowledgment response to the handshake message is received within a third time threshold, it is considered that no normal response to the handshake message has been received, wherein the third time threshold is less than the third time interval.
6. The data transmission method according to claim 5, characterized in that, The product of the second time interval and the third threshold is not an integer multiple of the third time interval.
7. The data transmission method according to any one of claims 1 to 6, characterized in that, The data transmission method additionally includes step S9: if data transmission in the waiting queue (D3) fails, the failed data is re-entered into the waiting queue (D3) and step S5 is re-executed.
8. A computer program product comprising a computer program, characterized in that, When the computer program is executed by one or more processors, the processors are capable of performing the data transmission method according to any one of claims 1 to 7.
9. A terminal device (10), particularly a vehicle-mounted terminal device (10), characterized in that, The terminal device (10) is configured to implement the data transmission method according to any one of claims 1 to 7 using the computer program product according to claim 8.
10. A data transmission system (100), characterized in that, The data transmission system (100) includes at least: - The terminal device (10) according to claim 9; - Gateway (20); and - Cloud service unit (30). The terminal device (10) is able to establish a communication connection with the cloud service unit (30) via the gateway (20) and implement the data transmission method according to any one of claims 1 to 7.