Terminal control method, device, electronic device and storage medium
By acquiring and analyzing light intensity data, and using the environment recognition model to determine the type of environment the terminal is in and perform corresponding control, the problem of improper terminal control in complex light environments in the existing technology is solved, and the recognition accuracy and user experience of the terminal are improved.
Patent Information
- Application Number
- CN202111028523.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-02
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-09-02
AI Technical Summary
It is difficult for existing terminals to accurately identify the environment type in complex light environments, resulting in improper control and affecting user experience.
By obtaining the light intensity data of the current environment, use the preset environment recognition model to determine the target environment type in which the terminal is located, and perform control according to this type, including obtaining light intensity data, determining the light intensity data to be measured, training the environment recognition model and obtaining Control parameters to adjust terminal settings.
It improves the accuracy and reliability of terminal control and improves user experience, especially in environments with complex light changes.
Smart Images

Figure CN115766934B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of terminal technology, and in particular to a terminal control method, device, electronic device and storage medium. Background Art
[0002] Current terminals usually only detect the environment by collecting the brightness of the current environment through the under-screen light sensor of the mobile phone, and then adaptively adjusting the brightness of the terminal itself according to the brightness of the current environment. They usually lack the ability to recognize complex lighting environments (for example, bars, KTVs, etc.), and cannot implement corresponding control of the terminal for different environment types, which is not conducive to improving the user experience. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a terminal control method, device, electronic device and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a terminal control method is provided, the method comprising:
[0005] Get the light intensity data of the current environment;
[0006] Determining the target environment type in which the terminal is currently located through a preset environment recognition model according to the light intensity data;
[0007] The terminal is controlled according to the target environment type.
[0008] Optionally, determining the target environment type in which the terminal is currently located by using a preset environment recognition model according to the light intensity data includes:
[0009] Determining light intensity data to be measured from the light intensity data;
[0010] The light intensity data to be measured is used as an input of the preset environment recognition model to output the target environment type in which the terminal is currently located.
[0011] Optionally, determining the light intensity data to be measured from the light intensity data includes:
[0012] Obtaining a target frequency band with the largest amplitude in the light intensity data;
[0013] The data corresponding to the target frequency band in the light intensity data is used as the light intensity data to be measured.
[0014] Optionally, before acquiring the light intensity data of the current environment, the method further includes:
[0015] Obtaining a first change in the acceleration of the terminal and a second change in the angular velocity of the terminal within a preset time period;
[0016] Accordingly, the obtaining of the light intensity data of the current environment includes:
[0017] When the first change amount is greater than a first preset threshold, and / or the second change amount is greater than a second preset threshold, the light intensity data of the current environment is acquired at a preset frequency.
[0018] Optionally, the preset environment recognition model can be trained in the following way:
[0019] Acquire a plurality of first light intensity data samples, wherein the first light intensity data samples include labeled data of environment categories;
[0020] A first preset initial model is trained with the plurality of first light intensity data samples to obtain the preset environment recognition model.
[0021] Optionally, the preset environment recognition model can also be trained in the following way:
[0022] Acquire a plurality of second light intensity data samples, wherein the second light intensity data samples include labeling data of whether the samples are of the target environment type;
[0023] The second preset initial model is trained with the plurality of the second light intensity data samples to obtain the preset environment recognition model.
[0024] Optionally, controlling the terminal according to the target environment type includes:
[0025] Obtaining preset control parameters corresponding to the target environment type;
[0026] The terminal is controlled according to the preset control parameters.
[0027] According to a second aspect of an embodiment of the present disclosure, a terminal control device is provided, the device comprising:
[0028] A first acquisition module is configured to acquire light intensity data of the current environment;
[0029] A determination module, configured to determine the target environment type in which the terminal is currently located through a preset environment recognition model according to the light intensity data;
[0030] The control module is configured to control the terminal according to the target environment type.
[0031] Optionally, the determining module is configured to:
[0032] Determining light intensity data to be measured from the light intensity data;
[0033] The light intensity data to be measured is used as an input of the preset environment recognition model to output the target environment type in which the terminal is currently located.
[0034] Optionally, the determining module is configured to:
[0035] Obtaining a target frequency band with the largest amplitude in the light intensity data;
[0036] The data corresponding to the target frequency band in the light intensity data is used as the light intensity data to be measured.
[0037] Optionally, the device further comprises:
[0038] A second acquisition module is configured to acquire a first change amount of the terminal acceleration and a second change amount of the terminal angular velocity within a preset time period;
[0039] Accordingly, the first acquisition module is configured as follows:
[0040] When the first change amount is greater than a first preset threshold, and / or the second change amount is greater than a second preset threshold, the light intensity data of the current environment is acquired at a preset frequency.
[0041] Optionally, the preset environment recognition model can be trained in the following way:
[0042] Acquire a plurality of first light intensity data samples, wherein the first light intensity data samples include labeled data of environment categories;
[0043] A first preset initial model is trained with the plurality of first light intensity data samples to obtain the preset environment recognition model.
[0044] Optionally, the preset environment recognition model can also be trained in the following way:
[0045] Acquire a plurality of second light intensity data samples, wherein the second light intensity data samples include labeling data of whether the samples are of the target environment type;
[0046] The second preset initial model is trained with the plurality of the second light intensity data samples to obtain the preset environment recognition model.
[0047] Optionally, the control module is configured to:
[0048] Obtaining preset control parameters corresponding to the target environment type;
[0049] The terminal is controlled according to the preset control parameters.
[0050] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0051] a memory having a computer program stored thereon;
[0052] A processor is used to execute the computer program in the memory to implement the steps of the method described in the first aspect above.
[0053] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and when the program instructions are executed by a processor, the steps of the method described in the first aspect above are implemented.
[0054] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: by acquiring the light intensity data of the current environment; and then determining the target environment type in which the terminal is currently located through a preset environment recognition model based on the light intensity data, it is possible to effectively identify application environments with complex light changes, ensure the accuracy of identifying the target environment type, and control the terminal according to the target environment type, which can effectively improve the reliability of terminal control, thereby effectively improving the user experience.
[0055] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0057] Figure 1 is a flow chart of a terminal control method shown in an exemplary embodiment of the present disclosure;
[0058] Figure 2 is a flow chart of a terminal control method shown in another exemplary embodiment of the present disclosure;
[0059] Figure 3 is a block diagram of a terminal control device shown in an exemplary embodiment of the present disclosure;
[0060] Figure 4 is based on Figure 3 A block diagram of a terminal control device shown in the illustrated embodiment;
[0061] Figure 5 It is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0062] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0063] Before introducing the specific implementation methods of the present disclosure in detail, the application scenarios of the present disclosure are first described as follows. The present disclosure can be applied to the process of controlling the terminal according to the type of environment the terminal is currently in. The current terminal's detection of the environment is usually limited to collecting the brightness of the current environment through the under-screen light sensor of the mobile phone, and then adaptively adjusting the brightness of the terminal itself according to the brightness of the current environment. For example, a common brightness adjustment method is to reduce the screen brightness of the terminal itself when the current ambient light intensity is weak to avoid the screen brightness being too glaring, and to increase the screen brightness of the terminal itself when the current ambient light intensity is strong to avoid unclear screen content. However, the inventors found that the under-screen light sensor is easily affected by the screen refresh rate, and since the terminal may be in an environment with complex light changes (for example, a bar, KTV, etc.), the terminal is controlled only based on the brightness collected by the under-screen light sensor through a simple threshold judgment logic (for example, when the brightness of the current environment is less than a preset threshold, the brightness of the screen is reduced to a first gradient, and when the brightness of the current environment is greater than or equal to the preset threshold, the brightness of the screen is increased to a second gradient). The accuracy of environmental recognition is poor, and the reliability of terminal control is not high. In addition, the current environmental recognition method is not suitable for scenes with complex ambient light changes, and cannot identify the specific type of environment in the current complex light environment (for example, a bar, KTV, etc.), and cannot implement corresponding control of the terminal for different environment types, which is not conducive to improving user experience.
[0064] In order to solve the above technical problems, the present disclosure provides a terminal control method, device, electronic device and storage medium. The method obtains the light intensity data of the current environment; then determines the target environment type in which the terminal is currently located through a preset environment recognition model based on the light intensity data. It can effectively identify application environments with complex light changes, ensure the accuracy of identifying the target environment type, and control the terminal according to the target environment type, which can effectively improve the reliability of terminal control, thereby effectively improving the user experience.
[0065] The technical solution of the present disclosure is described in detail below in conjunction with specific embodiments.
[0066] Figure 1 is a flow chart of a terminal control method shown in an exemplary embodiment of the present disclosure; see Figure 1 , the method may include the following steps:
[0067] Step 101, obtaining light intensity data of the current environment.
[0068] Among them, the light intensity data can be collected by a light sensor arranged on the side of the terminal. Optionally, when the terminal is a mobile phone, the light sensor can be arranged on the side of the terminal. The side of the terminal can be four surfaces perpendicular to the plane where the mobile phone screen is located, and can include the top side, the lower side, the left side and the right side. Preferably, it can be arranged on the top side. Setting the light sensor on the top side of the terminal can effectively avoid the interference of the screen backlight on the collection of the light intensity data of the current environment, and can also avoid the phenomenon of the light sensor being blocked during use to the greatest extent, thereby effectively improving the reliability of the terminal in collecting light intensity data.
[0069] Step 102: Determine the target environment type where the terminal is currently located according to the light intensity data through a preset environment recognition model.
[0070] In this step, the light intensity data to be measured can be determined from the light intensity data; the light intensity data to be measured is used as the input of the preset environment recognition model to output the target environment type where the terminal is currently located.
[0071] It should be noted that the light intensity data may include data corresponding to multiple time windows. When the light intensity data to be measured is used as the input of the preset environment recognition model, the data corresponding to a time window may be used as the input of the preset environment recognition model to determine the target environment type based on the data in the time window. The preset environment recognition model may be a pre-trained neural network model or other pre-trained machine learning model. The duration corresponding to each time window may be equal or unequal, and this embodiment does not limit the size of the duration corresponding to each time window.
[0072] In addition, the implementation method of determining the light intensity data to be measured from the light intensity data may be: filtering the light intensity data through a preset filter to obtain the light intensity data to be measured in the target frequency band. Optionally, the target frequency band with the largest amplitude in the light intensity data may be first obtained; then a bandpass filter for the target frequency band may be designed, and the light intensity data may be filtered through the bandpass filter to obtain data corresponding to the target frequency band in the light intensity data, and the data corresponding to the target frequency band may be used as the light intensity data to be measured.
[0073] Step 103: Control the terminal according to the target environment type.
[0074] In this step, control parameters corresponding to various environment types may be preset, wherein the control parameters corresponding to different environment types may be the same or different. When it is determined that the current environment belongs to the target environment type, the control parameters corresponding to the target environment type are obtained, and the terminal is controlled according to the control parameters.
[0075] For example, the control parameters corresponding to the bar environment may include: the mobile phone mode is vibration mode, the screen brightness is a%, the call volume is b%, etc. When the current target environment type is a bar environment, the mobile phone mode of the control terminal is vibration mode, the screen brightness is a%, and the call volume is b%.
[0076] The above technical solution obtains the light intensity data of the current environment at a preset frequency; then determines the target environment type in which the terminal is currently located through a preset environment recognition model based on the light intensity data. It can effectively identify application environments with complex light changes, ensure the accuracy of identifying the target environment type, and control the terminal according to the target environment type, which can effectively improve the reliability of terminal control, thereby effectively improving the user experience.
[0077] Figure 2 is a flowchart of a terminal control method shown in another exemplary embodiment of the present disclosure; see Figure 2 , the method may include the following steps:
[0078] Step 201, obtaining a first change in the acceleration of the terminal and a second change in the angular velocity of the terminal within a preset time period.
[0079] The terminal includes an accelerometer, a gyroscope, and a light sensor arranged on the side. The acceleration of the terminal can be collected by the accelerometer, and the angular velocity of the terminal can be collected by the gyroscope.
[0080] It should be noted that at least two acceleration collection results and at least two angular velocity collection results can be obtained within the preset time period. The preset time period can be 2 milliseconds, 5 milliseconds, 10 milliseconds, 1 second, etc. When 3 or more acceleration (angular velocity) collection results can be obtained within the preset time period, the difference between the first acceleration (angular velocity) collected within the preset time period and the last acceleration (angular velocity) collected can be obtained, and the difference in acceleration (angular velocity) can be used as the first change (second change). Alternatively, the pending difference between two adjacent acceleration (angular velocity) collection results can be obtained, and then the average of multiple pending differences can be obtained, and the average can be used as the first change (second change).
[0081] Step 202: Determine whether the first change amount is greater than a first preset threshold.
[0082] In this step, if it is determined that the first change amount is less than or equal to the first preset threshold, step 203 is executed, and if it is determined that the first change amount is greater than the first preset threshold, step 204 is executed.
[0083] Step 203: Determine whether the second change amount is greater than a second preset threshold.
[0084] In this step, if it is determined that the second change amount is less than or equal to the second preset threshold, step 201 is executed, and if it is determined that the second change amount is greater than the second preset threshold, step 204 is executed.
[0085] Step 204, obtaining the light intensity data of the current environment at a preset frequency.
[0086] The light intensity data includes the light intensity collected in each sampling, and the preset frequency can be 25Hz, 50Hz, etc.
[0087] The above steps 201 to 204 can obtain the light intensity data of the current environment only when there is a significant change in the acceleration and / or angular velocity, so as to determine the current target environment type based on the light intensity data. If there is no significant change in the acceleration and angular velocity, the light sensor arranged on the side of the terminal will not be started, and subsequent light intensity data collection and redetermination of the target environment type based on the light intensity data will not be performed. In this way, the light intensity sensor can be started only when there is a possibility of change in the current environment, thereby effectively reducing the power consumption of the terminal and improving the user experience.
[0088] Step 205, obtaining the target frequency band with the largest amplitude in the light intensity data.
[0089] In this step, the spectrum analysis can be performed on the light intensity data to obtain the amplitude corresponding to each frequency point contained in the light intensity data, and the target frequency point corresponding to the maximum amplitude can be determined from the amplitudes corresponding to multiple frequency points, and the frequency band corresponding to the target frequency point can be used as the target frequency band, that is, the frequency band where the target frequency point is located can be used as the target frequency band, and the target frequency band is a frequency interval, and the frequency corresponding to the target frequency point belongs to the frequency interval.
[0090] For example, the sampling time can be used as the horizontal coordinate and the light intensity can be used as the vertical coordinate. The light intensity data can be represented on the coordinate axis to generate the target waveform and obtain the target waveform with the largest peak. After obtaining the target waveform, the target waveform is subjected to spectrum analysis to obtain the amplitudes at different frequency points, and the target frequency point corresponding to the maximum amplitude is determined from the amplitudes at the different frequency points, and the target frequency band is determined according to the target frequency point.
[0091] Step 206: Use the data corresponding to the target frequency band in the light intensity data as the light intensity data to be measured.
[0092] In this step, a bandpass filter may be involved according to the target frequency band in step 205, and then the light intensity data may be filtered by the bandpass filter to obtain the light intensity data to be measured.
[0093] It should be noted that when designing a bandpass filter according to the target frequency band, a related filter design method can be used. For example, the FDA tool in Matlab can be used to input the sampling frequency of the current light sensor and the target frequency band in the tool so that the FDA tool outputs the filter parameters of the filter, thereby determining the bandpass filter to be used, and the light intensity data is subjected to rate wave processing by the bandpass filter to obtain the light intensity data to be measured. For example, the FDA tool can be used to obtain a1, a2…an and b1, b2…bn in the following formula, and the specific formula is as follows:
[0094] Formula 1: w=-a1*w_1_xg2-a2*w_2_xg2-a3*w_3_xg2–…+wx;
[0095] Formula 2: acc_x_hpf2=b0*w+b1*w_1_xg2+b2*w_2_xg2+b3*w_3_xg2+…;
[0096] Formula 3:…; w_3_xg2=w_2_xg2; w_2_xg2=w_1_xg2; w_1_xg2=w;
[0097] Among them, formula 1 to formula 3 are iterative formulas involved in the bandpass filter filtering process, wx is the collected light intensity data, ai and bi are the filtering parameters in the filter, i is 1 to n, acc_x_hpf2 is the filtered light intensity data, w_3_xg2, w_2_xg2, w_1_xg2, and w are all iterative variables. For example, the first light intensity data collected is λ, and λ is substituted into formula 1, and w=λ is obtained at this time, and w=λ is substituted into formula 2 to obtain acc_x_hpf2=b0*λ, that is, the current filtering result is b0*λ, and the variables in formula 1 are updated through formula 3, and then the updated variables are substituted into formula 1, and the light intensity data collected for the second time is substituted into formula 1 as the new wx, so as to perform the next iteration until the collected light intensity data is filtered. The purpose of the filtering process here is to filter out other clutter except the light intensity data of the current environment, which helps to avoid interference of other clutter in the analysis of the light intensity data, thereby improving the accuracy of the analysis results.
[0098] Step 207: Use the light intensity data to be measured as input to the preset environment recognition model to output the target environment type where the terminal is currently located.
[0099] In one possible implementation, the preset environment recognition model can be trained in the following manner: obtaining a plurality of first light intensity data samples, the first light intensity data samples including labeled data of the environment category; training a first preset initial model with the plurality of first light intensity data samples to obtain the preset environment recognition model.
[0100] For example, the environment category corresponding to the first set of light intensity data is marked as a bar environment to form a first light intensity data sample; the environment category corresponding to the second set of light intensity data is marked as a bedroom environment to form another first light intensity data sample, that is, the multiple first light intensity data samples may include light intensity data collected in at least two different environment types, the preset environment recognition model can be used to identify different environment types, and the preset initial model can be a neural network model or other machine learning models, which is not limited in the present disclosure.
[0101] In another possible implementation, the preset environment recognition model can also be trained by: obtaining a plurality of second light intensity data samples, the second light intensity data samples including labeling data of whether they are of the target environment type; training the second preset initial model with the plurality of second light intensity data samples to obtain the preset environment recognition model. In this implementation, the preset environment recognition model can only be used to identify one environment type corresponding to the labeling data.
[0102] For example, in the case where the target environment type is a bar environment, if the third set of light intensity data is light intensity data in a bar environment, then the annotation data corresponding to the third set of light intensity data may be "yes" or "1", thereby forming a second light intensity data sample formed by the third set of light intensity data and the annotation data; if the fourth set of light intensity data is light intensity data in a non-bar environment, then the annotation data corresponding to the fourth set of light intensity data may be "no" or "0", thereby forming a second light intensity data sample formed by the fourth set of light intensity data and the annotation data.
[0103] Step 208: Obtain preset control parameters corresponding to the target environment type.
[0104] In this step, control parameters corresponding to a plurality of environment types may be preset. When it is determined that the current environment belongs to the target environment type, the control parameters corresponding to the target environment type are obtained, and the terminal is controlled according to the control parameters.
[0105] For example, when the target environment type is a bar environment, the preset control parameters may include: the mobile phone mode is vibration mode, the screen brightness is a%, the call volume is b%, etc.; when the target environment type is a bedroom environment, the preset control parameters may include: the mobile phone mode is silent mode, the screen brightness is c%, the call volume is d%, etc. The preset control parameters can be pre-set according to the specific environment type.
[0106] Step 209: Control the terminal according to the preset control parameters.
[0107] The above technical solution obtains the light intensity data of the current environment at a preset frequency; then determines the target environment type in which the terminal is currently located through a preset environment recognition model based on the light intensity data. It can effectively identify application environments with complex light changes, ensure the accuracy of identifying the target environment type, and control the terminal according to the target environment type, which can effectively improve the reliability of terminal control, thereby effectively improving the user experience.
[0108] Figure 3 is a block diagram of a terminal control device shown in an exemplary embodiment of the present disclosure; see Figure 3 , the device may include:
[0109] The first acquisition module 301 is configured to acquire light intensity data of the current environment;
[0110] A determination module 302 is configured to determine the target environment type in which the terminal is currently located through a preset environment recognition model according to the light intensity data;
[0111] The control module 303 is configured to control the terminal according to the target environment type.
[0112] The above technical scheme obtains the light intensity data of the current environment through the first acquisition module 301; determines the target environment type in which the terminal is currently located through the determination module 302 according to the light intensity data through a preset environment recognition model, can effectively identify the application environment with complex light changes, can ensure the accuracy of identifying the target environment type, and controls the terminal according to the target environment type through the control module 303, which can effectively improve the reliability of terminal control, thereby effectively improving the user experience.
[0113] Optionally, the determination module 302 is configured to:
[0114] Determine the light intensity data to be measured from the light intensity data;
[0115] The light intensity data to be measured is used as the input of the preset environment recognition model to output the target environment type where the terminal is currently located.
[0116] Optionally, the determination module 302 is configured to:
[0117] Obtaining a target frequency band with the largest amplitude in the light intensity data;
[0118] The data corresponding to the target frequency band in the light intensity data is used as the light intensity data to be measured.
[0119] Figure 4 is based on Figure 3 A block diagram of a terminal control device shown in the embodiment shown; see Figure 4 , the device may also include:
[0120] The second acquisition module 304 is configured to acquire a first change in the acceleration of the terminal and a second change in the angular velocity of the terminal within a preset time period;
[0121] The terminal includes an accelerometer, a gyroscope, and a light sensor arranged on the side. The acceleration of the terminal can be collected by the accelerometer, and the angular velocity of the terminal can be collected by the gyroscope.
[0122] Accordingly, the first acquisition module 301 is configured as follows:
[0123] When the first change amount is greater than the first preset threshold, or the second change amount is greater than the second preset threshold, the light intensity data of the current environment is acquired at a preset frequency.
[0124] Optionally, the preset environment recognition model can be trained in the following way:
[0125] Acquire a plurality of first light intensity data samples, where the first light intensity data samples include labeled data of environment categories;
[0126] The first preset initial model is trained with the plurality of first light intensity data samples to obtain the preset environment recognition model.
[0127] Optionally, the preset environment recognition model can also be trained in the following way:
[0128] Acquire a plurality of second light intensity data samples, where the second light intensity data samples include labeling data of whether they are of the target environment type;
[0129] The second preset initial model is trained with the plurality of second light intensity data samples to obtain the preset environment recognition model.
[0130] Optionally, the control module 303 is configured to:
[0131] Obtaining preset control parameters corresponding to the target environment type;
[0132] The terminal is controlled according to the preset control parameter.
[0133] The above technical solution obtains the light intensity data of the current environment at a preset frequency; then determines the target environment type in which the terminal is currently located through a preset environment recognition model based on the light intensity data. It can effectively identify application environments with complex light changes, ensure the accuracy of identifying the target environment type, and control the terminal according to the target environment type, which can effectively improve the reliability of terminal control, thereby effectively improving the user experience.
[0134] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0135] The present disclosure also provides a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the terminal control method provided by the present disclosure are implemented.
[0136] Figure 5 5 is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure. For example, the device 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0137] Reference Figure 5 , the device 500 may 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 .
[0138] The processing component 502 generally controls the overall operation of the device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the terminal control method described above. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
[0139] The memory 504 is configured to store various types of data to support operations on the device 500. Examples of such data include instructions for any application or method operating on the device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0140] Power component 506 provides power to various components of device 500. Power component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for device 500.
[0141] The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0142] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the device 500 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.
[0143] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0144] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 can detect the open / closed state of the device 500, the relative positioning of components, such as the display and keypad of the device 500, and the sensor assembly 514 can also detect the position change of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, the orientation or acceleration / deceleration of the device 500, and the temperature change of the device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0145] The communication component 516 is configured to facilitate wired or wireless communication between the device 500 and other devices. The device 500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 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 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0146] In an exemplary embodiment, the device 500 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned terminal control method.
[0147] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the instructions can be executed by the processor 520 of the device 500 to complete the terminal control method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0148] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0149] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A terminal control method, characterized in that: The method comprises: Acquire light intensity data of the current environment, where the light intensity data is collected by a light sensor disposed on the top side of the terminal; Determining the target environment type in which the terminal is currently located through a preset environment recognition model according to the light intensity data; controlling the terminal according to the target environment type; The determining the target environment type in which the terminal is currently located by using a preset environment recognition model according to the light intensity data includes: Determining light intensity data to be measured from the light intensity data, wherein the light intensity data includes data corresponding to a plurality of time windows; The light intensity data to be measured is used as an input of the preset environment recognition model to output the target environment type in which the terminal is currently located.
2. The method according to claim 1, characterized in that Determining the light intensity data to be measured from the light intensity data comprises: Obtaining a target frequency band with the largest amplitude in the light intensity data; The data corresponding to the target frequency band is used as the light intensity data to be measured.
3. The method according to claim 1, characterized in that: Before acquiring the light intensity data of the current environment, the method further includes: Acquire a first change in the acceleration of the terminal and a second change in the angular velocity of the terminal within a preset time period; Accordingly, the obtaining of the light intensity data of the current environment includes: When the first change amount is greater than a first preset threshold, and / or the second change amount is greater than a second preset threshold, the light intensity data of the current environment is acquired at a preset frequency.
4. The method according to claim 1, characterized in that: The preset environment recognition model can be trained in the following way: Acquire a plurality of first light intensity data samples, wherein the first light intensity data samples include labeled data of environment categories; A first preset initial model is trained with the plurality of first light intensity data samples to obtain the preset environment recognition model.
5. The method according to claim 1, characterized in that The preset environment recognition model can also be trained in the following way: Acquire a plurality of second light intensity data samples, wherein the second light intensity data samples include labeling data of whether the samples are of the target environment type; The second preset initial model is trained with the plurality of the second light intensity data samples to obtain the preset environment recognition model.
6. The method according to any one of claims 1 to 5, characterized in that: The controlling the terminal according to the target environment type includes: Obtaining preset control parameters corresponding to the target environment type; The terminal is controlled according to the preset control parameters.
7. A terminal control device, characterized in that: The device comprises: A first acquisition module is configured to acquire light intensity data of the current environment, wherein the light intensity data is collected by a light sensor arranged on the top side of the terminal; A determination module, configured to determine the target environment type in which the terminal is currently located through a preset environment recognition model according to the light intensity data; A control module, configured to control the terminal according to the target environment type; The determination module is configured to: Determining light intensity data to be measured from the light intensity data, wherein the light intensity data includes data corresponding to a plurality of time windows; The light intensity data to be measured is used as an input of the preset environment recognition model to output the target environment type in which the terminal is currently located.
8. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.
