Antenna matching method and device, mobile terminal and storage medium

文档序号:1941663 发布日期:2021-12-07 浏览:27次 中文

阅读说明:本技术 天线匹配方法、装置、移动终端和存储介质 (Antenna matching method and device, mobile terminal and storage medium ) 是由 应凤英 于 2021-09-24 设计创作,主要内容包括:本申请涉及一种天线匹配方法、装置、移动终端和存储介质。所述方法包括:获取移动终端的状态信息,根据状态信息判断移动终端当前是否处于通信状态;若移动终端处于通信状态,则确定移动终端处于通信状态下的工作模式;若移动终端处于通信状态的工作模式为第一工作模式,则采用传感器检测模块获取用户对移动终端的手势数据;根据手势数据确定用户对移动终端的握持手势状态;基于用户对移动终端的握持手势状态从多个天线中匹配对应的目标天线;本方法通过识别出移动终端处于通信状态下时用户对移动终端当前的握持手势状态,以匹配出通信质量最好的目标天线,从而不但可实现天线的自由切换,还能进一步提高通信速率和质量。(The application relates to an antenna matching method, an antenna matching device, a mobile terminal and a storage medium. The method comprises the following steps: acquiring state information of the mobile terminal, and judging whether the mobile terminal is in a communication state currently or not according to the state information; if the mobile terminal is in a communication state, determining that the mobile terminal is in a working mode in the communication state; if the working mode of the mobile terminal in the communication state is a first working mode, acquiring gesture data of a user on the mobile terminal by using a sensor detection module; determining the holding gesture state of the user on the mobile terminal according to the gesture data; matching a corresponding target antenna from the multiple antennas based on the holding gesture state of the mobile terminal by the user; according to the method, the current holding gesture state of the user on the mobile terminal is identified when the mobile terminal is in the communication state, so that the target antenna with the best communication quality is matched, free switching of the antenna can be realized, and the communication speed and quality can be further improved.)

1. An antenna matching method is applied to a mobile terminal, the mobile terminal comprises a plurality of antennas, and the antenna matching method is characterized by comprising the following steps:

acquiring state information of the mobile terminal, and judging whether the mobile terminal is in a communication state currently or not according to the state information;

if the mobile terminal is in a communication state, determining that the mobile terminal is in a working mode in the communication state;

if the working mode of the mobile terminal in the communication state is a first working mode, acquiring gesture data of a user on the mobile terminal by using a sensor detection module;

determining the holding gesture state of the user on the mobile terminal according to the gesture data;

and matching a corresponding target antenna from the plurality of antennas based on the holding gesture state of the mobile terminal by the user.

2. The antenna matching method according to claim 1, wherein determining the holding gesture state of the mobile terminal by the user according to the gesture data comprises:

inputting the gesture data into a preset gesture data template library;

screening out a target gesture template with the highest matching degree with the gesture data from the gesture data template base, wherein the target gesture template comprises gesture action information;

and determining the holding gesture state of the user on the mobile terminal based on the gesture action information.

3. The antenna matching method according to claim 1, wherein after determining the current operating mode of the mobile terminal according to the status information, the antenna matching method further comprises:

and if the working mode of the mobile terminal in the communication state is a second working mode, matching a corresponding default antenna from the plurality of antennas according to the communication type of the mobile terminal.

4. The antenna matching method according to claim 1, wherein before determining a holding gesture state of a user on the mobile terminal according to the gesture information, the antenna matching method further comprises:

acquiring original gesture data, and performing denoising processing on the original gesture data to generate standard gesture data, wherein the standard gesture data comprises triaxial angular velocity data;

intercepting valid gesture data from the standard gesture data based on the tri-axial angular velocity data;

preprocessing the effective gesture data to generate sample gesture data;

a gesture data template library is formed based on the sample gesture data.

5. The antenna matching method of claim 4, wherein preprocessing the valid gesture data to generate sample gesture data comprises:

smoothing the valid gesture data;

normalizing the smoothed effective gesture data;

carrying out cubic spline interpolation processing on the effective gesture data after the normalization processing:

and performing false peak-valley processing on the effective gesture data subjected to the cubic spline interpolation processing to generate sample gesture data.

6. The antenna matching method of claim 1, wherein the mobile terminal further comprises a matching network connected to the target antenna;

after the corresponding target antenna is matched from the multiple antennas based on the holding gesture state of the mobile terminal by the user, the antenna matching method further comprises the following steps:

detecting the center frequency of the current communication signal of the mobile terminal;

generating a control signal based on the center frequency and coupling the control signal to a matching network connected to the target antenna, the matching network including a plurality of switches;

and responding to the control signal to control the state of each selector switch in the matching network so that the resonant frequency of the target antenna is matched with the current communication signal of the mobile terminal.

7. An antenna matching apparatus, characterized in that the antenna matching apparatus comprises:

the first acquisition module is used for acquiring the state information of the mobile terminal and judging whether the mobile terminal is in a communication state currently or not according to the state information;

the mobile terminal comprises a first determining module, a second determining module and a judging module, wherein the first determining module is used for determining the working mode of the mobile terminal in a communication state when the mobile terminal is in the communication state;

the second acquisition module is used for acquiring gesture data of a user on the mobile terminal by adopting the sensor detection module when the working mode of the mobile terminal in the communication state is the first working mode;

the second determining module is used for determining the holding gesture state of the user on the mobile terminal according to the gesture data;

the first matching module is used for matching the corresponding target antenna from the multiple antennas based on the holding gesture state of the user on the mobile terminal.

8. The antenna matching apparatus of claim 7, wherein the second determining module comprises:

the first input unit is used for inputting the gesture data into a preset gesture data template library;

the first screening unit is used for screening out a target gesture template with the highest matching degree with the gesture data from the gesture data template base, wherein the target gesture template comprises gesture action information;

and the first determining unit is used for determining the holding gesture state of the mobile terminal by the user based on the gesture action information.

9. A mobile terminal comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method according to any of claims 1 to 6.

10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.

Technical Field

The present application relates to the field of mobile terminal technologies, and in particular, to an antenna matching method and apparatus, a mobile terminal, and a storage medium.

Background

With the development of wireless communication technology, mobile terminal devices such as mobile phones have become an essential part of people's life. In the using process of the mobile terminal, the quality of the antenna performance directly affects the quality of the mobile terminal in wireless communication. At present, during the wireless communication process of the mobile terminal, the inventor finds that the antenna in the mobile terminal can be influenced by the substances around the mobile terminal, particularly conductive substances. Such as: when the mobile terminal is close to a human body or other dielectric bodies, the current and field distribution on the antenna in the mobile terminal may also change due to the change of the directional diagram and impedance of the antenna, so that the resonant frequency of the antenna changes; therefore, when a user holds the mobile terminal in different states, the time difference of the signal quality received by the antenna in the mobile terminal affects the communication quality.

Disclosure of Invention

In view of the above, it is necessary to provide an antenna matching method, an apparatus, a mobile terminal and a storage medium capable of solving the problem of poor communication quality of the mobile terminal.

An antenna matching method, the antenna matching method comprising:

acquiring state information of the mobile terminal, and judging whether the mobile terminal is in a communication state currently or not according to the state information;

if the mobile terminal is in a communication state, determining that the mobile terminal is in a working mode in the communication state;

if the working mode of the mobile terminal in the communication state is a first working mode, acquiring gesture data of a user on the mobile terminal by using a sensor detection module;

determining the holding gesture state of the user on the mobile terminal according to the gesture data;

and matching a corresponding target antenna from the plurality of antennas based on the holding gesture state of the mobile terminal by the user.

In one embodiment, the method further comprises the following steps:

inputting the gesture data into a preset gesture data template library;

screening out a target gesture template with the highest matching degree with the gesture data from the gesture data template base, wherein the target gesture template comprises gesture action information;

and determining the holding gesture state of the user on the mobile terminal based on the gesture action information.

In one embodiment, the method further comprises the following steps:

and if the working mode of the mobile terminal in the communication state is a second working mode, matching a corresponding default antenna from the plurality of antennas according to the communication type of the mobile terminal.

In one embodiment, the method further comprises the following steps:

acquiring original gesture data, and performing denoising processing on the original gesture data to generate standard gesture data, wherein the standard gesture data comprises triaxial angular velocity data;

intercepting valid gesture data from the standard gesture data based on the tri-axial angular velocity data;

preprocessing the effective gesture data to generate sample gesture data;

forming a gesture data template library based on the sample gesture data

In one embodiment, the method further comprises the following steps:

smoothing the valid gesture data;

normalizing the smoothed effective gesture data;

carrying out cubic spline interpolation processing on the effective gesture data after the normalization processing:

and performing false peak-valley processing on the effective gesture data subjected to the cubic spline interpolation processing to generate sample gesture data.

In one embodiment, the method further comprises the following steps:

detecting the center frequency of the current communication signal of the mobile terminal;

generating a control signal based on the center frequency and coupling the control signal to a matching network connected to the target antenna, the matching network including a plurality of switches;

and responding to the control signal to control the state of each selector switch in the matching network so that the resonant frequency of the target antenna is matched with the current communication signal of the mobile terminal.

An antenna matching apparatus, the apparatus comprising:

the first acquisition module is used for acquiring the state information of the mobile terminal and judging whether the mobile terminal is in a communication state currently or not according to the state information;

the mobile terminal comprises a first determining module, a second determining module and a judging module, wherein the first determining module is used for determining the working mode of the mobile terminal in a communication state when the mobile terminal is in the communication state;

the second acquisition module is used for acquiring gesture data of a user on the mobile terminal by adopting the sensor detection module when the working mode of the mobile terminal in the communication state is the first working mode;

the second determining module is used for determining the holding gesture state of the user on the mobile terminal according to the gesture data;

the first matching module is used for matching the corresponding target antenna from the multiple antennas based on the holding gesture state of the user on the mobile terminal.

A mobile terminal comprising a memory and a processor, the memory storing a computer program, the processor when executing the computer program implementing the steps of:

acquiring state information of the mobile terminal, and judging whether the mobile terminal is in a communication state currently or not according to the state information;

if the mobile terminal is in a communication state, determining that the mobile terminal is in a working mode in the communication state;

if the working mode of the mobile terminal in the communication state is a first working mode, acquiring gesture data of a user on the mobile terminal by using a sensor detection module;

determining the holding gesture state of the user on the mobile terminal according to the gesture data;

and matching a corresponding target antenna from the plurality of antennas based on the holding gesture state of the mobile terminal by the user.

A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:

acquiring state information of the mobile terminal, and judging whether the mobile terminal is in a communication state currently or not according to the state information;

if the mobile terminal is in a communication state, determining that the mobile terminal is in a working mode in the communication state;

if the working mode of the mobile terminal in the communication state is a first working mode, acquiring gesture data of a user on the mobile terminal by using a sensor detection module;

determining the holding gesture state of the user on the mobile terminal according to the gesture data;

and matching a corresponding target antenna from the plurality of antennas based on the holding gesture state of the mobile terminal by the user.

According to the antenna matching method, the antenna matching device, the mobile terminal and the storage medium, the state information of the mobile terminal is obtained, and whether the mobile terminal is in a communication state at present is judged according to the state information; if the mobile terminal is in a communication state, determining that the mobile terminal is in a working mode in the communication state; if the working mode of the mobile terminal in the communication state is a first working mode, acquiring gesture data of a user on the mobile terminal by using a sensor detection module; determining the holding gesture state of the user on the mobile terminal according to the gesture data; matching a corresponding target antenna from the plurality of antennas based on a holding gesture state of the mobile terminal by a user; the method comprises the steps of determining whether the current working mode of the mobile terminal is in a communication state or not, and then identifying the current holding gesture state of a user on the mobile terminal when the mobile terminal is in the communication state so as to match the best target antenna, thereby not only realizing the free switching of the antenna, but also further improving the communication speed and quality.

Drawings

Fig. 1 is an application environment diagram of an antenna matching method in the embodiment of the present application.

Fig. 2 is a flowchart illustrating an antenna matching method according to an embodiment of the present application.

Fig. 3 is a flowchart illustrating an antenna matching method according to an embodiment of the present application.

Fig. 4 is a flowchart illustrating an antenna matching method according to an embodiment of the present application.

Fig. 5 is a flowchart illustrating an antenna matching method according to an embodiment of the present application.

Fig. 6 is a flowchart illustrating an antenna matching method according to an embodiment of the present application.

Fig. 7 is a schematic structural diagram of an antenna matching method in the embodiment of the present application.

Fig. 8 is a flowchart illustrating an antenna matching method according to an embodiment of the present application.

Fig. 9 is an internal structural diagram of a mobile terminal in the embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

The antenna matching method provided by the application can be applied to the application environment shown in fig. 1. Wherein, the mobile terminal 102 communicates with the server 104 through the network; the method is used for solving the problem of poor communication quality of the mobile terminal. The mobile terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.

In an embodiment, as shown in fig. 2, an antenna matching method is provided, which is described by taking the application of the method to the mobile terminal in fig. 1 as an example, where the mobile terminal includes multiple antennas, and the antenna matching method includes the following steps:

s10: acquiring state information of the mobile terminal, and judging whether the mobile terminal is in a communication state currently or not according to the state information.

The state information of the mobile terminal is information used for indicating the current state of the mobile terminal. The current working state of the mobile terminal can be determined through the acquired state information, namely whether the current mobile terminal is in a communication state, a video playing state or a standby state is determined. It should be noted that, in the present embodiment, the main purpose of acquiring the state information of the mobile terminal is to determine whether the mobile terminal is currently in a communication state.

For example, the state information of the mobile terminal may be obtained by directly detecting the type of the application program being run in the foreground of the mobile terminal to determine the current operating state of the mobile terminal. The application program can be playing software, such as an avigation video player, a Tencent video player, a watermelon video player, a Youkou video player, and the like; also communication software classes, such as: telephone calls, WeChat, QQ, etc. Of course, other types of software, such as general software for a high-end map, a hungry bar, a mei-qu takeaway, etc., may be included to obtain the status information of the mobile terminal. If the application program running on the foreground of the mobile terminal is detected to be the Aiqiyi video player, the current video playing state of the mobile terminal can be determined. If the application program running in the foreground of the mobile terminal is detected to be a telephone call, the current communication state of the mobile terminal can be determined.

Illustratively, the state information of the mobile terminal can also be obtained by monitoring the page operation behavior of the user on the mobile terminal. The monitoring script plug-in can be introduced into the mobile terminal, so that the page operation behavior of the user on the mobile terminal can be monitored in real time. The monitoring script plug-in refers to a plug-in inserted with a js monitoring file script, the js monitoring file belongs to a js monitoring code, and the monitoring script plug-in refers to a function for binding a monitoring event on a < body > tag of a global dom document. In addition, for the js file common to the projects, the js monitoring file can be directly imported into the page of the mobile terminal, and the monitoring of the operation behavior of the user on the mobile terminal can be realized. In this step, the script can be used as a carrier of the js interception file, and since the script has the functional characteristics that can be temporarily called and executed by the application program, the use of the interception script plug-in is more convenient. Once the monitoring script plug-in monitors the operation behavior of the user on the mobile terminal, the monitoring script plug-in can respond to the page operation behavior of the user to acquire the state information of the mobile terminal, and then judge whether the mobile terminal is in a communication state currently according to the state information. If the operation behavior of the user on the page of the mobile terminal is monitored to be dialing or answering a call, the mobile terminal can be determined to be in a communication state currently.

S20: and if the mobile terminal is in the communication state, determining the working mode of the mobile terminal in the communication state.

The communication states are divided into a hands-free call mode, an earphone call mode, a handheld call mode and the like. Therefore, in this embodiment, after the mobile terminal is determined to be in the communication state, it is further determined whether the communication state in which the mobile terminal is currently in is the hands-free call mode, the headset call mode, or the handheld call mode.

S30: and if the working mode of the mobile terminal in the communication state is the first working mode, acquiring detection information by adopting a sensor detection module.

The first working mode is a handheld call mode indicating that the current mobile terminal is in a communication state. The hand-held call mode comprises an answering mode and a dialing mode. The handheld call mode may be a handheld call mode in a telephone call program, may be a handheld call mode in a WeChat program, and may be a handheld call mode in a QQ program.

And after the mobile terminal is determined to be in the handheld call mode in the communication state, triggering a sensor detection module in the mobile terminal to acquire detection information. The sensor detection module can be a motion sensor, an acceleration sensor or a gyroscope sensor, or a combination of the above sensors. The sensor detection module can be used for detecting whether the operation of the mobile terminal by the user is in a specific holding state. In this embodiment, whether the user closes the mobile terminal to the ear of the user or not can be detected by the sensor detection module, and when the mobile terminal closes the ear of the user, the user holds the current gesture of the mobile terminal.

For example, the current holding gesture of the mobile terminal may be determined according to the current inclination angle of the mobile terminal and the angle range of the inclination angle, so as to obtain gesture data of the user on the mobile terminal. That is, the holding state can be determined according to the inclination angle of the mobile terminal. A sensor detection module (such as a gyroscope sensor) in the mobile terminal detects a current inclination angle of the mobile terminal as gesture data, and determines a holding gesture state of a user on the mobile terminal according to the inclination angle.

In an actual application process, when a user holds the mobile terminal, a force is applied to an edge touch area of the mobile terminal, and different holding gestures are distributed at different positions of touch operation, so that, for example, the current holding gesture can be judged by the touch position of the current touch operation in the edge touch area, so as to obtain gesture data of the user on the mobile terminal. The edge touch area may be a touch area set on the left and right side edges of the electronic device, or a left and right edge area on the front touch screen of the electronic device. Therefore, the pressure information of the touch operation detected in the touch areas on the left and right sides of the mobile terminal can also be used as detection information by adopting the sensor detection module (pressure sensor), and the detection information is used for representing the touch position, namely the area or position where the current touch operation is located, so as to realize the pressure signal value detected by the pressure sensor.

S40: and determining the holding gesture state of the user on the mobile terminal according to the gesture data.

The holding gesture state of the user on the mobile terminal can be determined through the gesture data, namely, whether the user holds the mobile terminal by the right hand or the left hand is determined. In a practical application process, since a human body is a conductor, the holding gesture states of a user on the mobile terminal are different, and the influence on the antenna resonance in the mobile terminal is also different. For example, the influence on the antenna resonance of the mobile terminal is different between when the user holds the mobile terminal with the left hand and when the user holds the mobile terminal with the right hand, so that in this embodiment, after the gesture data of the user on the mobile terminal is acquired by using the sensor detection module, it is determined whether the current holding gesture of the user on the mobile terminal is the right hand or the left hand according to the gesture data.

S50: and matching the corresponding target antenna from the plurality of antennas based on the holding gesture state of the mobile terminal by the user.

After the holding gesture state of the user on the mobile terminal is determined, namely whether the current holding gesture of the user on the mobile terminal is right-handed or left-handed, matching a corresponding target antenna from a plurality of antennas of the mobile terminal. For example, the antenna corresponding to the left-hand mode and the antenna corresponding to the right-hand mode have been determined in advance and associated in advance; after determining whether the current holding gesture of the mobile terminal is right-handed or left-handed by the user, the corresponding target antenna can be directly matched from the plurality of antennas of the mobile terminal.

For example, since there may be more than one corresponding target antenna matched from the multiple antennas based on the holding gesture state of the user on the mobile terminal, in order to improve the quality of the signal received by the matched target antenna, before the corresponding target antenna is matched from the multiple antennas based on the holding gesture state of the user on the mobile terminal, antennas not conforming to the communication type may be filtered from the matched corresponding target antenna according to the current communication type, then a final target antenna is selected from the antennas conforming to the communication type, and finally the antenna currently used by the mobile terminal is switched to the target antenna. The communication type may include bluetooth, WIFI, 5G, 4G, 3G, and the like.

In the embodiment, state information of the mobile terminal is acquired, and whether the mobile terminal is in a communication state at present is judged according to the state information; if the mobile terminal is in a communication state, determining that the mobile terminal is in a working mode in the communication state; if the working mode of the mobile terminal in the communication state is a first working mode, acquiring gesture data of a user on the mobile terminal by using a sensor detection module; determining the holding gesture state of the user on the mobile terminal according to the gesture data; matching a corresponding target antenna from the plurality of antennas based on a holding gesture state of the mobile terminal by a user; the method comprises the steps of determining whether the current working mode of the mobile terminal is in a communication state or not, and then identifying the current holding gesture state of a user on the mobile terminal when the mobile terminal is in the communication state so as to match the best target antenna, thereby not only realizing the free switching of the antenna, but also further improving the communication speed and quality.

In an embodiment, as shown in fig. 3, determining the holding gesture state of the user on the mobile terminal according to the gesture data includes the following steps:

s401: and inputting the gesture data into a preset gesture data template library.

The gesture data template base is a pre-established database used for storing gesture data. Several different sample gesture data are stored in the gesture database. Because the gesture data comprises the current holding gesture of the user on the mobile terminal, after the acquired gesture data, the gesture data is input into a preset gesture database so as to screen out a target gesture template with the highest matching degree with the gesture data from the gesture database.

S402: and screening out a target gesture template with the highest matching degree with the gesture data from the gesture data template library, wherein the target gesture template comprises gesture action information.

Inputting the gesture data into a gesture data template base, then performing online matching, and screening out a target gesture template with the highest matching degree with the gesture data from the gesture data template base. The target gesture template refers to a template with the highest matching degree with the holding gesture in the gesture data. Gesture data the gesture template includes gesture motion information. Gesture action information refers to information that may be used to evaluate a user's current holding gesture action with respect to the mobile terminal.

In this embodiment, a similarity algorithm may be used to screen out a target gesture template that matches the gesture data most closely from the gesture data template library. Wherein the similarity algorithm is an algorithm for calculating the similarity between two objects. The similarity algorithm may be a text similarity algorithm, a cosine similarity algorithm, or an edit distance algorithm. The similarity between two vectors can be calculated due to a similarity algorithm. Therefore, feature extraction needs to be performed on the gesture data in advance to obtain gesture features in the gesture data; then converting the gesture motion features of the gesture feature and in each gesture template into vector a ═ (a1, a2, … …, An) and vector B (B1, B2, … …, Bn), respectively; and calculating the similarity between the gesture characteristics and the gesture action characteristics in each gesture template by adopting a similarity algorithm, and finally taking the gesture template with the highest similarity with the gesture characteristics obtained by calculation as a target gesture template with the highest matching degree.

S403: and determining the holding gesture state of the user on the mobile terminal based on the gesture action information.

And finally, determining the holding gesture state of the user on the mobile terminal based on the gesture action information in the target gesture template, namely determining whether the user adopts a right hand or a left hand when holding the mobile terminal.

In the embodiment, the gesture data is input into the preset gesture data template base, then the target gesture template with the highest matching degree with the gesture data is screened out from the gesture data template base, wherein the target gesture template comprises gesture action information, and finally the holding gesture state of the user on the mobile terminal is determined based on the gesture action information, so that the holding gesture state of the user on the mobile terminal is rapidly and accurately determined, and the efficiency of matching the corresponding target antenna from a plurality of antennas subsequently is improved.

In an embodiment, after determining the current operating mode of the mobile terminal according to the state information, the antenna switching further includes the following steps:

and if the working mode of the mobile terminal in the communication state is a second working mode, matching a corresponding default antenna from the plurality of antennas according to the working mode of the mobile terminal.

The second working mode is a non-handheld call mode indicating that the current mobile terminal is in a communication state. For example: and the hands-free call mode or the earphone call mode in the communication state is classified as a second working mode, namely, the non-hand-held call mode of the mobile terminal in the communication state is determined as the second working mode of the mobile terminal.

And if the working mode of the mobile terminal in the communication state is the second working mode, matching a corresponding default antenna from the plurality of antennas according to the communication type of the mobile terminal. The default antenna is an antenna which is preset and is irrelevant to whether a user carries out a handheld call and is relevant to the communication type of the mobile terminal. In this embodiment, in order to improve the signal quality of the mobile terminal in the second operating mode in the communication state, a default antenna that conforms to the communication type may be screened according to the current communication type of the mobile terminal. The communication type may include bluetooth, WIFI, 4G, 3G, 2G, and the like. For example: and if the current communication type of the mobile terminal is 4G, matching the current communication type to a corresponding default antenna according to the communication type information 4G. For example, since the antennas corresponding to the default connections are different when the mobile terminal is in different communication types, after the communication type is determined, the default antenna corresponding to the communication type may be directly matched, so that the signal quality of the mobile terminal in the second operation mode in the communication state may be improved.

In an embodiment, as shown in fig. 4, before determining the holding gesture state of the user on the mobile terminal according to the gesture information, the antenna switching further includes the following steps:

s11: the method comprises the steps of obtaining original gesture data, carrying out denoising processing on the original gesture data, and generating standard gesture data, wherein the standard gesture data comprise three-axis angular velocity data.

The original gesture data is data which contains gesture states of communication of a user holding the mobile terminal in advance. For example, a mobile terminal with a gyroscope sensor, a test board or other electronic equipment can be adopted in advance to acquire the hand-held posture of a user when the mobile terminal is used; or directly obtaining the original gesture data from the gesture database of the user holding the mobile terminal disclosed by the internet or a third-party institution/platform. For example: and in the process of the action gesture of the user, acquiring the three-axis angular velocity data of a built-in gyroscope of the mobile terminal in the period of time, wherein the sampling frequency is 50 Hz. Assuming that a is (x, y, z) represents the three-axis angular velocity of the mobile terminal, the three-axis angular velocity at time t is (xt, yt, zt), the data sequence acquired in a period of time is (a1, a2, … …, An), and n is the number of acquired data.

For example, since there may be relatively large noise in the obtained original gesture data, for example, there may be gesture data that a user is not in a communication state, or there may be an unsatisfactory gesture data of the user in the communication state (for example, the user is gesture data in an earphone communication mode), in order to improve the accuracy of the sample gesture data in the finally generated gesture data template library, after obtaining the original gesture data, it is necessary to perform denoising processing on the original gesture data, that is, remove gesture data of a handheld terminal that the user is in a non-communication state, and generate standard gesture data. The standard gesture data are gesture data of the handheld terminal with users in a communication state.

S12: valid gesture data is intercepted from the standard gesture data based on the three-axis angular velocity data.

To recognize a motion gesture, it is necessary to first accurately recognize the start and end of the gesture in order to intercept valid gesture data. When the gesture action is performed, the three-axis angular velocity data of the mobile terminal are obviously changed, and the data are stable when the gesture action is not performed. Since the variance can reflect the data change in a period of time, the start and the end of the gesture data are judged according to the mean square error of the angular velocity data, and the gesture data is intercepted. The mean square error var is calculated as follows:where N is the number of data for calculating the mean square error,the mean values of the angular velocities of the x, y and z axes, respectively. When var is greater than or equal to the gesture starting threshold, namely var is greater than or equal to varbergin, the gesture action is considered to start; when var is smaller than or equal to the gesture ending threshold, namely var is smaller than or equal to varend, the gesture action is considered to be ended.

Further, in the process of intercepting the gesture data, noise generated by misoperation of a user or shaking of a hand is regarded as the gesture data, so in order to remove the interference noise, the mean square error var needs to be considered as valid gesture data only when Nnegin times (namely the gesture starting continuous threshold) is larger than varbegin continuously, and thus noise data generated by shaking cannot be regarded as valid data, and the accuracy of the intercepted valid gesture data can be effectively improved.

S13: and preprocessing the effective gesture data to generate sample gesture data.

The effective gesture data is preprocessed mainly by smoothing the effective gesture data, normalizing the smoothed effective gesture data, performing cubic spline interpolation processing on the normalized effective gesture data, and performing false peak-valley processing on the cubic spline interpolation processed effective gesture data to generate sample gesture data.

S14: a gesture data template library is formed based on the sample gesture data.

And storing the final data template of each action gesture in the gesture data template library. Aiming at the same action gesture, acquiring a plurality of gesture data sequences, and intercepting and preprocessing effective gesture data; randomly selecting one from a plurality of data sequences of the same gesture as a temporary gesture template; and sequentially carrying out DTW matching on the rest data sequences of the same gesture and the temporary template, and calculating the similarity sum. The calculation method comprises the following steps: assuming that the temporary gesture template is R ═ R (R1, R2.. turn, rn), the gesture data sequence is T ═ T (T1, T2.. turn, tm), the similarity between data ri in R and data tj in T is represented as the euclidean distance Dij between ri and tj, and the similarity Dij between the first i data in R and the first j data in T is calculated as:

dij is the similarity between the temporary gesture template R and the gesture data sequence T. And calculating and summing the similarity of the temporary gesture template R and all data sequences of the same gesture to obtain the similarity sum. Repeating the steps for each data sequence in the same gesture to obtain the similarity sum of the data sequence and other data sequences, and selecting the data sequence with the maximum similarity sum, namely the data sequence with the minimum Dnm, as a final template of the gesture; and finally, repeating the steps for all sample gesture data books to establish a gesture data template base.

In this embodiment, original gesture data is obtained, and the original gesture data is subjected to a manipulation removing process to generate standard gesture data, where the standard gesture data includes three-axis angular velocity data; intercepting valid gesture data from the standard gesture data based on the tri-axial angular velocity data; preprocessing the effective gesture data to generate sample gesture data, and forming a gesture data template base based on the sample gesture data; a large amount of original gesture data are collected in advance, and then the original gesture data are subjected to data processing to form a gesture data template base, so that a required target gesture template can be conveniently matched by directly adopting the gesture data template base subsequently, the data processing efficiency can be improved, and the communication speed is further improved.

In one embodiment, as shown in fig. 5, the preprocessing the valid gesture data to generate sample gesture data includes the following steps:

s131: and performing smoothing processing on the effective gesture data.

Due to the influence caused by slight hand shaking and the inaccuracy of the sensor, the collected effective gesture data has certain noise and influences the recognition precision. The embodiment smoothes the angular velocity data in the effective gesture data after the gesture is intercepted by adopting a simple moving average algorithm to remove noise. Assuming that the data intercepted by the gesture is a ═ a (a1, a2, …, am) and the sliding window size is M, the ith data after smoothing is:

s132: and normalizing the smoothed effective gesture data.

Furthermore, due to the difference of the gestures of the users, the amplitude of different users making the same gesture is different, and the recognition precision is greatly influenced, so that the data normalization processing is performed after the angular velocity data are smoothed. Assuming that X ═ X1, X2, …, xm, Y ═ Y1, Y2, …, ym, and Z ═ Z1, Z2, …, zm respectively represent angular velocity data of the (X, Y, Z) axis, the normalization is as follows:

the data after normalization were:

and

s133: and carrying out cubic spline interpolation processing on the effective gesture data after the normalization processing.

Secondly, the adopted motion gesture recognition algorithm requires that the data waveform of the motion gesture has monotonicity in a segmentation region, so cubic spline interpolation segmentation fitting processing needs to be carried out on the motion gesture data. Assuming that the angular velocity data sequence is a (a1, a2, …, am), the equidistant division Δ a1 x0 < x1 < … < xk am on [ a1, am ], the fitting formula is:

s134: and performing false peak-valley processing on the effective gesture data subjected to the cubic spline interpolation processing to generate sample gesture data.

Finally, because false peaks and troughs exist in the valid gesture data, they need to be identified and processed. First, three consecutive peaks or valleys are found, which are assumed to be p1, p2, p 3. A false peak or trough p2 is considered to exist if | p1-p2| > pthreshold and | p2-p3| > pthreshold, pthreshold is a false peak trough threshold. Two points qi and qj are taken on both sides of p2, respectively, and the mean of qi and qj is used as the value of p 2. Taking the average of p2 and p1 to obtain the value of the first point from p1 to p2, taking the average of the point and p2 to obtain the value of the second point from p1 to p2, and so on to obtain the values of all points between p1 and p 2. All values between p2 and p3 were obtained in the same way. The process is complete, generating a gesture data sample.

In this embodiment, the effective gesture data is smoothed; normalizing the smoothed effective gesture data; carrying out cubic spline interpolation processing on the effective gesture data after the normalization processing: and performing false peak-valley processing on the effective gesture data subjected to the cubic spline interpolation processing to generate sample gesture data, so that the effectiveness and the accuracy of the generated sample gesture data are improved.

In an embodiment, as shown in fig. 6, the mobile terminal further includes a matching network connected to the target antenna, and generates sample gesture data, and after matching a corresponding target antenna from the multiple antennas based on a holding gesture state of the mobile terminal by a user, the antenna matching method further includes the following steps:

s51: the center frequency of the current communication signal of the mobile terminal is detected.

When the communication signal of the mobile terminal is a single frequency signal, the mobile terminal may directly measure a signal frequency of the single frequency signal, which is equal to the center frequency, by using a frequency meter. When the communication signal of the mobile terminal is an electromagnetic wave signal having a complex frequency spectrum, the mobile terminal may perform spectrum analysis on the electromagnetic wave signal having the complex frequency spectrum using a spectrum analyzer, and then obtain a center frequency of the communication signal.

S52: a control signal is generated based on the center frequency and coupled to a matching network connected to the target antenna, the matching network including a plurality of switches.

S53: and responding to the control signal to control the state of each selector switch in the matching network so as to enable the resonant frequency of the target antenna to be matched with the current communication signal of the mobile terminal.

The matching network is used for adjusting the resonant frequency of the target antenna. The matching network comprises a plurality of parallel-connected resonant paths, each resonant path comprising a switch and a corresponding LC series resonant circuit. Each LC series resonant circuit includes a capacitor and an inductor connected in series. The impedance of the matching network is adjusted by controlling the state of the change-over switch of each resonant path in the matching network, so that the aim of adjusting the resonant frequency of the target antenna is fulfilled.

The control signal is a signal which is generated based on the center frequency of the communication signal and is used for controlling a selector switch in a matching network connected with the target antenna, so that the control signal is coupled to the matching network connected with the target antenna and is used for controlling the state of the selector switch in each resonant path in the matching network, the resonant impedance of the matching network is adjusted, and the resonant frequency of the target antenna is the same as the center frequency of the communication signal; so as to ensure that the resonant frequency of the target antenna is matched with the current communication signal of the mobile terminal.

In the embodiment, the center frequency of the current communication signal of the mobile terminal is detected, a control signal is generated based on the center frequency, and the control signal is coupled to a matching network connected with a target antenna, wherein the matching network comprises a plurality of switches; responding to a control signal to control the state of each selector switch in the matching network so as to enable the resonant frequency of the target antenna to be matched with the current communication signal of the mobile terminal; after the target antenna is determined, the resonant frequency of the target antenna is adjusted, so that the resonant frequency of the target antenna is adapted to the current communication signal of the mobile terminal, and the quality of the communication signal is further improved.

It should be understood that although the various steps in the flow charts of fig. 2-6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-6 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.

In one embodiment, as shown in fig. 7, there is provided an antenna matching apparatus including: a first obtaining module 10, a first determining module 20, a second obtaining module 30, a second determining module 40, and a matching module 50, wherein:

a first obtaining module 10, configured to obtain state information of the mobile terminal, and determine whether the mobile terminal is currently in a communication state according to the state information;

a first determining module 20, configured to determine, when the mobile terminal is in a communication state, an operating mode of the mobile terminal in the communication state;

the second obtaining module 30 is configured to, when the working mode of the mobile terminal in the communication state is the first working mode, obtain gesture data of the user on the mobile terminal by using the sensor detection module;

the second determining module 40 is configured to determine, according to the gesture data, a holding gesture state of the user on the mobile terminal;

a first matching module 50, configured to match a corresponding target antenna from the multiple antennas based on a holding gesture state of the mobile terminal by a user.

Preferably, as shown in fig. 8, the second determining module 40 includes:

a first input unit 401, configured to input the gesture data into a preset gesture data template library;

a first screening unit 402, configured to screen a target gesture template with a highest matching degree with the gesture data from the gesture data template library, where the target gesture template includes gesture action information;

a first determining unit 403, configured to determine, based on the gesture action information, a holding gesture state of the mobile terminal by the user.

Preferably, the antenna matching apparatus further includes:

and the second matching module is used for matching a corresponding default antenna from the plurality of antennas according to the communication type of the mobile terminal if the working mode of the mobile terminal in the communication state is the second working mode.

Preferably, the antenna matching apparatus further includes:

the system comprises an acquisition module, a de-noising module and a processing module, wherein the acquisition module is used for acquiring original gesture data, de-noising the original gesture data and generating standard gesture data, and the standard gesture data comprises triaxial angular velocity data;

an intercepting module for intercepting valid gesture data from the standard gesture data based on the three-axis angular velocity data;

the preprocessing module is used for preprocessing the effective gesture data to generate sample gesture data;

a forming module for forming a gesture data template library based on the sample gesture data.

Preferably, the pre-processing module comprises:

the smoothing unit is used for smoothing the effective gesture data;

the normalization processing unit is used for performing normalization processing on the smoothed effective gesture data;

a cubic spline interpolation processing unit, configured to perform cubic spline interpolation processing on the normalized effective gesture data:

and the false peak and valley processing unit is used for performing false peak and valley processing on the effective gesture data subjected to the cubic spline interpolation processing to generate sample gesture data.

Preferably, the antenna matching apparatus further includes:

the detection module is used for detecting the center frequency of the current communication signal of the mobile terminal;

a coupling module for generating a control signal based on the center frequency and coupling the control signal to a matching network connected to the target antenna, the matching network including a plurality of switches;

and the response module is used for responding to the control signal to control the state of each selector switch in the matching network so as to enable the resonant frequency of the target antenna to be matched with the current communication signal of the mobile terminal.

For the specific definition of the antenna matching device, reference may be made to the above definition of the antenna matching method, which is not described herein again. The modules in the antenna matching apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the mobile terminal, and can also be stored in a memory in the mobile terminal in a software form, so that the processor can call and execute operations corresponding to the modules.

In one embodiment, a mobile terminal is provided, which may be a mobile terminal, and the internal structure thereof may be as shown in fig. 9. The mobile terminal comprises a processor, a memory, a network interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the mobile terminal is configured to provide computing and control capabilities. The memory of the mobile terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the mobile terminal is used for connecting and communicating with an external mobile terminal through a network. The computer program is executed by a processor to implement an antenna matching method. The display screen of the mobile terminal can be a liquid crystal display screen or an electronic ink display screen, and the input device of the mobile terminal can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a shell of the mobile terminal, an external keyboard, a touch pad or a mouse and the like.

Those skilled in the art will appreciate that the configuration shown in fig. 9 is a block diagram of only a portion of the configuration relevant to the present application, and does not constitute a limitation of the mobile terminal to which the present application is applied, and that a particular mobile terminal may include more or less components than those shown in the figures, or combine certain components, or have a different arrangement of components.

In one embodiment, a mobile terminal is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:

acquiring state information of the mobile terminal, and judging whether the mobile terminal is in a communication state currently or not according to the state information;

if the mobile terminal is in a communication state, determining that the mobile terminal is in a working mode in the communication state;

if the working mode of the mobile terminal in the communication state is a first working mode, acquiring gesture data of a user on the mobile terminal by using a sensor detection module;

determining the holding gesture state of the user on the mobile terminal according to the gesture data;

and matching a corresponding target antenna from the plurality of antennas based on the holding gesture state of the mobile terminal by the user.

In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:

acquiring state information of the mobile terminal, and judging whether the mobile terminal is in a communication state currently or not according to the state information;

if the mobile terminal is in a communication state, determining that the mobile terminal is in a working mode in the communication state;

if the working mode of the mobile terminal in the communication state is a first working mode, acquiring gesture data of a user on the mobile terminal by using a sensor detection module;

determining the holding gesture state of the user on the mobile terminal according to the gesture data;

and matching a corresponding target antenna from the plurality of antennas based on the holding gesture state of the mobile terminal by the user.

It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.

The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the claims. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

21页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于IMS网络诈骗电话拦截的实现方法、系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类