Antenna control method and electronic device
By calibrating motion data with a magnetometer and identifying user posture using an accelerometer and gyroscope, the direction of the terminal antenna is adjusted, solving the problem of reduced positioning accuracy of electronic devices during movement and achieving high-precision positioning under different postures.
Patent Information
- Application Number
- PCT/CN2025/114942
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-31
- Filing Date
- 2025-08-15
- Publication Date
- 2026-03-05
AI Technical Summary
During user movement, changes in the posture of electronic devices can cause the terminal antenna to be out of the maximum receiving direction of the positioning signal, thus reducing positioning accuracy.
By calibrating motion data with a magnetometer, combined with an accelerometer and gyroscope, the user's true posture is identified, and the direction of the terminal antenna is adjusted based on the identified posture to ensure that the antenna is always in the direction of maximum reception of positioning signals.
This improves the positioning accuracy of electronic devices, ensuring that the terminal antenna can fully receive positioning signals in different postures, thus enhancing positioning accuracy.
Smart Images

Figure CN2025114942_05032026_PF_FP_ABST
Abstract
Description
An antenna control method and electronic device
[0001] This application claims priority to Chinese Patent Application No. 202411227535.2, filed with the China National Intellectual Property Administration on August 31, 2024, entitled “An Antenna Control Method and Electronic Device”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of terminal technology, and in particular to an antenna control method and electronic device. Background Technology
[0003] With societal progress, people are increasingly valuing quality of life and physical health. During exercise, location tracking has become a crucial feature, with users utilizing smartwatches and other electronic devices for positioning. However, the orientation of these devices changes with the user's movement, causing the antenna's direction to shift. This can result in the antenna not being in the optimal receiving direction for positioning signals (such as GPS signals), leading to insufficient signal reception and reduced positioning accuracy. Summary of the Invention
[0004] This application provides an antenna control method and an electronic device, the electronic device including a terminal antenna and a magnetometer. The electronic device collects motion data from a first user, which is calibrated using the magnetometer. The electronic device compares the motion data with first motion data corresponding to multiple postures, and determines the first posture corresponding to the collected motion data from the multiple postures. The first motion data corresponding to each of the multiple postures is determined based on the collected motion data, and the first motion data corresponding to each of the multiple postures replaces the second motion data corresponding to each of the multiple postures, which is preset. The direction of the terminal antenna is adjusted based on the determined first posture. In this way, the terminal antenna can always be in the maximum receiving direction of the positioning signal to fully receive the positioning signal and ensure positioning accuracy.
[0005] In a first aspect, this application provides an antenna control method applied to a first electronic device, the first electronic device including a terminal antenna and a magnetometer. The method includes: collecting motion data of a first user, the motion data being calibrated by the magnetometer; comparing the motion data with first motion data corresponding to multiple postures, and determining the first posture corresponding to the collected motion data from the multiple postures; the first motion data corresponding to the multiple postures being determined based on the collected motion data, the first motion data corresponding to the multiple postures replacing the second motion data corresponding to the multiple postures, the second motion data being preset; and adjusting the direction of the terminal antenna based on the determined first posture.
[0006] Wherein, the first electronic device can be electronic device 100, the first user can be any user using electronic device 100, the first motion data can be an antenna direction adjustment threshold trained based on the collected motion data of the first user, the first posture can be the posture corresponding to the collected motion data determined based on the first motion data, and the second motion data can be a preset antenna direction adjustment threshold.
[0007] By implementing the method provided in the first aspect, the electronic device can integrate the motion data collected by the magnetometer and gravity sensor (including accelerometer and gyroscope) to calibrate and correct the accumulated errors in the use of the gravity sensor, thereby obtaining more accurate user motion data. In addition, the electronic device 100 can also train the motion data (i.e., antenna orientation adjustment threshold) corresponding to multiple postures based on the user motion data collected by the motion sensor, and replace the old antenna orientation adjustment threshold with the new antenna orientation adjustment threshold after training. The trained antenna orientation adjustment threshold is more in line with the user's motion habits and behaviors, making it more user-friendly and the antenna orientation adjustment more accurate, thereby ensuring the positioning accuracy of the electronic device 100.
[0008] In conjunction with the first aspect, in some embodiments, adjusting the direction of the terminal antenna based on the determined first posture specifically includes: determining the direction of the terminal antenna when collecting motion data based on the determined first posture; and adjusting the direction of the terminal antenna from the direction when collecting motion data to the target direction.
[0009] In this way, the terminal antenna can always be in the direction of maximum reception of positioning signals, so as to fully receive positioning signals and ensure positioning accuracy.
[0010] In conjunction with the first aspect, in some embodiments, the first electronic device is configured with an attitude-control information table, which includes multiple attitudes and control information for adjusting the direction of the terminal antenna corresponding to each of the multiple attitudes. Adjusting the direction of the terminal antenna based on the determined first attitude specifically includes: obtaining the first control information corresponding to the first attitude from the attitude-control information table; and adjusting the direction of the terminal antenna to the target direction based on the first control information.
[0011] In this way, the electronic device 100 can obtain the first control information corresponding to the first attitude of the electronic device 100 from the attitude-control information table; then, the electronic device 100 can adjust the direction of the terminal antenna to the target direction based on the first control information, so that the terminal antenna can always be in the maximum receiving direction of the positioning signal, so as to fully receive the positioning signal and ensure positioning accuracy.
[0012] In conjunction with the first aspect, in some embodiments, the first posture is different from the second posture, which is determined by comparing the collected motion data with the second motion data corresponding to each of the multiple postures.
[0013] In conjunction with the first aspect, in some embodiments, the method further includes: the antenna signal quality after adjusting the direction of the terminal antenna based on the first attitude is better than the antenna signal quality after adjusting the direction of the terminal antenna based on the second attitude.
[0014] Since the first motion data is determined based on the motion data of the first user, while the second motion data is preset, that is to say, the first motion data is more applicable to the first user than the second motion data. Therefore, the first posture is closer to the actual posture of the electronic device 100 during the first user's movement than the second posture. Furthermore, the antenna signal quality after adjusting the direction of the terminal antenna based on the first posture is better than the antenna signal quality after adjusting the direction of the terminal antenna based on the second posture.
[0015] In conjunction with the first aspect, in some embodiments, the method further includes: the antenna signal quality after adjusting the direction of the terminal antenna based on the third attitude is better than the antenna signal quality after adjusting the direction of the terminal antenna based on the second attitude, and the deviation between the third attitude and the first attitude is smaller than the deviation between the second attitude and the first attitude.
[0016] The third posture is any posture of the electronic device 100 that is closer to the first posture than the second posture.
[0017] Since the first posture is closer to the actual posture of the electronic device 100 during the first user's movement than the second posture, and the third posture is closer to the first posture than the second posture, the antenna signal quality after adjusting the direction of the terminal antenna based on the third posture is better than the antenna signal quality after adjusting the direction of the terminal antenna based on the second posture.
[0018] In conjunction with the first aspect, in some embodiments, the first motion data corresponding to each of the multiple postures is obtained by inputting the collected motion data of the first user into a first neural network model.
[0019] The first neural network model can be any model used to train the antenna orientation adjustment threshold for the first user.
[0020] In conjunction with the first aspect, in some embodiments, after adjusting the orientation of the terminal antenna based on the determined first attitude, the method further includes: updating the first signal strength received by the terminal antenna.
[0021] The first signal strength can be the positioning signal strength (e.g., GPS signal strength) received by the terminal antenna after adjusting the direction of the terminal antenna based on the first attitude.
[0022] For example, as shown in FIG8, the first signal strength can be indicated by indicator 812.
[0023] In conjunction with the first aspect, in some embodiments, the method further includes: the deviation between the first signal strength and the second signal strength is less than a first threshold, the second signal strength being the signal strength received by the terminal antenna after adjusting the direction of the terminal antenna based on a fourth attitude, and the fourth attitude being determined by comparing the collected third motion data of the first user with the first motion data corresponding to each of the multiple attitudes.
[0024] The third motion data can be the motion data of the first user collected by the electronic device 100 after the posture change.
[0025] In other words, no matter how the orientation of the electronic device 100 changes, the change in GPS signal strength is less than a certain threshold.
[0026] In conjunction with the first aspect, in some embodiments, the method further includes: calibrating the heading angle by means of the geomagnetic field direction, the geomagnetic field direction being measured by a magnetometer, the heading angle being used to calibrate motion data.
[0027] In this way, the electronic device 100 can calibrate the yaw angle error of the motion data collected by motion sensors such as accelerometers and gyroscopes using a magnetometer, thus ensuring the accuracy of the azimuth angle.
[0028] In a second aspect, this application provides an electronic device, the terminal device including a processor and a memory; wherein the memory is coupled to the processor, the memory is used to store a computer program, and when the processor executes the computer program, the electronic device performs the method of any one of the first aspects described above.
[0029] Thirdly, this application provides a computer-readable storage medium storing a computer program that is executed by a processor to implement the method described in any of the first aspects above.
[0030] Fourthly, this application provides a computer program product that, when executed by a processor, implements the method described in any one of the first aspects above.
[0031] Fifthly, this application provides a chip including a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, causing the chip to perform the method described in any of the first aspects above.
[0032] The solutions provided in the second to fifth aspects above are used to implement or cooperate with the methods provided in the first aspect above, and therefore can achieve the same or corresponding beneficial effects as the methods in the first aspect, which will not be elaborated here. Attached Figure Description
[0033] Figure 1 is a schematic diagram of a communication system provided in an embodiment of this application;
[0034] Figure 2A is a statistical chart of the swing amplitude and frequency data of user A during running, collected by an accelerometer according to an embodiment of this application;
[0035] Figure 2B is a statistical chart of the swing amplitude and frequency data of user B collected by an accelerometer during running, provided in an embodiment of this application.
[0036] Figure 3 is a schematic diagram of reference coordinates for an electronic device 100 provided in an embodiment of this application;
[0037] Figure 4A is a schematic diagram of the posture of an electronic device 100 provided in an embodiment of this application;
[0038] Figure 4B is a schematic diagram of the attitude of another electronic device 100 provided in an embodiment of this application;
[0039] Figure 4C is a schematic diagram of the attitude of another electronic device 100 provided in an embodiment of this application;
[0040] Figure 4D is a schematic diagram of the attitude of another electronic device 100 provided in an embodiment of this application;
[0041] Figure 4E is a schematic diagram of the attitude of another electronic device 100 provided in an embodiment of this application;
[0042] Figure 4F is a schematic diagram of the attitude of another electronic device 100 provided in an embodiment of this application;
[0043] Figure 5A is a schematic diagram of the attitude of an electronic device 100 and the direction of its terminal antenna according to an embodiment of this application;
[0044] Figure 5B is a schematic diagram of the attitude and direction of the terminal antenna of another electronic device 100 provided in an embodiment of this application;
[0045] Figure 6 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application;
[0046] Figure 7 is a flowchart illustrating an antenna control method applied to a first electronic device according to an embodiment of this application;
[0047] Figure 8 is a schematic diagram of an interface provided in an embodiment of this application;
[0048] Figure 9 is a flowchart illustrating an antenna control method provided in an embodiment of this application. Detailed Implementation
[0049] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be a limitation of this application.
[0050] With societal progress, people are increasingly valuing quality of life and physical health. During exercise, users can use smartwatches and other electronic devices with positioning capabilities to locate themselves. As shown in Figure 1, electronic device 100 can wirelessly communicate with positioning devices such as satellite 10 to obtain current location information. For example, electronic device 100 may be equipped with a terminal antenna. When performing satellite positioning, electronic device 100 can receive positioning signals (e.g., Global Positioning System (GPS) signals) sent by multiple positioning satellites at different locations, such as satellite 10, through the terminal antenna, and determine its current location based on these signals (e.g., GPS signals) to achieve satellite positioning functionality. It should be noted that since the positioning function of the electronic device is achieved by receiving positioning signals through its internal terminal antenna, the direction of the terminal antenna will affect the reception of the positioning signals, thereby affecting the positioning accuracy of the electronic device.
[0051] However, when a user moves, the posture of the electronic device changes with the user's movement state, and the direction of the terminal antenna in the electronic device also changes with the posture of the electronic device. This causes the terminal antenna to be unable to be in the maximum receiving direction of the positioning signal (such as GPS signal), thus making it unable to fully receive the positioning signal (such as GPS signal), thereby reducing the positioning accuracy of the electronic device.
[0052] Currently, the attitude of electronic devices is usually determined by gyroscopes and accelerometers. The determination result is then compared with a preset threshold, and the antenna switch is controlled according to the comparison result to adjust the direction of the terminal antenna. Finally, the change in the strength of the received GPS signal before and after the terminal antenna is adjusted is used to determine whether the terminal antenna has switched to normal state.
[0053] However, the above method has the following drawbacks: 1. The cumulative error of motion data collected by gyroscopes and accelerometers is relatively large, thus reducing the positioning accuracy of electronic devices. 2. Different users have different heights, arm lengths, and intensity of exercise, so the motion data collected for the same electronic device will also be different. The preset threshold is not applicable to all users, thus reducing the positioning accuracy of electronic devices. As shown in Figures 2A and 2B, Figure 2A shows the swing amplitude and frequency data of user A during running collected by the accelerometer. It can be seen that the swing amplitude of user A during running is between -25000 and 10000. Figure 2B shows the swing amplitude and frequency data of user B during running collected by the accelerometer. It can be seen that the swing amplitude of user B during running is between -20000 and 5000. It is evident that the swing amplitudes of user A and user B during running are different, that is, the motion data collected by the accelerometer for user A and user B are different. 3. The processing time of GPS signals (e.g., 1 second) is relatively long. Using GPS signals to determine whether the terminal antenna has switched to normal mode will result in a large deviation between the calculated result and the actual location of the electronic device, thereby reducing the positioning accuracy of the electronic device.
[0054] Taking a smartwatch as an example, when the smartwatch is worn by the user, its posture can be defined based on the reference coordinates shown in Figure 3. As shown in Figure 3, with the smartwatch's display facing outwards from the paper, the origin is the intersection of the hour and minute hands of the smartwatch, the x-axis is the direction the hour hand points to at three o'clock (i.e., the horizontal direction pointing to the right), the y-axis is the direction the minute hand points to at twelve o'clock (i.e., the vertical direction pointing to the zenith), and the z-axis is the horizontal direction perpendicular to the paper and outwards.
[0055] For example, the postures of a smartwatch can be shown in Figures 4A-4F. It should be noted that Figures 4A-4F only list some postures of a smartwatch when worn by a user. Smartwatches can have many other postures. The postures of smartwatches listed below are only for illustration in conjunction with the solution and do not represent the postures of electronic devices that this solution can support.
[0056] As shown in Figure 4A, the smartwatch display can point in the positive y-axis direction (i.e., the vertical direction pointing towards the zenith). When the smartwatch is in this orientation, the terminal antenna is in the direction of maximum reception of positioning signals (e.g., GPS signals), which is the positive y-axis direction (the vertical direction pointing towards the zenith). This allows the terminal antenna to receive positioning signals (e.g., GPS signals) effectively, ensuring the smartwatch's positioning accuracy.
[0057] As shown in Figure 4B, the smartwatch display can point in the positive z-axis direction (i.e., the horizontal direction perpendicular to the paper and outwards), and the nine o'clock position of the smartwatch can point towards the zenith. When the smartwatch is in this orientation, the terminal antenna is not in the maximum receiving direction of the positioning signal (e.g., GPS signal), resulting in poor reception of the positioning signal and low positioning accuracy for the smartwatch.
[0058] As shown in Figure 4C, the smartwatch display can point in the positive z-axis direction (i.e., the horizontal direction perpendicular to the paper and outwards), and the three o'clock position of the smartwatch can point towards the zenith. When the smartwatch is in this orientation, the terminal antenna is not in the maximum receiving direction of the positioning signal (e.g., GPS signal), resulting in poor reception of the positioning signal and low positioning accuracy for the smartwatch.
[0059] As shown in Figure 4D, the smartwatch display can point in the positive z-axis direction (i.e., a horizontal direction perpendicular to the paper and pointing outwards), and the smartwatch's six o'clock position points towards the zenith. When the smartwatch is in this orientation, the terminal antenna is not in the maximum receiving direction of positioning signals (e.g., GPS signals), resulting in poor reception of these signals and lower positioning accuracy.
[0060] As shown in Figure 4E, the smartwatch display can point in the positive z-axis direction (i.e., the horizontal direction perpendicular to the paper and outwards), and the smartwatch's 4:30 position points towards the zenith. When the smartwatch is in this orientation, the terminal antenna is not in the maximum receiving direction of the positioning signal (e.g., GPS signal), resulting in poor reception of the positioning signal and low positioning accuracy.
[0061] As shown in Figure 4F, the smartwatch display can point in the positive z-axis direction (i.e., the horizontal direction perpendicular to the paper and outwards), and the 7:30 position of the smartwatch points towards the zenith. When the smartwatch is in this orientation, the terminal antenna is not in the maximum receiving direction of the positioning signal (e.g., GPS signal), resulting in poor reception of the positioning signal and low positioning accuracy for the smartwatch.
[0062] In summary, the terminal antennas of electronic devices have different orientations depending on their orientation. The terminal antenna's ability to transmit and receive electromagnetic waves is strongest in the orientation it faces. In some orientations, the terminal antennas cannot fully receive positioning signals, leading to inaccurate positioning.
[0063] To address the aforementioned issues, this application provides an antenna control method and an electronic device. The electronic device includes a terminal antenna and a magnetometer. The electronic device collects motion data from a first user, which has been calibrated using the magnetometer. The electronic device compares the motion data with first motion data corresponding to multiple postures, and determines the first posture corresponding to the collected motion data from the multiple postures. The first motion data corresponding to each of the multiple postures is determined based on the collected motion data, and the first motion data corresponding to each of the multiple postures replaces the second motion data corresponding to each of the multiple postures, which is preset. The direction of the terminal antenna is adjusted based on the determined first posture. In this way, the terminal antenna can always be in the maximum receiving direction of the positioning signal to fully receive the positioning signal and ensure positioning accuracy.
[0064] For example, by using this solution, the direction of the terminal antenna can be as shown in Figures 5A and 5B. As shown in Figure 5A, the smartwatch display points in the positive y-axis direction (i.e., the vertical direction pointing towards the zenith). With the smartwatch in this orientation, the radiation direction of the terminal antenna (i.e., the direction of the terminal antenna) is the positive y-axis direction (the vertical direction pointing towards the zenith). At this time, the terminal antenna is in the maximum receiving direction of the positioning signal to ensure sufficient reception of the positioning signal and guarantee the positioning accuracy of the smartwatch. As shown in Figure 5B, the smartwatch display points in the positive z-axis direction (i.e., the horizontal direction perpendicular to the paper and outwards), and the three o'clock position of the smartwatch points towards the zenith. With the smartwatch in this orientation, the radiation direction of the terminal antenna (i.e., the direction of the terminal antenna) is the positive y-axis direction (the vertical direction pointing towards the zenith). At this time, the terminal antenna is still in the maximum receiving direction of the positioning signal to ensure sufficient reception of the positioning signal and guarantee the positioning accuracy of the smartwatch. In summary, by using this solution, the terminal antenna in the electronic device is always in the direction of maximum reception of positioning signals, regardless of the device's orientation, in order to fully receive positioning signals and ensure the positioning accuracy of the smartwatch.
[0065] First, an electronic device provided by an embodiment of this application is introduced.
[0066] Figure 6 illustrates the structure of an electronic device 100 provided in an embodiment of this application.
[0067] In this embodiment, the electronic device 100 can be used by the user during movement and has positioning functionality. The electronic device 100 can be various types of smart terminal devices; this embodiment does not limit the specific type of the electronic device 100. For example, the electronic device 100 can be a smartwatch, smart bracelet, mobile phone, etc. This embodiment only uses a watch as an example for illustration.
[0068] As shown in Figure 6, the electronic device 100 may include a processor 110, a magnetometer 120, an accelerometer 121, a gyroscope 122, an internal memory 130, a display screen 140, an antenna switch 150, a terminal antenna 160, a GPS filter 170, a GPS low-noise amplifier 171, a GPS demodulation module 172, and a location information reporting module 173. The processor 110, magnetometer 120, accelerometer 121, and gyroscope 122 can be collectively referred to as the processing and computing module, and the GPS filter 170, GPS low-noise amplifier 171, GPS demodulation module 172, and location information reporting module 173 can be collectively referred to as the signal receiving module.
[0069] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0070] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0071] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0072] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0073] In this embodiment, the processor 110 can be used to compare motion data collected by motion sensors such as magnetometer 120, accelerometer 121, and gyroscope 122 with first motion data corresponding to multiple postures of electronic device 100, and determine the first posture corresponding to the collected motion data from the multiple postures; the processor 110 can be used to determine the first motion data corresponding to each of the multiple postures of electronic device 100 based on the collected motion data; the processor 110 can also be used to configure a posture-control information table, which may include multiple postures of electronic device 100 and control information for adjusting the direction of terminal antenna 160 corresponding to each of the multiple postures; after determining the first posture, the processor 110 can also be used to obtain the first control information corresponding to the first posture from the posture-control information table, and send the first control information to antenna switching switch 150, which can be used to control antenna switching switch 150 to adjust the direction of terminal antenna 160 to the target direction.
[0074] The magnetometer 120 can measure the strength and direction of a magnetic field to determine the user's direction and position during movement, such as running, hiking, mountain climbing, skiing, or cycling. In this embodiment, the magnetometer 120 can be used to calibrate motion data collected by motion sensors such as the accelerometer 121 and gyroscope 122. Specifically, the magnetometer 120 can measure the Earth's magnetic field, and the direction of the magnetic field can be used to calibrate the heading angle. Therefore, the magnetometer 120 can be used to calibrate the yaw angle error of the motion data collected by motion sensors such as the accelerometer 121 and gyroscope 122, ensuring the accuracy of the azimuth angle.
[0075] Accelerometer 121 can detect the magnitude of acceleration of electronic device 100 in various directions (generally three axes) to collect motion data of the first user, thereby identifying the user's motion state and, further, the posture of electronic device 100. For example, accelerometer 121 can collect the amplitude and frequency of the user's running process to identify the user's motion state during running and, further, the posture of electronic device 100.
[0076] The gyroscope 122 can be used to determine the motion posture of the electronic device 100. In some embodiments, the electronic device 100 can use the gyroscope 122 to detect the angular velocity of the electronic device 100 around three axes (i.e., the x-axis, y-axis, and z-axis), calculate the motion data of the first user, thereby identifying the user's motion state, and further, identifying the posture of the electronic device 100.
[0077] In this embodiment, the processing and calculation module can be used to collect motion data of a first user, which may include, but is not limited to, the amplitude, frequency, intensity of the first user's movement, and the first user's height and arm length. The processing and calculation module can be used to compare the motion data collected by motion sensors such as magnetometer 120, accelerometer 121, and gyroscope 122 with the first motion data corresponding to each of the multiple postures of electronic device 100, and determine the first posture corresponding to the collected motion data from the multiple postures. The processing and calculation module can also be used to determine the first motion data corresponding to each of the multiple postures of electronic device 100 based on the collected motion data. The processing and calculation module can also be used to configure a posture-control information table, which may include multiple postures of electronic device 100 and control information for adjusting the direction of terminal antenna 160 corresponding to each of the multiple postures. After determining the first posture, the processing and calculation module can also be used to obtain the first control information corresponding to the first posture from the posture-control information table and send the first control information to antenna switching switch 150. The first control information can be used to control antenna switching switch 150 to adjust the direction of terminal antenna 160 to the target direction.
[0078] Internal memory 130 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 130. Internal memory 130 may include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as face recognition, fingerprint recognition, mobile payment, etc.). The data storage area may store data created during the use of electronic device 100 (such as face information template data, fingerprint information template, etc.). In addition, internal memory 130 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0079] The display screen 140 is used to display images, videos, etc. The display screen 140 may include a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 140, where N is a positive integer greater than 1. In this embodiment, the display screen 140 can be used to update the first signal strength (i.e., positioning signal strength, such as GPS signal strength) received by the terminal antenna 160 and to display the location information of the first user.
[0080] The antenna switching switch 150 can be used to receive the first control information sent by the processing and computing module, and adjust the direction of the terminal antenna 160 to the target direction based on the first control information.
[0081] The terminal antenna 160 can be used to transmit and receive electromagnetic waves. In this embodiment, when the electronic device is in different postures, the terminal antenna 160 can always be in the direction with the strongest ability to transmit and receive electromagnetic waves, so as to fully receive the positioning signal and ensure the positioning accuracy of the electronic device 100.
[0082] GPS filter 170 can be used to filter electromagnetic waves received by terminal antenna 160. Specifically, GPS filter 170 can be used to filter out or attenuate signals other than a specific frequency.
[0083] The GPS low-noise amplifier 171 can be used to amplify filtered electromagnetic waves. Specifically, the GPS low-noise amplifier 171 can amplify the weak signal received by the terminal antenna 160 and reduce noise to improve the output signal-to-noise ratio.
[0084] GPS demodulation module 172 can be used to demodulate amplified electromagnetic waves, thereby providing information for positioning calculations.
[0085] The location information reporting module 173 can be used to convert the demodulated GPS signal into location information and report the location information to the display screen 140 for display.
[0086] In this embodiment, the signal receiving module can be used to receive GPS signals and convert the received GPS signals into location information. The signal receiving module can also be used to report the GPS signal strength and location information received by the terminal antenna 160 to the display screen 140.
[0087] The following is a detailed flowchart illustrating an antenna control method for a first electronic device provided in an embodiment of this application.
[0088] Figure 7 illustrates, exemplarily, a specific flow of an antenna control method applied to a first electronic device according to an embodiment of this application. The first electronic device may be the electronic device 100 shown in Figure 6.
[0089] As shown in Figure 7, the method may include:
[0090] S101. Collect the motion data of the first user.
[0091] In this embodiment, the electronic device 100 can collect motion data of the first user through motion sensors such as accelerometers, gyroscopes, and magnetometers, and further determine the posture of the electronic device 100 corresponding to the motion data. The motion data is calibrated using a magnetometer and may include, but is not limited to, the amplitude, frequency, and intensity of the first user's movement, as well as the first user's height and arm length.
[0092] Specifically, the electronic device 100 can use an accelerometer to detect the magnitude of its acceleration in various directions (x-axis, y-axis, and z-axis) to collect the motion data of the first user, thereby identifying the user's motion state and, further, the posture of the electronic device 100. The first user's motion can be, for example, running, hiking, mountain climbing, skiing, cycling, etc. For example, if the first user's motion is running, the electronic device 100 can use an accelerometer to collect the amplitude and frequency of the user's running motion, thereby identifying the user's motion state during running and, further, the posture of the electronic device 100.
[0093] Specifically, the electronic device 100 can use a gyroscope to detect the angular velocity of the electronic device 100 around three axes (i.e., the x-axis, y-axis, and z-axis) to collect the motion data of the first user, thereby identifying the user's motion state and, further, identifying the posture of the electronic device 100.
[0094] Specifically, the electronic device 100 can calibrate its heading angle using the direction of the geomagnetic field, which is measured by a magnetometer. This heading angle can be used to calibrate the motion data of the first user. In this way, the electronic device 100 can calibrate the yaw angle error of the motion data collected by motion sensors such as accelerometers and gyroscopes using a magnetometer, ensuring the accuracy of the azimuth angle.
[0095] S102. Compare the motion data with the first motion data corresponding to each of the multiple postures, and determine the first posture corresponding to the collected motion data from the multiple postures.
[0096] In this embodiment, the electronic device 100 can compare the collected motion data with first motion data corresponding to multiple postures of the electronic device 100, and determine the first posture corresponding to the motion data from the multiple postures, so as to adjust the direction of the terminal antenna based on the determined first posture. The first motion data corresponding to the multiple postures of the electronic device 100 is determined based on the collected motion data, and the first motion data corresponding to each of the multiple postures replaces the second motion data corresponding to each of the multiple postures. The second motion data is preset. In some embodiments, the second motion data may be a default value set at the factory of the electronic device 100, which may be empirical data. In other embodiments, the second motion data may be determined based on the motion data of a second user, the previous user of the electronic device 100.
[0097] The multiple postures of the electronic device 100 can be the postures that the electronic device 100 may adopt during the first user's movement. It is understood that the first user's movement state (posture) will continuously change during the movement, and the posture of the electronic device 100 will also continuously change accordingly. The transition time required for different movement states (postures) of the first user is different. In some embodiments, the duration of collecting motion data is not less than the shortest duration among the transition times required for different movement states (postures) of the first user, so that the electronic device 100 can collect motion data corresponding to at least one posture of the electronic device 100. For example, if the first user has three movement states (postures) during running, and the transition times required for these three movement states (postures) are 0.5 seconds, 0.7 seconds, and 0.8 seconds respectively, then the duration of collecting motion data is not less than 0.5 seconds.
[0098] In some embodiments, the first motion data corresponding to each of the multiple postures is obtained by inputting the collected motion data of the first user into a first neural network model. Specifically, the first neural network model can be trained using a first training set, with a confidence level higher than a specific confidence value, such as 90%. The first training set includes a large number of training samples, one of which may include an input and its corresponding output sample. The input may include the motion data of the first user, which may include, but is not limited to, the amplitude, frequency, and intensity of the first user's movement, as well as the first user's height and arm length. The output sample may be the first motion data corresponding to each of the multiple postures of the electronic device 100. The first motion data corresponding to each of the multiple postures of the electronic device 100 can typically be the motion data thresholds corresponding to each of the multiple postures of the electronic device 100, as recognized by the field of kinesiology, when a human performs the movement indicated by the motion data of the first user in the training sample. Therefore, it is generally reliable and can be used to train the neural network. It is understood that the electronic device 100 can input the collected motion data of the first user into the first neural network model multiple times for training to obtain different motion data thresholds corresponding to each of the multiple postures. These multiple movements can be of different types, and the embodiments of this application do not limit the number of training times for the user's motion data.
[0099] In some embodiments, the first posture of the electronic device 100 differs from the second posture of the electronic device 100. The second posture is determined by the electronic device 100 by comparing the collected motion data with second motion data corresponding to each of the multiple postures. Since the first motion data is determined based on the collected motion data of the first user, while the second motion data is preset, that is, the first motion data is more applicable to the first user than the second motion data, the first posture is closer to the actual posture of the electronic device 100 during the first user's movement than the second posture.
[0100] S103. Adjust the direction of the terminal antenna based on the determined first attitude.
[0101] In some embodiments, the electronic device 100 can determine the direction of the terminal antenna when collecting motion data based on a determined first posture of the electronic device 100. Then, the electronic device 100 can adjust the direction of the terminal antenna from the direction when collecting motion data to a target direction, so that the terminal antenna can always be in the maximum receiving direction of the positioning signal, thereby fully receiving the positioning signal and ensuring positioning accuracy. The target direction can be, for example, pointing towards the zenith. It is understood that the target direction can also be any direction other than pointing towards the zenith, and this embodiment does not limit this.
[0102] In some embodiments, the electronic device 100 is configured with an attitude-control information table, which may include multiple attitudes of the electronic device 100 and control information for adjusting the direction of the terminal antenna corresponding to each of the multiple attitudes. Specifically, the electronic device 100 can obtain first control information corresponding to a first attitude of the electronic device 100 from the attitude-control information table. Then, the electronic device 100 can adjust the direction of the terminal antenna to the target direction based on the first control information, so that the terminal antenna can always be in the maximum receiving direction of the positioning signal, so as to fully receive the positioning signal and ensure positioning accuracy.
[0103] As an example, Table 1 below provides an example of an attitude-control information table.
[0104] Table 1
[0105] In this example, the first attitude can correspond to the first control information, which controls the terminal antenna to adjust its direction to the target direction; the second attitude can correspond to the second control information, which controls the terminal antenna to adjust its direction to the target direction, and so on. It is understood that the number of attitudes of the electronic device 100 and their corresponding control information contained in the attitude-control information table is greater than or equal to two. Referring to Figure 6, the control information can be control information for an antenna switching switch. It is understood that this application embodiment only provides an example of adjusting the direction of the terminal antenna using one antenna switching switch for illustration. The electronic device 100 can also adjust the direction of the terminal antenna using multiple antenna switching switches, and this application embodiment does not limit this. In some embodiments, the control information can be used to control the antenna switching switch to operate in the corresponding switching state, thereby adjusting the direction of the terminal antenna to the target direction. In this way, the terminal antenna can always be in the maximum receiving direction of the positioning signal, so as to fully receive the positioning signal and ensure positioning accuracy. Regarding the relationship between the switching state of the antenna switching switch and the adjustment of the terminal antenna direction, please refer to the following patent document: Wu Haobo et al., “An antenna structure and electronic device”, CN202310706987.8, March 27, 2023, the entire contents of which are incorporated herein by reference.
[0106] Since the first motion data is determined based on the collected motion data of the first user, while the second motion data is preset, meaning that the first motion data is more applicable to the first user than the second motion data, the first posture is closer to the actual posture of the electronic device 100 during the first user's movement than the second posture. In some embodiments, the antenna signal quality after adjusting the direction of the terminal antenna based on the first posture of the electronic device 100 is better than the antenna signal quality after adjusting the direction of the terminal antenna based on the second posture of the electronic device 100.
[0107] In some embodiments, the antenna signal quality after adjusting the direction of the terminal antenna based on the third attitude is better than the antenna signal quality after adjusting the direction of the terminal antenna based on the second attitude, and the deviation between the third attitude and the first attitude is smaller than the deviation between the second attitude and the first attitude. Since the first attitude is closer to the actual attitude of the electronic device 100 during the first user's movement than the second attitude, and the third attitude is closer to the first attitude than the second attitude, the antenna signal quality after adjusting the direction of the terminal antenna based on the third attitude is better than the antenna signal quality after adjusting the direction of the terminal antenna based on the second attitude.
[0108] In some embodiments, after adjusting the direction of the terminal antenna based on the first posture of the electronic device 100, the electronic device 100 can receive a first signal (i.e., a positioning signal, such as a GPS signal) and update the first signal strength received by the terminal antenna (i.e., the positioning signal strength, such as the GPS signal strength). Furthermore, the electronic device 100 can also convert the received first signal (i.e., the positioning signal, such as the GPS signal) into location information. For example, as shown in FIG8, after adjusting the direction of the terminal antenna based on the first posture of the electronic device 100, the electronic device 100 can receive a GPS signal and display a user interface 810. The user interface 810 may include a text box 811, which may include GPS signal strength indication information (e.g., an indicator 812) and the location information of the first user (e.g., "Your location is: xx Province xx City xx District xx Street xx Community xx Building xx Room"). The GPS signal strength indication information can be used to indicate the GPS signal strength received by the electronic device 100 through the terminal antenna. In some embodiments, the GPS signal strength can be displayed not only using the indicator 812, but also using scores, signal strength levels, etc. This application embodiment does not limit the display format of the GPS signal strength. In this embodiment, by using this solution, the direction of the terminal antenna can be adjusted to the target direction, so the terminal antenna can always be in the direction of maximum GPS signal reception. Therefore, the GPS signal can be fully received, and the GPS signal strength can be updated to be close to the peak signal strength (for example, indicator 812 is used to indicate that the GPS signal strength is at its strongest level). Furthermore, the location information of the first user is also more accurate. Here, "close to the peak signal strength" can mean that the deviation between the GPS signal strength and the peak signal strength is less than a certain threshold.
[0109] In some embodiments, the deviation between the first signal strength and the second signal strength is less than a first threshold. The second signal strength is the signal strength received by the terminal antenna after adjusting the direction of the terminal antenna based on a fourth attitude. The fourth attitude is determined by comparing the collected third motion data of the first user with the first motion data corresponding to each of the multiple attitudes of the electronic device 100, and from the multiple attitudes of the electronic device 100. The third motion data can be the motion data of the first user collected by the electronic device 100 after an attitude change. That is, regardless of how the attitude of the electronic device 100 changes, the change in GPS signal strength is less than a certain threshold.
[0110] The aforementioned deviation can be measured using various mathematical operations, such as subtraction, division, and mixed operations, which are not limited in this embodiment. For example, the difference between the first signal strength and the second signal strength can be taken, and the difference can be used to measure the deviation between the first and second signal strengths. In this case, the first threshold can be a specific signal strength difference (e.g., 1 dBm). Alternatively, the difference between the first and second signal strengths can be obtained by first taking the difference between them, and then comparing this difference with the first signal strength to obtain a ratio. This ratio can be used to measure the deviation between the first and second signal strengths. In this case, the first threshold can be a specific signal strength ratio (e.g., 5%).
[0111] The following is a flowchart illustrating an antenna control method provided in an embodiment of this application.
[0112] Figure 9 illustrates, for example, the specific flow of an antenna control method provided in an embodiment of this application.
[0113] As shown in Figure 9, the method may include:
[0114] S201. Collect the motion data of the first user.
[0115] Step S201 is similar to step S101 shown in Figure 7 above. The specific execution process of step S201 can be referred to the relevant text description in step S101 shown in Figure 7 above, and will not be repeated here.
[0116] S202. Determine whether the first user is selecting the sports type for the first time.
[0117] Specifically, before collecting the first user's exercise data, the electronic device 100 can detect the type of exercise selected by the first user, which may include, but is not limited to, running, hiking, mountain climbing, skiing, and cycling.
[0118] Specifically, after collecting the motion data of the first user, the electronic device 100 can determine whether the first user is selecting a motion type for the first time. If so, the electronic device 100 can compare the collected motion data with the second motion data corresponding to each of the multiple postures, and determine the second posture corresponding to the collected motion data from the multiple postures. If not, the electronic device 100 can compare the collected motion data with the first motion data corresponding to each of the multiple postures, and determine the first posture corresponding to the collected motion data from the multiple postures.
[0119] For example, if the first user selects running as the sport and the electronic device 100 determines that the first user is running for the first time, the electronic device 100 can compare the collected motion data such as amplitude and frequency of the first user during the running process with the second motion data corresponding to each of the multiple postures, and determine the second posture corresponding to the collected motion data from the multiple postures.
[0120] S203. Compare the motion data with the second motion data corresponding to each of the multiple postures, and determine the second posture corresponding to the collected motion data from the multiple postures.
[0121] The second motion data is preset. In some embodiments, the second motion data may be a default value set at the factory when the electronic device 100 is manufactured, and this default value may be empirical data. In other embodiments, the second motion data may be determined based on the motion data of a second user, who is the previous user of the electronic device 100.
[0122] The multiple postures of the electronic device 100 can be the postures that the electronic device 100 may adopt during the first user's movement. It is understood that the first user's movement state (posture) will continuously change during the movement, and the posture of the electronic device 100 will also continuously change accordingly. The transition time required for different movement states (postures) of the first user is different. In some embodiments, the duration of collecting motion data is not less than the shortest duration among the transition times required for different movement states (postures) of the first user, so that the electronic device 100 can collect motion data corresponding to at least one posture of the electronic device 100. For example, if the first user has three movement states (postures) during running, and the transition times required for these three movement states (postures) are 0.5 seconds, 0.7 seconds, and 0.8 seconds respectively, then the duration of collecting motion data is not less than 0.5 seconds.
[0123] In some embodiments, the second posture of the electronic device 100 is determined by the electronic device 100 by comparing the collected motion data with the second motion data corresponding to each of the multiple postures.
[0124] S204. Adjust the direction of the terminal antenna based on the determined second attitude.
[0125] In some embodiments, the electronic device 100 can determine the direction of the terminal antenna when acquiring motion data based on a determined second posture of the electronic device 100. Then, the electronic device 100 can adjust the direction of the terminal antenna from the direction when acquiring motion data to a target direction. The target direction can be, for example, pointing towards the zenith. It is understood that the target direction can also be any direction other than pointing towards the zenith, and this embodiment of the application does not limit this.
[0126] In some embodiments, the electronic device 100 is configured with an attitude-control information table, which may include multiple attitudes of the electronic device 100 and control information corresponding to each of the multiple attitudes for adjusting the direction of the terminal antenna. Specifically, the electronic device 100 can obtain second control information corresponding to a second attitude of the electronic device 100 from the attitude-control information table. Then, the electronic device 100 can adjust the direction of the terminal antenna to the target direction based on the second control information.
[0127] In some embodiments, after adjusting the orientation of the terminal antenna based on the second attitude of the electronic device 100, the electronic device 100 can receive a first signal (i.e., a positioning signal, such as a GPS signal) and update the strength of the first signal received by the terminal antenna (i.e., the positioning signal strength, such as the GPS signal strength). Furthermore, the electronic device 100 can also convert the received first signal (i.e., the positioning signal, such as the GPS signal) into location information.
[0128] In some embodiments, the deviation between the first signal strength and the second signal strength is less than a first threshold. The second signal strength is the signal strength received by the terminal antenna after adjusting the direction of the terminal antenna based on a fourth attitude. The fourth attitude is determined by comparing the collected third motion data of the first user with the first motion data corresponding to each of the multiple attitudes of the electronic device 100, and from the multiple attitudes of the electronic device 100. The third motion data can be the motion data of the first user collected by the electronic device 100 after an attitude change. That is, regardless of how the attitude of the electronic device 100 changes, the change in GPS signal strength is less than a certain threshold.
[0129] The aforementioned deviation can be measured using various mathematical operations, such as subtraction, division, and mixed operations, which are not limited in this embodiment. For example, the difference between the first signal strength and the second signal strength can be taken, and the difference can be used to measure the deviation between the first and second signal strengths. In this case, the first threshold can be a specific signal strength difference (e.g., 1 dBm). Alternatively, the difference between the first and second signal strengths can be obtained by first taking the difference between them, and then comparing this difference with the first signal strength to obtain a ratio. This ratio can be used to measure the deviation between the first and second signal strengths. In this case, the first threshold can be a specific signal strength ratio (e.g., 5%).
[0130] S205. Based on the collected motion data, determine the first motion data corresponding to each of the multiple postures, and replace the second motion data with the first motion data.
[0131] Specifically, the electronic device 100 can determine first motion data corresponding to each of its multiple postures based on the collected motion data. If the first motion data differs from the second motion data, the electronic device 100 can replace the second motion data corresponding to each of the multiple postures with the first motion data corresponding to each of the multiple postures.
[0132] In some embodiments, the first motion data corresponding to each of the multiple postures is obtained by inputting the collected motion data of the first user into a first neural network model. Specifically, the first neural network model can be trained using a first training set, with a confidence level higher than a specific confidence value, such as 90%. The first training set includes a large number of training samples, one of which may include an input and its corresponding output sample. The input may include the motion data of the first user, which may include, but is not limited to, the amplitude, frequency, and intensity of the first user's movement, as well as the first user's height and arm length. The output sample may be the first motion data corresponding to each of the multiple postures of the electronic device 100. The first motion data corresponding to each of the multiple postures of the electronic device 100 can typically be the motion data thresholds corresponding to each of the multiple postures of the electronic device 100, as recognized by the field of kinesiology, when a human performs the movement indicated by the motion data of the first user in the training sample. Therefore, it is generally reliable and can be used to train the neural network. It is understood that the electronic device 100 can input the collected motion data of the first user into the first neural network model multiple times for training to obtain different motion data thresholds corresponding to each of the multiple postures. These multiple movements can be of different types, and the embodiments of this application do not limit the number of training times for the user's motion data.
[0133] S206. Compare the motion data with the first motion data corresponding to each of the multiple postures, and determine the first posture corresponding to the collected motion data from the multiple postures.
[0134] The multiple postures of the electronic device 100 can be the postures that the electronic device 100 may adopt during the first user's movement. It is understood that the first user's movement state (posture) will continuously change during the movement, and the posture of the electronic device 100 will also continuously change accordingly. The transition time required for different movement states (postures) of the first user is different. In some embodiments, the duration of collecting motion data is not less than the shortest duration among the transition times required for different movement states (postures) of the first user, so that the electronic device 100 can collect motion data corresponding to at least one posture of the electronic device 100. For example, if the first user has three movement states (postures) during running, and the transition times required for these three movement states (postures) are 0.5 seconds, 0.7 seconds, and 0.8 seconds respectively, then the duration of collecting motion data is not less than 0.5 seconds.
[0135] In some embodiments, the first posture of the electronic device 100 is determined by the electronic device 100 by comparing the collected motion data with the first motion data corresponding to each of the multiple postures.
[0136] In some embodiments, the first posture of the electronic device 100 is different from the second posture of the electronic device 100. Since the first motion data is determined based on the motion data of the first user, while the second motion data is preset, that is, the first motion data is more applicable to the first user than the second motion data. Therefore, the first posture is closer to the actual posture of the electronic device 100 during the first user's movement than the second posture.
[0137] S207. Adjust the direction of the terminal antenna based on the determined first attitude.
[0138] In some embodiments, the electronic device 100 can determine the direction of the terminal antenna when collecting motion data based on a determined first posture of the electronic device 100. Then, the electronic device 100 can adjust the direction of the terminal antenna from the direction when collecting motion data to a target direction, so that the terminal antenna can always be in the maximum receiving direction of the positioning signal, thereby fully receiving the positioning signal and ensuring positioning accuracy. The target direction can be, for example, pointing towards the zenith. It is understood that the target direction can also be any direction other than pointing towards the zenith, and this embodiment does not limit this.
[0139] In some embodiments, the electronic device 100 is configured with an attitude-control information table, which may include multiple attitudes of the electronic device 100 and control information for adjusting the direction of the terminal antenna corresponding to each of the multiple attitudes. Specifically, the electronic device 100 can obtain first control information corresponding to a first attitude of the electronic device 100 from the attitude-control information table. Then, the electronic device 100 can adjust the direction of the terminal antenna to the target direction based on the first control information, so that the terminal antenna can always be in the maximum receiving direction of the positioning signal, so as to fully receive the positioning signal and ensure positioning accuracy.
[0140] Since the first motion data is determined based on the collected motion data of the first user, while the second motion data is preset, meaning that the first motion data is more applicable to the first user than the second motion data, the first posture is closer to the actual posture of the electronic device 100 during the first user's movement than the second posture. In some embodiments, the antenna signal quality after adjusting the direction of the terminal antenna based on the first posture of the electronic device 100 is better than the antenna signal quality after adjusting the direction of the terminal antenna based on the second posture of the electronic device 100.
[0141] In some embodiments, the antenna signal quality after adjusting the direction of the terminal antenna based on the third attitude is better than the antenna signal quality after adjusting the direction of the terminal antenna based on the second attitude, and the deviation between the third attitude and the first attitude is smaller than the deviation between the second attitude and the first attitude. Since the first attitude is closer to the actual attitude of the electronic device 100 during the first user's movement than the second attitude, and the third attitude is closer to the first attitude than the second attitude, the antenna signal quality after adjusting the direction of the terminal antenna based on the third attitude is better than the antenna signal quality after adjusting the direction of the terminal antenna based on the second attitude.
[0142] In some embodiments, after adjusting the direction of the terminal antenna based on the first attitude of the electronic device 100, the electronic device 100 can receive a first signal (i.e., a positioning signal, such as a GPS signal) and update the first signal strength received by the terminal antenna (i.e., the positioning signal strength, such as the GPS signal strength). Furthermore, the electronic device 100 can also convert the received first signal (i.e., the positioning signal, such as the GPS signal) into location information.
[0143] In some embodiments, the deviation between the first signal strength and the second signal strength is less than a first threshold. The second signal strength is the signal strength received by the terminal antenna after adjusting the direction of the terminal antenna based on a fourth attitude. The fourth attitude is determined by comparing the collected third motion data of the first user with the first motion data corresponding to each of the multiple attitudes of the electronic device 100, and from the multiple attitudes of the electronic device 100. The third motion data can be the motion data of the first user collected by the electronic device 100 after an attitude change. That is, regardless of how the attitude of the electronic device 100 changes, the change in GPS signal strength is less than a certain threshold.
[0144] The aforementioned deviation can be measured using various mathematical operations, such as subtraction, division, and mixed operations, which are not limited in this embodiment. For example, the difference between the first signal strength and the second signal strength can be taken, and the difference can be used to measure the deviation between the first and second signal strengths. In this case, the first threshold can be a specific signal strength difference (e.g., 1 dBm). Alternatively, the difference between the first and second signal strengths can be obtained by first taking the difference between them, and then comparing this difference with the first signal strength to obtain a ratio. This ratio can be used to measure the deviation between the first and second signal strengths. In this case, the first threshold can be a specific signal strength ratio (e.g., 5%).
[0145] By using this solution, the electronic device 100 can integrate a magnetometer to calibrate the gravity sensor (including an accelerometer and a gyroscope) to correct the accumulated errors during the use of the gravity sensor, thereby obtaining more accurate user motion data. In addition, the electronic device 100 can also train the motion data corresponding to multiple postures (i.e., antenna orientation adjustment thresholds) based on the user motion data collected by the motion sensor, and replace the old antenna orientation adjustment thresholds with the new ones after training. The trained antenna orientation adjustment thresholds are more in line with the user's motion habits and behaviors, making them more user-friendly and the antenna orientation adjustment more accurate, thus ensuring the positioning accuracy of the electronic device 100.
[0146] Based on the embodiments of this application, the electronic device 100 has the function of accurate positioning; regardless of the change in the attitude of the electronic device 100, the change in GPS signal strength is small and the GPS signal strength is strong; in addition, at the code level, the electronic device 100 implements training on the antenna direction adjustment threshold based on user motion data collected by motion sensors, and integrates magnetometer to correct the accumulated errors in the use of accelerometer and gyroscope.
[0147] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the steps performed by the electronic device in the above method embodiments, or the steps performed by the human-computer interaction module and the computing module.
[0148] This application also provides a computer program product that, when run on a terminal device, enables the terminal device to perform the steps executed by the electronic device in the above method embodiments.
[0149] This application also provides a chip system, which includes a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the steps performed by the electronic device in any of the method embodiments of this application. The chip system can be a single chip or a chip module composed of multiple chips.
[0150] The term "user interface (UI)," or simply "interface," used in the specification and accompanying drawings of this application, refers to the medium through which an application or operating system interacts and exchanges information with the user. It facilitates the conversion between the internal form of information and a form acceptable to the user. The user interface of an application is written in source code using specific computer languages such as Java or Extensible Markup Language (XML). This source code is parsed and rendered on the terminal device, ultimately presenting user-recognizable content, such as images, text, and buttons. Controls, also known as widgets, are the basic elements of the user interface. Typical controls include toolbars, menu bars, text boxes, buttons, scroll bars, images, and text. The attributes and content of controls in the interface are defined using tags or nodes, such as XML tags. <textview> 、 <imgview> 、 <videoview>Nodes define the controls contained in the interface. A node corresponds to a control or property in the interface, and after parsing and rendering, the node is presented as the content visible to the user. In addition, many applications, such as hybrid applications, often contain web pages within their interfaces. A web page, also known as a webpage, can be understood as a special control embedded in the application interface. Web pages are source code written in a specific computer language, such as Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), JavaScript (JS), etc. Web page source code can be loaded and displayed as user-readable content by a browser or a web page display component with browser-like functionality. The specific content contained in a webpage is also defined through tags or nodes in the webpage source code; for example, HTML uses tags or nodes to define the content. 、 、 <video> 、 <canvas>Used to define the elements and attributes of a webpage.
[0151] The most common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the screen of an electronic device. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
[0152] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0153] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0154] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if..." or "after..." or "in response to determining..." or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is detected" can be interpreted as meaning "if determining..." or "in response to determining..." or "when (the stated condition or event) is detected" or "in response to detecting (the stated condition or event)".
[0155] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0156] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.< / canvas> < / video> < / videoview> < / imgview> < / textview>
Claims
1. An antenna control method, applied to a first electronic device, characterized in that, The first electronic device includes a terminal antenna and a magnetometer, and the method includes: The motion data of the first user is collected, and the motion data is calibrated using the magnetometer; The motion data is compared with first motion data corresponding to each of the multiple postures, and the first posture corresponding to the collected motion data is determined from the multiple postures; the first motion data corresponding to each of the multiple postures is determined based on the collected motion data, and the first motion data corresponding to each of the multiple postures replaces the second motion data corresponding to each of the multiple postures, the second motion data being preset; The direction of the terminal antenna is adjusted based on the determined first attitude.
2. The method according to claim 1, characterized in that, Adjusting the direction of the terminal antenna based on the determined first attitude specifically includes: The direction of the terminal antenna when collecting the motion data is determined based on the first determined posture; Adjust the direction of the terminal antenna from the direction when collecting the motion data to the target direction.
3. The method according to claim 2, characterized in that, The first electronic device is configured with an attitude-control information table, which includes multiple attitudes and control information for adjusting the direction of the terminal antenna corresponding to each of the multiple attitudes. The step of adjusting the direction of the terminal antenna based on the determined first attitude specifically includes: Obtain the first control information corresponding to the first attitude from the attitude-control information table; Based on the first control information, the direction of the terminal antenna is adjusted to the target direction.
4. The method according to any one of claims 1-3, characterized in that, The first posture is different from the second posture, which is determined by comparing the collected motion data with the second motion data corresponding to each of the plurality of postures.
5. The method according to claim 4, characterized in that, The method further includes: The antenna signal quality after adjusting the direction of the terminal antenna based on the first attitude is better than the antenna signal quality after adjusting the direction of the terminal antenna based on the second attitude.
6. The method according to claim 4 or 5, characterized in that, The method further includes: The antenna signal quality after adjusting the direction of the terminal antenna based on the third attitude is better than the antenna signal quality after adjusting the direction of the terminal antenna based on the second attitude, and the deviation between the third attitude and the first attitude is smaller than the deviation between the second attitude and the first attitude.
7. The method according to any one of claims 1-6, characterized in that, The first motion data corresponding to each of the multiple postures is obtained by inputting the collected motion data of the first user into the first neural network model.
8. The method according to any one of claims 1-7, characterized in that, After adjusting the orientation of the terminal antenna based on the determined first attitude, the method further includes: Update the first signal strength received by the terminal antenna.
9. The method according to claim 8, characterized in that, The method further includes: The deviation between the first signal strength and the second signal strength is less than a first threshold. The second signal strength is the signal strength received by the terminal antenna after adjusting the direction of the terminal antenna based on the fourth attitude. The fourth attitude is determined by comparing the third motion data of the first user collected with the first motion data corresponding to each of the plurality of attitudes.
10. The method according to any one of claims 1-9, characterized in that, The method further includes: The heading angle is calibrated by the direction of the geomagnetic field, which is measured by the magnetometer, and the heading angle is used to calibrate the motion data.
11. An electronic device, characterized in that, The electronic device includes a processor and a memory; wherein the memory is coupled to the processor and is used to store a computer program, which, when executed by the processor, causes the terminal device to perform the method as described in any one of claims 1-10.
12. A computer storage medium, characterized in that, The computer storage medium stores a computer program that, when executed by a processor, causes the electronic device to perform the method as described in any one of claims 1-10.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it causes the electronic device to perform the method as described in any one of claims 1-10.
Citation Information
Patent Citations
Method and device for determining postures and VR equipment
CN108196701A
Watch and GPS antenna structure thereof
CN112952355A
Antenna attitude detection equipment and method
CN113805201A
Antenna assembly, movable device, and control method and storage medium of movable device
WO2022087992A1