Channel contention method and apparatus, communication device, and storage medium
By dynamically adjusting the time slot parameters and priority parameters of the sending queue, the problem of uneven bandwidth allocation among multiple sending queues is solved, achieving high-precision and flexible bandwidth allocation to meet the QoS requirements of different service types.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI WU QI MICROELECTRONICS CO LTD
- Filing Date
- 2023-06-09
- Publication Date
- 2026-07-24
AI Technical Summary
In existing technologies, bandwidth allocation among multiple transmission queues is not flexible or accurate enough. Especially when the network load is high, high-priority queues occupy most of the bandwidth, resulting in uneven bandwidth allocation.
By obtaining the current bandwidth parameters of the queue to be sent, adjusting the time slot parameters and dynamically adjusting the priority parameters based on the current and target bandwidth parameters, high-precision and flexible adjustment of the bandwidth allocation of the sending queue can be achieved.
This enables more flexible and accurate bandwidth allocation for the sending queue, improves the efficiency of network resource utilization, and meets the QoS requirements of different service types.
Smart Images

Figure CN116582954B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication, and more specifically, to a channel contention method, apparatus, communication device, and storage medium. Background Technology
[0002] With the continuous development of wireless LANs, different service types exist within the network, each with varying requirements for bandwidth, latency, and Quality of Service (QoS). The 802.11e protocol defines Enhanced Distributed Channel Access (EDCA), which grants higher-priority service data priority transmission and more bandwidth. Wireless communication devices typically support several service types, each corresponding to a different transmission queue. During the active signal access process, multiple transmission queues compete for channel access. Only the successful transmission queue gains access to the channel and can then transmit service data.
[0003] When multiple transmission queues compete for channel space, each transmission queue is configured with a fixed priority parameter to assign different priorities to different services. However, when the network load is high, configuring fixed priority parameters can cause high-priority transmission queues to compete for most of the bandwidth, resulting in a lack of flexibility and accuracy in bandwidth allocation among multiple transmission queues. Summary of the Invention
[0004] The purpose of this application is to provide a channel contention method, apparatus, communication device, and storage medium to improve the problem of insufficient flexibility and accuracy in bandwidth allocation of multiple transmission queues in the prior art.
[0005] In a first aspect, this application provides a channel contention method, comprising: obtaining the current bandwidth parameter of a queue to be transmitted; wherein the current bandwidth parameter of the queue to be transmitted is the amount of data transmitted by the queue to be transmitted within a preset time period; adjusting the time slot parameter of the queue to be transmitted when the current bandwidth parameter and the target bandwidth parameter of the queue to be transmitted meet the adjustment conditions; wherein the time slot parameter is used to determine the priority parameter of the queue to be transmitted; and determining the priority parameter of the queue to be transmitted according to the adjusted time slot parameter, so that the queue to be transmitted performs channel contention according to the priority parameter.
[0006] In the above implementation process, the current bandwidth parameter of the queue to be sent is first obtained, which represents the amount of data the queue will send within a preset time period. Then, based on the current bandwidth parameter and the target bandwidth parameter of the queue, it is determined whether the queue meets the adjustment conditions. When the queue meets the adjustment conditions, the time slot parameter of the queue is adjusted. After determining the adjusted time slot parameter, the priority parameter of the queue is determined based on the adjusted time slot parameter, thus achieving the adjustment of the priority parameter. Through this method, the priority parameter of the queue to be sent can be dynamically adjusted. The queue can then compete for channel access based on the adjusted priority parameter, thereby changing its ability in channel contention and adjusting its transmission bandwidth. Furthermore, since the time slot parameter can be generated by the clock signal in the network device, its accuracy can reach the microsecond or nanosecond level, enabling high-precision adjustment of the priority parameter of the queue to be sent, and consequently, high-precision adjustment of the bandwidth of the transmission queue.
[0007] In an optional implementation, the time slot parameters of the queue to be sent include a first time slot parameter and a second time slot parameter, wherein the first time slot parameter is used to determine the arbitration inter-frame interval and the second time slot parameter is used to determine the backoff parameter.
[0008] In the above implementation process, a first time slot parameter and a second time slot parameter are set. When adjusting the time slot parameter, it is possible to choose to adjust only the first time slot parameter, only the second time slot parameter, or both the first and second time slot parameters according to the actual situation, so as to realize flexible adjustment of the time slot parameter and thus flexible adjustment of the transmission bandwidth of the queue to be transmitted.
[0009] In an optional implementation, the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent meet the adjustment conditions, including: the difference between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent is not within a preset threshold range; or the ratio between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent is not within a preset threshold range.
[0010] In an optional implementation, adjusting the timeslot parameter of the queue to be sent includes: when the current bandwidth parameter of the queue to be sent is greater than the target bandwidth parameter of the queue to be sent, the larger the current bandwidth parameter of the queue to be sent, the larger the adjusted timeslot parameter; when the current bandwidth parameter of the queue to be sent is less than the target bandwidth parameter of the queue to be sent, the smaller the current bandwidth parameter of the queue to be sent, the smaller the adjusted timeslot parameter.
[0011] In the above implementation process, the priority parameters of the queue to be transmitted are adjusted by adjusting the timeslot parameters. The queue to be transmitted then competes for channel access based on the adjusted priority parameters. When the current bandwidth parameter of the queue to be transmitted is low, the timeslot parameters are lowered, allowing the queue to acquire channel access more quickly and thus increasing the current bandwidth parameter. Conversely, when the current bandwidth parameter of the queue to be transmitted is high, the timeslot parameters are increased, making it difficult for the queue to quickly acquire channel access, thus decreasing the current bandwidth parameter.
[0012] In an optional implementation, adjusting the time slot parameters of the queue to be sent includes: determining the adjustment range based on the numerical relationship between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent; and adjusting the time slot parameters of the queue to be sent based on the adjustment range.
[0013] In an optional implementation, determining the adjustment range based on the numerical relationship between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent includes:
[0014] The adjustment range is determined using the following formula:
[0015]
[0016] Where y is the adjustment range, and x is the ratio of the first parameter to the target bandwidth parameter of the queue to be sent, where the first parameter is the difference between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent.
[0017] In an optional implementation, adjusting the time slot parameters of the queue to be sent includes: determining the adjustment range based on the numerical relationship and a preset adjustment strategy; wherein the adjustment strategy is used to characterize the correspondence between the numerical relationship and the adjustment range.
[0018] Secondly, this application provides a channel contention apparatus, comprising: an acquisition module, configured to acquire the current bandwidth parameter of a queue to be transmitted; wherein the current bandwidth parameter of the queue to be transmitted is the amount of data transmitted by the queue to be transmitted within a preset time period; an adjustment module, configured to adjust the time slot parameter of the queue to be transmitted when the current bandwidth parameter and the target bandwidth parameter of the queue to be transmitted satisfy an adjustment condition; wherein the time slot parameter is used to determine the priority parameter of the queue to be transmitted; and a determination module, configured to determine the priority parameter of the queue to be transmitted based on the adjusted time slot parameter, so that the queue to be transmitted performs channel contention according to the priority parameter.
[0019] In an optional implementation, the time slot parameters of the queue to be sent include a first time slot parameter and a second time slot parameter, wherein the first time slot parameter is used to determine the arbitration inter-frame interval and the second time slot parameter is used to determine the backoff parameter.
[0020] In an optional implementation, the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent meet the adjustment conditions, including: the difference between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent is not within a preset threshold range; or the ratio between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent is not within a preset threshold range.
[0021] In an optional implementation, the adjustment module is specifically used to adjust the timeslot parameter as follows: when the current bandwidth parameter of the queue to be sent is greater than the target bandwidth parameter of the queue to be sent, the larger the current bandwidth parameter of the queue to be sent, the larger the adjusted timeslot parameter; when the current bandwidth parameter of the queue to be sent is less than the target bandwidth parameter of the queue to be sent, the smaller the current bandwidth parameter of the queue to be sent, the smaller the adjusted timeslot parameter.
[0022] In an optional implementation, the adjustment module is specifically used to determine the adjustment range based on the numerical relationship between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent; and to adjust the time slot parameter of the queue to be sent based on the adjustment range.
[0023] In an optional implementation, the adjustment module is specifically used to determine the adjustment range according to the following formula:
[0024]
[0025] Where y is the adjustment range, and x is the ratio of the first parameter to the target bandwidth parameter of the queue to be sent, where the first parameter is the difference between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent.
[0026] In an optional implementation, the adjustment module is specifically used to determine the adjustment range based on the numerical relationship and a preset adjustment strategy; wherein the adjustment strategy is used to characterize the correspondence between the numerical relationship and the adjustment range.
[0027] Thirdly, this application provides a communication device, including: a processor, a memory, and a bus; the processor and the memory communicate with each other through the bus; the memory stores program instructions that can be executed by the processor, and the processor can execute the method as described in any of the foregoing embodiments by calling the program instructions.
[0028] Fourthly, this application provides a computer-readable storage medium storing computer program instructions, which, when read and executed by a computer, perform the method described in any of the foregoing embodiments. Attached Figure Description
[0029] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 A flowchart of a channel contention method provided in an embodiment of this application;
[0031] Figure 2 A structural block diagram of a channel contention device provided in an embodiment of this application;
[0032] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0033] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0034] The purpose of this application is to provide a channel contention method, apparatus, communication device, and storage medium to improve the problem of insufficient flexibility and accuracy in bandwidth allocation of multiple transmission queues in the prior art.
[0035] This technology can be implemented using appropriate software, hardware, or a combination of both. The embodiments of this application are described in detail below.
[0036] Please see Figure 1 , Figure 1 A flowchart of a channel contention method provided in this application embodiment, the data transmission method may include the following:
[0037] Step 101: Obtain the current bandwidth parameters of the queue to be sent.
[0038] Step 102: When the current bandwidth parameter and the target bandwidth parameter of the queue to be sent meet the adjustment conditions, adjust the time slot parameter of the queue to be sent.
[0039] Step 103: Determine the priority parameters of the queue to be transmitted based on the adjusted time slot parameters, so that the queue to be transmitted can compete for the channel according to the priority parameters.
[0040] In this embodiment, the current bandwidth parameter of the queue to be transmitted is first obtained, which represents the amount of data transmitted by the queue within a preset time period. Then, based on the current bandwidth parameter and the target bandwidth parameter of the queue, it is determined whether the queue meets the adjustment conditions. When the queue meets the adjustment conditions, the time slot parameter of the queue is adjusted. After determining the adjusted time slot parameter, the priority parameter of the queue is determined based on the adjusted time slot parameter, thereby adjusting the priority parameter of the queue. Through this method, the priority parameter of the queue to be transmitted can be dynamically adjusted. The queue can then compete for channel access based on the adjusted priority parameter, thereby changing its ability in channel contention and adjusting its transmission bandwidth.
[0041] Furthermore, since the time slot parameters can be generated by the clock signal in the network device with an accuracy of microseconds or nanoseconds, the priority parameters of the transmission queue can be adjusted with high precision, thereby enabling high-precision adjustment of the bandwidth of the transmission queue.
[0042] The following is a detailed explanation of each of the above steps.
[0043] Step 101: Obtain the current bandwidth parameters of the queue to be sent.
[0044] In this embodiment, the current bandwidth parameter of the queue to be sent is the amount of data sent by the queue to be sent within a preset time period. Within the preset time period, the amount of data sent by the queue to be sent is recorded as the current bandwidth parameter of the queue to be sent.
[0045] The preset time period can be flexibly set according to the actual network environment. For example, the preset time period can be 1 minute, 10 minutes, 1 hour, etc. If the current network load is high, in order to adjust the channel contention capability of the queue to be sent in a timely manner, the preset time period can be set to a shorter one, such as 1 minute or 5 minutes; if the current network load is low, and there is no need to frequently adjust the channel contention capability of the queue to be sent, thus reducing system power consumption, the preset time period can be set to a longer one, such as 1 hour, 2 hours, 1 day, etc.
[0046] Step 102: When the current bandwidth parameter and the target bandwidth parameter of the queue to be sent meet the adjustment conditions, adjust the time slot parameter of the queue to be sent.
[0047] In this embodiment, after obtaining the current bandwidth parameters of the queue to be sent, it is determined whether the queue meets the adjustment conditions based on the current bandwidth parameters and the target bandwidth parameters of the queue to be sent. The target bandwidth parameters of the queue to be sent are bandwidth parameters preset according to the priority of the queue to be sent. The target bandwidth parameters of the queue to be sent represent the amount of data that the queue to be sent is expected to send within a preset time period.
[0048] The data to be sent queue is a queue in the network environment that will send data. Different types of services exist in the network, and these different service types have different requirements for bandwidth and latency. Therefore, the target bandwidth parameters of different data sending queues will differ.
[0049] For example, in the EDCA mechanism of the 802.11e protocol, four different Access Categories (ACs) are defined based on different service data traffic, in descending order of priority: AC_VO (Voice), AC_VI (Video), AC_BE (Best Effort), and AC_BK (Background). Each access category corresponds to a transmission queue. The system expects higher-priority transmission queues to occupy more bandwidth and prioritize the transmission of service data. Therefore, higher-priority transmission queues correspond to higher target bandwidth parameters.
[0050] The adjustment conditions are explained below.
[0051] When the queue to be sent meets the adjustment conditions, it means that the actual amount of data sent by the queue to be sent differs significantly from the expected amount of data sent within the preset time period; conversely, when the queue to be sent does not meet the adjustment conditions, it means that the actual amount of data sent by the queue to be sent differs slightly from the expected amount of data sent within the preset time period.
[0052] As an optional implementation, if the difference between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent is not within the preset threshold range, then the queue to be sent is determined to meet the adjustment conditions.
[0053] In this embodiment, a preset threshold range is set. If the difference between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent is not within the preset threshold range, it indicates that the actual amount of data sent by the queue to be sent differs significantly from the expected amount of data sent within the preset time period, thus meeting the adjustment conditions and requiring adjustment of the time slot parameters of the queue to be sent.
[0054] For example, the preset threshold range can be between -10kb and 10kb, and the preset time period is 1 second. If the data volume sent by the queue to be sent in 1 second is 100kb, and the target bandwidth parameter corresponding to the queue to be sent is 120kb, the difference between the two is -20kb, which is not within the preset threshold range. This indicates that within the preset time period, the actual data volume sent by the queue to be sent differs significantly from the expected data volume, meeting the adjustment conditions, and the time slot parameters of the queue to be sent need to be adjusted. If the data volume sent by the queue to be sent in 1 second is 125kb, and the target bandwidth parameter corresponding to the queue to be sent is 120kb, the difference between the two is 5kb, which is within the preset threshold range. This indicates that within the preset time period, the actual data volume sent by the queue to be sent differs slightly from the expected data volume, not meeting the adjustment conditions, and the time slot parameters of the queue to be sent do not need to be adjusted.
[0055] As another optional implementation, if the ratio of the current bandwidth parameter of the queue to be sent to the target bandwidth parameter of the queue to be sent is not within the preset threshold range, then the queue to be sent is determined to meet the adjustment conditions.
[0056] In this embodiment, a preset threshold range is set. If the ratio of the current bandwidth parameter of the queue to be sent to the target bandwidth parameter of the queue to be sent is not within the preset threshold range, it indicates that the actual amount of data sent by the queue to be sent differs significantly from the expected amount of data sent within the preset time period, thus meeting the adjustment conditions and requiring adjustment of the time slot parameters of the queue to be sent.
[0057] For example, the preset threshold range can be between 0.5 and 1.5, and the preset time period is 1 second. If the data volume sent by the queue to be sent in 1 second is 200kb, and the target bandwidth parameter corresponding to the queue to be sent is 100kb, the ratio of the two is 2kb, which is not within the preset threshold range. This indicates that within the preset time period, the actual data volume sent by the queue to be sent differs significantly from the expected data volume, meeting the adjustment conditions, and the time slot parameters of the queue to be sent need to be adjusted. If the data volume sent by the queue to be sent in 1 second is 80kb, and the target bandwidth parameter corresponding to the queue to be sent is 100kb, the ratio of the two is 0.8, which is within the preset threshold range. This indicates that within the preset time period, the actual data volume sent by the queue to be sent differs slightly from the expected data volume, not meeting the adjustment conditions, and the time slot parameters of the queue to be sent do not need to be adjusted.
[0058] It should be noted that the embodiments of this application do not specifically limit the adjustment conditions. Any condition that can determine whether the actual amount of data sent by the queue to be sent differs significantly from the expected amount of data sent can be used as an adjustment condition.
[0059] To facilitate understanding of the scheme, the channel contention method and time slot parameters are explained below.
[0060] To meet the QoS requirements of transmission queues with different priorities, each transmission queue corresponds to a priority parameter, and the transmission queues compete for the transmission channel based on their own priority parameters. Priority parameters may include: Arbitration Inter Frame Space (AIFS) and backoff parameters.
[0061] The AIFS of a transmit queue determines the arbitration contention slot period for that transmit queue. The arbitration inter-frame interval AIFS can be expressed as: AIFS = SIFS + AIFSN[AC] * SLOT. Where SIFS is the Short Inter-Frame Space, and SLOT is the slot parameter.
[0062] The backoff parameter of a transmit queue determines the backoff slot period of that transmit queue. The backoff parameter BACKOFF can be expressed as: BACKOFF = CW_sel * SLOT, where SLOT is the slot parameter.
[0063] When a transmission queue has a data transmission requirement, it detects the channel. If the channel remains idle for the AIFS[AC] period corresponding to that transmission queue, it initiates a backoff procedure. During the backoff procedure, if the channel remains idle, the BACKOFF value corresponding to that transmission queue continuously decreases. When the BACKOFF value decreases to 0, the transmission queue gains access to the channel, and the system transmits the service data corresponding to that transmission queue on that channel.
[0064] In this embodiment of the application, the time slot parameter is the arbitration inter-frame interval AIFS and the SLOT parameter in the backoff parameter BACKOFF.
[0065] As an optional implementation, the time slot parameter is used to determine the arbitration inter-frame interval and backoff parameters.
[0066] In this embodiment, the arbitration inter-frame interval AIFS can be expressed as: AIFS = SIFS + AIFSN[AC] * SLOT, and the backoff parameter BACKOFF can be expressed as: BACKOFF = CW_sel * SLOT. Wherein, SLOT is the time slot parameter.
[0067] As another optional implementation, the time slot parameters of the queue to be transmitted include a first time slot parameter and a second time slot parameter. The first time slot parameter is used to determine the arbitration inter-frame interval, and the second time slot parameter is used to determine the backoff parameters.
[0068] In this embodiment, the arbitration inter-frame interval AIFS can be expressed as: AIFS = SIFS + AIFSN[AC] * SLOT1, where SLOT1 is the first time slot parameter. The backoff parameter BACKOFF can be expressed as: BACKOFF = CW_sel * SLOT2, where SLOT2 is the second time slot parameter.
[0069] When setting the first time slot parameter and the second time slot parameter, you can choose to adjust only the first time slot parameter, only the second time slot parameter, or both the first and second time slot parameters, depending on the actual situation.
[0070] By adjusting the timeslot parameters, the priority parameters of the transmission queue can be adjusted, and the transmission queue competes for channel access based on the adjusted priority parameters. When the current bandwidth parameter of the transmission queue is low, the timeslot parameter is lowered, allowing the transmission queue to acquire channel access more quickly and enabling data transmission, thus increasing the current bandwidth parameter of the transmission queue. Conversely, when the current bandwidth parameter of the transmission queue is high, the timeslot parameter is increased, making it difficult for the transmission queue to quickly acquire channel access, thus decreasing the current bandwidth parameter of the transmission queue.
[0071] The following describes how to adjust the time slot parameters of the queue to be sent.
[0072] In this embodiment of the application, when the queue to be sent meets the adjustment conditions, the time slot parameters of the queue to be sent are adjusted according to the following principles:
[0073] When the current bandwidth parameter of the queue to be sent is greater than the target bandwidth parameter of the queue to be sent, the larger the current bandwidth parameter of the queue to be sent, the larger the adjusted timeslot parameter will be.
[0074] When the current bandwidth parameter of the queue to be sent is less than the target bandwidth parameter of the queue to be sent, the smaller the current bandwidth parameter of the queue to be sent, the smaller the adjusted timeslot parameter will be.
[0075] As can be seen from the aforementioned channel contention mechanism, if the current bandwidth parameter of the queue to be transmitted is greater than the target bandwidth parameter, it indicates that the queue to be transmitted is occupying a significant amount of channel resources. Increasing the time slot parameter of the queue to be transmitted can effectively reduce the amount of data transmitted.
[0076] If the current bandwidth parameter of the queue to be transmitted is less than the target bandwidth parameter of the queue to be transmitted, it indicates that the queue to be transmitted is occupying less channel resources. Reducing the time slot parameter of the queue to be transmitted can effectively increase the amount of data transmitted.
[0077] As an optional implementation, adjusting the time slot parameters of the queue to be transmitted includes: determining the adjustment range based on the numerical relationship between the current bandwidth parameter of the queue to be transmitted and the target bandwidth parameter of the queue to be transmitted; and adjusting the time slot parameters of the queue to be transmitted based on the adjustment range.
[0078] In this embodiment of the application, after obtaining the current bandwidth parameter and the target bandwidth parameter of the queue to be sent, the adjustment range of the time slot parameter is determined by comparing the numerical relationship between the two, and then the time slot parameter of the queue to be sent is adjusted according to the adjustment range.
[0079] Specifically, the adjustment range is 'a', and the timeslot parameter of the queue to be sent is 'SLOT'. After determining the adjustment range 'a', the timeslot parameter of the queue to be sent is adjusted to a*SLOT.
[0080] In some implementations, the adjustment range is determined based on the numerical relationship between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent, including:
[0081] The adjustment range is determined using the following formula:
[0082]
[0083] Where y is the adjustment range, and x is the ratio of the first parameter to the target bandwidth parameter of the queue to be sent. The first parameter is the difference between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent.
[0084] For example, if the current bandwidth parameter of the queue to be sent is 80kb, and the target bandwidth parameter of the queue to be sent is 100kb, then the difference between the current bandwidth parameter and the target bandwidth parameter of the queue to be sent is 20kb. The first parameter is 20kb / 100kb = 0.2, and x = 0.2. According to the above formula, the adjustment magnitude y is 0.83.
[0085] In other implementations, the adjustment range is determined based on the numerical relationship between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent, including: determining the adjustment range based on the numerical relationship and a preset adjustment strategy.
[0086] In this embodiment, an adjustment strategy is pre-configured to characterize the correspondence between numerical relationships and adjustment magnitudes. After determining the numerical relationship between the current bandwidth parameter of the queue to be transmitted and the target bandwidth parameter of the queue to be transmitted, the adjustment magnitude is determined from the adjustment strategy based on the numerical relationship.
[0087] For example, the numerical relationship between the current bandwidth parameter and the target bandwidth parameter of the queue to be sent is the ratio of the current bandwidth parameter to the target bandwidth parameter. The adjustment strategy is as follows: when the ratio of the current bandwidth parameter to the target bandwidth parameter is less than 20%, the adjustment increment is 0.5; when the ratio is between 21% and 50%, the adjustment increment is 0.6; when the ratio is greater than 51% and 70%, the adjustment increment is 0.7; and when the ratio is between 71% and 80%, the adjustment increment is 0.8.
[0088] In this application embodiment, the numerical relationship between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent is not limited. The numerical relationship may include the difference between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent, the ratio between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent, the ratio between the first parameter and the target bandwidth parameter of the queue to be sent, where the first parameter is the difference between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent, etc.
[0089] Step 103: Determine the priority parameters of the queue to be transmitted based on the adjusted time slot parameters, so that the queue to be transmitted can compete for the channel according to the priority parameters.
[0090] In this embodiment, after further adjusting the timeslot parameters of the queue to be transmitted, the priority parameters of the queue to be transmitted are determined based on the adjusted timeslot parameters. The specific method for determining the priority parameters based on the timeslot parameters can be found in existing technologies and will not be elaborated upon here. The queue to be transmitted competes for channel data based on the adjusted priority parameters, and transmits service data after successfully competing for the channel data.
[0091] Based on the same inventive concept, this application also provides a channel contention device. Please refer to... Figure 2 , Figure 2 This application provides a structural block diagram of a channel contention device 200, which may include:
[0092] The acquisition module 201 is used to acquire the current bandwidth parameter of the queue to be sent; wherein, the current bandwidth parameter of the queue to be sent is the amount of data sent by the queue to be sent within a preset time period;
[0093] The adjustment module 202 is used to adjust the time slot parameters of the queue to be sent when the current bandwidth parameters and the target bandwidth parameters of the queue to be sent meet the adjustment conditions; wherein, the time slot parameters are used to determine the priority parameters of the queue to be sent.
[0094] The determining module 203 is used to determine the priority parameters of the queue to be transmitted based on the adjusted time slot parameters, so that the queue to be transmitted can compete for the channel according to the priority parameters.
[0095] In an optional implementation, the time slot parameters of the queue to be sent include a first time slot parameter and a second time slot parameter, wherein the first time slot parameter is used to determine the arbitration inter-frame interval and the second time slot parameter is used to determine the backoff parameter.
[0096] In an optional implementation, the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent satisfy adjustment conditions, including:
[0097] The difference between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent is not within the preset threshold range;
[0098] Or the ratio of the current bandwidth parameter of the queue to be sent to the target bandwidth parameter of the queue to be sent is not within the preset threshold range.
[0099] In an optional implementation, the adjustment module 202 is specifically used to adjust the timeslot parameter by increasing the current bandwidth parameter of the queue to be sent as follows: when the current bandwidth parameter of the queue to be sent is greater than the target bandwidth parameter of the queue to be sent; when the current bandwidth parameter of the queue to be sent is less than the target bandwidth parameter of the queue to be sent, the current bandwidth parameter of the queue to be sent is smaller than the target bandwidth parameter of the queue to be sent.
[0100] In an optional implementation, the adjustment module 202 is specifically used to determine the adjustment range based on the numerical relationship between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent; and to adjust the time slot parameter of the queue to be sent based on the adjustment range.
[0101] In an optional implementation, the adjustment module 202 is specifically used to determine the adjustment range according to the following formula:
[0102]
[0103] Where y is the adjustment range, and x is the ratio of the first parameter to the target bandwidth parameter of the queue to be sent, where the first parameter is the difference between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent.
[0104] In an optional implementation, the adjustment module 202 is specifically used to determine the adjustment range based on the numerical relationship and a preset adjustment strategy; wherein the adjustment strategy is used to characterize the correspondence between the numerical relationship and the adjustment range.
[0105] In addition, please see Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device 300 according to an embodiment of this application. The electronic device 300 includes: at least one processor 301, at least one communication interface 302, at least one memory 303, and at least one bus 304. The bus 304 is used to enable direct communication between these components. The communication interface 302 is used for signaling or data communication with other node devices. The memory 303 stores machine-readable instructions executable by the processor 301. When the electronic device 300 is running, the processor 301 communicates with the memory 303 via the bus 304. When a machine-readable instruction is invoked by the processor 301, it executes the channel contention method described above.
[0106] Processor 301 can be an integrated circuit chip with signal processing capabilities. The processor 301 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor.
[0107] The memory 303 may include, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0108] Understandable. Figure 3 The structure shown is for illustrative purposes only; the electronic device 300 may also include components that are more advanced than those shown. Figure 3 The more or fewer components shown, or having the same Figure 3 The different configurations shown. Figure 3 The components shown can be implemented using hardware, software, or a combination thereof. In the embodiments of this application, electronic device 300 can be, but is not limited to, physical devices such as desktop computers, laptops, smartphones, smart wearable devices, and in-vehicle devices, or virtual devices such as virtual machines. Furthermore, electronic device 300 is not necessarily a single device; it can be a combination of multiple devices, such as a server cluster, etc.
[0109] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a computer, performs the steps of the channel contention method as described in the above embodiments.
[0110] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0111] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0112] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0113] It should be noted that if the function is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0114] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0115] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A channel contention method, characterized in that, include: Obtain the current bandwidth parameter of the queue to be sent; wherein, the current bandwidth parameter of the queue to be sent is the amount of data sent by the queue to be sent within a preset time period; When the current bandwidth parameter and the target bandwidth parameter of the queue to be sent meet the adjustment conditions, the time slot parameter of the queue to be sent is adjusted; wherein, the time slot parameter is used to determine the priority parameter of the queue to be sent, the target bandwidth parameter of the queue to be sent is a bandwidth parameter preset according to the priority of the queue to be sent, and the target bandwidth parameter of the queue to be sent represents the amount of data that the queue to be sent is expected to send within a preset time period. The priority parameters of the queue to be transmitted are determined based on the adjusted time slot parameters, so that the queue to be transmitted can compete for channel space according to the priority parameters.
2. The channel contention method according to claim 1, characterized in that, The time slot parameters of the queue to be sent include a first time slot parameter and a second time slot parameter. The first time slot parameter is used to determine the arbitration inter-frame interval, and the second time slot parameter is used to determine the backoff parameter.
3. The channel contention method according to claim 1, characterized in that, The current bandwidth parameters and the target bandwidth parameters of the queue to be sent meet the adjustment conditions, including: The difference between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent is not within the preset threshold range; Or the ratio of the current bandwidth parameter of the queue to be sent to the target bandwidth parameter of the queue to be sent is not within the preset threshold range.
4. The channel contention method according to claim 1, characterized in that, The adjustment of the time slot parameters of the queue to be sent includes: When the current bandwidth parameter of the queue to be sent is greater than the target bandwidth parameter of the queue to be sent, the larger the current bandwidth parameter of the queue to be sent, the larger the adjusted time slot parameter will be. When the current bandwidth parameter of the queue to be sent is less than the target bandwidth parameter of the queue to be sent, the smaller the current bandwidth parameter of the queue to be sent, the smaller the adjusted time slot parameter.
5. The channel contention method according to claim 1, characterized in that, The adjustment of the time slot parameters of the queue to be sent includes: The adjustment range is determined based on the numerical relationship between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent. Adjust the time slot parameters of the queue to be sent according to the adjustment range.
6. The channel contention method according to claim 5, characterized in that, The step of determining the adjustment range based on the numerical relationship between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent includes: The adjustment range is determined using the following formula: Where y is the adjustment range, and x is the ratio of the first parameter to the target bandwidth parameter of the queue to be sent, where the first parameter is the difference between the current bandwidth parameter of the queue to be sent and the target bandwidth parameter of the queue to be sent.
7. The channel contention method according to claim 5, characterized in that, The adjustment of the time slot parameters of the queue to be sent includes: The adjustment range is determined based on the numerical relationship and the preset adjustment strategy; wherein the adjustment strategy is used to characterize the correspondence between the numerical relationship and the adjustment range.
8. A channel contention device, characterized in that, include: The acquisition module is used to acquire the current bandwidth parameters of the queue to be sent; wherein, the current bandwidth parameters of the queue to be sent are the amount of data sent by the queue to be sent within a preset time period; An adjustment module is used to adjust the time slot parameters of the queue to be sent when the current bandwidth parameters and the target bandwidth parameters of the queue to be sent meet the adjustment conditions; wherein, the time slot parameters are used to determine the priority parameters of the queue to be sent, the target bandwidth parameters of the queue to be sent are bandwidth parameters preset according to the priority of the queue to be sent, and the target bandwidth parameters of the queue to be sent represent the amount of data that the queue to be sent is expected to send within a preset time period; The determining module is used to determine the priority parameters of the queue to be transmitted based on the adjusted time slot parameters, so that the queue to be transmitted can compete for the channel according to the priority parameters.
9. A communication device, characterized in that, include: Processor, memory, and bus; The processor and the memory communicate with each other via the bus; The memory stores program instructions that can be executed by the processor, and the processor can execute the method as described in any one of claims 1-7 by calling the program instructions.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when read and executed by a computer, perform the method as described in any one of claims 1-7.