Antenna switching method, wireless communication equipment and medium
By acquiring the data packet statistics of each antenna in the wireless communication device, calculating the expected allocation probability, and dynamically switching antennas, the problems of poor communication quality and continuous packet loss in the existing technology are solved, and a more stable communication effect is achieved.
Patent Information
- Application Number
- CN202511567104.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-01-20
AI Technical Summary
Existing wireless communication devices suffer from poor communication quality when switching between multiple antennas, and existing methods are prone to continuous packet loss and performance instability.
By acquiring data packet statistics from each antenna, calculating its expected allocation probability, and using a noise shaping quantizer to dynamically determine the transmission antenna for the next data packet, continuous packet loss caused by periodic observations can be avoided.
This technology enables wireless communication devices to dynamically switch antennas based on each transmitted and received packet, ensuring communication quality, avoiding continuous packet loss, and improving the communication performance of the devices.
Smart Images

Figure CN121367523A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of wireless communication, and in particular, to an antenna switching method, a wireless communication device and a medium. BACKGROUND
[0002] Data can be transmitted between wireless communication devices through antennas. In order to improve the transceiving performance of the wireless communication device, the wireless communication device can be configured with multiple antennas. When the transceiving performance of one of the antennas deteriorates, the wireless communication device can switch the current antenna to another antenna with better transceiving performance.
[0003] The current method of switching the current antenna among multiple antennas in the wireless communication device has poor communication quality. SUMMARY
[0004] The present disclosure aims to overcome the above-mentioned defects in the prior art and provides an antenna switching method, a wireless communication device and a medium.
[0005] According to a first aspect of the present disclosure, an antenna switching method is provided, applied to a wireless communication device, comprising: obtaining statistical data of data packets transmitted by a first antenna and a second antenna respectively, wherein the statistical data comprises the total number of data packets transmitted by each antenna and the number of data packets transmitted successfully; obtaining an expected allocation probability of one of the first antenna and the second antenna based on the statistical data; and determining an antenna for transmitting a next data packet based on the expected allocation probability.
[0006] In some embodiments, obtaining the expected allocation probability of one of the first antenna and the second antenna based on the statistical data comprises, in response to the total number of data packets transmitted by the first antenna and the second antenna both exceeding a first threshold, obtaining the expected allocation probability based on first statistical data of the first antenna and second statistical data of the second antenna.
[0007] In some embodiments, obtaining the expected allocation probability based on the first statistical data of the first antenna and the second statistical data of the second antenna comprises: obtaining a current allocation probability of the first antenna and the second antenna; obtaining an adjustment step of the current allocation probability based on a success rate difference between a first success rate of the first antenna and a second success rate of the second antenna; and obtaining the expected allocation probability based on the current allocation probability and the adjustment step.
[0008] In some embodiments, obtaining the expected allocation probability based on the current allocation probability and the adjustment step comprises, in response to the expected allocation probability exceeding a value of 1, updating the expected allocation probability to the value of 1; or in response to the expected allocation probability being lower than a value of 0, updating the expected allocation probability to the value of 0.
[0009] In some embodiments, the acquiring the expected allocation probability of one of the first antenna and the second antenna based on the statistical data comprises, in response to a total number of data packets transmitted by only one of the first antenna and the second antenna exceeding a third threshold and a current allocation probability of only one of the first antenna and the second antenna exceeding a fourth threshold, acquiring the expected allocation rate based on a success rate of only one of the first antenna and the second antenna.
[0010] In some embodiments, the acquiring the expected allocation rate based on the success rate of only one of the first antenna and the second antenna comprises, in response to the success rate of only one of the first antenna and the second antenna falling below a preset range, decreasing the current allocation probability of only one of the first antenna and the second antenna.
[0011] In some embodiments, the success rate of only one of the first antenna and the second antenna falling below a preset range comprises the success rate of only one of the first antenna and the second antenna being lower than a value of a historical maximum success rate of only one of the first antenna and the second antenna by more than the preset range.
[0012] In some embodiments, the decreasing the current allocation probability of only one of the first antenna and the second antenna comprises acquiring a decreasing step of the current allocation probability based on a difference between a historical maximum success rate of only one of the first antenna and the second antenna and the success rate of only one of the first antenna and the second antenna.
[0013] In some embodiments, the acquiring the expected allocation rate based on the success rate of only one of the first antenna and the second antenna comprises, in response to a difference between the current allocation probability and the decreasing step exceeding a value of 1, determining the expected allocation probability as the value of 1; or in response to the difference between the current allocation probability and the decreasing step being lower than a value of 0, determining the expected allocation probability as the value of 0.
[0014] In some embodiments, the acquiring the expected allocation rate based on the success rate of only one of the first antenna and the second antenna comprises, in response to the success rate of only one of the first antenna and the second antenna not falling below a preset range, maintaining the current allocation probability of only one of the first antenna and the second antenna.
[0015] In some embodiments, further comprising, in response to the success rate of only one of the first antenna and the second antenna being greater than the historical maximum success rate of only one of the first antenna and the second antenna, updating the historical maximum success rate as the success rate of only one of the first antenna and the second antenna.
[0016] In some embodiments, determining the antenna to transmit the next data packet based on the expected allocation probability comprises quantizing the expected allocation probability using a first-order noise shaping quantizer to obtain a sequence of control signals, wherein each value in the sequence of control signals represents an antenna control signal to transmit each data packet.
[0017] According to a second aspect of the present disclosure, there is provided a wireless communication device comprising at least one processor; and a memory for storing computer-executable instructions that, when executed, cause the at least one processor to perform the method according to the first aspect described above.
[0018] According to a third aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer-executable instructions for performing the method according to the first aspect described above.
[0019] According to the antenna switching method, the wireless communication device and the medium of the present disclosure, statistical data of data packets transmitted by each antenna in a dual-antenna system is obtained respectively, and the statistical data comprises a total data packet amount and a number of successfully transmitted data packets. Then, expected allocation probabilities of each antenna are determined according to the statistical data, and an antenna to transmit the next data packet is determined. The expected allocation probabilities can dynamically change with the statistical data, so that the wireless communication device can converge to a better antenna. In addition, by quantizing the expected allocation probabilities into control signals, the continuous packet loss phenomenon in the periodic observation method can be avoided. The antenna switching method of the present disclosure dynamically switches antennas on the basis of each received / transmitted packet, so that the communication quality can be guaranteed. BRIEF DESCRIPTION OF DRAWINGS
[0020] Other features and advantages of the present disclosure will be better understood by the following preferred embodiments described in detail below with reference to the accompanying drawings, wherein the same reference signs represent the same or similar components.
[0021] Figure 1 A schematic diagram illustrating an example application scenario according to an embodiment of the present disclosure is shown.
[0022] Figure 2 A flowchart illustrating an example antenna switching method according to an embodiment of the present disclosure is shown.
[0023] Figure 3 A flowchart illustrating a method of obtaining an expected allocation probability according to an embodiment of the present disclosure is shown.
[0024] Figure 4 A flowchart illustrating a method of obtaining an expected allocation probability according to an embodiment of the present disclosure is shown.
[0025] Figure 5A flowchart of a method of obtaining a desired allocation probability according to an embodiment of the present disclosure is shown.
[0026] Figure 6 A block diagram of an exemplary wireless communication device according to an embodiment of the present disclosure is shown.
[0027] Figure 7 A block diagram of an exemplary wireless communication device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0028] To make the skilled in the art better understand the technical solutions of the present disclosure, the present disclosure is further described in detail below in combination with the drawings and specific embodiments, but not as a limitation to the present disclosure.
[0029] The flowcharts and block diagrams in the drawings show the possible implementation architecture, function and operation of the method and system according to various embodiments of the present disclosure. It should be noted that the functions marked in the blocks can also occur in an order different from that marked in the drawings. For example, two blocks indicated in succession can actually be executed substantially in parallel, or they can sometimes be executed in reverse order, depending on the functions involved. In addition, in the present disclosure, the terms "first", "second", etc. are used only to distinguish and not to limit the sequence, unless otherwise stated.
[0030] The wireless communication device refers to a device with wireless connection function, which can provide data to the user. The wireless communication device is, for example, a mobile phone, a computer with a mobile terminal, a portable vehicle mobile device, a smart wearable device, etc. Among them, the smart wearable device includes a smart watch, a smart helmet, smart glasses, a smart bracelet, a wireless Bluetooth headset, etc.
[0031] Multiple antennas can be provided on the wireless communication device. For example, multiple antennas can be provided on a mobile phone, which can work independently. For another example, double antennas can be provided in a wearable device, which cover different directions respectively. Figure 1 An application scenario of one embodiment of the present disclosure is shown. In Figure 1 In the embodiment, the wireless communication device 10 can be a wearable device, which is provided with two antennas ANT1 and ANT2.
[0032] Wearable devices are usually powered by batteries, which have limited endurance and battery capacity. Under the condition of limited power consumption budget, wearable devices can only use a single antenna scheme with one transceiver radio path. For the single antenna scheme, the radiation direction of the antenna needs to be narrowed to improve the gain of the antenna, that is, a trade-off needs to be made between signal gain and radiation direction. To this end, a time-sharing switched antenna can be added to one radio path, such as a dual antenna scheme, in which two antennas are designed to cover different directions. Such a scheme can not only achieve a higher gain antenna with a certain directivity, but also achieve better coverage in different directions.
[0033] In the dual antenna scheme, automatic antenna switching control needs to be implemented. In some examples, the single radio path dual antenna system intelligently statistically observes the working parameters of the current antenna in use, and whether to switch to another antenna can be determined by statistically observing the packet reception of the current antenna and a preset antenna parameter threshold. For example, when the received signal strength of the current antenna is less than the preset threshold or the packet loss rate is greater than the preset threshold, the system switches to another antenna. However, the size of the threshold in this method will affect the communication performance.
[0034] For example, the dual antenna scheme includes antenna 1 and antenna 2, where antenna 1 is the current antenna and the packet loss rate of antenna 1 is 30%, and antenna 2 is the standby antenna and the packet loss rate of antenna 2 is 20%. Assuming that the antenna parameter threshold is set to 40%, the antenna switching condition is that when the packet loss rate of the current antenna is greater than 40%, the system switches to another antenna. In this example, the setting of the antenna parameter threshold is too loose, antenna 1 is not the optimal antenna, and antenna 2 is better but will not trigger the switching to antenna 2. Assuming that the antenna parameter threshold is set to 10%, the antenna switching condition is that when the packet loss rate of the current antenna is greater than 10%, the system switches to another antenna. In this example, the setting of the antenna parameter threshold is too strict, and neither antenna 1 nor antenna 2 meets the threshold condition, so there will be a situation of switching back and forth. The wireless communication device in this example cannot converge or track on the antenna 2 with relatively good performance.
[0035] In some examples, the respective antenna parameters of the two antennas can be periodically statistically observed, and then the two antenna parameters are compared to select one with better performance for use. The antenna parameter can be the received signal strength or the packet loss rate. However, the method of statistically observing the respective antenna parameters requires more packets to be transmitted and received to obtain accurate data. In addition, the method needs to periodically switch to another antenna for work. For the case where the performance of the two antennas is greatly different, periodically switching to the antenna with poor performance will cause intermittent poor performance. For example, when the wireless communication device is a true wireless Bluetooth earphone, when the window is opened to the poor antenna to statistically observe the antenna parameters, continuous packet loss may occur, resulting in audio stuttering.
[0036] To solve the above problems, one embodiment of the present disclosure provides an antenna switching method. Figure 2 is a flow chart of the antenna switching method 20 of one embodiment of the present disclosure. The method 20 includes steps S21-S23. The method 20 can be implemented by any one of the wireless communication device 600 of Figure 6 and the wireless communication device 700 of Figure 7 .
[0037] In S21, statistical data of data packets transmitted by the first antenna and the second antenna are respectively acquired, the statistical data including total data packet numbers and successfully transmitted data packet numbers of respective antennas.
[0038] The present disclosure does not limit the type of data packets transmitted by the antennas, i.e., the data packets transmitted by the antennas can be received data packets or transmitted data packets. The method 20 can be applied to antenna switching of a transmitting end or a receiving end.
[0039] The statistical data includes total data packet numbers and successfully transmitted data packet numbers of respective antennas. Specifically, the statistical data includes a total data packet number ant1_t of the first antenna, a successfully transmitted data packet number ant1_s of the first antenna, a total data packet number ant2_t of the second antenna, and a successfully transmitted data packet number ant2_s of the second antenna.
[0040] In some examples, when the antenna switching method 20 is applied to switching of receiving antennas, the statistical data includes total received data packet numbers and successfully received data packet numbers of respective antennas. The successfully received data packets can be data packets passing cyclic redundancy check (CRC) check.
[0041] In other examples, when the antenna switching method 20 is applied to switching of transmitting antennas, the statistical data includes total transmitted data packet numbers and successfully transmitted data packet numbers of respective antennas. The successfully transmitted data packets can be data packets correctly receiving acknowledgement (ACK).
[0042] The statistical data can be accumulated on the basis of existing received / transmitted data packets. Taking the first antenna as an example, if the last received / transmitted data packet is the first antenna, ant1_t is accumulated by 1, i.e., ant1_t i+1 = ant1_t i + 1. If the last received / transmitted data packet is the first antenna and the received / transmitted data packet is successful, ant1_s is accumulated by 1, i.e., ant1_s i+1 = ant1_s i+ 1. The initial values of ant1_t0 and ant1_s0 can be set as 0. The packet statistics of the data transmitted by the second antenna can also be accumulated according to a similar process, which is not described here again.
[0043] In S22, the expected allocation probability of one of the first antenna and the second antenna is obtained based on the statistics.
[0044] The expected allocation probability of one of the first antenna and the second antenna can represent the expected allocation ratio of the first antenna and the second antenna. When the expected allocation probability of one of the antennas is known, the expected allocation probability of the other antenna is also known. For example, a variable Factor can be set, whose value is between 0 and 1 and represents the expected allocation probability of using one of the two antennas (such as the first antenna). Then the expected allocation probability of the other one of the two antennas (such as the second antenna) is 1-Factor. The ratio of the two expected allocation probabilities can be used as the expected allocation ratio of the first antenna and the second antenna.
[0045] In the process of receiving / transmitting packets, the statistics are dynamically updated. Therefore, the expected allocation ratio of the first antenna and the second antenna obtained based on the statistics is not fixed, but changes with the statistics. In this way, when the performance of the antennas changes over time, the change in the performance of the antennas can be tracked to switch from the antenna with poor performance to the other antenna with relatively good performance. When the performance of the two antennas is good and bad, the wireless communication device can converge to the antenna with better performance.
[0046] In S23, the antenna for transmitting the next packet is determined based on the expected allocation probability.
[0047] The expected allocation probability can represent the average antenna selection ratio. The value of the expected allocation probability can be quantized as a control signal of the next receiving / transmitting antenna. Specifically, the expected allocation probability can be quantized to an output of 1 bit by a noise shaping quantizer.
[0048] In some examples, the noise shaping quantizer can be a first-order noise shaping quantizer. In other examples, other types of noise shaping quantizers can also be used, such as a second-order noise shaping quantizer.
[0049] Next, an example of how to determine the antenna for transmitting the next packet based on the expected allocation probability is described by taking the first-order noise shaping quantizer to quantize the expected allocation ratio to obtain the output control signal. First, the pre-quantization value pre_quantize is determined by using formula (1). Wherein, Factor is the expected allocation probability, reg1 and reg2 are two state variables, and their initial values can be both 0.
[0050] pre_quantize = Factor - reg2 + reg1 (1)
[0051] The pre-quantized value is rounded down to obtain the two-antenna control signal sequence Out, which can be seen from equation (2). Wherein floor() represents rounding down.
[0052] Out = floor(pre_quantize) (2)
[0053] Out ∈ {0, 1}. Each value in the two-antenna control signal sequence Out represents the antenna used to transmit each data packet. For example, when Factor represents the expected allocation probability of the first antenna, Out output value 1 indicates that the first antenna is used for the next receiving / transmitting; Out output value 0 indicates that the second antenna is used for the next receiving / transmitting. When Factor represents the expected allocation probability of the second antenna, Out output value 1 indicates that the second antenna is used for the next receiving / transmitting; Out output value 0 indicates that the first antenna is used for the next receiving / transmitting.
[0054] In addition, reg1 and reg2 are updated for the next calculation. Specifically, reg1 is updated to be assigned to the pre-quantized value pre_quantize, and reg2 is updated to be assigned to the control signal Out.
[0055] Table 1 shows various parameters of the quantization process in one example of the present disclosure. In this example, Factor represents the expected allocation probability of the first antenna as 0.4. As can be seen from Table 1, the input of the quantization process is Factor 0.4, and the output Out of the quantization process is the sequence: 0, 0, 1, 0, 1, …. The output value 1 indicates that the first antenna is selected this time, and the output value 0 indicates that the second antenna is selected this time. The average output is 2 / 5 = 0.4.
[0056] The difference reg1-reg2 of the two state variables in equation (1) represents the quantization error. By storing the quantization error, the average value of the quantization output Out is made to approximate the value of the input Factor in the subsequent process of outputting the control signal. Table 1 Various parameters of the quantization process
[0057] In S23, a single control signal is used to determine the antenna for transmitting a single data packet, although the single-time antenna selection has randomness, the average antenna selection ratio in the quantized control signal is consistent with the expected allocation ratio. The minimum interval of the antenna switching of the present disclosure is only one data packet, which can avoid the continuous packet loss that may occur when the performance of the antenna is poor in the periodic fixed rotation observation optimization method.
[0058] In the method 20, statistics of data packets transmitted by each antenna in the dual-antenna system are obtained respectively, and the statistics include the total number of data packets transmitted by each antenna and the number of data packets transmitted successfully. The expected allocation probability of the two antennas is determined according to the statistics of the two antennas, and then the antenna transmitting the next data packet is determined. The expected allocation probability of each antenna can dynamically change with the statistics, so that the wireless communication device can converge to the better antenna as the performance of each antenna changes. In addition, by quantifying the expected allocation probability as a control signal, the minimum interval of antenna switching can be reduced to one data packet, thereby avoiding the continuous packet loss phenomenon in the periodic observation method. The antenna switching method 20 dynamically switches the antenna at the reference of each received / transmitted packet, thereby ensuring the communication quality of the wireless communication device.
[0059] In some embodiments, the expected allocation probability in the dual-antenna can be obtained according to the distribution of the statistics. In some examples, when the working performance of the two antennas is similar, the expected allocation probability can be obtained according to the statistics of the two antennas. In other examples, when the working performance of the two antennas is quite different, the expected allocation probability is obtained according to the statistics of the antenna with better working performance.
[0060] Figure 3 A flowchart of a method 30 for obtaining the expected allocation probability in one embodiment of the present disclosure is shown.
[0061] The method 30 is based on the statistics obtained in step S21. The method for obtaining the expected allocation probability is determined according to the distribution in the statistics.
[0062] Specifically, in S31, it is determined whether both antennas have received or transmitted enough data packets. If yes, it proceeds to S32; otherwise, it proceeds to S33.
[0063] Determining whether the antennas have received / transmitted enough data packets can be obtained by comparing the total number of data packets received / transmitted by each antenna with a certain number threshold. For example, when the total number of data packets received / transmitted by both antennas exceeds 10, it indicates that both antennas have received or transmitted enough data packets.
[0064] In S32, in response to both antennas having received or transmitted enough data packets, the expected allocation probability is obtained based on the statistics of the two antennas.
[0065] In some examples, in response to the total number of data packets transmitted by the first antenna and the second antenna both exceeding a first threshold, for example, 10, the expected allocation probability is obtained based on the first statistics of the first antenna and the second statistics of the second antenna.
[0066] In some examples, the statistics include a success rate, which is a ratio of a number of successfully transmitted data packets to a total number of data packets. For example, when the total number of data packets transmitted by the first antenna is ant1_t=12, the total number of data packets transmitted by the second antenna is ant2_t=10, the number of successfully transmitted data packets by the first antenna is ant1_s=9, and the number of successfully transmitted data packets by the second antenna is ant2_s=6, the success rate of the first antenna is ant1_r=9 / 12=0.75, and the success rate of the second antenna is ant2_r=6 / 10=0.6. Since the success rate of the first antenna is higher than that of the second antenna, the new expected allocation probability can be adjusted by a certain step size based on the current expected allocation probability by favoring the allocation probability of the first antenna, or the new expected allocation probability can be adjusted by a certain step size based on the current expected allocation probability by favoring the allocation probability of the second antenna.
[0067] In S33, in response to neither of the two antennas transmitting enough data packets, it is determined whether only one of the two antennas transmits enough data packets and it is expected that the other one of the two antennas is difficult to transmit enough data. If yes, S34 is entered; otherwise, S35 is entered.
[0068] In other words, in S33, when the dual-antenna system converges to one of the antennas, S34 is entered to obtain the expected allocation probability based on the statistics of the antenna, without considering the statistics of the other antenna.
[0069] In some examples, it can be determined whether the dual-antenna system converges to one of the antennas based on the total number of data packets transmitted by each antenna and the current expected allocation probability. For example, in response to the total number of data packets transmitted by only one of the first antenna and the second antenna exceeding a third threshold value and the current allocation probability of only one of the first antenna and the second antenna exceeding a fourth threshold value, it is determined that the dual-antenna system converges to one of the antennas. In this example, the expected allocation probability is obtained based on the success rate of the converged antenna, i.e., the expected allocation probability is obtained based on the success rate of only one of the first antenna and the second antenna. The third threshold value is, for example, 90, and the fourth threshold value is, for example, 0.9.
[0070] Taking the case that the dual-antenna system converges to the first antenna as an example, when the total number of data packets transmitted by the first antenna exceeds 90, the total number of data packets transmitted by the second antenna is less than 10, and the current allocation probability of the first antenna exceeds 0.9, the expected allocation probability is obtained based on the success rate of the first antenna. The expected allocation probability here can be the current allocation probability of the first antenna or a value changed from the current allocation probability.
[0071] For example, when the total number of data packets transmitted by the second antenna ant2_t exceeds 90, the total number of data packets transmitted by the first antenna ant1_t is less than 10, and the current allocation probability of the second antenna exceeds 0.9, the expected allocation probability is obtained based on the success rate of the second antenna. The expected allocation probability here can be the current allocation probability of the second antenna or a value that changes the current allocation probability.
[0072] In some examples, it can be determined in turn whether the dual-antenna system converges to one of the antennas. For example, the total number of data packets and the current allocation probability of the first antenna are obtained first, and when they do not satisfy the convergence condition, the total number of data packets and the current allocation probability of the second antenna are obtained, and it is determined whether they satisfy the convergence condition.
[0073] In addition, when neither of the dual-antenna systems converges to one of the antennas in S33, S35 is entered, and the current allocation probability is maintained. S35 indicates that when neither of the two antennas accumulates enough data and neither converges to one of the antennas, i.e., a certain amount of data needs to be accumulated on the basis of the current statistical data to determine whether the expected allocation probability needs to be modified. In this process, the current allocation probability is maintained. The current allocation probability here can refer to the initial allocation probability, such as 0.5. The current allocation probability can also be the expected allocation probability of each antenna in the last antenna switching process.
[0074] The statistical data in the antenna switching method of the present disclosure is updated with each received / transmitted packet. After S35, with the update of the statistical data, the method flow returns to S31, and the expected allocation probability is continuously obtained based on the statistical data.
[0075] In addition, in some examples, after the expected allocation probability is obtained based on the statistical data, the statistical data can be cleared, and the statistical data is accumulated again to dynamically obtain the expected allocation probability of each antenna, and then determine the antenna for subsequent received / transmitted data packets.
[0076] For example, in the method 30, after the expected allocation probability is obtained based on the statistical data of the two antennas in S32, S36 is entered. In S36, the total number of data packets transmitted by the two antennas and the number of successfully transmitted data packets are cleared. The total number of received / transmitted packets ant1_total and ant2_total and the number of successfully received / transmitted packets ant1_s and ant2_s of the first antenna and the second antenna are cleared.
[0077] For another example, in the method 30, after the expected allocation probability is obtained based on the statistical data of the convergent antenna in S34, S37 is entered. In S37, the total number of data packets transmitted by the convergent antenna and the number of successfully transmitted data packets are cleared.
[0078] In the method 30, the expected allocation probability of each antenna can be obtained based on the statistics of both antennas, or the expected allocation probability of each antenna can be obtained from the statistics of the antenna with better performance among the two antennas, so as to ensure that the wireless communication device can track the performance change of the antennas and converge on the antenna with better performance.
[0079] In some embodiments, the expected allocation probability can be obtained based on the performance difference between the two antennas in S32. For example, Figure 4 A flowchart of a method 40 for obtaining the expected allocation probability according to an embodiment of the present disclosure is shown.
[0080] In S401, the current allocation probability is obtained.
[0081] The current allocation probability Factor i is the expected allocation probability calculated and stored in the previous antenna control. If the current calculation is the first time to calculate the expected allocation probability of the antenna control, the current allocation probability Factor i is equal to the initial allocation probability Factor0, which can be any value between 0 and 1. In some examples, the initial allocation probability Factor0 can be set to 0.5, indicating that the average allocation of the use probability of the first antenna and the second antenna is used as the starting point.
[0082] In S402, the success rate difference of the two antennas is obtained.
[0083] The success rate of each antenna is obtained based on the ratio of the number of successfully transmitted data packets to the total number of data packets. The success rate of the first antenna is ant1_r = ant1_s / ant1_t, and the success rate of the second antenna is ant2_r = ant2_s / ant2_t.
[0084] The adjustment step adj_step for the current allocation probability Factor i can be obtained based on the absolute value of the difference ant1_r - ant2_r between the success rate ant1_r of the first antenna and the success rate ant2_r of the second antenna.
[0085] In some examples, in order to avoid large fluctuations in antenna switching, the adjustment step can be subjected to clipping processing. For example, in S403, it is determined whether the absolute value of the success rate difference of the two antennas exceeds a constraint threshold, i.e., a second threshold Thd2. If yes, it goes to S405 for clipping processing; otherwise, it goes to S404 without clipping processing. The second threshold Thd2 is a value greater than zero. In some examples, the second threshold Thd2 is 0.5.
[0086] In S404, in response to the absolute value of the success rate difference of the two antennas not exceeding the second threshold Thd2, the absolute value of the success rate difference of the two antennas is taken as the adjustment step, i.e., adjustment step adj_step = abs(ant1_r - ant2_r), where abs() represents calculating the absolute value.
[0087] In S405, in response to the absolute value of the success rate difference of the two antennas exceeding the second threshold Thd2, the second threshold Thd2 is taken as the adjustment step, i.e., adjustment step adj_step = Thd2.
[0088] In S406, based on the current allocation probability Factor i and the adjustment step adj_step, a new expected allocation probability Factor i+1 is calculated.
[0089] In some examples, if the variable Factor represents the expected allocation probability of the first antenna, if the receive / transmit success rate of the first antenna is higher than or equal to the receive / transmit success rate of the second antenna, i.e., the value of ant1_r - ant2_r is greater than or equal to zero, then the expected allocation probability of the first antenna is calculated as follows: Factor i+1 = Factor i + adj_step; if the receive / transmit success rate of the first antenna is lower than the receive / transmit success rate of the second antenna, i.e., the value of ant1_r - ant2_r is less than zero, then the expected allocation probability of the first antenna is calculated as follows: Factor i+1 = Factor i - adj_step.
[0090] In some examples, if the variable Factor represents the expected allocation probability of the second antenna, if the receive / transmit success rate of the first antenna is higher than or equal to the receive / transmit success rate of the second antenna, i.e., the value of ant1_r - ant2_r is greater than or equal to zero, then the expected allocation probability of the second antenna is calculated as follows: Factor i+1 = Factor i - adj_step; if the receive / transmit success rate of the first antenna is lower than the receive / transmit success rate of the second antenna, i.e., the value of ant1_r - ant2_r is less than zero, then the expected allocation probability of the second antenna is calculated as follows: Factor i+1 = Factor i + adj_step.
[0091] The expected allocation probability Factor obtained in S406 can be used to determine the antenna for transmitting the subsequent data packet. In some examples, when the expected allocation probability Factor is out of the range of [0, 1], it is clipped.
[0092] Specifically, in S407, it is determined whether the expected allocation probability Factor is in the range of [0, 1]. If yes, it goes to S408, and the expected allocation probability Factor is not clipped, and is maintained. Otherwise, when the expected allocation probability Factor is less than 0, it goes to S409, and the expected allocation probability Factor is assigned or updated as 0. When the expected allocation probability Factor is greater than 1, it goes to S410, and the expected allocation probability Factor is assigned or updated as 1.
[0093] In some embodiments, obtaining the expected allocation probability based on the statistical data of one of the two antennas in S34 can be implemented based on the change of the working performance of the antenna. The one of the two antennas is the antenna with better working performance, and when the working performance of the antenna changes, more specifically, when the working performance of the antenna decreases, the allocation probability of the antenna can be reduced to switch to the other antenna more.
[0094] In some examples, the current allocation probability of the antenna is reduced when the success rate of only one of the first antenna and the second antenna decreases beyond a preset range. For example, Figure 5 A flowchart of a method 50 of obtaining an expected allocation probability according to one embodiment of the present disclosure is shown.
[0095] In S501, the current allocation probability of the antenna with better working performance of the two antennas is obtained.
[0096] In the present disclosure, the statistical data of each antenna is updated with each received / transmitted data packet, and the expected allocation probability of each antenna does not necessarily change with each received / transmitted data packet, i.e., in the process of some received / transmitted data packets, the expected allocation probability of each antenna is maintained unchanged. The current allocation probability in S34 can be the expected allocation probability determined in S32, or the expected allocation probability determined in the last process of obtaining the expected allocation probability based on the statistical data of the antenna with better working performance. The corresponding statistical data after the last process of obtaining the expected allocation probability based on the statistical data of the antenna can be cleared, and the expected allocation probability can be retained.
[0097] In some examples, the degree of the decrease in the performance of the antenna can be represented by comparing the difference between the success rate of the antenna and the historical maximum success rate. In some other examples, the difference can also be represented by comparing the success rate of the antenna with other success rate related values, such as the average of the historical maximum success rate, the second largest value, the nth largest value, the average of the historical success rate, etc.
[0098] In the method 50, the expected allocation probability is obtained based on the difference between the success rate of the antenna and the historical maximum success rate. For example, in S502, the success rate ant_r of the antenna and the historical maximum success rate ant_r_max are obtained. The success rate ant_r of the antenna = ant_s / ant_t. The historical maximum success rate ant_r_max can be set to store the maximum success rate of the corresponding antenna, and can be obtained by recording the success rate accumulated each time the antenna transmits / receives a packet, and updating the historical maximum success rate ant_r_max to the latest value when a higher success rate than the previous one occurs. For example, the historical maximum success rate ant_r_max can be obtained from the processes of S32 and S36.
[0099] In S503, it is determined whether the success rate ant_r decreases by more than a preset range compared with the historical maximum success rate ant_r_max, or in other words, whether the success rate ant_r is lower than the historical maximum success rate ant_r_max by more than a preset range. The preset range is, for example, 0.1, i.e. it is determined whether the success rate ant_r is lower than the historical maximum success rate ant_r_max-0.1. For example, the historical maximum success rate ant_r_max is 0.9, and the success rate ant_s is 0.7, 0.85, or 0.95. It is compared whether the difference between the success rate ant_r and the historical maximum success rate ant_r_max is less than -0.1. If yes, for example, the historical maximum success rate ant_r_max is 0.9 and the success rate ant_s is 0.7, it indicates that the performance of the antenna decreases to a certain degree, and the expected allocation probability of the antenna can be decreased; otherwise, it indicates that the performance of the antenna decreases less or increases, and the expected allocation probability of the antenna can be maintained.
[0100] In response to the comparison result in S503 being yes, the current allocation probability is decreased; otherwise, the current allocation probability is maintained.
[0101] The change value, i.e. the decreasing step adj_step2, of the current allocation probability Factor i is obtained based on the difference between the historical maximum success rate ant_r_max and the success rate ant_r of the antenna, i.e. ant_r_max - ant_r.
[0102] In some examples, to avoid large fluctuation of antenna switching, the reduction step can be clipped. For example, in S504, when the success rate ant_r drops more than a preset range compared to the historical maximum success rate ant_r_max, it is determined whether the difference between the historical maximum success rate ant_r_max and the success rate ant_r exceeds a constraint threshold, i.e., a fifth threshold Thd5. If yes, S509 is entered to perform clipping; otherwise, S508 is entered without clipping. In some examples, the fifth threshold Thd5 is 0.5.
[0103] In S508, in response to the difference between the historical maximum success rate ant_r_max and the success rate ant_r not exceeding the fifth threshold Thd5, the difference ant_r_max - ant_r is taken as the reduction step, i.e., reduction step adj_step2 = ant_r_max - ant_r.
[0104] In S509, in response to the difference between the historical maximum success rate ant_r_max and the success rate ant_r exceeding the fifth threshold Thd5, the fifth threshold Thd5 is taken as the reduction step, i.e., reduction step adj_step2 = Thd5.
[0105] In S510, a new expected allocation probability Factor i is obtained based on the current allocation probability Factor i+1 and the reduction step adj_step2.
[0106] In some examples, if the variable Factor represents the expected allocation probability of the first antenna, if the historical maximum success rate ant_r_max and the success rate ant_r are data of the first antenna, the expected allocation probability of the first antenna is calculated as follows: Factor i+1 = Factor i - adj_step2; if the historical maximum success rate ant_r_max and the success rate ant_r are data of the second antenna, the expected allocation probability of the first antenna is calculated as follows: Factor i+1 = Factor i + adj_step2.
[0107] In some examples, if the variable Factor represents the expected allocation probability of the second antenna, if the historical maximum success rate ant_r_max and the success rate ant_r are data of the first antenna, the expected allocation probability of the second antenna is calculated as follows: Factor i+1 = Factor i+ adj_step2; if the above historical maximum success rate ant_r_max and the success rate ant_r are data of the second antenna, then the expected allocation probability of the second antenna is calculated as follows: Factor i+1 = Factor i - adj_step2.
[0108] The expected allocation probability Factor obtained in S510 can be used to determine the antenna for transmitting the subsequent data packet. In some examples, when the expected allocation probability Factor is out of the range of [0, 1], it is subjected to clipping.
[0109] Specifically, similar to S407-S409, it is determined whether the expected allocation probability Factor is within the range of [0, 1]. If yes, it is not subjected to clipping. Otherwise, when the expected allocation probability Factor is less than 0, the expected allocation probability Factor is assigned or updated as 0; when the expected allocation probability Factor is greater than 1, the expected allocation probability Factor is assigned or updated as 1.
[0110] Referring to the variations of S504-S511 in method 50, in response to the success rate ant_r decreasing by more than a preset range compared to the historical maximum success rate ant_r_max, the expected allocation probability of the corresponding antenna is decreased, i.e., the allocation proportion of the antenna with deteriorated performance is decreased.
[0111] On the contrary, in response to the success rate ant_r decreasing by less than a preset range compared to the historical maximum success rate ant_r_max, the expected allocation probability of the corresponding antenna is maintained. For example, the historical maximum success rate ant_r_max is 0.9, and the success rate ant_s is 0.85 or 0.95. In this example, the expected allocation probability of the corresponding antenna is not adjusted, so as to allocate a certain allocation proportion to another antenna to track the working performance of the other antenna.
[0112] Referring to S05-S507 in method 50, in response to the success rate ant_r decreasing by less than a preset range compared to the historical maximum success rate ant_r_max, the historical maximum success rate ant_r_max can be updated according to different situations.
[0113] Specifically, in S505, it is determined whether the success rate ant_r is greater than the historical maximum success rate ant_r_max. If yes, S506 is entered; otherwise, S507 is entered.
[0114] In S506, in response to the success rate ant r being greater than the historical maximum success rate ant r max, the historical maximum success rate ant r max is updated as the success rate ant r. For example, the historical maximum success rate ant r max is 0.9, and the success rate ant s is 0.95, the historical maximum success rate ant r max is updated as 0.95.
[0115] In S507, in response to the success rate ant r being less than the historical maximum success rate ant r max, the historical maximum success rate ant r max is maintained unchanged. For example, the historical maximum success rate ant r max is 0.9, and the success rate ant s is 0.85, the historical maximum success rate ant r max is maintained as 0.9.
[0116] Figure 6 A block diagram of an exemplary wireless communication device 600 according to embodiments of the present disclosure is shown. As shown, the wireless communication device 600 includes a data statistics unit 601, a processing unit 602. Figure 6 The data statistics unit 601 is configured to obtain statistics data of data packets transmitted by the first antenna and the second antenna. For example, the data statistics unit 601 is configured to perform the step S21 in the method 20, the step S402 in the method 40, the step S502 in the method 50.
[0117] The processing unit 602 is configured to perform one or more steps in the method 20 or sub-steps thereof (e.g., steps S22-S23), one or more steps in the method 30 (e.g., steps S31-S37, etc.), one or more steps in the method 40 (e.g., steps S401, S403-S410), one or more steps in the method 50 (e.g., steps S501, S503-S511), which will not be described in detail.
[0118] It should be understood that the wireless communication device 600 can be an entity device, a component (e.g., an integrated circuit, a chip, etc.) of an entity device, or a functional module in an entity device. The modules of the wireless communication device 600 can be implemented by software, hardware (e.g., an integrated circuit, an FPGA, etc.), or a combination of software and hardware. In one example, the wireless communication device 600 in the entity device can take the form as shown in FIG. 6.
[0119] It should be understood that the wireless communication device 600 can be an entity device, a component (e.g., an integrated circuit, a chip, etc.) of an entity device, or a functional module in an entity device. The modules of the wireless communication device 600 can be implemented by software, hardware (e.g., an integrated circuit, an FPGA, etc.), or a combination of software and hardware. In one example, the wireless communication device 600 in the entity device can take the form as shown in FIG. 6. Figure 6 Figure 7
[0120] Figure 7 A block diagram of an example wireless communication device 700 according to embodiments of the present disclosure is shown. The wireless communication device can be a physical device, a component of a physical device (e.g., an integrated circuit, a chip, etc.), and / or a functional module in a physical device. As shown, the wireless communication device 700 includes at least one processor 701 and a memory 702 coupled to the at least one processor 701. The memory 702 is used to store computer executable instructions that, when executed, cause the processor 701 to perform the methods in the above embodiments (e.g., any one or more steps of the aforementioned methods 20-50). Figure 7
[0121] Embodiments of the present disclosure do not make specific limitation on the specific deployment location of the memory 702, which can be integrated in the processor or independent of the processor.
[0122] The wireless communication device 700 can also include a communication component (not shown). The communication component is configured to communicate with other devices in a wireless manner. The communication component can be provided with multiple antennas, including a first antenna and a second antenna. In some examples, the communication component can also include a larger number of antennas. The communication component can access a network based on a wireless network of a communication standard, such as Wireless-Fidelity (WiFi), 3G, 4G or 5G, or a combination thereof.
[0123] It can be understood that the wireless communication device can also include other devices, such as an input device, a display device, an audio device, a battery, etc.
[0124] In addition, the above method can be implemented by a computer readable storage medium. The computer readable storage medium has computer readable program instructions for performing various embodiments of the present disclosure. The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium can be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (non-exhaustive list) of the computer readable storage medium include a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punched card or a concave and convex structure in a groove, and any suitable combination of the above.
[0125] Therefore, in another embodiment, this disclosure provides a computer-readable storage medium having computer-executable instructions stored thereon for performing the methods of various embodiments of this disclosure.
[0126] In one embodiment, this disclosure provides a computer program product including computer-executable instructions for implementing the methods in various embodiments of this disclosure.
[0127] Furthermore, although exemplary embodiments have been described herein, their scope includes any and all embodiments based on this disclosure that have equivalent steps, modifications, omissions, combinations (e.g., schemes involving overlapping embodiments), adaptations, or alterations. The steps in the claims are to be interpreted broadly based on the language used in the claims and are not limited to the examples described in this specification or during the implementation of this disclosure, which are to be interpreted as non-exclusive. Therefore, this specification and examples are intended to be considered illustrative only, and the true scope and spirit are indicated by the various claims in the claims and the full scope of their equivalents.
[0128] The above description is intended to be illustrative and not restrictive. For example, the above examples (or one or more thereof) can be used in combination with each other. Other embodiments can be used by those skilled in the art when reading the above description. Furthermore, in the above specific embodiments, various features may be grouped together to simplify this disclosure. Features disclosed that are not claimed in the claims are not essential to any claim. Rather, the subject matter of this disclosure may be less than all the features of a particular disclosed embodiment.
[0129] Therefore, the claims are incorporated herein by way of example or embodiment, wherein each claim is an independent, separate embodiment, and these embodiments are contemplated to be combined with each other in various combinations or arrangements. The scope of protection of this disclosure should be determined by reference to the appended claims and the full scope of their equivalents.
Claims
1. An antenna switching method, applied to a wireless communication device, the method comprising: Statistical data of data packets transmitted by the first antenna and the second antenna are obtained respectively, wherein the statistical data includes the total number of data packets transmitted by each antenna and the number of data packets successfully transmitted; Based on the statistical data, the expected allocation probability of one of the first antenna and the second antenna is obtained; as well as The antenna for transmitting the next data packet is determined based on the expected allocation probability.
2. The antenna switching method according to claim 1, wherein, The expected allocation probability of one of the first antenna and the second antenna is obtained based on the statistical data, including: In response to the total number of data packets transmitted by both the first antenna and the second antenna exceeding a first threshold, the expected allocation probability is obtained based on the first statistical data of the first antenna and the second statistical data of the second antenna.
3. The antenna switching method according to claim 2, wherein, Obtaining the expected allocation probability based on the first statistical data of the first antenna and the second statistical data of the second antenna includes, Obtain the current allocation probabilities of the first antenna and the second antenna; The adjustment step size of the current allocation probability is obtained based on the success rate difference between the first success rate of the first antenna and the second success rate of the second antenna; as well as The expected allocation probability is obtained based on the current allocation probability and the adjustment step size.
4. The antenna switching method according to claim 3, wherein, Obtaining the expected allocation probability based on the current allocation probability and the adjustment step size includes... In response to the expected allocation probability exceeding the value 1, the expected allocation probability is updated to the value 1; or In response to the expected allocation probability being lower than the value 0, the expected allocation probability is updated to the value 0.
5. The antenna switching method according to claim 2, wherein, The expected allocation probability of one of the first antenna and the second antenna is obtained based on the statistical data, including: When the total number of data packets transmitted by only one of the first antenna and the second antenna exceeds a third threshold and the current allocation probability of only one of the first antenna and the second antenna exceeds a fourth threshold, the expected allocation rate is obtained based on the success rate of only one of the first antenna and the second antenna.
6. The antenna switching method according to claim 5, wherein, Obtaining the desired allocation rate based on the success rate of only one of the first antenna and the second antenna includes, In response to a decrease in the success rate of either the first antenna or the second antenna exceeding a preset range, the current allocation probability of either the first antenna or the second antenna is reduced.
7. The antenna switching method according to claim 6, wherein, The success rate of only one of the first antenna and the second antenna decreasing beyond a preset range includes the following: the success rate of only one of the first antenna and the second antenna is lower than the maximum historical success rate of only one of the first antenna and the second antenna by more than the preset range.
8. The antenna switching method according to claim 7, wherein, Reducing the current allocation probability of only one of the first antenna and the second antenna includes, The reduction step size of the current allocation probability is obtained based on the difference between the maximum historical success rate of only one of the first antenna and the second antenna and the success rate of only one of the first antenna and the second antenna.
9. The antenna switching method according to claim 8, wherein, Obtaining the desired allocation rate based on the success rate of only one of the first antenna and the second antenna includes, In response to the difference between the current allocation probability and the reduction step size exceeding the value 1, the expected allocation probability is determined to be the value 1; or In response to the difference between the current allocation probability and the reduction step size being less than 0, the expected allocation probability is determined to be 0.
10. The antenna switching method according to claim 5, wherein, Obtaining the desired allocation rate based on the success rate of only one of the first antenna and the second antenna includes, In response to the fact that the success rate of only one of the first antenna and the second antenna has not decreased beyond a preset range, the current assigned probability of only one of the first antenna and the second antenna is maintained.
11. The antenna switching method according to claim 10, wherein, It also includes updating the historical success rate to the success rate of only one of the first antenna and the second antenna in response to the fact that the success rate of only one of the first antenna and the second antenna is greater than the historical maximum success rate of only one of the first antenna and the second antenna.
12. The antenna switching method according to claim 1, wherein, The antenna for transmitting the next data packet is determined based on the expected allocation probability, including: The desired allocation probability is quantized using a first-order noise shaping quantizer to obtain a control signal sequence, wherein each value in the control signal sequence represents the antenna control signal for transmitting each data packet.
13. A wireless communication device, wherein, include: At least one processor; as well as A memory for storing computer-executable instructions that, when executed, cause the at least one processor to perform the antenna switching method according to any one of claims 1 to 12.
14. A computer-readable storage medium, wherein, The computer-readable storage medium has computer-executable instructions stored thereon for performing the antenna switching method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Communication device, and communication method
CN103563426A
System and method for vehicle-to-everything (V2X) communication
CN112534740A
Antenna selection method and device
CN113169774A
Antenna switching method and terminal equipment
CN120474646A
System and method for vehicle-to-everything (V2X) communication
US20200037128A1