Data Transmission Method and Device, Computer-Readable Storage Medium, and Terminal Device

By determining data priority in data transmission and adjusting the packet transmission time according to priority, the problem of high resource occupation of existing wireless protocols is solved, efficient and resource-saving data transmission is achieved, and the timely arrival of high-priority data is ensured.

CN114423093BActive Publication Date: 2025-06-10BEIJING SMARTCHIP MICROELECTRONICS TECHNOLOGY CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111669569.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-06-10
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

Existing wireless protocols require complex logical processing during data transmission, resulting in large resource occupancy and are not suitable for low-end MCUs with limited resources.

Method used

A data transmission method is proposed. By determining the priority of the data to be transmitted, if it is a general priority and there are many data packets, monitoring whether the transmission channel is idle. If the preset time is met, a data packet will be sent every time, ensuring that the transmission channel has a continuous idle time when sending data, and priority is given to sending high-priority data.

Benefits of technology

It simplifies the logical processing of data transmission, reduces the occupation of MCU resources, and ensures the timely arrival of high-priority data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114423093B_ABST
    Figure CN114423093B_ABST
Patent Text Reader

Abstract

The present invention discloses a data transmission method, a device, a computer-readable storage medium, and a terminal device. The data transmission method includes: determining the data priority of the currently to-be-transmitted data; when the data priority of the currently to-be-transmitted data is a general priority and the currently to-be-transmitted data includes multiple data packets, if it is monitored that the transmission channel is continuously idle for a first preset time, then send one data packet through the transmission channel every first preset time, so that there is an idle state of the transmission channel that lasts for the first preset time when transmitting the currently to-be-transmitted data, so as to enable the to-be-transmitted data with a high priority to be preferentially transmitted. Thus, this method enables the to-be-transmitted data with a general priority to send one data packet every first preset time, and makes there be an idle state of the transmission channel that lasts for the first preset time during the data transmission process, so that the to-be-transmitted data with a high priority can be preferentially transmitted, thereby ensuring that the to-be-transmitted data with a high priority reaches the data recipient in time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data communication technologies, and in particular, to a data transmission method, a data transmission device, a computer-readable storage medium, and a terminal device. Background Art

[0002] With the development of wireless communication technologies, the applications of wireless communication technologies have become more and more extensive. Before transmitting data, existing wireless protocols first listen to whether the transmission channel is idle. If the transmission channel is idle, data is immediately transmitted. If the transmission channel is busy, wait for a period of time until the information transmission in the transmission channel ends and then transmit data. If two or more nodes both send requests after the previous information transmission ends, it is determined as a collision. If a collision is detected, data transmission is immediately stopped, wait for a random period of time, and then retry. Implementing existing wireless protocols requires complex logic processing, increasing the implementation difficulty. At the same time, it also occupies relatively more resources of the MCU (Microcontroller Unit), and is not very suitable for low-end MCUs with less resources. Summary of the Invention

[0003] The present invention aims to at least partly solve one of the technical problems in the related technologies. To this end, the first object of the present invention is to propose a data transmission method, which sends a data packet of general-priority data to be transmitted every first preset time, so that the transmission channel has an idle state lasting for the first preset time during the data transmission process, so that high-priority data to be transmitted can be preferentially transmitted, thereby ensuring that high-priority data to be transmitted reaches the data receiver in time.

[0004] The second object of the present invention is to propose a data transmission device.

[0005] The third object of the present invention is to propose a computer-readable storage medium.

[0006] The fourth object of the present invention is to propose a terminal device.

[0007] To achieve the above object, an embodiment of the first aspect of the present invention proposes a data transmission method, including: determining the data priority of the current data to be transmitted; when the data priority of the current data to be transmitted is general priority and the current data to be transmitted includes multiple data packets, if it is monitored that the transmission channel is continuously idle for the first preset time, then send a data packet through the transmission channel every first preset time, so that the transmission channel has an idle state lasting for the first preset time when transmitting the current data to be transmitted, so that high-priority data to be transmitted can be preferentially transmitted.

[0008] According to the data transmission method of the embodiments of the present invention, first determine the data priority of the currently to-be-transmitted data. Then, when the data priority of the currently to-be-transmitted data is the general priority and the currently to-be-transmitted data includes multiple data packets, if it is monitored that the transmission channel is continuously idle for a first preset time, then send one data packet through the transmission channel every first preset time, so that the transmission channel has an idle state that lasts for the first preset time when transmitting the currently to-be-transmitted data, so as to enable the to-be-transmitted data with a high priority to be preferentially transmitted. Thus, this method enables the to-be-transmitted data with the general priority to send one data packet every first preset time, and makes the transmission channel have an idle state that lasts for the first preset time during the data transmission process, so that the to-be-transmitted data with a high priority can be preferentially transmitted, thereby ensuring that the to-be-transmitted data with a high priority reaches the data receiver in time.

[0009] In addition, the data transmission method according to the above embodiments of the present invention may further have the following additional technical features:

[0010] According to an embodiment of the present invention, when the data priority of the currently to-be-transmitted data is the high priority and the to-be-transmitted data includes multiple data packets, if it is monitored that the transmission channel is continuously idle for a third preset time within a second preset time, then continuously send multiple data packets in the to-be-transmitted data through the transmission channel, where the second preset time is greater than the first preset time, and the first preset time is greater than the third preset time.

[0011] According to an embodiment of the present invention, when continuously sending multiple data packets in the to-be-transmitted data, if it is monitored that there is first target response data on the transmission channel within the third preset time, then continue to send the data packets.

[0012] According to another embodiment of the present invention, when continuously sending multiple data packets in the to-be-transmitted data, if it is not monitored that there is first target response data on the transmission channel within the third preset time or it is not monitored that the transmission channel is continuously idle for the third preset time within the second preset time, after delaying the first preset multiple of the third preset time, determine again whether it is monitored that the transmission channel is continuously idle for the third preset time within the second preset time.

[0013] According to an embodiment of the present invention, when sending one data packet through the transmission channel every first preset time, if it is monitored that there is second target response data on the transmission signal within the first preset time, then continue to send the data packets at intervals of the first preset time.

[0014] According to another embodiment of the present invention, when sending one data packet through the transmission channel every first preset time, if it is not monitored that there is second target response data on the transmission channel within the first preset time or it is not monitored that the transmission channel is continuously idle for the first preset time, after delaying the second preset multiple of the first preset time, determine the data priority of the to-be-transmitted data.

[0015] According to an embodiment of the present invention, the third preset time is the sum of the transmission delay and the processing delay between the two farthest transmission nodes in the communication network. The first preset time is a third preset multiple of the third preset time, and the second preset time is the sum of the first preset time, the longest data transmission delay, and the message response transmission delay.

[0016] To achieve the above object, an embodiment of the second aspect of the present invention provides a data transmission device, including: a first determination module, configured to determine the data priority of the currently to-be-transmitted data; a first transmission module, configured to, when the data priority of the currently to-be-transmitted data is a general priority and the currently to-be-transmitted data includes multiple data packets, if it is monitored that the transmission channel is continuously idle for a first preset time, then send a data packet through the transmission channel every first preset time, so that the transmission channel has an idle state continuously for the first preset time when transmitting the currently to-be-transmitted data, so as to enable the to-be-transmitted data with a high priority to be preferentially transmitted.

[0017] According to the data transmission device of the embodiment of the present invention, the first determination module determines the data priority of the currently to-be-transmitted data. When the data priority of the currently to-be-transmitted data is a general priority and the currently to-be-transmitted data includes multiple data packets, the first transmission module, if it is monitored that the transmission channel is continuously idle for a first preset time, then sends a data packet through the transmission channel every first preset time, so that the transmission channel has an idle state continuously for the first preset time when transmitting the currently to-be-transmitted data, so as to enable the to-be-transmitted data with a high priority to be preferentially transmitted. Thus, the device makes the to-be-transmitted data with a general priority send a data packet every first preset time, so that the transmission channel has an idle state continuously for the first preset time during the data transmission process, so that the to-be-transmitted data with a high priority can be preferentially transmitted, thereby ensuring that the to-be-transmitted data with a high priority reaches the data receiving party in time.

[0018] In addition, the data transmission device according to the above embodiment of the present invention may further have the following additional technical features:

[0019] According to an embodiment of the present invention, the first transmission module is further configured to, when the data priority of the currently to-be-transmitted data is a high priority and the to-be-transmitted data includes multiple data packets, if it is monitored that the transmission channel is continuously idle for a third preset time within a second preset time, then continuously send multiple data packets in the to-be-transmitted data through the transmission channel, where the second preset time is greater than the first preset time, and the first preset time is greater than the third preset time.

[0020] According to an embodiment of the present invention, the first transmission module is further configured to, when continuously sending multiple data packets in the to-be-transmitted data, if it is monitored that there is first target response data in the transmission channel within the third preset time, then continue to send the data packets.

[0021] According to an embodiment of the present invention, the data transmission device further includes a judgment module, configured to, when it is monitored that there is no first target response data on the transmission channel within a third preset time or it is not monitored that the transmission channel remains idle for a third preset time within a second preset time, after delaying by a first preset multiple of the third preset time, determine again whether it is monitored that the transmission channel remains idle for a third preset time within the second preset time.

[0022] According to an embodiment of the present invention, when sending a data packet through the transmission channel every first preset time, the first sending module is further configured to: if it is monitored that there is second target response data on the transmission signal within the first preset time, continue to send data packets at intervals of the first preset time.

[0023] According to an embodiment of the present invention, the first determination module is further configured to, when it is monitored that there is no second target response data on the transmission channel within the first preset time or it is not monitored that the transmission channel remains idle for the first preset time, after delaying by a second preset multiple of the first preset time, determine the data priority of the data to be transmitted.

[0024] According to an embodiment of the present invention, the third preset time is the sum of the transmission delay and the processing delay between the two farthest transmission nodes in the communication network, the first preset time is a third preset multiple of the third preset time, and the second preset time is the sum of the first preset time, the longest data transmission delay, and the message response transmission delay.

[0025] To achieve the above object, a computer-readable storage medium provided by the third aspect embodiment of the present invention stores a data transmission program thereon, and when the data transmission program is executed by a processor, the above data transmission method is implemented.

[0026] According to the computer-readable storage medium of the embodiment of the present invention, based on the above data transmission method, data packets to be transmitted with a general priority are sent one by one every first preset time, so that there is an idle state lasting for the first preset time in the data transmission process of the transmission channel, so that data packets to be transmitted with a high priority can be sent preferentially, thereby ensuring that the data packets to be transmitted with a high priority reach the data receiving party in time.

[0027] To achieve the above object, a terminal device provided by the fourth aspect embodiment of the present invention includes a memory, a processor, and a data transmission program stored on the memory and executable on the processor. When the processor executes the data transmission program, the above data transmission method is implemented.

[0028] The terminal device according to an embodiment of the present invention, based on the above data transmission method, sends a data packet of general priority data every first preset time, so that the transmission channel has an idle state lasting for the first preset time during this data transmission process, so that the high-priority data to be transmitted can be preferentially sent, thereby ensuring that the high-priority data to be transmitted reaches the data receiver in time.

[0029] Additional aspects and advantages of the present invention will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present invention. Description of the Drawings

[0030] Figure 1 It is a flowchart of a data transmission method according to an embodiment of the present invention;

[0031] Figure 2 It is a flowchart of a data transmission method according to a specific embodiment of the present invention;

[0032] Figure 3 It is a flowchart of a data transmission method for high-priority data to be transmitted according to a specific embodiment of the present invention;

[0033] Figure 4 It is a block diagram of a data transmission device according to an embodiment of the present invention;

[0034] Figure 5 It is a block diagram of a terminal device according to an embodiment of the present invention. Detailed Embodiment

[0035] The embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and are intended to explain the present invention and should not be construed as limiting the present invention.

[0036] The data transmission method, data transmission device, computer-readable storage medium, and terminal device proposed by the embodiments of the present invention will be described below with reference to the drawings.

[0037] Figure 1 It is a flowchart of a data transmission method according to an embodiment of the present invention.

[0038] As Figure 1 shown, the data transmission method may include:

[0039] S1, determining the data priority of the current data to be transmitted.

[0040] That is to say, when performing data transmission, first classify the currently to-be-transmitted data according to the urgency of the information to determine the data priority. Among them, the data priority can be set at multiple levels according to actual application requirements. For example, the priority of the to-be-transmitted data can be divided into two levels: general priority and high priority, or the priority of the to-be-transmitted data can be divided into three levels: general priority, normal priority, and high priority.

[0041] In this embodiment, the to-be-transmitted data is classified into general priority and high priority according to the urgency. The data sending conditions for the two priorities are different. High-priority data can obtain the sending right. The following details the data transmission methods for general priority and high priority in this embodiment.

[0042] S2. When the data priority of the currently to-be-transmitted data is general priority and the currently to-be-transmitted data includes multiple data packets, if it is monitored that the transmission channel is continuously idle for a first preset time, then send one data packet through the transmission channel every first preset time, so that the transmission channel has an idle state lasting for the first preset time when sending the currently to-be-transmitted data, so as to facilitate the priority sending of high-priority to-be-transmitted data. Among them, the first preset time can be set according to the actual situation.

[0043] Specifically, when performing data transmission on the currently to-be-transmitted data with general priority and having multiple data packets, first monitor the transmission channel and start timing when there is no data transmission on the transmission channel. When it is monitored that the transmission channel is continuously idle for the first preset time, transmit the first data packet of the currently to-be-transmitted data. After the first data packet is transmitted, determine whether there are still data packets to be transmitted. If so, transmit the next data packet after an interval of the first preset time, and so on, until all data packets are transmitted, completing the data transmission of the to-be-transmitted data. That is to say, there is a time interval of the first preset time between adjacent data packets during the transmission process of the to-be-transmitted data with general priority. During the transmission of the to-be-transmitted data with general priority, if there is high-priority to-be-transmitted data waiting for data transmission, after the current data packet is transmitted, regardless of whether there is a next data packet, the high-priority to-be-transmitted data will be preferentially transmitted within the first preset time existing between adjacent data packets, thereby pausing the transmission of the next data packet of the to-be-transmitted data with general priority, so that the high-priority to-be-transmitted data can be sent first within the first preset time to ensure that the high-priority to-be-transmitted data has the priority sending right. Re-start timing when the transmission channel is idle again. When the transmission channel meets the idle state lasting for the first preset time, continue to send the next data packet of the above-mentioned to-be-transmitted data with general priority.

[0044] It should be noted that for the data transmission of the above-mentioned high-priority data to be transmitted, it is also necessary to first determine whether the transmission channel is idle without data transmission. The following will detail the data transmission method for high-priority data to be transmitted.

[0045] In an embodiment of the present invention, when the data priority of the current data to be transmitted is high priority and the data to be transmitted includes multiple data packets, if it is monitored that the transmission channel remains idle for a third preset time within a second preset time, then multiple data packets in the data to be transmitted are continuously sent through the transmission channel, where the second preset time is greater than the first preset time, and the first preset time is greater than the third preset time.

[0046] Specifically, when transmitting data of high priority with multiple data packets, first start monitoring the communication channel, using the second preset time as a single monitoring period. If the communication channel appears in an idle state for a continuous third preset time within the second preset time, when the continuous idle state meets the third preset time, start the data transmission operation of the data to be transmitted. There is no time interval between adjacent data packets, realizing the continuous transmission of high-priority data to be transmitted until all data packets in the data to be transmitted are transmitted.

[0047] To ensure the priority transmission of high-priority data, the third preset time should be the smallest and the second preset time should be the largest. In an embodiment of the present invention, the third preset time can be set as the sum of the transmission delay and the processing delay between the two farthest transmission nodes in the communication network. The first preset time is the third preset multiple of the third preset time, and the second preset time is the sum of the first preset time, the longest data transmission delay, and the message response transmission delay. Among them, the third preset multiple can be set according to actual applications. For example, the third preset multiple is 2.

[0048] Specifically, the data transmission process includes the data sending process of the data sender and the data receiving process of the data receiver. During the data transmission process, the data to be transmitted reaches the data receiver through the transmission channel. The data receiver receives and processes the data packet to generate corresponding response data, that is, a response signal, and feeds it back to the data sender.

[0049] The third preset time in the above-mentioned high-priority data transmission is the sum of the transmission time required for the farthest transmission distance in the communication network and the time for the data receiver to generate a response signal after receiving the transmitted data. The first preset time in the general-priority data transmission is the product of the third preset time and the third preset multiple. The above-mentioned second preset time is equal to the sum of the first preset time, the transmission time required for the largest data in network communication, and the transmission time for the receiving end to receive the transmitted data and generate a message response.

[0050] It should be noted that the third preset multiple should be greater than 1 to ensure that the first preset time is greater than the third preset time, meeting the priority sending requirement of high-priority data.

[0051] In an embodiment of the present invention, when continuously sending multiple data packets of data to be transmitted, if it is monitored that there is first target response data on the transmission channel within the third preset time, the data packet is continuously sent.

[0052] That is to say, during the continuous sending of data packets of high-priority data to be transmitted, when a data packet of the data to be transmitted is sent, the transmission channel is monitored for the third preset time. If the transmission channel receives, within the third preset time after the data packet is sent, a response signal (i.e., the first target response data) fed back by the data receiver due to receiving the data packet, it indicates that the communication is normal, and the data packet of the high-priority data to be transmitted is continuously transmitted.

[0053] In another embodiment of the present invention, when continuously sending multiple data packets of data to be transmitted, if it is not monitored that there is no first target response data on the transmission channel within the third preset time, or if it is not monitored that the transmission channel is continuously idle for the third preset time within the second preset time, after delaying by the first preset multiple of the third preset time, it is again determined whether the transmission channel is continuously idle for the third preset time within the second preset time. Herein, the first preset multiple can be set according to actual applications.

[0054] Specifically, during the data transmission of high-priority data to be transmitted, if the transmission channel does not receive the corresponding response signal fed back by the data receiver within the third preset time after a data packet is sent, it indicates a transmission failure and abnormal communication. For example, a communication error or information collision has occurred. At this time, the data to be transmitted needs to be resent. First, stop the continuous sending of the data to be transmitted. After delaying by the first preset multiple of the third preset time, the transmission channel is monitored for the second preset time to determine whether the transmission channel is continuously idle for the third preset time within the second preset time. If it is monitored that the transmission channel is continuously idle for the third preset time within the second preset time, the high-priority data to be transmitted is transmitted again, and the above data transmission process is repeated until all the data is transmitted.

[0055] If the above transmission channel monitors that the continuous idle time of the transmission channel does not meet the requirement of the third preset time within the second preset time. For example, there is high-priority data transmission on the transmission channel within the second preset time, that is, the transmission of consecutive data packets, and there is no continuous idle time of the transmission channel for the third preset time. At this time, delay the first preset multiple of the third preset time again and re-monitor the transmission channel for the second preset time. This cycle continues until it is monitored that the transmission channel is continuously idle for the third preset time within the second preset time, and the high-priority data to be transmitted continues to be transmitted according to the above transmission method.

[0056] It should be noted that the above monitoring process of the second preset time of the transmission channel is not only applied to the process of retransmitting data that has not been received by the data receiver during the high-priority data transmission process, but also can be applied to the monitoring and judgment process of the communication channel before the high-priority data to be transmitted starts.

[0057] In addition, it should be noted that the above first target response data corresponds to the data packets one by one. During the high-priority data transmission process, the data packets that have not received the corresponding first target response data and the subsequent data packets can be retransmitted with a delay according to the above operations, or the entire data to be transmitted can be retransmitted.

[0058] Furthermore, it should be noted that the above first preset multiple can be a random positive integer, and the upper limit of the value is determined by the amount of emergency data in the communication network.

[0059] During the data transmission process of the data to be transmitted with general priority, when the data receiver receives the data packet of the data to be transmitted, it will also generate a corresponding response signal and feedback the response signal to the data sender. According to an embodiment of the present invention, when sending a data packet through the transmission channel every first preset time, if it is monitored that there is second target response data in the first preset time for the transmission signal, continue to send data packets at intervals of the first preset time.

[0060] That is to say, when a data packet of the data to be transmitted with general priority is sent through the transmission channel and the communication channel is monitored for the first preset time, if the communication channel receives the corresponding response signal, that is, the second target response data, feedback by the data receiver within the first preset time, it indicates that the communication is normal, and the data to be transmitted continues to be transmitted according to the preset data packet sending interval, that is, the first preset time.

[0061] According to an embodiment of the present invention, when sending a data packet through a transmission channel every first preset time, if no second target response data is monitored on the transmission channel within the first preset time or the transmission channel is not monitored to be continuously idle for the first preset time, after delaying by a second preset multiple of the first preset time, determine the data priority of the data to be transmitted. Wherein, the second preset multiple can be set according to the actual situation.

[0062] Specifically, if no corresponding response signal is monitored on the transmission channel within the first preset time after the data packet is sent, it is determined that the communication is abnormal. For example, there is high-priority data to be transmitted in the communication channel or an error occurs in the communication. At this time, after delaying by a second preset multiple of the first preset time, return to step S1 again.

[0063] In addition, if the communication channel is not monitored to be continuously idle for the first preset time before the general-priority data to be transmitted is sent, it will also be delayed by a second preset multiple of the first preset time, and then return to step S1 to re-determine the data priority.

[0064] It should be noted that the above-mentioned second target response data corresponds to the data packet one by one. During the transmission of general-priority data, the data packet for which the second target response data is not received and the subsequent unsent data packets can be resent according to the above operations, or the entire data of the data to be transmitted can be resent.

[0065] It should be further noted that the above-mentioned second preset multiple can be a random positive integer, and the upper limit of the value is determined by the amount of emergency data in the communication network.

[0066] As a specific embodiment of the present invention, as Figure 2 and Figure 3 shown, the data transmission method includes the following steps: where the first preset time is T1, the second preset time is T2, and the third preset time is T3.

[0067] S101, Prepare for data transmission.

[0068] S102, Determine whether the data priority of the current data to be transmitted is high priority. If so, execute step S103; if not, execute step S104.

[0069] S103, High-priority data transmission process.

[0070] S104, Determine whether there is data within the T1 time of the transmission channel. If so, execute step S105; if not, execute step S106.

[0071] S105, Generate a random number N, and delay for (N * T1) time, and execute step S102.

[0072] S106, Send an information message.

[0073] S107, Determine whether there is second target response data within time T1. If so, execute step S108; if not, execute step S105.

[0074] S108, Determine whether there are data packets to be sent continuously and there is no high-priority data to be sent. If so, execute step S109; if not, execute step S110.

[0075] S109, Determine whether there is data within the listening time T1. If so, execute step S105; if not, execute step S106.

[0076] S110, This data transmission is completed.

[0077] Among them, as Figure 3 shown, the above high-priority data transmission process includes the following steps:

[0078] S201, Prepare for high-priority data transmission;

[0079] S202, Determine whether there is no data transmission for a continuous T3 time within the listening time T2. If so, execute step S203; if not, execute step S204.

[0080] S203, Send an information message.

[0081] S204, Generate a random number N, and delay for (N * T3) time, then execute step S202.

[0082] S205, Determine whether there is first target response data within the listening time T3. If so, execute step S206; if not, execute step S204.

[0083] S206, Determine whether there are data packets to be sent continuously. If so, execute step S203; if not, execute step S207.

[0084] S207, This data transmission is completed.

[0085] Furthermore, as Figure 2 and Figure 3 shown, the operation steps of the data receiver are as follows:

[0086] S301, Wait for data reception;

[0087] S302, Determine whether data directed to the receiver is received. If so, execute step S302; if not, execute step S302.

[0088] S303, immediate response.

[0089] S304, the current data reception is completed.

[0090] In summary, according to the data transmission method of the embodiments of the present invention, first, the data priority of the currently to-be-transmitted data is determined. Then, when the data priority of the currently to-be-transmitted data is the general priority and the currently to-be-transmitted data includes multiple data packets, if it is monitored that the transmission channel is continuously idle for a first preset time, then a data packet is sent through the transmission channel every first preset time, so that the transmission channel has an idle state that lasts for the first preset time when sending the currently to-be-transmitted data, so that the to-be-transmitted data with a high priority can be preferentially sent. Thus, this method enables the to-be-transmitted data with a general priority to send a data packet every first preset time, and makes the transmission channel have an idle state that lasts for the first preset time during the data transmission process, so that the to-be-transmitted data with a high priority can be preferentially sent, thereby ensuring that the to-be-transmitted data with a high priority reaches the data receiver in time. In addition, the processing logic of this method is simple and easy to implement.

[0091] Corresponding to the above embodiments, the present invention also proposes a data transmission device.

[0092] As Figure 4 shown, the data transmission device of the present invention may include: a first determination module 10 and a first transmission module 20.

[0093] Among them, the first determination module 10 determines the data priority of the currently to-be-transmitted data. The first transmission module 20 is configured to, when the data priority of the currently to-be-transmitted data is the general priority and the currently to-be-transmitted data includes multiple data packets, if it is monitored that the transmission channel is continuously idle for a first preset time, then a data packet is sent through the transmission channel every first preset time, so that the transmission channel has an idle state that lasts for the first preset time when sending the currently to-be-transmitted data, so that the to-be-transmitted data with a high priority can be preferentially sent.

[0094] According to an embodiment of the present invention, the first transmission module 20 is further configured to, when the data priority of the currently to-be-transmitted data is the high priority and the to-be-transmitted data includes multiple data packets, if it is monitored that the transmission channel is continuously idle for a third preset time within a second preset time, then multiple data packets in the to-be-transmitted data are continuously sent through the transmission channel, where the second preset time is greater than the first preset time, and the first preset time is greater than the third preset time.

[0095] According to an embodiment of the present invention, the first transmission module 20 is further configured to, when continuously sending multiple data packets in the to-be-transmitted data, if it is monitored that there is first target response data in the transmission channel within the third preset time, then continue to send data packets.

[0096] According to an embodiment of the present invention, the data transmission device further includes a judging module, configured to, when it is monitored that there is no first target response data on the transmission channel within a third preset time or it is not monitored that the transmission channel remains idle for a third preset time within a second preset time, delay by a first preset multiple of the third preset time and then judge again whether it is monitored that the transmission channel remains idle for a third preset time within the second preset time.

[0097] According to an embodiment of the present invention, when sending a data packet through the transmission channel every first preset time, the first sending module 20 is further configured to: if it is monitored that there is second target response data on the transmission signal within the first preset time, continue to send data packets at intervals of the first preset time.

[0098] According to an embodiment of the present invention, the first determining module 10 is further configured to, when it is monitored that there is no second target response data on the transmission channel within the first preset time or it is not monitored that the transmission channel remains idle for the first preset time, delay by a second preset multiple of the first preset time and then determine the data priority of the data to be transmitted.

[0099] According to an embodiment of the present invention, the third preset time is the sum of the transmission delay and the processing delay between the two farthest transmission nodes in the communication network, the first preset time is a third preset multiple of the third preset time, and the second preset time is the sum of the first preset time, the longest data transmission delay, and the message response transmission delay.

[0100] It should be noted that for the details not disclosed in the data transmission device in the embodiments of the present invention, please refer to the details disclosed in the data transmission method in the above embodiments of the present invention, and details are not described herein again.

[0101] In summary, according to the data transmission device in the embodiments of the present invention, the first determining module determines the data priority of the currently to-be-transmitted data. When the data priority of the currently to-be-transmitted data is the general priority and the currently to-be-transmitted data includes multiple data packets, the first sending module, if it is monitored that the transmission channel remains idle for the first preset time, sends a data packet through the transmission channel every first preset time, so that there is an idle state lasting for the first preset time on the transmission channel when sending the currently to-be-transmitted data, so that the to-be-transmitted data with a high priority can be preferentially sent. Thus, the device makes the to-be-transmitted data with the general priority send a data packet every first preset time, so that there is an idle state lasting for the first preset time during the data transmission process, so that the to-be-transmitted data with a high priority can be preferentially sent, thereby ensuring that the to-be-transmitted data with a high priority reaches the data receiver in time.

[0102] Corresponding to the above embodiments, the present invention also proposes a computer-readable storage medium.

[0103] The computer-readable storage medium according to the embodiment of the present invention stores a data transmission program thereon. When the data transmission program is executed by a processor, the above-mentioned data transmission method is implemented.

[0104] According to the computer-readable storage medium of the embodiment of the present invention, based on the above data transmission method, the data to be transmitted with a general priority sends a data packet every first preset time, so that the transmission channel has an idle state lasting for the first preset time during the data transmission process, so that the data to be transmitted with a high priority can be preferentially transmitted, thereby ensuring that the data to be transmitted with a high priority reaches the data receiving party in time.

[0105] Corresponding to the above embodiment, the present invention also proposes a terminal device.

[0106] As Figure 5 shown, the terminal device 100 according to the embodiment of the present invention includes a memory 110, a processor 120, and a data transmission program stored on the memory 110 and executable on the processor 120. When the processor 120 executes the data transmission program, the above-mentioned data transmission method is implemented.

[0107] According to the terminal device of the embodiment of the present invention, based on the above data transmission method, the data to be transmitted with a general priority sends a data packet every first preset time, so that the transmission channel has an idle state lasting for the first preset time during the data transmission process, so that the data to be transmitted with a high priority can be preferentially transmitted, thereby ensuring that the data to be transmitted with a high priority reaches the data receiving party in time.

[0108] Note that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in combination with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in combination with an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of the computer-readable medium include the following: an electrical connection portion having one or more wirings (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable medium on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpretation, or otherwise processing as appropriate, and then storing it in a computer memory.

[0109] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0110] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0111] In addition, the terms "first" and "second" are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0112] In the present invention, unless otherwise clearly specified and limited, terms such as "mounted", "connected", "coupled", "fixed", etc. should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or integrated; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the internal communication of two components or the interaction relationship between two components, unless otherwise clearly limited. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0113] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

Claims

1. A data transmission method, characterized in that, it includes: Determine the data priority of the current data to be transmitted; When the data priority of the current data to be transmitted is the general priority and the current data to be transmitted includes multiple data packets, if it is monitored that the transmission channel is continuously idle for a first preset time, then send a data packet through the transmission channel every first preset time, so that the transmission channel has an idle state for a continuous first preset time when sending the current data to be transmitted, so that the data to be transmitted with a high priority can be preferentially sent; When the data priority of the current data to be transmitted is the high priority and the data to be transmitted includes multiple data packets, if it is monitored that the transmission channel is continuously idle for a third preset time within a second preset time, then continuously send multiple data packets in the data to be transmitted through the transmission channel, where the second preset time is greater than the first preset time, and the first preset time is greater than the third preset time; The third preset time is the sum of the transmission delay and the processing delay between the two farthest transmission nodes in the communication network, the first preset time is the third preset multiple of the third preset time, and the second preset time is the sum of the first preset time, the longest data transmission delay, and the message response transmission delay.

2. The data transmission method according to claim 1, characterized in that, When continuously sending multiple data packets in the data to be transmitted, if it is monitored that there is first target response data in the transmission channel within the third preset time, continue to send the data packet.

3. The data transmission method according to claim 1, characterized in that, When continuously sending multiple data packets in the data to be transmitted, if it is not monitored that there is first target response data in the transmission channel within the third preset time, or if it is not monitored that the transmission channel is continuously idle for the third preset time within the second preset time, after delaying the first preset multiple of the third preset time, determine again whether it is monitored that the transmission channel is continuously idle for the third preset time within the second preset time.

4. The data transmission method according to claim 1, characterized in that, When sending a data packet through the transmission channel every first preset time, if it is monitored that there is second target response data in the transmission signal within the first preset time, continue to send the data packet at intervals of the first preset time.

5. The data transmission method according to claim 1, characterized in that, When sending a data packet through the transmission channel every first preset time, if it is not monitored that there is second target response data in the transmission channel within the first preset time or it is not monitored that the transmission channel is continuously idle for the first preset time, after delaying the second preset multiple of the first preset time, determine the data priority of the data to be transmitted.

6. A data transmission device, characterized in that, it includes: A first determination module, used to determine the data priority of the current data to be transmitted; A first sending module, configured to, when the data priority of the currently to-be-transmitted data is medium priority and the currently to-be-transmitted data includes multiple data packets, if it is monitored that the transmission channel remains idle for a first preset time, send one data packet through the transmission channel every the first preset time, so that the transmission channel has an idle state lasting for the first preset time when sending the currently to-be-transmitted data, so as to facilitate the priority sending of the to-be-transmitted data with high priority; When the data priority of the currently to-be-transmitted data is high priority and the to-be-transmitted data includes multiple data packets, if it is monitored that the transmission channel remains idle for a third preset time within a second preset time, continuously send multiple of the data packets in the to-be-transmitted data through the transmission channel, where the second preset time is greater than the first preset time, and the first preset time is greater than the third preset time; The third preset time is the sum of the transmission delay and the processing delay between the two farthest transmission nodes in the communication network, the first preset time is a third preset multiple of the third preset time, and the second preset time is the sum of the first preset time, the longest data transmission delay, and the message response transmission delay.

7. The data transmission device according to claim 6, wherein, When continuously sending multiple data packets in the to-be-transmitted data, the first sending module is further configured to, if it is monitored that there is first target response data on the transmission channel within the third preset time, continue to send the data packet.

8. The data transmission device according to claim 7, wherein, further includes: A judgment module, configured to, when it is monitored that there is no first target response data on the transmission channel within the third preset time, or when it is not monitored that the transmission channel remains idle for the third preset time within the second preset time, delay by a first preset multiple of the third preset time, and then judge again whether it is monitored that the transmission channel remains idle for the third preset time within the second preset time.

9. The data transmission device according to claim 6, wherein, When sending one data packet through the transmission channel every the first preset time, the first sending module is further configured to: If it is monitored that there is second target response data on the transmission signal within the first preset time, continue to send the data packet at intervals of the first preset time.

10. The data transmission device according to claim 9, wherein, The first determination module is further configured to, when it is monitored that there is no second target response data on the transmission channel within the first preset time or it is not monitored that the transmission channel remains idle for the first preset time, delay by a second preset multiple of the first preset time, and then determine the data priority of the to-be-transmitted data.

11. A computer-readable storage medium, wherein, A data transmission program is stored thereon, and when the data transmission program is executed by a processor, it implements the data transmission method according to any one of claims 1-5.

12. A terminal device, wherein, It includes a memory, a processor, and a data transmission program stored in the memory and executable on the processor. When the processor executes the data transmission program, it implements the data transmission method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Data transmission method, electronic equipment and storage medium

    CN111209240A

  • Point to multi-point channel allocation method, apparatus, and system

    WO2018107370A1