Antenna adjustment method, electronic device and storage medium
By adjusting the antenna instantly when the difference between the actual value and the predicted value of the cellular index exceeds the threshold, the problem of antenna adjustment lag of electronic equipment is solved and the communication quality is improved.
Patent Information
- Application Number
- CN202510256143.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-03-05
AI Technical Summary
Electronic devices have adjustment lag when the antenna is abnormal, resulting in poor communication quality.
By obtaining the difference between the actual value of the cellular index and the predicted value, if the difference is greater than or equal to the preset threshold, the electronic device will adjust the antenna immediately, such as tuning or switching the antenna, to reduce the communication time in the abnormal antenna state.
The communication time of electronic devices through abnormal antenna states is reduced, and the overall communication quality is improved.
Smart Images

Figure CN119788214B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of terminal technology, and in particular to an antenna adjustment method, electronic equipment, and storage medium. Background Art
[0002] Electronic devices (such as mobile phones) can interact with base stations through antennas in the electronic devices, thereby realizing the communication function of the electronic devices.
[0003] Currently, when an antenna's working state is abnormal, the electronic device can adjust the antenna, for example, the electronic device tunes the antenna and / or switches the antenna in use.
[0004] Currently, there is a lag when electronic devices adjust their antennas, resulting in poor communication quality of the electronic devices. Summary of the Invention
[0005] The embodiments of the present application provide an antenna adjustment method, an electronic device, and a storage medium. The electronic device can adjust the antenna when the absolute value of the difference between the actual value of the cellular indicator and the predicted value of the cellular indicator is greater than or equal to a preset threshold. The cellular indicator may include a reference signal received power, a modulation and coding scheme level, and / or a signal-to-noise ratio. The electronic device can adjust the antenna when an abnormality occurs in the actual value of the cellular indicator, so that the time point of the antenna adjustment is closer to the time point when the actual value of the cellular indicator becomes abnormal, so as to reduce the time for the electronic device to communicate through the antenna under the abnormal cellular indicator. Since the communication quality of the electronic device is poor when communicating through the antenna under the abnormal cellular indicator, reducing the time for the electronic device to communicate through the antenna under the abnormal cellular indicator can improve the overall communication quality of the electronic device.
[0006] In a first aspect, an embodiment of the present application provides an antenna adjustment method, applied to an electronic device, the method comprising:
[0007] The electronic device obtains a first cellular indicator, which includes reference signal received power (RSRP), signal-to-noise ratio (SNR), modulation and coding scheme (MCS) level, and / or other key indicators (other key indicators may also be referred to as target key indicators). Alternatively, the first cellular indicator also includes an antenna number. Other key indicators may include, for example, block error rate (BLER), physical uplink control channel path loss (PUCCH path loss), physical uplink control channel transmit power (PUCCH TX power), resource block number (RBnum), channel quality indicator (CQI), and / or received signal strength indication (RSSI). The electronic device then predicts a second cellular indicator based on the first cellular indicator. The second cellular indicator includes one or more of RSRP, SNR, MCS level, and other key indicators. The electronic device then obtains a third cellular indicator, which is the same as the second cellular indicator. The third cellular indicator being the same as the second cellular indicator means that the third cellular indicator is of the same type as the second cellular indicator. For example, if the second cellular indicator is RSRP, the third cellular indicator is also RSRP; if the second cellular indicator is SNR, the third cellular indicator is also SNR; if the second cellular indicator is MCS level, the third cellular indicator is also MCS level. Then, if the absolute value of the difference between the second cellular indicator and the third cellular indicator is greater than or equal to a preset threshold, the electronic device performs antenna adjustment.
[0008] It is understandable that the first cellular indicator can be used to characterize the communication environment. This allows the electronic device to predict the second cellular indicator based on the communication environment characterized by the first cellular indicator. Furthermore, the electronic device uses the predicted second cellular indicator to determine whether an abnormality has occurred in the communication environment of the electronic device. For example, if the absolute value of the difference between the value of the second cellular indicator and the value of the third cellular indicator is greater than or equal to a preset threshold, the electronic device determines that an abnormality has occurred in the communication environment of the electronic device. An abnormality in the communication environment of the electronic device can manifest as an abnormality in the antenna state of the electronic device. Since the electronic device uses the predicted second cellular indicator to determine whether an abnormality has occurred in the communication environment of the electronic device, antenna adjustment is performed when an abnormality is determined. This can alleviate antenna adjustment lag, thereby reducing the time the electronic device communicates using an antenna in an abnormal antenna state. Since the communication quality of an electronic device in an abnormal antenna state is poor, reducing the time the electronic device communicates using an antenna in an abnormal antenna state can improve the overall communication quality of the electronic device.
[0009] In one possible implementation of the first aspect, an electronic device includes a tuning circuit, wherein the tuning circuit includes a tuning component (such as a resistor, capacitor, and / or inductor) and a switch for connecting or disconnecting the tuning component. The electronic device performs antenna adjustment, including: the electronic device controls the switch to connect or disconnect the tuning component, thereby tuning the antenna currently in use by the electronic device. And / or, the electronic device includes an antenna switching circuit. The electronic device performs antenna adjustment, including: the electronic device switches the antenna currently in use by the electronic device via the antenna switching circuit.
[0010] In this implementation, the electronic device can tune the antenna currently in use by the electronic device, and / or the electronic device can also switch the antenna currently in use by the electronic device. Therefore, the embodiments of the present application take into account the scenarios of antenna tuning and antenna switching, so that the electronic device can improve the communication quality of the electronic device by performing antenna tuning and / or antenna switching in different scenarios.
[0011] In a possible implementation of the first aspect, an electronic device obtains a first cellular indicator, including: the electronic device obtains the first cellular indicator at a first time point. The electronic device predicts a second cellular indicator based on the first cellular indicator, including: the electronic device predicts the second cellular indicator based on the first cellular indicator at a second time point, the second time point being later than the first time point. If the absolute value of the difference between the value of the second cellular indicator and the value of a third cellular indicator is greater than or equal to a preset threshold, the electronic device performs antenna adjustment, including: the second cellular indicator includes a target indicator, the third cellular indicator including the target indicator is obtained at a third time point, and the third cellular indicator including the target indicator is not obtained between the third time point and the second time point, and the absolute value of the difference between the value of the second cellular indicator and the value of the third cellular indicator is greater than or equal to the preset threshold, the electronic device performs antenna adjustment. The third time point is later than the first time point and earlier than or equal to the second time point. The target indicator is one or more of RSRP, SNR, MCS level, and other key indicators. For example, if the target indicators are RSRP and BLER, it means that the second cellular indicator includes RSRP and BLER.
[0012] In this implementation, the third time point is later than the first time point and earlier than or equal to the second time point. Thus, after the electronic device predicts the second cellular indicator, it can promptly determine whether the difference between the value of the second cellular indicator and the value of the already acquired third cellular indicator is greater than or equal to a preset threshold. If the difference between the value of the second cellular indicator and the value of the third cellular indicator is determined to be greater than or equal to the preset threshold, the electronic device performs antenna adjustment. Because the time difference between the first time point and the time point at which the second cellular indicator is predicted (i.e., the second time point) is very small, the electronic device can determine whether to perform antenna adjustment as early as possible. When it is determined that antenna adjustment is necessary, the electronic device performs antenna adjustment, alleviating the lag in antenna adjustment in related technologies. Furthermore, because the third time point is later than the first time point and earlier than or equal to the second time point, the time difference between the third time point and the second time point is even smaller. Therefore, the electronic device determines whether the difference between the value of the second cellular indicator and the value of the third cellular indicator is greater than or equal to the preset threshold value in a more real-time manner, so that the electronic device can perform antenna adjustment closer to the time when the abnormality of the third cellular indicator occurs, thereby further improving the overall communication quality of the electronic device.
[0013] In a possible implementation of the first aspect, the method further includes: the first cellular indicator includes a target indicator, and between the first time point and the second time point and at the second time point, if a third cellular indicator including the target indicator is not acquired, and an absolute value of a difference between a value of the target indicator in the first cellular indicator and a value of the second cellular indicator is greater than or equal to a preset threshold, the electronic device performs antenna adjustment.
[0014] In this implementation, the first cellular indicator includes a target indicator, and the electronic device determines whether the absolute value of the difference between the value of the target indicator in the first cellular indicator and the value of the second cellular indicator is greater than or equal to a preset threshold. When it is determined that the absolute value of the difference between the value of the target indicator in the first cellular indicator and the value of the second cellular indicator is greater than or equal to the preset threshold, the electronic device performs antenna adjustment. Because the time point at which the first cellular indicator is obtained, i.e., the first time point, is earlier than the second time point, the electronic device can immediately determine whether the absolute value of the difference between the value of the target indicator in the first cellular indicator and the value of the second cellular indicator is greater than or equal to the preset threshold after predicting the second cellular indicator, thereby alleviating the antenna adjustment lag in the related art and reducing the time the electronic device spends communicating via the antenna in an abnormal antenna state. Since the communication quality of the electronic device in an abnormal antenna state is poor, reducing the time the electronic device spends communicating via the antenna in an abnormal antenna state can improve the overall communication quality of the electronic device.
[0015] In a possible implementation of the first aspect, the method further includes:
[0016] If the first cellular indicator does not include the target indicator, a third cellular indicator including the target indicator is obtained at a fourth time point, and if the third cellular indicator including the target indicator is not obtained between the fourth time point and the second time point and at the second time point, and if the absolute value of the difference between the value of the second cellular indicator and the value of the third cellular indicator is greater than or equal to a preset threshold, the electronic device performs antenna adjustment. The fourth time point is before the first time point.
[0017] In this implementation, since the fourth time point at which the third cellular indicator including the target indicator is obtained is earlier than the second time point, the electronic device can immediately determine whether the absolute value of the difference between the value of the second cellular indicator and the value of the third cellular indicator is greater than or equal to a preset threshold after predicting the second cellular indicator, thereby alleviating the antenna adjustment hysteresis in the related art, thereby reducing the time the electronic device spends communicating via an antenna in an abnormal antenna state. Since the communication quality of an electronic device in an abnormal antenna state is poor, reducing the time the electronic device spends communicating via an antenna in an abnormal antenna state can improve the overall communication quality of the electronic device.
[0018] In a possible implementation of the first aspect, the electronic device obtains a first cellular indicator, including: the electronic device obtains the first cellular indicator at a first time point. The electronic device predicts a second cellular indicator based on the first cellular indicator, including: the electronic device predicts the second cellular indicator based on the first cellular indicator at a second time point, where the second time point is later than the first time point. The electronic device obtains a third cellular indicator, including: the electronic device obtains the third cellular indicator at a fifth time point. If the fifth time point is later than the second time point, the electronic device does not obtain the same cellular indicator as the second cellular indicator at a sixth time point, or the electronic device obtains the same cellular indicator as the second cellular indicator at the sixth time point, and the difference between the second time point and the sixth time point is greater than the difference between the fifth time point and the second time point. The sixth time point is earlier than the second time point.
[0019] In this implementation, the electronic device uses the actual value corresponding to the second cellular indicator whose collection time point is closest to the predicted time point of the second cellular indicator to compare with the second cellular indicator, so that the comparison result can better reflect the current state of the antenna in the electronic device, thereby reducing the number of times the electronic device adjusts the antenna at the wrong time, thereby improving the overall communication quality of the electronic device.
[0020] In a possible implementation of the first aspect, when the fifth time point is earlier than the second time point, the electronic device does not obtain a cellular indicator identical to the second cellular indicator at the seventh time point, or the electronic device obtains a cellular indicator identical to the second cellular indicator at the seventh time point, and a difference between the seventh time point and the second time point is greater than a difference between the second time point and the fifth time point. The seventh time point is later than the second time point.
[0021] In this implementation, the electronic device uses the actual value corresponding to the second cellular indicator whose collection time point is closest to the predicted time point of the second cellular indicator to compare with the second cellular indicator, so that the comparison result can better reflect the current state of the antenna in the electronic device, thereby reducing the number of times the electronic device adjusts the antenna at the wrong time, thereby improving the overall communication quality of the electronic device.
[0022] In a possible implementation of the first aspect, the electronic device predicts the second cellular indicator based on the first cellular indicator, including: the electronic device inputs the first cellular indicator into a first prediction model, and obtains the second cellular indicator output by the first prediction model.
[0023] In this implementation, the electronic device predicts the second cellular indicator using the first prediction model. The calculation method is simple, thus saving computing resources of the electronic device and reducing computing time.
[0024] In a possible implementation of the first aspect, the method further includes:
[0025] During operation of an electronic device, the electronic device obtains a first operating cellular indicator. The first operating cellular indicator includes a first training label and a first training feature. The first training feature includes at least one of RSRP, SNR, MCS level, and target key indicator; alternatively, the first training feature also includes an antenna number, and the first training label is different from the first training feature. The electronic device then inputs the first training feature into a first prediction model to obtain a first training result. Next, the electronic device calculates a first loss function based on the first training result and the first training label. The electronic device then iterates the model parameters of the first prediction model based on the first loss function until the first loss function converges, thereby obtaining an updated first prediction model. The method further includes: after the first prediction model is updated, the electronic device inputs the first cellular indicator into the updated first prediction model to obtain a second cellular indicator output by the updated first prediction model.
[0026] In this implementation, the first operating cellular indicator is obtained by preprocessing data collected by the electronic device based on the user's usage habits and the communication environment in which the electronic device is located. Therefore, as the number of updates increases, the updated first prediction model becomes more suitable for the user's usage habits and the communication environment in which the electronic device is located. As a result, the updated first prediction model has higher prediction accuracy, thereby further improving the communication quality of the electronic device.
[0027] In a possible implementation of the first aspect, the first operating cell indicator includes: a first operating indicator and a second operating indicator. The first operating indicator is different from the second operating indicator. For example, when the second operating indicator is RSRP, the first operating indicator includes SNR and / or MCS level; when the second operating indicator is SNR, the first operating indicator includes RSRP and / or MCS level; when the second operating indicator is MCS level, the first operating indicator includes RSRP and / or SNR. The electronic device obtains the first operating cell indicator, including: when the absolute value of the difference between the second operating indicator and the third operating indicator is less than a preset threshold, the electronic device obtains the first operating indicator and the second operating indicator. The third operating indicator is predicted by the electronic device based on the first operating indicator or the first operating cell indicator, and the type of the third operating indicator is the same as that of the second operating indicator.
[0028] In this implementation, the first operating cellular indicator includes a first operating indicator and a second operating indicator. When the absolute value of the difference between the second operating indicator and the third operating indicator is less than a preset threshold, the electronic device obtains the first and second operating indicators. The third operating indicator is predicted by the electronic device based on the first operating indicator or obtained by the electronic device based on the first operating indicator, and the third operating indicator is of the same type as the second operating indicator. That is, when obtaining the first operating cellular indicator, the electronic device obtains the first operating cellular indicator when the absolute value of the difference between the second and third operating indicators is less than a preset threshold. The electronic device then updates the first prediction model using the first operating cellular indicator when the absolute value of the difference between the second and third operating indicators is less than the preset threshold. This allows the second cellular indicator predicted by the updated first prediction model to be closer to the value when the antenna is in normal condition. That is, when the antenna is in normal condition, the value of the third cellular indicator is closer to the value of the second cellular indicator predicted by the updated first prediction model. When the antenna is in abnormal condition, the absolute value of the difference between the value of the third cellular indicator and the value of the second cellular indicator predicted by the updated first prediction model is greater. This ensures a more accurate comparison between the third cellular indicator and the second cellular indicator predicted by the updated first prediction model.
[0029] In a possible implementation of the first aspect, the electronic device performs antenna adjustment, further comprising: the electronic device obtaining a fourth cellular indicator, the fourth cellular indicator including at least one of RSRP, SNR, MCS, and a target key indicator level, and the fourth cellular indicator also including antenna impedance; or the fourth cellular indicator also including an antenna number and / or an antenna state number. The electronic device then predicts a predicted antenna state number value based on the fourth cellular indicator. The electronic device tunes an antenna currently in use by the electronic device, including: the electronic device updating a value of a first preset parameter based on the predicted antenna state number value, and the electronic device switching the antenna state of the antenna currently in use by the electronic device based on the value of the first preset parameter. The electronic device switches the antenna currently in use by the electronic device, including: the electronic device updating a value of a second preset parameter based on the antenna number indicated by the predicted antenna state number value, and the electronic device switching the antenna currently in use by the electronic device based on the value of the second preset parameter.
[0030] In this implementation, the electronic device switches the antenna state of the antenna currently being used by the electronic device according to the predicted value of the antenna state number; and / or the electronic device switches the antenna used in the electronic device according to the antenna number indicated by the predicted value of the antenna state number. Compared with the tuning of traversing each antenna state to select the optimal antenna state, and traversing each antenna to select the antenna with the optimal state in the related art, the electronic device in the embodiment of the present application can directly determine the optimal antenna state and / or the optimal antenna based on RSRP, SNR, modulation and coding scheme MCS level and / or antenna impedance, avoiding the traversal of antenna states and antennas, thereby reducing antenna adjustment time and improving antenna adjustment efficiency.
[0031] In a possible implementation of the first aspect, the electronic device obtains the antenna state number prediction value based on the fourth cellular indicator, including: the electronic device inputs the fourth cellular indicator into the second prediction model, and obtains the antenna state number prediction value output by the second prediction model.
[0032] In this implementation, the electronic device uses the second prediction model to predict the antenna state number prediction value and / or the antenna number prediction value. The calculation method is simple, thus saving computing resources of the electronic device and reducing computing time.
[0033] In a possible implementation of the first aspect, the method further includes:
[0034] During operation of the electronic device, the electronic device obtains a second operating cellular indicator. The second operating cellular indicator includes a second training tag and a second training feature. The second training feature includes at least one of RSRP, SNR, MCS level, and target key indicator, and the second training feature also includes antenna impedance; alternatively, the first training feature also includes an antenna number; and the second training tag includes an antenna state number. The electronic device then inputs the second training tag into a second prediction model to obtain a second training result. Next, the electronic device calculates a second loss function based on the second training result and the second training tag. The electronic device then iterates the model parameters of the second prediction model based on the second loss function until the second loss function converges, thereby obtaining an updated second prediction model. The method further includes: after the second prediction model is updated, the electronic device inputs a fourth cellular indicator into the updated second prediction model to obtain a predicted value of the antenna state number output by the updated second prediction model.
[0035] In this implementation, the second operating cellular indicator is obtained by preprocessing data collected by the electronic device based on the user's usage habits and the communication environment in which the electronic device is located. Therefore, as the number of updates increases, the updated second prediction model becomes more suitable for the user's usage habits and the communication environment in which the electronic device is located. As a result, the updated second prediction model has higher prediction accuracy, thereby further improving the communication quality of the electronic device.
[0036] In a possible implementation of the first aspect, the second cellular indicator is an antenna number, and the method further includes:
[0037] The electronic device determines whether the value of the second cellular indicator is consistent with the value of the third cellular indicator. Then, if the value of the second cellular indicator is inconsistent with the value of the third cellular indicator, the electronic device updates the value of the second preset parameter based on the value of the second cellular indicator. Thereafter, the electronic device switches the antenna currently used in the electronic device based on the value of the second preset parameter.
[0038] In the embodiment of the present application, the electronic device can use the first prediction model to predict the antenna in the best condition among multiple antennas. In this way, the electronic device can promptly use the antenna in the best condition for communication, reducing the time the mobile phone uses the antenna in poor condition, thereby improving the overall communication quality of the mobile phone.
[0039] In a second aspect, an embodiment of the present application provides an electronic device comprising: a memory and a processor, the processor comprising a first processing unit and a second processing unit. The memory and the processor are coupled. The memory is configured to store computer program code, the computer program code comprising computer instructions. When the processor executes the computer instructions, the electronic device performs the method of the first aspect and possible implementations thereof.
[0040] In a third aspect, an embodiment of the present application provides a computer-readable storage medium comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method of the first aspect and its possible implementation methods.
[0041] In a fourth aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device. The chip system includes one or more processors, and the processors are used to call computer instructions to enable the electronic device to execute the method of the first aspect and its possible implementation methods.
[0042] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a computer, enables the computer to execute the method of the first aspect and its possible implementation methods.
[0043] It can be understood that the beneficial effects that can be achieved by the electronic device described in the second aspect, the computer-readable storage medium described in the third aspect, the chip system described in the fourth aspect, and the computer program product described in the fifth aspect provided above can refer to the beneficial effects in the first aspect and any possible implementation thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A desktop diagram of a mobile phone provided in an embodiment of the present application;
[0045] Figure 2 A schematic diagram of a downlink log of an electronic device provided in an embodiment of the present application;
[0046] Figure 3 A schematic diagram of an uplink log of an electronic device provided in an embodiment of the present application;
[0047] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0048] Figure 5 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;
[0049] Figure 6 A schematic diagram of a communication protocol stack of a modem processor provided in an embodiment of the present application;
[0050] Figure 7 A schematic diagram of the architecture of an initial prediction model provided in an embodiment of the present application;
[0051] Figure 8 A curve diagram of an activation function provided in an embodiment of the present application Figure 1 ;
[0052] Figure 9 A curve diagram of an activation function provided in an embodiment of the present application Figure 2 ;
[0053] Figure 10 A schematic diagram of a neuron structure provided in an embodiment of the present application;
[0054] Figure 11 A schematic diagram of the training process of an antenna prediction model provided in an embodiment of the present application Figure 1 ;
[0055] Figure 12 A schematic diagram of the training process of an antenna prediction model provided in an embodiment of the present application Figure 2 ;
[0056] Figure 13A schematic diagram of the process of an antenna adjustment method provided in an embodiment of the present application Figure 1 ;
[0057] Figure 14 A timing diagram provided for an embodiment of the present application;
[0058] Figure 15 A schematic diagram of the process of an antenna adjustment method provided in an embodiment of the present application Figure 2 ;
[0059] Figure 16 A schematic diagram of the relationship between an antenna switching threshold value and an antenna number provided in an embodiment of the present application;
[0060] Figure 17 A schematic diagram of a flow chart of a training process for an antenna tuning model provided in an embodiment of the present application;
[0061] Figure 18 A schematic diagram of the process of an antenna adjustment method provided in an embodiment of the present application Figure 3 ;
[0062] Figure 19 A schematic diagram of the hardware structure of another electronic device provided in an embodiment of the present application;
[0063] Figure 20 A schematic structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0065] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being 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 to facilitate understanding.
[0066] Electronic devices (such as mobile phones) can interact with base stations through antennas in the electronic devices, thereby realizing the communication function of the electronic devices.
[0067] Currently, when an antenna's working state is abnormal, the electronic device can adjust the antenna, for example, the electronic device tunes the antenna and / or switches the antenna in use.
[0068] Antenna tuning performed in electronic devices can include adjusting the antenna's physical parameters (such as length and position) and electronic parameters (such as capacitance and inductance) to match the antenna's impedance at a specific frequency with the impedance of the transmission line, maximizing signal transmission efficiency and minimizing power reflection. This improves antenna efficiency and, in turn, the communication quality of the electronic device. Antenna tuning in electronic devices can also include adjusting the antenna's resonant frequency by adjusting the antenna's physical parameters (such as length and position) and electronic parameters (such as capacitance and inductance) to bring the resonant frequency close to the antenna's operating frequency. This improves antenna efficiency and, in turn, the communication quality of the electronic device. The antenna's operating frequency can be the frequency range within which the antenna's electrical characteristics allow it to operate normally. Antenna efficiency can refer to the antenna's ability to convert input power into radiated power.
[0069] Transmit antenna switching (TAS) performed in an electronic device may refer to the electronic device replacing an antenna to be used so that the electronic device can use an antenna in a better condition for communication.
[0070] In some implementations, an electronic device may determine the timing of antenna tuning and antenna switching based on the smoothed reference signal received power (RSRP). RSRP measures the strength of the signal received by the electronic device. The unit of RSRP may be decibel relative to one milliwatt (dBm).
[0071] The RSRP of an electronic device changes due to changes in factors such as the environment in which the electronic device is located, the transmission power of the base station and the network load and / or user behavior.
[0072] The signal strength icon displayed by the electronic device changes with the change of RSRP. The signal strength icon is used to help users understand the stability and reliability of the network. Figure 1 .
[0073] For example, taking the electronic device as a mobile phone, Figure 1 This is a desktop diagram of a mobile phone provided in an embodiment of the present application. Figure 1 As shown, after the phone is started, it can display Figure 1 Mobile phone desktop 100. Figure 1As shown, the mobile phone desktop 100 may include a signal strength icon 101, a smart life application icon, a setting application icon, a recorder application icon, a browser application icon, a camera application icon, an address book application icon, a phone application icon, a message application icon, a time application, a weather application, etc.
[0074] When the RSRP of the antenna used by the mobile phone changes frequently, the signal strength icon 101 displayed on the mobile phone desktop 100 also changes frequently. The frequent changes of the signal strength icon 101 based on the mobile phone make the user experience poor.
[0075] Therefore, to reduce the frequency of changes in the signal strength icon, electronic devices can smooth the RSRP. However, RSRP smoothing can easily cause the RSRP corresponding to the moment the antenna status anomaly occurs to be smoothed or balanced by the RSRP corresponding to the moment the antenna status anomaly occurs. This results in the smoothed RSRP corresponding to the moment the antenna status anomaly occurs (i.e., the smoothed RSRP) not entering the range requiring antenna tuning or switching. Therefore, when the antenna status anomaly occurs, the electronic device does not perform antenna tuning or switching. It only performs antenna tuning or switching when the smoothed RSRP enters the range requiring antenna tuning or switching. However, the time when the smoothed RSRP enters the range requiring antenna tuning or switching lags behind the moment the RSRP anomaly occurs. Therefore, RSRP smoothing introduces hysteresis in antenna tuning and switching in the electronic device. The antenna anomaly may include a shift in the antenna's resonant frequency, where the shifted resonant frequency is outside a preset range.
[0076] Below, reference Figure 2 The hysteresis of antenna tuning is described. For example, Figure 2 A schematic diagram of a downlink log of an electronic device provided in an embodiment of the present application.
[0077] like Figure 2 As shown in the figure, at 02:47:56.402, the downlink modulation and coding scheme (MCS) level dropped rapidly. However, the smoothed RSRP of antenna I (i.e. Figure 2 RSRP1) and the smoothed RSRP of antenna II (i.e. Figure 2The RSRP2 in the figure did not immediately drop to the range requiring antenna tuning for the electronic device. Instead, it did not drop to the range requiring antenna tuning until 02:48:01.800. This means that the electronic device only began antenna tuning at 02:48:01.800, a delay of approximately five seconds. During these five seconds and before antenna tuning was successful, the electronic device communicated at a low downlink MCS level, resulting in poor communication quality. The MCS level defines the maximum data transmission rate of an electronic device and reflects the base station's assessment of the mobile phone's communication quality.
[0078] Below, reference Figure 2 and Figure 3 The hysteresis of antenna switching is described. For example, Figure 3 A schematic diagram of an uplink log of an electronic device provided in an embodiment of the present application.
[0079] like Figure 2 As shown, before 02:48:45.907 seconds, of the two antennas, antenna I and antenna II, the smoothed RSRP of antenna I (i.e. Figure 2 Therefore, before 02:48:45.907, the electronic device uses antenna Ⅰ for communication. Figure 3 As shown in the figure, at 02:48:45.907, the uplink MCS level dropped rapidly. Figure 2 As shown in Figure 1, the smoothed RSRP of antenna I does not immediately drop to a level lower than that of antenna II (i.e. Figure 2 The RSRP of the electronic device is less than the smoothed RSRP of antenna II at 02:48:51.000. In other words, the electronic device performs the uplink TAS at 02:48:51.000, which is about 5 seconds late. The electronic device switches the antenna used by the electronic device from antenna I to antenna II through this uplink TAS. Figure 2 As shown, at 02:48:52:000, antenna switching was complete. However, at and after 02:48:52:000, the smoothed RSRP of antenna I had recovered to be greater than that of antenna II, meaning that antenna I had the highest smoothed RSRP of the two antennas. Therefore, at and after 02:48:52:000, the antenna used by the electronic device was not the best antenna. Therefore, from the time the uplink MCS level dropped rapidly until the antenna switched back to the antenna with the highest smoothed RSRP, the electronic device was not communicating using the best antenna, resulting in poor communication quality.
[0080] In view of this, embodiments of the present application provide an antenna adjustment method. In this method, when the absolute value of the difference between the actual value of the cellular indicator and the predicted value of the cellular indicator is greater than or equal to a preset threshold, the electronic device may adjust the antenna (e.g., the electronic device may tune the antenna and / or the electronic device may switch the antenna).
[0081] Among them, cellular indicators may include a series of parameters used to evaluate the performance and quality of cellular mobile communication systems. Exemplarily, cellular indicators may include RSRP, MCS level, signal-to-noise ratio (SNR) and / or other key indicators. Other key indicators may include, for example: block error rate (BLER), physical uplink control channel path loss (PUCCH pathloss), physical uplink control channel transmit power (PUCCH TX power), resource block number (RB num), channel quality indicator (CQI) and / or received signal strength indication (RSSI) and other parameters.
[0082] The predicted value of the cellular index in the embodiment of the present application is predicted by the electronic device based on the actual value of the cellular index. Then, the electronic device judges the actual value of the cellular index and the predicted value of the cellular index. When the absolute value of the difference between the actual value of the cellular index and the predicted value of the cellular index is greater than or equal to a preset threshold, the electronic device adjusts the antenna. In this way, the electronic device can adjust the antenna in a timely manner when the actual value of the cellular index is abnormal, alleviating the lag of the antenna adjustment, thereby reducing the time it takes for the electronic device to communicate through the antenna under abnormal cellular indicators. Since the communication quality of the electronic device is poor when communicating through the antenna under abnormal cellular indicators, reducing the time it takes for the electronic device to communicate through the antenna under abnormal cellular indicators can improve the overall communication quality of the electronic device.
[0083] RSRP can be used to measure the total signal strength received by an electronic device. A higher RSRP value indicates a stronger signal received by the electronic device. RSRP represents the sum of the strengths of all signals received by an antenna.
[0084] The MCS level can be used to limit the maximum data transmission rate of an electronic device. A higher MCS level indicates a higher maximum data transmission rate. The MCS level can be determined by the base station based on parameters such as CQI and BLER. For example, the uplink MCS level can be determined by the base station based on parameters such as the uplink CQI and BLER. The downlink MCS level can also be determined by the base station based on parameters such as the downlink CQI and BLER. The CQI indicates the channel quality of a link. The BLER refers to the proportion of data blocks that cannot be correctly decoded by the receiver during data transmission. After determining the MCS level based on parameters such as CQI and BLER, the base station sends it to the mobile phone. The MCS level reflects the base station's assessment of the mobile phone's communication quality. For example, when the mobile phone's communication quality is poor, the base station selects a lower MCS level and sends it to the mobile phone, resulting in a lower maximum data transmission rate. When the mobile phone's communication quality is good, the base station selects a higher MCS level and sends it to the mobile phone, resulting in a higher maximum data transmission rate.
[0085] SNR is the ratio of useful signal power to noise power. It indicates the quality of a signal transmitted in the presence of noise. A higher SNR indicates less noise mixed in with the signal, and thus better signal transmission quality.
[0086] As a possible implementation, the electronic device may call an antenna prediction model (also referred to as a first prediction model) to predict a predicted value of a cellular indicator.
[0087] As a possible implementation, the electronic device may invoke the antenna prediction model to obtain a comparison result of an absolute value of a difference between an actual value of a cellular indicator output by the antenna prediction model and a predicted value of the cellular indicator with a preset threshold. The comparison result may include that the absolute value of the difference between the actual value of the cellular indicator and the predicted value of the cellular indicator is greater than or equal to the preset threshold, or that the absolute value of the difference between the actual value of the cellular indicator and the predicted value of the cellular indicator is less than the preset threshold.
[0088] The preset threshold may be obtained during the process of training the antenna prediction model. The training process of the antenna prediction model will be described in detail later and will not be described here.
[0089] As a possible implementation, the electronic device adjusting the antenna state may include: the electronic device invoking an antenna tuning model (also referred to as a second prediction model) to predict an antenna state number. The electronic device may then modify a usage state parameter (also referred to as a first preset parameter) to the antenna state number predicted by the antenna tuning model and / or modify the usage antenna parameter to the antenna number indicated by the antenna state number.
[0090] The usage state parameter may be used to indicate the current antenna state of the antenna used by the electronic device (the current antenna state may also be referred to as the current state). For example, when the value of the usage state parameter is state1, it indicates that the current state of the antenna used by the electronic device is the antenna state corresponding to antenna state number state1.
[0091] The antenna parameter used can be used to indicate the antenna number of the antenna currently used by the mobile phone. For example, when the value of the antenna parameter used is 1, it means that the antenna currently used by the electronic device is the antenna corresponding to antenna number 1.
[0092] For example, the electronic device in the embodiments of the present application may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), an augmented reality (AR) or virtual reality (VR) device, or other device with a display function. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.
[0093] The following will take the electronic device being a mobile phone as an example to further introduce the technical solution provided by the embodiment of the present application. It should be understood that the embodiment of the present application does not impose any limitation on the product form of the electronic device.
[0094] Figure 4 This is a hardware structure diagram of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device may include a processor 410, an external memory interface 420, an internal memory 421, a universal serial bus (USB) interface 430, a charging management module 440, a power management module 441, a battery 442, an antenna 1, a mobile communication module 450, and a display screen 460. It will be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components, or combine certain components, or split certain components, or arrange the components differently. The components in the above examples can be implemented in hardware, software, or a combination of software and hardware.
[0095] The processor 410 may include one or more processing units, for example, a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors 410.
[0096] The processor 410 can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and execution.
[0097] Processor 410 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 410 may be a cache memory. This memory can store instructions or data that have been used or are frequently used by processor 410. When processor 410 needs to use the instruction or data, it can directly access it from this memory. This avoids duplicate accesses, reduces the waiting time of processor 410, and thus improves system efficiency.
[0098] The wireless communication function of the electronic device can be implemented through the antenna 1, the mobile communication module 450, the modem processor and the baseband processor.
[0099] Antenna 1 is used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0100] Mobile communication module 450 can provide wireless communication solutions for electronic devices, including 2G / 3G / 4G / 5G / 6G. Mobile communication module 450 may include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc. Mobile communication module 450 can receive electromagnetic waves from antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modem processor for demodulation. Mobile communication module 450 can also amplify the signals modulated by the modem processor and convert them into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some of the functional modules of mobile communication module 450 may be located in processor 410. In some embodiments, at least some of the functional modules of mobile communication module 450 may be located in the same device as at least some of the modules of processor 410.
[0101] 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 processing by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs audio signals through an audio device (not limited to a speaker, receiver, etc.) or displays images or videos on the display screen 460. In some embodiments, the modem processor may be a standalone device. In other embodiments, the modem processor may be independent of the processor 410 and be located in the same device as the mobile communication module 450 or other functional modules.
[0102] In some embodiments, the antenna 1 of the electronic device is coupled to the mobile communication module 450, so that the electronic device can communicate with a network and other electronic devices via wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), Bluetooth, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite-based augmentation system (SBAS).
[0103] As a possible implementation, the antenna adjustment method provided in the embodiment of the present application can be executed in a modem processor. Exemplarily, in the antenna adjustment method provided in the embodiment of the present application, the electronic device can use the modem processor to determine the difference between the actual value of the cellular indicator and the predicted value of the cellular indicator. When it is determined that the absolute value of the difference between the actual value of the cellular indicator and the predicted value of the cellular indicator is greater than or equal to a preset threshold, the electronic device can use the modem processor to perform antenna adjustment. The cellular indicator can include reference signal received power, modulation and coding scheme level, and / or signal-to-noise ratio.
[0104] In an embodiment of the present application, when the absolute value of the difference between the actual value of the cellular indicator and the predicted value of the cellular indicator is greater than or equal to a preset threshold, the electronic device determines that an abnormality has occurred in the actual value of the cellular indicator. That is, the electronic device can adjust the antenna when an abnormality has occurred in the actual value of the cellular indicator, so that the timing of the antenna adjustment is closer to the time when the abnormality occurred in the actual value of the cellular indicator, thereby reducing the duration of communication of the electronic device through the antenna under abnormal cellular indicators. Since the communication quality of the electronic device is poor when communicating through the antenna under abnormal cellular indicators, reducing the duration of communication of the electronic device through the antenna under abnormal cellular indicators can improve the overall communication quality of the electronic device.
[0105] As another possible implementation, the electronic device may further include a system on chip (SOC). The antenna adjustment method provided in the embodiment of the present application may also be executed in the SOC of the electronic device.
[0106] As another possible implementation, the electronic device may further include another chip or chip system with simple data processing capabilities, and the antenna adjustment method provided in the embodiments of the present application may also be executed in the chip or chip system with simple data processing capabilities. The chip with data processing capabilities may, for example, be a radio frequency enhancement chip.
[0107] The electronic device can implement display functions using a GPU, display screen 460, and an application processor. A GPU is a microprocessor for image processing that connects display screen 460 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 410 may include one or more GPUs that execute program instructions to generate or modify display information.
[0108] As a possible implementation, adjusting the antenna may include tuning the antenna currently being used by the electronic device and / or switching the antenna used by the electronic device.
[0109] Optionally, the electronic device may further include a tuning circuit, which includes a tuning component (such as a resistor, capacitor, and / or inductor) and a switch for connecting or disconnecting the tuning component. The electronic device may be configured to control the connection or disconnection of the tuning component based on a control strategy corresponding to the usage state parameter, thereby tuning the antenna currently in use by the electronic device.
[0110] Exemplarily, the electronic device can control the switch for connecting or disconnecting the tuning component in the tuning circuit by using a control strategy corresponding to the state parameter, thereby controlling the connection or disconnection of the tuning component to switch the antenna state of the antenna being used by the electronic device to the antenna state indicated by the state parameter.
[0111] Optionally, the electronic device may further include an antenna switching circuit. The electronic device may include multiple antennas. The antenna switching circuit may be used to switch the antenna used by the electronic device.
[0112] For example, the electronic device may switch the antenna used by the electronic device to the antenna indicated by the antenna parameters through the antenna switching circuit.
[0113] The technical solution provided in the embodiment of the present application can be applied to the above Figure 4 The hardware structure of the electronic device is shown.
[0114] Next, the software architecture of the electronic device is further introduced.
[0115] Figure 5 This is a schematic diagram of the software architecture of an electronic device provided in an embodiment of the present application. The software system of an electronic device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. This embodiment of the present application uses the layered Android™ system as an example to illustrate the software architecture of a mobile phone.
[0116] like Figure 5 As shown, the layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, the Android™ system is divided into at least three layers: the application layer, the application framework layer, and the kernel layer, from top to bottom.
[0117] The application layer may include a series of application packages, such as phone, email, calendar, camera, gallery, map, music, navigation, WLAN, Bluetooth, and video applications.
[0118] Among them, the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, an activity manager, an input manager, and the like.
[0119] The window manager provides window management services (WMS). WMS can be used for window management, window animation management, surface management, and as a transfer station for the input system.
[0120] Content providers are used to store and retrieve data and make it accessible to applications. This data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0121] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0122] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0123] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0124] The activity manager can provide activity management services (AMS), which can be used to start, switch, and schedule system components (such as activities, services, content providers, and broadcast receivers) as well as manage and schedule application processes.
[0125] The input manager provides input management services (IMS), which can be used to manage system input, such as touch screen input, key input, and sensor input. The IMS retrieves events from input device nodes and, through interaction with the WMS, distributes the events to the appropriate window.
[0126] The kernel layer is the layer between hardware and software. The kernel layer includes at least the display driver, video driver, Bluetooth driver, Wi-Fi driver, and modem processor driver.
[0127] It should be noted that the modem processor performs modulation and demodulation based on the protocol specified by the supported communication technology. The protocol specified by the communication technology in the embodiment of the present application can also be called a communication protocol. The communication protocol stack is the sum of the communication protocols at each layer. For example, see Figure 6 , Figure 6 A communication protocol stack diagram of a modem processor provided in an embodiment of the present application. Figure 6As shown, the communication protocol stack of the modem processor can be divided into a control plane and a user plane. The control plane is used to transmit control signaling and mainly includes the non-access stratum (NAS) layer, the radio resource control (RRC) layer, the service data adaptation protocol (SDAP) layer, the packet data convergence protocol (PDCP) layer, the radio link control (RLC) layer, the media access control (MAC) layer, and the physical (PHY) layer. The user plane is used to transmit data information and mainly includes the SDAP layer, the PDCP layer, the RLC layer, the MAC layer, and the PHY layer. It should be understood that under different communication technologies, the division of the protocol layers of the control plane and the user plane can be different or the same. Among them, the RRC layer, SDAP layer, PDCP layer, RLC layer, MAC layer, and PHY layer all belong to the access stratum (AS) layer. In the embodiments of the present application, RSRP and SNR are parameters of the PHY layer, and the MCS level is a parameter of the MAC layer.
[0128] The antenna adjustment method provided in the embodiment of the present application can be implemented in a mobile phone having the above-mentioned hardware structure and software structure.
[0129] The following describes the workflow of mobile phone software and hardware by taking the cellular indicators including RSRP, SNR and / or MCS level as an example, in combination with the scenario of interaction between mobile phone and base station.
[0130] After the mobile phone is powered on, the acquisition unit in the modem processor obtains the actual RSRP value, the actual SNR value from the PHY layer, and / or the actual MCS level value from the MAC layer. The processing unit in the modem processor then inputs the actual SNR value and / or the actual MCS level value into the antenna prediction model and obtains the RSRP prediction value output by the antenna prediction model.
[0131] And / or, the processing unit in the modem processor inputs the actual RSRP value and / or the actual MCS level value into the antenna prediction model, and obtains the SNR prediction value output by the antenna prediction model.
[0132] And / or, the processing unit in the modem processor inputs the actual MCS level value and / or the actual SNR value into the antenna prediction model, and obtains the MCS level prediction value output by the antenna prediction model.
[0133] Afterwards, when the absolute value of the difference between the actual RSRP value and the predicted RSRP value is greater than or equal to the first preset threshold, the absolute value of the difference between the actual SNR value and the predicted SNR value is greater than or equal to the second preset threshold, and / or the absolute value of the difference between the actual MCS level value and the predicted MCS level value is greater than or equal to the third preset threshold, the adjustment unit of the modem processor performs antenna adjustment.
[0134] The following describes the reasons why RSRP, MCS level and / or SNR in the cellular indicators are selected to determine whether the antenna needs to be adjusted in the embodiment of the present application.
[0135] Regarding RSRP: When the antenna efficiency deteriorates, the total signal strength received by the antenna will become smaller, thereby reducing the RSRP of the antenna. In other words, the change in the RSRP of the antenna can reflect the change in the antenna efficiency. When the change in the RSRP of the antenna reflects the deterioration of the antenna efficiency, it indicates that the antenna needs to be adjusted. Therefore, the embodiment of the present application selects the RSRP of the antenna to determine whether the antenna needs to be adjusted. When the antenna state is normal, that is, the antenna efficiency is within the allowable range, the difference between the actual RSRP value of the antenna and the predicted RSRP value of the antenna is small, and even the actual RSRP value of the antenna and the predicted RSRP value of the antenna can be equal. Therefore, when the absolute value of the difference between the actual RSRP value of the antenna and the predicted RSRP value of the antenna is greater than the first preset threshold, the mobile phone can determine that the antenna state is abnormal and the antenna needs to be adjusted.
[0136] Regarding SNR: SNR is the ratio of useful signal power to noise power. When the antenna is in good condition, the useful signal power received by the antenna is high and the noise power is relatively low, so the SNR is high. On the contrary, if the antenna is in an abnormal state, the received useful signal power may decrease, while the noise power may remain unchanged or increase relatively, resulting in a decrease in SNR. That is to say, when SNR can reflect the antenna state. Therefore, the embodiment of the present application selects the SNR of the antenna to determine whether antenna adjustment is required. When the antenna is in normal condition, the difference between the actual SNR value of the antenna and the predicted SNR value of the antenna is small, and even the actual SNR value of the antenna and the predicted SNR value of the antenna may be equal. Therefore, when the absolute value of the difference between the actual SNR value of the antenna and the predicted SNR value of the antenna is greater than the second preset threshold, the mobile phone can determine that the antenna state is abnormal and the antenna needs to be adjusted.
[0137] Regarding the MCS level: After a mobile phone interacts with a base station, the base station can issue an MCS level to the mobile phone based on its assessment of the mobile phone's communication quality. When the mobile phone's communication quality is poor, the base station selects a lower MCS level and issues it to the mobile phone, reducing the maximum data transmission rate it can achieve. When the mobile phone's communication quality is good, the base station selects a higher MCS level and issues it to the mobile phone, increasing the maximum data transmission rate it can achieve. When the mobile phone's antenna is in abnormal condition, the communication quality is poor. Therefore, the base station selects a lower MCS level and issues it to the mobile phone. In other words, the mobile phone's MCS level reflects the mobile phone's communication quality and, by extension, the antenna condition of the mobile phone's antenna. When the MCS level indicates an abnormal antenna condition, it indicates that antenna adjustment is necessary. Therefore, in this embodiment, the mobile phone's MCS level is used to determine whether antenna adjustment is necessary. When the antenna condition is normal, the actual MCS level and the predicted MCS level may be identical. Therefore, when the absolute value of the difference between the actual MCS level and the predicted MCS level exceeds a third preset threshold, the mobile phone can determine that the antenna condition is abnormal and antenna adjustment is necessary.
[0138] Optionally, the mobile phone may determine whether the antenna needs to be adjusted based on RSRP, MCS level, SNR and / or other indicators similar to RSRP, MCS level and SNR that affect the communication quality of the mobile phone (such as other key indicators mentioned above).
[0139] In the embodiments of the present application, cellular metrics such as RSRP, MCS level, SNR, and other key indicators can, to a certain extent, reflect the communication environment of the mobile phone. The communication environment is relatively stable at any given time. Therefore, the mobile phone can use multiple cellular metrics to characterize the communication environment. These multiple cellular metrics representing the communication environment can then be used to predict other types of cellular metrics.
[0140] For example, the mobile phone may characterize the communication environment by MCS level, SNR and / or other key indicators. Then, the mobile phone may predict the RSRP in the communication environment based on the MCS level, SNR and / or other key indicators characterizing the communication environment.
[0141] Alternatively, the mobile phone may characterize the communication environment by RSRP, SNR and / or other key indicators. Then, the mobile phone may predict the MCS level in the communication environment based on the RSRP, SNR and / or other key indicators characterizing the communication environment.
[0142] Alternatively, the mobile phone may characterize the communication environment by RSRP, MCS level and / or other key indicators. Then, the mobile phone may predict the SNR in the communication environment based on the RSRP, MCS level and / or other key indicators that characterize the communication environment.
[0143] Other key indicators such as BLER, PUCCH path loss, PUCCH TX power, RB num, CQI or RSSI can also be predicted through a process similar to the above-mentioned prediction process of RSRP, RSRP or SNR.
[0144] In an embodiment of the present application, the electronic device performs antenna adjustment when the absolute value of the difference between the actual value of the cellular indicator and the predicted value of the cellular indicator is greater than or equal to a preset threshold. This allows the electronic device to perform antenna adjustment even when the actual value of the cellular indicator is abnormal, alleviating the hysteresis of antenna tuning. This improves the overall communication quality of the electronic device.
[0145] As a possible implementation, the predicted value of the cellular index can be obtained by prediction using the antenna prediction model provided in the embodiment of the present application.
[0146] Below, before introducing the antenna adjustment method provided in the embodiment of the present application, the antenna prediction model provided in the embodiment of the present application is first introduced.
[0147] In an embodiment of the present application, the training device can use the first training data set to train the initial prediction model. After the training end conditions are met (such as the loss function converges, or when the loss function does not converge, the number of training times reaches a preset number), the training device completes the training process of the initial prediction model and obtains the antenna prediction model.
[0148] The training device may be a terminal or other computing device, such as a server or cloud device. For example, the training device may be a graphics processing unit (GPU), a neural network processing unit (NPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
[0149] For example, Figure 7 This is a schematic diagram of the architecture of an initial prediction model provided in an embodiment of the present application. Figure 7 As shown, the architecture of the initial prediction model may include an input layer, an output layer, and M hidden layers. The input layer may include N neurons, and each hidden layer may also include multiple neurons. Both M and N may be integers greater than or equal to 1.
[0150] For ease of description, the following embodiments are described using M as 3 as an example. In this case, the architecture of the initial prediction model may include a first hidden layer, a second hidden layer, and a third hidden layer. N may be greater than or equal to the number of input parameters in the embodiments of the present application. The input parameters may include, for example, RSRP, MCS level, SNR, and / or other key indicators.
[0151] Exemplarily, the first neuron in the input layer is connected to the second neuron in the first hidden layer based on weight A, and the first neuron in the input layer is connected to the third neuron in the first hidden layer based on weight B. The first neuron is any neuron in the input layer, and the second and third neurons are any two neurons in the first hidden layer. Weight A is the connection weight between the first neuron and the second neuron, and weight B is the connection weight between the first neuron and the third neuron.
[0152] Similar to the connection between the input layer and the first hidden layer, the second neuron in the first hidden layer is connected to the fourth neuron in the second hidden layer using weight C, and the second neuron in the first hidden layer is connected to the fifth neuron in the second hidden layer using weight D. The fourth and fifth neurons are any two neurons in the second hidden layer. Weight C is the connection weight between the second and fourth neurons, and weight D is the connection weight between the second and fifth neurons.
[0153] Similar to the connection between the first and second hidden layers, the fourth neuron in the second hidden layer is connected to the sixth neuron in the third hidden layer using weight E, and the fourth neuron in the second hidden layer is connected to the seventh neuron in the third hidden layer using weight F. The sixth and seventh neurons are any two neurons in the third hidden layer. Weight E is the connection weight between the fourth and sixth neurons, and weight F is the connection weight between the fourth and seventh neurons.
[0154] Each hidden layer is connected to the output layer. For example, the first hidden layer, the second hidden layer, and the third hidden layer are connected to the output layer respectively.
[0155] After introducing the connection relationship between the input layer, output layer and hidden layer in the architecture of the initial prediction model, the input layer, output layer and hidden layer are introduced below.
[0156] The neurons in the input layer are used to receive input data. Different neurons in the input layer receive different input data.
[0157] The neurons in the input layer are further configured to transmit input data to the neurons in the first hidden layer based on corresponding connection weights. For example, the first neuron in the input layer transmits input data received by the first neuron to the second neuron in the first hidden layer based on weight A, and the first neuron in the input layer transmits input data received by the first neuron to the third neuron in the first hidden layer based on weight B.
[0158] The neurons in the hidden layer calculate the neuron input based on the connection weights and activation functions. This calculation process can be called the neuron conversion process.
[0159] Among them, the activation function can be a sigmoid function, a tanh function or a relu function. For example, the sigmoid function can be or Etc. The activation functions of different hidden layers can be different.
[0160] Wherein, a is a weight coefficient, for example, the weight coefficient may be 1.
[0161] For example, when the activation function is , and when a is 1, the curve of the activation function can be seen in Figure 8 . Figure 8 A curve diagram of an activation function provided in an embodiment of the present application Figure 1 .
[0162] For example, when the activation function is , and when a is 1, the curve of the activation function can be seen in Figure 9 . Figure 9 A curve diagram of an activation function provided in an embodiment of the present application Figure 2 .
[0163] The neuron input can be the input data transmitted by the input layer, or the output of the neuron in the previous hidden layer. For example, the structure of any neuron in any hidden layer can be found in Figure 10 . Figure 10 A schematic diagram of a neuron structure provided in an embodiment of the present application.
[0164] like Figure 10 As shown in the figure, a neuron receives inputs and performs a weighted summation of each input based on the corresponding connection weights wi (i = 1, 2, ..., N). The neuron then compares the weighted summation with the activation function threshold. If the weighted summation is less than or equal to the activation function threshold, the neuron is activated and outputs the neuron.
[0165] For any hidden layer, the hidden layer obtains the output result of the hidden layer by aggregating the outputs of each neuron in the hidden layer.
[0166] Exemplarily, the hidden layer may perform aggregation processing on the outputs of the neurons of the hidden layer through a single matrix multiplication or multiple matrix multiplications.
[0167] The output of each hidden layer is sent to the output layer, which receives the output of each hidden layer. The output layer then performs operations on the output of each hidden layer to produce the output of the output layer. The output of the output layer is the mean, root mean square (RMS), or weighted average of the outputs of each hidden layer.
[0168] Optionally, when the trained antenna prediction model is used to predict antenna numbers, the output layer of the initial prediction model may include a first storage module, a first calculation module, a first judgment module, and a first output module. The first storage module can be used to store the antenna number prediction results output by each hidden layer during the training process; the first calculation module can be used to calculate the antenna switching threshold based on each antenna number prediction result; the first judgment module can be used to compare the antenna number prediction results output by each hidden layer with the antenna switching threshold to obtain a first comparison result; and the first output module can be used to output the antenna number prediction value based on the first comparison result. The antenna number can be used to identify different antennas. For example, the antenna number can be the antenna serial number. The antenna switching threshold is the critical value at which the mobile phone switches the antenna number.
[0169] After introducing the architecture of the initial prediction model, the first training data set and the method for obtaining the first training data set are introduced below.
[0170] As a possible implementation, the training device may use the first training data set to train the initial prediction model, and after the training end condition is met, the training device obtains the antenna prediction model.
[0171] In an embodiment of the present application, a data acquisition device can acquire first data and perform preprocessing during a user or developer's use of a mobile phone to obtain a first training data set. The preprocessing can include missing value processing, outlier processing, and data deduplication. The data acquisition device can be similar in form to the aforementioned training device and will not be further described here.
[0172] It should be noted that the first data may include parameters such as MCS level, SNR, antenna number and / or other key indicators in the uplink log file, and / or the first data may include parameters such as RSRP, MCS level, SNR, antenna number and / or other key indicators in the downlink log file.
[0173] Among them, other key indicators may include, for example: BLER, PUCCH path loss, PUCCH TX power, RBnum, CQI and / or RSSI, etc.
[0174] When the first data is parameters collected from an uplink log file, the data collection device preprocesses the first data to obtain a first training data set. A subsequent training device uses the first training data set to train an initial prediction model to obtain an antenna prediction model, which can be used to predict an uplink MCS level, an uplink SNR, and / or other uplink key indicators.
[0175] When the first data is parameters collected from a downlink log file, the data collection device preprocesses the first data to obtain a first training data set. A subsequent training device uses the first training data set to train an initial prediction model to obtain an antenna prediction model, which can be used to predict downlink RSRP, downlink MCS level, downlink SNR, and / or other downlink key indicators.
[0176] In the case where the first data includes parameters collected from the uplink log file and parameters collected from the downlink log file, the data acquisition device pre-processes the first data to obtain a first training data set. The antenna prediction model obtained by the subsequent training device using the first training data set to train the initial prediction model can be used to predict the uplink MCS level, uplink SNR and / or other uplink key indicators, etc., and can also be used to predict the downlink RSRP, downlink MCS level, downlink SNR and / or other downlink key indicators, etc. The predicted value output by the antenna prediction model can carry uplink attribute information or downlink attribute information. For example, when the MCS level output by the antenna prediction model carries uplink attribute information, it indicates that the MCS level is an uplink MCS level.
[0177] For example, when the absolute value of the difference between the uplink MCS level prediction value output by the antenna prediction model and the corresponding uplink MCS level actual value is greater than or equal to the third preset threshold, the mobile phone can determine that the uplink antenna needs to be tuned.
[0178] Optionally, the preprocessing may further include performing mean processing on the first data within a preset time period.
[0179] In this embodiment of the present application, the first training data set may include at least one first data sample (also referred to as first training data). Each first data sample may include an RSRP sample, an MCS level sample, an SNR sample, an antenna number sample, and / or other key indicator samples corresponding to the same time period. Different first data samples may correspond to different time periods.
[0180] Among them, other key indicator samples may include, for example, BLER samples, PUCCH path loss samples, PUCCH TX power samples, RB num samples, CQI samples and / or RSSI samples, etc.
[0181] Among them, the RSRP sample in any first data sample can be understood as: the data obtained after the training device performs mean processing on the RSRP within the time period T at the acquisition moment; the MCS level sample in the first data sample can be understood as: the data obtained after the training device performs mean processing on the MCS level within the time period T at the acquisition moment; the SNR sample in the first data sample can be understood as: the data obtained after the training device performs mean processing on the SNR within the time period T at the acquisition moment; the antenna number sample in the first data sample can be understood as: the antenna number within the time period T at the acquisition moment.
[0182] Among them, the RSRP sample can be used to measure the strength of the signal received by the mobile phone, the MCS level sample can be used to limit the maximum data transmission rate of the mobile phone, and the SNR sample is the ratio of useful signal power to noise power.
[0183] In the embodiment of the present application, the first training dataset not only considers the cellular indicators corresponding to each moment, but also reduces the number of samples in the first training dataset through averaging. Therefore, the training device can balance model training efficiency and the trained antenna prediction model with good model generalization ability by training with the first training dataset in the embodiment of the present application.
[0184] In other possible implementations, each first data sample may also include an RSRP sample, an MCS level sample, an SNR sample, and / or other key indicator samples corresponding to the same moment. Different first data samples may correspond to different moments.
[0185] After introducing the first training data set, the following describes a process of training the initial prediction model using the first training data set.
[0186] In one possible embodiment, the training of the initial prediction model by the training device may include training for any one of RSRP, MCS level, SNR, antenna number or other key indicators, and the obtained antenna prediction model is used to predict any one of RSRP, MCS level, SNR, antenna number or other key indicators.
[0187] It is understood that when the trained antenna prediction model is used to train target parameters, target parameter samples can be used as labels for the first training data, and samples in the first data other than the target parameter samples can be used as features for the first training data. The target parameter can be any one of RSRP, MCS level, SNR, antenna number, or other key indicators.
[0188] The features of the first training data are used to input an initial prediction model during the training process. The labels of the first training data are used to calculate a loss function during the training process.
[0189] The following uses the trained antenna prediction model for predicting RSRP as an example (that is, the target parameter is RSRP as an example) to illustrate the training process.
[0190] For example, Figure 11 A schematic diagram of the training process of an antenna prediction model provided in an embodiment of the present application Figure 1 .like Figure 11 As shown, the process may include steps S1101 to S1104.
[0191] S1101: A training device obtains a first training data set, where the first training data set may include features of the first training data and labels of the first training data.
[0192] The label of the first training data is an RSRP sample, and the characteristics of the first training data may include at least one of an MCS level sample, an SNR sample, and other key indicator samples, or the characteristics of the first training data may include an antenna number sample.
[0193] It is understandable that the training device may use all the first training data included in the first training data set to train the initial prediction model, and the training device may also use part of the first training data included in the first training data set to train the initial prediction model.
[0194] S1102: The training device inputs the features of the first training data into an initial prediction model to obtain an initial training result.
[0195] Exemplarily, the initial training results may include a first initial training result, a second initial training result, and a third initial training result. The first initial training result is the output result of the first hidden layer, the second initial training result is the output result of the second hidden layer, and the third initial training result is the output result of the third hidden layer. The first initial training result, the second initial training result, and the third initial training result may each include at least one RSRP prediction result, at least one MCS level prediction result, at least one SNR prediction result, at least one antenna number prediction result, and / or at least one other key indicator prediction result. In the first initial training result, the second initial training result, or the third initial training result, the number of RSRP prediction results, the number of MCS level prediction results, the number of SNR prediction results, the number of antenna number prediction results, or the number of other key indicator prediction results may be the same as the number of groups of features of the first training data, and a group of features of the first training data corresponds to one first data sample.
[0196] The first initial training result can be understood as the result of aggregating the neuron outputs of each neuron in the first hidden layer. Aggregating the neuron outputs may, for example, involve the training device performing a single matrix multiplication operation or multiple matrix multiplication operations on the neuron outputs. The input to each neuron in the first hidden layer is the feature of the first training data transmitted by each neuron in the input layer.
[0197] The second initial training result can be understood as the result of the aggregation of the neuron outputs of each neuron in the second hidden layer. The input of each neuron in the second hidden layer is the neuron output of each neuron in the first hidden layer. Figure 7 The description in the corresponding embodiments will not be repeated here.
[0198] Similarly, the third initial training result can be understood as the result of the aggregation of the neuron outputs of each neuron in the third hidden layer. The input of each neuron in the third hidden layer is the neuron output of each neuron in the second hidden layer. Figure 7 The description in the corresponding embodiments will not be repeated here.
[0199] It is understood that each hidden layer corresponds to an initial training result. This embodiment of the application is illustratively described with three hidden layers, so the initial training results are three. This embodiment of the application does not limit the number of hidden layers, nor does it limit the number of initial training results.
[0200] S1103: The training device calculates a prediction loss function (also referred to as a first loss function) based on the first initial training result, the second initial training result, the third initial training result, and the label of the first training data.
[0201] In a possible implementation, the prediction loss function may include a first prediction loss function, a second prediction loss function, and a third prediction loss function. The first prediction loss function may be the sum of the first target differences, where the first target difference is the difference between any RSRP prediction result in the first initial training result and the RSRP sample in the corresponding first data sample. The second prediction loss function may be the sum of the second target differences, where the second target difference is the difference between any RSRP prediction result in the second initial training result and the RSRP sample in the corresponding first data sample. The third prediction loss function may be the sum of the third target differences, where the third target difference is the difference between any RSRP prediction result in the third initial training result and the RSRP sample in the corresponding first data sample.
[0202] For example, the correspondence between the RSRP sample in the first data sample, the RSRP prediction result in the first initial training result, the RSRP prediction result in the second initial training result, the RSRP prediction result in the third initial training result, and the target error can be shown in Table 1. The target error is the average of the first target difference, the second target difference, and the third target difference corresponding to the same time period.
[0203] Table 1
[0204]
[0205] For example, each target difference can be represented by an error matrix ERROR:
[0206] ERROR=err ij , i=1,2,...T, j=1,2,...M. err ij is the target difference of the jth hidden layer corresponding to the i-th time period after sorting the time periods from early to late. At this time, the first prediction loss function can be expressed as loss1=err 11 +err 21 +……+err T1 The second prediction loss function can be expressed as loss2=err 12 +err 22 +……+err T2 The third prediction loss function can be expressed as loss3=err 13 +err 23 +……+err T3 .
[0207] S1104: The training device iterates the model parameters of the initial prediction model based on the prediction loss function until the prediction loss function converges to obtain the antenna prediction model.
[0208] The prediction loss function converges when the first prediction loss function is less than or equal to a first preset value, the second prediction loss function is less than or equal to a second preset value, and the third prediction loss function is less than or equal to a third preset value. The first preset value, the second preset value, and the third preset value can be set according to actual scenarios and are not limited in this embodiment of the present application.
[0209] In other possible implementations, step S1104 can be replaced by: the training device iterates the model parameters of the initial prediction model based on the prediction loss function, and when the prediction loss function does not converge, when the training time reaches a first preset time, an antenna prediction model is obtained.
[0210] Among them, the first preset duration can be set according to the actual scenario, and the embodiment of the present application does not specifically limit the first preset duration.
[0211] In another possible implementation, step S1104 can be replaced by: the training device iterates the model parameters of the initial prediction model based on the prediction loss function, and when the prediction loss function does not converge, when the number of iterations reaches a first preset number, an antenna prediction model is obtained.
[0212] Among them, the first preset number of times can be set according to the actual scenario, and the embodiment of the present application does not specifically limit the first preset number of times.
[0213] In the embodiments of the present application, during the training of the initial prediction model to obtain the antenna prediction model, the training device considers the output results of each hidden layer, avoiding abnormal output results in extreme scenarios. Therefore, compared to only considering the output results of the last hidden layer (i.e., the hidden layer connected to the output layer), the antenna prediction model trained in the embodiments of the present application that considers the output results of each hidden layer has higher prediction accuracy.
[0214] In another possible implementation, the training of the initial prediction model by the training device may include: the training device performs training on any two or more indicators among RSRP, MCS level, SNR and other key indicators in sequence.
[0215] For example, the training process of the initial prediction model is described by taking the training device as an example to train RSRP, MCS level and SNR in sequence to obtain an antenna prediction model for predicting RSRP, MCS level and SNR. Figure 12 , Figure 12 A schematic diagram of the training process of an antenna prediction model provided in an embodiment of the present application Figure 2 .
[0216] S1201: A training device obtains a first training data set, where the first training data set may include features of the first training data and labels of the first training data. The training device uses RSRP samples as labels of the first training data, and uses samples in the first data sample other than the RSRP samples as features of the first training data.
[0217] S1202: The training device inputs the features of the first training data into the initial prediction model to obtain an initial training result for the RSRP sample.
[0218] Among them, the initial training result for the RSRP sample can be understood as the initial training result obtained after the training device inputs the characteristics of the first training data into the initial prediction model when the training device uses the RSRP sample as the label of the first training data and the training device uses the samples other than the RSRP sample in the first data sample as the characteristics of the first training data.
[0219] This step is similar or identical to the above step S1102 and will not be described in detail here. It is understood that the initial training results for the RSRP samples may include RSRP prediction results, MCS level prediction results, SNR prediction results, antenna number prediction results and / or other indicator prediction results.
[0220] S1203: The training device calculates an RSRP-prediction loss function according to the first initial training result, the second initial training result, the third initial training result, and the label of the first training data.
[0221] The RSRP-prediction loss function may be a prediction loss function calculated using RSRP samples as labels of the first training data. The calculation process of the RSRP-prediction loss function may be referred to the description of step S1103 above, and will not be repeated here.
[0222] S1204: The training device iterates the model parameters of the initial prediction model based on the RSRP-prediction loss function until the RSRP-prediction loss function converges, thereby obtaining the initial prediction model after the RSRP-prediction loss function converges.
[0223] The RSRP-prediction loss function convergence may be that the first prediction loss function for the RSRP sample is less than or equal to the first preset value for the RSRP sample, the second prediction loss function for the RSRP sample is less than or equal to the second preset value for the RSRP sample, and the third prediction loss function for the RSRP sample is less than or equal to the third preset value for the RSRP sample. The first preset value for the RSRP sample, the second preset value for the RSRP sample, and the third preset value for the RSRP sample can be set according to actual scenarios and are not limited in this embodiment of the present application.
[0224] S1205: The training device uses the MCS level samples in the first training data set as labels of the first training data, and the training device uses samples other than the MCS level samples in the first data set as features of the first training data.
[0225] S1206: The training device inputs the features of the first training data into the initial prediction model after the RSRP-prediction loss function converges, and obtains an initial training result for the MCS level sample.
[0226] This step is similar or identical to the above-mentioned step S1102 and will not be described again here.
[0227] It is understandable that the initial training results for the MCS level samples may include RSRP prediction results, MCS level prediction results, SNR prediction results, antenna number prediction results and / or other indicator prediction results.
[0228] S1207. The training device calculates an MCS level-prediction loss function based on the first initial training result, the second initial training result, the third initial training result, and the label of the first training data.
[0229] The MCS level-prediction loss function may be a prediction loss function calculated using the MCS level samples as labels of the first training data. The calculation process of the MCS level-prediction loss function is similar to that of step S1103 above and will not be repeated here.
[0230] S1208. The training device iterates the model parameters of the initial prediction model after the RSRP-prediction loss function converges based on the MCS level-prediction loss function until the MCS level-prediction loss function converges, thereby obtaining the initial prediction model after the MCS level-prediction loss function converges.
[0231] S1209: The training device uses the SNR samples in the first training data set as labels of the first training data, and the training device uses samples other than the SNR samples in the first data set as features of the first training data.
[0232] S1210. The training device inputs the features of the first training data into the initial prediction model after the MCS level-prediction loss function converges to obtain an initial training result for the SNR sample.
[0233] This step is similar or identical to the above-mentioned step S1102 and will not be described again here.
[0234] It is understandable that the initial training results for the SNR samples may include RSRP prediction results, MCS level prediction results, SNR prediction results, antenna number prediction results and / or other indicator prediction results.
[0235] S1211. The training device calculates an SNR-prediction loss function based on the first initial training result, the second initial training result, the third initial training result, and the label of the first training data.
[0236] The SNR-prediction loss function may be a prediction loss function calculated using the SNR sample as the label of the first training data. The calculation process of the SNR-prediction loss function is similar to that of step S1103 above and will not be repeated here.
[0237] S1212. The training device iterates the model parameters of the initial prediction model after the MCS level-prediction loss function converges based on the SNR-prediction loss function until the SNR-prediction loss function converges to obtain the antenna prediction model.
[0238] It is understandable that the above-mentioned process of training RSRP, MCS level and SNR in sequence is only an example. The embodiment of the present application does not specifically limit the training order of RSRP, MCS level and SNR.
[0239] In another possible implementation, in order to further reduce the data volume of the first training data set, the training of the initial prediction model by the training device may include: the training device may perform training on a joint indicator.
[0240] The joint indicator may be a value of a relational expression consisting of any two indicators, or a value of a relational expression consisting of more than two indicators. For example, the joint indicator may be a value of a relational expression consisting of any two or more indicators such as RSRP, MCS level, SNR, BLER, PUCCH path loss, PUCCH TX power, RB num, CQI, and RSSI. The value of the relational expression may be, for example, a weighted sum or product.
[0241] For example, the weighted sum of RSRP and SNR is used as the joint indicator. The joint indicator can be expressed as OB = α * RSRP + β * SNR. OB represents the joint indicator, α represents the preset weight of RSRP, and β represents the preset weight of SNR.
[0242] When the joint index is expressed as OB = α * RSRP + β * SNR, the training process of the training device for the joint index is similar to the above steps S1101 to S1104. The difference is that the joint index sample is used as the label of the first training data. The joint index sample can be expressed as OB样本 =α*RSRP sample +β*SNR sample. And in the process of training the training device for the joint index, the training device can obtain the prediction result OB corresponding to the joint index of the time period 输出 . And, the training equipment can be based on OB 输出 OB of this period 样本 Calculate the target difference corresponding to the time period.
[0243] Optionally, after obtaining the prediction result OB 输出 After that, the training device can also use the least squares method to calculate OB 输出 Calculation is performed to obtain RSRP prediction results and SNR prediction results.
[0244] After the training device trains the initial prediction model to obtain the antenna prediction model, the antenna prediction model can be deployed on the mobile phone. While the user is using the mobile phone, the mobile phone can input at least one of the collected parameters such as RSRP, MCS level, SNR, and other key indicators into the antenna prediction model. The mobile phone can also output the collected antenna number to the antenna prediction model to obtain the RSRP prediction value, MCS level prediction value, SNR prediction value, and / or other indicator prediction values output by the antenna prediction model.
[0245] As a possible implementation method, after the antenna prediction model is deployed in a mobile phone, the mobile phone can update the antenna prediction model when it is in an idle state.
[0246] For example, while a user is using a mobile phone (e.g., making a call, playing a game, watching a video, etc.), that is, when the mobile phone is in a non-idle state, the mobile phone can record multiple sets of first actual data (also referred to as first operating cellular indicators) of the antenna during the user's use. Each set of first actual data can include at least one of an actual RSRP value, an actual MCS level value, an actual SNR value, and actual values of other key indicators, or each set of first actual data can also include an actual antenna number value. Different sets of first actual data correspond to different time periods or different times. Furthermore, the mobile phone can also record the predicted data output by the antenna prediction model for each set of first actual data. The predicted data can include a predicted RSRP value, a predicted MCS level value, a predicted SNR value, a predicted antenna number value, and / or predicted values of other key indicators.
[0247] The mobile phone can then filter and preprocess the latest multiple sets of first actual data to obtain multiple sets of filtered and preprocessed first actual data. The mobile phone can then obtain a new first training data set based on the multiple sets of filtered and preprocessed first actual data and the first data samples in the first training data set used to train the initial prediction model.
[0248] Among them, the screening preprocessing may include removing the first actual data of the abnormal group, and the first actual data of the abnormal group meets the following conditions: the first actual data includes a first operating indicator and a second operating indicator, and the absolute value of the difference between the second operating indicator and the third operating indicator is greater than or equal to a preset threshold. Among them, the third operating indicator is predicted based on the first operating indicator or the first actual data, and the type of the third operating indicator is the same as the type of the second operating indicator. For example, the absolute value of the difference between the actual RSRP value and the RSRP predicted value in the corresponding predicted data is greater than or equal to the first preset threshold, the absolute value of the difference between the actual SNR value and the SNR predicted value in the corresponding predicted data is greater than or equal to the second preset threshold, or the absolute value of the difference between the actual MCS level value and the MCS level predicted value in the corresponding predicted data is greater than or equal to the third preset threshold.
[0249] In other words, the mobile phone obtains the first actual data when the absolute value of the difference between the second and third operating indicators is less than a preset threshold. The mobile phone then generates a new first training dataset based on the first actual data when the absolute value of the difference between the second and third operating indicators is less than the preset threshold, and the first data sample in the first training dataset used to train the initial prediction model.
[0250] In a possible implementation, multiple sets of first actual data collected by a mobile phone over a period of time may all be abnormal data due to some external reasons (for example, the mobile phone is soaked in water). In order to alleviate this abnormal scenario, the new first training data set may include data samples corresponding to the multiple sets of first actual data after screening and preprocessing, as well as the first data samples in the first training data set when training the initial prediction model. Moreover, the ratio of the number of the first data samples to the number of samples in the new first training data set is a preset ratio. The preset ratio can be set according to the actual scenario, and the embodiment of the present application does not make specific limitations on this. For example, the preset ratio can be 10%.
[0251] Afterward, when the phone is idle, it can train the antenna prediction model on a new first training dataset to obtain an updated antenna prediction model. This new first training dataset is obtained by preprocessing data collected by the phone based on the user's usage habits and the phone's communication environment. Therefore, with increasing updates, the updated antenna prediction model becomes more suitable for the user's usage habits and the phone's communication environment. As a result, the updated antenna prediction model achieves higher prediction accuracy, further improving the communication quality of the electronic device.
[0252] Among them, the process of the mobile phone training the above-mentioned antenna prediction model on the new first training data set is similar to or the same as the process of the above-mentioned training device training the initial prediction model, which will not be repeated here.
[0253] The mobile phone being in an idle state can be understood as meaning that the utilization rate of the mobile phone's central processing unit (CPU) is lower than a preset first utilization rate, the mobile phone's memory utilization is lower than a preset second utilization rate, the mobile phone's network traffic is lower than a preset value, the number of the mobile phone's network connections is less than a preset number, and / or the mobile phone enters a low-power mode or standby mode. The preset first utilization rate, preset second utilization rate, preset value, and preset number can be determined based on actual scenarios and are not specifically limited in the present embodiment.
[0254] As a possible implementation manner, the preset threshold in the embodiment of the present application may be obtained by training the initial prediction model by the training device to obtain the antenna prediction model.
[0255] In a possible implementation, when the trained antenna prediction model is used to predict RSRP, MCS level, SNR and / or other key indicators, during the training of the initial prediction model by the training device, the first storage module in the output layer can also be used to store the predicted values corresponding to each first data sample at each iteration. After the prediction loss function converges, the first calculation module can also be used to calculate the average value of the difference between the label of each first training data and the predicted value corresponding to each first data sample at the last iteration. The average value of the difference can be a preset threshold in the embodiment of the present application.
[0256] Among them, the prediction value corresponding to the first data sample can be: the average of the prediction results of the first hidden layer for the characteristics of the first training data, the prediction results of the second hidden layer for the characteristics of the first training data, and the prediction results of the third hidden layer for the characteristics of the first training data.
[0257] Exemplarily, when the trained antenna prediction model is used to predict RSRP, after the prediction loss function converges, the first calculation module can also be used to calculate the average value of the difference between each RSRP sample at the last iteration and the RSRP prediction value corresponding to each RSRP sample. The average value of the difference can be the first preset threshold in the embodiment of the present application.
[0258] It is understandable that when the mobile phone updates the antenna prediction model, the preset threshold value can also be updated synchronously. The updating process is similar to the process of obtaining the preset threshold value by the training device mentioned above, and will not be repeated here.
[0259] After training the antenna prediction model, the mobile phone can use it to predict parameters such as RSRP, MCS level, SNR, and / or other key indicators. The mobile phone can then use the predicted RSRP, MCS level, SNR, and / or other key indicators and the actual RSRP, MCS level, SNR, and / or other key indicators collected by the mobile phone to determine whether the antenna status is abnormal.
[0260] Next, the antenna adjustment method provided in the embodiment of the present application will be introduced with reference to the accompanying drawings.
[0261] As a possible implementation, the mobile phone may determine whether the antenna status is abnormal through RSRP, MCS level, SNR or any other key indicator.
[0262] The following uses an example of a mobile phone determining whether the antenna status is abnormal through RSRP.
[0263] For example, Figure 13 A schematic diagram of the process of an antenna adjustment method provided in an embodiment of the present application Figure 1 .like Figure 13 As shown, the method may include steps S1301 to S1304.
[0264] S1301. The collection unit obtains a first indicator (also called a first cellular indicator).
[0265] The first indicator may include: an actual value of the MCS level, an actual value of the SNR, an actual value of the RSRP, and / or actual values of other key indicators. Alternatively, the first indicator may also include an actual value of the antenna number.
[0266] Among them, the actual values of other key indicators may include, for example: an actual BLER value, an actual PUCCH path loss value, an actual PUCCH TX power value, an actual RB num value, an actual CQI value and / or an actual RSSI value, etc.
[0267] In a possible implementation, the mobile phone can obtain the latest actual value of the MCS level, actual value of the SNR, actual value of the RSRP and / or actual value of other key indicators in the time dimension from the MAC layer and / or the physical layer through the acquisition unit in the modem processor. The first indicator includes the latest actual value of the MCS level, actual value of the SNR, actual value of the RSRP and / or actual value of other key indicators in the time dimension.
[0268] S1302. The processing unit predicts a second indicator (also called a second cellular indicator).
[0269] The second indicator may include: MCS level prediction value, SNR prediction value, RSRP prediction value and / or other key indicator prediction values.
[0270] It is understood that, to improve prediction accuracy, the number of types of indicators in the first indicator may be greater than the number of types of indicators in the second indicator. For example, when the second indicator is the RSRP prediction value, the first indicator includes at least two indicators (the two indicators may be, for example, an MCS level prediction value and an SNR prediction value, or an MCS level prediction value and an RSRP prediction value, or an SNR prediction value and a BLER prediction value); when the second indicator is the RSRP prediction value and the SNR prediction value, the first indicator includes at least three indicators.
[0271] As a possible implementation, the processing unit may call the antenna prediction model to predict the second indicator. For example, the processing unit inputs the first indicator into the antenna prediction model and obtains the second indicator output by the antenna prediction model.
[0272] S1303. The processing unit determines whether the antenna status is normal.
[0273] As a possible implementation, the processing unit may determine whether the antenna status is normal based on the second indicator and the target value corresponding to the second indicator (also referred to as a third cellular indicator). For example, if the absolute value of the difference between the second indicator and the target value corresponding to the second indicator is greater than or equal to a preset threshold, the processing unit determines that the antenna status is abnormal; if the absolute value of the difference between the second indicator and the target value corresponding to the second indicator is less than the preset threshold, the processing unit determines that the antenna status is normal.
[0274] The target value corresponding to the second indicator can be understood as the target cellular indicator whose collection time is closest to the predicted time of the second indicator; alternatively, the target value corresponding to the second indicator can be understood as the target cellular indicator whose collection time is before the predicted time of the second indicator and closest to the predicted time of the second indicator. The target cellular indicator and the second indicator are of the same type. For example, if the second indicator is the predicted RSRP value, the target cellular indicator is the actual RSRP value. The predicted time of the second indicator can be understood as the time when the processing unit uses the antenna prediction model to predict the second indicator.
[0275] In the embodiments of the present application, the acquisition time can be understood as the time when the acquisition unit obtains the first indicator, and the time when the acquisition unit obtains the first indicator is very close to the time when the mobile phone actually measures the first indicator. For example, the acquisition unit obtains the actual RSRP value of the antenna at time T2 at time T1. Wherein, time T1 is the acquisition time, and time T1 and time T2 are very close, which can be understood as time T1 and time T2 being the same.
[0276] In the embodiment of the present application, based on the time consumed in the calculation process of the antenna prediction model, the prediction time of the second indicator lags behind the collection time of the first indicator.
[0277] Taking the second indicator as an example, the RSRP predicted value, and the second indicator is obtained by the processing unit based on the actual value of the MCS level and the actual value of the SNR at time t2, combined with Figure 14 The temporal relationship between the collection time of the first indicator, the collection time of the target value corresponding to the second indicator and the prediction time of the second indicator is introduced. For example, Figure 14 A timing diagram provided for an embodiment of the present application.
[0278] like Figure 14 As shown in the time axis A, the collection time of the target value corresponding to the second indicator and the collection time of the first indicator correspond to the collection time axis, and the prediction time of the second indicator corresponds to the calculation time axis. The processing unit can input the first indicator at time t1 into the antenna prediction model to obtain the second indicator at time t1'; the processing unit can input the first indicator at time t2 into the antenna prediction model to obtain the second indicator at time t2'; the processing unit can input the first indicator at time t3 into the antenna prediction model to obtain the second indicator at time t3'. Among them, time t1 is earlier than time t2, time t2 is earlier than time t3, time t1' is later than time t1 and earlier than or equal to time t2, time t2' is later than time t2 and earlier than or equal to time t3, and time t3' is later than time t3. In actual scenarios, the time difference between time t1 and time t1' can be close to 0.
[0279] Taking the second indicator at time t2' as the RSRP predicted value, which is predicted by the processing unit based on the actual value of the MCS level and the actual value of the SNR at time t2, as an example, the target value corresponding to the second indicator is explained as the target cellular indicator closest to the acquisition time and the prediction time of the second indicator.
[0280] Continue to refer Figure 14 As shown in the time axis A, the acquisition unit obtains the actual value of the MCS level and the actual value of the SNR at time t2. The acquisition unit does not obtain the actual value of RSRP at time t2, but obtains the actual value of RSRP at time t1 and time t3. When the time difference Δt1 between time t2' and time t1 is less than or equal to the time difference Δt2 between time t3 and time t2', the target value corresponding to the second indicator is the actual value of RSRP obtained by the acquisition unit at time t1. Figure 14In the timeline B shown, the acquisition unit obtains the actual MCS level and SNR values at time t2. The acquisition unit does not obtain the actual RSRP value at time t2, but obtains the actual RSRP values at both times t1 and t3. If the time difference Δt1 between time t2' and time t1 is greater than the time difference Δt2 between time t3 and time t2', the target value corresponding to the second indicator is the actual RSRP value obtained by the acquisition unit at time t3.
[0281] like Figure 14 In the time axis C shown, the acquisition unit obtains the actual RSRP value, the actual MCS level value, and the actual SNR value at time t2. If the time difference Δt3 between time t2' and time t2 is less than or equal to the time difference Δt4 between time t3 and time t2', the target value corresponding to the second indicator is the actual RSRP value obtained by the acquisition unit at time t2.
[0282] like Figure 14 In the time axis D shown, the acquisition unit obtains the actual RSRP value, the actual MCS level value, and the actual SNR value at time t2, and also obtains the actual RSRP value at time t3. If the time difference Δt3 between time t2' and time t2 is greater than the time difference Δt4 between time t3 and time t2', the target value corresponding to the second indicator is the actual RSRP value obtained by the acquisition unit at time t3.
[0283] Alternatively, in order to determine whether the antenna status is abnormal as early as possible, the target value corresponding to the second indicator can be a target cellular indicator whose collection time is before the predicted time of the second indicator and closest to the predicted time of the second indicator.
[0284] For example, Figure 14 As shown in the time axis E, the acquisition unit obtains the actual value of the MCS level and the actual value of the SNR at time t2. The acquisition unit does not obtain the actual value of RSRP at time t2, but obtains the actual value of RSRP at time t1. Since time t1 is before time t2' and the acquisition unit does not obtain the actual value of RSRP at time t2, but obtains the actual value of RSRP at time t1, therefore, regardless of whether the time difference Δt1 between time t2' and time t1 is greater than the time difference Δt2 between time t3 and time t2', the target value corresponding to the second indicator is the actual value of RSRP obtained by the acquisition unit at time t1. In this way, the mobile phone can determine at time t2' whether the absolute value of the difference between the second indicator and the actual value corresponding to the second indicator is greater than the preset threshold, without the need for the mobile phone to wait for time t3, so that it can determine whether the antenna status is abnormal as early as possible.
[0285] Understandably, continue to refer to Figure 14As shown in the time axis E, when the acquisition unit acquires the actual RSRP value at time t' between time t1 and time t2, and no further RSRP actual value is acquired between time t' and time t2' or at time t2', the target value corresponding to the second indicator is the actual RSRP value acquired at time t'.
[0286] like Figure 14 As shown in time axis F, the acquisition unit obtains the actual RSRP value, the actual MCS level value, and the actual SNR value at time t2. Since time t2 is before time t2' and the acquisition unit obtains the actual RSRP value at time t2, regardless of whether the time difference Δt3 between time t2' and time t2 is greater than the time difference Δt4 between time t3 and time t2', the target value corresponding to the second indicator is the actual RSRP value obtained by the acquisition unit at time t2. In this way, at time t2', the mobile phone can determine whether the absolute value of the difference between the second indicator and the actual value corresponding to the second indicator is greater than the preset threshold, without having to wait for time t3, thereby determining whether the antenna status is abnormal as soon as possible.
[0287] Understandably, continue to refer to Figure 14 As shown in the time axis F, when the acquisition unit acquires the actual RSRP value at time t'' between time t2 and time t2', and no actual RSRP value is acquired between time t'' and time t2' and at time t2', the target value corresponding to the second indicator is the actual RSRP value acquired at time t''.
[0288] Alternatively, when the collection unit collects the actual RSRP value at time t2', the target value corresponding to the second indicator is the actual RSRP value collected at time t2'.
[0289] When the second indicator includes two or more indicators, in one possible implementation, the processing unit performs a weighted summation operation on the two or more indicators included in the second indicator to obtain a first weighted summation result. The processing unit also performs a weighted summation operation on the target value corresponding to the second indicator to obtain a second weighted summation result. The processing unit then calculates the absolute value of the difference between the first weighted summation result and the second weighted summation result. When the absolute value of the difference is greater than or equal to a preset target threshold, the mobile phone determines that the antenna status is abnormal.
[0290] For example, assuming the second indicator includes a predicted RSRP value and a predicted SNR value, the processing unit performs a weighted summation operation on the predicted RSRP value and the predicted SNR value to obtain a first weighted summation operation result. The processing unit also performs a weighted summation operation on the target value corresponding to the second indicator to obtain a second weighted summation operation result. The processing unit then calculates the absolute value of the difference between the first weighted summation operation result and the second weighted summation operation result. When the absolute value of the difference is greater than or equal to a preset target threshold, the mobile phone determines that the antenna status is abnormal.
[0291] When the second indicator includes two or more indicators, in another possible implementation, for any one of the two or more indicators, the processing unit calculates the absolute value of the difference between the indicator and a target value corresponding to the second indicator. If the absolute value calculated for each of the second indicators is greater than a preset threshold value corresponding to each indicator, the mobile phone determines that the antenna status is abnormal.
[0292] For example, the second indicator includes an RSRP predicted value and an SNR predicted value. The processing unit calculates the absolute value of the difference between the RSRP predicted value and the actual RSRP value in the target value corresponding to the second indicator, and the processing unit calculates the absolute value of the difference between the SNR predicted value and the actual SNR value in the target value corresponding to the second indicator. When the absolute value of the difference between the RSRP predicted value and the actual RSRP value in the target value corresponding to the second indicator is greater than or equal to a first preset threshold, and the absolute value of the difference between the SNR predicted value and the actual SNR value in the target value corresponding to the second indicator is greater than or equal to a second preset threshold, the mobile phone determines that the antenna state is abnormal.
[0293] In the embodiment of the present application, at least two cellular indicators are combined to determine whether antenna tuning is required. In actual scenarios, when the mobile phone's antenna is subject to transient interference rather than abnormal antenna status, a certain cellular indicator may become abnormal at the moment the mobile phone's antenna is subject to transient interference, but generally, multiple cellular indicators will not become abnormal. Therefore, compared to determining whether antenna tuning is required based on a single cellular indicator, determining whether antenna tuning is required based on at least two cellular indicators is more accurate.
[0294] When the processing unit determines that the antenna status is abnormal, the mobile phone executes step S1304.
[0295] That is, when the absolute value of the difference between the second indicator and the target value corresponding to the second indicator is greater than or equal to the preset threshold, the mobile phone executes step S1304.
[0296] S1304. The adjustment unit adjusts the antenna.
[0297] In a possible implementation, the adjusting unit adjusting the antenna may include: the electronic device tuning the antenna currently being used by the electronic device, and / or the electronic device switching the antenna currently being used by the electronic device.
[0298] As a possible implementation, the adjustment unit tuning the antenna can be understood as the adjustment unit modifying the value of the usage state parameter to the target antenna state number. The usage state parameter can be used to indicate the current state of the antenna used by the mobile phone.
[0299] The target antenna state number is the antenna state number corresponding to the target value corresponding to the second indicator. The target antenna state number being the antenna state number corresponding to the target value corresponding to the second indicator can be understood as indicating that an abnormality has occurred in the target value corresponding to the second indicator, i.e., the antenna state has been abnormal at the time the target value corresponding to the second indicator was collected, and the adjustment unit is required to switch the current antenna state to a normal antenna state. The antenna state number corresponding to the normal antenna state is the target antenna state number.
[0300] In the embodiments of the present application, different antenna state numbers correspond to different control strategies. The control strategies are used to instruct the electronic device to switch the antenna state of the antenna in use to the antenna state corresponding to the value of the use state parameter, and / or to switch the antenna in use to the antenna corresponding to the value of the use antenna parameter. The electronic device can then perform antenna state switching and / or antenna switching based on the control strategy.
[0301] The antenna state number can be used to identify different antenna states and / or to indicate the antenna number. The same antenna can have multiple antenna states. The embodiments of the present application do not specifically limit the representation of the antenna state number, as long as it can distinguish different antenna states.
[0302] As one possible implementation, the adjustment unit may call upon an antenna tuning model to predict the target antenna state number. For example, the adjustment unit inputs the actual value corresponding to the second indicator, along with the latest collected actual value of the antenna impedance and actual values of other key indicators, into the antenna tuning model to obtain the target antenna state number output by the antenna tuning model.
[0303] In an embodiment of the present application, the mobile phone can perform antenna adjustment when the absolute value of the difference between the second indicator and the target value corresponding to the second indicator is greater than or equal to a first preset threshold value. In other words, the mobile phone can perform antenna adjustment when the antenna state is abnormal, alleviating the lag of antenna adjustment in related technologies, thereby reducing the time the mobile phone spends communicating through the antenna in an abnormal antenna state. Because the communication quality of the mobile phone in an abnormal antenna state is poor, reducing the time the mobile phone spends communicating through the antenna in an abnormal antenna state can improve the overall communication quality of the mobile phone.
[0304] The following describes the process by which a mobile phone independently determines whether to perform antenna switching.
[0305] In actual scenarios, a mobile phone is often equipped with multiple antennas. In order to improve the communication quality of the mobile phone, the mobile phone can switch the antennas and use the antenna with better antenna status among the multiple antennas.
[0306] As a possible implementation, the mobile phone may input the actual RSRP value, the actual MCS level value, the actual SNR value, and / or the actual value of other key indicators into the antenna prediction model. Alternatively, the mobile phone may also input the actual antenna number value into the antenna prediction model. The mobile phone may then determine whether to perform antenna switching based on the antenna number prediction value output by the antenna prediction model. The antenna prediction model may be trained using antenna number samples as labels for the first training data and using RSRP samples, MCS level samples, SNR samples, and / or other key indicator samples as features for the first training data.
[0307] As a possible implementation method, the mobile phone can predict a second indicator, which is a predicted value of the antenna number. When the second indicator is inconsistent with a target value corresponding to the second indicator, the mobile phone performs antenna switching.
[0308] For example, Figure 15 A schematic diagram of the process of an antenna adjustment method provided in an embodiment of the present application Figure 2 .like Figure 15 As shown, the method may include steps S1501 to S1504.
[0309] S1501. The collection unit obtains a first indicator.
[0310] This step is similar or identical to the above step S1301 and will not be repeated here.
[0311] S1502. The processing unit obtains the antenna number prediction value.
[0312] As a possible implementation, the processing unit inputs the first indicator into the antenna prediction model to obtain an antenna number prediction value output by the antenna prediction model.
[0313] S1503. The processing unit determines whether to perform antenna switching based on the predicted antenna number value and the target actual value of the antenna number.
[0314] The target antenna number actual value can be understood as the actual antenna number value whose acquisition time is closest to the predicted antenna number value's predicted time. Alternatively, the target antenna number actual value can be understood as the actual antenna number value whose acquisition time is not closest to the predicted antenna number value's predicted time, but whose acquisition time is before the predicted antenna number value's predicted time. The predicted antenna number value's predicted time can be understood as the time when the processing unit invokes the antenna prediction model to predict the predicted antenna number value.
[0315] In an embodiment of the present application, the trained first calculation module in the antenna prediction model includes multiple trained antenna switching threshold values. When the first comparison result is that the average value of the antenna number prediction results output by each hidden layer in the antenna prediction model is less than or equal to the antenna switching threshold value, or the antenna number prediction results output by each hidden layer are all less than or equal to the antenna switching threshold value, the antenna number prediction value output by the trained first output module in the antenna prediction model is an antenna number that is less than the antenna switching threshold value and closest to the antenna switching threshold value; when the first comparison result is that the average value of the antenna number prediction results output by each hidden layer in the antenna prediction model is greater than the antenna switching threshold value, or the antenna number prediction results output by each hidden layer are all greater than the antenna switching threshold value, the antenna number prediction value output by the trained first output module in the antenna prediction model is an antenna number that is greater than the antenna switching threshold value and closest to the antenna switching threshold value.
[0316] For example, Figure 16 Schematic diagram of the relationship between an antenna switching threshold value and an antenna number provided in an embodiment of the present application. Figure 16 As shown, when a mobile phone includes k antennas, the first calculation module in the output layer of the antenna prediction model can include k-1 antenna switching thresholds. For example, the antenna numbers of the k antennas can be: 1, 2, 3, ..., k-1, k. The antenna switching threshold between antenna numbers 1 and 2 can be called the first antenna switching threshold, the antenna switching threshold between antenna numbers 2 and 3 can be called the second antenna switching threshold, and the antenna switching threshold between antenna numbers k-1 and k can be called the k-1th antenna switching threshold.
[0317] For example, when the mean of the antenna number prediction results output by each hidden layer is less than or equal to the second antenna switching threshold value and greater than the first antenna switching threshold value, the antenna number prediction value output by the first output module in the output layer of the antenna prediction model can be 2; when the mean of the antenna number prediction results output by each hidden layer is less than or equal to the first antenna switching threshold value, the antenna number prediction value output by the first output module in the output layer of the antenna prediction model can be 1.
[0318] When the antenna number prediction value output by the antenna prediction model is different from the target actual value of the antenna number, the mobile phone executes step S1504.
[0319] S1504. The adjustment unit performs antenna switching.
[0320] In a possible implementation, the adjustment unit modifies the value of the mobile phone's antenna parameter (also referred to as a second preset parameter) to the predicted antenna number value, causing the adjustment unit to switch the mobile phone's currently used antenna to the antenna corresponding to the predicted antenna number value. The antenna parameter indicates the antenna number of the mobile phone's currently used antenna.
[0321] For example, before antenna switching, the value of the used antenna parameter is 1, indicating that the mobile phone is currently using the antenna corresponding to antenna number 1. When the predicted antenna number value is 2, the adjustment unit changes the value of the used antenna parameter to 2. The adjustment unit can then switch the mobile phone's currently used antenna to the antenna corresponding to antenna number 2.
[0322] In the embodiment of the present application, the mobile phone can use the antenna prediction model to predict the antenna with the best condition among multiple antennas. In this way, the mobile phone can promptly use the antenna with the best condition for communication, reducing the time the mobile phone uses the antenna with poor condition, thereby improving the overall communication quality of the mobile phone.
[0323] After introducing the use of the antenna switching threshold value, the following describes the process of obtaining the antenna switching threshold value by the training device or mobile phone.
[0324] In one possible implementation, the first storage module of the output layer in the initial prediction model can store the antenna number prediction results output by each hidden layer during each iteration. After the prediction loss function converges, the first calculation module can cluster the antenna number prediction results output by each hidden layer during the last iteration to obtain multiple sets. Different sets correspond to different antenna numbers, and antenna number prediction results in the same set correspond to the same antenna number samples. The first calculation module can then calculate the antenna switching threshold between antenna number k and antenna number k-1 using the set corresponding to antenna number k and the set corresponding to antenna number k-1.
[0325] In a possible implementation, the first calculation module calculating the antenna switching threshold between antenna number k and antenna number k-1 using the set corresponding to antenna number k and the set corresponding to antenna number k-1 may include: the first calculation module calculating the sum of the antenna number prediction results in the set corresponding to antenna number k to obtain a first sum, and the first calculation module calculating the sum of the antenna number prediction results in the set corresponding to antenna number k-1 to obtain a second sum. Subsequently, the first calculation module may calculate the sum of the first sum and the second sum to obtain a first sum, and the first calculation module may calculate the sum of the number of antenna number prediction results in the set corresponding to antenna number k and the number of antenna number prediction results in the set corresponding to antenna number k-1 to obtain a second sum. Subsequently, the first calculation module may calculate the ratio of the first sum to the second sum, where the ratio is the antenna switching threshold between antenna number k and antenna number k-1.
[0326] For example, the training device inputs the features of the two first training data into the initial tuning model for training at each iteration. When the prediction loss function converges, that is, at the last iteration, the labels of the first training data (that is, the antenna number samples) corresponding to the features of the two first training data input by the training device are 1 and 2, respectively. When the set of antenna number prediction results corresponding to antenna number sample 1 obtained after the last iteration is {0.9, 1.1, 1.3}, and the set of antenna number prediction results corresponding to antenna number sample 2 is {2.3, 1.9, 2}, the antenna switching threshold between antenna numbers 1 and 2 is (0.9 + 1.1 + 1.3 + 2.3 + 1.9 + 2) / (3 + 3) = 1.583.
[0327] The following describes the process of tuning the antenna of a mobile phone through the adjustment unit of the modem processor.
[0328] As a possible implementation, the mobile phone may determine a predicted antenna state number through an antenna tuning model to implement antenna tuning and / or antenna switching.
[0329] Before introducing the process of tuning the antenna provided in the embodiment of the present application, the antenna tuning model provided in the embodiment of the present application is first introduced.
[0330] In an embodiment of the present application, the training device can use a second training data set to train the initial tuning model. After the training end conditions are met (such as the loss function converges, or when the loss function does not converge, the number of training times reaches a preset number), the training device completes the training process of the initial tuning model and obtains the antenna tuning model.
[0331] The architecture of the initial tuning model can be found in Figure 7The corresponding embodiments differ in the output layer. The first storage module, the first calculation module, the first judgment module, and the first output module in the output layer of the initial prediction model are replaced with the second storage module, the second calculation module, the second judgment module, and the second output module to obtain the architecture of the initial tuning model. The second storage module can be used to store the antenna state number prediction results output by each hidden layer during the training process; the second calculation module can be used to calculate the state switching point based on each antenna state number prediction result; the second judgment module can be used to compare the antenna state number prediction results output by each hidden layer with the antenna state number to obtain a second comparison result; the second output module can be used to output the antenna state number prediction value based on the second comparison result. The state switching point is the critical value for the mobile phone to switch the antenna state number.
[0332] After explaining the architecture of the initial tuning model, the second training data set and the method for obtaining the second training data set are introduced below.
[0333] As a possible implementation, the training device may use the second training data set to train the initial tuning model. After the training end condition is met, the training device obtains the antenna tuning model.
[0334] In the embodiments of the present application, the simulation device can simulate at least one of the following communication scenarios for a mobile phone: the phone is in free space (i.e., without any object touching the phone), the phone is operated with one hand, the phone is operated with two hands, the phone is placed on a table and playing a video, the phone is making a phone call, etc. The form of the simulation device can be similar to the training device described above and will not be further described here.
[0335] Then, for any communication simulation scenario, developers can use simulation equipment to adjust the total radiated power (TRP) and combined total isotropic sensitivity (TIS) of the mobile phone's antenna, so that the mobile phone's antenna efficiency in this communication simulation scenario is greater than the preset efficiency. TRP can be used to measure the total radiated power of the mobile phone when transmitting, and TIS can be used to reflect the sensitivity of the mobile phone when receiving signals. The preset efficiency can be set according to the actual scenario and is not limited in this embodiment of the application.
[0336] Next, the data collection device may collect second data when the antenna efficiency is greater than a preset efficiency in each communication simulation scenario. The second data may include at least one of RSRP, MCS level, SNR, and other key indicators, as well as an antenna state number and antenna impedance. Alternatively, the second data may also include an antenna number. For example, the second data may include BLER, antenna number, antenna state number, and antenna impedance.
[0337] Antenna impedance refers to the electrical impedance characteristic of an antenna at its feed point (or input). For example, for a wire antenna, the ratio of the voltage to the current at the antenna input is the antenna impedance. Antenna impedance can be a complex number, with the real part of the antenna impedance representing the input resistance and the imaginary part representing the input reactance.
[0338] Afterwards, the data acquisition device may preprocess the second data to obtain a second training data set, wherein the preprocessing may include missing value processing, outlier processing, and data deduplication.
[0339] The second training data set may include at least one second data sample (also referred to as second training data). Each second data sample may include at least one of an RSRP sample, an MCS level sample, an SNR sample, and other key indicator samples, as well as an antenna state number sample and an antenna impedance sample; or the second data sample may further include an antenna number sample.
[0340] After introducing the second training data set, the following describes a process of training the initial tuning model using the second training data set.
[0341] As a possible implementation, the antenna tuning model obtained by training the initial tuning model using the second training data can be used to predict the antenna state number.
[0342] For example, Figure 17 A flow chart of the training process of an antenna tuning model provided in an embodiment of the present application. Figure 17 As shown, the process may include steps S1701 to S1704.
[0343] S1701: The training device obtains a second training data set, which may include features of the second training data and labels of the second training data.
[0344] The label of the second training data is an antenna state number sample, and the characteristics of the second training data may include at least one of an MCS level sample, an SNR sample and other key indicator samples, and an antenna impedance sample; or, the characteristics of the second training data may also include an antenna number sample.
[0345] It can be understood that the training device can use all the second data samples included in the second training data set to train the initial tuning model, and the training device can also use part of the second data samples included in the second training data set to train the initial tuning model.
[0346] S1702: The training device inputs the features of the first training data into the initial tuning model to obtain an initial tuning training result.
[0347] Exemplarily, the initial tuning training result may include a first initial tuning training result, a second initial tuning training result, and a third initial tuning training result. The first initial tuning training result is the antenna state number prediction result output by the first hidden layer, the second initial tuning training result is the antenna state number prediction result output by the second hidden layer, and the third initial tuning training result is the antenna state number prediction result output by the third hidden layer.
[0348] The first initial tuning training result is the result of aggregating the neuron outputs of each neuron in the first hidden layer. The aggregating of the neuron outputs may be, for example, a single matrix multiplication operation or multiple matrix multiplication operations performed by the training device on the neuron outputs. The input to each neuron in the first hidden layer is the feature of the first training data transmitted by each neuron in the input layer.
[0349] The second initial tuning training result is the result of the aggregation of the neuron outputs of each neuron in the second hidden layer. The input of each neuron in the second hidden layer is the neuron output of each neuron in the first hidden layer. Figure 7 The description in the corresponding embodiments will not be repeated here.
[0350] Similarly, the third initial tuning training result is the result of the aggregation of the neuron outputs of each neuron in the third hidden layer. The input of each neuron in the third hidden layer is the neuron output of each neuron in the second hidden layer. Figure 7 The description in the corresponding embodiments will not be repeated here.
[0351] It is understood that each hidden layer corresponds to an initial tuning training result. This embodiment of the application is illustratively described with three hidden layers, so the initial tuning training results are three. This embodiment of the application does not limit the number of hidden layers, nor does it limit the number of initial tuning training results.
[0352] S1703: The training device calculates a tuning loss function according to the first initial tuning training result, the second initial tuning training result, the third initial tuning training result, and the label of the second training data.
[0353] Exemplarily, the tuning loss function may include a first tuning loss function, a second tuning loss function, and a third tuning loss function. The first tuning loss function may be the sum of each first difference, where the first difference is the difference between any antenna state number prediction result in the first initial tuning training result and the label of the corresponding second training data. The second tuning loss function may be the sum of each second difference, where the second difference is the difference between any antenna state number prediction result in the second initial tuning training result and the label of the corresponding second training data. The third tuning loss function may be the sum of each third difference, where the third difference is the difference between any antenna state number prediction result in the third initial training result and the label of the corresponding second training data.
[0354] S1704: The training device iterates the model parameters of the initial tuning model based on the tuning loss function until the tuning loss function converges to obtain the antenna tuning model.
[0355] The tuning loss function convergence may be when the first tuning loss function is less than or equal to a fourth preset value, the second tuning prediction loss function is less than or equal to a fifth preset value, and the third tuning prediction loss function is less than or equal to a sixth preset value. The fourth preset value, the fifth preset value, and the sixth preset value can be set according to actual scenarios and are not limited in this embodiment of the present application.
[0356] In other possible implementations, step S1704 can be replaced by: the training device iterates the model parameters of the initial tuning model based on the tuning loss function, and when the tuning loss function fails to converge, when the training time reaches a second preset time, an antenna tuning model is obtained.
[0357] Among them, the second preset duration can be set according to the actual scenario, and the embodiment of the present application does not specifically limit the second preset duration.
[0358] In another possible implementation, step S1704 can be replaced by: the training device iterates the model parameters of the initial tuning model based on the tuning loss function, and when the tuning loss function fails to converge, when the number of iterations reaches a second preset number, an antenna tuning model is obtained.
[0359] Among them, the second preset number of times can be set according to the actual scenario, and the embodiment of the present application does not specifically limit the second preset number of times.
[0360] After the training device trains the initial tuning model to obtain the antenna tuning model, the antenna tuning model can be deployed on the mobile phone. During user use of the mobile phone, the mobile phone can input the collected parameters such as the actual RSRP value, actual MCS level value, actual SNR value, actual antenna number value, actual antenna state number value, actual antenna impedance value, and / or actual values of other key indicators into the antenna tuning model to obtain the antenna state number prediction value output by the antenna tuning model.
[0361] As a possible implementation, after the antenna tuning model is deployed in the mobile phone, the mobile phone can update the antenna tuning model when it is in an idle state.
[0362] For example, while a user is using a mobile phone (e.g., making a call, playing a game, or watching a video), that is, when the mobile phone is in a non-idle state, the mobile phone may record multiple sets of second actual data about the antenna during the user's use. Each set of second actual data may include at least one of an RSRP actual value, an MCS level actual value, an SNR actual value, and actual values of other key indicators, as well as an actual value of the antenna impedance and an actual value of the antenna status number. Alternatively, the second actual data may also include an actual value of the antenna number. Different sets of second actual data correspond to different time periods or different moments.
[0363] Then, the mobile phone can pre-process the latest multiple sets of second actual data to obtain a new second training data set. The pre-processing may include missing value processing, outlier processing, and data deduplication.
[0364] Optionally, to improve the prediction accuracy of the antenna tuning model, while the mobile phone is recording multiple sets of second actual data (also referred to as second operating cellular indicators), for any second actual data input into the antenna tuning model, the mobile phone can record the average of the output results of each hidden layer of the antenna tuning model for that second actual data. The above-mentioned step of preprocessing the latest multiple sets of second actual data to obtain a new second training data set may include:
[0365] The mobile phone can filter out multiple sets of second actual data that meet preset conditions from the multiple sets of preprocessed second actual data. The mobile phone can obtain a new second training data set based on the multiple sets of second actual data that meet the preset conditions. For any second actual data that meets the preset conditions, the absolute value of the difference between the mean of the output results of each hidden layer of the antenna tuning model for the second actual data and the corresponding state switching point is greater than or equal to a preset first absolute value and less than or equal to a preset second absolute value. The preset first absolute value is less than the preset second absolute value.
[0366] For example, when the state switching point between the antenna state number state1 and the antenna state number state2 in the trained antenna tuning model is 1.27, and the preset first absolute value is 0.5 and the preset second absolute value is 0.7, the mobile phone can collect, for example, the mean of the output results of each hidden layer of the antenna tuning model of 1.22 and the second actual data corresponding to the mean of the output results of each hidden layer of the antenna tuning model of 1.22; the mobile phone can also collect the mean of the output results of each hidden layer of the antenna tuning model of 1.34 and the second actual data corresponding to the mean of the output results of each hidden layer of the antenna tuning model of 1.34.
[0367] Afterward, when the phone is idle, it can train the antenna tuning model on a new second training dataset to obtain an updated antenna tuning model. This new second training dataset is obtained by pre-processing data collected by the phone based on the user's usage habits and the phone's communication environment. Therefore, with increasing updates, the updated antenna tuning model becomes more suitable for the user's usage habits and the phone's communication environment. As a result, the updated antenna tuning model has higher prediction accuracy, further improving the communication quality of the electronic device.
[0368] After introducing the training process of the antenna tuning model, the antenna tuning process is introduced below.
[0369] For example, see Figure 18 , Figure 18 The schematic diagram of the process of an antenna adjustment method provided in the embodiment of the present application is shown Figure 3 .like Figure 18 As shown, the above step S1304 may include steps S1801 to S1804.
[0370] S1801. The collection unit obtains the actual value of the antenna impedance corresponding to the target time and the third indicator corresponding to the target time (the actual value of the antenna impedance corresponding to the target time and the third indicator corresponding to the target time may also be referred to as a fourth cellular indicator).
[0371] The target time may be the collection time corresponding to the target value corresponding to the second indicator, and the actual value of the antenna number corresponding to the target time may be the antenna number corresponding to the antenna used by the mobile phone at the target time.
[0372] The third indicator may include parameters such as MCS level, SNR, RSRP, and / or other key indicators. In a possible implementation, the mobile phone can read the actual value of the antenna number corresponding to the target time, the actual value of the antenna impedance corresponding to the target time, and / or the third indicator corresponding to the target time from the log file.
[0373] Optionally, the fourth cellular indicator may further include an antenna number corresponding to the target time and / or an antenna state number corresponding to the target time. The subsequent processing unit may also input the antenna number corresponding to the target time and / or the antenna state number corresponding to the target time into the antenna tuning model, so that the antenna tuning model outputs a predicted value of the antenna state number.
[0374] S1802. The processing unit inputs the actual value of the antenna impedance corresponding to the target time and the third indicator corresponding to the target time into the antenna tuning model to obtain the antenna state number prediction value output by the antenna tuning model.
[0375] In this embodiment of the present application, the trained second calculation module in the output layer of the antenna tuning model includes multiple trained state switching points. After the actual antenna impedance value corresponding to the target time and the third indicator corresponding to the target time are input into the antenna tuning model, the trained second calculation module in the output layer of the antenna tuning model can perform a mean operation on the output results of each hidden layer to obtain a mean operation result. The mobile phone can then use the second judgment unit in the output layer to obtain the predicted antenna state number output by the antenna tuning model based on the mean operation result and the trained state switching points.
[0376] In a possible implementation, the mobile phone obtains the antenna state number prediction value output by the antenna tuning model through the second judgment unit of the output layer based on the result of the mean operation and the trained state switching point. It can include that when the mean of the antenna state number prediction results output by each hidden layer in the antenna tuning model is less than or equal to the sth (s is an integer greater than or equal to 1) state switching point, and the mean is greater than the s-1th state switching point, the antenna state number prediction value output by the second output module trained in the antenna tuning model is: less than the sth state switching point and the antenna state number closest to the sth state switching point; when the mean of the antenna number prediction results output by each hidden layer in the antenna tuning model is greater than the sth state switching point and less than or equal to the s+1th state switching point, the antenna state number prediction value output by the second output module trained in the antenna tuning model is: greater than the sth state switching point and the antenna state number closest to the sth state switching point. Among them, the s+1th state switching point is greater than the sth state switching point, and the sth state switching point is greater than the s-1th state switching point.
[0377] Exemplarily, when the mean of the antenna number prediction results output by each hidden layer is less than or equal to the state switching point between the antenna state number state1 and the antenna state number state2, the antenna state number prediction value output by the antenna tuning model is state1; when the mean of the antenna number prediction results output by each hidden layer is greater than the state switching point between the antenna state number state1 and the antenna state number state2, and less than or equal to the state switching point between the antenna state number state2 and the antenna state number state3, the antenna state number prediction value output by the antenna tuning model is state2; when the mean of the antenna number prediction results output by each hidden layer is greater than the state switching point between the antenna state number state2 and the antenna state number state3, and less than or equal to the state switching point between the antenna state number state3 and the antenna state number state4, the antenna state number prediction value output by the antenna tuning model is state3.
[0378] Alternatively, when the antenna number prediction results output by each hidden layer of the antenna tuning model are less than or equal to the state switching point between the antenna state number state1 and the antenna state number state2, the antenna state number prediction value output by the antenna tuning model is state1; when the antenna number prediction results output by each hidden layer of the antenna tuning model are greater than the state switching point between the antenna state number state1 and the antenna state number state2, and less than or equal to the state switching point between the antenna state number state2 and the antenna state number state3, the antenna state number prediction value output by the antenna tuning model is state2; when the antenna number prediction results output by each hidden layer of the antenna tuning model are greater than the state switching point between the antenna state number state2 and the antenna state number state3, and less than or equal to the state switching point between the antenna state number state3 and the antenna state number state4, the antenna state number prediction value output by the antenna tuning model is state3.
[0379] After introducing the use of the state switching point, the following describes the process of the training device or mobile phone obtaining the above-mentioned state switching point.
[0380] In one possible implementation, the second storage module of the output layer of the initial prediction model can store the antenna state number prediction results output by each hidden layer during each iteration. After the tuning loss function converges, the second calculation module can cluster the antenna state number prediction results output by each hidden layer during the last iteration to obtain multiple sets. Different sets correspond to different antenna state numbers, and antenna state number prediction results in the same set correspond to the same antenna state number sample. The second calculation module can then calculate the state switching point between antenna state number s and antenna state number s-1 using the set corresponding to antenna state number s and the set corresponding to antenna state number s-1.
[0381] In a possible implementation, the second calculation module calculating the state switching point between antenna state number s and antenna state number s-1 using the set corresponding to antenna state number s and the set corresponding to antenna state number s-1 may include: the second calculation module calculating the sum of antenna state number prediction results in the set corresponding to antenna state number s to obtain a third sum, and the second calculation module calculating the sum of antenna state number prediction results in the set corresponding to antenna state number s-1 to obtain a fourth sum. Subsequently, the second calculation module may calculate the sum of the second sum and the second sum to obtain a third sum, and the second calculation module may calculate the sum of the number of antenna state number prediction results in the set corresponding to antenna state number s and the number of antenna state number prediction results in the set corresponding to antenna state number s-1 to obtain a fourth sum. Subsequently, the second calculation module may calculate the ratio of the third sum to the fourth sum, where the ratio is the state switching point between antenna state number s and antenna state number s-1.
[0382] Exemplarily, the training device inputs the features of the two second training data into the initial tuning model for training at each iteration. When the tuning loss function converges, that is, at the last iteration, the labels of the second training data (that is, the antenna state number samples) corresponding to the features of the two second training data input by the training device are state1 and state2, respectively. When the set of antenna state number prediction results corresponding to the antenna state number sample state1 obtained after the last iteration is {state0.8, state1.2, state1}, and the set of antenna state number prediction results corresponding to the antenna state number sample state2 is {state2, state1.9, state1.8}, the state switching point between antenna state number state1 and antenna state number state2 is (0.8+1.2+1+2+1.9+1.8) / (3+3)=1.45.
[0383] S1803. The processing unit determines whether to switch the antenna state.
[0384] In a possible implementation, the processing unit determines whether the value of the usage state parameter is consistent with the predicted value of the antenna state number, and when the value of the usage state parameter is inconsistent with the predicted value of the antenna state number, executes step S1804.
[0385] S1804. The adjustment unit switches the antenna state of the antenna and / or switches the antenna used by the mobile phone.
[0386] As a possible implementation, the adjustment unit may pre-store multiple correspondences between antenna state numbers, antenna states, and antenna numbers. Then, when the adjustment unit obtains the antenna state number output by the antenna tuning model, the adjustment unit may switch the antenna state of the used antenna to the antenna state corresponding to the antenna state number, and / or the adjustment unit may switch the antenna of the used antenna to the antenna corresponding to the antenna number indicated by the antenna state number.
[0387] The antenna state number can be used to identify different antenna states and / or to indicate the antenna number. The same antenna can have multiple antenna states. The embodiments of the present application do not specifically limit the representation of the antenna state number, as long as it can distinguish different antenna states.
[0388] Exemplarily, the correspondence between the various antenna state numbers, antenna states, and antenna numbers pre-stored in the adjustment unit may include:
[0389] Antenna state number state1 corresponds to: the antenna corresponding to antenna number 1, the antenna corresponding to antenna number 2, and the antenna corresponding to antenna number 3. The antenna corresponding to antenna number 1 is in use, and the antenna state of the antenna corresponding to antenna number 1 is the first antenna state for that antenna. The antenna state of the antenna corresponding to antenna number 2 is the first antenna state for that antenna. The antenna state of the antenna corresponding to antenna number 3 is the first antenna state for that antenna. That is, antenna state number state1 indicates antenna number 1.
[0390] Antenna state number state2 corresponds to: the antenna corresponding to antenna number 1, the antenna corresponding to antenna number 2, and the antenna corresponding to antenna number 3. The antenna corresponding to antenna number 2 is in use, and the antenna state of the antenna corresponding to antenna number 1 is the second antenna state of the antenna, the antenna state of the antenna corresponding to antenna number 2 is the second antenna state of the antenna, and the antenna state of the antenna corresponding to antenna number 3 is the second antenna state of the antenna. That is, antenna state number state2 indicates antenna number 2.
[0391] Antenna state number state3 corresponds to: the antenna corresponding to antenna number 1, the antenna corresponding to antenna number 2, and the antenna corresponding to antenna number 3. The antenna corresponding to antenna number 3 is in use. The antenna state of the antenna corresponding to antenna number 1 is the first antenna state for that antenna, the antenna state of the antenna corresponding to antenna number 2 is the first antenna state for that antenna, and the antenna state of the antenna corresponding to antenna number 3 is the first antenna state for that antenna. That is, antenna state number state3 indicates antenna number 3.
[0392] Antenna state number state4 corresponds to: the antenna corresponding to antenna number 1, the antenna corresponding to antenna number 2, and the antenna corresponding to antenna number 3. The antenna corresponding to antenna number 1 is in use, and the antenna state of the antenna corresponding to antenna number 1 is the third antenna state for that antenna. The antenna state of the antenna corresponding to antenna number 2 is the third antenna state for that antenna. The antenna state of the antenna corresponding to antenna number 3 is the third antenna state for that antenna. That is, antenna state number state4 indicates antenna number 1.
[0393] It can be understood that the correspondence between the above-mentioned multiple antenna state numbers, antenna states and antenna numbers is for illustrative purposes only. The embodiment of the present application does not specifically limit which antennas correspond to an antenna state number, which antenna is used, and which antenna state.
[0394] Below, the above correspondence relationship is taken as an example to exemplify the process of switching the antenna state of the antenna in the embodiment of the present application.
[0395] For example, when the value of the usage state parameter in the adjustment unit is state1 and the value of the antenna parameter is 1, it means that the adjustment unit uses the antenna corresponding to antenna number 1, and the antenna state of the antenna corresponding to antenna number 1 is the first antenna state of the antenna, the antenna state of the antenna corresponding to antenna number 2 is the first antenna state of the antenna, and the antenna state of the antenna corresponding to antenna number 3 is the first antenna state of the antenna.
[0396] Then, when the antenna state number predicted by the antenna tuning model is state 4, the adjustment unit may modify the value of the used state parameter to state 4. Since the antenna number indicated by antenna state number state 4 is still 1, the adjustment unit only switches the antenna state and does not switch the antenna.
[0397] Exemplarily, based on the value of the usage state parameter being modified to state 4, the adjustment unit controls the connection or disconnection of the tuning component in the tuning circuit according to the control strategy corresponding to state 4, so that the current state of the antenna is switched to the antenna state corresponding to state 4. In other words, the antenna state of the antenna corresponding to antenna number 1 is switched to the third antenna state of the antenna, the antenna state of the antenna corresponding to antenna number 2 is switched to the third antenna state of the antenna, and the antenna state of the antenna corresponding to antenna number 3 is switched to the third antenna state of the antenna.
[0398] Below, the above correspondence is used as an example to illustrate the process of switching the antenna used by the mobile phone in the embodiment of the present application.
[0399] For example, when the value of the usage state parameter in the adjustment unit is state1 and the value of the antenna parameter is 1, it means that the adjustment unit uses the antenna corresponding to antenna number 1, and the antenna state of the antenna corresponding to antenna number 1 is the first antenna state of the antenna, the antenna state of the antenna corresponding to antenna number 2 is the first antenna state of the antenna, and the antenna state of the antenna corresponding to antenna number 3 is the first antenna state of the antenna.
[0400] Then, if the antenna state number predicted by the antenna tuning model is state3, since antenna state number state3 also corresponds to the first antenna state of antenna number 1, the first antenna state of antenna number 2, and the first antenna state of antenna number 3, the adjustment unit changes the used state parameter to state3 but does not switch the antenna state. Since antenna state number state3 indicates antenna number 3, the adjustment unit may change the value of the used antenna parameter to 3. The adjustment unit then switches the antenna.
[0401] Exemplarily, based on the value of the antenna parameter being modified to 3, the adjustment unit controls the antenna switch circuit to switch the antenna used by the mobile phone to the antenna corresponding to antenna number 3.
[0402] Below, the above-mentioned corresponding relationship is used as an example to exemplify the process of switching the antenna state of the antenna and switching the antenna used by the mobile phone in the embodiment of the present application.
[0403] For example, when the value of the usage state parameter in the adjustment unit is state1 and the value of the antenna parameter is 1, it means that the adjustment unit uses the antenna corresponding to antenna number 1, and the antenna state of the antenna corresponding to antenna number 1 is the first antenna state of the antenna, the antenna state of the antenna corresponding to antenna number 2 is the first antenna state of the antenna, and the antenna state of the antenna corresponding to antenna number 3 is the first antenna state of the antenna.
[0404] Then, when the antenna state number predicted by the antenna tuning model is state2, the adjustment unit may modify the value of the used state parameter to state2, and modify the value of the used antenna parameter to antenna number 2 indicated by the antenna state number state2.
[0405] Afterwards, based on the value of the usage state parameter being modified to state2, the adjustment unit controls the connection or disconnection of the tuning component in the tuning circuit according to the control strategy corresponding to state2, so that the current state of the antenna is switched to the antenna state corresponding to state2. In other words, the antenna state of the antenna corresponding to antenna number 1 is switched to the second antenna state of the antenna, the antenna state of the antenna corresponding to antenna number 2 is switched to the second antenna state of the antenna, and the antenna state of the antenna corresponding to antenna number 3 is switched to the second antenna state of the antenna.
[0406] Furthermore, based on the value of the antenna parameter being modified to 2, the adjustment unit controls the antenna switch circuit to switch the antenna used by the mobile phone to the antenna corresponding to antenna number 2.
[0407] The embodiment of the present application also provides an electronic device, Figure 19 This is a schematic diagram of the hardware structure of another electronic device provided in an embodiment of the present application. Figure 19 As shown, the electronic device may include one or more processors 1901 , a memory 1902 and a communication interface 1903 .
[0408] The memory 1902 and the communication interface 1903 are coupled to the processor 1901. For example, the memory 1902, the communication interface 1903 and the processor 1901 may be coupled together via a bus 1904.
[0409] The communication interface 1903 is used to transmit data with other devices. The memory 1902 stores computer program code. The computer program code includes computer instructions. When the computer instructions are executed by the processor 1901, the electronic device performs the relevant method steps in the above-mentioned method embodiment of the present application.
[0410] Processor 1901 may be a processor or controller, such as a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the present disclosure. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0411] The bus 1904 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus 1904 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 19The fact that only one line is used does not mean that there is only one bus or one type of bus.
[0412] The embodiment of the present application also provides a chip system, Figure 20 This is a schematic diagram of the structure of a chip system provided in an embodiment of the present application. Figure 20 As shown, the chip system 2000 includes at least one processor 2001 and at least one interface circuit 2002. The processor 2001 and the interface circuit 2002 can be interconnected via lines. For example, the interface circuit 2002 can be used to receive signals from other devices (such as the memory of an electronic device). For another example, the interface circuit 2002 can be used to send signals to other devices (such as the processor 2001). Exemplarily, the interface circuit 2002 can read instructions stored in the memory and send the instructions to the processor 2001. When the instructions are executed by the processor 2001, the electronic device can execute the various steps in the above embodiments. Of course, the chip system can also include other discrete components, which are not specifically limited in the embodiments of the present application.
[0413] An embodiment of the present application further provides a computer-readable storage medium, in which computer program code is stored. When the processor executes the computer program code, the electronic device executes the relevant method steps in the above method embodiment.
[0414] An embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the relevant method steps in the above method embodiment.
[0415] Among them, the electronic device, computer-readable storage medium or computer program product provided in this application is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0416] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0417] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0418] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0419] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0420] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application, or the part that makes the contribution, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program code.
[0421] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. An antenna adjustment method, characterized in that: Applied to electronic equipment, the method includes: At a first time point, obtaining a first cellular indicator; At a second time point, obtaining a third cellular indicator; At a third time point, obtaining a fifth cellular indicator; At a fourth time point, a second cellular indicator is predicted based on the first cellular indicator; the type of the third cellular indicator is the same as the type of the second cellular indicator; the type of the fifth cellular indicator is the same as the type of the second cellular indicator; and the time interval between the second time point and the fourth time point is less than the time interval between the third time point and the fourth time point; When the absolute value of the difference between the value of the second cell indicator and the value of the third cell indicator is greater than or equal to a preset threshold, antenna adjustment is performed.
2. The method according to claim 1, characterized in that The performing antenna adjustment includes: The antenna currently being used by the electronic device is tuned, and / or the antenna currently being used by the electronic device is switched.
3. The method according to claim 1 or 2, characterized in that The performing antenna adjustment when an absolute value of a difference between a value of the second cellular indicator and a value of the third cellular indicator is greater than or equal to a preset threshold includes: The second cellular indicator includes a target indicator, and when a third cellular indicator including the target indicator is acquired at the second time point, and the third cellular indicator including the target indicator is not acquired between the second time point and the fourth time point, and an absolute value of a difference between a value of the second cellular indicator and a value of the third cellular indicator is greater than or equal to the preset threshold, performing antenna adjustment; The second time point is later than the first time point and earlier than or equal to the fourth time point.
4. The method according to claim 3, characterized in that The method further comprises: The first cellular indicator includes the target indicator. Between the first time point and the fourth time point and at the fourth time point, if the third cellular indicator including the target indicator is not obtained, and an absolute value of a difference between a value of the target indicator in the first cellular indicator and a value of the second cellular indicator is greater than or equal to the preset threshold, antenna adjustment is performed.
5. The method according to claim 3, characterized in that The method further comprises: The first cellular indicator does not include the target indicator, a third cellular indicator including the target indicator is acquired at a fifth time point, and the third cellular indicator including the target indicator is not acquired between the fifth time point and the fourth time point and at the fourth time point, and an absolute value of a difference between a value of the second cellular indicator and a value of the third cellular indicator is greater than or equal to the preset threshold, performing antenna adjustment; The fifth time point is before the first time point.
6. The method according to claim 1 or 2, characterized in that If the second time point is later than the fourth time point, the electronic device does not obtain a cellular indicator of the same type as the second cellular indicator at the sixth time point; or the electronic device obtains a cellular indicator of the same type as the second cellular indicator at the sixth time point, and the difference between the fourth time point and the sixth time point is greater than the difference between the second time point and the fourth time point. The sixth time point is earlier than the fourth time point.
7. The method according to claim 6, characterized in that When the second time point is earlier than the fourth time point, the electronic device does not obtain a cellular indicator of the same type as the second cellular indicator at a seventh time point; or the electronic device obtains, at the seventh time point, a cellular indicator of the same type as the second cellular indicator, and a difference between the seventh time point and the fourth time point is greater than a difference between the fourth time point and the second time point; The seventh time point is later than the fourth time point.
8. The method according to claim 1 or 2, characterized in that The predicting of the second cellular indicator based on the first cellular indicator includes: The first cellular indicator is input into a first prediction model, and the second cellular indicator output by the first prediction model is obtained.
9. The method according to claim 8, characterized in that The method further comprises: During operation of the electronic device, a first operating cellular indicator is obtained, where the first operating cellular indicator includes a first training tag and a first training feature, where the first training feature includes at least one of a reference signal received power (RSRP), a signal-to-noise ratio (SNR), a modulation and coding scheme (MCS) level, and a target key indicator; or, the first training feature further includes an antenna number, and the first training tag is different from the first training feature. Inputting the first training feature into the first prediction model to obtain a first training result; Calculating a first loss function according to the first training result and the first training label; Iterating the model parameters of the first prediction model based on the first loss function until the first loss function converges, thereby obtaining an updated first prediction model; The method further comprises: After the first prediction model is updated, the first cellular indicator is input into the updated first prediction model to obtain a second cellular indicator output by the updated first prediction model.
10. The method according to claim 9, characterized in that The first operating cellular indicator includes: a first operating indicator and a second operating indicator; The obtaining of the first operating cellular indicator includes: obtaining the first operating indicator and the second operating indicator when the absolute value of the difference between the second operating indicator and the third operating indicator is less than the preset threshold; The third operating indicator is predicted based on the first operating indicator or the first operating cellular indicator, and the type of the third operating indicator is the same as the type of the second operating indicator.
11. The method according to claim 2, characterized in that The performing antenna adjustment further includes: Obtaining a fourth cellular indicator, where the fourth cellular indicator includes at least one of RSRP, SNR, MCS level, and target key indicator, and the fourth cellular indicator also includes antenna impedance; or the fourth cellular indicator also includes an antenna number and / or an antenna state number; Obtaining an antenna state number prediction value based on the fourth cellular indicator prediction; The step of tuning the antenna currently being used by the electronic device comprises: updating a value of a first preset parameter according to the predicted value of the antenna state number; and switching an antenna state of an antenna currently being used by the electronic device according to the value of the first preset parameter; The switching of the antenna used by the electronic device includes: The value of the second preset parameter is updated according to the antenna number indicated by the antenna state number prediction value; and the antenna used by the electronic device is switched according to the value of the second preset parameter.
12. The method according to claim 11, characterized in that The obtaining of the antenna state number prediction value based on the fourth cellular indicator prediction includes: The fourth cellular indicator is input into the second prediction model to obtain the antenna state number prediction value output by the second prediction model.
13. The method according to claim 12, characterized in that The method further comprises: During operation of the electronic device, a second operating cellular indicator is obtained, where the second operating cellular indicator includes a second training tag and a second training feature, where the second training feature includes at least one of RSRP, SNR, MCS level, and target key indicator, and the second training feature also includes antenna impedance; or the first training feature also includes an antenna number; and the second training tag includes an antenna state number; Inputting the second training label into the second prediction model to obtain a second training result; Calculating a second loss function according to the second training result and the second training label; Iterating the model parameters of the second prediction model based on the second loss function until the second loss function converges, thereby obtaining an updated second prediction model; The method further comprises: After the second prediction model is updated, the fourth cellular indicator is input into the updated second prediction model to obtain the antenna state number prediction value output by the updated second prediction model.
14. The method according to claim 1, wherein The second cellular indicator is an antenna number, and the method further includes: Determining whether the value of the second cellular indicator is consistent with the value of the third cellular indicator; When the value of the second cellular indicator is inconsistent with the value of the third cellular indicator, updating the value of the second preset parameter according to the value of the second cellular indicator; The antenna currently used in the electronic device is switched according to the value of the second preset parameter.
15. An electronic device, characterized in that: The electronic device includes a processor and a memory; the processor is coupled to the memory; the memory is used to store computer program code; the computer program code includes computer instructions, and when the processor executes the above-mentioned computer instructions, the electronic device executes the method as described in any one of claims 1-14.
16. A computer-readable storage medium, characterized in that The computer-readable storage medium comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 14.
17. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the processor is used to call computer instructions to enable the electronic device to execute the method as described in any one of claims 1-14.
Citation Information
Patent Citations
Diversity receiver
US20050059431A1