Communication data transmission method, apparatus, device, and medium
By obtaining the priority and transmission failure rate of communication data in the ad hoc network, determining whether to delay transmission, and using the EDCA scheme of the CSMA network to send data, the problem of low success rate of high-priority communication data is solved, and efficient data transmission is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN CONSYS SCI&TECH CO LTD
- Filing Date
- 2023-06-09
- Publication Date
- 2026-04-28
AI Technical Summary
In ad hoc networks, when multiple communication data are sent simultaneously, the success rate of sending high-priority data is low, and existing technologies have not been able to effectively solve this problem.
By obtaining the priority and transmission failure rate of the target communication data, it is determined whether a delay in transmission is necessary. If no delay is required, the data is transmitted according to the EDCA scheme of the CSMA network to ensure the success rate of high-priority data.
It improved the success rate of sending high-priority communication data, ensuring the timeliness and service quality of communication data.
Smart Images

Figure CN116744465B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a communication data transmission method, apparatus, device and medium. Background Technology
[0002] With the development of technology, communication data has evolved to the point where it can be transmitted during the Enhanced Distributed Channel Access (EDCA) process in Carrier Sense Multiple Access (CSMA) networks.
[0003] In existing technologies, when a node device in an ad hoc network transmits communication data, the enhanced distributed channel needs to remain idle for a period of time. The duration of this period is equal to the arbitration inter-frame interval corresponding to the Access Category (AC) of the communication data. Then, a random backoff value corresponding to the Access Category of the communication data is determined. For each idle time slot of the enhanced distributed channel, the random backoff value is decremented by one. When the random backoff value reaches 0, the communication data is transmitted.
[0004] However, when multiple pieces of communication data need to be sent, they may be sent simultaneously. The priority of the communication data sent at the same time may be different, which will result in a lower success rate for sending high-priority communication data. Summary of the Invention
[0005] This application provides a communication data transmission method, apparatus, device, and medium to address the problem that in existing communication data transmission, simultaneous transmissions may occur, and the priorities of the simultaneously transmitted communication data may differ, resulting in a low success rate for high-priority communication data.
[0006] In a first aspect, embodiments of this application provide a communication data transmission method, including:
[0007] Acquire target communication data and start timing;
[0008] When it is detected that the target communication data needs to be sent, the target priority of the target communication data is obtained;
[0009] Based on the pre-obtained set of communication data transmission failure counts corresponding to all priorities, determine the communication data transmission failure rate corresponding to all priorities;
[0010] Based on the target priority, the communication data transmission failure rate corresponding to all priorities, and the pre-acquired transmission failure rate threshold corresponding to the target priority, determine whether it is necessary to delay the transmission of the target communication data;
[0011] If it is determined that there is no need to delay the transmission of the target communication data, obtain the timing duration and the preset discard duration threshold corresponding to the data type of the target communication data;
[0012] If the timing duration is less than the preset discard duration threshold, the target communication data is sent according to the Enhanced Distributed Channel Access (EDCA) scheme of the Carrier Sense Multiple Access (CSMA) network.
[0013] In one specific implementation, the step of determining the communication data transmission failure rate corresponding to all priorities based on a pre-acquired set of communication data transmission failure counts corresponding to all priorities includes...
[0014] The quotient of the preset calculation failure rate duration and the preset statistical duration is determined as the target number, wherein the preset calculation failure rate duration is an integer multiple of the preset statistical duration;
[0015] For each priority, the sum of the number of communication data transmission failures of the target number of times is obtained from the set of communication data transmission failure counts corresponding to the priority and the time closest to the current time, and is determined as the target transmission failure count corresponding to the priority;
[0016] From the set of communication data transmission counts corresponding to the priority, obtain the sum of the number of communication data transmission counts of the target number of times the time is closest to the current time, and determine it as the total number of transmissions;
[0017] For each priority, the ratio of the number of target transmission failures corresponding to that priority to the total number of transmissions is determined as the communication data transmission failure rate corresponding to that priority.
[0018] In one specific implementation, determining whether to delay sending the target communication data based on the target priority, the communication data transmission failure rate corresponding to all priorities, and a pre-acquired transmission failure rate threshold corresponding to the target priority includes:
[0019] The target transmission failure rate is determined by the sum of the communication data transmission failure rate corresponding to the target priority and the communication data transmission failure rate corresponding to the priority higher than the target priority.
[0020] If the target transmission failure rate is greater than the transmission failure rate threshold corresponding to the target priority, then it is determined that the transmission of the target communication data needs to be delayed.
[0021] If the target transmission failure rate is less than or equal to the transmission failure rate threshold corresponding to the target priority, then it is determined that there is no need to delay the transmission of the target communication data.
[0022] In one specific embodiment, the method further includes:
[0023] If it is determined that the target communication data needs to be delayed, monitor whether the target communication data needs to be sent.
[0024] When it is detected that the target communication data needs to be sent, it is determined whether the sending of the target communication data needs to be delayed based on the target priority, the communication data sending failure rate corresponding to all priorities obtained in advance, and the sending failure rate threshold corresponding to all priorities obtained in advance.
[0025] If it is determined that there is no need to delay sending the target communication data, obtain the timing duration;
[0026] If the timing duration is less than the preset discard duration threshold, the target communication data is sent according to the EDCA scheme of the CSMA network.
[0027] In one specific embodiment, the method further includes:
[0028] If the timing duration is greater than or equal to the preset discard duration threshold, the target communication data will be discarded.
[0029] In one specific embodiment, the method further includes:
[0030] If it is determined that the target communication data needs to be delayed, then the system re-monitors whether the target communication data needs to be sent. If it is detected that the target communication data needs to be sent, it is determined whether the target communication data needs to be delayed. If it is determined that the target communication data needs to be delayed, this step is repeated until it is determined that the target communication data does not need to be delayed. The timing duration is obtained. If the timing duration is less than the preset discarding duration threshold, the target communication data is sent. If the timing duration is greater than or equal to the preset discarding duration threshold, the target communication data is discarded.
[0031] In one specific embodiment, the method further includes:
[0032] After power-on, at preset statistical intervals, the number of communication data transmission failures and the number of communication data transmissions corresponding to each priority are obtained within the preset statistical interval, and the acquisition time corresponding to the number of communication data transmission failures and the acquisition time corresponding to the number of communication data transmissions are recorded.
[0033] Determine if the link is broken;
[0034] If the link is disconnected, the number of communication data transmission failures and the number of communication data transmissions corresponding to each priority are marked as meaningless data.
[0035] In one specific embodiment, the method further includes:
[0036] If the link is not disconnected, for each priority, the number of communication data transmission failures corresponding to the priority is stored in the communication data transmission failure count set corresponding to the priority, and the number of communication data transmissions corresponding to the priority is stored in the communication data transmission count set corresponding to the priority.
[0037] Secondly, embodiments of this application provide a communication data transmission device, comprising:
[0038] The acquisition module is used to acquire target communication data;
[0039] The timing module is used for timing.
[0040] The acquisition module is also used to acquire the target priority of the target communication data when it is detected that the target communication data needs to be sent.
[0041] Processing module, used for:
[0042] Based on the pre-obtained set of communication data transmission failure counts corresponding to all priorities, determine the communication data transmission failure rate corresponding to all priorities;
[0043] Based on the target priority, the communication data transmission failure rate corresponding to all priorities, and the pre-acquired transmission failure rate threshold corresponding to the target priority, determine whether it is necessary to delay the transmission of the target communication data;
[0044] The acquisition module is further configured to determine if it is determined that there is no need to delay the transmission of the target communication data, and to obtain the timing duration and the preset discard duration threshold corresponding to the data type of the target communication data;
[0045] The sending module is used to send the target communication data according to the Enhanced Distributed Channel Access (EDCA) scheme if the timing duration is less than the preset discard duration threshold.
[0046] Thirdly, embodiments of this application provide an electronic device, including:
[0047] Processor, memory, communication interface;
[0048] The memory is used to store the executable instructions of the processor;
[0049] The processor is configured to execute the communication data transmission method according to any one of the first aspects by executing the executable instructions.
[0050] Fourthly, embodiments of this application provide a readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the communication data transmission method described in any of the first aspects.
[0051] Fifthly, embodiments of this application provide a computer program product, including a computer program, which, when executed by a processor, is used to implement the communication data transmission method described in any of the first aspects.
[0052] The communication data transmission method, apparatus, device, and medium provided in this application embodiment time-track when target communication data is acquired, and acquire its target priority when it is detected that target communication data needs to be sent. Then, based on the set of communication data transmission failure counts corresponding to all priorities and the set of communication data transmission failure counts corresponding to all priorities, the communication data transmission failure rate corresponding to all priorities is determined. Then, based on the target priority, the communication data transmission failure rate corresponding to all priorities, and the transmission failure rate threshold corresponding to the target priority, it is determined whether the transmission of target communication data needs to be delayed. If it is determined that the transmission of target communication data does not need to be delayed, the timing duration and the preset discard duration threshold corresponding to the data type of the target communication data are acquired. If the timing duration is less than the preset discard duration threshold, the target communication data is sent according to the EDCA scheme of the CSMA network. This scheme, by determining the communication data transmission failure rate and then sending the target communication data when it is determined that the transmission of target communication data does not need to be delayed, can effectively improve the success rate of high-priority communication data transmission. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 A timing diagram of transmitting communication data in the prior art provided in this application;
[0055] Figure 2 A flowchart illustrating an embodiment of the communication data transmission method provided in this application;
[0056] Figure 3 A flowchart illustrating Embodiment 2 of the communication data transmission method provided in this application;
[0057] Figure 4 A flowchart illustrating Embodiment 3 of the communication data transmission method provided in this application;
[0058] Figure 5 A schematic diagram of the structure of an embodiment of the communication data transmission device provided in this application;
[0059] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments made by those skilled in the art under the guidance of these embodiments are within the scope of protection of this application.
[0061] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0062] With the development of technology, in ad hoc networks, each node device can send communication data during the Enhanced Distributed Channel Access (EDCA) process in a Carrier Sense Multiple Access (CSMA) network.
[0063] For example, Figure 1 A timing diagram illustrating the transmission of communication data in the prior art provided in this application, as shown below. Figure 1 As shown, when it is necessary to send communication data, that is... Figure 1At point A, the enhanced distributed channel needs to remain idle for a period of time, the duration of which is equal to the arbitration inter-frame interval corresponding to the Access Category (AC) of the communication data. Then, at point B, the random backoff value corresponding to the Access Category of the communication data needs to be determined. For each idle time slot, the random backoff value is decremented by one. When the random backoff value reaches 0, point C is reached. The duration between points B and C is called the backoff duration. The communication data is then transmitted at point C.
[0064] However, when multiple pieces of communication data need to be sent, they may be sent simultaneously. The priority of the communication data sent at the same time may be different, which will lead to a lower success rate for sending high-priority communication data.
[0065] To address the problems existing in the prior art, the inventors, during their research on communication data transmission methods, discovered that when communication data needs to be sent, the target transmission failure rate of the communication data can be calculated. When the target transmission failure rate is low, there is no need to delay the transmission of the target communication data, and the target communication data is sent according to the EDCA scheme. Timing is started when the target communication data to be sent is acquired, and the target priority of the target communication data is obtained when it is detected that the target communication data needs to be sent. Then, the transmission failure rate of communication data corresponding to all priorities is determined. Based on the target priority, the transmission failure rate of communication data corresponding to all priorities, and the pre-acquired transmission failure rate threshold corresponding to the target priority, it is determined whether the transmission of the target communication data needs to be delayed. If it is determined that the transmission of the target communication data does not need to be delayed, the timing duration and the preset discard duration threshold corresponding to the data type of the target communication data are obtained. If the timing duration is less than the preset discard duration threshold, the target communication data is sent according to the EDCA scheme. Sending the target communication data when it is determined that there is no need to delay the transmission of the target communication data, that is, when the target transmission failure rate is low, can effectively improve the success rate of high-priority communication data transmission. Based on the above inventive concept, the communication data transmission scheme in this application was designed.
[0066] In this application, the entity executing the communication data transmission method is a node device in an ad hoc network. The node device can be a user equipment (UE), or it can be a vehicle, drone, or other equipment. This application does not limit it.
[0067] The following provides examples illustrating the application scenarios of the communication data transmission method provided in this application.
[0068] For example, in this application scenario, node device A in the ad hoc network needs to send target communication data to node device B.
[0069] When node device A acquires target communication data, it starts timing to monitor whether the target communication data needs to be sent. If it detects that the target communication data needs to be sent, it acquires the target priority of the target communication data. Then, based on the pre-acquired set of communication data transmission failure counts corresponding to all priorities and the pre-acquired set of communication data transmission failure counts corresponding to all priorities, it determines the communication data transmission failure rate corresponding to all priorities.
[0070] Then, based on the target priority, the communication data transmission failure rate corresponding to all priorities, and the pre-obtained transmission failure rate threshold corresponding to the target priority, the target transmission failure rate is determined, and then it is determined whether the transmission of target communication data needs to be delayed.
[0071] Once it is determined that there is no need to delay the transmission of target communication data, the timing duration and the preset discard duration threshold corresponding to the data type of the target communication data are obtained. If the timing duration is less than the preset discard duration threshold, the target communication data is sent to node device B according to the EDCA scheme of the CSMA network. This means that the enhanced distributed channel needs to be idle for a continuous period of time, the length of which is the arbitration inter-frame interval corresponding to the access category of the target communication data. Then, the random backoff value corresponding to the access category of the target communication data is determined. For each idle time slot of the enhanced distributed channel, the random backoff value is decremented by one. When the random backoff value is 0, the target communication data is transmitted.
[0072] It should be noted that the above scenario is only an example of an application scenario provided by the embodiments of this application. The embodiments of this application do not limit the actual form of the various devices included in the scenario. In the specific application of the solution, it can be set according to actual needs.
[0073] The technical solution of this application will now be described in detail through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0074] Figure 2 This is a flowchart illustrating a first embodiment of the communication data transmission method provided in this application. This embodiment describes how a node device, when needing to send target communication data, determines whether a delay in transmission is necessary, and then sends the target communication data according to the EDCA scheme when no delay is required. The method in this embodiment can be implemented through software, hardware, or a combination of both. Figure 2 As shown, the communication data transmission method specifically includes the following steps:
[0075] S201: Acquire target communication data and start timing.
[0076] In this step, the node devices in the ad hoc network will send communication data, which requires first acquiring the target communication data and then timing it.
[0077] It should be noted that the communication data can be video data, text data, control commands, maintenance data, etc. This application embodiment does not limit the communication data, and it can be determined according to the actual situation.
[0078] S202: When it is detected that target communication data needs to be sent, obtain the target priority of the target communication data.
[0079] In this step, when the node device acquires the target communication data, it can determine when to send the communication data based on the idle status of the enhanced distributed channel. This enables it to monitor whether communication data needs to be sent. When the channel is idle and there is communication data to be sent, it can detect that communication data needs to be sent.
[0080] When a node device detects that communication data needs to be sent, that is, when the EDCA process can be initiated, the target priority of the target communication data to be sent is obtained before the EDCA process begins. Based on the access category corresponding to the target communication data, the priority corresponding to that access category is determined, which is the target priority.
[0081] It should be noted that priority can be represented by numbers; the smaller the number, the higher the priority.
[0082] S203: Determine the communication data transmission failure rate for all priorities based on the pre-acquired set of communication data transmission failure counts for all priorities and the pre-acquired set of communication data transmission failure counts for all priorities.
[0083] In this step, when the node device detects that communication data needs to be sent, it will also determine the communication data transmission failure rate for all priorities based on the pre-acquired set of communication data transmission failure counts for all priorities.
[0084] Specifically, the quotient of the preset calculation failure rate duration and the preset statistical duration is determined as the target number, and the preset calculation failure rate duration is an integer multiple of the preset statistical duration;
[0085] For each priority, the sum of the number of communication data transmission failures of the target number of the nearest time to the current time is obtained from the set of communication data transmission failure counts corresponding to the priority, and this sum is determined as the target transmission failure count corresponding to that priority.
[0086] The total number of transmissions is determined by summing the transmission counts of the nearest target number of communication data transmissions at the current time from the set of transmission counts corresponding to all priorities. In other words, for each priority's set of transmission counts, the transmission counts of the nearest target number of communication data transmissions at the current time are extracted, and then these transmission counts are summed to obtain the total number of transmissions.
[0087] For each priority, the ratio of the number of target transmission failures to the total number of transmissions corresponding to that priority is determined as the communication data transmission failure rate corresponding to that priority.
[0088] For example, if the priority is 0, the target transmission failure count is 10, and the total number of transmissions is 1000, then the communication data transmission failure rate corresponding to this priority is 10 / 1000=1%.
[0089] It should be noted that the preset calculation failure rate duration can be 80 milliseconds, or it can be 100 milliseconds, 200 milliseconds, etc. This application embodiment does not limit the preset calculation failure rate duration, and it can be set according to the actual situation.
[0090] It should be noted that the preset statistical duration can be 10 milliseconds, or it can be 20 milliseconds, 40 milliseconds, etc. This application embodiment does not limit the preset statistical duration and can be set according to the actual situation.
[0091] It should be noted that the execution order of the steps for obtaining the target priority of the target communication data and step S203 can be as follows: the step for obtaining the target priority of the target communication data can be executed first, followed by step S203; step S203 can be executed first, followed by step S203; or the steps for obtaining the target priority of the target communication data and step S203 can be executed simultaneously. This application embodiment does not limit the execution order of the steps for obtaining the target priority of the target communication data and step S203, and can be set according to the actual situation.
[0092] S204: Based on the target priority, the communication data transmission failure rate corresponding to all priorities, and the pre-acquired transmission failure rate threshold corresponding to the target priority, determine whether it is necessary to delay the transmission of target communication data.
[0093] In this step, after determining the target priority and the communication data transmission failure rate corresponding to all priorities, the node device can determine whether it is necessary to delay the transmission of target communication data based on the target priority, the communication data transmission failure rate corresponding to all priorities, and the pre-acquired transmission failure rate threshold corresponding to the target priority.
[0094] Specifically, the target transmission failure rate is determined by the sum of the communication data transmission failure rate corresponding to the target priority and the communication data transmission failure rate corresponding to the priority higher than the target priority.
[0095] If the target transmission failure rate is greater than the transmission failure rate threshold corresponding to the target priority, it is determined that the transmission of target communication data needs to be delayed.
[0096] If the target transmission failure rate is less than or equal to the transmission failure rate threshold corresponding to the target priority, then it is determined that there is no need to delay the transmission of target communication data.
[0097] That is, judging inequalities Whether it is true or not, among which, Indicates target priority. The larger the value, the lower the priority. Indicates priority The corresponding communication data transmission failure rate, This represents the transmission failure rate threshold corresponding to the target priority. If the inequality holds, it is determined that the target communication data does not need to be delayed. If the inequality does not hold, it is determined that the target communication data needs to be delayed.
[0098] For example, the target priority is 1, the corresponding failure rate threshold for sending the target priority is 35%, the failure rate for sending communication data corresponding to priority 0 is 1%, and the failure rate for sending communication data corresponding to priority 1 is 6%. 1% + 6% = 7% < 35%, so there is no need to delay sending the target communication data.
[0099] For example, the target priority is 1, the corresponding failure rate threshold for sending the target priority is 35%, the failure rate for sending communication data corresponding to priority 0 is 10%, and the failure rate for sending communication data corresponding to priority 1 is 30%. 10% + 30% = 40% > 35%, so it is necessary to delay sending the target communication data.
[0100] It should be noted that the higher the priority, the lower the corresponding transmission failure rate threshold. For example, when the priority is 0, the corresponding transmission failure rate threshold is 3%; when the priority is 1, the corresponding transmission failure rate threshold is 10%. This application embodiment does not specifically limit the representation of priority or the corresponding transmission failure rate threshold, which can be set according to the actual situation.
[0101] S205: If it is determined that there is no need to delay the transmission of target communication data, obtain the timing duration and the preset discard duration threshold corresponding to the data type of the target communication data.
[0102] In this step, when the node device determines that there is no need to delay the transmission of the target communication data, it can obtain the timing duration since the timing has started when the target communication data is acquired, and it can also obtain the preset discard duration threshold corresponding to the data type of the target communication data.
[0103] For example, when the target communication data is call data, the preset discarding time threshold is 80 milliseconds; when the target communication data is service data, the preset discarding time threshold is 60 milliseconds; and when the target communication data is emergency data, the preset discarding time threshold is 20 milliseconds. This application does not limit the data type of the target communication data or the preset discarding time threshold; these can be set according to actual conditions.
[0104] S206: If the timing duration is less than the preset discard duration threshold, send the target communication data according to the EDCA scheme of the CSMA network.
[0105] In this step, when the node device determines that the timing duration is less than the preset discard duration threshold, it sends the target communication data according to the EDCA scheme of the CSMA network. This means that the enhanced distributed channel needs to remain idle for a certain period, the length of which is the arbitration inter-frame interval corresponding to the access class of the target communication data. Then, the random backoff value corresponding to the access class of the target communication data is determined. For each idle time slot of the enhanced distributed channel, the random backoff value is decremented by one. When the random backoff value is 0, the target communication data is sent.
[0106] It should be noted that if the timing duration is greater than or equal to the preset discard duration threshold, it means that the target communication data has expired, and the target communication data will be discarded.
[0107] It should be noted that when sending target communication data or discarding target communication data, the timer can be stopped and reset to zero.
[0108] The communication data transmission method provided in this embodiment starts timing when target communication data is acquired, and obtains the target priority of the target communication data when it is detected that target communication data needs to be sent. It also needs to determine the communication data transmission failure rate corresponding to all priorities based on a pre-acquired set of communication data transmission failure counts corresponding to all priorities and a pre-acquired set of communication data transmission failure counts corresponding to all priorities. Then, based on the target priority, the communication data transmission failure rate corresponding to all priorities, and a pre-acquired transmission failure rate threshold corresponding to the target priority, it is determined whether the transmission of the target communication data needs to be delayed. If it is determined that the transmission of the target communication data does not need to be delayed, the timing duration and a preset discard duration threshold corresponding to the data type of the target communication data are obtained. If the timing duration is less than the preset discard duration threshold, the target communication data is sent according to the EDCA scheme of the CSMA network. Compared to existing technologies that immediately send target communication data according to the EDCA scheme of the CSMA network when communication data needs to be sent, this scheme needs to determine whether the target communication data needs to be sent with a delay. When it is determined that the target communication data does not need to be sent with a delay, the success rate of sending is higher. Sending target communication data according to the EDCA scheme of the CSMA network effectively improves the success rate of sending high-priority communication data and can also guarantee the Quality of Service (QoS) requirements of high-priority user data.
[0109] Figure 3 This is a flowchart illustrating a second embodiment of the communication data transmission method provided in this application. Based on the above embodiments, this application describes how, when the transmission of target communication data needs to be delayed, the target communication data is processed based on whether a delay is needed and whether the timing duration is less than a preset discard duration threshold when the data needs to be transmitted again. For example... Figure 3 As shown, the communication data transmission method specifically includes the following steps:
[0110] S301: If it is determined that the target communication data needs to be delayed, monitor whether the target communication data needs to be sent.
[0111] In this step, if a node device determines that the transmission of target communication data needs to be delayed, it indicates a high failure rate. If the target communication data is transmitted according to the EDCA scheme of the CSMA network at this time, transmission failure is highly likely. Therefore, a delay is implemented. To ensure that the target communication data is transmitted as soon as possible in the next available transmission window, the node device needs to monitor whether communication data transmission is necessary.
[0112] S302: When it is detected that target communication data needs to be sent, determine whether it is necessary to delay sending the target communication data based on the target priority, the communication data sending failure rate corresponding to all priorities obtained in advance, and the sending failure rate threshold corresponding to all priorities obtained in advance; if it is determined that it is necessary to delay sending the target communication data, then execute step S301; if it is determined that it is not necessary to delay sending the target communication data, then execute step S303.
[0113] In this step, when the node device detects that target communication data needs to be sent, it determines whether it is necessary to delay sending the target communication data based on the target priority, the communication data transmission failure rate corresponding to all priorities obtained in advance, and the transmission failure rate threshold corresponding to all priorities obtained in advance.
[0114] If it is determined that the target communication data needs to be delayed, it means that sending the target communication data according to the EDCA scheme of the CSMA network at this time is very likely to fail. It is necessary to re-monitor whether the target communication data needs to be sent. If it is detected that the target communication data needs to be sent, it is determined whether the target communication data needs to be delayed. If the target communication data needs to be delayed, this process needs to be repeated until it is determined that the target communication data does not need to be delayed. The timing duration is obtained. If the timing duration is less than the preset discarding time threshold, the target communication data is sent; if the timing duration is greater than or equal to the preset discarding time threshold, the target communication data is discarded.
[0115] It should be noted that the process of determining whether to delay sending the target communication data is similar to step S204 in Embodiment 1, and will not be repeated here.
[0116] S303: Get the timer duration.
[0117] S304: Determine whether the timing duration is less than the preset discard duration threshold; if the timing duration is less than the preset discard duration threshold, proceed to step S305; if the timing duration is greater than or equal to the preset discard duration threshold, proceed to step S306.
[0118] In the above steps, when the node device determines that there is no need to delay the transmission of the target communication data, it indicates that the success rate of transmitting the target communication data according to the EDCA scheme of the CSMA network is relatively high. Therefore, in order to determine whether the target communication data has expired and to ensure the timeliness of the target communication data, it is necessary to obtain the timing duration and then determine whether the timing duration is less than the preset discard duration threshold.
[0119] S305: Send target communication data according to the EDCA scheme of the CSMA network.
[0120] In this step, if the node device determines that the timing duration is less than the preset discard duration threshold, it indicates that the target communication data has not expired and its timeliness can still be guaranteed. The target communication data can then be sent according to the EDCA scheme of the CSMA network. This means that the enhanced distributed channel needs to remain idle for a period of time, the length of which is the arbitration inter-frame interval corresponding to the access category of the target communication data. Then, the random backoff value corresponding to the access category of the target communication data is determined. For each idle time slot of the enhanced distributed channel, the random backoff value is decremented by one. When the random backoff value is 0, the target communication data is sent.
[0121] S306: Discard the target communication data.
[0122] In this step, if the node device determines that the timing duration is greater than or equal to the preset discard duration threshold, it means that the target communication data has expired and it is meaningless to send the target communication data, so the target communication data is discarded.
[0123] The communication data transmission method provided in this embodiment improves the success rate of high-priority communication data transmission and ensures the timeliness of communication data. When a delay in sending target communication data is detected, the method further determines whether a delay is necessary. If a delay is required, this process is repeated until it is determined that a delay is not needed. A timer is then acquired. If the timer is less than a preset discard threshold, the target communication data is sent. If the timer is greater than or equal to the preset discard threshold, the target communication data is discarded.
[0124] Figure 4 This is a flowchart illustrating a third embodiment of the communication data transmission method provided in this application. Based on the above embodiments, this application describes the acquisition of the set of communication data transmission failure counts and the set of communication data transmission counts. For example... Figure 4 As shown, the communication data transmission method specifically includes the following steps:
[0125] S401: After power-on, at preset statistical intervals, obtain the number of communication data transmission failures and the number of communication data transmissions for each priority within the preset statistical interval, and record the acquisition time corresponding to the number of communication data transmission failures and the acquisition time corresponding to the number of communication data transmissions.
[0126] In this step, after the node device is powered on, it acquires the number of communication data transmission failures and the number of communication data transmissions for each priority within a preset statistical time interval, and records the acquisition time corresponding to the number of communication data transmission failures and the acquisition time corresponding to the number of communication data transmissions.
[0127] It should be noted that within each preset statistical period, the node device will send multiple communication data, but not all communication data will be counted. This node device is the sending node device. For each communication data sent within the preset statistical period, it is determined whether the communication data requires the receiving node device to send an ACK (acknowledgement), CTS (Clear to Send), or Block Acknowledgement (BA) bitmap to the sending node device. If the communication data belongs to this category, the sent communication data will be counted in the communication data transmission count corresponding to the priority of this communication data. If the communication data belongs to this category, but the receiving node device does not receive an ACK, CTS, or Block Acknowledgement bitmap, the sent communication data will be counted in the communication data transmission failure count corresponding to the priority of this communication data.
[0128] It should be noted that the preset statistical duration can be 10 milliseconds, or it can be 20 milliseconds, 40 milliseconds, etc. This application embodiment does not limit the preset statistical duration and can be set according to the actual situation.
[0129] S402: Determine if the link is disconnected; if the link is disconnected, proceed to step S403; if the link is not disconnected, proceed to step S404.
[0130] In this step, after the node device obtains the number of communication data transmission failures and the number of communication data transmissions corresponding to each priority, it also needs to determine whether the acquired data is meaningful and whether the link with the receiving node device is disconnected.
[0131] S403: Mark the number of communication data transmission failures and the number of communication data transmissions corresponding to each priority as meaningless data.
[0132] In this step, if the link is broken, it means that the data acquired is meaningless. The number of communication data transmission failures and the number of communication data transmissions corresponding to each priority level are marked as meaningless data. Meaningless data can also be deleted.
[0133] S404: For each priority, store the number of communication data transmission failures corresponding to the priority into the set of communication data transmission failures corresponding to the priority, and store the number of communication data transmissions corresponding to the priority into the set of communication data transmission counts corresponding to the priority.
[0134] In this step, if the link is not broken, it means that the data obtained this time is meaningful. For each priority, the number of communication data transmission failures corresponding to that priority is stored in the communication data transmission failure count set corresponding to that priority, and the number of communication data transmissions corresponding to that priority is stored in the communication data transmission count set corresponding to that priority.
[0135] It should be noted that if, within a consecutive preset number of preset statistical time periods, there is no communication data requiring the receiving node device to send ACK confirmation, CTS confirmation, or block confirmation bitmap to the sending node device, the sending node device needs to construct a preset number of such communication data and send them within the next preset statistical time period. The preset number can be 1, 3, or 5, etc.; the preset number of constructed data can be 10, 50, or 60, etc. This application embodiment does not limit the preset number or the preset number of constructed data, and can be set according to the actual situation.
[0136] The communication data transmission method provided in this embodiment improves the success rate of communication data transmission by periodically counting and recording the number of communication data transmission failures and transmission counts for each priority level. This data is then used to determine whether communication data needs to be delayed in the future.
[0137] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0138] Figure 5 This is a schematic diagram of the structure of an embodiment of the communication data transmission device provided in this application; the device can be integrated into the node device in the above method embodiments, or it can be implemented through the node device in the above method embodiments. Figure 5 As shown, the communication data transmission device 50 includes:
[0139] Acquisition module 51 is used to acquire target communication data;
[0140] Timing module 52 is used for timing;
[0141] The acquisition module 51 is also used to acquire the target priority that requires the target communication data when it is detected that the target communication data needs to be sent.
[0142] Processing module 53 is used for:
[0143] Based on the pre-obtained set of communication data transmission failure counts corresponding to all priorities, determine the communication data transmission failure rate corresponding to all priorities;
[0144] Based on the target priority, the communication data transmission failure rate corresponding to all priorities, and the pre-acquired transmission failure rate threshold corresponding to the target priority, determine whether it is necessary to delay the transmission of the target communication data;
[0145] The acquisition module 51 is further configured to, if it is determined that there is no need to delay the transmission of the target communication data, acquire the timing duration and the preset discard duration threshold corresponding to the data type of the target communication data;
[0146] The transmitting module 54 is used to transmit the target communication data according to the Enhanced Distributed Channel Access (EDCA) scheme of the Carrier Sense Multiple Access (CSMA) network.
[0147] Furthermore, the processing module 53 is specifically used for:
[0148] The quotient of the preset calculation failure rate duration and the preset statistical duration is determined as the target number, wherein the preset calculation failure rate duration is an integer multiple of the preset statistical duration;
[0149] For each priority, the sum of the number of communication data transmission failures of the target number of times is obtained from the set of communication data transmission failure counts corresponding to the priority and the time closest to the current time, and is determined as the target transmission failure count corresponding to the priority;
[0150] From the set of communication data transmission counts corresponding to all priorities, obtain the sum of the communication data transmission counts of the target number of times the time closest to the current time, and determine it as the total number of transmissions;
[0151] For each priority, the ratio of the number of target transmission failures corresponding to that priority to the total number of transmissions is determined as the communication data transmission failure rate corresponding to that priority.
[0152] Furthermore, the processing module 53 is specifically used for:
[0153] The target transmission failure rate is determined by the sum of the communication data transmission failure rate corresponding to the target priority and the communication data transmission failure rate corresponding to the priority higher than the target priority.
[0154] If the target transmission failure rate is greater than the transmission failure rate threshold corresponding to the target priority, then it is determined that the transmission of the target communication data needs to be delayed.
[0155] If the target transmission failure rate is less than or equal to the transmission failure rate threshold corresponding to the target priority, then it is determined that there is no need to delay the transmission of the target communication data.
[0156] Furthermore, the processing module 53 is also used for:
[0157] If it is determined that the target communication data needs to be delayed, monitor whether the target communication data needs to be sent.
[0158] When it is detected that the target communication data needs to be sent, it is determined whether the sending of the target communication data needs to be delayed based on the target priority, the communication data sending failure rate corresponding to all priorities obtained in advance, and the sending failure rate threshold corresponding to all priorities obtained in advance.
[0159] The acquisition module 51 is further configured to acquire the timing duration if it is determined that there is no need to delay the transmission of the target communication data;
[0160] Furthermore, the sending module 54 is also configured to send the target communication data according to the EDCA scheme of the CSMA network if the timing duration is less than the preset discard duration threshold.
[0161] Furthermore, the processing module 53 is also used for:
[0162] If the timing duration is greater than or equal to the preset discard duration threshold, the target communication data will be discarded.
[0163] Furthermore, the processing module 53 is also used for:
[0164] If it is determined that the transmission of the target communication data needs to be delayed, then the system re-monitors whether the transmission of the target communication data needs to be sent. If it is detected that the transmission of the target communication data needs to be sent, it is determined whether the transmission of the target communication data needs to be delayed. If it is determined that the transmission of the target communication data needs to be delayed, this step is repeated until it is determined that the transmission of the target communication data does not need to be delayed. The timing duration is obtained. If the timing duration is less than the preset discarding duration threshold, the target communication data is sent through the sending module 54. If the timing duration is greater than or equal to the preset discarding duration threshold, the target communication data is discarded.
[0165] Furthermore, the acquisition module 52 is also used to acquire, after power-on, the number of communication data transmission failures and the number of communication data transmissions corresponding to each priority within the preset statistical time interval.
[0166] Furthermore, the processing module 53 is also used for:
[0167] Record the acquisition time corresponding to the number of communication data transmission failures and the acquisition time corresponding to the number of communication data transmissions;
[0168] Determine if the link is broken;
[0169] If the link is disconnected, the number of communication data transmission failures and the number of communication data transmissions corresponding to each priority are marked as meaningless data.
[0170] Furthermore, the processing module 53 is also used for:
[0171] If the link is not disconnected, for each priority, the number of communication data transmission failures corresponding to the priority is stored in the communication data transmission failure count set corresponding to the priority, and the number of communication data transmissions corresponding to the priority is stored in the communication data transmission count set corresponding to the priority.
[0172] The communication data transmission device provided in this embodiment is used to execute the technical solutions in any of the foregoing method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.
[0173] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 6 As shown, the electronic device 60 includes:
[0174] Processor 61, memory 62, and communication interface 63;
[0175] The memory 62 is used to store the executable instructions of the processor 61;
[0176] The processor 61 is configured to execute the technical solution of the node device in any of the foregoing method embodiments by executing the executable instructions.
[0177] Optionally, the memory 62 can be either standalone or integrated with the processor 61.
[0178] Optionally, when the memory 62 is a device independent of the processor 61, the electronic device 60 may further include:
[0179] Bus 64, memory 62 and communication interface 63 are connected to processor 61 through bus 64 and complete communication with each other. Communication interface 63 is used to communicate with other devices.
[0180] Optionally, the communication interface 63 can be implemented using a transceiver. The communication interface is used to enable communication between the database access device and other devices (e.g., clients, read-write databases, and read-only databases). The memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk drive.
[0181] Bus 64 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0182] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0183] The electronic device is used to execute the technical solution of the node device in any of the aforementioned method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0184] This application also provides a readable storage medium storing a computer program thereon, which, when executed by a processor, implements the technical solutions provided in any of the foregoing method embodiments.
[0185] This application also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the technical solutions provided in any of the foregoing method embodiments.
[0186] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0187] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A communication data transmission method, characterized in that, include: Acquire target communication data and start timing; When it is detected that the target communication data needs to be sent, the target priority of the target communication data is obtained; Based on the pre-obtained set of communication data transmission failure counts corresponding to all priorities, determine the communication data transmission failure rate corresponding to all priorities; Based on the target priority, the communication data transmission failure rate corresponding to all priorities, and the pre-acquired transmission failure rate threshold corresponding to the target priority, determine whether it is necessary to delay the transmission of the target communication data; If it is determined that there is no need to delay the transmission of the target communication data, obtain the timing duration and the preset discard duration threshold corresponding to the data type of the target communication data; If the timing duration is less than the preset discard duration threshold, the target communication data is sent according to the Enhanced Distributed Channel Access (EDCA) scheme of the Carrier Sense Multiple Access (CSMA) network. The step of determining whether to delay sending the target communication data based on the target priority, the communication data transmission failure rate corresponding to all priorities, and the pre-acquired transmission failure rate threshold corresponding to the target priority includes: The target transmission failure rate is determined by the sum of the communication data transmission failure rate corresponding to the target priority and the communication data transmission failure rate corresponding to the priority higher than the target priority. If the target transmission failure rate is greater than the transmission failure rate threshold corresponding to the target priority, then it is determined that the transmission of the target communication data needs to be delayed. If the target transmission failure rate is less than or equal to the transmission failure rate threshold corresponding to the target priority, then it is determined that there is no need to delay the transmission of the target communication data.
2. The method according to claim 1, characterized in that, The step involves determining the communication data transmission failure rate for all priorities based on a pre-acquired set of communication data transmission failure counts corresponding to all priorities, including... The quotient of the preset calculation failure rate duration and the preset statistical duration is determined as the target number, wherein the preset calculation failure rate duration is an integer multiple of the preset statistical duration; For each priority, the sum of the number of communication data transmission failures of the target number of times is obtained from the set of communication data transmission failure counts corresponding to the priority and the time closest to the current time, and is determined as the target transmission failure count corresponding to the priority; From the set of communication data transmission counts corresponding to all priorities, obtain the sum of the communication data transmission counts of the target number of times the time closest to the current time, and determine it as the total number of transmissions; For each priority, the ratio of the number of target transmission failures corresponding to that priority to the total number of transmissions is determined as the communication data transmission failure rate corresponding to that priority.
3. The method according to claim 1, characterized in that, The method further includes: If it is determined that the target communication data needs to be delayed, monitor whether the target communication data needs to be sent. When it is detected that the target communication data needs to be sent, it is determined whether the sending of the target communication data needs to be delayed based on the target priority, the communication data sending failure rate corresponding to all priorities obtained in advance, and the sending failure rate threshold corresponding to all priorities obtained in advance. If it is determined that there is no need to delay sending the target communication data, obtain the timing duration; If the timing duration is less than the preset discard duration threshold, the target communication data is sent according to the EDCA scheme of the CSMA network.
4. The method according to claim 1 or 3, characterized in that, The method further includes: If the timing duration is greater than or equal to the preset discard duration threshold, the target communication data will be discarded.
5. The method according to claim 3, characterized in that, The method further includes: If it is determined that the transmission of the target communication data needs to be delayed, then the system re-monitors whether the transmission of the target communication data needs to be sent. If the transmission of the target communication data needs to be sent, it is determined whether the transmission of the target communication data needs to be delayed. If the transmission of the target communication data needs to be delayed, this step is repeated until it is determined that the transmission of the target communication data does not need to be delayed. The timing duration is then obtained. If the timing duration is less than the preset discarding duration threshold, the target communication data is sent. If the timing duration is greater than or equal to the preset discarding duration threshold, the target communication data is discarded.
6. The method according to claim 1, characterized in that, The method further includes: After power-on, at preset statistical intervals, the number of communication data transmission failures and the number of communication data transmissions corresponding to each priority are obtained within the preset statistical interval, and the acquisition time corresponding to the number of communication data transmission failures and the acquisition time corresponding to the number of communication data transmissions are recorded. Determine if the link is broken; If the link is disconnected, the number of communication data transmission failures and the number of communication data transmissions corresponding to each priority are marked as meaningless data.
7. The method according to claim 6, characterized in that, The method further includes: If the link is not disconnected, for each priority, the number of communication data transmission failures corresponding to the priority is stored in the communication data transmission failure count set corresponding to the priority, and the number of communication data transmissions corresponding to the priority is stored in the communication data transmission count set corresponding to the priority.
8. A communication data transmission device, characterized in that, include: The acquisition module is used to acquire target communication data; The timing module is used for timing. The acquisition module is also used to acquire the target priority of the target communication data when it is detected that the target communication data needs to be sent. Processing module, used for: Based on the pre-obtained set of communication data transmission failure counts corresponding to all priorities, determine the communication data transmission failure rate corresponding to all priorities; Based on the target priority, the communication data transmission failure rate corresponding to all priorities, and the pre-acquired transmission failure rate threshold corresponding to the target priority, determine whether it is necessary to delay the transmission of the target communication data; The acquisition module is further configured to, if it is determined that there is no need to delay the transmission of the target communication data, acquire the timing duration and a preset discard duration threshold corresponding to the data type of the target communication data; The sending module is used to send the target communication data according to the Enhanced Distributed Channel Access (EDCA) scheme of the Carrier Sense Multiple Access (CSMA) network if the timing duration is less than the preset discard duration threshold. When the processing module determines whether to delay sending the target communication data based on the target priority, the communication data transmission failure rate corresponding to all priorities, and the pre-acquired transmission failure rate threshold corresponding to the target priority, it is specifically used for: The target transmission failure rate is determined by the sum of the communication data transmission failure rate corresponding to the target priority and the communication data transmission failure rate corresponding to the priority higher than the target priority. If the target transmission failure rate is greater than the transmission failure rate threshold corresponding to the target priority, then it is determined that the transmission of the target communication data needs to be delayed. If the target transmission failure rate is less than or equal to the transmission failure rate threshold corresponding to the target priority, then it is determined that there is no need to delay the transmission of the target communication data.
9. An electronic device, characterized in that, include: Processor, memory, communication interface; The memory is used to store the executable instructions of the processor; The processor is configured to execute the communication data transmission method according to any one of claims 1 to 7 by executing the executable instructions.
10. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the communication data transmission method according to any one of claims 1 to 7.
11. A computer program product, characterized in that, It includes a computer program, which, when executed by a processor, is used to implement the communication data transmission method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data sending method and device
CN111615214A
Data compensation method and device, electronic equipment and storage medium
CN115953201A