Terminal control method and device, equipment and storage medium

By installing an electromagnetic wave absorption rate sensor in the terminal device, the user's grip position is identified and the electromagnetic wave absorption rate is collected, solving the problem of universality and accuracy in identifying protective case materials, and enabling precise adjustment of terminal performance and improvement of user experience.

CN121013318APending Publication Date: 2025-11-25BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410650167.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

In the existing technology, the identification of protective shell materials for terminal devices has low universality and high cost. Furthermore, the user's grip affects the readings of the electromagnetic wave absorption rate sensor, leading to inaccurate performance adjustment.

Method used

By setting an electromagnetic wave absorption rate sensor in the terminal device, the user's grip position is obtained, and the sensor furthest from the grip position is controlled to collect the electromagnetic wave absorption rate. Based on the absorption rate, the material of the protective case is identified and the terminal performance is adjusted.

Benefits of technology

It reduces the cost of identifying protective case materials, improves the universality and accuracy of identification, ensures accurate adjustment of terminal device performance, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121013318A_ABST
    Figure CN121013318A_ABST
Patent Text Reader

Abstract

The invention provides a terminal control method and device, equipment and a storage medium. The terminal control method comprises the following steps: acquiring a holding position when a user holds a terminal; and controlling an electromagnetic wave absorptivity sensor farthest from the holding position in the terminal to acquire the electromagnetic wave absorptivity. And determining the material type of the protective shell assembled on the terminal according to the electromagnetic wave absorptivity. And adjusting the preset performance of the terminal according to the material type of the protective shell. The electromagnetic wave absorptivity sensor farthest from the holding position of the user is adopted to collect the electromagnetic wave absorptivity, the influence on the reading of the electromagnetic wave absorptivity sensor when the user holds the terminal can be reduced or eliminated, and the electromagnetic wave absorptivity is adopted to determine the material type of the protective shell. Under the conditions that the material type identification cost of the protective shell is reduced and the material type identification universality of the protective shell is improved, the material identification accuracy of the protective shell is improved, so that the terminal can accurately adjust the performance of the terminal based on the material type of the protective shell.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of terminals, and in particular, to a terminal control method and device, a terminal control apparatus, and a storage medium. BACKGROUND

[0002] When using a terminal device, a user usually assembles a protective shell outside the terminal to protect the terminal device and play a certain decorative role. Since the terminal device assembles protective shells made of different materials, the heat dissipation performance, communication performance, and the like of the terminal device may be different. Currently, special tags, such as magnetic tags and near-field communication tags, can be set in the protective shell, and the terminal can identify these tags to identify the material of the protective shell, and then adjust the specific performance of the terminal. However, the protective shell with tags is usually manufactured by the terminal device manufacturer, which has low universality, and setting tags in the protective shell will bring additional costs. SUMMARY

[0003] To overcome the problems in the related art, the present disclosure provides a terminal control method, device, apparatus, and storage medium.

[0004] According to a first aspect of the present disclosure, a terminal control method is provided, which includes:

[0005] obtaining a holding position when a user holds the terminal;

[0006] controlling an electromagnetic wave absorption rate sensor farthest from the holding position in the terminal to collect an electromagnetic wave absorption rate;

[0007] determining a material type of a protective shell assembled on the terminal according to the electromagnetic wave absorption rate;

[0008] adjusting a preset performance of the terminal according to the material type of the protective shell.

[0009] In some embodiments of the present disclosure, the determining of the material type of the protective shell assembled on the terminal according to the electromagnetic wave absorption rate includes:

[0010] obtaining sensing reference data of the electromagnetic wave absorption rate sensor;

[0011] taking a difference between the electromagnetic wave absorption rate and the sensing reference data as target sensing data corresponding to the protective shell;

[0012] determining the material type of the protective shell based on the target sensing data.

[0013] In some embodiments of the present disclosure, the determining of the material type of the protective shell based on the target sensing data includes:

[0014] Obtaining configuration information, the configuration information is used to represent the correspondence between the preset material type of the protective shell and the preset sensing data range;

[0015] Based on the target sensing data and the configuration information, the preset material type of the protective shell corresponding to the preset sensing data range including the target sensing data is determined as the material type of the protective shell.

[0016] In some embodiments of the present disclosure, the determination of the material type of the protective shell assembled on the terminal according to the electromagnetic wave absorption rate comprises:

[0017] The electromagnetic wave absorption rate is collected multiple times to obtain multiple initial material types of the protective shell, wherein, each time an initial material type is obtained, the initial material type is integrated, and other initial material types except the initial material type are reduced.

[0018] When the integral of the initial material type is greater than a first preset threshold, the initial material type is determined as the material type of the protective shell.

[0019] In some embodiments of the present disclosure, the electromagnetic wave absorption rate is the mean or median of multiple values collected by the electromagnetic wave absorption rate sensor within a preset period.

[0020] In some embodiments of the present disclosure, before obtaining the holding position of the user holding the terminal, the terminal control method comprises:

[0021] Determining an initial sample set, the initial sample set comprises multiple holding position labels and their corresponding initial data sets, and the initial data set comprises multiple initial arrays collected by the motion sensor within a unit period, and each initial array comprises multiple initial data arranged in time sequence;

[0022] Preprocessing the initial sample set to obtain a training sample set, the preprocessing comprises: extracting the time domain feature and the frequency domain feature of each initial array in each initial data set to obtain an initial feature set corresponding to each initial array; combining multiple initial feature sets of multiple initial data sets into an intermediate feature set, the intermediate feature set comprises multiple data types corresponding to multiple initial arrays, and multiple initial features corresponding to each data type; taking one initial feature corresponding to one data type as one intermediate feature, calculating the information gain of each intermediate feature in the intermediate feature set and the holding position label, and taking multiple intermediate features with information gain greater than a second preset threshold as multiple training features; determining the training sample set, the training sample set comprises multiple training features, each training feature comprises multiple values, and each value corresponds to one holding position label.

[0023] The initial holding position recognition model is trained based on the training sample set to obtain a holding position recognition model.

[0024] In some embodiments of the present disclosure, the holding position of the user holding the terminal is obtained by:

[0025] When the user holds the terminal, a detection data set collected by the motion sensor in the unit time period is obtained, the detection data set including a plurality of detection arrays, each detection array including a plurality of detection data arranged in time sequence;

[0026] The time domain features and the frequency domain features of each detection array are extracted, and a plurality of features and corresponding values in the plurality of features that are the same as the training features are taken as a detection sample set;

[0027] The detection sample set is input into the holding position recognition model to obtain the holding position of the user holding the terminal.

[0028] In some embodiments of the present disclosure, the motion sensor includes an accelerometer and a gyroscope.

[0029] According to a second aspect of the present disclosure, a terminal control apparatus is provided, which includes:

[0030] An obtaining module configured to obtain a holding position of a user holding the terminal;

[0031] A collecting module configured to control an electromagnetic wave absorption rate sensor farthest from the holding position in the terminal to collect an electromagnetic wave absorption rate;

[0032] A determining module configured to determine a material type of a protective shell assembled on the terminal according to the electromagnetic wave absorption rate;

[0033] An adjusting module configured to adjust a preset performance of the terminal according to the material type of the protective shell.

[0034] According to a third aspect of the present disclosure, a terminal device is provided, which includes:

[0035] A processor;

[0036] A memory for storing executable instructions of the processor;

[0037] The processor is configured to execute the terminal control method provided by the first aspect of the present disclosure.

[0038] According to a fourth aspect of the present disclosure, a non-transitory computer readable storage medium is provided, which, when instructions in the storage medium are executed by a processor of a terminal device, enables the terminal device to perform the terminal control method provided in the first aspect of the present disclosure.

[0039] The technical solution provided by the embodiments of the present disclosure can have the following beneficial effects: the present disclosure can reduce or eliminate the influence of the user holding the terminal on the reading of the electromagnetic wave absorption rate sensor by using the magnetic wave absorption rate sensor farthest from the user's holding position to collect the electromagnetic wave absorption rate, and using the electromagnetic wave absorption rate to determine the material type of the protective shell, thereby improving the accuracy of the protective shell material identification, reducing the cost of protective shell material type identification, and improving the accuracy of the protective shell material type identification, so that the terminal can accurately adjust the performance of the terminal based on the material type of the protective shell.

[0040] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0041] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0042] Figure 1 is a flowchart of a terminal control method according to some embodiments of the present disclosure.

[0043] Figure 2 is a schematic diagram of a terminal device according to some embodiments of the present disclosure.

[0044] Figure 3 is a schematic diagram of an initial sample set according to some embodiments of the present disclosure.

[0045] Figure 4 is a schematic diagram of an initial feature set and an intermediate feature set according to some embodiments of the present disclosure.

[0046] Figure 5 is a schematic diagram of an intermediate feature set filtered out from a plurality of intermediate features according to some embodiments of the present disclosure.

[0047] Figure 6 is a schematic diagram of a holding position recognition model according to some embodiments of the present disclosure.

[0048] Figure 7 is a block diagram of a terminal control apparatus according to some embodiments of the present disclosure.

[0049] Figure 8 is a structural block diagram of a terminal device according to some embodiments of the present disclosure. Detailed Implementation

[0050] Some embodiments of this disclosure will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following examples of this disclosure do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0051] Users typically equip their terminal devices with protective cases for protection and also for aesthetic purposes. Since different materials used for protective cases can affect a terminal's heat dissipation and communication performance, special tags, such as magnetic or near-field communication tags, can be embedded in the case. The terminal can then identify these tags to determine the case's material and adjust specific performance settings accordingly. However, tagged protective cases are often manufactured by the terminal device manufacturers, resulting in limited universality, and embedding tags in the case incurs additional costs.

[0052] To address the aforementioned technical issues, this disclosure provides a terminal control method. This method leverages the different electromagnetic wave absorption rates of various materials. An electromagnetic wave absorption rate sensor is incorporated into the terminal. The sensor's readings differentiate the material of the protective casing, and the terminal's performance is adjusted based on the casing's material type. This reduces costs and improves versatility. Considering that the terminal may be placed on various supports during user operation, the electromagnetic wave absorption rate sensor readings are affected by the supporting surface, making it impossible to eliminate all potential influences. Therefore, this method eliminates the influence of irrelevant materials on the electromagnetic wave absorption rate sensor readings when the user holds the terminal and it is suspended in the air. Meanwhile, considering that human tissue also absorbs some electromagnetic waves when users hold the terminal device, and different users hold the terminal device in different postures, the readings of the electromagnetic wave absorption rate sensor will be affected differently. In this case, the material of the protective case identified by the terminal device may be deviated, resulting in the inability to accurately adjust the performance of the terminal device. Therefore, it is necessary to further eliminate the influence of human tissue on the readings of the electromagnetic wave absorption rate sensor in order to improve the accuracy of the identification of the protective case material type.

[0053] Therefore, the terminal control method provided by the present disclosure comprises: acquiring a holding position when a user holds the terminal. A farthest electromagnetic wave absorption rate sensor from the holding position in the terminal is controlled to collect electromagnetic wave absorption rate. According to the electromagnetic wave absorption rate, the material type of the protective shell assembled on the terminal is determined. According to the material type of the protective shell, the preset performance of the terminal is adjusted. By using the farthest electromagnetic wave absorption rate sensor from the user's holding position to collect electromagnetic wave absorption rate, the present disclosure can reduce or eliminate the influence of the user holding the terminal on the reading of the electromagnetic wave absorption rate sensor. By using the electromagnetic wave absorption rate to determine the material type of the protective shell, the accuracy of the protective shell material identification is improved under the condition of reducing the identification cost of the protective shell material type and improving the universality of the protective shell material type identification, so that the terminal can accurately adjust the performance of the terminal based on the material type of the protective shell.

[0054] An example embodiment of the present disclosure provides a terminal control method, as shown in Figure 1 Figure 1 is a flow chart of the terminal control method shown in an example embodiment, which can comprise the following steps:

[0055] Step S100, acquiring a holding position when a user holds the terminal;

[0056] Step S200, controlling a farthest electromagnetic wave absorption rate sensor from the holding position in the terminal to collect electromagnetic wave absorption rate;

[0057] Step S300, determining the material type of the protective shell assembled on the terminal according to the electromagnetic wave absorption rate;

[0058] Step S400, adjusting the preset performance of the terminal according to the material type of the protective shell.

[0059] In the embodiment of the present disclosure, the terminal device can be a smartphone, a foldable phone, a tablet computer, etc., which can be held by a user and has an outer surface that can be assembled with a protective shell.

[0060] In step S100, when the user holds the terminal device, it can be held by both hands or by one hand, and the holding position can be one or more of the four corners or four sides of the terminal device. In some examples, a sensor that can sense the user's holding position can be provided in the terminal device, such as one of a pressure sensor, a photoelectric sensor, and a capacitive sensor provided at each of the four corners of the terminal device, so that when the user holds the terminal device, the terminal device can determine whether the terminal device is held based on the pressure value, the amount of infrared obstruction, or the capacitance value sensed by the sensor, and if it is held, the user's holding position can be further determined.

[0061] ​In some examples, when the user holds the terminal device, the palm can contact one corner of the terminal device, and the palm has a heartbeat frequency, which drives the terminal device to shake. When different positions of the terminal device are held by the user, the shaking of the terminal device has specific kinematic characteristics. Therefore, by obtaining the data sensed by the kinematic sensor in the terminal device, the kinematic characteristics can be extracted to determine whether the terminal device is held, and if so, the holding position of the user can be further determined.

[0062] In step S200, a plurality of electromagnetic wave absorption rate sensors can be arranged in the terminal device. Since the sensing principle of the electromagnetic wave absorption rate sensor is similar to that of the capacitive sensor, and the antenna of the terminal device is usually arranged at the four corners of the terminal device, the antenna can be equivalent to a capacitive and inductive load, therefore, the electromagnetic wave absorption rate sensor can be arranged at one or more of the four corners of the terminal device. In some examples, the four corners of the terminal device are each provided with an electromagnetic wave absorption rate sensor. In some examples, two electromagnetic wave absorption rate sensors can be arranged in the terminal device, respectively at opposite corners of the terminal device.

[0063] After determining the holding position of the user when holding the terminal device, the terminal device is in a suspended state, and there is no other material around the electromagnetic wave absorption rate sensor except the human body, air, the terminal device and the protective shell that the user can assemble. The terminal device can determine the electromagnetic wave absorption rate sensor farthest from the holding position, and control the electromagnetic wave absorption rate sensor farthest from the holding position to collect the electromagnetic wave absorption rate. Since the electromagnetic wave absorption rate sensor farthest from the holding position is controlled to collect data, the obtained electromagnetic wave absorption rate is not affected by the human body, or is less affected by the human body, so that the numerical accuracy of the electromagnetic wave absorption rate collected by the electromagnetic wave absorption rate sensor is improved.

[0064] It can be understood that, in order to further improve the numerical accuracy of the electromagnetic wave absorption rate, after determining the holding position of the user, the mean, median or mode of a plurality of values collected by the electromagnetic wave absorption rate sensor farthest from the holding position within a preset time period can be taken as the electromagnetic wave absorption rate output by the electromagnetic wave absorption rate sensor. Since the holding position of the user is likely to change, the preset time period can be a time interval pre-set based on experience, for example, it can be 8 seconds, 10 seconds, 15 seconds, 20 seconds, 30 seconds, etc. While improving the numerical accuracy of the sensed output electromagnetic wave absorption rate, the output speed of the sensing value is ensured. Since the electromagnetic wave absorption rate sensor has a certain power, the electromagnetic wave absorption rate sensor can also collect a plurality of values per second, thereby improving the number of values collected within the preset time period.

[0065] Reference Figure 2For example, when it is determined that the holding position of the user is at the lower left corner of the terminal device, the terminal device can control the electromagnetic wave absorption rate sensor located at the upper right corner of the terminal device to collect the electromagnetic wave absorption rate. For another example, when it is determined that the holding position of the user is at the right side frame of the terminal device, the terminal device controls the electromagnetic wave absorption rate sensor located at the left side of the terminal device and farthest from the holding position to collect the electromagnetic wave absorption rate. For example, when the holding position is at the upper right side frame, the electromagnetic wave absorption rate sensor located at the lower left corner of the terminal device is controlled to collect the data; when the holding position is at the lower right side frame, the electromagnetic wave absorption rate sensor located at the upper left corner of the terminal device is controlled to collect the data.

[0066] When the user holds the terminal device with two hands, it can be that two corners of a short side of the terminal device are held, i.e., the lower left corner and the lower right corner are held, or the upper left corner and the upper right corner are held. When two corners of a short side of the terminal device are held, the fingers of the user are usually placed on the long side frame of the terminal device or the back shell of the terminal device, and the fingers of the user do not affect or affect the reading of the electromagnetic wave absorption rate sensor located at the other short side of the terminal device. Therefore, when the lower left corner and the lower right corner of the terminal device are held at the same time, the electromagnetic wave absorption rate sensor located at the upper left corner or the upper right corner of the terminal device can be controlled to collect the data, or the electromagnetic wave absorption rate sensors located at the upper left corner and the upper right corner can be controlled to collect the data at the same time, and the average of the data collected by the two sensors is taken as the electromagnetic wave absorption rate output by the electromagnetic wave absorption rate sensor.

[0067] It can be understood that when the user holds the terminal device with two hands, it can also be that two corners of a long side of the terminal device are held, i.e., the upper left corner and the lower left corner are held at the same time, or the upper right corner and the lower right corner are held at the same time. When two corners of a long side of the terminal device are held, in order to maintain stability, the fingers of the user will usually be placed on the corners of the other long side of the terminal device. Therefore, the electromagnetic wave absorption rate sensors in the terminal device will all be affected, and at this time, the electromagnetic wave absorption rate sensors in the terminal device can all be controlled to be in the off state.

[0068] It can be understood that when the terminal device is not held, the terminal device can be placed on a table, a bed, or various positions, and the terminal device is in a non-suspended state. In addition to air, the terminal device, and a protective shell that can be assembled by the user, the electromagnetic wave absorption rate sensor is also affected by the carrier supporting the terminal device. The reading of the electromagnetic wave absorption rate sensor is affected by the carrier supporting the terminal device. Since the terminal device can be placed on various materials, it is impossible to exclude all the influencing factors that can be caused by various materials. Therefore, when the terminal device is not held, the electromagnetic wave absorption rate sensors in the terminal device can all be controlled to be in the off state, and only when the user holds the terminal device, the corresponding electromagnetic wave absorption rate sensor is controlled to collect the data.

[0069] In step S300, for the decoration and / or protection needs of the terminal device, the user often assembles a protective shell on the terminal device, which covers the four corners and the back shell of the terminal device, and exposes the display screen. The protective shell can protect the four corners, the frame and the back shell of the terminal device. When the terminal device falls or collides, the protective shell can play a buffering role. The shape, pattern, texture, color and other elements of the protective shell can also play a decorative role. It can be understood that the protective shell can include protective shells of various material types, such as metal, leather, synthetic leather, silica gel, plastic, etc. Protective shells of different material types have different hand feelings and appearance effects. Based on different needs of users, the material types of the protective shells assembled on the terminal device are different.

[0070] Since the electromagnetic wave absorption rate output by the electromagnetic wave absorption rate sensor is collected only by the following three influencing factors: the terminal device itself, the air and the protective shell that may be set, after excluding the influence of the human body when the terminal device is in a suspended state. Since the terminal device itself and the air have constant influencing factors on the electromagnetic wave absorption rate, and the relative dielectric constant of the protective shell of different materials is different. When protective shells of different material types are assembled on the terminal device, the electromagnetic waves absorbed or consumed by the protective shell can be different, and the electromagnetic wave absorption rate collected by the electromagnetic wave absorption rate sensor can be different. The material type of the protective shell can be identified through this characteristic.

[0071] In some examples, a mapping relationship table of the electromagnetic wave absorption rate collected by the electromagnetic wave absorption rate sensor when the terminal device is not assembled with a protective shell and when the terminal device is assembled with protective shells of different material types can be pre-set in the terminal device. In the detection process, after the electromagnetic wave absorption rate is collected, the electromagnetic wave absorption rate is searched in the mapping relationship table, so as to determine whether the terminal device is assembled with a protective shell. If the protective shell is assembled, the material type of the protective shell assembled on the terminal device can be further determined.

[0072] In other examples, since the influencing factors of the terminal device itself and the air on the electromagnetic wave absorption rate are constant, the influencing factors of the two can be excluded from the collected electromagnetic wave absorption rate, so as to obtain the electromagnetic wave absorption rate corresponding to the protective shell assembled on the terminal device. The terminal device can pre-set a mapping relationship table of various material types and the electromagnetic wave absorption rate values corresponding to each material type. After the electromagnetic wave absorption rate corresponding to the protective shell is determined, the electromagnetic wave absorption rate is searched in the mapping relationship table, so as to determine the material type of the protective shell assembled on the terminal device. It can be understood that if the calculated electromagnetic wave absorption rate corresponding to the protective shell is a small value close to 0, it can be determined that the terminal device is not assembled with a protective shell.

[0073] In step S400, since the terminal device is equipped with the protective shell, some performance of the terminal device can be affected, and the affected performance is related to the material type of the protective shell. After determining the material type of the protective shell equipped on the terminal device, the preset performance of the terminal device affected by the protective shell can be adaptively adjusted, for example, the preset performance is optimized, so as to avoid the user's use experience from being poor due to the setting of the protective shell. Of course, if it is determined that the terminal device is not equipped with the protective shell, the preset performance of the terminal device does not need to be adjusted.

[0074] For example, when the terminal device has a wireless charging function, since the wireless charging technology usually includes electromagnetic induction principle, magnetic resonance principle, electric field coupling principle, wireless wave principle and the like, the protective shell made of metal material is easy to hinder the efficiency of wireless charging, while the materials such as silica gel and plastic have less influence on the efficiency of wireless charging. After determining the material type of the protective shell, the wireless charging performance of the terminal device can be adjusted.

[0075] For another example, since the communication antenna is arranged in the terminal device, the communication antenna needs to emit signals to the base station in the form of electromagnetic waves, and also needs to receive signals sent from the base station. Since the electromagnetic wave absorption rates of protective shells made of different materials are different, the influence of protective shells made of different materials on the performance of the communication antenna is also different. Therefore, the arrangement of the communication antenna in the terminal device can be adjusted based on the material type of the protective shell, so as to adjust the communication capability of the terminal device and ensure the communication experience of the user when using the terminal device.

[0076] For another example, since the thermal conductivity of different materials is different, when the terminal device is in a low-temperature environment, or in a high-temperature environment, the heat dissipation performance can be adjusted based on the material type of the protective shell and the environment in which the terminal device is located, so as to avoid the temperature of the terminal device from flowing away quickly, or to avoid the terminal device from overheating, so as to prolong the service life of the terminal device and the battery.

[0077] The present disclosure realizes the identification of the material of the protective shell equipped on the terminal device by collecting the electromagnetic wave absorption rate by the electromagnetic wave absorption rate sensor farthest from the user's holding position, without setting any label or mark in the protective shell to realize the material identification, the protective shell can retain the original appearance design, and the cost of setting the label is also reduced, and the present disclosure has strong universality, increases the selectivity of the user for the protective shell, and also reduces the influence of the protective shell on the environment when it is discarded. In addition, in the present disclosure, the influence of the user's holding on the collection of the electromagnetic wave absorption rate sensor is excluded or reduced when identifying the material type of the protective shell, so as to improve the accuracy of the identification of the material type of the protective shell, and the terminal device can accurately adjust the performance of the terminal device based on the material type of the protective shell, so as to ensure the use experience of the user when using the terminal device in addition to meeting the appearance demand and protection demand of the user for setting the protective shell on the terminal device.

[0078] In one example embodiment, in step S300 of the above embodiment, the material type of the protective case assembled on the terminal is determined according to the electromagnetic wave absorption rate, including:

[0079] In step S310, the sensing reference data of the electromagnetic wave absorption rate sensor is obtained.

[0080] In step S320, the difference between the electromagnetic wave absorption rate and the sensing reference data is taken as the target sensing data corresponding to the protective case.

[0081] In step S330, the material type of the protective case is determined based on the target sensing data.

[0082] In step S310, the sensing reference data can be the electromagnetic wave absorption rate sensed by the electromagnetic wave absorption rate sensor when the terminal device is in a "bare machine" state before leaving the factory and is not held, including the terminal device itself and the surrounding environment of the air. Due to the slight differences between different terminal devices, and the different electronic components and parts placed in different positions of the terminal device, the electromagnetic wave absorption rate sensors in different positions of different terminal devices have different sensing reference data. In order to avoid the influence of other materials in the environment on the data collected by the electromagnetic wave absorption rate sensor, the sensing reference data of each electromagnetic wave absorption rate sensor can be determined in the state that the terminal device is clamped by a specific clamp.

[0083] For convenience of distinction, the electromagnetic wave absorption rate sensors in different positions of the terminal device can be numbered, and the sensing reference data corresponding to the electromagnetic wave absorption rate sensors with different numbers can be recorded in the terminal device in advance. After obtaining the electromagnetic wave absorption rate collected by the electromagnetic wave absorption rate sensor, the terminal device can call the sensing reference data of the electromagnetic wave absorption rate sensor outputting the electromagnetic wave absorption rate.

[0084] In step S320, the electromagnetic wave absorption rate output by the electromagnetic wave absorption rate sensor is affected not only by the material type of the protective case that can be assembled on the terminal device, but also by the air and various parts placed in the terminal device. Therefore, after obtaining the electromagnetic wave absorption rate output by the electromagnetic wave absorption rate sensor, the environmental factors around the electromagnetic wave absorption rate sensor contained in the data need to be removed to obtain the target sensing data that truly represents the electromagnetic wave absorption rate of the protective case. Therefore, the electromagnetic wave absorption rate output by the electromagnetic wave absorption rate sensor is subtracted from the sensing reference data corresponding to the electromagnetic wave absorption rate sensor, and the difference between the two is taken as the target sensing data representing the protective case assembled on the terminal device.

[0085] In step S330, because the relative dielectric constants of the protective cases of different material types are different, the electromagnetic waves absorbed or consumed by the protective cases of different material types can be different, and the target sensing data corresponding to the protective cases are different. The terminal device can be preconfigured with a mapping relationship table of a plurality of material types and an electromagnetic wave absorption rate value corresponding to each material type. After the target sensing data of the protective case is determined, the material type corresponding to the target sensing data is found in the mapping relationship table, that is, the material type of the protective case assembled on the terminal device.

[0086] In some possible implementation manners, in step S330 of the above embodiment, the material type of the protective case is determined based on the target sensing data, including:

[0087] In step S331, configuration information is acquired, and the configuration information is used to represent a correspondence between a preset material type of the protective case and a preset sensing data range.

[0088] In step S332, based on the target sensing data and the configuration information, a preset material type of the protective case corresponding to a preset sensing data range including the target sensing data is taken as the material type of the protective case.

[0089] In this embodiment, the configuration information can be a configuration table pre-stored in the terminal device before leaving the factory, and used to represent a correspondence between the material type of the protective case and the corresponding electromagnetic wave absorption rate. Because the relative dielectric constants of each material type at different temperatures are different, when the terminal device is at different temperatures, although the material of the protective case assembled on the terminal device is the same, the electromagnetic wave absorption rate collected by the electromagnetic wave absorption rate sensor is also different. Therefore, the electromagnetic wave absorption rate corresponding to each preset material type of the protective case has a preset sensing data range, and the preset sensing data range can be obtained by sensing the electromagnetic wave absorption rate of the protective case in a possible use environment temperature range of the terminal device. For example, the preset sensing data range of each preset material type of the protective case can be a numerical range of the corresponding electromagnetic wave absorption rate in a preset environment temperature range of minus sixty degrees to fifty degrees.

[0090] In the configuration information, the preset sensing data range corresponding to each material type can be a difference between two electromagnetic wave absorption rates sensed by the electromagnetic wave absorption rate sensor respectively at environment temperatures at two end values of a preset environment temperature range, when the terminal device is clamped by a clamp in a state of assembling the protective case of the material type, that is, after the influence of environmental factors around the electromagnetic wave absorption rate sensor on the collected data is removed, the preset sensing data range corresponding to each material type in the configuration information is a numerical range of the electromagnetic wave absorption rate of the protective case of the material type in the preset environment temperature range.

[0091] After obtaining the target sensing data for characterizing the protective case assembled on the terminal device, preset configuration information is called from the memory of the terminal device, and the preset configuration information is traversed to determine a preset sensing data range containing the target sensing data. A preset material type of the protective case corresponding to the preset sensing data range is taken as the material type of the protective case assembled on the terminal device.

[0092] In an example embodiment, in step S300 of the above embodiment, the material type of the protective case assembled on the terminal is determined according to the electromagnetic wave absorption rate, including:

[0093] In step S300-1, the electromagnetic wave absorption rate of the protective case is collected multiple times to obtain multiple initial material types of the protective case, wherein each time an initial material type is obtained, the initial material type is integrated, and other initial material types except the initial material type are reduced.

[0094] In step S300-2, when the integral of the initial material type is greater than a first preset threshold, the initial material type is taken as the material type of the protective case.

[0095] In this embodiment, in order to further improve the recognition accuracy of the material type of the protective case, as long as it is determined that the terminal device is held by the user, the electromagnetic wave absorption rate can be continuously used to recognize the material type of the protective case to obtain multiple recognition results of the material type corresponding to the protective case. The multiple recognition results are data filtered to be the final determined material type of the protective case. It can be understood that, since the terminal device will collect the electromagnetic wave absorption rate as long as the user holds the terminal device when the terminal device is not assembled with the protective case, the recognition process of the material type of the protective case will also output the recognition result of “no protective case assembled”.

[0096] As long as it is determined that the terminal device is held by the user, the electromagnetic wave absorption rate sensor farthest from the holding position can be controlled to continuously collect the electromagnetic wave absorption rate. In some examples, the electromagnetic wave absorption rate output by the electromagnetic wave absorption rate sensor each time can be used to identify the material type of the protective case once to be multiple initial material types of the protective case, which can be the same or different.

[0097] In some examples, the electromagnetic wave absorption rate outputted by the electromagnetic wave absorption rate sensor can be the mean, mode or median of multiple values collected by the electromagnetic wave absorption rate sensor within a preset time period. Thus, multiple data continuously collected by the electromagnetic wave absorption rate sensor within a period of time can be divided into multiple preset time periods, and the mean, mode or median of multiple values within each preset time period can be outputted as the electromagnetic wave absorption rate. For example, when the preset time period is 20s, for multiple data continuously collected by the electromagnetic wave absorption rate sensor within 2min, the multiple data can be divided into 6 preset time periods, and the electromagnetic wave absorption rate sensor can output the electromagnetic wave absorption rate 6 times in turn. Based on the 6 electromagnetic wave absorption rate values, 6 initial material types can be determined in turn, and the 6 initial material types can be the same or different.

[0098] An integral list can be established, and the integral list can include multiple initial material types possibly adopted by the protective shell. Before the electromagnetic wave absorption rate is collected, the integral of each initial material type is 0. After the electromagnetic wave absorption rate is collected multiple times, multiple initial material types are obtained in turn, and the integral of each initial material type is increased, for example, by 5, 8, 10 and the like. After multiple initial material types are obtained in turn and the integral of each initial material type is increased, when the integral of a certain initial material type is greater than a first preset threshold, it indicates that the identification result of the initial material type appears most frequently, and the initial material type is determined as the material type of the protective shell assembled on the terminal device.

[0099] For example, the initial material types possibly adopted by the protective shell can include a. no protective shell assembled; b. metal; c. leather; d. synthetic leather; e. silica gel; and f. plastic, and the integral of each initial material type in the integral list is 0. When the initial material type of the protective shell is leather, the integral of leather is changed to 5, and the integral of other initial material types is still 0. When the initial material type obtained again is leather, the integral of leather is changed to 10, and the integral of other initial material types is still 0. The multiple initial material types are integrated according to the rule until the integral of a certain initial material type reaches a first preset threshold, for example, 100 or 80, and the initial material type is outputted as the material type of the protective shell assembled on the terminal device, and the integral list is cleared.

[0100] In some examples, if after obtaining an initial material type, other initial material types have scores, the scores of the other initial material types can be reduced while the score of the initial material type is increased. For example, if the initial material type obtained once is leather, the initial score of leather in the score list is 40, the score of silica gel is 5, and the scores of other initial material types are 0. At this time, the score of leather is changed to 45, and the score of silica gel can be changed to 3 or 2. The scores of the plurality of initial material types are increased according to the rule until the score of a certain initial material type reaches a first preset threshold, such as 100 or 90, and the initial material type is output as the material type of the protective shell assembled on the terminal device, and the score list is cleared.

[0101] In an example embodiment, before performing step S100 of the above embodiment, i.e., before obtaining the holding position of the user holding the terminal, the terminal control method comprises:

[0102] Step S101, determining an initial sample set, the initial sample set comprising a plurality of holding position labels and corresponding initial data sets, the initial data set comprising a plurality of initial arrays collected by the motion sensor in a unit time period, each initial array comprising a plurality of initial data arranged in time sequence;

[0103] Step S201, preprocessing the initial sample set to obtain a training sample set; the preprocessing comprises: extracting the time domain features and frequency domain features of each initial array in each initial data set to obtain an initial feature set corresponding to each initial array; combining the plurality of initial feature sets of the plurality of initial data sets into an intermediate feature set, the intermediate feature set comprising a plurality of initial arrays respectively corresponding to a plurality of data types, and a plurality of initial features corresponding to each data type; taking one initial feature corresponding to one data type as one intermediate feature, calculating the information gain of each intermediate feature in the intermediate feature set and the holding position label, and taking a plurality of intermediate features with information gain greater than a second preset threshold as a plurality of training features; determining the training sample set, the training sample set comprising a plurality of training features, each training feature comprising a plurality of values, each value corresponding to one holding position label;

[0104] Step S301, training the initial holding position recognition model based on the training sample set to obtain a holding position recognition model.

[0105] In this embodiment, when a user holds the terminal device, the palm center can be in contact with one corner of the terminal device, and the palm has a shaking with a heartbeat frequency, thereby driving the terminal device to shake. When different positions of the terminal device are held by the user, the shaking of the terminal device has specific kinematic characteristics. Therefore, by collecting data through the motion sensor, specific kinematic characteristics are extracted to determine whether the terminal device is held and to determine the holding position when the user holds the terminal device. Therefore, before obtaining the holding position, it is necessary to train the holding position recognition model to be saved in the terminal device.

[0106] In step S101, each initial data set in the initial sample set can be a plurality of initial arrays collected by the motion sensor in a unit time period when a simulated human body holds the terminal device before the terminal device is shipped. Each initial data set corresponds to a holding position label, and the holding position label is used to mark the holding position of the simulated human body when holding the terminal device when the motion sensor collects data. For example, when the holding position is the lower left corner, the holding position label is A; when the holding position is the lower right corner, the holding position label is B, and so on. It can be understood that each holding position label can be provided with a plurality of initial data sets, and by increasing the training data input to the model, the holding position recognition model obtained by training has good recognition accuracy.

[0107] It can be understood that an array is a collection of elements of the same data type with a sequence. The motion sensor can include an accelerometer, a gyroscope, a vibration sensor, and the like. In some examples, the motion sensor includes an accelerometer and a gyroscope, the accelerometer is used to sense the acceleration of the terminal device, and the gyroscope is used to sense the angular velocity of the rotation of the terminal device. The unit time period can be set based on actual needs, for example, it can be 1 second or 0.5 seconds. Since the motion sensor has a certain sampling power, when the sampling rate of the accelerometer and the gyroscope is, for example, 50HZ, and the unit time period is, for example, 1 second, the accelerometer and the gyroscope can collect data every 1 / 50 second. Therefore, one initial data set can include a plurality of initial arrays corresponding to various data types collected by the accelerometer and the gyroscope in 1 second, and each initial array can include 50 initial data arranged in time sequence. One initial data set corresponds to one holding position label.

[0108] Exemplarily, in each initial data set, the data types of the initial arrays can include 24 data types such as AccX, AccY, AccZ, AccN, Acc_max, Acc_other, AccD_X, AccD_Y, AccD_Z, AccD_N, AccD_max, AccD_other, GyroX, GyroY, GyroZ, GyroN, Gyro_max, Gyro_other, GyroD_X, GyroD_Y, GyroD_Z, GyroD_N, GyroD_max, GyroD_other, etc. That is, each initial data set can include 24 different initial arrays, and each initial array can include 50 initial data arranged in time sequence. It can be understood that in the multiple initial arrays, the initial data at the same position correspond to the same time, for example, the first initial data in each initial array is the data collected at the 20th millisecond in a unit time period (for example, 1 second), the second initial data is the data collected at the 40th millisecond in a unit time period (for example, 1 second), and so on. It can be understood that in the multiple initial arrays, the initial data at the same position correspond to the same time, for example, the first initial data in each initial array is the data collected at the 20th millisecond in a unit time period (for example, 1 second), the second initial data is the data collected at the 40th millisecond in a unit time period (for example, 1 second), and so on. Reference Figure 3 Figure 3 Exemplarily, a schematic diagram of an initial sample set is shown.

[0109] In the above types of initial arrays, AccX, AccY, and AccZ respectively represent the components of the acceleration of the terminal device along the X, Y, and Y axes in a three-dimensional coordinate system, and each includes 50 initial data arranged in time sequence. AccN represents the absolute acceleration of the terminal device, AccN=(AccX 2 +AccY 2 +AccZ 2 ) 0.5 ; Acc_max represents the value corresponding to the axis with the maximum acceleration, and the value is equal to the maximum absolute value of AccX, AccY, and AccZ; Acc_other represents the non-maximum acceleration residual, and the square of the value is equal to the sum of the squares of the other two axes except Acc_max, Acc_other=(AccN 2 -Acc_max 2 0.5 ​​It can be understood that the initial array corresponding to the data type of AccN, Acc_max, Acc_other, etc. includes 50 initial data arranged in time sequence in turn, and each initial data is calculated by using the collected AccX, AccY and AccZ at the same time. AccD_X represents the difference between AccX at each time and AccX at the previous time in the component of the accelerometer on the X axis, wherein the first initial data is the difference between AccX collected at the 20th millisecond and AccX collected at the 0th millisecond in a unit time period (for example, 1 second), and the data collected at the 0th millisecond is 0, that is, the first initial data in AccD_X is AccX; the second initial data is the difference between AccX collected at the 40th millisecond and AccX collected at the 20th millisecond in a unit time period (for example, 1 second)……, and so on. Therefore, the initial array corresponding to AccD_X also includes 50 initial data arranged in time sequence in turn. Similarly, AccD_Y represents the difference between AccY at each time and AccY at the previous time in the component of the accelerometer on the Y axis; and AccD_Z represents the difference between AccZ at each time and AccZ at the previous time in the component of the accelerometer on the Z axis. The calculation method of AccD_N is the same as that of AccN, AccD_N=(AccD_X 2 +AccD_Y 2 +AccD_Z 2 ) 0.5 ; the value of AccD_max is equal to the maximum value in the absolute values of AccD_X, AccD_Y and AccD_Z; and the square of the value of AccD_other is equal to the sum of the squares of the other two axes except AccD_max, AccD_other=(AccD_N 2 -AccD_max 2 ) 0.5 It can be understood that the initial array corresponding to the data type of AccD_N, AccD_max, AccD_other, etc. includes 50 initial data arranged in time sequence in turn, and each initial data is calculated by using the corresponding AccD_X, AccD_Y and AccD_Z at the same time.

[0110] Similarly, in the type of the above initial array, GyroX, GyroY and GyroZ respectively represent the rotational angular velocity of the terminal device along the X, Y and Y axes in the three-dimensional coordinate system, and each includes 50 initial data arranged in time sequence in turn. GyroN represents the absolute angular velocity of the terminal device, GyroN=(GyroX 2 +GyroY 2 +GyroZ 2 ) 0.5Gyro_max represents the value corresponding to the axis with the maximum rotational angular velocity, and the value is equal to the maximum absolute value among GyroX, GyroY and GyroZ; Gyro_other represents the rotational angular velocity of the non-maximum value, and the square of the value is equal to the sum of the squares of the rotational angular velocities of the other two axes except Gyro_max, Gyro_other = (GyroN 2 Gyro_max 2 ) 0.5 It can be understood that the initial arrays corresponding to the data types of GyroN, Gyro_max, Gyro_other, etc. all include 50 initial data arranged in time sequence, and each initial data is calculated by using GyroX, GyroY and GyroZ collected at the same time. GyroD_X represents the difference between GyroX at each time and GyroX at the previous time, wherein the first initial data is the difference between GyroX collected at the 20th millisecond and GyroX collected at the 0th millisecond in a unit time period (for example, 1 second), and the data collected at the 0th millisecond is 0, that is, the first initial data in GyroD_X is GyroX; the second initial data is the difference between GyroX collected at the 40th millisecond and GyroX collected at the 20th millisecond in a unit time period (for example, 1 second) …, and so on. The initial array corresponding to GyroD_X also includes 50 initial data arranged in time sequence. Similarly, GyroD_Y represents the difference between GyroY at each time and GyroY at the previous time; GyroD_Z represents the difference between GyroZ at each time and GyroZ at the previous time. GyroD_N is calculated in the same way as GyroN, GyroD_N = (GyroD_X 2 + GyroD_Y 2 + GyroD_Z 2 ) 0.5 The value of GyroD_max is equal to the maximum absolute value among GyroD_X, GyroD_Y and GyroD_Z; the square of the value of GyroD_other is equal to the sum of the squares of the other two axes except GyroD_max, GyroD_other = (GyroD_N 2 GyroD_max 2 ) 0.5 It can be understood that the initial arrays corresponding to the data types of GyroD_N, GyroD_max, GyroD_other, etc. all include 50 initial data arranged in time sequence, and each initial data is calculated by using GyroD_X, GyroD_Y and GyroD_Z corresponding to the same time.

[0111] In step S201, the initial sample set is preprocessed to obtain the training sample set. Preprocessing primarily involves calculating the time-domain and frequency-domain features of each initial array within each initial dataset. Both time-domain and frequency-domain features include multiple features, and the types of features extracted from each initial array are the same. Since each initial array corresponds to a data type, each feature corresponding to each data type is integrated to extract multiple features with high correlation coefficients to the grip position, which are then used as multiple training features. These multiple training features, the grip position label corresponding to each training feature, and the value corresponding to each training feature are used as the training sample set.

[0112] refer to Figure 3 and Figure 4 As shown, Figure 3 This is a schematic diagram of an initial sample set. Figure 4 This is a schematic diagram of an initial feature set and an intermediate feature set. Since the initial sample set includes multiple initial datasets, and each initial dataset includes multiple initial arrays, each initial array represents a type of initial data, and the multiple initial data in the initial array are arranged in chronological order. Therefore, it is possible to analyze the process of the data type corresponding to each initial array in each initial dataset changing over time (i.e., time-domain features), as well as the frequency components contained in that data type (i.e., frequency-domain features).

[0113] For each initial array in each initial dataset, the time-domain and frequency-domain features of each initial array are calculated. The time-domain features can include 10 characteristics such as the mean, standard deviation, maximum value, minimum value, mode, range of initial data, quartiles, number of zero-crossings, sum, and the ratio of the sum of the 10% minimum values ​​to the total sum. Understandingly, when calculating the frequency-domain features, a Fourier transform or other transformation method can be used to convert the signal from the time domain to the frequency domain. Frequency-domain features can be extracted, including 16 characteristics such as the spectral DC component, maximum frequency, maximum value location, the top 5 peak values, the locations of the top 5 peak values, frequency energy, the ratio of the frequency maximum value to the spectral DC component, spectral shape mean, shape standard deviation, shape slope, shape kurtosis, frequency mean, frequency standard deviation, frequency slope, and frequency kurtosis. Therefore, for each initial array in each initial dataset, the corresponding initial feature set can include 26 initial features, each with a corresponding value.

[0114] Further, for each initial data set, since each initial data set can include 24 initial arrays corresponding to 24 data types, each initial data set can include 24 initial feature sets. Since the initial sample set includes multiple initial data sets, the 24 initial feature sets included in the multiple initial data sets are merged to obtain an intermediate feature set. In the intermediate feature set, the initial arrays corresponding to each initial feature set are set corresponding to the data types, for example, in each initial data set, there are an initial feature set 1 corresponding to a data type AccX, an initial feature set 2 corresponding to a data type AccY, and the like, in the intermediate feature set, the initial feature set 1 corresponding to the data type AccX in the multiple initial data sets is set corresponding to, the initial feature set 2 corresponding to the data type AccY in the multiple initial data sets is set corresponding to, and the like. That is, in the intermediate feature set, each data type corresponds to 26 initial features.

[0115] It can be understood that since the intermediate feature set includes 24 data types, each data type corresponds to 26 initial features, and one initial feature corresponding to one data type is taken as an intermediate feature, the types of intermediate features in the intermediate feature set can include 24*26=624 types. Referring to Figure 5 Figure 5 is a schematic view of an intermediate feature set that screens out multiple intermediate features, the time domain feature 1 corresponding to the data type AccX can be taken as an intermediate feature, the time domain feature 1 corresponding to the data type AccY can be taken as an intermediate feature, the time domain feature 2 corresponding to the data type AccX can be taken as an intermediate feature, and the like. It can be understood that since the intermediate feature set is formed by the combination of multiple initial features corresponding to multiple initial data sets, and the values of each initial feature corresponding to each data type in different initial data sets are not the same, each intermediate feature in the intermediate feature set includes multiple values corresponding to multiple initial data sets.

[0116] The information gain of each intermediate feature and the holding position label is calculated, and the calculation formula of the information gain is represented as:

[0117] Gain(Y,X)=H(Y)-H(Y|X)

[0118] Wherein, Y represents the holding position label, H(Y) represents the information entropy of the holding position label, that is, the expected information amount of all possible holding position labels. X represents a certain intermediate feature, and H(Y|X) is the conditional entropy, which represents the uncertainty of random variable Y under the condition that random variable X is known, that is, the mathematical expectation of the entropy of the conditional probability distribution of Y under the condition of a variable X (each value of variable X will be taken)..

[0119] Wherein, the calculation formula of H(Y) is represented as: ​

[0120]

[0121] wherein C represents the number of classes of the holding position label, P(y k ) represents the probability of the holding position label being k.

[0122] wherein the calculation formula of H(Y|X) is represented as:

[0123]

[0124] wherein X represents a certain intermediate feature, P(x) represents the probability of the intermediate feature X taking the value x, and P(x,y) represents the probability of the event y occurring when the intermediate feature X takes the value x, i.e., the probability of the holding position label being k when the intermediate feature X takes the value x.

[0125] In the calculation of the information gain of each intermediate feature, data within the intermediate feature set is used for calculation. It can be understood that, since each intermediate feature includes multiple values corresponding to multiple initial data sets, in order to facilitate the calculation of the conditional entropy H(Y|X), the values in each intermediate feature can be classified. For example, based on the range (minimum value-maximum value) in which the multiple values in the intermediate feature are located, the range of the intermediate feature is divided into multiple small ranges, and the values falling within the same small range are recorded as a same marked value. For example, when the range of the multiple values in the intermediate feature is (0-100), the range of the intermediate feature is divided into 20 small ranges, and the data within the data range (0, 5) is classified as data 1, the data within the data range (5, 10) is classified as data 2, and so on, so as to facilitate the calculation of P(x) and P(x,y).

[0126] Since the types of intermediate features can include 24*26=624 types, after calculating the information gain of the 624 intermediate features respectively, the information gain is sorted according to the value size, and the multiple intermediate features with information gain greater than a second preset threshold value are used as the multiple training features for training the initial holding position recognition model. The greater the information gain, the greater the "purity improvement" of the data obtained by using the intermediate feature for division, i.e., the higher the accuracy when using the intermediate feature to judge the holding position. The second preset threshold value can be a pre-set empirical value, for example, it can be a value such as 0.2, 0.25, 0.3, etc.

[0127] Reference Figure 5As shown, since each intermediate feature includes a plurality of values corresponding to a plurality of initial data sets, each value corresponding to a holding position label, after determining the plurality of intermediate features with information gain greater than the second preset threshold as the plurality of training features, and determining the plurality of training features as the training sample set, the training sample set further includes a plurality of values corresponding to each training feature, each value corresponding to a holding position label. For example, when determining that the time domain feature 1 corresponding to the data type AccX is a training feature, the plurality of values corresponding to a plurality of initial data sets included in the training feature, and the holding position label corresponding to each value, are all set in the training sample set.

[0128] In step S301, the training sample set is input into the initial holding position recognition model, and according to the plurality of values in the plurality of training features and the corresponding holding position labels, the initial holding position recognition model can be trained using a loss function. The training set iteratively trains the initial holding position recognition model using the plurality of training features in the training sample set, the plurality of values in each training feature, and the holding position label corresponding to each value, until the convergence condition of the loss function is met, and the holding position recognition model is obtained. The loss function can be L1 loss function, cross-entropy loss function and / or other types of loss function, etc.

[0129] In one example embodiment, after obtaining the holding position recognition model, in step S100 of the above embodiment, the holding position when the user holds the terminal is obtained, including:

[0130] Step S110, when the user holds the terminal, a detection data set collected by the motion sensor in a unit time period is obtained, the detection data set including a plurality of detection arrays, each detection array including a plurality of detection data arranged in time sequence;

[0131] Step S120, extracting the time domain feature and the frequency domain feature of each detection array, and taking a plurality of features in the plurality of features and the corresponding values in the training sample set as a detection sample set;

[0132] Step S130, inputting the detection sample set into the holding position recognition model to obtain the holding position when the user holds the terminal.

[0133] In step S110, when the user holds the terminal, the control unit collects data from the motion sensor such as an accelerometer, a gyroscope, a vibration sensor, etc., and takes the data collected in a unit time period, such as 1 second or 0.5 second, as a detection data set. In some examples, the motion sensor includes an accelerometer and a gyroscope, the accelerometer is used to sense the acceleration of the terminal device, and the gyroscope is used to sense the rotational angular velocity of the terminal device. Since the motion sensor has a certain sampling power, when the sampling rate of the accelerometer and the gyroscope is, for example, 50HZ, and the unit time period is, for example, 1 second, a detection data set can include detection arrays corresponding to multiple data types collected by the accelerometer and the gyroscope in 1 second, each detection array can include 50 detection data, and the 50 detection data are arranged in time sequence.

[0134] Exemplarily, in the detection data set, the data types of the detection arrays can include: AccX, AccY, AccZ, AccN, Acc_max, Acc_other, AccD_X, AccD_Y, AccD_Z, AccD_N, AccD_max, AccD_other, GyroX, GyroY, GyroZ, GyroN, Gyro_max, Gyro_other, GyroD_X, GyroD_Y, GyroD_Z, GyroD_N, GyroD_max, GyroD_other, etc. 24 data types. That is, the detection data set can include 24 different detection arrays, each detection array can include 50 detection data arranged in time sequence. It can be understood that in the multiple detection arrays, the detection data at the same position correspond to the same time. The meaning of each data type and the calculation method of the value of the detection data have been described in detail in step S101 in the above embodiment.

[0135] In step S120, since the detection array is similar to the initial array in the above embodiment, it has been explained in step S201 in the above embodiment that each initial array can include 10 time domain features and 16 frequency domain features, that is, each detection array can include 26 features, and the values of the 26 features corresponding to each detection array can be calculated. Since a detection data set includes detection arrays corresponding to 24 data types, the features corresponding to a detection data set can include 24*26=624 features, and each feature corresponds to a value.

[0136] Since several training features with high accuracy in determining grip position have been identified during the training of the grip position recognition model, and the model is trained on a training sample set based on these features, this step can be performed by selecting multiple features identical to those in the training sample set, along with their corresponding values, after calculating the values ​​for the 624 features. These selected features, along with their corresponding values, can then be used as the detection sample set for the grip position recognition model. Alternatively, the values ​​for multiple features identical to those in the training sample set can be directly calculated based on the multiple detection data corresponding to multiple detection arrays in the detection dataset, and these features and their corresponding values ​​can then be used as the detection sample set for the grip position recognition model.

[0137] In step S130, the terminal device may be pre-configured with a trained grip position recognition model. After obtaining the detection sample set, the detection sample set is input into the grip position recognition model. The grip position recognition model can use formal information to reason based on multiple features and their corresponding values ​​through reasoning control strategies, such as through search and matching. The grip position recognition model outputs the grip position recognition result, which can be a grip position label. Different grip position labels are used to indicate different grip positions when the user holds the terminal.

[0138] For example, refer to Figure 6 As shown, the grip position recognition model can include an attention module, a feature extraction module, and a classifier module connected in sequence. The attention module can include multiple densely connected layers to enhance feature reuse and gradient flow, thereby improving the performance and generalization ability of the grip position recognition model. The feature extraction module can include multiple convolutional layers and a global average pooling module. The convolutional layers are used to extract different features from the input. Through iterations of different convolutional layers, more complex features can be extracted from low-level features. The classifier module includes multiple linearly connected layers. The classifier module can make predictions based on the features output by the feature extraction module. For example, it can use inference control strategies and formal information for inference, such as through search and matching, to output grip position recognition results. The grip position recognition results can be grip position labels, with different grip position labels indicating different grip positions when the user holds the terminal.

[0139] In one exemplary embodiment, such as Figure 7 As shown, an exemplary embodiment of this disclosure provides a terminal control device configured to execute the terminal control method provided in the above embodiments of this disclosure. The terminal control device includes:

[0140] The acquisition module 100 is configured to acquire the user's grip position when holding the terminal;

[0141] The acquisition module 200 is configured to control the electromagnetic wave absorption rate sensor farthest from the holding position to collect the electromagnetic wave absorption rate of the terminal;

[0142] The determination module 300 is configured to determine the material type of the protective shell assembled on the terminal according to the electromagnetic wave absorption rate.

[0143] The adjustment module 400 is configured to adjust the preset performance of the terminal according to the material type of the protective shell.

[0144] In an example embodiment, the determination module 300 is configured to:

[0145] Obtain sensing reference data of the electromagnetic wave absorption rate sensor;

[0146] Take the difference between the electromagnetic wave absorption rate and the sensing reference data as the target sensing data corresponding to the protective shell;

[0147] Determine the material type of the protective shell based on the target sensing data.

[0148] In an example embodiment, the determination module 300 is further configured to:

[0149] Obtain configuration information, the configuration information being used to represent the correspondence between the preset material type of the protective shell and the preset sensing data range;

[0150] Based on the target sensing data and the configuration information, take the preset material type of the protective shell corresponding to the preset sensing data range including the target sensing data as the material type of the protective shell.

[0151] In an example embodiment, the determination module 300 is further configured to:

[0152] Obtain multiple initial material types of the protective shell by collecting the electromagnetic wave absorption rate multiple times, wherein, each time an initial material type is obtained, the initial material type is integrated, and other initial material types except the initial material type are decremented.

[0153] When the integral of the initial material type is greater than a first preset threshold, take the initial material type as the material type of the protective shell.

[0154] In an example embodiment, the electromagnetic wave absorption rate is the mean or median of multiple values collected by the electromagnetic wave absorption rate sensor within a preset period.

[0155] In an example embodiment, the terminal control device further comprises:

[0156] The initial sample set determination module 101 is configured to determine an initial sample set, the initial sample set including a plurality of holding position labels and corresponding initial data sets, each initial data set including a plurality of initial arrays collected by the motion sensor in a unit time period, each initial array including a plurality of initial data arranged in time sequence;

[0157] The training sample set determination module 201 is configured to preprocess the initial sample set to obtain a training sample set; the preprocessing includes: extracting time domain features and frequency domain features of each initial array in each initial data set to obtain an initial feature set corresponding to each initial array; combining the initial feature sets of the plurality of initial data sets into an intermediate feature set, the intermediate feature set including a plurality of data types corresponding to the plurality of initial arrays and a plurality of initial features corresponding to each data type; taking one initial feature corresponding to one data type as one intermediate feature, calculating information gain of each intermediate feature in the intermediate feature set and the holding position label, and taking a plurality of intermediate features with information gain greater than a second preset threshold as a plurality of training features; determining the training sample set, the training sample set including a plurality of training features, each training feature including a plurality of values, each value corresponding to one holding position label;

[0158] The holding position recognition model determination module 301 is configured to train the initial holding position recognition model based on the training sample set to obtain the holding position recognition model.

[0159] In one example embodiment, the acquisition module 100 is configured to:

[0160] When the user holds the terminal, the acquisition module 100 is configured to acquire a detection data set collected by the motion sensor in a unit time period, the detection data set including a plurality of detection arrays, each detection array including a plurality of detection data arranged in time sequence;

[0161] The extraction module 200 is configured to extract time domain features and frequency domain features of each detection array, and take a plurality of features and corresponding values in the training sample set as a detection sample set.

[0162] The holding position recognition model determination module 301 is configured to train the initial holding position recognition model based on the training sample set to obtain the holding position recognition model.

[0163] In one example embodiment, the motion sensor includes an accelerometer and a gyroscope.

[0164] As to the apparatus in the above embodiments, the specific manners in which various modules perform operations have been described in detail in the embodiments of the method, and will not be described in detail here.

[0165] As Figure 8As shown, an example embodiment of the present disclosure provides a terminal device 500, which can be a smartphone, a foldable phone, a tablet, etc. that can be held by a user and whose outer surface can be equipped with a protective case.

[0166] Referring to Figure 8 As shown, the terminal device 500 can include one or more of the following components: a processing component 502, a memory 504, a power component 506, a multimedia component 508, an audio component 510, an input / output (I / O) interface 512, a sensor component 514, and a communication component 516.

[0167] The processing component 502 usually controls overall operations of the terminal device 500, such as operations associated with displaying, making phone calls, data communications, camera operations, and recording operations. The processing component 502 can include one or more processors 520 to execute instructions to complete all or part of steps of the above methods. In addition, the processing component 502 can include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.

[0168] The memory 504 is configured to store various types of data to support operations of the terminal device 500. Examples of these data include instructions for any application or method operating on the terminal device 500, contact data, phonebook data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage terminal 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 storage, flash memory, magnetic disk or optical disk.

[0169] The power component 506 provides power to various components of the terminal device 500. The power component 506 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the terminal device 500.

[0170] The multimedia component 508 includes a screen providing an output interface between the terminal device 500 and a user. In some embodiments, the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes the touch panel, the screen can be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense a touch, a slide, and a gesture on the touch panel. The touch sensor can not only sense a boundary of a touching or a sliding action, but also detect duration and pressure related to the touching or sliding action. In some embodiments, the multimedia component 508 includes a front camera module and / or a back camera module. The front camera module and / or the back camera module can receive external multimedia data when the terminal device 500 is in an operation mode, such as a camera mode or a video mode. Each of the front camera module and the back camera module can be a fixed optical lens system or have a focal length and optical zoom ability.

[0171] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC) configured to receive external audio signals when the terminal device 500 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 504 or transmitted via the communication component 516. In some embodiments, the audio component 510 further includes a speaker for outputting audio signals.

[0172] The I / O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which can be a keypad, a click wheel, buttons, and the like. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.

[0173] The sensor component 514 includes one or more sensors to provide various state assessments for the terminal device 500. For example, the sensor component 514 can detect an open / closed state of the terminal device 500, relative positioning of components, such as a display and a keypad of the terminal device 500, a change in position of the terminal device 500 or a component of the terminal device 500, presence or absence of user contact with the terminal device 500, an orientation or acceleration / deceleration of the terminal device 500, and a temperature change of the terminal device 500. The sensor component 514 can include a proximity sensor configured to detect presence of a nearby object without any physical touch. The sensor component 514 can further include a light sensor, such as a CMOS or CCD image sensor, for use in an imaging application. In some embodiments, the sensor component 514 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0174] The communication component 516 is configured to facilitate wired or wireless communication between the terminal device 500 and other terminals. The terminal device 500 can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 6G, or a combination thereof. In an exemplary embodiment, the communication component 516 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 516 further 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.

[0175] Exemplarily, the terminal device 500 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing terminals (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic elements for executing the above-described methods.

[0176] In an exemplary embodiment, the present disclosure also provides a non-transitory computer-readable storage medium, such as the memory 504 including instructions, which can be executed by the processor 520 of the terminal device 500 to complete the above-described methods. 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, and an optical data storage terminal, etc. When the instructions in the storage medium are executed by the processor of the terminal, the terminal can execute the methods shown in the above-described embodiments.

[0177] Other embodiments of the present disclosure will be apparent to those skilled in the art with the accomplishment of the present disclosure as reflected in the specification and its practice in accordance with the following claims. The application is intended to cover any variations, uses, or adaptations of the present disclosure including its general principles and specific embodiments disclosed herein. The specification and examples are illustrative only and not restrictive of the true scope and spirit of the present disclosure.

[0178] It should be understood that the present disclosure is not limited to the precise structures as herein described and illustrated in the drawings, and that various modifications and changes can be made without departing from its scope. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A terminal control method characterized by comprising: The terminal control method comprises: acquiring a holding position of a user holding the terminal; controlling an electromagnetic wave absorption rate sensor farthest from the holding position in the terminal to collect an electromagnetic wave absorption rate; determining a material type of a protective shell assembled on the terminal according to the electromagnetic wave absorption rate; adjusting a preset performance of the terminal according to the material type of the protective shell.

2. The terminal control method according to claim 1, characterized by, The determining of the material type of the protective shell according to the electromagnetic wave absorption rate comprises: acquiring sensing reference data of the electromagnetic wave absorption rate sensor; taking a difference between the electromagnetic wave absorption rate and the sensing reference data as target sensing data corresponding to the protective shell; determining the material type of the protective shell based on the target sensing data.

3. The terminal control method according to claim 2, characterized by, The determining of the material type of the protective shell based on the target sensing data comprises: acquiring configuration information for representing a corresponding relationship between a preset material type of the protective shell and a preset sensing data range; taking a preset material type of the protective shell corresponding to a preset sensing data range including the target sensing data as the material type of the protective shell based on the target sensing data and the configuration information.

4. The terminal control method according to claim 1, characterized by, The determining of the material type of the protective shell according to the electromagnetic wave absorption rate comprises: collecting the electromagnetic wave absorption rate multiple times to obtain multiple initial material types of the protective shell, wherein, each time an initial material type is obtained, the initial material type is integrated, and other initial material types except the initial material type are decreased; when the integral of the initial material type is greater than a first preset threshold, taking the initial material type as the material type of the protective shell.

5. The terminal control method according to claim 1, characterized by, The electromagnetic wave absorption rate is a mean value or a median of multiple values collected by the electromagnetic wave absorption rate sensor within a preset period.

6. The terminal control method according to any one of claims 1 to 5, characterized by, Before the acquiring of the holding position of the user holding the terminal, the terminal control method comprises: determining an initial sample set comprising multiple holding position labels and initial data sets corresponding to the holding position labels, wherein, each initial data set comprises multiple initial arrays collected by a motion sensor within a unit period, and each initial array comprises multiple initial data arranged in time sequence. The initial sample set is preprocessed to obtain a training sample set; the preprocessing includes: extracting the time domain features and the frequency domain features of each initial array in each initial data set to obtain an initial feature set corresponding to each initial array; a plurality of initial feature sets of a plurality of initial data sets are combined into an intermediate feature set, the intermediate feature set includes a plurality of data types corresponding to a plurality of initial arrays respectively, and a plurality of initial features corresponding to each data type; an initial feature corresponding to a data type is taken as an intermediate feature, the information gain of each intermediate feature in the intermediate feature set and the holding position label is calculated, and a plurality of intermediate features with an information gain greater than a second preset threshold are taken as a plurality of training features; the training sample set is determined, the training sample set includes a plurality of training features, each training feature includes a plurality of values, and each value corresponds to a holding position label; Based on the training sample set, an initial holding position recognition model is trained to obtain a holding position recognition model.

7. The terminal control method according to claim 6, characterized by, The holding position when the user holds the terminal includes: When the user holds the terminal, a detection data set collected by the motion sensor in the unit time period is obtained, the detection data set includes a plurality of detection arrays, and each detection array includes a plurality of detection data arranged in time sequence; The time domain features and the frequency domain features of each detection array are extracted, and a plurality of features in a plurality of features and corresponding values in the training sample set are taken as a detection sample set; The detection sample set is input into the holding position recognition model to obtain the holding position when the user holds the terminal.

8. The terminal control method according to claim 6, characterized by, The motion sensor includes an accelerometer and a gyroscope.

9. A terminal control device, characterized by comprising: The terminal control device includes: An acquisition module configured to acquire a holding position when a user holds the terminal; A collection module configured to control an electromagnetic wave absorption rate sensor in the terminal farthest from the holding position to collect an electromagnetic wave absorption rate; A determination module configured to determine a material type of a protective shell assembled on the terminal according to the electromagnetic wave absorption rate; An adjustment module configured to adjust a preset performance of the terminal according to the material type of the protective shell.

10. A terminal device, comprising: It includes: A processor; A memory for storing executable instructions of the processor; The processor is configured to execute the terminal control method of any one of claims 1 to 8.

11. A non-transitory computer-readable storage medium, comprising: When the instructions in the storage medium are executed by the processor of the terminal device, the terminal device can execute the terminal control method of any one of claims 1 to 8.