WO2021017947A1 - 终端控制方法、装置、移动终端及存储介质 - Google Patents

终端控制方法、装置、移动终端及存储介质 Download PDF

Info

Publication number
WO2021017947A1
WO2021017947A1 PCT/CN2020/103305 CN2020103305W WO2021017947A1 WO 2021017947 A1 WO2021017947 A1 WO 2021017947A1 CN 2020103305 W CN2020103305 W CN 2020103305W WO 2021017947 A1 WO2021017947 A1 WO 2021017947A1
Authority
WO
WIPO (PCT)
Prior art keywords
mobile terminal
ultrasonic
ultrasonic signal
state
module
Prior art date
Application number
PCT/CN2020/103305
Other languages
English (en)
French (fr)
Inventor
林进全
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2021017947A1 publication Critical patent/WO2021017947A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72463User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions to restrict the functionality of the device
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0267Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by controlling user interface components
    • H04W52/027Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by controlling user interface components by controlling a display operation or backlight unit
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • This application relates to the technical field of mobile terminals, and more specifically, to a terminal control method, device, mobile terminal, and storage medium.
  • Mobile terminals such as mobile phones and tablet computers, have become one of the most commonly used consumer electronic products in people's daily lives. With the increasing development of mobile terminal technology, full-screen and curved-screen mobile phones have become mainstream products. Due to the need to save the top space of mobile terminals, many manufacturers use ultrasonic proximity detection solutions on mobile terminals to replace traditional infrared proximity detection solutions. However, due to the complexity of the internal structure of the mobile phone and the characteristics of the ultrasound itself, the accuracy of the detection results using ultrasound in certain special scenes cannot be guaranteed, resulting in inaccurate control of the state of the display screen.
  • this application proposes a terminal control method, device, mobile terminal, and storage medium.
  • an embodiment of the present application provides a terminal control method, which is applied to a mobile terminal, and the mobile terminal includes an ultrasonic transmitter module, an ultrasonic receiver module, an acceleration sensor, a gyroscope sensor, and a display screen.
  • the method includes: The mobile terminal is in a call state, sends an ultrasonic signal through the ultrasonic transmitter module, and receives an ultrasonic signal returned by the ultrasonic signal after encountering an object through the ultrasonic receiver module; acquiring first detection data detected by the acceleration sensor; The second detection data detected by the gyroscope sensor; acquiring the first characteristic value of the ultrasonic signal in the transmission process, the second characteristic value corresponding to the first detection data, and the third characteristic value corresponding to the second detection data Feature value; input the first feature value, the second feature value, and the third feature value into a trained preset model to obtain an output result, and the preset model is used to obtain the mobile terminal relative object And control the status of the display screen of the mobile terminal according to the output result.
  • the embodiments of the present application provide a terminal control device, which is applied to a mobile terminal.
  • the mobile terminal includes an ultrasonic transmitter module, an ultrasonic receiver module, an acceleration sensor, a gyroscope sensor, and a display screen.
  • the device includes: transceiver The control module, the data acquisition module, the feature acquisition module, and the screen control module, wherein the transceiver control module is used to send an ultrasonic signal through the ultrasonic transmitter module and pass the ultrasonic receiver module when the mobile terminal is in a call state Receive the ultrasonic signal returned by the ultrasonic signal after encountering an object; the data acquisition module is used to acquire the first detection data detected by the acceleration sensor and the second detection data detected by the gyroscope sensor; the feature acquisition module is used To obtain the first characteristic value of the ultrasonic signal in the transmission process, the second characteristic value corresponding to the first detection data, and the third characteristic value corresponding to the second detection data; the screen control module is used to The first feature value, the second feature value, and the third feature value are input to a trained preset model to obtain an output result, and the preset model is used to obtain the movement state of the mobile terminal relative to the object, And control the state of the display screen of the mobile terminal according to the output result.
  • an embodiment of the present application provides a mobile terminal, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and It is configured to be executed by the one or more processors, and the one or more programs are configured to execute the terminal control method provided in the above-mentioned first aspect.
  • an embodiment of the present application provides a computer-readable storage medium.
  • the computer-readable storage medium stores program code, and the program code can be called by a processor to execute the terminal provided in the first aspect. Control Method.
  • the ultrasonic signal is sent through the ultrasonic transmitter module, and the ultrasonic signal is received through the ultrasonic receiver module when it encounters an object, and the first detection data detected by the acceleration sensor and the gyroscope are obtained.
  • the second detection data detected by the sensor acquires the first feature value of the ultrasonic signal in the transmission process, the second feature value corresponding to the first detection data, and the third feature value corresponding to the second detection data, and then the first feature value,
  • the second eigenvalue and the third eigenvalue are input to a trained preset model to obtain an output result.
  • the preset model is used to obtain the movement state of the mobile terminal relative to the object, and finally control the state of the display screen of the mobile terminal according to the output result. Therefore, according to the feature value of the ultrasonic feature value, the feature value of the data detected by the acceleration sensor, and the feature value of the data detected by the gyroscope sensor, and the preset model used to obtain the movement state of the mobile terminal relative to the object, the relative The movement state of the object can accurately detect the movement state of the mobile terminal relative to the object, and improve the accuracy of the state control of the display screen during a call.
  • Fig. 1 shows a schematic diagram of a propagation path of ultrasonic waves provided by an embodiment of the present application.
  • Fig. 2 shows a flowchart of a terminal control method according to an embodiment of the present application.
  • Fig. 3 shows a flowchart of a terminal control method according to another embodiment of the present application.
  • Fig. 4 shows a schematic diagram of a model training process provided by an embodiment of the present application.
  • Fig. 5 shows a frequency spectrum diagram of audio data provided by an embodiment of the present application.
  • Fig. 6 shows a flowchart of a terminal control method according to another embodiment of the present application.
  • Fig. 7 shows a block diagram of a terminal control device according to an embodiment of the present application.
  • Fig. 8 is a block diagram of a mobile terminal for executing a terminal control method according to an embodiment of the present application.
  • Fig. 9 is a storage unit for storing or carrying program codes for implementing the terminal control method according to the embodiment of the present application.
  • the ultrasonic proximity monitoring program is that the mobile terminal transmits ultrasonic waves through ultrasonic transmitters (such as earpieces, speakers, special ultrasonic transmitters, etc.), and part of the ultrasonic waves travels through the air directly to the ultrasonic receiver module (pickup) (path 1 in Figure 1). Part of the ultrasonic wave travels through the air and is reflected by the obstruction before reaching the ultrasonic receiving module (path 2 in Figure 1).
  • ultrasonic transmitters such as earpieces, speakers, special ultrasonic transmitters, etc.
  • the ultrasonic receiving module picks up is the superimposed signal of direct sound and reflected sound, which is converted into audio signal by A/D converter.
  • the audio data is processed by the algorithm to obtain the motion state of the obstruction relative to the mobile terminal, and then guide the display screen of the mobile terminal to be in the on-screen state or the off-screen state.
  • the inventor found that due to the complexity of the internal structure of the mobile phone and the characteristics of the ultrasound itself, it is impossible to accurately control the display state of the display screen. For example, the mobile terminal is viewing the content displayed on the display screen during a call. At this time, the user manually manipulates the display content on the display screen, which will trigger the ultrasonic proximity detection scheme and detect that the object is close to the mobile terminal, thereby controlling the display screen to turn off. user experience.
  • the inventor proposed the terminal control method, device, mobile terminal, and storage medium provided by the embodiments of the present application, by combining the characteristic value of the ultrasonic signal, the characteristic value corresponding to the detection data of the acceleration sensor, and the detection data of the gyroscope sensor The corresponding characteristic value is input to the preset model, and the display state of the display screen is controlled according to the output result to improve the accuracy of the state control of the display screen.
  • the specific terminal control method will be described in detail in the subsequent embodiments.
  • FIG. 2 shows a schematic flowchart of a terminal control method provided by an embodiment of the present application.
  • the terminal control method is used to input the characteristic value of the ultrasonic signal, the characteristic value corresponding to the detection data of the acceleration sensor, and the characteristic value corresponding to the detection data of the gyroscope sensor into the preset model, and control the display screen according to the output result. Display status to improve the accuracy of the status control of the display.
  • the terminal control method is applied to the terminal control device 400 shown in FIG. 7 and the mobile terminal 100 equipped with the terminal control device 400 (FIG. 8). The following will take a mobile terminal as an example to describe the specific process of this embodiment.
  • the mobile terminal applied in this embodiment may be a smart phone, a tablet computer, a wearable electronic device, etc., which is not limited here.
  • the mobile terminal may include an ultrasonic transmitter module, an ultrasonic receiver module, an acceleration sensor, a gyroscope sensor, and a display screen.
  • the terminal control method Specifically, it can include the following steps:
  • Step S110 When the mobile terminal is in a call state, send an ultrasonic signal through the ultrasonic transmitter module, and receive an ultrasonic signal returned by the ultrasonic signal after encountering an object through the ultrasonic receiver module.
  • the mobile terminal can detect the call status, so that when the mobile terminal is in the call status, the ultrasonic signal is transmitted through the ultrasonic transmitter module and the ultrasonic signal is received by the ultrasonic receiver module, and then the ultrasonic signal can be acquired during the transmission process.
  • Eigenvalues in to determine the mobile terminal's movement state relative to the object can be detected.
  • the mobile terminal can monitor the incoming or outgoing call of the mobile terminal in real time through the built-in monitoring module.
  • the mobile terminal When the mobile terminal is in the ringing start (CALL_STATE_RINGING) incoming call or the dialing operation outgoing call, Whether the mobile terminal enters the call state is monitored.
  • the mobile terminal when the mobile terminal performs a dialing operation, it will send out a system broadcast, and the mobile terminal can use Broadcast Receiver to monitor.
  • monitoring whether the mobile terminal is in a call state can be monitoring whether the mobile terminal is in a call after an incoming or outgoing call Interface, where, when it is monitored that the mobile terminal is in a call (CALL_STATE_OFFHOOK), it can be determined that the mobile terminal is in a call state.
  • the mobile terminal may include an ultrasonic transmitting module and an ultrasonic receiving module at the same time.
  • the ultrasonic transmitting module moves relative to the object, so the ultrasonic receiving module also moves relative to the object.
  • the wavelength of the object radiation changes due to the relative motion of the wave source (mobile terminal) and the observer (object).
  • the Doppler effect formula is as follows:
  • f' is the observed frequency
  • f is the original emission frequency of the emission source in the medium
  • v is the propagation speed of the wave in the medium
  • v 0 is the movement speed of the observer, if the observer approaches the emission source, it will be forward + number of operation symbol, otherwise it is - number
  • v s is the moving speed of the transmission source, if the object approaches the front of the viewer is an operation symbol - number, and vice versa for the + sign.
  • a fixed-frequency ultrasonic signal can be sent through the built-in ultrasonic transmitter module of the mobile terminal. It can be understood that part of the ultrasonic signal sent by the ultrasonic transmitter module is transmitted through the air. Directly reach the ultrasonic receiving module, the other part is transmitted through the air and reflected by the obstruction, and then reaches the ultrasonic receiving module.
  • the ultrasonic receiving module picks up the superimposed signal of direct sound and reflected sound, which is converted into audio signal through A/D.
  • the obstruction may include a human face, a human body, and so on.
  • a fixed-frequency ultrasonic signal can be sent through the built-in earpiece, horn or special ultrasonic transmitter of the mobile terminal.
  • a part of the ultrasonic signal is transmitted through the air directly to the pickup, and the other part is transmitted through the air and reflected by the obstruction before reaching the pickup.
  • the pickup is What is obtained is the superimposed signal of direct sound and reflected sound, which is converted into audio signal through A/D.
  • the ultrasonic signal when the mobile terminal is in a call state, can be sent through the ultrasonic transmitter module, and the ultrasonic signal returned after encountering an object through the ultrasonic receiver module, or the ultrasonic signal received from the ultrasonic receiver module
  • the signal directly sound and reflected sound extracts the ultrasonic signal (reflected sound) returned by the ultrasonic signal after encountering an object, which is not limited here.
  • Step S120 Acquire the first detection data detected by the acceleration sensor and the second detection data detected by the gyroscope sensor.
  • the mobile terminal may also include an acceleration sensor and a gyroscope sensor at the same time.
  • the acceleration sensor is a sensor that can measure acceleration. In the process of acceleration, the sensor obtains the acceleration value by using Newton's second law by measuring the inertial force of the mass.
  • a three-axis acceleration sensor can be used in the mobile terminal. Through the three-axis acceleration sensor, the acceleration of the mobile terminal in three different directions (ie, x-axis, y-axis, and z-axis) can be measured. Using logical judgments on the values of the three axes, the position changes of the mobile phone terminal can be roughly measured.
  • the gyroscope sensor is also called the angular velocity sensor, which is different from the accelerometer (G-sensor). Its measurement physical quantity is the rotational angular velocity during deflection and tilt.
  • the accelerometer alone cannot measure or reconstruct the complete G-sensor can only detect the linear motion in the axial direction, but the gyroscope can make a good measurement of the motion of rotation and deflection, so that the user can be accurately analyzed and judged. The actual action.
  • the mobile terminal may control the acceleration sensor and the gyroscope sensor to keep on during the process of sending the ultrasonic signal through the ultrasonic transmitting module and receiving the ultrasonic signal through the ultrasonic receiving module, and obtain the first detection detected by the acceleration sensor Data and the second detection data detected by the gyroscope sensor.
  • the first detection data may include the acceleration of the x-axis, the y-axis, and the z-axis detected by the acceleration sensor
  • the second detection data may include the rotational angular velocity of the x-axis, the y-axis, and the z-axis detected by the gyroscope sensor. limited.
  • Step S130 Obtain the first characteristic value of the ultrasonic signal in the transmission process, the second characteristic value corresponding to the first detection data, and the third characteristic value corresponding to the second detection data.
  • the mobile terminal can obtain the first characteristic value of the ultrasonic signal sent by the ultrasonic transmitter module during the transmission process, the second characteristic value corresponding to the first detection data, and the third characteristic value corresponding to the third detection data. .
  • the first characteristic value of the ultrasonic signal during transmission may include one or more of the Doppler effect area difference, the Doppler effect area sum, and the absolute value of the ultrasonic amplitude change rate. Not limited.
  • the acceleration sensor detects the second feature value corresponding to the first detection data, which can be obtained by forming a feature vector from the acceleration values of the x-axis, y-axis, and z-axis in the first detection data; the gyroscope sensor detects the second
  • the third feature value corresponding to the detection data can be obtained by forming a feature vector from the rotation angular velocity of the x-axis, y-axis, and z-axis in the second detection data, which is not limited here.
  • Step S140 Input the first feature value, the second feature value, and the third feature value into a trained preset model to obtain an output result, and the preset model is used to obtain the relative object of the mobile terminal And control the status of the display screen of the mobile terminal according to the output result.
  • the output result may include the movement state of the mobile terminal relative to the object.
  • the preset model can be obtained by training based on a large number of training samples in advance.
  • Training samples may include input samples and output samples.
  • Input samples may include the first characteristic value of the ultrasonic signal during transmission, the second characteristic value corresponding to the data detected by the acceleration sensor, and the third characteristic value corresponding to the data detected by the gyroscope sensor.
  • the output sample may be the first feature value, the second feature value, and the movement state of the mobile terminal relative to the object corresponding to the third feature value, so that the trained preset model can be used according to the acquired first feature value, second feature value Value and the third characteristic value, output the movement state of the mobile terminal relative to the object.
  • the preset model may include Support Vector Machine (SVM), neural network, etc., which is not limited here.
  • the mobile terminal after the mobile terminal obtains the movement state of the mobile terminal relative to the object, it can control the display screen to be in the on or off state according to the movement state of the mobile terminal relative to the object, thereby improving the display screen on the mobile terminal.
  • the accuracy and stability of the state control in the call state effectively reduces the power consumption of the mobile terminal and reduces the radiation on the face caused by the display screen in the bright screen state when it is close to the face.
  • the terminal control method provided by the embodiments of the present application realizes the characteristic value of the data detected by the ultrasonic sensor, the characteristic value of the data detected by the acceleration sensor, and the characteristic value of the data detected by the gyroscope sensor, and is used to obtain the movement state of the mobile terminal relative to the object
  • the preset model of the mobile terminal obtains the movement state of the mobile terminal relative to the object, and can determine the movement state of the mobile terminal relative to the object according to the ultrasonic characteristic value, the acceleration characteristic value and the rotational angular velocity characteristic value, so as to accurately detect the movement state of the mobile terminal relative to the object.
  • the accuracy of the status control of the display during a call realizes the characteristic value of the data detected by the ultrasonic sensor, the characteristic value of the data detected by the acceleration sensor, and the characteristic value of the data detected by the gyroscope sensor, and is used to obtain the movement state of the mobile terminal relative to the object
  • the preset model of the mobile terminal obtains the movement state of the mobile terminal relative to the object
  • FIG. 3 shows a schematic flowchart of a terminal control method according to another embodiment of the present application. This method is applied to the above-mentioned mobile terminal.
  • the mobile terminal includes an ultrasonic transmitter module, an ultrasonic receiver module, an acceleration sensor, a gyroscope sensor, and a display screen.
  • the process shown in FIG. 3 will be described in detail below.
  • the terminal control method is specifically It can include the following steps:
  • Step S210 Obtain a training data set, the training data set including training data marked with the movement state of the mobile terminal relative to the object, the training data including the first characteristic value of the ultrasonic signal in the transmission process, the acceleration The second characteristic value corresponding to the data detected by the sensor and the third characteristic value corresponding to the data detected by the gyroscope sensor.
  • the embodiment of this application also includes a training method for the preset model. It is worth noting that the training of the preset model may be based on the acquired training The data set is carried out in advance, and subsequently each time the mobile terminal's movement state relative to the object is detected, it can be acquired according to the preset model, without the need to train the preset model each time the mobile terminal's movement state relative to the object is detected.
  • the training data set may include training data marked with the movement state of the mobile terminal relative to the object, and the training data may include the first feature value of the ultrasonic signal during transmission and the second feature corresponding to the data of the acceleration sensor. Value and the third characteristic value corresponding to the data detected by the gyroscope sensor.
  • the content of the first feature value, the second feature value, and the third feature value may be the same as the first feature value, the second feature value, and the third feature value used to obtain the movement state of the mobile terminal relative to the object in the foregoing embodiment. .
  • the first feature value, the second feature value, and the third feature value calculated when the mobile terminal moves away from, close to, and stationary relative to the object under the use of a large number of users can be obtained, and the calculated
  • the first feature value, the second feature value, and the third feature value are marked as the moving state of the mobile terminal relative to the object that is far away, close to, or stationary.
  • the display screen will be controlled to turn off, but the user does not want the display screen to turn off.
  • the user is using mobile
  • the terminal looks at the screen during a call and manipulates the content displayed on the screen by hand. At this time, it will be detected that the mobile terminal is close to the object, causing the display screen to go out.
  • the first feature value, the second feature value, and the third feature value are marked as the state of the mobile terminal being far away from or stationary relative to the object, so that the trained preset model can recognize the mobile terminal's movement state relative to the object under these conditions as a mobile terminal A state in which relative objects are far away or at rest.
  • the trained model can avoid the detected moving state of the mobile terminal relative to the object in a special scene, which causes inaccuracy in the control of the display screen.
  • the first feature value, the second feature value, and the third feature value are the input samples used for training, and the marked mobile terminal is close to or stationary relative to the object.
  • Each set of training data may include one input sample and one output sample.
  • Step S220 Train an initial model according to the training data set to obtain a trained preset model.
  • the training data set may be input to the initial model for training according to the training data set, so as to obtain a preset model for obtaining the movement state of the mobile terminal relative to the object.
  • the initial model can be SVM, neural network, etc., which is not limited here.
  • the following takes a neural network as an example to illustrate the training of the initial model based on the training data set.
  • Figure 4 shows the process of training according to a fully connected neural network.
  • the first feature value, the second feature value, and the third feature value in a set of data in the training data set are used as the input samples of the neural network.
  • the movement state of the mobile terminal relative to the object marked in the set of data can be As the output sample of the neural network, the fully connected neural network is divided into three branches: close, far, and still through the input layer, hidden layer, and output layer to realize the moving state of the mobile terminal relative to the object and the mobile terminal moving away from the object. Training is performed on the state and the mobile terminal relative to the stationary state of the object.
  • the neurons in the input layer are fully connected with the neurons in the hidden layer, and the neurons in the hidden layer are fully connected with the neurons in the output layer, which can effectively extract potential features of different granularities.
  • the number of hidden layers can be multiple, so as to better fit the nonlinear relationship and make the preset model obtained by training more accurate.
  • the training process of the preset model may or may not be completed by the mobile terminal.
  • the mobile terminal can be a direct user or an indirect user, that is, the mobile terminal can send the first feature value, the second feature value, and the third feature value to the stored preset
  • the server of the model obtains the movement status of the mobile terminal relative to the object from the server.
  • the preset model obtained by training can be stored locally in the mobile terminal, and the preset model obtained by training can also be stored in a server communicating with the mobile terminal.
  • the way of storing the preset model in the server can reduce occupation.
  • the storage space of the mobile terminal improves the operating efficiency of the mobile terminal.
  • the preset model may periodically or irregularly obtain new training data, and train and update the preset model.
  • Step S230 When the mobile terminal is in a call state, send an ultrasonic signal through the ultrasonic transmitter module, and receive an ultrasonic signal returned by the ultrasonic signal after encountering an object through the ultrasonic receiver module.
  • Step S240 Obtain the first detection data detected by the acceleration sensor and the second detection data detected by the gyroscope sensor.
  • step S230 and step S240 can refer to the content of the above-mentioned embodiment, which will not be repeated here.
  • Step S250 Obtain the first characteristic value of the ultrasonic signal in the transmission process, the second characteristic value corresponding to the first detection data, and the third characteristic value corresponding to the second detection data.
  • the first characteristic value of the ultrasonic signal in the transmission process may include one or more of the Doppler effect area difference, the Doppler effect area sum, and the absolute value of the ultrasonic amplitude change rate. This is not limited.
  • acquiring the first characteristic value of the ultrasonic signal in the transmission process may include:
  • the relative motion state of the mobile terminal relative to the object is essentially the process when the user picks up the mobile terminal to approach the human body or away from the human body when the user uses the mobile terminal.
  • the speed changes within a certain range, so that the frequency change of the ultrasonic signal received by the ultrasonic receiving module is also within a certain range, that is, the frequency range of the ultrasonic signal.
  • the mobile terminal can obtain the transmission frequency of the ultrasonic signal sent by its built-in ultrasonic transmitter module, and obtain the frequency range of the ultrasonic signal received by its built-in ultrasonic receiver module.
  • the transmission frequency of the ultrasonic signal transmitted by the ultrasonic transmission module may be a fixed frequency. Therefore, the mobile terminal may obtain the transmission frequency based on the set transmission parameters of the ultrasonic signal of the ultrasonic transmission module.
  • the frequency range of the ultrasonic signal received by the ultrasonic receiving module is related to the relative motion relationship between the mobile terminal and the object. Therefore, it can obtain the range of change in the motion speed of most users in the process of using the mobile terminal, and according to its motion The speed range determines the frequency range of the ultrasonic signal received by the ultrasonic receiving module.
  • the maximum relative speed and the minimum relative speed between the mobile terminal and the object can be obtained; then the maximum relative speed between the mobile terminal and the object can be obtained according to the Doppler effect formula
  • the calculation formula for determining the minimum relative speed between the mobile terminal and the object according to the frequency resolution of the Fourier transform result and the Doppler effect formula The frequency range of the ultrasonic signal received by the ultrasonic receiving module.
  • f' is the frequency of the ultrasonic signal reflected by the object received by the ultrasonic receiving module.
  • f is the sending frequency of the ultrasonic signal sent by the ultrasonic sending module.
  • v is the propagation speed of sound in the air, taking 340m/s.
  • the maximum and minimum relative speeds of the mobile terminal and the object can be obtained based on historical data, etc., and the ultrasonic waves received by the ultrasonic receiving module can be obtained through the reverse deduction of the maximum relative speed, the minimum relative speed and the above formula.
  • the frequency range of the signal can be obtained based on historical data, etc.
  • the frequency change interval may be determined based on the transmission frequency and the frequency range.
  • Figure 5 shows an audio data spectrogram provided by an embodiment of the present application.
  • the frequency spectrum is the abbreviation of frequency spectrum, which is the frequency distribution curve.
  • the discrete Fourier In Fig. 5 it is a spectrogram obtained by discrete Fourier transform of a piece of audio data. Each point on the abscissa corresponds to a real frequency value, and the ordinate represents the signal strength of the frequency.
  • f s is the sampling rate
  • fftlen is the data length
  • X[n] represents the intensity of the actual frequency f n .
  • the transmission frequency of the ultrasonic signal sent by the ultrasonic transmitter module is point_mid
  • the signal strength corresponding to the transmission frequency is ultrasonic_amp
  • the frequency range of the ultrasonic signal received by the ultrasonic receiver module is point_low to point_up, so it can be determined
  • the frequency range is from point_low to point_mid_low and point_min-up to point_up.
  • the first frequency change interval and the second frequency change interval may be determined based on the transmission frequency and the frequency range. For example, as shown in FIG. 5, the first frequency change interval is point_low to point_mid_low, and the second frequency change interval is point_min-up to point_up.
  • the intensity change curve corresponding to the frequency change interval may be obtained based on the spectrogram, and based on the frequency change interval and the intensity change curve corresponding to the frequency change interval, the transmission of the ultrasonic signal is calculated.
  • the area of the Doppler effect in the process is poor.
  • the first intensity change curve corresponding to the first frequency change interval may be obtained based on the spectrogram, and based on the first frequency change interval and the first intensity change corresponding to the first frequency change interval Change curve, calculate the first area of the ultrasonic signal in the transmission process, and at the same time, after obtaining the second frequency change interval, the second intensity change curve corresponding to the second frequency change interval can be obtained based on the spectrogram, and based on the first area The second frequency change interval and the second intensity change curve corresponding to the second frequency change interval are calculated, and the second area of the ultrasonic signal in the transmission process is calculated.
  • the Doppler of the ultrasonic signal in the transmission process can be obtained.
  • the effect area is poor.
  • acquiring the first characteristic value of the ultrasonic signal in the transmission process may include:
  • the process of obtaining the Doppler effect area sum can be roughly the same as the process of obtaining the Doppler effect area difference.
  • the sum of the first area and the second area can be calculated to obtain Doppler effect area sum.
  • the first eigenvalue includes both the Doppler effect area difference and the Doppler effect area sum
  • the sum of the first area and the second area can be calculated, the Doppler effect area difference is calculated, and the Doppler effect area is calculated.
  • acquiring the first characteristic value of the ultrasonic signal in the transmission process may include:
  • the mobile terminal can collect the first ultrasonic amplitude corresponding to the ultrasonic signal received by the ultrasonic receiving module at the current moment, and obtain the value of the ultrasonic signal received by the ultrasonic receiving module at the previous moment.
  • the second ultrasonic amplitude is a preset duration, and the specific size of the preset duration is not limited, for example, it may be 0.5S, 0.75S, etc.
  • the mobile terminal when the mobile terminal receives the ultrasonic signal through the ultrasonic receiving module, it may record the amplitude of the ultrasonic signal received at each moment.
  • the mobile terminal After acquiring the first ultrasonic amplitude and the second ultrasonic amplitude, the mobile terminal can calculate the difference between the first ultrasonic amplitude and the second ultrasonic amplitude, and take the absolute value of the difference to obtain the ultrasonic signal The absolute value of the rate of change of the ultrasonic amplitude during transmission.
  • obtaining the second feature value corresponding to the first detection data and the third feature value corresponding to the second detection data includes: generating a feature vector according to the first detection data, and obtaining the first detection data A second feature value corresponding to the detection data; a feature vector is generated according to the second detection data, and a third feature value corresponding to the second detection data is obtained.
  • the mobile terminal can generate a first feature vector according to the acceleration values of the x-axis, y-axis, and z-axis in the first detection data, and use the first feature vector as the second feature value corresponding to the first detection data; the mobile terminal can be based on A second feature vector is generated from the rotational angular velocities of the x-axis, y-axis, and z-axis in the second detection data, and the second feature vector is used as the third feature value corresponding to the second detection data.
  • the specific method of obtaining the second feature vector corresponding to the first detection data and obtaining the third feature vector corresponding to the second detection data may not be limited.
  • Step S260 Input the first feature value, the second feature value, and the third feature value into a trained preset model to obtain an output result, and the preset model is used to obtain an object relative to the mobile terminal And control the status of the display screen of the mobile terminal according to the output result.
  • the trained preset model is stored locally in the mobile terminal, and the mobile terminal can call the local preset model, and then input the first feature value, the second feature value, and the third feature value into the stored locally.
  • the mobile terminal can also send an instruction to the preset model.
  • the instruction is used to instruct the preset model to read the acquired first feature value, second feature value, and third feature value, and according to the first The feature value, the second feature value, and the third feature value output results.
  • the mobile terminal when the trained preset model is stored in the server, the mobile terminal can generate a request or instruction according to the first feature vector, the second feature vector, and the third feature vector, and send the generated instruction or request To the server to instruct the server to input the first feature vector, the second feature vector, and the third feature vector into the preset model to obtain an output result. Accordingly, the mobile terminal can receive the output result returned by the server.
  • the preset model By storing the preset model in the server, the storage space of the mobile terminal occupied by the preset model can be effectively reduced, and the occupation of the mobile terminal is also avoided.
  • the mobile terminal can obtain the output result of the preset model according to the first feature vector, the second feature vector, and the third feature vector.
  • the output result includes the movement state of the mobile terminal relative to the object, and the mobile terminal can obtain the output result of the preset model according to its relative movement. State, control the display screen to be in the on-screen state or off-screen state, thereby improving the recognition success rate of the mobile terminal in different scenarios, and improving the control accuracy and stability of the bright screen of the display screen.
  • the terminal control method provided by the embodiments of the present application provides a method for training a preset model.
  • the initial model is trained through training data marked with the movement state of the mobile terminal relative to the object to obtain the preset model.
  • the preset model can be used to output the movement state of the mobile terminal relative to the object according to the ultrasonic characteristic value, the characteristic value of the data detected by the acceleration sensor, and the characteristic value of the data detected by the gyroscope sensor, so that the mobile terminal can according to the ultrasonic characteristic value,
  • the acceleration characteristic value and the rotation angular velocity characteristic value jointly determine the movement state of the mobile terminal relative to the object, and accurately detect the movement state of the mobile terminal relative to the object, and improve the accuracy of the state control of the display screen during a call.
  • FIG. 6 shows a schematic flowchart of a terminal control method according to another embodiment of the present application. This method is applied to the above-mentioned mobile terminal.
  • the mobile terminal includes an ultrasonic transmitter module, an ultrasonic receiver module, an acceleration sensor, a gyroscope sensor, and a display screen.
  • the process shown in FIG. 6 will be described in detail below.
  • the terminal control method is specifically It can include the following steps:
  • Step S310 When the mobile terminal is in a call state, send an ultrasonic signal through the ultrasonic transmitter module, and receive an ultrasonic signal returned by the ultrasonic signal after encountering an object through the ultrasonic receiver module.
  • Step S320 Acquire the first detection data detected by the acceleration sensor and the second detection data detected by the gyroscope sensor.
  • Step S330 Obtain the first characteristic value of the ultrasonic signal in the transmission process, the second characteristic value corresponding to the first detection data, and the third characteristic value corresponding to the second detection data.
  • steps S310 to S330 can refer to the content of the above-mentioned embodiment, which will not be repeated here.
  • Step S340 Input the first feature value, the second feature value, and the third feature value into a trained preset model to obtain an output result.
  • the preset model is used to obtain the relative object of the mobile terminal And control the status of the display screen of the mobile terminal according to the output result.
  • controlling the movement state of the mobile terminal relative to the object according to the output result of the preset model may include:
  • control the display screen When the output result indicates that the mobile terminal is relatively close to the object, control the display screen to be in the off state; when the output result indicates that the mobile terminal is relatively far away from the object, control the display screen to be on the screen State; when the output result indicates that the mobile terminal is stationary relative to the object, control the display screen to maintain the current display state.
  • the output result characterizes that the mobile terminal is relatively close to the object, it characterizes that the relative motion relationship between the mobile terminal and the object is close motion, which can realize that when the mobile terminal is in a call state, the mobile terminal is close to the user’s ear, that is, it can be controlled.
  • the display screen of the mobile terminal is off.
  • the output result indicates that the mobile terminal is relatively far away from the object, it indicates that the relative movement relationship between the mobile terminal and the object is a movement away from each other. That is, the display screen of the mobile terminal can be controlled to be in a bright screen state.
  • the relative static of the mobile terminal and the object can be that both the mobile terminal and the object remain stationary, or the motion state of the mobile terminal and the object is the same, for example, the mobile terminal and the object have the same moving speed, the same direction, the same amplitude, and the same frequency, etc. , There is no limitation here.
  • the display screen can be controlled to maintain the current display state unchanged, that is, the mobile terminal is in the process of talking .
  • the display is in the on-screen state in the current display state, the display is kept in the on-screen state, and when the display is in the off-screen state in the current display state, the display is kept in the off-screen state.
  • Step S350 If a control operation on the state of the display screen is detected within a preset time period, control the display screen to be in the on-screen state or the off-screen state according to the control operation.
  • the mobile terminal after the mobile terminal controls the display state of the display screen according to the output result, it can also detect the user's control operation on the state of the display screen. If the state of the display screen is detected within the preset time Control operation, you can control the display screen to be in a display state corresponding to the control operation.
  • the preset duration can be the time that the user can respond after the mobile terminal controls the state of the display screen according to the output result.
  • the preset duration can be 1 second to 5 seconds, and the specific preset duration is not limited; the control operation can be trigger
  • the screen-on operation such as tapping the screen, tapping the home button, tapping the power button, etc.
  • the state of the display screen controlled by the mobile terminal is incorrect according to the output result, the user will quickly control the state of the display screen to meet the display state required by the user. Therefore, if a control operation is detected within the preset duration, the state of the control display screen is in the on-screen state or the off-screen state according to the control operation. For example, the mobile terminal controls the display screen from the on-screen state to the off-screen state according to the output result, but the control is incorrect at this time, so the user can manually light up the display screen.
  • Step S360 Mark the first characteristic value, the second characteristic value and the third characteristic value corresponding to the output result as the target movement state of the mobile terminal relative to the object, and the target movement state corresponds to the control operation Corresponding to the status of the display.
  • the first feature value, the second feature value, and the third feature value corresponding to the above output result can be marked as the target movement state of the mobile terminal relative to the object.
  • the first feature value, the second feature value, and the third feature value That is, the preset model obtains the input data of the output result, and the target movement state can correspond to the state of the display screen corresponding to the control operation.
  • the target movement state can be mobile The state where the terminal is far away from the object. Therefore, the preset model can be subsequently trained according to the first feature value, the second feature value, and the third feature value marked with the movement state of the mobile terminal relative to the object, so that the preset model can learn the first feature value,
  • the movement state of the mobile terminal relative to the object corresponding to the second characteristic value and the third characteristic value is the target movement state.
  • prompt content may also be generated, To prompt the user whether the calibration of the preset model is needed; if the instruction to confirm the calibration is received, the first feature value, the second feature value and the third feature value corresponding to the output result will be marked as the mobile terminal relative The target movement state of the object.
  • Step S370 Input the first characteristic value, the second characteristic value and the third characteristic value marked with the target movement state into the preset model, and perform correction training on the preset model.
  • the target movement state may be marked
  • the first feature value, the second feature value, and the third feature value are input to the preset model, that is, the first feature value, the second feature value, and the third feature value are used as input samples, and the target movement state is used as the output Samples are used to train the preset model to achieve the purpose of correcting the preset model and make the output result of the preset model more accurate.
  • the mobile terminal obtains the characteristic value of the ultrasonic wave, the characteristic value of the data detected by the acceleration sensor, and the characteristic value of the data detected by the gyroscope sensor, and uses a preset model to output the movement of the mobile terminal relative to the object Status, so that the mobile terminal can jointly determine the mobile terminal's movement state relative to the object based on the ultrasonic characteristic value, acceleration characteristic value and rotation angular velocity characteristic value, and accurately detect the movement state of the mobile terminal relative to the object, and improve the state control of the display during the call Accuracy.
  • the preset model is corrected according to the user's control operation on the display screen, which improves the accuracy of the output result of the preset model.
  • FIG. 7 shows a structural block diagram of a terminal control apparatus 400 provided by an embodiment of the present application.
  • the terminal control device 400 applies the aforementioned mobile terminal, and the mobile terminal includes a transceiver control module, a data acquisition module, a feature acquisition module, and a screen control module.
  • the terminal control device 400 includes: a transceiver control module 410, a data acquisition module 420, a feature acquisition module 430, and a screen control module 440.
  • the transceiver control module 410 is used to send an ultrasonic signal through the ultrasonic transmitter module when the mobile terminal is in a call state, and receive an ultrasonic signal returned by the ultrasonic signal after encountering an object through the ultrasonic receiver module;
  • the data acquisition module 420 is used to acquire the first detection data detected by the acceleration sensor and the second detection data detected by the gyroscope sensor;
  • the feature acquisition module 430 is used to acquire the first detection data of the ultrasonic signal in the transmission process.
  • the eigenvalue and the third eigenvalue are input to a trained preset model to obtain an output result, and the preset model is used to obtain the movement state of the mobile terminal relative to the object, and control the mobile terminal according to the output result The status of the display.
  • the terminal control device 400 may further include: a data set acquisition module and a model training module.
  • the data set acquisition module is used to acquire a training data set, the training data set includes training data marked with the movement state of the mobile terminal relative to the object, and the training data includes the first feature value of the ultrasonic signal during transmission, The second feature value corresponding to the data detected by the acceleration sensor and the third feature value corresponding to the data detected by the gyroscope sensor;
  • the model training module is used to train an initial model according to the training data set to obtain a trained preset model.
  • the first characteristic value includes a Doppler effect area difference.
  • the feature acquisition module 430 may be specifically configured to: acquire the transmission frequency of the ultrasonic signal sent by the ultrasonic transmission module and the frequency range of the ultrasonic signal received by the ultrasonic reception module; determine the first frequency based on the transmission frequency and the frequency range. The frequency change interval and the second frequency change interval; the first area is calculated according to the first intensity change curve corresponding to the first frequency change interval and the first frequency change interval; according to the second frequency change interval and the The second intensity change curve corresponding to the second frequency change interval is calculated to obtain a second area; the difference between the first area and the second area is calculated to obtain the Doppler of the ultrasonic signal during transmission The effect area is poor.
  • the first characteristic value includes a Doppler effect area sum.
  • the feature acquisition module 430 may be specifically configured to: acquire the transmission frequency of the ultrasonic signal sent by the ultrasonic transmission module and the frequency range of the ultrasonic signal received by the ultrasonic reception module; determine the first frequency based on the transmission frequency and the frequency range. The frequency change interval and the second frequency change interval; the first area is calculated according to the first intensity change curve corresponding to the first frequency change interval and the first frequency change interval; according to the second frequency change interval and the The second intensity change curve corresponding to the second frequency change interval is calculated to obtain a second area; the sum of the first area and the second area is calculated to obtain the Doppler of the ultrasonic signal in the transmission process The effect area and.
  • the first characteristic value includes an absolute value of the rate of change of ultrasonic amplitude.
  • the feature acquisition module 430 may be specifically configured to: acquire the first ultrasonic amplitude corresponding to the ultrasonic signal received by the ultrasonic receiving module, and the second ultrasonic amplitude corresponding to the ultrasonic signal received by the ultrasonic receiving module at the previous moment;
  • the absolute value of the difference between the first ultrasonic amplitude and the second ultrasonic amplitude is the absolute value of the rate of change of the ultrasonic amplitude during the transmission of the ultrasonic signal.
  • the feature acquisition module 430 may also be specifically configured to generate a first feature vector according to the first detection data, and use the first feature vector as the second feature value corresponding to the first detection data;
  • the second detection data generates a second feature vector, and the second feature vector is used as the third feature value corresponding to the second detection data.
  • the screen control module 440 may be specifically configured to: when the output result indicates that the mobile terminal is relatively close to an object, control the display screen to be in the off state; when the output result indicates the movement When the terminal is relatively far away from the object, control the display screen to be in a bright screen state; when the output result indicates that the mobile terminal is stationary relative to the object, control the display screen to maintain the current display state.
  • the screen control module 440 may also be used to control the state of the display screen of the mobile terminal according to the output result, if a control operation on the state of the display screen is detected within a preset time period.
  • the display screen is controlled to be in the on-screen or off-screen state.
  • the terminal control device 400 may also include a state labeling module and a model correction module.
  • the state labeling module is configured to label the first feature value, the second feature value, and the third feature value corresponding to the output result as the target movement state of the mobile terminal relative to the object, and the target movement state is related to the control
  • the state of the display screen corresponding to the operation corresponds;
  • the model correction module is used to input the first feature value, the second feature value, and the third feature value marked with the target movement state into the preset model, and compare the preset model Set the model for correction training.
  • the coupling between the modules may be electrical, mechanical or other forms of coupling.
  • each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
  • an ultrasonic signal is sent through the ultrasonic transmitter module, and the ultrasonic signal is received by the ultrasonic receiver module when it encounters an object.
  • the detection data and the second detection data detected by the gyroscope sensor are used to obtain the first characteristic value of the ultrasonic signal in the transmission process, the second characteristic value corresponding to the first detection data, and the third characteristic value corresponding to the second detection data.
  • the first eigenvalue, the second eigenvalue, and the third eigenvalue are input into the trained preset model to obtain the output result.
  • the preset model is used to obtain the movement state of the mobile terminal relative to the object, and finally control the display of the mobile terminal according to the output result The status of the screen. Therefore, according to the feature value of the ultrasonic feature value, the feature value of the data detected by the acceleration sensor, and the feature value of the data detected by the gyroscope sensor, and the preset model used to obtain the movement state of the mobile terminal relative to the object, the relative The movement state of the object can accurately detect the movement state of the mobile terminal relative to the object, and improve the accuracy of the state control of the display screen during a call.
  • the mobile terminal 100 may be a mobile terminal capable of running applications, such as a smart phone, a tablet computer, or an e-book.
  • the mobile terminal 100 in this application may include one or more of the following components: a processor 110, a memory 120, a display screen 130, an ultrasonic sending module 140, an ultrasonic receiving module 150, an acceleration sensor 160, a gyroscope sensor 170, and one or more Application programs, where one or more application programs may be stored in the memory 120 and configured to be executed by one or more processors 110, and one or more programs are configured to execute the methods described in the foregoing method embodiments.
  • the processor 110 may include one or more processing cores.
  • the processor 110 uses various interfaces and lines to connect various parts of the entire mobile terminal 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and calling data stored in the memory 120.
  • Various functions and processing data of the mobile terminal 100 may use at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 110 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem.
  • the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented by a communication chip alone.
  • the memory 120 may include random access memory (RAM) or read-only memory (Read-Only Memory).
  • the memory 120 may be used to store instructions, programs, codes, code sets or instruction sets.
  • the memory 120 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions for implementing the following method embodiments, etc.
  • the data storage area can also store data (such as phone book, audio and video data, chat record data) created by the terminal 100 during use.
  • the display screen 130 is used to display information input by the user, information provided to the user, and various graphical user interfaces of the mobile terminal 100. These graphical user interfaces can be composed of graphics, text, icons, numbers, videos, and any combination thereof.
  • the display screen 130 may be a liquid crystal display (LCD) or an organic light-emitting diode (OLED), which is not limited herein.
  • the ultrasonic transmitter module 140 is used to transmit ultrasonic waves, and the ultrasonic transmitter device module 140 may be an earpiece, a speaker, a special ultrasonic transmitter, etc., which is not limited herein.
  • the ultrasonic receiving module 150 is used to receive ultrasonic waves, and the ultrasonic receiving device module 150 may be a pickup or the like, which is not limited here.
  • the acceleration sensor 160 is a sensor capable of measuring acceleration.
  • the gyroscope sensor 170 is also called an angular velocity sensor, which is different from an accelerometer (G-sensor), and its measurement physical quantity is the rotational angular velocity during deflection and tilt.
  • FIG. 9 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • the computer-readable medium 800 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
  • the computer-readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium.
  • the computer-readable storage medium 800 has a storage space for the program code 810 for executing any method steps in the above-mentioned methods. These program codes can be read out from or written into one or more computer program products.
  • the program code 810 may be compressed in a suitable form, for example.

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Telephone Function (AREA)

Abstract

本申请公开了一种终端控制方法、装置、移动终端及存储介质,该终端控制方法应用于移动终端,该方法包括:当移动终端处于通话状态,通过超声波发射模块发送超声波信号,并通过超声波接收模块接收超声波信号在遇到物体后返回的超声波信号;获取加速度传感器检测的第一检测数据以及陀螺仪传感器检测的第二检测数据;获取超声波信号在传输过程中的第一特征值、第一检测数据对应的第二特征值以及第二检测数据对应的第三特征值;将第一特征值、第二特征值以及第三特征值输入已训练的预设模型,得到输出结果,预设模型用于获取移动终端相对物体的移动状态,并根据输出结果控制移动终端的显示屏的状态。本方法可提升对显示屏的状态控制的准确性。

Description

终端控制方法、装置、移动终端及存储介质
相关申请的交叉引用
本申请要求于2019年7月31日提交的申请号为201910702590.5的中国申请的优先权,其在此出于所有目的通过引用将其全部内容并入本文。
技术领域
本申请涉及移动终端技术领域,更具体地,涉及一种终端控制方法、装置、移动终端及存储介质。
背景技术
移动终端,例如手机、平板电脑等,已经成为人们日常生活中最常用的消费型电子产品之一。随着移动终端技术的日益发展,全面屏、曲面屏手机已经成为主流产品,由于需要节省移动终端的顶部空间,很多厂家在移动终端上采用超声波接近检测方案来代替传统的红外接近检测方案。但是,因为手机内部结构的复杂性、以及超声波本身特性等因素,使得使用超声波在某些特殊场景下检测结果的准确性无法保证,导致对显示屏的状态控制不准确。
发明内容
鉴于上述问题,本申请提出了一种终端控制方法、装置、移动终端及存储介质。
第一方面,本申请实施例提供了一种终端控制方法,应用于移动终端,所述移动终端包括超声波发射模块、超声波接收模块、加速度传感器、陀螺仪传感器以及显示屏,所述方法包括:当所述移动终端处于通话状态,通过所述超声波发射模块发送超声波信号,并通过所述超声波接收模块接收超声波信号在遇到物体后返回的超声波信号;获取所述加速度传感器检测的第一检测数据以及所述陀螺仪传感器检测的第二检测数据;获取所述超声波信号在传输过程中的第一特征值、所述第一检测数据对应的第二特征值以及所述第二检测数据对应的第三特征值;将所述第一特征值、所述第二特征值以及所述第三特征值输入已训练的预设模型,得到输出结果,所述预设模型用于获取所述移动终端相对物体的移动状态,并根据所述输出结果控制所述移动终端的显示屏的状态。
第二方面,本申请实施例提供了一种终端控制装置,应用于移动终端,所述移动终端包括超声波发射模块、超声波接收模块、加速度传感器、陀螺仪传感器以及显示屏,所述装置包括:收发控制模块、数据获取模块、特征获取模块以及屏幕控制模块,其中,所述收发控制模块用于当所述移动终端处于通话状态,通过所述超声波发射模块发送超声波信号,并通过所述超声波接收模块接收超声波信号在遇到物体后返回的超声波信号;所述数据获取模块用于获取所述加速度传感器检测的第一检测数据以及所述陀螺仪传感器检测的第二检测数据;所述特征获取模块用于获取所述超声波信号在传输过程中的第一特征值、所述第一检测数据对应的第二特征值以及所述第二检测数据对应的第三特征值;所述屏幕控制模块用于将所述第一特征值、所述第二特征值以及所述第三特征值输入已训练的预设模型,得到输出结果,所述预设模型用于获取所述移动终端相对物体的移动状态,并根据所述输出结果控制所述移动终端的显示屏的状态。
第三方面,本申请实施例提供了一种移动终端,包括:一个或多个处理器;存储器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被 配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行上述第一方面提供的终端控制方法。
第四方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述第一方面提供的终端控制方法。
本申请提供的方案,当移动终端处于通话状态,通过超声波发射模块发送超声波信号,并通过超声波接收模块接收超声波信号在遇到物体返回的超声波信号,获取加速度传感器检测的第一检测数据以及陀螺仪传感器检测的第二检测数据,获取超声波信号在传输过程中的第一特征值、第一检测数据对应的第二特征值以及第二检测数据对应的第三特征值,然后将第一特征值、第二特征值以及第三特征值输入已训练的预设模型,得到输出结果,该预设模型用于获取移动终端相对物体的移动状态,最后根据输出结果控制移动终端的显示屏的状态。因此,实现根据超声波特征值、加速度传感器检测到的数据的特征值以及陀螺仪传感器检测到的数据的特征值,并利用用于获取移动终端相对物体的移动状态的预设模型,获取移动终端相对物体的移动状态,能准确检测移动终端相对物体的移动状态,提升对通话过程中显示屏的状态控制的准确性。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了本申请实施例提供的超声波的传播路径的示意图。
图2示出了根据本申请一个实施例的终端控制方法流程图。
图3示出了根据本申请另一个实施例的终端控制方法流程图。
图4示出了本申请实施例提供的模型训练过程的示意图。
图5示出了本申请实施例提供的音频数据频谱图。
图6示出了根据本申请又一个实施例的终端控制方法流程图。
图7示出了根据本申请一个实施例的终端控制装置的一种框图。
图8是本申请实施例的用于执行根据本申请实施例的终端控制方法的移动终端的框图。
图9是本申请实施例的用于保存或者携带实现根据本申请实施例的终端控制方法的程序代码的存储单元。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
目前,随着移动终端技术的日益发展,曲面屏、全面屏的移动终端越来越多,为了节省移动终端的顶部空间,很多厂家在移动终端上采用超声波接近监测方案来替代传统的红外接近检测方案。目前,超声波接近监测方案为,移动终端通过超声波发送装置(如听筒、喇叭、专用超声波发射器等)发射超声波,一部分超声波通过空气传播直达超声波接收模块(拾音器)(如图1的路径1),一部分超声波通过空气传播与遮挡物形成反射后再到达超声波接收模块(如图1的路径2)。超声波接收模块拾取到的是直达声和反射声的叠加信号,经过A/D转换器转化为音频信号。通过算法处理音频数据得到遮挡物相对移动终端的运动状态,进而指导移动终端的显示屏处于亮屏状态或熄屏状态。
发明人经过长时间的研究发现,由于手机内部结构的复杂性、以及超声波本身特 性等因素,会使得无法准确控制显示屏的显示状态。例如,移动终端在通话过程中查看显示屏显示的内容,此时用户手动操作显示屏上的显示内容,会触发超声波接近检测方案而检测出物体相对移动终端接近,从而控制显示屏熄屏,影响用户体验。
针对上述问题,发明人提出了本申请实施例提供的终端控制方法、装置、移动终端以及存储介质,通过将超声波信号的特征值、加速度传感器的检测数据对应的特征值以及陀螺仪传感器的检测数据对应的特征值,输入至预设模型,并根据输出结果控制显示屏的显示状态,以提升对显示屏的状态控制的准确性。其中,具体的终端控制方法在后续的实施例中进行详细的说明。
请参阅图2,图2示出了本申请一个实施例提供的终端控制方法的流程示意图。所述终端控制方法用于通过将超声波信号的特征值、加速度传感器的检测数据对应的特征值以及陀螺仪传感器的检测数据对应的特征值,输入至预设模型,并根据输出结果控制显示屏的显示状态,以提升对显示屏的状态控制的准确性。在具体的实施例中,所述终端控制方法应用于如图7所示的终端控制装置400以及配置有所述终端控制装置400的移动终端100(图8)。下面将以移动终端为例,说明本实施例的具体流程,当然,可以理解的,本实施例所应用的移动终端可以为智能手机、平板电脑、穿戴式电子设备等,在此不做限定。其中,在本实施例中,该移动终端可以包括超声波发射模块、超声波接收模块、加速度传感器、陀螺仪传感器以及显示屏,下面将针对图2所示的流程进行详细的阐述,所述终端控制方法具体可以包括以下步骤:
步骤S110:当所述移动终端处于通话状态,通过所述超声波发射模块发送超声波信号,并通过所述超声波接收模块接收超声波信号在遇到物体后返回的超声波信号。
在本申请实施例中,移动终端可以对通话状态进行检测,以便在移动终端处于通话状态时,通过超声波发射模块发射超声波信号以及通过超声波接收模块接收超声波信号,后续则可以获取超声波信号在传输过程中的特征值,以确定移动终端相对物体的移动状态。
在一些实施方式中,移动终端可以通过内置的监听模块对所述移动终端的来电或去电进行实时监听,当监听到移动终端处于响铃开始(CALL_STATE_RINGING)来电时或拨打操作去电时,对所述移动终端是否进入通话状态进行监听。其中,在移动终端进行拨打操作去电时,会发出系统广播,移动终端可以使用Broadcast Receiver来监听,另外,监听移动终端是否处于通话状态可以为监听移动终端在来电或去电后是否处于通话中的界面,其中,当监听到所述移动终端处于通话中(CALL_STATE_OFFHOOK)时,可以确定移动终端处于通话状态。
在本申请实施例中,移动终端可以同时包括超声波发送模块和超声波接收模块。在超声波发送模块相对物体运动的过程中,其实质是移动终端相对物体运动,从而超声波接收模块也相对物体运动。根据多普勒效应,物体辐射的波长因为波源(移动终端)和观测者(物体)的相对运动而产生变化,多普勒效应公式如下:
Figure PCTCN2020103305-appb-000001
其中,f'为观察到的频率、f为发射源于该介质中的原始发射频率、v为波在该介质中的传播速度、v 0为观察者移动速度,若观察者接近发射源则前方运算符号为+号,反之则为-号;v s为发射源移动速度,若物体接近观察者则前方运算符号为-号,反之则为+号。由多普勒效应公式可知,当发射源与观察者相对接近时,观察者接收到的信号频率会变大;当发射源与观察者相对远离时,观察者接收到的信号频率会变小;当发射源与观察者相对静止时,观察者接收到信号频率与发射源一致。
在一些实施方式中,当监听到移动终端处于通话状态时,可以通过移动终端内置的超声波发送模块发送固定频率的超声波信号,可以理解的是,超声波发送模块发送的超声波信号中的一部分通过空气传播直达超声波接收模块,另一部分通过空气传播与遮挡物形成反射后再达到超声波接收模块,超声波接收模块拾取到的是直达声和反射声的叠加信号,经过A/D转换为音频信号,其中,该遮挡物可以包括人脸、人体等。例如,可以通过移动终端内置的听筒、喇叭或者专用超声波发射器发送固定频率的超声波信号,超声波信号的一部分通过空气传播直达拾音器,另一部分通过空气传播与遮挡物形成反射后再达到拾音器,拾音器是获取到的是直达声和反射声的叠加信号,经过A/D转换为音频信号。
在本实施例中,当移动终端处于通话状态时,可以通过超声波发送模块发送超声波信号,并通过超声波接收模块接收超声波信号在遇到物体后返回的超声波信号,或者从超声波接收模块接收到的超声波信号(直达声和反射声)中提取超声波信号在遇到物体后返回的超声波信号(反射声),在此不做限定。
步骤S120:获取所述加速度传感器检测的第一检测数据以及所述陀螺仪传感器检测的第二检测数据。
在本申请实施例中,移动终端还可以同时包括加速度传感器以及陀螺仪传感器。其中,加速度传感器是一种能够测量加速度的传感器。传感器在加速过程中,通过对质量块所受惯性力的测量,利用牛顿第二定律获得加速度值。移动终端中可以采用三轴加速度传感器,通过三轴加速度传感器,可以测量手机终端在三个不同方向上(即x轴、y轴、z轴)的加速度。再利用对三个轴的数值进行逻辑判断,就可以大概测出手机终端的移动、动作等位置变化。陀螺仪传感器又叫角速度传感器,是不同于加速度计(G-sensor)的,它的测量物理量是偏转、倾斜时的转动角速度,在移动终端中,仅用加速度计没办法测量或重构出完整的3D动作,测不到转动的动作的,G-sensor只能检测轴向的线性动作,但陀螺仪则可以对转动、偏转的动作做很好的测量,这样就可以精确分析判断出使用者的实际动作。
在本申请实施例中,移动终端可以在通过超声波发送模块发送超声波信号以及通过超声波接收模块接收超声波信号的过程中,控制加速度传感器以及陀螺仪传感器保持开启状态,并获取加速度传感器检测的第一检测数据以及陀螺仪传感器检测的第二检测数据。其中,第一检测数据可以包括加速度传感器检测的x轴、y轴以及z轴的加速度,第二检测数据可以包括陀螺仪传感器检测的x轴、y轴以及z轴的转动角速度,在此不做限定。
步骤S130:获取所述超声波信号在传输过程中的第一特征值、所述第一检测数据对应的第二特征值以及所述第二检测数据对应的第三特征值。
在本申请实施例中,移动终端可以获取超声波发送模块发送的超声波信号在传输过程中的第一特征值,第一检测数据对应的第二特征值,以及第三检测数据对应的第三特征值。
在一些实施方式中,超声波信号在传输过程中的第一特征值可以包括多普勒效应面积差、多普勒效应面积和、以及超声波幅度变化率绝对值中的一种或者多种,在此不做限定。
在一些实施方式中,加速度传感器检测第一检测数据对应的第二特征值,可以由第一检测数据中x轴、y轴以及z轴的加速度值形成一个特征向量得到;陀螺仪传感器检测第二检测数据对应的第三特征值,可以由第二检测数据中x轴、y轴以及z轴的转动角速度形成一个特征向量得到,在此不做限定。
步骤S140:将所述第一特征值、所述第二特征值以及所述第三特征值输入已训练的预设模型,得到输出结果,所述预设模型用于获取所述移动终端相对物体的移动状态,并根据所述输出结果控制所述移动终端的显示屏的状态。
在本申请实施例中,在得到超声波信号在传输过程中的第一特征值、第一检测数据对应的第二特征值以及第二检测数据对应的第三特征值后,可以将第一特征值、第二特征值以及第三特征值作为输入参数输入至已训练的预设模型,得到预设模型输出的输出结果。其中,输出结果可以包括移动终端相对物体的移动状态。
在一些实施方式中,预设模型可以预先根据大量训练样本进行训练得到。训练样本可以包括输入样本及输出样本,输入样本可以包括超声波信号在传输过程中的第一特征值、加速度传感器检测的数据对应的第二特征值以及陀螺仪传感器检测的数据对应的第三特征值,输出样本可以为第一特征值、第二特征值以及第三特征值对应的移动终端相对物体的移动状态,从而已训练的预设模型可以用于根据获取的第一特征值、第二特征值以及第三特征值,输出移动终端相对物体的移动状态。其中,预设模型可以包括支持向量机(Support Vector Machine,SVM)、神经网络等,在此不做限定。
在本申请实施例中,移动终端在获取到移动终端相对物体的移动状态后,则可以根据移动终端相对物体的移动状态控制显示屏处于亮屏状态或熄屏状态,从而提升显示屏在移动终端处于通话状态下的状态控制的准确率和稳定性,有效降低移动终端的功耗以及降低显示屏在靠近人脸时处于亮屏状态对人脸造成的辐射。
本申请实施例提供的终端控制方法,实现了根据超声波特征值、加速度传感器检测到的数据的特征值以及陀螺仪传感器检测到的数据的特征值,并利用用于获取移动终端相对物体的移动状态的预设模型,获取移动终端相对物体的移动状态,能根据超声波特征值、加速度特征值以及转动角速度特征值共同确定移动终端相对物体的移动状态,从而准确检测移动终端相对物体的移动状态,提升对通话过程中显示屏的状态控制的准确性。
请参阅图3,图3示出了本申请另一个实施例提供的终端控制方法的流程示意图。该方法应用于上述移动终端,该移动终端包括超声波发射模块、超声波接收模块、加速度传感器、陀螺仪传感器以及显示屏,下面将针对图3所示的流程进行详细的阐述,所述终端控制方法具体可以包括以下步骤:
步骤S210:获取训练数据集,所述训练数据集包括被标注有所述移动终端相对物体的移动状态的训练数据,所述训练数据包括超声波信号在传输过程中的第一特征值、所述加速度传感器检测的数据对应的第二特征值以及所述陀螺仪传感器检测的数据对应的第三特征值。
在本申请实施例中,针对前述实施例中的预设模型,本申请实施例中还包括对该预设模型的训练方法,值得说明的是,对预设模型的训练可以是根据获取的训练数据集预先进行的,后续在每次检测移动终端相对物体的移动状态时,则可以根据该预设模型获取,而无需每次检测移动终端相对物体的移动状态时对预设模型进行训练。
在一些实施方式中,训练数据集可以包括被标注有移动终端相对物体的移动状态的训练数据,训练数据可以包括超声波信号在传输过程中的第一特征值、加速度传感器的数据对应的第二特征值以及陀螺仪传感器检测的数据对应的第三特征值。其中,第一特征值、第二特征值以及第三特征值的内容可以与前述实施例中用于获取移动终端相对物体的移动状态的第一特征值、第二特征值及第三特征值相同。
在构建训练数据集时,可以获取大量用户使用情况下移动终端相对物体远离、靠近及静止的移动状态时,计算得到的第一特征值、第二特征值及第三特征值,并将计算的第一特征值、第二特征值及第三特征值,标注为移动终端相对物体远离、靠近或者静止的移动状态。
另外,还可以将一些特殊场景下,通过超声波接近检测方法容易检测到移动终端相对物体靠近的移动状态,此时会控制显示屏熄灭,但用户并不想要显示屏熄灭,例如,用户在使用移动终端通话时察看屏幕,并用手操作屏幕上显示的内容,此时会检测到移动终端相对物体靠近而导致显示屏熄灭。因此,可以获取一些特殊场景下通过 传统的检测方法检测到移动终端相对物体靠近,但是用户需求显示屏保持亮屏的情况时计算的第一特征值、第二特征值以及第三特征值,并将这些第一特征值、第二特征值以及第三特征值标注为移动终端相对物体远离或者静止的状态,以便训练的预设模型能将这些情况下移动终端相对物体的移动状态识别为移动终端相对物体远离或者静止的状态。同理,可以获取一些特殊场景下通过传统的检测方法检测到移动终端相对物体远离,但是用户需求显示屏保持熄屏的情况时计算的第一特征值、第二特征值以及第三特征值,并将这些第一特征值、第二特征值以及第三特征值标注为移动终端相对物体靠近或者静止的状态。从而,可以使得训练得到的模型能够避免特殊场景下检测到的移动终端相对物体的移动状态,给显示屏的控制造成不准确。
在本申请实施例中,训练数据集合中,第一特征值、第二特征值以及第三特征值即为用于进行训练的输入样本,被标注的移动终端相对物体靠近或者静止的状态即为用于进行训练的输出样本,每组训练数据可以包括一个输入样本和一个输出样本。
步骤S220:根据所述训练数据集训练初始模型,得到已训练的预设模型。
在本申请实施例中,可以根据训练数据集合,将训练数据集合输入至初始模型进行训练,从而得到用于获取移动终端相对物体的移动状态的预设模型。其中,初始模型可以为SVM、神经网络等,在此不做限定。
下面以神经网络为例,对根据训练数据集合训练初始模型进行说明。
图4示出了根据全连接的神经网络进行训练的过程。如图4所示,训练数据集合中一组数据中的第一特征值、第二特征值以及第三特征值作为神经网络的输入样本,一组数据中标注的移动终端相对物体的移动状态可以作为神经网络的输出样本,全连接的神经网络通过输入层、隐藏层以输出层分为靠近、远离、静止三个分支,实现对移动终端相对物体靠近的移动状态、移动终端相对物体远离的移动状态及移动终端相对物体静止的移动状态进行训练。
在如图4所示的神经网络中,输入层中的神经元与隐藏层的神经元全连接,隐藏层的神经元与输出层的神经元全连接,从而能够有效提取不同粒度的潜在特征。并且隐藏层数目可以为多个,从而能更好地拟合非线性关系,使得训练得到的预设模型更加准确。
可以理解的,对预设模型的训练过程可以由移动终端完成,也可以不由移动终端完成。当训练过程不由移动终端完成时,则移动终端可以只是作为直接使用者,也可以是间接使用者,即移动终端可以将第一特征值、第二特征值以及第三特征值发送至存储有预设模型的服务器,从服务器获取移动终端相对物体的移动状态。
在一些实施方式中,训练得到的预设模型可以存储于移动终端本地,该训练得到的预设模型也可以在与移动终端通信连接的服务器,将预设模型存储在服务器的方式,可以减少占用移动终端的存储空间,提升移动终端运行效率。
在一些实施方式中,预设模型可以周期性的或者不定期的获取新的训练数据,对该预设模型进行训练和更新。
步骤S230:当所述移动终端处于通话状态,通过所述超声波发射模块发送超声波信号,并通过所述超声波接收模块接收超声波信号在遇到物体后返回的超声波信号。
步骤S240:获取所述加速度传感器检测的第一检测数据以及所述陀螺仪传感器检测的第二检测数据。
在本申请实施例中,步骤S230及步骤S240可以参阅上述实施例的内容,在此不再赘述。
步骤S250:获取所述超声波信号在传输过程中的第一特征值、所述第一检测数据对应的第二特征值以及所述第二检测数据对应的第三特征值。
在本申请实施例中,超声波信号在传输过程中的第一特征值可以包括多普勒效应面积差、多普勒效应面积和、以及超声波幅度变化率绝对值中的一种或者多种,在此 不做限定。
在一些实施方式中,第一特征值包括多普勒效应面积差时,获取超声波信号在传输过程中的第一特征值,可以包括:
获取所述超声波发送模块发送的超声波信号的发送频率,以及所述超声波接收模块接收的超声波信号的频率范围;基于所述发送频率和所述频率范围确定第一频率变化区间以及第二频率变化区间;根据所述第一频率变化区间和所述第一频率变化区间对应的第一强度变化曲线,计算获得第一面积;根据所述第二频率变化区间和所述第二频率变化区间对应的第二强度变化曲线,计算获得第二面积;计算所述第一面积和所述第二面积之差,得到所述超声波信号在传输过程中的所述多普勒效应面积差。
在移动终端处于通话状态时,移动终端相对物体的相对运动状态,其实质为用户在使用移动终端的过程中,用户拿起移动终端靠近人体或远离人体的过程,考虑到用户拿起移动终端的速度在一定范围内变化,从而使超声波接收模块接收到的超声波信号的频率变化也相应在一定的范围内,即超声波信号的频率范围。
在一些实施方式中,移动终端可以获取其内置的超声波发送模块发送的超声波信号的发送频率,以及获取其内置的超声波接收模块接收的超声波信号的频率范围。其中,该超声波发送模块发送的超声波信号的发送频率可以是固定频率,因此,移动终端可以基于已设定的超声波发送模块的超声波信号的发送参数获取该发送频率。另外,该超声波接收模块接收的超声波信号的频率范围和移动终端与物体的相对运动关系相关,因此,可以获取大多数用户在使用移动终端的过程中,其运动速度的变化范围,并根据其运动速度的变化范围确定超声波接收模块接收的超声波信号的频率范围。
具体地,根据运动速度的变化范围,可以获得所述移动终端与物体之间的最大相对速度以及最小相对速度;然后根据多普勒效应公式,获取所述移动终端与物体之间的最大相对速度的计算公式;根据傅里叶变换结果的频率分辨率,以及所述多普勒效应公式,确定所述移动终端与物体之间的最小相对速度的计算公式所述最小相对速度的计算公式,确定所述超声波接收模块接收的超声波信号的频率范围。其中,基于多普勒效应公式可知,f'为超声波接收模块接收到的物体反射的超声波信号的频率。f为超声波发送模块发送的超声波信号的发送频率。v为声音在空气中的传播速度,取340m/s。假设移动终端是静止的,则v s=0。如果物体相对终端的运动速度为v 01,则多普勒效应公式中物体的移动速度为v 0=2v 01。假设超声波发送模块发送的超声波信号的发送频率为ultrasonic=22500Hz,超声波接收模块接收的超声波信号的频率范围为[22420Hz,22580Hz],则根据多普勒效应能够识别到的物体与移动终端最大相对速度为:
Figure PCTCN2020103305-appb-000002
若进行傅里叶变换(fast Fourier Transform,DFT)变换的数据长度为fftlen=8192,音频数据采样率为fs=48kHz,则DFT结果的频率分辨率为:
Figure PCTCN2020103305-appb-000003
则由式
Figure PCTCN2020103305-appb-000004
和式
Figure PCTCN2020103305-appb-000005
则能够识别到的物体与移动终端最小相对速度为:
Figure PCTCN2020103305-appb-000006
因此,在本实施例中,可以基于历史数据等获取移动终端与物体的最大相对速度和最小相对速度,并通过最大相对速度、最小相对速度以及上述公式反向推导获取该超声波接收模块接收的超声波信号的频率范围。
在一些实施方式中,在获取超声波发送模块发送的超声波信号的发送频率以及超声波接收模块接收到的超声波信号的频率范围后,可以基于该发送频率和频率范围确定频率变化区间。例如,如图5所示,图5示出了本申请实施例提供的音频数据频谱图,频谱为频率谱的简称,是频率的分布曲线,对于离散的音频数据采样点,可以通过离散傅里叶变换获得,于图5中,其为一段音频数据经过离散傅里叶变换得到的频谱图,横坐标的每个点各自对应一个现实中的频率值,纵坐标代表该频率的信号强度。
在一些实施方式中,特征提取模块每次使用长度fftlen=8192的数据模块做DFT变换,得到相应的幅频向量X如图5所示,
实际频率f n与幅频向量X的第n个数据之间的关系如下:
Figure PCTCN2020103305-appb-000007
其中,f s为采样率,fftlen为数据长度。则X[n]代表实际频率f n的强度。
假设算法中考虑的关键频率有ultrasonic=22500Hz、f_min_low=22494Hz、f_min_up=22506Hz、f_low=22420Hz、f_up=22580Hz,则考虑的关键频率为:n1、n2、n3、n4和n5,n1为point_low,n2为point_mid_low,n3为point_mid,n4为point_mid_up,n5为point_up,其中,
Figure PCTCN2020103305-appb-000008
Figure PCTCN2020103305-appb-000009
Figure PCTCN2020103305-appb-000010
Figure PCTCN2020103305-appb-000011
Figure PCTCN2020103305-appb-000012
如图5所示,该超声波发送模块发送的超声波信号的发送频率为point_mid,发送频率对应的信号强度为ultrasonic_amp,该超声波接收模块接收到的超声波信号的频率范围为point_low到point_up,因此,可以确定该频率变化区间为point_low到point_mid_low以及point_min-up到point_up。
在一些实施方式中,基于发送频率和频率范围可以确定第一频率变化区间和第二频率变化区间。例如,如图5所示,该第一频率变化区间为point_low到point_mid_low,第二频率变化区间为point_min-up到point_up。
在一些实施方式中,在获取频率变化区间后,可以基于频谱图获取该频率变化区 间对应的强度变化曲线,并基于该频率变化区间和频率变化区间对应的强度变化曲线,计算该超声波信号在传输过程中的多普勒效应面积差。
具体地,在获取第一频率变化区间后,可以基于频谱图获取该第一频率变化区间对应的第一强度变化曲线,并基于该第一频率变化区间和第一频率变化区间对应的第一强度变化曲线,计算该超声波信号在传输过程中的第一面积,同时,在获取第二频率变化区间后,可以基于频谱图获取该第二频率变化区间对应的第二强度变化曲线,并基于该第二频率变化区间和第二频率变化区间对应的第二强度变化曲线,计算该超声波信号在传输过程中的第二面积。进一步地,计算第一面积和第二面积之差,例如,通过第一面积减去第二面积或者通过第二面积减去第一面积,则可以得到该超声波信号在传输过程中的多普勒效应面积差。
在一些实施方式中,第一特征值包括多普勒效应面积和时,获取超声波信号在传输过程中的第一特征值,可以包括:
获取所述超声波发送模块发送的超声波信号的发送频率,以及所述超声波接收模块接收的超声波信号的频率范围;基于所述发送频率和所述频率范围确定第一频率变化区间以及第二频率变化区间;根据所述第一频率变化区间和所述第一频率变化区间对应的第一强度变化曲线,计算获得第一面积;根据所述第二频率变化区间和所述第二频率变化区间对应的第二强度变化曲线,计算获得第二面积;计算所述第一面积和所述第二面积之和,得到所述超声波信号在传输过程中的所述多普勒效应面积和。
其中,获取多普勒效应面积和的过程可以与获取多普勒效应面积差的过程大致相同,在得到第一面积以及第二面积后,则可以计算第一面积与第二面积之和,得到多普勒效应面积和。当第一特征值同时包括多普勒效应面积差以及多普勒效应面积和时,则可以在计算得到上述第一面积以及第二面积之和,计算多普勒效应面积差且计算多普勒效应面积和。
在一些实施方式中,第一特征值包括超声波幅度变化率绝对值时,获取超声波信号在传输过程中的第一特征值,可以包括:
获取所述超声波接收模块接收的超声波信号对应的第一超声波幅值,以及上一时刻的所述超声波接收模块接收的超声波信号对应的第二超声波幅值;获取所述第一超声波幅值与所述第二超声波幅值的差值的绝对值,得到所述超声波信号在传输过程中的超声波幅度变化率绝对值。
其中,第一特征值包括超声波幅度变化率绝对值时,移动终端可以采集当前时刻超声波接收模块接收的超声波信号对应的第一超声波幅值,并获取上一时刻的超声波接收模块接收的超声波信号的第二超声波幅值。其中,当前时刻与上一时刻的间隔时长为预设时长,所述预设时长的具体大小可以不不作为限定,例如,可以为0.5S,0.75S等。在一些实施方式中,移动终端通过超声波接收模块接收到超声波信号时,可以将每个时刻接收的超声波信号的幅值进行记录。
移动终端在获取到上述第一超声波幅值以及第二超声波幅值后,则可以计算第一超声波幅值与第二超声波幅值的差值,并取该差值的绝对值,从而得到超声波信号在传输过程中的超声波幅度变化率绝对值。
在一些实施方式中,获取所述第一检测数据对应的第二特征值以及所述第二检测数据对应的第三特征值,包括:根据所述第一检测数据生成特征向量,获得所述第一检测数据对应的第二特征值;根据所述第二检测数据生成特征向量,获得所述第二检测数据对应的第三特征值。
其中,移动终端可以根据第一检测数据中x轴、y轴以及z轴的加速度值生成第一特征向量,并将第一特征向量作为第一检测数据对应的第二特征值;移动终端可以根据由第二检测数据中x轴、y轴以及z轴的转动角速度生成第二特征向量,并将第二特征向量作为第二检测数据对应的第三特征值。具体获取第一检测数据对应的第二特征 向量以及获取第二检测数据对应的第三特征向量的方式可以不作为限定。
步骤S260:将所述第一特征值、所述第二特征值以及所述第三特征值输入已训练的预设模型,得到输出结果,所述预设模型用于获取所述移动终端相对物体的移动状态,并根据所述输出结果控制所述移动终端的显示屏的状态。
在一些实施方式中,已训练的预设模型存储于移动终端本地,移动终端可以调用本地的预设模型,然后将第一特征值、第二特征值以及第三特征值输入存储在本地的已训练的预设模型,移动终端也可以发送指令至该预设模型,该指令用于指示预设模型去读取获取的第一特征值、第二特征值以及第三特征值,并根据第一特征值、第二特征值以及第三特征值输出结果。
在另一些实施方式中,该已训练的预设模型存储于服务器时,移动终端可以根据第一特征向量、第二特征向量以及第三特征向量生成请求或者指令,并将生成的指令或者请求发送至服务器,以指示服务器将第一特征向量、第二特征向量以及第三特征向量输入预设模型,得到输出结果,相应的,移动终端可以接收到服务器返回的输出结果。通过将预设模型存储于服务器的方式,可以有效减少预设模型占用移动终端的存储空间,也避免了占用移动终端。
从而,移动终端可以根据第一特征向量、第二特征向量以及第三特征向量,得到预设模型的输出结果,输出结果包括移动终端相对物体的移动状态,并且移动终端可以根据其相对物体的移动状态,控制显示屏处于亮屏状态或熄屏状态,从而提高移动终端在不同场景下的识别成功率,提高显示屏的亮屏的控制准确率和稳定性。
本申请实施例提供的终端控制方法,提供了训练预设模型的方法,通过被标注有移动终端相对物体的移动状态的训练数据,对初始模型进行训练,从而得到预设模型。预设模型可以用于根据超声波特征值、加速度传感器检测到的数据的特征值以及陀螺仪传感器检测到的数据的特征值,输出移动终端相对物体的移动状态,从而移动终端能根据超声波特征值、加速度特征值以及转动角速度特征值共同确定移动终端相对物体的移动状态,而准确检测移动终端相对物体的移动状态,提升对通话过程中显示屏的状态控制的准确性。
请参阅图6,图6示出了本申请又一个实施例提供的终端控制方法的流程示意图。该方法应用于上述移动终端,该移动终端包括超声波发射模块、超声波接收模块、加速度传感器、陀螺仪传感器以及显示屏,下面将针对图6所示的流程进行详细的阐述,所述终端控制方法具体可以包括以下步骤:
步骤S310:当所述移动终端处于通话状态,通过所述超声波发射模块发送超声波信号,并通过所述超声波接收模块接收超声波信号在遇到物体后返回的超声波信号。
步骤S320:获取所述加速度传感器检测的第一检测数据以及所述陀螺仪传感器检测的第二检测数据。
步骤S330:获取所述超声波信号在传输过程中的第一特征值、所述第一检测数据对应的第二特征值以及所述第二检测数据对应的第三特征值。
在本申请实施例中,步骤S310至步骤S330可以参阅上述实施例的内容,在此不再赘述。
步骤S340:将所述第一特征值、所述第二特征值以及所述第三特征值输入已训练的预设模型,得到输出结果,所述预设模型用于获取所述移动终端相对物体的移动状态,并根据所述输出结果控制所述移动终端的显示屏的状态。
在本申请实施例中,根据预设模型的输出结果控制移动终端相对物体的移动状态,可以包括:
当所述输出结果表征所述移动终端与物体相对靠近时,控制所述显示屏处于熄屏状态;当所述输出结果表征所述移动终端与物体相对远离时,控制所述显示屏处于亮屏状态;当所述输出结果表征所述移动终端相对物体静止时,控制所述显示屏保持当 前的显示状态。
可以理解的,当输出结果表征该移动终端与物体相对靠近时,表征移动终端与物体的相对运动关系为靠近运动,可以实现当移动终端处于通话状态时,移动终端贴近用户的耳朵,即可以控制移动终端的显示屏处于熄屏状态。当输出结果表征该移动终端与物体相对远离时,表征移动终端与物体的相对运动关系为相互远离的运动,也就是说,可以实现当移动终端处于通话状态时,该移动终端远离用户的耳朵,即可以控制移动终端的显示屏处于亮屏状态。移动终端与物体相对静止可以为移动终端和物体均保持静止,或者该移动终端与物体的运动状态相同,例如,移动终端与物体的运动速度相同、运动方向相同、运动幅度相同、运动频率相同等,在此不做限定。当判断结果表征该移动终端与物体相对静止时,表征该移动终端与物体的相对运动关系不变,可以控制显示屏保持当前的显示状态不变,也就是说,移动终端处于通话状态的过程中,当显示屏在当前显示状态为亮屏状态时,则保持显示屏处于亮屏状态不变,当显示屏在当前显示状态为熄屏状态时,则保持显示屏处于熄屏状态不变。
步骤S350:如果在预设时长内检测到对所述显示屏的状态的控制操作时,根据所述控制操作控制所述显示屏处于亮屏状态或者熄屏状态。
在本申请实施例中,移动终端在根据输出结果控制显示屏的显示状态之后,还可以对用户对显示屏的状态的控制操作进行检测,如果在预设时长内检测到对显示屏的状态的控制操作,则可以控制显示屏处于与该控制操作相对应的显示状态。其中,预设时长可以为用户在移动终端根据输出结果控制显示屏的状态后能反应的时长,例如,预设时长可以为1秒~5秒,具体预设时长不作限定;控制操作可以为触发亮屏的操作,例如点击屏幕,点击home键,点击电源键等,控制操作也可以为熄屏操作,例如,点击电源键等,具体控制操作不作限定。
可以理解的,如果移动终端根据输出结果控制显示屏的状态有误,则用户会快速控制显示屏的状态,以满足用户需求的显示状态。因此,如果在预设时长内容检测到控制操作,则根据控制操作控制显示屏的状态处于亮屏状态或者熄屏状态。例如,移动终端根据输出结果将显示屏由亮屏状态控制为熄屏状态,而此时控制是有误的,因此用户可以手动点亮显示屏。
步骤S360:将所述输出结果对应的所述第一特征值、第二特征值以及第三特征值标注为所述移动终端相对物体的目标移动状态,所述目标移动状态与所述控制操作对应的显示屏的状态对应。
在本申请实施例中,如果在预设时长后检测到用户对显示屏的控制操作,则可以表示移动终端根据输出结果控制显示屏的状态有误,即预设模型的输出结果有误。因此,可以将上述输出结果所对应的第一特征值、第二特征值以及第三特征值标注为移动终端相对物体的目标移动状态,该第一特征值、第二特征值以及第三特征值即预设模型得到该输出结果所输入的数据,目标移动状态可以与控制操作对应的显示屏的状态对应,例如,控制操作对应的显示屏的状态为亮屏状态,则目标移动状态可以为移动终端相对物体远离的状态。从而,后续可以根据标注有移动终端相对物体的移动状态的第一特征值、第二特征值以及第三特征值,对预设模型进行训练,使预设模型能学习到该第一特征值、第二特征值以及第三特征值所对应的移动终端相对物体的移动状态为目标移动状态。
在一些实施方式中,在将所述输出结果对应的所述第一特征值、第二特征值以及第三特征值标注为所述移动终端相对物体的目标移动状态之前,还可以生成提示内容,以提示用户是否需要进行预设模型的校正;如果接收到用于确认进行校正的指令时,才在将输出结果对应的第一特征值、第二特征值以及第三特征值标注为移动终端相对物体的目标移动状态。
步骤S370:将标注有所述目标移动状态的所述第一特征值、第二特征值以及第三 特征值输入所述预设模型,对所述预设模型进行较正训练。
在本申请实施例中,在将输出结果对应的第一特征值、第二特征值以及第三特征值标注为移动终端相对物体的目标移动状态之后,则可以将标注有所述目标移动状态的所述第一特征值、第二特征值以及第三特征值输入所述预设模型,即将所述第一特征值、第二特征值以及第三特征值作为输入样本,将目标移动状态作为输出样本,对预设模型进行训练,达到对预设模型的校正目的,使预设模型的输出结果的准确性更高。
本申请实施例提供的终端控制方法,移动终端获取超声波特征值、加速度传感器检测到的数据的特征值以及陀螺仪传感器检测到的数据的特征值,并利用预设模型输出移动终端相对物体的移动状态,从而移动终端能根据超声波特征值、加速度特征值以及转动角速度特征值共同确定移动终端相对物体的移动状态,而准确检测移动终端相对物体的移动状态,提升对通话过程中显示屏的状态控制的准确性。另外,还根据用户对显示屏的控制操作,对预设模型进行校正,提升了预设模型的输出结果的准确性。
请参阅图7,其示出了本申请实施例提供的一种终端控制装置400的结构框图。该终端控制装置400应用上述的移动终端,移动终端包括收发控制模块、数据获取模块、特征获取模块以及屏幕控制模块。该终端控制装置400包括:收发控制模块410、数据获取模块420、特征获取模块430以及屏幕控制模块440。其中,所述收发控制模块410用于当所述移动终端处于通话状态,通过所述超声波发射模块发送超声波信号,并通过所述超声波接收模块接收超声波信号在遇到物体后返回的超声波信号;所述数据获取模块420用于获取所述加速度传感器检测的第一检测数据以及所述陀螺仪传感器检测的第二检测数据;所述特征获取模块430用于获取所述超声波信号在传输过程中的第一特征值、所述第一检测数据对应的第二特征值以及所述第二检测数据对应的第三特征值;所述屏幕控制模块440用于将所述第一特征值、所述第二特征值以及所述第三特征值输入已训练的预设模型,得到输出结果,所述预设模型用于获取所述移动终端相对物体的移动状态,并根据所述输出结果控制所述移动终端的显示屏的状态。
在一些实施方式中,该终端控制装置400还可以包括:数据集获取模块以及模型训练模块。数据集获取模块用于获取训练数据集,所述训练数据集包括被标注有所述移动终端相对物体的移动状态的训练数据,所述训练数据包括超声波信号在传输过程中的第一特征值、所述加速度传感器检测的数据对应的第二特征值以及所述陀螺仪传感器检测的数据对应的第三特征值;模型训练模块用于根据所述训练数据集训练初始模型,得到已训练的预设模型。
在一些实施方式中,所述第一特征值包括多普勒效应面积差。特征获取模块430可以具体用于:获取所述超声波发送模块发送的超声波信号的发送频率,以及所述超声波接收模块接收的超声波信号的频率范围;基于所述发送频率和所述频率范围确定第一频率变化区间以及第二频率变化区间;根据所述第一频率变化区间和所述第一频率变化区间对应的第一强度变化曲线,计算获得第一面积;根据所述第二频率变化区间和所述第二频率变化区间对应的第二强度变化曲线,计算获得第二面积;计算所述第一面积和所述第二面积之差,得到所述超声波信号在传输过程中的所述多普勒效应面积差。
在一些实施方式中,所述第一特征值包括多普勒效应面积和。特征获取模块430可以具体用于:获取所述超声波发送模块发送的超声波信号的发送频率,以及所述超声波接收模块接收的超声波信号的频率范围;基于所述发送频率和所述频率范围确定第一频率变化区间以及第二频率变化区间;根据所述第一频率变化区间和所述第一频率变化区间对应的第一强度变化曲线,计算获得第一面积;根据所述第二频率变化区间和所述第二频率变化区间对应的第二强度变化曲线,计算获得第二面积;计算所述 第一面积和所述第二面积之和,得到所述超声波信号在传输过程中的所述多普勒效应面积和。
在一些实施方式中,所述第一特征值包括超声波幅度变化率绝对值。特征获取模块430可以具体用于:获取所述超声波接收模块接收的超声波信号对应的第一超声波幅值,以及上一时刻的所述超声波接收模块接收的超声波信号对应的第二超声波幅值;获取所述第一超声波幅值与所述第二超声波幅值的差值的绝对值,得到所述超声波信号在传输过程中的超声波幅度变化率绝对值。
在一些实施方式中,特征获取模块430还可以具体用于根据所述第一检测数据生成第一特征向量,将所述第一特征向量作为所述第一检测数据对应的第二特征值;根据所述第二检测数据生成第二特征向量,将所述第二特征向量作为所述第二检测数据对应的第三特征值。
在一些实施方式中,屏幕控制模块440可以具体用于:当所述输出结果表征所述移动终端与物体相对靠近时,控制所述显示屏处于熄屏状态;当所述输出结果表征所述移动终端与物体相对远离时,控制所述显示屏处于亮屏状态;当所述输出结果表征所述移动终端相对物体静止时,控制所述显示屏保持当前的显示状态。
在一些实施方式中,屏幕控制模块440还可以用于在根据所述输出结果控制所述移动终端的显示屏的状态之后,如果在预设时长内检测到对所述显示屏的状态的控制操作时,根据所述控制操作控制所述显示屏处于亮屏状态或者熄屏状态。
进一步的,该终端控制装置400还可以包括状态标注模块以及模型校正模块。状态标注模块用于将所述输出结果对应的所述第一特征值、第二特征值以及第三特征值标注为所述移动终端相对物体的目标移动状态,所述目标移动状态与所述控制操作对应的显示屏的状态对应;模型校正模块用于将标注有所述目标移动状态的所述第一特征值、第二特征值以及第三特征值输入所述预设模型,对所述预设模型进行较正训练。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
综上所述,本申请提供的方案,当移动终端处于通话状态,通过超声波发射模块发送超声波信号,并通过超声波接收模块接收超声波信号在遇到物体返回的超声波信号,获取加速度传感器检测的第一检测数据以及陀螺仪传感器检测的第二检测数据,获取超声波信号在传输过程中的第一特征值、第一检测数据对应的第二特征值以及第二检测数据对应的第三特征值,然后将第一特征值、第二特征值以及第三特征值输入已训练的预设模型,得到输出结果,该预设模型用于获取移动终端相对物体的移动状态,最后根据输出结果控制移动终端的显示屏的状态。因此,实现根据超声波特征值、加速度传感器检测到的数据的特征值以及陀螺仪传感器检测到的数据的特征值,并利用用于获取移动终端相对物体的移动状态的预设模型,获取移动终端相对物体的移动状态,能准确检测移动终端相对物体的移动状态,提升对通话过程中显示屏的状态控制的准确性。
请参考图8,其示出了本申请实施例提供的一种移动终端的结构框图。该移动终端100可以是智能手机、平板电脑、电子书等能够运行应用程序的移动终端。本申请中的移动终端100可以包括一个或多个如下部件:处理器110、存储器120、显示屏130、超声波发送模块140、超声波接收模块150、加速度传感器160、陀螺仪传感器170以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器120中并被配 置为由一个或多个处理器110执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。
处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个移动终端100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行移动终端100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储终端100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。
显示屏130用于显示由用户输入的信息、提供给用户的信息以及所述移动终端100的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、数字、视频和其任意组合来构成,在一个实例中,该显示屏130可以为液晶显示器(Liquid Crystal Display,LCD),也可以为有机发光二极管(Organic Light-Emitting Diode,OLED),在此不做限定。
超声波发射模块140用于发射超声波,超声波发射设备模块140可以是听筒、喇叭、专用超声波发射器等,在此不做限定。超声波接收模块150用于接收超声波,超声波接收设备模块150可以是拾音器等,在此不做限定。加速度传感器160是一种能够测量加速度的传感器,陀螺仪传感器170又叫角速度传感器,是不同于加速度计(G-sensor)的,它的测量物理量是偏转、倾斜时的转动角速度。
请参考图9,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质800中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。
计算机可读存储介质800可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质800包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质800具有执行上述方法中的任何方法步骤的程序代码810的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码810可以例如以适当形式进行压缩。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种终端控制方法,其特征在于,应用于移动终端,所述移动终端包括超声波发射模块、超声波接收模块、加速度传感器、陀螺仪传感器以及显示屏,所述方法包括:
    当所述移动终端处于通话状态,通过所述超声波发射模块发送超声波信号,并通过所述超声波接收模块接收超声波信号在遇到物体后返回的超声波信号;
    获取所述加速度传感器检测的第一检测数据以及所述陀螺仪传感器检测的第二检测数据;
    获取所述超声波信号在传输过程中的第一特征值、所述第一检测数据对应的第二特征值以及所述第二检测数据对应的第三特征值;
    将所述第一特征值、所述第二特征值以及所述第三特征值输入已训练的预设模型,得到输出结果,所述预设模型用于获取所述移动终端相对物体的移动状态,并根据所述输出结果控制所述移动终端的显示屏的状态。
  2. 根据权利要求1所述的方法,其特征在于,在所述通过所述超声波发射模块发送超声波信号,并通过所述超声波接收模块接收超声波信号在遇到物体后返回的超声波信号之前,所述方法还包括:
    获取训练数据集,所述训练数据集包括被标注有所述移动终端相对物体的移动状态的训练数据,所述训练数据包括超声波信号在传输过程中的第一特征值、所述加速度传感器检测的数据对应的第二特征值以及所述陀螺仪传感器检测的数据对应的第三特征值;
    根据所述训练数据集训练初始模型,得到已训练的预设模型。
  3. 根据权利要求2所述的方法,其特征在于,所述预设模型包括支持向量机或者神经网络。
  4. 根据权利要求3所述的方法,其特征在于,所述预设模型为神经网络,所述神经网络包括输入层、隐藏层以及输出层,所述输入层中的神经元与隐藏层中的神经元全连接,所述隐藏层中的神经元与所述输出层中的神经元全连接。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一特征值包括多普勒效应面积差,所述获取所述超声波信号在传输过程中的第一特征值,包括:
    获取所述超声波发送模块发送的超声波信号的发送频率,以及所述超声波接收模块接收的超声波信号的频率范围;
    基于所述发送频率和所述频率范围确定第一频率变化区间以及第二频率变化区间;
    根据所述第一频率变化区间和所述第一频率变化区间对应的第一强度变化曲线,计算获得第一面积;
    根据所述第二频率变化区间和所述第二频率变化区间对应的第二强度变化曲线,计算获得第二面积;
    计算所述第一面积和所述第二面积之差,得到所述超声波信号在传输过程中的所述多普勒效应面积差。
  6. 根据权利要求5所述的方法,其特征在于,所述获取所述超声波接收模块接收的超声波信号的频率范围,包括:
    获取所述移动终端在使用过程中的运动速度的变化范围;
    根据所述变化范围确定所述超声波接收模块接收的超声波信号的频率范围。
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述变化范围确定所述超声波接收模块接收的超声波信号的频率范围,包括:
    根据所述变化范围,获得所述移动终端与物体之间的最大相对速度以及最小相对速度;
    根据多普勒效应公式,获取所述移动终端与物体之间的最大相对速度的计算公式;
    根据傅里叶变换结果的频率分辨率,以及所述多普勒效应公式,确定所述移动终端与物体之间的最小相对速度的计算公式;
    根据所述最大相对速度,所述最小相对速度,所述最大相对速度的计算公式以及所述最小相对速度的计算公式,确定所述超声波接收模块接收的超声波信号的频率范围。
  8. 根据权利要求5-7任一项所述的方法,其特征在于,在所述根据所述第一频率变化区间和所述第一频率变化区间对应的第一强度变化曲线,计算获得第一面积之前,所述方法还包括:
    基于频谱图获取所述第一频率变化区间对应的第一强度变化曲线。
  9. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一特征值包括多普勒效应面积和,所述获取所述超声波信号在传输过程中的第一特征值,包括:
    获取所述超声波发送模块发送的超声波信号的发送频率,以及所述超声波接收模块接收的超声波信号的频率范围;
    基于所述发送频率和所述频率范围确定第一频率变化区间以及第二频率变化区间;
    根据所述第一频率变化区间和所述第一频率变化区间对应的第一强度变化曲线,计算获得第一面积;
    根据所述第二频率变化区间和所述第二频率变化区间对应的第二强度变化曲线,计算获得第二面积;
    计算所述第一面积和所述第二面积之和,得到所述超声波信号在传输过程中的所述多普勒效应面积和。
  10. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一特征值包括超声波幅度变化率绝对值,所述获取所述超声波信号在传输过程中的第一特征值,包括:
    获取所述超声波接收模块接收的超声波信号对应的第一超声波幅值,以及上一时刻的所述超声波接收模块接收的超声波信号对应的第二超声波幅值;
    获取所述第一超声波幅值与所述第二超声波幅值的差值的绝对值,得到所述超声波信号在传输过程中的超声波幅度变化率绝对值。
  11. 根据权利要求10所述的方法,其特征在于,所述第一超声波幅值对应的时刻与所述上一时刻的间隔时长为预设时长。
  12. 根据权利要求1-4任一项所述的方法,其特征在于,获取所述第一检测数据对应的第二特征值以及所述第二检测数据对应的第三特征值,包括:
    根据所述第一检测数据生成第一特征向量,将所述第一特征向量作为所述第一检测数据对应的第二特征值;
    根据所述第二检测数据生成第二特征向量,将所述第二特征向量作为所述第二检测数据对应的第三特征值。
  13. 根据权利要求1-12任一项所述的方法,其特征在于,所述根据所述输出结果控制所述移动终端的显示屏的状态,包括:
    当所述输出结果表征所述移动终端与物体相对靠近时,控制所述显示屏处于熄屏状态;
    当所述输出结果表征所述移动终端与物体相对远离时,控制所述显示屏处于亮屏状态;
    当所述输出结果表征所述移动终端相对物体静止时,控制所述显示屏保持当前的显示状态。
  14. 根据权利要求13所述的方法,其特征在于,在根据所述输出结果控制所述移动终端的显示屏的状态之后,所述方法还包括:
    如果在预设时长内检测到对所述显示屏的状态的控制操作时,根据所述控制操作控制所述显示屏处于亮屏状态或者熄屏状态。
  15. 根据权利要求14所述的方法,其特征在于,所述方法还包括:
    将所述输出结果对应的所述第一特征值、第二特征值以及第三特征值标注为所述移动终端相对物体的目标移动状态,所述目标移动状态与所述控制操作对应的显示屏的状态对应;
    将标注有所述目标移动状态的所述第一特征值、第二特征值以及第三特征值输入所述预设模型,对所述预设模型进行较正训练。
  16. 根据权利要求1-15任一项所述的方法,其特征在于,所述预设模型存储于所述移动终端,所述将所述第一特征值、所述第二特征值以及所述第三特征值输入已训练的预设模型,得到输出结果,包括:
    调用本地存储的所述预设模型;
    将所述第一特征值、所述第二特征值以及所述第三特征值输入所述预设模型,得到输出结果。
  17. 根据权利要求1-15任一项所述的方法,其特征在于,所述预设模型存储于服务器,所述将所述第一特征值、所述第二特征值以及所述第三特征值输入已训练的预设模型,得到输出结果,包括:
    根据所述第一特征向量、所述第二特征向量以及所述第三特征向量生成请求,并将生成请求发送至所述服务器,以指示所述服务器将第一特征向量、第二特征向量以及第三特征向量输入所述预设模型,得到输出结果后向所述移动终端返回所述输出结果;
    接收所述服务器返回的输出结果。
  18. 一种终端控制装置,其特征在于,应用于移动终端,所述移动终端包括超声波发射模块、超声波接收模块、加速度传感器、陀螺仪传感器以及显示屏,所述装置包括:收发控制模块、数据获取模块、特征获取模块以及屏幕控制模块,其中,
    所述收发控制模块用于当所述移动终端处于通话状态,通过所述超声波发射模块发送超声波信号,并通过所述超声波接收模块接收超声波信号在遇到物体后返回的超声波信号;
    所述数据获取模块用于获取所述加速度传感器检测的第一检测数据以及所述陀螺仪传感器检测的第二检测数据;
    所述特征获取模块用于获取所述超声波信号在传输过程中的第一特征值、所述第一检测数据对应的第二特征值以及所述第二检测数据对应的第三特征值;
    所述屏幕控制模块用于将所述第一特征值、所述第二特征值以及所述第三特征值输入已训练的预设模型,得到输出结果,所述预设模型用于获取所述移动终端相对物体的移动状态,并根据所述输出结果控制所述移动终端的显示屏的状态。
  19. 移动终端,其特征在于,包括:
    一个或多个处理器;
    存储器;
    一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行如权利要求1-17任一项所述的方法。
  20. 一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-17任一项所述的方法。
PCT/CN2020/103305 2019-07-31 2020-07-21 终端控制方法、装置、移动终端及存储介质 WO2021017947A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910702590.5A CN110505341B (zh) 2019-07-31 2019-07-31 终端控制方法、装置、移动终端及存储介质
CN201910702590.5 2019-07-31

Publications (1)

Publication Number Publication Date
WO2021017947A1 true WO2021017947A1 (zh) 2021-02-04

Family

ID=68586879

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/103305 WO2021017947A1 (zh) 2019-07-31 2020-07-21 终端控制方法、装置、移动终端及存储介质

Country Status (2)

Country Link
CN (1) CN110505341B (zh)
WO (1) WO2021017947A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116466058A (zh) * 2023-06-15 2023-07-21 上海博取仪器有限公司 水质检测数据处理方法、水质评估系统、设备及介质

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110505341B (zh) * 2019-07-31 2021-05-07 Oppo广东移动通信有限公司 终端控制方法、装置、移动终端及存储介质
CN110916725A (zh) * 2019-12-19 2020-03-27 上海尽星生物科技有限责任公司 一种基于陀螺仪的超声容积测量方法
CN112890860A (zh) * 2021-01-20 2021-06-04 李逸丰 一种基于5g的超声波探测方法及装置
CN114298105B (zh) * 2021-12-29 2023-08-22 东莞市猎声电子科技有限公司 一种跑步过程中快速响应抬腕动作并亮屏的信号处理方法

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106413060A (zh) * 2016-10-24 2017-02-15 北京小米移动软件有限公司 屏幕状态控制方法及装置
US20170351397A1 (en) * 2016-06-07 2017-12-07 Lg Electronics Inc. Mobile terminal and method for controlling the same
CN108196778A (zh) * 2017-12-29 2018-06-22 努比亚技术有限公司 屏幕状态的控制方法、移动终端及计算机可读存储介质
CN108234767A (zh) * 2017-12-29 2018-06-29 努比亚技术有限公司 屏幕状态的控制方法、移动终端及计算机可读存储介质
CN108562890A (zh) * 2017-12-29 2018-09-21 努比亚技术有限公司 超声波特征值的校准方法、装置及计算机可读存储介质
CN108989546A (zh) * 2018-06-15 2018-12-11 Oppo广东移动通信有限公司 电子装置的接近检测方法及相关产品
CN109710142A (zh) * 2017-10-25 2019-05-03 华为技术有限公司 一种用于控制终端屏幕亮灭的方法及终端
CN110505341A (zh) * 2019-07-31 2019-11-26 Oppo广东移动通信有限公司 终端控制方法、装置、移动终端及存储介质

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218538A (zh) * 2018-11-29 2019-01-15 努比亚技术有限公司 移动终端屏幕控制方法、移动终端及计算机可读存储介质

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170351397A1 (en) * 2016-06-07 2017-12-07 Lg Electronics Inc. Mobile terminal and method for controlling the same
CN106413060A (zh) * 2016-10-24 2017-02-15 北京小米移动软件有限公司 屏幕状态控制方法及装置
CN109710142A (zh) * 2017-10-25 2019-05-03 华为技术有限公司 一种用于控制终端屏幕亮灭的方法及终端
CN108196778A (zh) * 2017-12-29 2018-06-22 努比亚技术有限公司 屏幕状态的控制方法、移动终端及计算机可读存储介质
CN108234767A (zh) * 2017-12-29 2018-06-29 努比亚技术有限公司 屏幕状态的控制方法、移动终端及计算机可读存储介质
CN108562890A (zh) * 2017-12-29 2018-09-21 努比亚技术有限公司 超声波特征值的校准方法、装置及计算机可读存储介质
CN108989546A (zh) * 2018-06-15 2018-12-11 Oppo广东移动通信有限公司 电子装置的接近检测方法及相关产品
CN110505341A (zh) * 2019-07-31 2019-11-26 Oppo广东移动通信有限公司 终端控制方法、装置、移动终端及存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116466058A (zh) * 2023-06-15 2023-07-21 上海博取仪器有限公司 水质检测数据处理方法、水质评估系统、设备及介质
CN116466058B (zh) * 2023-06-15 2023-09-05 上海博取仪器有限公司 水质检测数据处理方法、水质评估系统、设备及介质

Also Published As

Publication number Publication date
CN110505341B (zh) 2021-05-07
CN110505341A (zh) 2019-11-26

Similar Documents

Publication Publication Date Title
WO2021017947A1 (zh) 终端控制方法、装置、移动终端及存储介质
US11341957B2 (en) Method for detecting keyword in speech signal, terminal, and storage medium
WO2021017860A1 (zh) 信息处理方法、装置、电子设备及存储介质
WO2021017950A1 (zh) 超声波处理方法、装置、电子设备及计算机可读介质
US11366528B2 (en) Gesture movement recognition method, apparatus, and device
CN107765251B (zh) 距离检测方法和终端设备
WO2021017859A1 (zh) 屏幕状态控制方法、装置、移动终端以及存储介质
CN110113528B (zh) 一种参数获取方法及终端设备
CN108683850B (zh) 一种拍摄提示方法及移动终端
WO2021017943A1 (zh) 超声波处理方法、装置、电子设备及计算机可读介质
CN110865710B (zh) 终端控制方法、装置、移动终端及存储介质
WO2021017927A1 (zh) 设备控制方法、装置、电子设备及存储介质
CN111554321A (zh) 降噪模型训练方法、装置、电子设备及存储介质
CN107741814B (zh) 一种显示控制方法及移动终端
WO2021017851A1 (zh) 屏幕状态控制方法、装置、移动终端以及存储介质
CN111026305A (zh) 音频处理方法及电子设备
WO2021017855A1 (zh) 响铃处理方法、装置、移动终端以及存储介质
US20230019967A1 (en) Electronic device, and interaction method and device
WO2019011108A1 (zh) 虹膜识别方法及相关产品
CN110798327B (zh) 消息处理方法、设备及存储介质
CN110457885B (zh) 一种操作方法及电子设备
CN108769364A (zh) 通话控制方法、装置、移动终端及计算机可读介质
CN110427149B (zh) 终端的操作方法及终端
CN109947345B (zh) 一种指纹识别方法和终端设备
CN111294510A (zh) 一种监测方法以及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20848438

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20848438

Country of ref document: EP

Kind code of ref document: A1