Holding mode determination method and device, electronic equipment and storage medium

By using motion sensors and predictive models to identify the grip in terminal devices, the problem of low accuracy of one-hand grip recognition is solved, and the operating experience of the terminal devices is improved.

CN119200866APending Publication Date: 2024-12-27BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310749502.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-25
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

It is difficult for existing terminal devices to accurately identify the grip mode when holding with one hand, which affects the user's operating experience.

Method used

Predict the grip mode by using motion sensors (such as acceleration sensors and gyroscope sensors) in the terminal device and inputting them into the trained prediction model. The method includes obtaining motion parameters, weighting processing, filtering processing and adjusting prediction results according to the status of the terminal device.

Benefits of technology

It improves the accuracy of terminal devices in identifying one-hand grip mode and enhances user operation experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119200866A_ABST
    Figure CN119200866A_ABST
Patent Text Reader

Abstract

The invention relates to a holding mode determining method and device, electronic equipment and a storage medium, the method is applied to terminal equipment with at least one motion sensor, and the method comprises the steps that motion parameters collected by the at least one motion sensor are acquired; the motion parameters are input into a prediction model, a holding mode prediction result output by the prediction model is obtained, and the prediction model is obtained through training based on the motion parameters collected by the at least one motion sensor in different holding modes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of terminal devices, and in particular to a method, device, electronic device and storage medium for determining a holding mode. Background Art

[0002] In recent years, the performance of terminal devices has become stronger and stronger, and the functions have become more and more abundant, which has brought a good experience to users. For example, the display screen area of ​​terminal devices has gradually increased, providing users with better display effects. The gradually increasing display screen also brings certain inconveniences to user operations. For example, users cannot operate the entire display screen when holding it with one hand. The current terminal devices can adjust the display mode of the display screen by identifying the holding mode of one-hand holding, but the accuracy of identifying the holding mode of one-hand holding in the related art is low. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the embodiments of the present disclosure provide a method, device, electronic device and storage medium for determining a holding method, so as to solve the defects in the related art.

[0004] According to a first aspect of an embodiment of the present disclosure, a method for determining a holding mode is provided, which is applied to a terminal device having at least one motion sensor, and the method includes:

[0005] Acquiring motion parameters collected by the at least one motion sensor;

[0006] The motion parameters are input into a prediction model to obtain a holding mode prediction result output by the prediction model, wherein the prediction model is trained based on the motion parameters collected by the at least one motion sensor under different holding modes.

[0007] In a possible embodiment of the present disclosure, acquiring the motion parameter collected by the at least one motion sensor includes:

[0008] The motion parameters collected by the at least one motion sensor are acquired at a preset frequency.

[0009] In a possible embodiment of the present disclosure, inputting the motion parameter into a prediction model to obtain a gripping method prediction result output by the prediction model includes:

[0010] The motion parameters acquired within the current preset time are input into the prediction model to obtain the holding mode prediction result of the current preset time output by the prediction model.

[0011] In a possible embodiment of the present disclosure, after obtaining the holding mode prediction result of the current preset duration output by the prediction model, the method further includes:

[0012] According to the holding manner prediction result of at least one preset duration before the current prediction duration, filtering processing is performed on the holding manner prediction result of the current preset duration.

[0013] In a possible embodiment of the present disclosure, the at least one motion sensor includes a gyroscope sensor;

[0014] The filtering process of the holding mode prediction result of the current preset duration according to the holding mode prediction result of at least one preset duration before the current prediction duration includes:

[0015] The holding mode prediction result of the current preset time length is filtered according to the holding mode prediction result of at least one preset time length before the current prediction time length and the angular velocity collected by the gyroscope sensor acquired within the current preset time length.

[0016] In a possible embodiment of the present disclosure, the method further includes:

[0017] Determining a state of the terminal device according to the motion parameter, wherein the state of the terminal device includes motion and stillness;

[0018] The step of inputting the motion parameters into a prediction model to obtain a holding mode output by the prediction model includes:

[0019] In response to the state of the terminal device being motion, the motion parameters are input into a prediction model to obtain a holding mode output by the prediction model.

[0020] In a possible embodiment of the present disclosure, the at least one motion sensor includes a gyroscope sensor;

[0021] The determining the state of the terminal device according to the motion parameter includes:

[0022] In response to the angular velocity collected by the gyroscope sensor being greater than a preset threshold, determining that the state of the terminal device is motion;

[0023] In response to the angular velocity collected by the gyroscope sensor being not greater than a preset threshold, it is determined that the state of the terminal device is stationary.

[0024] In a possible embodiment of the present disclosure, inputting the motion parameters into a prediction model to obtain a holding mode output by the prediction model includes:

[0025] According to the weight coefficient of each motion sensor in the at least one motion sensor, the motion parameters collected by each motion sensor in the at least one motion sensor are weighted, and the weighted motion parameters are input into the prediction model to obtain the holding mode output by the prediction model.

[0026] In a possible embodiment of the present disclosure, the at least one motion sensor includes an acceleration sensor and a gyroscope sensor, and a weight coefficient of the gyroscope sensor is greater than a weight coefficient of the acceleration sensor.

[0027] According to a second aspect of an embodiment of the present disclosure, a holding mode determination device is provided, which is applied to a terminal device having at least one motion sensor, and the device includes:

[0028] An acquisition module, used to acquire motion parameters collected by the at least one motion sensor;

[0029] A prediction module is used to input the motion parameters into a prediction model to obtain a holding method prediction result output by the prediction model, wherein the prediction model is trained based on the motion parameters collected by the at least one motion sensor under different holding methods.

[0030] In a possible embodiment of the present disclosure, the acquisition module is specifically used to:

[0031] The motion parameters collected by the at least one motion sensor are acquired at a preset frequency.

[0032] In a possible embodiment of the present disclosure, the prediction module is specifically used for:

[0033] The motion parameters acquired within the current preset time are input into the prediction model to obtain the holding mode prediction result of the current preset time output by the prediction model.

[0034] In a possible embodiment of the present disclosure, the device further includes a filtering module, which is used to:

[0035] After obtaining the holding mode prediction result of the current preset duration output by the prediction model, the holding mode prediction result of the current preset duration is filtered according to the holding mode prediction result of at least one preset duration before the current prediction duration.

[0036] In a possible embodiment of the present disclosure, the at least one motion sensor includes a gyroscope sensor;

[0037] The filtering module is specifically used for:

[0038] The holding mode prediction result of the current preset time length is filtered according to the holding mode prediction result of at least one preset time length before the current prediction time length and the angular velocity collected by the gyroscope sensor acquired within the current preset time length.

[0039] In a possible embodiment of the present disclosure, the method further includes a state module, which is used to:

[0040] Determining a state of the terminal device according to the motion parameter, wherein the state of the terminal device includes motion and stillness;

[0041] The prediction module is specifically used for:

[0042] In response to the state of the terminal device being motion, the motion parameters are input into a prediction model to obtain a holding mode output by the prediction model.

[0043] In a possible embodiment of the present disclosure, the at least one motion sensor includes a gyroscope sensor;

[0044] The state module is specifically used for:

[0045] In response to the angular velocity collected by the gyroscope sensor being greater than a preset threshold, determining that the state of the terminal device is motion;

[0046] In response to the angular velocity collected by the gyroscope sensor being not greater than a preset threshold, it is determined that the state of the terminal device is stationary.

[0047] In a possible embodiment of the present disclosure, the prediction module is specifically used for:

[0048] According to the weight coefficient of each motion sensor in the at least one motion sensor, the motion parameters collected by each motion sensor in the at least one motion sensor are weighted, and the weighted motion parameters are input into the prediction model to obtain the holding mode output by the prediction model.

[0049] In a possible embodiment of the present disclosure, the at least one motion sensor includes an acceleration sensor and a gyroscope sensor, and a weight coefficient of the gyroscope sensor is greater than a weight coefficient of the acceleration sensor.

[0050] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store computer instructions executable on the processor, and the processor is used to implement the holding manner determination method described in the first aspect when executing the computer instructions.

[0051] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method described in the first aspect is implemented.

[0052] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0053] The holding method determination method provided by the embodiment of the present disclosure first obtains the motion parameters collected by at least one motion sensor of the terminal device, and then inputs the motion parameters into the prediction model to obtain the holding method prediction result output by the prediction model. Since the prediction model is trained based on the motion parameters collected by at least one motion sensor of the terminal device under different holding methods, the prediction model can output a relatively accurate holding method prediction result, and the terminal device can achieve a relatively accurate recognition of the holding method of one-hand holding based on the prediction result output by the prediction model, thereby improving the terminal device's recognition accuracy of the holding method of one-hand holding. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0055] Figure 1 is a flow chart of a method for determining a holding mode shown in an exemplary embodiment of the present disclosure;

[0056] Figure 2 is a flow chart of a method for determining a holding mode according to an exemplary embodiment of the present disclosure;

[0057] Figure 3 is a structural schematic diagram of a holding mode determination device shown in an exemplary embodiment of the present disclosure;

[0058] Figure 4 It is a structural block diagram of an electronic device shown in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0059] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0060] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0061] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0062] In recent years, the performance of terminal devices has become stronger and stronger, and the functions have become more and more abundant, which has brought a good experience to users. For example, the display screen area of ​​terminal devices has gradually increased, providing users with better display effects. The gradually increasing display screen also brings certain inconveniences to user operations. For example, users cannot operate the entire display screen when holding it with one hand. The current terminal devices can adjust the display mode of the display screen by identifying the holding mode of one-hand holding, but the accuracy of identifying the holding mode of one-hand holding in the related art is low.

[0063] Based on this, in the first aspect, at least one embodiment of the present disclosure provides a method for determining a holding mode. Figure 1 , which shows the process of the method, including step S101 to step S102.

[0064] Among them, the method can be applied to a terminal device with at least one motion sensor; the terminal device can be a smart phone, a tablet computer, a wearable device (such as a smart bracelet, a smart watch, etc.), etc.; the motion sensor can include an acceleration sensor, a gyroscope sensor, etc., wherein the acceleration sensor is used to collect the acceleration of the terminal device, and the gyroscope sensor is used to collect the angular velocity of the terminal device.

[0065] Exemplarily, the method may determine a holding mode of one-hand holding in a scenario where the user holds the terminal device in one hand, and the holding modes may include left-hand holding and right-hand holding.

[0066] In step S101, motion parameters collected by the at least one motion sensor are acquired.

[0067] Among them, each motion sensor of the at least one motion sensor can collect corresponding motion parameters according to the natural frequency. For example, the acceleration sensor collects acceleration values ​​according to the natural frequency, that is, the acceleration scores on the three coordinate axes of X, Y, and Z; for example, the gyroscope sensor collects angular velocity values ​​according to the natural frequency, that is, the angular velocity scores on the three coordinate axes of X, Y, and Z.

[0068] Exemplarily, this step can acquire the motion parameters collected by the at least one motion sensor in real time; the motion parameters collected by the motion sensor are in the form of a data sequence, and in this example, the data sequence is directly acquired in its entirety.

[0069] As another example, this step can obtain the motion parameters collected by the at least one motion sensor at a preset frequency (the preset frequency is less than the natural frequency of the motion sensor acquisition parameters); the motion parameters collected by the motion sensor are in the form of a data sequence, and in this example, the data sequence is resampled at the preset frequency to obtain data with a consistent time interval. For example, if the preset frequency is 25Hz, the motion parameters collected by the motion sensor can be obtained as a frame of data every 40ms. It is preferred to perform this step according to this example, so as to reduce the computational load of the method and improve computational efficiency.

[0070] In step S102, the motion parameters are input into a prediction model to obtain a holding mode prediction result output by the prediction model, wherein the prediction model is trained based on the motion parameters collected by the at least one motion sensor under different holding modes.

[0071] The motion parameters collected by the at least one motion sensor in different holding modes can be used as training samples to construct a sample set, and the holding mode when each training sample is collected can be used as its label. The prediction model used in this step can be pre-trained using the above sample set until convergence. The specific training process will be described in detail below and will not be described here.

[0072] The holding method prediction result may be a probability value of each holding method.

[0073] Next, three operating modes of this step are introduced through three embodiments.

[0074] In a possible embodiment, after the motion parameters are acquired in step S101, the state of the terminal device may be further determined according to the motion parameters, wherein the state of the terminal device includes motion and stillness. For example, if at least one motion sensor of the terminal device includes a gyroscope sensor, then in response to the angular velocity collected by the gyroscope sensor being greater than a preset threshold, the state of the terminal device may be determined to be motion; in response to the angular velocity collected by the gyroscope sensor being not greater than the preset threshold, the state of the terminal device may be determined to be still.

[0075] The angular velocity collected by the above gyroscope sensor can be calculated according to the following formula:

[0076]

[0077] Where θ is the angular velocity collected by the gyroscope sensor, ω x ,ω y ,ω z are the angular velocity scores collected by the gyroscope sensor on the X-axis, Y-axis, and Z-axis, ω x ,ω y ,ω z The data is directly collected by the gyroscope sensor.

[0078] In this step, the prediction model predicts the holding method based on the characteristics of the motion parameters. However, research has found that if the terminal device is in a stationary state, the characteristics of the motion parameters collected by the motion sensor under different holding methods are very similar and cannot be effectively distinguished. Therefore, in this step, in response to the state of the terminal device being in motion, the motion parameters can be input into the prediction model to obtain the holding method output by the prediction model. In other words, if the motion parameters collected by the motion sensor determine that the terminal device is in motion, the motion parameters are input into the prediction model to predict the holding method. If the motion parameters collected by the motion sensor determine that the terminal device is in a stationary state, the motion parameters are discarded.

[0079] In this embodiment, before the motion parameters are input into the prediction model for holding method prediction, it is determined whether the terminal device is in motion based on the motion parameters. If it is in motion, the characteristics of the motion parameters can accurately characterize the holding method, thereby eliminating the motion parameters in the static state, avoiding the motion parameters in the static state from affecting the prediction accuracy of the holding method, and further improving the accuracy of the holding method prediction.

[0080] In another embodiment of the present disclosure, the holding method has different effects on the motion parameters collected by each motion sensor, so a weight coefficient can be assigned to each motion sensor in advance, and the weight coefficient of a certain motion sensor can characterize the attention of the prediction model to the parameters collected by the motion sensor. Different weight coefficients can make the prediction model pay different attention to different motion sensors, that is, it can pay more attention to the motion parameters that are more affected by the holding method, and pay less attention to the motion parameters that are less affected by the holding method. Furthermore, this step can perform weighted processing on the motion parameters collected by each motion sensor in the at least one motion sensor according to the weight coefficient of each motion sensor in the at least one motion sensor, and input the weighted motion parameters into the prediction model to obtain the holding method output by the prediction model. The weighted processing mentioned in this example can be multiplying the motion parameters by the weight coefficient.

[0081] Taking the example that the at least one motion sensor of the terminal device includes an acceleration sensor and a gyroscope sensor, the weight coefficient of the gyroscope sensor is greater than the weight coefficient of the acceleration sensor. For example, the weight coefficient of the gyroscope sensor is 1, and the weight coefficient of the acceleration sensor is 0.01.

[0082] In this embodiment, by pre-configuring weight coefficients for each motion sensor and performing corresponding weighted processing on the motion parameters collected by each motion sensor before inputting them into the prediction model, the prediction model can pay different attention to each motion parameter, so that the motion parameters with higher relevance to the holding method receive more attention, thereby making the holding method predicted by the prediction model more accurate, further improving the recognition accuracy of the holding method.

[0083] In another embodiment of the present disclosure, after obtaining the motion parameters in step S101, window slicing can be performed according to a preset time length to obtain data slices; the preset time length can be represented by the number of frames of data, for example, the preset time length is 20 frames, and it can be understood that if step S101 obtains the motion parameters at a frequency of 25 Hz, then 20 frames are 0.8s.

[0084] This step can determine the corresponding holding method prediction result for the motion parameters obtained within each preset time. In other words, the holding method prediction result will be determined once according to this step every preset time interval. Therefore, this step can input the motion parameters obtained within the current preset time into the prediction model to obtain the holding method prediction result of the current preset time output by the prediction model.

[0085] Based on the above-mentioned window slicing processing method, after determining the holding method prediction result of the current preset duration, the holding method prediction result of the current preset duration can be filtered according to the holding method prediction result of at least one preset duration before the current prediction duration. Furthermore, according to the holding method prediction result of at least one preset duration before the current prediction duration and the angular velocity collected by the gyroscope sensor acquired within the current preset duration, the holding method prediction result of the current preset duration is filtered.

[0086] For example, the prediction result of the holding mode of the current preset duration is filtered according to the following formula:

[0087] P i =(1-K)*P i-1 +K*p i

[0088] K=abs(p i -0.5)*min(1,max(θ,0.5))

[0089] Among them, p i is the prediction result of the holding mode for the current preset duration, which is in the form of probability. Different probability ranges represent different holding modes. For example, when p i When it is greater than or equal to 0.5, it means the grip is right-handed. i When it is less than 0.5, it means the holding method is left hand holding; P i is the filtering result of the holding method prediction result of the current preset duration, θ is the angular velocity collected by the gyroscope sensor, K is the fusion weight, and the value range is [0, 0.5].

[0090] In this embodiment, by slicing the motion parameters into windows according to a preset time length, the holding manner of the terminal device can be continuously predicted at a certain frequency, so that the prediction of the holding manner can be further improved in real time on the basis of improving the accuracy.

[0091] It is understandable that this step can be performed according to any one of the above three embodiments, or can be performed in combination with two or three of the above three embodiments. For example, if this step is performed in combination with the above three embodiments, the state of the terminal device can be first determined according to the first embodiment, and if it is in motion, the motion parameters collected by each sensor can be weighted according to the second embodiment, and the motion parameters can be further window sliced ​​according to the third embodiment, and the motion parameters obtained in each preset time length after slicing are input into the prediction model to predict the holding method of the corresponding preset time length.

[0092] In addition, the terminal device can further adjust the display content and / or display mode of the display screen based on the holding mode prediction result output by the prediction model to adapt to the user's current holding mode. For example, when the holding mode prediction result is left-right holding, the display screen can be adjusted to display a partial left side.

[0093] Please refer to the attached Figure 2 , which exemplarily shows a complete flow chart of the holding method determination method obtained by combining the above multiple embodiments, and the flow includes a model training stage and a holding method prediction stage.

[0094] The model training phase includes the following steps:

[0095] Step S201: The motion sensor collects training samples under different holding methods.

[0096] Exemplarily, the motion parameters are collected for 30 minutes in the left-hand holding mode, and the motion parameters are collected for 30 minutes in the right-hand holding mode, and the motion parameters are in the form of data series.

[0097] Among them, the labels of all training samples collected under the left-hand holding method are left-hand holding, which can be marked as 0; the labels of all training samples collected under the right-hand holding method are right-hand holding, which can be marked as 1.

[0098] Step S202: resampling.

[0099] Exemplarily, the training samples collected by the motion sensor are acquired at a preset frequency (eg, 25 Hz).

[0100] Step S203: Determine whether the terminal device is moving.

[0101] Step S204: weighting the training samples collected by each motion sensor.

[0102] Step S205: Window slicing of the training samples is performed according to a preset time length (eg, a time length corresponding to 20 frames of data).

[0103] Step S206: input the training samples within each preset time length into the model to be trained for training.

[0104] Among them, the model to be trained can select a one-dimensional or multi-dimensional convolutional network.

[0105] First, a feature vector consisting of 20 frames of 6-dimensional data is input into the model to be trained to obtain the probability value output by the model to be trained, wherein the 6-dimensional data includes the acceleration scores collected by the acceleration sensor on the X-axis, Y-axis and Z-axis, and the angular velocity scores collected by the gyroscope sensor on the X-axis, Y-axis and Z-axis. The probability value output by the model to be trained is a value between 0 and 1 (including 0 and 1). If the distance between the probability value and 0 is greater than the distance between the probability value and 1, a probability value of 0 indicates that the holding method is left-handed, and a probability value of 1 indicates that the holding method is right-handed.

[0106] Next, the network loss is calculated using loss functions such as the binary cross entropy function based on the probability values ​​output by the model to be trained and the labels of the feature vectors.

[0107] Finally, according to the network loss, optimizers such as Adam are used, and feedback mechanisms such as forward information transfer and back-propagation gradient are adopted to train the model to be trained until it converges, then it can be used as a prediction model.

[0108] The grip prediction phase includes the following steps:

[0109] Step S211: The motion sensor collects motion parameters.

[0110] Exemplarily, the motion sensor collects motion parameters in real time; the motion parameters are in the form of a data sequence.

[0111] Step S212: resampling.

[0112] Exemplarily, the motion parameters collected by the motion sensor are acquired at a preset frequency (eg, 25 Hz), that is, sampling is performed from the data sequence.

[0113] Step S213: Determine whether the terminal device is moving.

[0114] Step S214: performing weighted processing on the motion parameters collected by each motion sensor.

[0115] Step S215: Window slicing of the motion parameters is performed according to a preset duration (eg, a duration corresponding to 20 frames of data).

[0116] Step S216: inputting the motion parameters within each preset time period into the prediction model to predict the holding mode.

[0117] Step S217: filtering the holding method prediction result output by the prediction model.

[0118] The holding method determination method provided by the embodiment of the present disclosure first obtains the motion parameters collected by at least one motion sensor of the terminal device, and then inputs the motion parameters into the prediction model to obtain the holding method prediction result output by the prediction model. Since the prediction model is trained based on the motion parameters collected by at least one motion sensor of the terminal device under different holding methods, the prediction model can output a relatively accurate holding method prediction result, and the terminal device can achieve a relatively accurate recognition of the holding method of one-hand holding based on the prediction result output by the prediction model, thereby improving the terminal device's recognition accuracy of the holding method of one-hand holding.

[0119] According to a second aspect of an embodiment of the present disclosure, a holding method determination device is provided, which is applied to a terminal device having at least one motion sensor. Figure 3 , the device comprises:

[0120] An acquisition module 301 is used to acquire motion parameters collected by the at least one motion sensor;

[0121] The prediction module 302 is used to input the motion parameters into a prediction model to obtain a holding mode prediction result output by the prediction model, wherein the prediction model is trained based on the motion parameters collected by the at least one motion sensor under different holding modes.

[0122] In a possible embodiment of the present disclosure, the acquisition module is specifically used to:

[0123] The motion parameters collected by the at least one motion sensor are acquired at a preset frequency.

[0124] In a possible embodiment of the present disclosure, the prediction module is specifically used for:

[0125] The motion parameters acquired within the current preset time are input into the prediction model to obtain the holding mode prediction result of the current preset time output by the prediction model.

[0126] In a possible embodiment of the present disclosure, the device further includes a filtering module, which is used to:

[0127] After obtaining the holding mode prediction result of the current preset duration output by the prediction model, the holding mode prediction result of the current preset duration is filtered according to the holding mode prediction result of at least one preset duration before the current prediction duration.

[0128] In a possible embodiment of the present disclosure, the at least one motion sensor includes a gyroscope sensor;

[0129] The filtering module is specifically used for:

[0130] The holding mode prediction result of the current preset time length is filtered according to the holding mode prediction result of at least one preset time length before the current prediction time length and the angular velocity collected by the gyroscope sensor acquired within the current preset time length.

[0131] In a possible embodiment of the present disclosure, the method further includes a state module, which is used to:

[0132] Determining a state of the terminal device according to the motion parameter, wherein the state of the terminal device includes motion and stillness;

[0133] The prediction module is specifically used for:

[0134] In response to the state of the terminal device being motion, the motion parameters are input into a prediction model to obtain a holding mode output by the prediction model.

[0135] In a possible embodiment of the present disclosure, the at least one motion sensor includes a gyroscope sensor;

[0136] The state module is specifically used for:

[0137] In response to the angular velocity collected by the gyroscope sensor being greater than a preset threshold, determining that the state of the terminal device is motion;

[0138] In response to the angular velocity collected by the gyroscope sensor being not greater than a preset threshold, it is determined that the state of the terminal device is stationary.

[0139] In a possible embodiment of the present disclosure, the prediction module is specifically used for:

[0140] According to the weight coefficient of each motion sensor in the at least one motion sensor, the motion parameters collected by each motion sensor in the at least one motion sensor are weighted, and the weighted motion parameters are input into the prediction model to obtain the holding mode output by the prediction model.

[0141] In a possible embodiment of the present disclosure, the at least one motion sensor includes an acceleration sensor and a gyroscope sensor, and a weight coefficient of the gyroscope sensor is greater than a weight coefficient of the acceleration sensor.

[0142] Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the first aspect related to the method, and will not be elaborated here.

[0143] According to the third aspect of the embodiment of the present disclosure, please refer to the attached Figure 4, which exemplarily shows a block diagram of an electronic device. For example, the device 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0144] Reference Figure 4 , the device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .

[0145] The processing component 402 generally controls the overall operation of the device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 402 may include one or more modules to facilitate the interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate the interaction between the multimedia component 408 and the processing component 402.

[0146] The memory 404 is configured to store various types of data to support operations on the device 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0147] The power component 406 provides power to the various components of the device 400. The power component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 400.

[0148] The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0149] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), and when the device 400 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 404 or sent via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.

[0150] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0151] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the device 400. For example, the sensor assembly 414 can detect the open / closed state of the device 400, the relative positioning of components, such as the display and keypad of the device 400, the sensor assembly 414 can also detect the position change of the device 400 or a component of the device 400, the presence or absence of user contact with the device 400, the orientation or acceleration / deceleration of the device 400 and the temperature change of the device 400. The sensor assembly 414 can also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

[0152] The communication component 416 is configured to facilitate wired or wireless communication between the device 400 and other devices. The device 400 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G or 5G or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0153] In an exemplary embodiment, the device 400 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned method for determining the holding method of the electronic device.

[0154] In a fourth aspect, the present disclosure, in an exemplary embodiment, further provides a non-transitory computer-readable storage medium including instructions, such as a memory 404 including instructions, and the instructions can be executed by a processor 420 of an apparatus 400 to complete the above-mentioned method for determining the holding mode of an electronic device. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

[0155] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0156] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for determining a holding mode, characterized in that: Applied to a terminal device having at least one motion sensor, the method comprises: Acquiring motion parameters collected by the at least one motion sensor; The motion parameters are input into a prediction model to obtain a holding mode prediction result output by the prediction model, wherein the prediction model is trained based on the motion parameters collected by the at least one motion sensor under different holding modes.

2. The method for determining a holding mode according to claim 1, characterized in that: The acquiring the motion parameters collected by the at least one motion sensor includes: The motion parameters collected by the at least one motion sensor are acquired at a preset frequency.

3. The method for determining a holding mode according to claim 1 or 2, characterized in that: The step of inputting the motion parameters into a prediction model to obtain a gripping method prediction result output by the prediction model includes: The motion parameters acquired within the current preset time are input into the prediction model to obtain the holding mode prediction result of the current preset time output by the prediction model.

4. The method for determining a holding mode according to claim 3, characterized in that: After obtaining the holding mode prediction result of the current preset duration output by the prediction model, the method further includes: According to the holding manner prediction result of at least one preset duration before the current prediction duration, filtering processing is performed on the holding manner prediction result of the current preset duration.

5. The method for determining a holding mode according to claim 4, characterized in that: The at least one motion sensor comprises a gyroscopic sensor; The filtering process of the holding mode prediction result of the current preset duration according to the holding mode prediction result of at least one preset duration before the current prediction duration includes: The holding mode prediction result of the current preset time length is filtered according to the holding mode prediction result of at least one preset time length before the current prediction time length and the angular velocity collected by the gyroscope sensor acquired within the current preset time length.

6. The method for determining a holding mode according to claim 1, characterized in that: The method further comprises: Determining a state of the terminal device according to the motion parameter, wherein the state of the terminal device includes motion and stillness; The step of inputting the motion parameters into a prediction model to obtain a holding mode output by the prediction model includes: In response to the state of the terminal device being motion, the motion parameters are input into a prediction model to obtain a holding mode output by the prediction model.

7. The method for determining a holding mode according to claim 6, characterized in that: The at least one motion sensor comprises a gyroscopic sensor; The determining the state of the terminal device according to the motion parameter includes: In response to the angular velocity collected by the gyroscope sensor being greater than a preset threshold, determining that the state of the terminal device is motion; In response to the angular velocity collected by the gyroscope sensor being not greater than a preset threshold, it is determined that the state of the terminal device is stationary.

8. The method for determining a holding mode according to claim 1, characterized in that: The step of inputting the motion parameters into a prediction model to obtain a holding mode output by the prediction model includes: According to the weight coefficient of each motion sensor in the at least one motion sensor, the motion parameters collected by each motion sensor in the at least one motion sensor are weighted, and the weighted motion parameters are input into the prediction model to obtain the holding mode output by the prediction model.

9. The method for determining a holding mode according to claim 8, characterized in that: The at least one motion sensor includes an acceleration sensor and a gyro sensor, and a weight coefficient of the gyro sensor is greater than a weight coefficient of the acceleration sensor.

10. A holding method determination device, characterized in that: Applied to a terminal device having at least one motion sensor, the device comprises: An acquisition module, used to acquire motion parameters collected by the at least one motion sensor; A prediction module is used to input the motion parameters into a prediction model to obtain a holding method prediction result output by the prediction model, wherein the prediction model is trained based on the motion parameters collected by the at least one motion sensor under different holding methods.

11. The holding mode determination device according to claim 10, characterized in that: The acquisition module is specifically used for: The motion parameters collected by the at least one motion sensor are acquired at a preset frequency.

12. The holding mode determination device according to claim 10 or 11, characterized in that: The prediction module is specifically used for: The motion parameters acquired within the current preset time are input into the prediction model to obtain the holding mode prediction result of the current preset time output by the prediction model.

13. The holding mode determination device according to claim 12, characterized in that: The device also includes a filtering module, which is used to: After obtaining the holding mode prediction result of the current preset duration output by the prediction model, the holding mode prediction result of the current preset duration is filtered according to the holding mode prediction result of at least one preset duration before the current prediction duration.

14. The holding mode determination device according to claim 13, characterized in that: The at least one motion sensor comprises a gyroscopic sensor; The filtering module is specifically used for: The holding mode prediction result of the current preset time length is filtered according to the holding mode prediction result of at least one preset time length before the current prediction time length and the angular velocity collected by the gyroscope sensor acquired within the current preset time length.

15. The holding mode determination device according to claim 10, characterized in that: The device also includes a state module, configured to: Determining a state of the terminal device according to the motion parameter, wherein the state of the terminal device includes motion and stillness; The prediction module is specifically used for: In response to the state of the terminal device being motion, the motion parameters are input into a prediction model to obtain a holding mode output by the prediction model.

16. The holding mode determination device according to claim 15, characterized in that: The at least one motion sensor comprises a gyroscopic sensor; The state module is specifically used for: In response to the angular velocity collected by the gyroscope sensor being greater than a preset threshold, determining that the state of the terminal device is motion; In response to the angular velocity collected by the gyroscope sensor being not greater than a preset threshold, it is determined that the state of the terminal device is stationary.

17. The holding mode determination device according to claim 10, characterized in that: The prediction module is specifically used for: According to the weight coefficient of each motion sensor in the at least one motion sensor, the motion parameters collected by each motion sensor in the at least one motion sensor are weighted, and the weighted motion parameters are input into the prediction model to obtain the holding mode output by the prediction model.

18. The holding mode determination device according to claim 17, characterized in that: The at least one motion sensor includes an acceleration sensor and a gyro sensor, and a weight coefficient of the gyro sensor is greater than a weight coefficient of the acceleration sensor.

19. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is used to store computer instructions executable on the processor, and the processor is used to implement the holding manner determination method according to any one of claims 1 to 9 when executing the computer instructions.

20. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.