Antenna switching method and related device
By detecting radio frequency path abnormalities and performing corresponding antenna switching strategies, the uplink data instability problem caused by relying solely on RSRP in the prior art is solved, and more reliable antenna switching and resource utilization are achieved.
Patent Information
- Application Number
- PCT/CN2024/142054
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-03
- Filing Date
- 2024-12-25
- Publication Date
- 2025-07-10
AI Technical Summary
The existing antenna switching scheme only relies on the reference signal reception power (RSRP) and fails to fully consider other factors, resulting in unstable uplink data transmission.
By detecting whether the radio frequency path is abnormal, and prohibiting switching to the corresponding antenna when it is abnormal, or allowing switching to the normal radio frequency path when the frequency band is switched, the abnormal situation is recorded using the counter to ensure the normal transmission of uplink data.
It improves the accuracy of antenna switching and the stability of uplink data, avoids the waste of abnormal RF paths, and makes full use of normal resources.
Smart Images

Figure CN2024142054_10072025_PF_FP_ABST
Abstract
Description
Antenna switching method and related equipment
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on January 3, 2024, with application number 202410016416.6 and application name “A method for switching antennas and related equipment”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of terminal technology, and in particular to an antenna switching method and related equipment. Background Art
[0003] In current antenna switching schemes, a terminal generally determines the transmitting antenna based on the reference signal receiving power (RSRP) received by each antenna. When the RSRP of another antenna exceeds the RSRP of the current transmitting antenna by a certain threshold and lasts for a certain period of time, it triggers switching from the current transmitting antenna to the other antenna.
[0004] However, this antenna switching solution does not consider other factors that may affect antenna transmission except RSRP, and it is difficult to ensure normal transmission of uplink data. Summary of the Invention
[0005] The embodiments of the present application provide an antenna switching method and related equipment, which help to ensure the normal transmission of uplink data.
[0006] In a first aspect, the present application provides an antenna switching method, applied to an electronic device, comprising:
[0007] The electronic device detects whether a first radio frequency path currently used for sending uplink data is abnormal when operating in a first frequency band, the first radio frequency path currently operating in the first frequency band;
[0008] When the first radio frequency path is detected as abnormal when operating in the first frequency band, performing the following first operation:
[0009] When antenna switching is performed on the first frequency band, switching to the antenna corresponding to the first RF path is prohibited; or, when the current operating frequency band of the electronic device is switched from the first frequency band to the second frequency band, when antenna switching is performed on the second frequency band, switching to the antenna corresponding to the first RF path is allowed, and the second frequency band is different from the first frequency band.
[0010] Through the above method, the electronic device considers whether the RF path corresponding to the antenna is abnormal as a factor in the antenna switching judgment logic. If the first RF path is detected as abnormal when operating in the first frequency band, on the one hand, when the electronic device performs antenna switching in the first frequency band, switching to the antenna corresponding to the first RF path is prohibited. This avoids the use of the abnormal RF path to send uplink data, helping to ensure normal uplink data transmission. On the other hand, when the electronic device performs antenna switching in a second frequency band different from the first frequency band, switching to the antenna corresponding to the first RF path is allowed. This avoids wasting possible normal RF paths and helps to fully utilize normal RF path resources.
[0011] With reference to the first aspect, in a possible implementation, after performing the first operation, the method further includes:
[0012] Perform the following second operation: when the first condition is met, when antenna switching is performed on the first frequency band, allow switching to the antenna corresponding to the first radio frequency path.
[0013] Through the above implementation, the first condition can be understood as a condition under which an abnormal first RF path (i.e., a first RF path operating in the first frequency band) may return to normal. When the first condition is met, the first RF path operating in the first frequency band may return to normal, thereby canceling the prohibition on switching the antenna corresponding to the first RF path when performing antenna switching in the first frequency band. Subsequently, when performing antenna switching in the first frequency band, switching to the antenna corresponding to the first RF path is allowed. That is, the electronic device can reuse the first RF path to send uplink data when operating in the first frequency band.
[0014] In combination with the first aspect, in a possible implementation, the first condition includes: the current operating frequency band of the electronic device is switched from the first frequency band to the second frequency band and then switched back to the first frequency band, or the electronic device is restarted.
[0015] Through the above implementation method, when the current operating frequency band of the electronic device is switched from the first frequency band to the second frequency band and then switched back to the first frequency band, or the electronic device is restarted, the first radio frequency path operating in the first frequency band may have returned to normal, thereby canceling the prohibition of switching the antenna corresponding to the first radio frequency path when performing antenna switching on the first frequency band, that is, allowing switching to the antenna corresponding to the first radio frequency path, so that the electronic device can reuse the first radio frequency path to send uplink data when operating in the first frequency band.
[0016] With reference to the first aspect, in a possible implementation, the second operation further includes: if the first condition is met, re-detecting whether the first radio frequency path is abnormal when operating in the first frequency band;
[0017] If the first radio frequency path is still detected as abnormal when operating in the first frequency band, record the abnormality once, and return to perform the first operation and the second operation;
[0018] When the number of abnormal records reaches a preset number, it is prohibited to use the antenna corresponding to the first radio frequency path when the current working frequency band is the first frequency band.
[0019] Through the above implementation, when the first RF path is likely to return to normal operation when operating in the first frequency band (for example, after the electronic device undergoes frequency band switching or restart), it is possible to re-detect whether the first RF path is abnormal when operating in the first frequency band. If the first RF path continues to be abnormal when operating in the first frequency band, the subsequent electronic device is prohibited from using the first RF path to send uplink data when operating in the first frequency band. If the first RF path returns to normal operation when operating in the first frequency band, the subsequent electronic device can continue to use the first RF path to send uplink data when operating in the first frequency band. In this way, the abnormal recovery of the first RF path when operating in the first frequency band can be detected in a timely manner so that corresponding abnormality processing can be performed.
[0020] In combination with the first aspect, in a possible implementation, the method further includes: starting a counter;
[0021] If the first radio frequency path is still detected as abnormal when operating in the first frequency band, an abnormality record is performed, including:
[0022] If the first radio frequency path is still detected as abnormal when operating in the first frequency band, the count of the counter is increased by one, and the count of the counter is used to determine the number of abnormal records when the first radio frequency path operates in the first frequency band.
[0023] Through the above implementation method, a counter is used to record the number of times the first radio frequency path is detected as abnormal when operating in the first frequency band. The count of the counter is used to determine the number of abnormal records when the first radio frequency path operates in the first frequency band. In this way, the number of abnormal records when the first radio frequency path operates in the first frequency band can be obtained simply and quickly.
[0024] In conjunction with the first aspect, in a possible implementation, the method further includes:
[0025] If the first radio frequency path is detected to be normal when operating in the first frequency band, the count of the counter is cleared.
[0026] Through the above implementation, if the first RF path returns to normal when operating in the first frequency band, the count of the counter is reset to zero, so that subsequent electronic devices can continue to use the first RF path to send uplink data when operating in the first frequency band.
[0027] With reference to the first aspect, in one possible implementation, the electronic device detects whether a first radio frequency path currently used for sending uplink data operates abnormally in a first frequency band, including:
[0028] Obtaining N first parameter values within a preset time window when the first radio frequency path operates in a first frequency band, the first parameter value being used to indicate whether a first indicator of the first radio frequency path is abnormal, where N is an integer greater than or equal to 2;
[0029] When the N first parameter values meet a second condition, the first radio frequency path is detected as abnormal when operating in the first frequency band.
[0030] Through the above implementation method, the electronic device can obtain multiple first parameter values within a preset time window when the first RF path operates in the first frequency band. The first parameter value can indicate whether the first indicator of the first RF path is abnormal. The state of the first indicator can reflect the state of the first RF path, so that the first parameter value can be used to determine whether the first RF path is abnormal, and then determine whether the first RF path is abnormal when operating in the first frequency band based on the multiple first parameter values within the preset time window, which can improve the accuracy of abnormality detection.
[0031] With reference to the first aspect, in a possible implementation, the N first parameter values satisfying the second condition include: among the N first parameter values, M first parameter values indicating that the first indicator of the first radio frequency path is abnormal;
[0032] Wherein, M is a positive integer less than or equal to N; M is greater than or equal to a first number, or the ratio of M to N is greater than or equal to a first ratio.
[0033] Through the above implementation method, the electronic device can determine the number M of abnormal parameter values among N first parameter values. When M is greater than or equal to the first number, or the ratio of M to N is greater than or equal to the first ratio, it can be considered that the first indicator is continuously abnormal. This can be used as a condition for determining that the first RF path is abnormal, which can improve the accuracy of abnormality detection.
[0034] With reference to the first aspect, in a possible implementation, the N first parameter values satisfying the second condition include: among the N first parameter values, K consecutive first parameter values indicating that the first indicator of the first radio frequency path is abnormal;
[0035] Here, K is a positive integer less than or equal to N; K is greater than or equal to a second number, or the ratio of K to N is greater than or equal to a second ratio.
[0036] Through the above implementation method, the electronic device can determine the consecutive number K of abnormal parameter values among N first parameter values. When K is greater than or equal to the second number, or the ratio of K to N is greater than or equal to the second ratio, it can be considered that the first indicator is continuously abnormal. This can be used as a condition for determining that the first RF path is abnormal, which can improve the accuracy of abnormality detection.
[0037] With reference to the first aspect, in one possible implementation, the first indicator includes transmit power, the first parameter value represents a magnitude relationship between a power difference and a first preset value, and the power difference is a difference between an actual transmit power and an expected transmit power of the first radio frequency path;
[0038] When the power difference is greater than the first preset value, the first parameter value indicates that the transmit power of the first radio frequency path is abnormal;
[0039] When the power difference is less than or equal to the first preset value, the first parameter value indicates that the transmit power of the first radio frequency path is normal.
[0040] Through the above implementation, the electronic device can determine whether the transmit power of the first RF path is abnormal based on the difference between the actual transmit power and the expected transmit power of the first RF path and the first preset value, thereby determining whether the first RF path is abnormal. In this way, using transmit power as an indicator to determine whether the first RF path is abnormal can more accurately reflect whether the first RF path is abnormal.
[0041] With reference to the first aspect, in a possible implementation, the first indicator includes an uplink bit error rate, and the first parameter value represents a magnitude relationship between the uplink bit error rate of the first radio frequency path and a second preset value;
[0042] When the uplink bit error rate is greater than the second preset value, the first parameter value indicates that the uplink bit error rate of the first radio frequency path is abnormal;
[0043] When the uplink bit error rate is less than or equal to the second preset value, the first parameter value indicates that the uplink bit error rate of the first radio frequency path is normal.
[0044] Through the above implementation, the electronic device can determine whether the uplink bit error rate of the first RF path is abnormal based on the relationship between the uplink bit error rate of the first RF path and the second preset value, and thus determine whether the first RF path is abnormal. In this way, using the uplink bit error rate as an indicator to determine whether the first RF path is abnormal can more accurately reflect whether the first RF path is abnormal.
[0045] In a second aspect, the present application provides an electronic device comprising one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer programs (also referred to as codes, or instructions). When the one or more processors execute the computer program, the electronic device executes the method described in the above-mentioned first aspect and any possible implementation method of the first aspect.
[0046] In the third aspect, the present application provides a chip system, which is applied to an electronic device. The chip system includes one or more processors, and the one or more processors are used to call computer instructions to enable the electronic device to execute the method described in the above first aspect and any possible implementation method of the first aspect.
[0047] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program (also referred to as code, or instructions). When the computer program runs on an electronic device, the electronic device executes the method described in the above-mentioned first aspect and any possible implementation method of the first aspect.
[0048] In a fifth aspect, the present application provides a computer program product, which includes a computer program (also referred to as code, or instructions). When the computer program runs on an electronic device, the electronic device executes the method described in the first aspect and any possible implementation of the first aspect.
[0049] It is understandable that the electronic device provided in the second aspect, the chip system provided in the third aspect, the computer storage medium provided in the fourth aspect, and the computer program product provided in the fifth aspect are all used to perform the methods provided in this application. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] FIG1 is a schematic flow chart of an antenna switching method provided in an embodiment of the present application;
[0051] FIG2 is a schematic flow chart of another antenna switching method provided in an embodiment of the present application;
[0052] FIG3 is a schematic flow chart of another antenna switching method provided in an embodiment of the present application;
[0053] FIG4 is a schematic flow chart of another antenna switching method provided in an embodiment of the present application;
[0054] FIG5 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0055] FIG6 is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0056] FIG7 is a schematic diagram of the software structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.
[0058] In this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0059] The terms "first," "second," and the like in this application are used to distinguish between different objects, rather than to describe a specific order, and "first," "second," and the like do not necessarily define differences. In addition, the terms "comprise," "include," and "have," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to the process, method, product, or device.
[0060] The “embodiment” mentioned in this application means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It can be understood explicitly and implicitly by those skilled in the art that in the various embodiments of the present application, unless otherwise specified and there is a logical conflict, the terms and / or descriptions between the various embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form a new embodiment according to their inherent logical relationship.
[0061] It should be understood that in this application, "at least one" means one or more, and "more than one" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0062] In this application, the term “when” may be interpreted to mean “if” or “after” or “in response to determining that” or “in response to detecting that”. Similarly, the phrases “upon determining that” or “if (stated condition or event) is detected” may be interpreted to mean “if it is determined that” or “in response to determining that” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”.
[0063] As described in the background technology section, current antenna switching solutions do not consider factors other than RSRP that may affect antenna transmission, making it difficult to ensure normal uplink data transmission. In view of this, embodiments of the present application provide an antenna switching method and related devices to help ensure normal uplink data transmission.
[0064] The following is an introduction to the antenna switching method provided in the embodiment of the present application.
[0065] Please refer to Figure 1, which is a flow chart of an antenna switching method provided in an embodiment of the present application. The antenna switching method is applied to an electronic device, as shown in Figure 1, and may include but is not limited to the following steps S101 to S102.
[0066] S101: An electronic device detects whether a first radio frequency path currently used for sending uplink data operates abnormally in a first frequency band, where the first radio frequency path currently operates in the first frequency band.
[0067] The first frequency band can be understood as the current operating frequency band of the electronic device. The first RF path can be understood as the current uplink data transmission path of the electronic device, that is, the RF path currently used to transmit uplink data (or uplink signals). In other words, the electronic device currently transmits uplink data via the first RF path operating in the first frequency band, and the uplink data reaches the antenna end via the first RF path.
[0068] The state of the first radio frequency path may include normal and abnormal. The electronic device can detect the first radio frequency path to determine whether the first radio frequency path is in a normal state or an abnormal state when operating in the first frequency band, that is, to detect whether the first radio frequency path is abnormal when operating in the first frequency band.
[0069] Optionally, the electronic device may detect the first radio frequency path periodically or aperiodically. For example, the electronic device may detect the first radio frequency path once every certain time interval (e.g., t1). The value of t1 may be set based on actual conditions or needs, and is not limited in this embodiment of the present application.
[0070] In some possible embodiments, detecting whether the first radio frequency path is abnormal when operating in the first frequency band may specifically include obtaining N first parameter values within a preset time window when the first radio frequency path is operating in the first frequency band, the first parameter values being used to indicate whether a first indicator of the first radio frequency path is abnormal, where N is an integer greater than or equal to 2. When the N first parameter values satisfy a second condition, the first radio frequency path is detected as abnormal when operating in the first frequency band.
[0071] Among them, the preset time window refers to a sliding window with a fixed time range (or fixed duration, denoted as t2). The value of t2 can be set according to actual conditions or needs, and the embodiment of the present application does not limit this.
[0072] The first indicator is an indicator that can be used to reflect whether the first radio frequency path is abnormal. The status of the first indicator can be normal or abnormal. The abnormality of the first indicator can be considered to be caused by the abnormality of the first radio frequency path. Therefore, the status of the first radio frequency path can be determined based on the status of the first indicator.
[0073] The first parameter value refers to the state value of the first indicator, which is used to indicate whether the first indicator is in a normal state or an abnormal state, that is, whether the first indicator is abnormal. Specifically, different first parameter values can indicate different states of the first indicator. For example, when the first parameter value is C1, it indicates that the first indicator is normal, and when the first parameter value is C2, it indicates that the first indicator is abnormal.
[0074] The first parameter value can also be understood as the result obtained by detecting whether the first indicator of the first radio frequency path is abnormal. Each first parameter value corresponds to one detection result. In one possible implementation, the electronic device can directly obtain the first parameter value from modem information. In another possible implementation, the electronic device can detect whether the first indicator of the first radio frequency path is abnormal in real time to obtain the first parameter value.
[0075] Taking into account the possibility of false detection in a single detection result, the embodiment of the present application determines whether the first RF path is abnormal based on multiple (recorded as N) detection results, that is, N first parameter values within a preset time window. This helps to reduce the probability of false detection and improve the accuracy of abnormality detection. The second condition can be understood as the condition that the N first parameter values must meet to represent the abnormality of the first RF path. When the N first parameter values meet the second condition, that is, the N first parameter values represent the abnormality of the first RF path, it can be determined that the first RF path is abnormal when operating in the first frequency band.
[0076] Optionally, when the N first parameter values do not satisfy the second condition, that is, the N first parameter values cannot indicate that the first radio frequency path is abnormal, it can be determined that the first radio frequency path operates normally in the first frequency band.
[0077] Through the above embodiment, the electronic device can obtain multiple first parameter values within a preset time window when the first RF path operates in the first frequency band. The first parameter value can indicate whether the first indicator of the first RF path is abnormal. The state of the first indicator can reflect the state of the first RF path, so that the first parameter value can be used to determine whether the first RF path is abnormal. Further, based on the multiple first parameter values within the preset time window, it can be determined whether the first RF path is abnormal when operating in the first frequency band, which can improve the accuracy of abnormality detection.
[0078] In some possible embodiments, the N first parameter values satisfy the second condition, which may specifically include: among the N first parameter values, M first parameter values indicate that the first indicator of the first radio frequency path is abnormal.
[0079] Wherein, M is a positive integer less than or equal to N. Among the N first parameter values, there may be a first parameter value indicating that the first indicator is abnormal (for simplicity of description, denoted as an abnormal parameter value), and there may also be a first parameter value indicating that the first indicator is normal (for simplicity of description, denoted as a normal parameter value). When there are M abnormal parameter values among the N first parameter values, it can be determined that the N first parameter values meet the second condition, that is, the N first parameter values indicate that the first RF path is abnormal, and thus it can be determined that the first RF path is abnormal when operating in the first frequency band.
[0080] In one possible implementation, M is greater than or equal to a first number. The first number can be understood as the minimum number of abnormal parameter values required for the N first parameter values to indicate an abnormality in the first radio frequency path. When the number of abnormal parameter values in the N first parameter values (i.e., M) is greater than or equal to the first number, the first indicator can be considered to be continuously abnormal, thereby determining that the first radio frequency path is abnormal when operating in the first frequency band.
[0081] In another possible implementation, the ratio of M to N is greater than or equal to a first ratio. The first ratio can be understood as the minimum ratio of the number of abnormal parameter values required for the N first parameter values to characterize an abnormality in the first radio frequency path to N. When the ratio of the number of abnormal parameter values (i.e., M) among the N first parameter values to N is greater than or equal to the first ratio, the first indicator can be considered to be continuously abnormal, thereby determining that the first radio frequency path is abnormal when operating in the first frequency band.
[0082] It should be understood that the above-mentioned first quantity and first ratio can be set according to actual conditions or needs, and the embodiments of the present application do not limit this.
[0083] Through the above embodiment, the electronic device can determine the number M of abnormal parameter values among N first parameter values. When M is greater than or equal to the first number, or the ratio of M to N is greater than or equal to the first ratio, it can be considered that the first indicator is continuously abnormal. This can be used as a condition for determining that the first RF path is abnormal, which can improve the accuracy of abnormality detection.
[0084] In some other possible embodiments, the N first parameter values satisfying the second condition may specifically include: among the N first parameter values, there are K consecutive first parameter values indicating that the first indicator of the first radio frequency path is abnormal.
[0085] Wherein, K is a positive integer less than or equal to N. Among the N first parameter values, there may be abnormal parameter values and normal parameter values. The N first parameter values are arranged in chronological order. When there are K consecutive abnormal parameter values among the N first parameter values, it can be determined that the N first parameter values meet the second condition, that is, the N first parameter values indicate that the first RF path is abnormal, and thus it can be determined that the first RF path is abnormal when operating in the first frequency band.
[0086] In one possible implementation, K is greater than or equal to a second number. The second number can be understood as the minimum number of consecutive abnormal parameter values required for the N first parameter values to indicate an abnormality in the first radio frequency path. When the number of consecutive abnormal parameter values in the N first parameter values (i.e., K) is greater than or equal to the second number, the first indicator can be considered to be continuously abnormal, thereby determining that the first radio frequency path is abnormal when operating in the first frequency band.
[0087] In another possible implementation, the ratio of K to N is greater than or equal to a second ratio. The second ratio can be understood as the minimum ratio of the consecutive number of abnormal parameter values required for the N first parameter values to indicate an abnormality in the first radio frequency path to N. When the ratio of the consecutive number of abnormal parameter values (i.e., K) among the N first parameter values to N is greater than or equal to the second ratio, the first indicator can be considered to be continuously abnormal, thereby determining that the first radio frequency path is abnormal when operating in the first frequency band.
[0088] It should be understood that the above-mentioned second quantity and second ratio can be set according to actual conditions or needs, and the embodiments of the present application do not limit this.
[0089] Through the above embodiment, the electronic device can determine the consecutive number K of abnormal parameter values among N first parameter values. When K is greater than or equal to the second number, or the ratio of K to N is greater than or equal to the second ratio, it can be considered that the first indicator is continuously abnormal. This can be used as a condition for determining that the first RF path is abnormal, which can improve the accuracy of abnormality detection.
[0090] In some possible embodiments, the first indicator includes transmit power, and the first parameter value represents a magnitude relationship between a power difference and a first preset value, where the power difference is the difference between the actual transmit power and the expected transmit power of the first radio frequency path. When the power difference is greater than the first preset value, the first parameter value indicates that the transmit power of the first radio frequency path is abnormal. When the power difference is less than or equal to the first preset value, the first parameter value indicates that the transmit power of the first radio frequency path is normal.
[0091] The first preset value can be understood as the maximum power difference of the first RF path under normal conditions. When the first parameter value indicates that the power difference is greater than the first preset value, it can be considered that the power difference is outside the normal range, and thus the transmit power of the first RF path can be determined to be abnormal. In other words, the first parameter value indicates that the transmit power of the first RF path is abnormal. When the first parameter value indicates that the power difference is less than or equal to the first preset value, it can be considered that the power difference is within the normal range, and thus the transmit power of the first RF path can be determined to be normal. In other words, the first parameter value indicates that the transmit power of the first RF path is normal.
[0092] Through the above embodiment, the electronic device can determine whether the transmit power of the first RF path is abnormal based on the difference between the actual transmit power and the expected transmit power of the first RF path and the first preset value, thereby determining whether the first RF path is abnormal. In this way, using transmit power as an indicator to determine whether the first RF path is abnormal can more accurately reflect whether the first RF path is abnormal.
[0093] In some other possible embodiments, the first indicator includes an uplink bit error rate, and the first parameter value indicates a relationship between the uplink bit error rate of the first radio frequency path and a second preset value. When the uplink bit error rate is greater than the second preset value, the first parameter value indicates that the uplink bit error rate of the first radio frequency path is abnormal. When the uplink bit error rate is less than or equal to the second preset value, the first parameter value indicates that the uplink bit error rate of the first radio frequency path is normal.
[0094] The second preset value can be understood as the maximum uplink bit error rate of the first RF path under normal conditions. When the first parameter value indicates that the uplink bit error rate is greater than the second preset value, the uplink bit error rate can be considered to be outside the normal range, and thus the uplink bit error rate of the first RF path can be determined to be abnormal, that is, the first parameter value indicates that the uplink bit error rate of the first RF path is abnormal. When the first parameter value indicates that the uplink bit error rate is less than or equal to the second preset value, the uplink bit error rate can be considered to be within the normal range, and thus the uplink bit error rate of the first RF path can be determined to be normal, that is, the first parameter value indicates that the uplink bit error rate of the first RF path is normal.
[0095] Through the above embodiment, the electronic device can determine whether the uplink bit error rate of the first RF path is abnormal based on the relationship between the uplink bit error rate of the first RF path and the second preset value, and further determine whether the first RF path is abnormal. In this way, using the uplink bit error rate as an indicator to determine whether the first RF path is abnormal can more accurately reflect whether the first RF path is abnormal.
[0096] It should be understood that in other possible embodiments, the first indicator may also include both transmit power and uplink bit error rate. The abnormality of the first indicator may refer to an abnormality in at least one of the transmit power and the uplink bit error rate. Accordingly, the first parameter value is used to indicate whether at least one of the transmit power and the uplink bit error rate of the first radio frequency path is abnormal. In this way, using both transmit power and uplink bit error rate as indicators for determining whether the first radio frequency path is abnormal can further improve the accuracy of anomaly detection.
[0097] S102, when the first RF path is detected as abnormal when operating in the first frequency band, perform the following first operation: when antenna switching is performed in the first frequency band, switching to the antenna corresponding to the first RF path is prohibited; or, when the current operating frequency band of the electronic device is switched from the first frequency band to the second frequency band, when antenna switching is performed in the second frequency band, switching to the antenna corresponding to the first RF path is allowed, and the second frequency band is different from the first frequency band.
[0098] When a first radio frequency path is detected as abnormal while operating in a first frequency band, to ensure normal transmission of uplink data, the electronic device may perform antenna switching to switch the current transmitting antenna (i.e., the antenna corresponding to the abnormal first radio frequency path) to an antenna corresponding to a normal radio frequency path. For example, the electronic device may select an antenna that meets the switching conditions from antennas corresponding to other normal radio frequency paths as the transmitting antenna after switching. The switching conditions may be preconfigured or predefined, and are not limited in this embodiment of the present application.
[0099] The first RF path being detected as abnormal when operating in the first frequency band means that the first RF path is abnormal when the electronic device is operating in the first frequency band. The abnormal first RF path can be considered bound to the first frequency band, meaning that the electronic device cannot normally send uplink data through the first RF path when operating in the first frequency band. Therefore, when antenna switching is performed in the first frequency band, switching to all antennas corresponding to the first RF path is prohibited to prevent continued use of the abnormal first RF path to send uplink data.
[0100] Optionally, the first radio frequency path may correspond to one or more antennas. The antennas corresponding to the first radio frequency path may be preconfigured or predefined, which is not limited in this embodiment of the present application.
[0101] In one possible scenario, after the electronic device's current operating frequency band switches from a first frequency band to a second frequency band, the first RF path operates normally in the second frequency band. That is, the electronic device can normally transmit uplink data through the first RF path when operating in the second frequency band. Therefore, when antenna switching is performed in the second frequency band, switching to the antenna corresponding to the first RF path is permitted to fully utilize normal RF path resources. The second frequency band may be different from the first frequency band, and the second frequency band may be of a different standard than the first frequency band, or the second frequency band may be of the same standard as the first frequency band but in a different frequency band.
[0102] Through the embodiments of the present application, the electronic device considers whether the RF path corresponding to the antenna is abnormal as a factor and adds it to the judgment logic of antenna switching. When the first RF path is detected as abnormal when operating in the first frequency band, on the one hand, when the electronic device performs antenna switching on the first frequency band, it is prohibited to switch to the antenna corresponding to the first RF path. This can avoid using the abnormal RF path to send uplink data, which helps to ensure the normal transmission of uplink data. On the other hand, when the electronic device performs antenna switching on a second frequency band different from the first frequency band, it is allowed to switch to the antenna corresponding to the first RF path. This can avoid wasting possible normal RF paths and help to make full use of normal RF path resources.
[0103] Please refer to Figure 2, which is a flow chart of another antenna switching method provided in an embodiment of the present application. The antenna switching method is applied to an electronic device, as shown in Figure 2, and may include but is not limited to the following steps S201 to S205.
[0104] S201: An electronic device detects whether a first radio frequency path currently used for sending uplink data operates abnormally in a first frequency band, where the first radio frequency path currently operates in the first frequency band.
[0105] S202, when the first RF path is detected as abnormal when operating in the first frequency band, perform the following first operation: when antenna switching is performed in the first frequency band, switching to the antenna corresponding to the first RF path is prohibited; or, when the current operating frequency band of the electronic device is switched from the first frequency band to the second frequency band, when antenna switching is performed in the second frequency band, switching to the antenna corresponding to the first RF path is allowed, and the second frequency band is different from the first frequency band.
[0106] For the specific description of the above-mentioned step S201 and step S202, reference may be made to the corresponding description of step S101 and step S102 in the previous embodiment, which will not be repeated here.
[0107] S203, performing the following second operation: when the first condition is met, when antenna switching is performed in the first frequency band, allowing switching to the antenna corresponding to the first radio frequency path, and re-detecting whether the first radio frequency path is abnormal when operating in the first frequency band.
[0108] Among them, the first condition can be understood as a condition under which an abnormal first RF path (i.e., a first RF path operating in the first frequency band) may return to normal. When the first condition is met, the first RF path operating in the first frequency band may return to normal, thereby canceling the prohibition on switching the antenna corresponding to the first RF path when performing antenna switching in the first frequency band. Subsequently, when performing antenna switching in the first frequency band, switching to the antenna corresponding to the first RF path is allowed, that is, the electronic device can reuse the first RF path to send uplink data when operating in the first frequency band. When the uplink data transmission path of the electronic device is changed back to the first RF path operating in the first frequency band, it is re-detected whether the first RF path is abnormal when operating in the first frequency band.
[0109] In some possible embodiments, the first condition includes: the current operating frequency band of the electronic device is switched from the first frequency band to the second frequency band and then switched back to the first frequency band.
[0110] During uplink transmission, electronic devices may experience frequency band switching (for example, switching between different standards, or switching between different frequency bands within the same standard), causing the operating frequency band to switch from the current first frequency band to another frequency band (for example, the second frequency band). Subsequently, the operating frequency band may also switch from the second frequency band to the first frequency band, i.e., return to the first frequency band. Frequency band switching helps restore the abnormal first RF path. After the frequency band switching, the abnormal first RF path may return to normal.
[0111] Through the above embodiment, when the current operating frequency band of the electronic device is switched from the first frequency band to the second frequency band and then switched back to the first frequency band, the first radio frequency path operating in the first frequency band may have returned to normal, thereby canceling the prohibition of switching the antenna corresponding to the first radio frequency path when performing antenna switching on the first frequency band, that is, allowing switching to the antenna corresponding to the first radio frequency path. In this way, the electronic device can reuse the first radio frequency path to send uplink data when operating in the first frequency band.
[0112] In some other possible embodiments, the first condition includes: the electronic device is restarted.
[0113] Restarting the electronic device helps to restore the abnormal first radio frequency path. After the electronic device is restarted, the abnormal first radio frequency path may return to normal.
[0114] Through the above embodiment, when the electronic device is restarted, the first radio frequency path operating in the first frequency band may have returned to normal, thereby canceling the prohibition of switching the antenna corresponding to the first radio frequency path when performing antenna switching on the first frequency band, that is, allowing switching to the antenna corresponding to the first radio frequency path. In this way, the electronic device can reuse the first radio frequency path to send uplink data when operating in the first frequency band.
[0115] S204: If the first radio frequency path is still detected as abnormal when operating in the first frequency band, an abnormality record is made, and the process returns to executing the first and second operations.
[0116] For example, if the first RF path is detected as abnormal when operating in the first frequency band, after performing the second operation for the first time, if the first RF path is still detected as abnormal when operating in the first frequency band, an abnormality record is performed, and the number of abnormality records may be 1. If the first RF path is detected as normal when operating in the first frequency band, it can be determined that the first RF path has returned to normal operation in the first frequency band, and thus no abnormality record is required, and the number of abnormality records may be 0.
[0117] If the first RF path is still detected as abnormal when operating in the first frequency band, the antenna can be switched according to the first operation, and then the second operation can be performed. The number of abnormality records can be updated each time the second operation is performed. For example, if the first RF path is still detected as abnormal when operating in the first frequency band after the second operation is performed for the first time, the number of abnormality records is 1. If the first RF path is still detected as abnormal when operating in the first frequency band after the second operation is performed for the second time, the number of abnormality records is increased by one, and the number of abnormality records is updated to 2. If the first RF path is detected as normal when operating in the first frequency band, the number of abnormality records is cleared, and the number of abnormality records is updated to 0.
[0118] In one possible implementation, the electronic device may further start a counter. The counter is used to record the number of times the first radio frequency path is detected as abnormal when operating in the first frequency band. The count of the counter is used to determine the number of abnormality records when the first radio frequency path operates in the first frequency band. In this way, the number of abnormality records when the first radio frequency path operates in the first frequency band can be simply and quickly obtained.
[0119] Exemplarily, when the first condition is met, a counter is started. The initial count of the counter may be 0 or another value. If the first radio frequency path is still detected as abnormal when operating in the first frequency band, the count of the counter is incremented by one. If the first radio frequency path is detected as normal when operating in the first frequency band, the count of the counter is reset to zero.
[0120] It should be understood that the timing for starting the counter is not limited to the above example. In other examples, the timer can be started at other times. For example, the timer can be started when the electronic device is turned on, when the operating frequency band of the electronic device is the first frequency band, when the electronic device uses the first radio frequency path operating in the first frequency band to send uplink data, or when the first radio frequency path is detected as abnormal for the first time when operating in the first frequency band. The embodiments of the present application are not limited to this.
[0121] S205: When the number of abnormal records reaches a preset number, prohibiting the use of the antenna corresponding to the first radio frequency path when the current working frequency band is the first frequency band.
[0122] The preset number of times can be understood as the minimum number of abnormality records required to determine that the first radio frequency path is continuously abnormal (or unable to recover on its own) when operating in the first frequency band. When the number of abnormality records of the first radio frequency path when operating in the first frequency band reaches the preset number, it can be determined that the first radio frequency path is continuously abnormal or unable to recover on its own when operating in the first frequency band. Therefore, the electronic device can prohibit the use of the antenna corresponding to the first radio frequency path when operating in the first frequency band, thereby prohibiting the use of the first radio frequency path to send uplink data.
[0123] Optionally, the prohibition may be permanent, i.e., the electronic device will no longer use the first radio frequency path to send uplink data when subsequently operating in the first frequency band. Optionally, the prohibition may be temporary, i.e., the electronic device is prohibited from using the first radio frequency path to send uplink data when operating in the first frequency band for a subsequent period of time. After the period of time, the electronic device is allowed to use the first radio frequency path to send uplink data when operating in the first frequency band.
[0124] Through the embodiments of the present application, the electronic device considers whether the RF path corresponding to the antenna is abnormal as a factor and adds it to the judgment logic of antenna switching. When the first RF path is detected as abnormal when operating in the first frequency band, on the one hand, when the electronic device performs antenna switching on the first frequency band, it is prohibited to switch to the antenna corresponding to the first RF path. This can avoid using the abnormal RF path to send uplink data, which helps to ensure the normal transmission of uplink data. On the other hand, when the electronic device performs antenna switching on a second frequency band different from the first frequency band, it is allowed to switch to the antenna corresponding to the first RF path. This can avoid wasting possible normal RF paths and help to make full use of normal RF path resources.
[0125] In addition, when the first RF path is likely to return to normal when operating in the first frequency band (for example, after the electronic device switches frequency bands or restarts), it is possible to re-detect whether the first RF path is abnormal when operating in the first frequency band. If the first RF path continues to be abnormal when operating in the first frequency band, the subsequent electronic device is prohibited from using the first RF path to send uplink data when operating in the first frequency band. If the first RF path returns to normal when operating in the first frequency band, the subsequent electronic device can continue to use the first RF path to send uplink data when operating in the first frequency band. In this way, the abnormal recovery of the first RF path when operating in the first frequency band can be detected in a timely manner so that corresponding abnormality processing can be performed.
[0126] The method of the embodiment of the present application is described below by taking as an example the method of determining whether the first radio frequency path is abnormal when operating in the first frequency band through transmission power detection.
[0127] Please refer to Figure 3, which is a flowchart of another antenna switching method provided by an embodiment of the present application. The antenna switching method is applied to an electronic device, as shown in Figure 3, and may include but is not limited to the following steps S301 to S316.
[0128] S301: When operating in a first frequency band, an electronic device uses a first radio frequency path to send uplink data.
[0129] S302, detecting whether the difference between the actual transmit power and the expected transmit power within the preset time window when the first RF path operates in the first frequency band is greater than a first preset value, if so, proceeding to step S303, if not, returning to step S301.
[0130] S303: Determine that the first radio frequency path is abnormal when operating in the first frequency band.
[0131] S304: Switch to the antenna corresponding to other normal radio frequency channels.
[0132] Optionally, when antenna switching is performed in the first frequency band, switching to the antenna corresponding to the first radio frequency path is prohibited. In this case, the normal radio frequency path does not include the first radio frequency path operating in the first frequency band.
[0133] Optionally, when the operating frequency band of the electronic device is switched from a first frequency band to a second frequency band, when antenna switching is performed in the second frequency band, switching to the antenna corresponding to the first RF path is permitted, and the second frequency band is different from the first frequency band. In this case, the normal RF path may include the first RF path operating in the second frequency band.
[0134] In one possible case, proceed to the following steps S305 to S310.
[0135] S305 , when the operating frequency band of the electronic device is switched from the first frequency band to the second frequency band and then switched back to the first frequency band, it is allowed to switch to the antenna corresponding to the first radio frequency path.
[0136] S306, when reusing the first radio frequency path operating in the first frequency band to send uplink data, re-detect whether the difference between the actual transmit power and the expected transmit power within the preset time window when the first radio frequency path operates in the first frequency band is greater than the first preset value; if not, proceed to step S307; if so, proceed to step S308.
[0137] S307, clear the count of the first counter and return to step S301.
[0138] Optionally, the first counter may be started before step S304. For example, the first timer may be started after step S301 or step S302. Optionally, in step S303, after determining that the first RF path is operating abnormally in the first frequency band, the first counter may be incremented by one.
[0139] S308: Determine that the first radio frequency path is still abnormal when operating in the first frequency band, and increment the count of the first counter by one.
[0140] S309, determining whether the count of the first counter reaches a first preset number, if so, proceeding to step S310, if not, returning to step S304.
[0141] S310: Subsequently, the first radio frequency path operating in the first frequency band is no longer used to send uplink data.
[0142] In another possible case, proceed to the following steps S311 to S316.
[0143] S311: After the electronic device is restarted, it is allowed to switch to the antenna corresponding to the first radio frequency path.
[0144] S312, when reusing the first RF path operating in the first frequency band to send uplink data, re-detect whether the difference between the actual transmit power and the expected transmit power within the preset time window when the first RF path operates in the first frequency band is greater than the first preset value; if not, proceed to step S313; if not, proceed to step S314.
[0145] S313, clear the count of the second counter and return to step S301.
[0146] Optionally, the second counter may be started before step S304. For example, the second timer may be started after step S301 or step S302. Optionally, in step S303, after determining that the first RF path is abnormal when operating in the first frequency band, the second counter may be incremented by one.
[0147] S314: It is determined that the first radio frequency path is still abnormal when operating in the first frequency band, and the count of the second counter is increased by one.
[0148] S315, determining whether the count of the second counter reaches a second preset number, if so, proceeding to step S316, if not, returning to step S304.
[0149] S316: Subsequently, the first radio frequency path operating in the first frequency band is no longer used to send uplink data.
[0150] For the contents not specifically described in the above steps S301 to S316, please refer to the relevant description in the previous embodiment, which will not be repeated here.
[0151] It should be noted that the first counter and the second counter may be two independent counters, and the first preset number and the second preset number corresponding thereto may be the same or different. The first counter and the second counter may also be the same counter, so that in step S308 or step S314, the count of the counter may be incremented by one.
[0152] According to an embodiment of the present application, an electronic device uses a first RF path to transmit uplink data when operating in a first frequency band. By detecting whether the difference between the actual transmit power and the expected transmit power of the first RF path within a preset time window when operating in the first frequency band is greater than a first preset value, it is determined whether the first RF path is operating abnormally in the first frequency band. This can improve the accuracy of abnormality detection. If it is detected that the first RF path is operating abnormally in the first frequency band, the device switches to the antenna corresponding to another normal RF path. This can avoid using the abnormal RF path to transmit uplink data, helping to ensure normal transmission of uplink data. In addition, after the electronic device undergoes a frequency band switch or restart, when the electronic device resumes using the first RF path operating in the first frequency band to transmit uplink data, it re-detects whether the first RF path is operating abnormally in the first frequency band. If the first RF path continues to operate abnormally in the first frequency band, the electronic device will no longer use the first RF path to transmit uplink data in the first frequency band. If the first RF path returns to normal in the first frequency band, the electronic device can continue to use the first RF path to transmit uplink data in the first frequency band. In this way, the abnormality recovery of the first RF path in the first frequency band can be detected in a timely manner so that corresponding abnormality handling can be performed.
[0153] The method of the embodiment of the present application is described below by taking an example of determining whether the first radio frequency path is abnormal when operating in the first frequency band through uplink bit error rate detection.
[0154] Please refer to Figure 4, which is a flowchart of another antenna switching method provided by an embodiment of the present application. The antenna switching method is applied to an electronic device, as shown in Figure 4, and may include but is not limited to the following steps S401 to S416.
[0155] S401: When operating in a first frequency band, an electronic device uses a first radio frequency path to send uplink data.
[0156] S402, detecting whether the uplink bit error rate of the first radio frequency channel in the preset time window is greater than a second preset value when the first radio frequency channel operates in the first frequency band, if so, proceeding to step S403, if not, returning to step S401.
[0157] S403: Determine that the first radio frequency path is abnormal when operating in the first frequency band.
[0158] S404: Switch to the antenna corresponding to other normal radio frequency channels.
[0159] Optionally, when antenna switching is performed in the first frequency band, switching to the antenna corresponding to the first radio frequency path is prohibited. In this case, the normal radio frequency path does not include the first radio frequency path operating in the first frequency band.
[0160] Optionally, when the operating frequency band of the electronic device is switched from a first frequency band to a second frequency band, when antenna switching is performed in the second frequency band, switching to the antenna corresponding to the first RF path is permitted, and the second frequency band is different from the first frequency band. In this case, the normal RF path may include the first RF path operating in the second frequency band.
[0161] In one possible case, proceed to the following steps S405 to S410.
[0162] S405 , when the operating frequency band of the electronic device is switched from the first frequency band to the second frequency band and then switched back to the first frequency band, it is allowed to switch to the antenna corresponding to the first radio frequency path.
[0163] S406, when reusing the first radio frequency path operating in the first frequency band to send uplink data, re-detect whether the uplink bit error rate of the first radio frequency path within the preset time window when operating in the first frequency band is greater than the second preset value. If not, proceed to step S407; if so, proceed to step S408.
[0164] S407, clear the count of the first counter and return to step S401.
[0165] Optionally, the first counter may be started before step S404. For example, the first timer may be started after step S401 or step S402. Optionally, in step S403, after determining that the first RF path is operating abnormally in the first frequency band, the first counter may be incremented by one.
[0166] S408: It is determined that the first radio frequency path is still abnormal when operating in the first frequency band, and the count of the first counter is increased by one.
[0167] S409, determining whether the count of the first counter reaches a first preset number, if so, proceeding to step S410, if not, returning to step S404.
[0168] S410: Subsequently, the first radio frequency path operating in the first frequency band is no longer used to send uplink data.
[0169] In another possible case, proceed to the following steps S411 to S416.
[0170] S411: After the electronic device is restarted, it is allowed to switch to the antenna corresponding to the first radio frequency path.
[0171] S412, when reusing the first radio frequency path operating in the first frequency band to send uplink data, re-detect whether the uplink bit error rate of the first radio frequency path within the preset time window when operating in the first frequency band is greater than the second preset value; if not, proceed to step S413; if not, proceed to step S414.
[0172] S413, clearing the count of the second counter to zero, and returning to step S401.
[0173] Optionally, the second counter may be started before step S404. For example, the second timer may be started after step S401 or step S402. Optionally, in step S403, after determining that the first RF path is abnormal when operating in the first frequency band, the second counter may be incremented by one.
[0174] S414: It is determined that the first radio frequency path is still abnormal when operating in the first frequency band, and the count of the second counter is increased by one.
[0175] S415, determining whether the count of the second counter reaches a second preset number, if so, proceeding to step S416, if not, returning to step S404.
[0176] S416: Subsequently, the first radio frequency path operating in the first frequency band is no longer used to send uplink data.
[0177] For the contents not specifically described in the above steps S401 to S416, please refer to the relevant description in the previous embodiment, which will not be repeated here.
[0178] It should be noted that the first counter and the second counter may be two independent counters, and the first preset number and the second preset number corresponding thereto may be the same or different. The first counter and the second counter may also be the same counter, and the first preset number and the second preset number are the same preset number. In step S408 or step S414, the count of the counter may be incremented by one.
[0179] According to an embodiment of the present application, an electronic device uses a first RF path to transmit uplink data when operating in a first frequency band. By detecting whether the uplink bit error rate of the first RF path within a preset time window when operating in the first frequency band is greater than a second preset value, it is determined whether the first RF path is operating abnormally in the first frequency band. This can improve the accuracy of abnormality detection. If it is detected that the first RF path is operating abnormally in the first frequency band, it switches to the antenna corresponding to another normal RF path. This can avoid using the abnormal RF path to transmit uplink data, helping to ensure normal transmission of uplink data. In addition, after the electronic device undergoes a frequency band switch or restart, when the electronic device resumes using the first RF path operating in the first frequency band to transmit uplink data, it re-detects whether the first RF path is operating abnormally in the first frequency band. If the first RF path continues to operate abnormally in the first frequency band, the electronic device will no longer use the first RF path to transmit uplink data in the first frequency band. If the first RF path returns to normal operation in the first frequency band, the electronic device can continue to use the first RF path to transmit uplink data in the first frequency band. In this way, the abnormality recovery of the first RF path in the first frequency band can be detected in a timely manner so that corresponding abnormality handling can be performed.
[0180] The following describes the device involved in the embodiments of the present application.
[0181] Please refer to Figure 5, which is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
[0182] As shown in Figure 5, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0183] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0184] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor (Modem), a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0185] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0186] In some embodiments, processor 110 may include one or more interfaces.
[0187] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0188] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0189] The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low-noise amplifier (LNA), and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor and convert them into electromagnetic waves for radiation via the antenna 1.
[0190] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium- or high-frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs sound signals through an audio device (including but not limited to the speaker 170A, the receiver 170B, etc.) or displays images or videos through the display screen 194.
[0191] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0192] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 , and antenna 2 is coupled to wireless communication module 160 , so that electronic device 100 can communicate with the network and other devices through wireless communication technology.
[0193] The electronic device 100 may include at least two RF paths, and the at least two RF paths may be provided by one RF chip, or each of the at least two RF paths may be provided by one RF chip. An electronic device (such as a mobile phone) generally has multiple RF chips, and each RF chip may include at least one RF path. A RF path may include at least one of the following components: a power amplifier (PA), an antenna switch module (ASM), a coupler (CPL), a low noise amplifier (LNA), and a filter. The RF path may be used to perform relevant processing (such as power amplification, filtering, etc.) on the signal from the modem before transmission and then transmit it through the antenna, and to perform relevant processing on the signal received by the antenna and then transmit it to the modem.
[0194] Please refer to Figure 6, which is a schematic diagram of an application scenario provided by an embodiment of the present application. This application scenario involves a modem and two radio frequency paths (respectively denoted as radio frequency path A and radio frequency path B). The two radio frequency paths can be regarded as part of a mobile communication module. Among them, one radio frequency path can correspond to at least one antenna. It is assumed that radio frequency path A corresponds to two antennas (respectively denoted as antenna a1 and antenna a2), and radio frequency path B corresponds to two antennas (respectively denoted as antenna b1 and antenna b2).
[0195] When the electronic device is operating in a first frequency band, assuming that the modem is currently using antenna a1 corresponding to radio frequency path A to transmit uplink data. If radio frequency path A is detected as abnormal while operating in the first frequency band: when the electronic device performs antenna switching in the first frequency band, the electronic device is prohibited from switching to the antenna corresponding to radio frequency path A (to transmit uplink data), that is, switching to either antenna a1 or antenna a2 is prohibited. At this time, the electronic device is allowed to switch to other normal radio frequency paths outside of radio frequency path A, such as the antenna corresponding to radio frequency path B, that is, switching to either antenna b1 or antenna b2, or at least one of antenna b1 and antenna b2. When the operating frequency band of the electronic device is switched from the first frequency band to the second frequency band, when the electronic device performs antenna switching in the second frequency band, the electronic device is allowed to switch to the antenna corresponding to radio frequency path A or the antenna corresponding to radio frequency path B, that is, switching to either antenna a1, antenna a2, antenna b1, or antenna b2, or at least one of antenna a1, antenna a2, antenna b1, and antenna b2.
[0196] Please refer to Figure 7, which is a schematic diagram of the software structure of an electronic device provided in an embodiment of the present application.
[0197] The software structure adopts a layered architecture, which divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. Taking the Android system running on an AP as an example, in some embodiments, the Android system is divided into five layers: from top to bottom, the application layer, the application framework layer (Framework), the Android runtime (Android runtime) and system libraries, the hardware abstraction layer (HAL), and the system kernel layer (Kernel).
[0198] The application layer can include a series of application packages. These packages may include applications (APPs), such as camera, gallery, calendar, call, map, wireless local area network (WLAN), Bluetooth, music, video, and short messaging. The application layer may also include a system UI (system UI), which is used to display the electronic device interface, such as the signal icon corresponding to the SIM card and the call interface. The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example, the application framework layer may include a window manager, content provider, view system, telephony manager, resource manager, and notification manager. The telephony manager provides terminal call functions, such as call status management (including connecting and ending calls). The application framework layer may also include a radio interface layer (RIL), through which the modem processor (modem) can exchange information with the telephony.
[0199] A modem can include the non-access stratum (NAS) layer, the radio resource control (RRC) layer, the packet data convergence protocol (PDCP) layer, the radio link control protocol (RLC) layer, the medium access control (MAC) layer, and the physical (PHY) layer. Each of these layers can be a software module. The modem can interact with the base station through an antenna.
[0200] The present application also provides an electronic device that may include one or more processors and one or more memories. The one or more memories are coupled to the one or more processors. The one or more memories are used to store a computer program (also referred to as code or instructions). When the one or more processors execute the computer program, the electronic device performs the method in the above method embodiment.
[0201] An embodiment of the present application also provides a chip system, which can be applied to electronic devices. The chip system may include one or more processors, and the one or more processors are used to call computer instructions to enable the electronic device to execute the method in the above method embodiment.
[0202] In one possible design, the chip system also includes one or more memories for storing program instructions and data, and the memories are located inside or outside the processor.
[0203] The chip system can be composed of chips, or can include chips and other discrete devices.
[0204] The processor in the chip system can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that is implemented by reading software code stored in a memory.
[0205] The memory in the chip system can be integrated with the processor or can be set separately from the processor, which is not limited in the embodiments of the present application. For example, the memory can be a non-transient processor, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. The embodiments of the present application do not specifically limit the type of memory or the arrangement of the memory and the processor.
[0206] Exemplarily, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0207] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program (also referred to as code or instructions). When the computer program runs on an electronic device, the electronic device executes the method in the above method embodiment.
[0208] An embodiment of the present application further provides a computer program product, which includes a computer program (also referred to as code or instructions). When the computer program runs on an electronic device, the electronic device executes the method in the above method embodiment.
[0209] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. An antenna switching method, applied to an electronic device, characterized in that The method includes: The electronic device detects whether the first radio frequency path currently used for transmitting uplink data is abnormal when operating in the first frequency band, and the first radio frequency path is currently operating in the first frequency band; In the case where the first radio frequency path is detected as abnormal when operating in the first frequency band, perform the following first operation: When performing antenna switching in the first frequency band, prohibit switching to the antenna corresponding to the first radio frequency path; or, In the case where the current operating frequency band of the electronic device is switched from the first frequency band to the second frequency band, when performing antenna switching in the second frequency band, allow switching to the antenna corresponding to the first radio frequency path, where the second frequency band is different from the first frequency band.
2. The method according to claim 1, wherein After performing the first operation, the method further includes: Perform the following second operation: When performing antenna switching in the first frequency band and satisfying the first condition, allow switching to the antenna corresponding to the first radio frequency path.
3. The method according to claim 2, characterized in that, The first condition includes: The current operating frequency band of the electronic device is switched from the first frequency band to the second frequency band and then switched back to the first frequency band, or the electronic device is restarted.
4. The method according to claim 2 or 3, characterized in that, The second operation further includes: When satisfying the first condition, re-detect whether the first radio frequency path is abnormal when operating in the first frequency band; If the first radio frequency path is still detected as abnormal when operating in the first frequency band, make an abnormal record once, and return to execute the first operation and the second operation; When the number of abnormal records reaches a preset number, prohibit using the antenna corresponding to the first radio frequency path when the current operating frequency band is the first frequency band.
5. The method according to claim 4, characterized in that, The method further includes: Starting a counter; The "If the first radio frequency path is still detected as abnormal when operating in the first frequency band, make an abnormal record once" includes: If the first radio frequency path is still detected as abnormal when operating in the first frequency band, increment the count of the counter by one, and the count of the counter is used to determine the number of abnormal records when the first radio frequency path operates in the first frequency band.
6. The method according to claim 5, wherein The method further includes: If the first radio frequency path is detected as normal when operating in the first frequency band, clear the count of the counter.
7. The method according to any one of claims 1 to 6, characterized in that, The electronic device detecting whether the first radio frequency path currently used for transmitting uplink data is abnormal when operating in the first frequency band includes: Obtain N first parameter values of the first radio frequency path within a preset time window when operating in the first frequency band, where the first parameter value is used to indicate whether the first index of the first radio frequency path is abnormal, and N is an integer greater than or equal to 2; When the N first parameter values satisfy the second condition, the first radio frequency path is detected as abnormal when operating in the first frequency band.
8. The method according to claim 7, wherein The N first parameter values satisfying the second condition includes: Among the N first parameter values, M first parameter values indicate that the first index of the first radio frequency path is abnormal; Wherein, M is a positive integer less than or equal to N; M is greater than or equal to the first quantity, or the ratio of M to N is greater than or equal to the first ratio.
9. The method according to claim 7, wherein The N first parameter values satisfy a second condition, including: among the N first parameter values, there are K consecutive first parameter values indicating that a first indicator of the first radio frequency path is abnormal; wherein, the K is a positive integer less than or equal to the N; the K is greater than or equal to a second quantity, or a ratio of the K to the N is greater than or equal to a second ratio.
10. The method according to any one of claims 7 to 9, characterized in that, The first indicator includes a transmission power, the first parameter value represents a magnitude relationship between a power difference and a first preset value, and the power difference is a difference between an actual transmission power and an expected transmission power of the first radio frequency path; when the power difference is greater than the first preset value, the first parameter value indicates that the transmission power of the first radio frequency path is abnormal; when the power difference is less than or equal to the first preset value, the first parameter value indicates that the transmission power of the first radio frequency path is normal.
11. The method according to any one of claims 7 to 9, characterized in that, The first indicator includes an uplink error rate, and the first parameter value represents a magnitude relationship between the uplink error rate of the first radio frequency path and a second preset value; when the uplink error rate is greater than the second preset value, the first parameter value indicates that the uplink error rate of the first radio frequency path is abnormal; when the uplink error rate is less than or equal to the second preset value, the first parameter value indicates that the uplink error rate of the first radio frequency path is normal.
12. An electronic device, characterized in that, comprising one or more processors and one or more memories; wherein, the one or more memories are coupled to the one or more processors, and the one or more memories are configured to store a computer program, and when the one or more processors execute the computer program, the electronic device is caused to execute the method according to any one of claims 1 to 11.
13. A chip system, the chip system is applied to an electronic device, characterized in that, The chip system includes one or more processors, and the one or more processors are configured to call computer instructions to cause the electronic device to execute the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Switching control method and device of antenna equipment and electronic equipment
CN113067594A
Radio frequency control method and device and electronic equipment
CN113992214A
Antenna system, wireless communication system, and electronic device
CN114696064A
Frequency band switching method, AP equipment and electronic equipment
CN115802498A
Radio frequency communication circuit, access switching method and electronic equipment
CN117335827A