Equipment control method and device, electronic equipment and storage medium

By disabling the rollback function when reclining mode is detected, the problem of users' electronic devices accidentally triggering history rollback in reclining scenarios is solved, thus improving the user experience.

CN120973286APending Publication Date: 2025-11-18GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511100301.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-06
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

When a user is lying down, electronic devices may accidentally trigger the history rollback function due to gravity, leading to false responses.

Method used

By detecting when an electronic device enters reclining mode, the rollback function is disabled, and tapping or long-pressing operations in preset areas will switch the current display interface of the touchscreen to the history display interface.

Benefits of technology

This prevents erroneous responses caused by user misoperation in reclining mode, thus improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973286A_ABST
    Figure CN120973286A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an equipment control method and device, electronic equipment and a storage medium. The method is applied to the electronic equipment, the electronic equipment comprises a touch screen, and the method comprises the steps that if it is detected that the electronic equipment enters a lying mode, the rollback function of the electronic equipment is closed, and when the rollback function is used for supporting a preset area of the touch screen to be clicked or pressed for a long time, the preset area of the touch screen is clicked or pressed for a long time; and switching a current display interface of the touch screen into a historical display interface. According to the method, the rollback function is closed after the electronic equipment enters the lying mode, so that the problem of error response when a user clicks or presses the preset area of the touch screen for a long time can be prevented, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of terminal technology, specifically relating to a device control method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the development of science and technology, electronic devices are becoming increasingly widespread and feature-rich, becoming an essential part of people's daily lives. When users are lying down, due to the weight of the electronic device and its vertical position, they tend to grip the upper half of the screen to prevent it from falling, resulting in a long press on the top area of ​​the screen. When browsing an application, this can accidentally trigger the history rollback function, causing a false response. Summary of the Invention

[0003] In view of the above problems, this application proposes a device control method, apparatus, electronic device, and storage medium to improve the above problems.

[0004] In a first aspect, embodiments of this application provide a device control method applied to an electronic device, the electronic device including a touch screen, the method including: if the electronic device is detected to enter a reclining mode, disabling the rollback function of the electronic device, the rollback function being used to switch the current display interface of the touch screen to a history display interface when a preset area of ​​the touch screen is clicked or long-pressed.

[0005] Secondly, this application provides a device control apparatus that operates on an electronic device, the electronic device including a touch screen, the apparatus including: a control unit, configured to disable the rollback function of the electronic device if it is detected that the electronic device has entered a reclining mode, the rollback function being configured to switch the current display interface of the touch screen to a history display interface when a preset area of ​​the touch screen is clicked or long-pressed.

[0006] Thirdly, embodiments of this application provide an electronic device, including one or more processors and a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to perform the methods described above.

[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing program code, wherein the above-described method is executed when the program code is run.

[0008] Fifthly, embodiments of this application provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the above-described method.

[0009] This application provides a device control method, apparatus, electronic device, and storage medium. If the electronic device is detected to have entered a reclining mode, the rollback function of the electronic device is disabled. The rollback function is used to switch the current display interface of the touchscreen to a history display interface when a preset area of ​​the touchscreen is clicked or long-pressed. By disabling the rollback function after the electronic device enters reclining mode, erroneous responses when the user clicks or long-presses a preset area of ​​the touchscreen can be prevented, thereby improving the user experience. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 A flowchart of a device control method according to an embodiment of this application is shown; Figure 2 A schematic diagram of a preset area of ​​a touchscreen according to an embodiment of this application is shown; Figure 3 A flowchart of a device control method according to another embodiment of this application is shown; Figure 4 A flowchart of a device control method according to another embodiment of this application is shown; Figure 5 This illustration shows a schematic diagram of the process of determining whether an electronic device enters or exits a lying mode in another embodiment of the present application; Figure 6 A schematic diagram of the process described in steps S310-S340 is shown in another embodiment of this application; Figure 7 A structural block diagram of a device control apparatus according to an embodiment of this application is shown; Figure 8 A structural block diagram of a device control apparatus according to an embodiment of this application is shown; Figure 9 This invention illustrates a structural block diagram of an electronic device for performing a device control method according to an embodiment of the present invention. Figure 10 The present application shows a storage unit for storing or carrying program code that implements the device control method according to the embodiments of the present application. Detailed Implementation

[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0013] With the development of science and technology, electronic devices are becoming increasingly widespread and feature-rich, becoming an essential part of people's daily lives. When users are lying down, due to the weight of electronic devices and their vertical orientation, they tend to grip the upper half of the screen to prevent it from falling, resulting in a long press on the top area of ​​the screen. When browsing an application, this can accidentally trigger the history rollback function, causing a false response.

[0014] Therefore, the inventors have proposed the device control method, apparatus, electronic device, and storage medium of this application. If the electronic device is detected to have entered a reclining mode, the rollback function of the electronic device is disabled. This rollback function is used to switch the current display interface of the touchscreen to a history display interface when a preset area of ​​the touchscreen is clicked or long-pressed. By disabling the rollback function after the electronic device enters reclining mode, erroneous responses when the user clicks or long-presses a preset area of ​​the touchscreen can be prevented, thereby improving the user experience.

[0015] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0016] Please see Figure 1 This application provides a device control method applied to an electronic device, the electronic device including a touch screen, the method comprising: Step S110: If the electronic device is detected to have entered a reclining mode, the rollback function of the electronic device is turned off. The rollback function is used to switch the current display interface of the touch screen to the history display interface when a preset area of ​​the touch screen is clicked or long-pressed.

[0017] In this embodiment, the lying-down mode refers to the state where the user holding the electronic device is in a lying position, detected by an accelerometer installed in the electronic device. That is, the accelerometer data collected by the accelerometer determines whether the electronic device has entered the lying-down mode. Optionally, whether the electronic device enters / exits the lying-down mode can be controlled by a preset control. Specifically, when the detected acceleration data meets a preset condition, the preset control can be used to control the electronic device to enter the lying-down mode; when the detected acceleration data does not meet the preset condition, the preset control can be used to control the electronic device to exit the lying-down mode. The preset condition is a pre-set condition indicating that the electronic device can enter the lying-down mode.

[0018] In this embodiment, the accelerometer is a triaxial accelerometer, which may include three directional axes: the X-axis, the Y-axis, and the Z-axis. When determining whether an electronic device has entered a lying mode based on acceleration data, the determination can be made based on the acceleration data along the X-axis, Y-axis, and Z-axis respectively.

[0019] The detection of an electronic device entering lying mode can refer to the electronic device just entering lying mode. "Just entering lying mode" could mean the electronic device has just switched from a non-lying mode to lying mode; or it could mean the electronic device enters lying mode immediately upon startup, etc. No specific limitation is made here.

[0020] The preset area of ​​the touchscreen is at least a portion of the touch area that can be controlled by the pre-set rollback function. For example, the preset area could be the top area of ​​the touchscreen. Figure 2 As shown, Figure 2 The area included in 101 can be a preset area in the embodiments of this application. Switching between a specified page / application can be performed within this preset area. The currently displayed interface refers to the interface / page currently displayed on the touchscreen of the electronic device, and the historical display interface refers to the interface displayed on the touchscreen of the electronic device before the current display interface is displayed. This historical display interface can be the previous display interface displayed before the current display interface, or it can be a pre-set specified interface displayed on the touchscreen before the current display interface; no specific limitation is made here.

[0021] In one manner, in response to the first instruction, the rollback function of the electronic device is disabled.

[0022] The first instruction can be an instruction to disable the rollback function of the electronic device. This first instruction can be sent by a first service, which sends the first instruction to a second service when it detects that the electronic device has entered a lying-down mode. The first service can be understood as the service used to instruct sensor detection, and the second service can be understood as the service used to instruct the rollback function processing.

[0023] Disabling the rollback function of an electronic device can mean keeping the rollback function off, or it can mean switching the rollback function from on to off; there is no specific limitation here.

[0024] Optionally, in this embodiment of the application, if the electronic device is detected to have entered a reclining mode, the bounce function of the electronic device is turned off, wherein the bounce function is used to support the elastic animation effect when the page scrolls to a preset area of ​​the touch screen.

[0025] In one manner, in response to the second instruction, the rebound function of the electronic device is turned off.

[0026] The second instruction can be an instruction to disable the rebound function of the electronic device. This second instruction can be sent by the first service; when the first service detects that the electronic device has entered a reclining mode, it sends the second instruction to the second service. The first service can be understood as a service that instructs sensor detection, and the second service can be understood as a service that instructs the handling of the rebound function.

[0027] In this context, turning off the rebound function of an electronic device can mean keeping the rebound function in a closed state, or it can mean switching the rebound function from an on state to a closed state; no specific limitation is made here.

[0028] Alternatively, if the electronic device is detected to have entered a reclining mode, the bounce-back scrolling function of the electronic device is turned off. This bounce-back scrolling function is used to support the elastic animation effect when the page scrolls to a preset area of ​​the touch screen, and to switch the current display interface of the touch screen to the history display interface when the preset area of ​​the touch screen is clicked or long-pressed.

[0029] In one manner, in response to a third instruction, the bounce-back function of the electronic device is disabled.

[0030] The third instruction can be an instruction to disable the rebound and rollback functions of the electronic device. This third instruction can be sent by the first service; when the first service detects that the electronic device has entered lie-down mode, it sends the second instruction to the second service. The first service can be understood as the service used to instruct sensor detection, and the second service can be understood as the service used to instruct the handling of the rebound and rollback functions.

[0031] In the embodiments of this application, the opening and closing of the rebound function and rollback function of the electronic device can be controlled based on a separately set control module, or it can be controlled through a general control module.

[0032] As one approach, when the activation and deactivation of the rebound and rollback functions of an electronic device can be controlled by separately configured control modules, a first control module and a second control module can be pre-configured. The first control module controls the activation and deactivation of the rebound function, and the second control module controls the activation and deactivation of the rollback function.

[0033] When the electronic device is detected to have entered a reclining mode, the first control module disables the rebound function of the electronic device; or the second control module disables the rollback function of the electronic device.

[0034] Alternatively, when the activation and deactivation of the rebound and rollback functions of an electronic device can be controlled by a central control module, the activation and deactivation of the rebound and rollback functions are consistent. That is, if enabled, both the rebound and rollback functions of the electronic device are enabled; if disabled, both the rebound and rollback functions of the electronic device are disabled. For example, when the electronic device is detected to have entered a reclining mode, the central control module disables the rebound and rollback functions of the electronic device.

[0035] Of course, the on / off state of the rebound and rollback functions of electronic devices can be different and can be combined according to actual needs. For example, the on / off state of the rollback function can be combined with the off state of the rebound function, or vice versa. No specific limitation is made here.

[0036] Optionally, the first service and the second service in the embodiments of this application can be understood as service processes.

[0037] This application provides a device control method that, upon detecting that an electronic device has entered a reclining mode, disables the device's rollback function. The rollback function is used to switch the current display interface of the touchscreen to a history display interface when a preset area of ​​the touchscreen is clicked or long-pressed. By disabling the rollback function after the electronic device enters reclining mode, the method prevents erroneous responses when the user clicks or long-presses a preset area of ​​the touchscreen, thereby improving the user experience.

[0038] Please see Figure 3 This application provides a device control method applied to an electronic device, the electronic device including a touch screen, the method comprising: Step S210: If the electronic device is detected to have exited the lying mode, the rollback function of the electronic device is activated.

[0039] In the embodiments of this application, the electronic device exiting the lying mode may refer to the electronic device exiting the lying mode, or the electronic device exiting the lying mode may refer to the electronic device being in a non-lying mode.

[0040] When determining whether an electronic device should exit lying mode, it can also be based on acceleration data collected by an accelerometer installed in the device. If the acceleration data does not meet preset conditions, the electronic device can be determined to exit lying mode.

[0041] Enabling the rollback function on an electronic device can mean keeping the rollback function enabled, or it can mean switching the rollback function from disabled to enabled.

[0042] In one manner, in response to the fourth instruction, the rollback function of the electronic device is activated.

[0043] The fourth instruction is an instruction to activate the rollback function of the electronic device. This fourth instruction can be sent by the first service; when the first service detects that the electronic device has exited lie-down mode, it sends the fourth instruction to the second service. The first service can be understood as the service that instructs sensor detection, and the second service can be understood as the service that instructs rollback function processing.

[0044] Optionally, in this embodiment of the application, if it is detected that the electronic device has exited the reclining mode, the rebound function of the electronic device is activated, wherein the rebound function is used to support the elastic animation effect when the page scrolls to a preset area of ​​the touch screen.

[0045] In one manner, in response to the fifth instruction, the rebound function of the electronic device is activated.

[0046] The fifth instruction can be an instruction to activate the rebound function of the electronic device. This fifth instruction can be sent by the first service, which sends the fifth instruction to the second service when it detects that the electronic device has exited the reclining mode. The first service can be understood as the service that instructs sensor detection, and the second service can be understood as the service that instructs the rebound function processing.

[0047] In this context, "turning on the rebound function of an electronic device" can refer to keeping the rebound function in the on state, or it can refer to switching the rebound function from the off state to the on state; no specific limitation is made here.

[0048] Alternatively, if the electronic device is detected to have exited the reclining mode, the bounce-back scrolling function of the electronic device is activated. This bounce-back scrolling function is used to support the elastic animation effect when the page scrolls to a preset area of ​​the touch screen, and to switch the current display interface of the touch screen to the history display interface when the preset area of ​​the touch screen is clicked or long-pressed.

[0049] In one manner, in response to the sixth instruction, the bounce-back function of the electronic device is activated.

[0050] The sixth instruction can be an instruction to activate the rebound and rollback functions of the electronic device. This sixth instruction can be sent by the first service; when the first service detects that the electronic device has entered a reclining mode, it sends the sixth instruction to the second service. The first service can be understood as the service used to instruct sensor detection, and the second service can be understood as the service used to instruct the processing of the rebound and rollback functions.

[0051] In the embodiments of this application, the opening and closing of the rebound function and rollback function of the electronic device can be controlled based on a separately set control module, or it can be controlled through a general control module.

[0052] As one approach, when the activation and deactivation of the rebound and rollback functions of an electronic device can be controlled by separately configured control modules, a first control module and a second control module can be pre-configured. The first control module controls the activation and deactivation of the rebound function, and the second control module controls the activation and deactivation of the rollback function.

[0053] When the electronic device is detected to have exited the lying mode, the first control module activates the rebound function of the electronic device; or the second control module activates the rollback function of the electronic device.

[0054] Alternatively, when the springback and rollback functions of an electronic device can be controlled by a central control module, their activation and deactivation are consistent. That is, if enabled, both springback and rollback functions are enabled; if disabled, both are disabled. For example, when the electronic device is detected to have exited reclining mode, the central control module enables both springback and rollback functions.

[0055] Of course, the on / off state of the rebound and rollback functions of electronic devices can be different and can be combined according to actual needs. For example, the on / off state of the rollback function can be combined with the off state of the rebound function, or vice versa. No specific limitation is made here.

[0056] Step S220: In response to a click operation applied to a preset area of ​​the touch screen, switch the current display interface of the touch screen to the history display interface.

[0057] In this embodiment, the click operation applied to a preset area of ​​the touchscreen is a pre-set operation that can trigger interface scrolling. This click operation can be a single click or multiple clicks. When the click operation is multiple clicks, it can be that multiple clicks are detected within a preset time period; no specific limitation is made here.

[0058] When the rollback function of an electronic device is enabled, if a click operation is detected on a preset area of ​​the touch screen, the device will respond to the click operation by switching the current display interface of the touch screen to the history display interface, or by switching the currently running application on the touch screen to a previously run application, without any specific limitations.

[0059] Optionally, in this embodiment, the click operation applied to the preset area of ​​the touchscreen can also be a pre-set operation that can trigger an interface bounce. Similarly, the click operation can be a single click or multiple clicks. When the click operation is a multiple click, it can be that multiple clicks are detected within a preset time period; no specific limitation is made here.

[0060] In one manner, in response to a long press operation applied to the preset area, the current display interface of the touch screen is switched to the historical display interface.

[0061] Among them, the long press operation applied to the preset area can be a pre-set operation that can trigger the interface rollback.

[0062] Specifically, when the rollback function of an electronic device is enabled, if a long press operation is detected on a preset area of ​​the touch screen, the device will respond to the long press operation by switching the current display interface of the touch screen to the history display interface, or by switching the currently running application on the touch screen to a previously run application, without any specific limitations.

[0063] In this embodiment, the preset area of ​​the touch screen may display the icon of the application to which the historical display interface belongs, and the click operation or long press operation applied to the preset area may be a click operation or long press operation applied to the icon of the application displayed in the preset area.

[0064] When a tap or long press is detected on the icon of an application displayed in a preset area, the system responds by switching the current display screen of the touchscreen to the latest display screen of that application. The latest display screen of the application can refer to the last display screen of that application shown on the touchscreen before the current display screen is displayed.

[0065] This application provides a device control method that, upon detecting that an electronic device has exited lying mode, activates the device's rollback function and then, in response to a click operation applied to a preset area of ​​the touchscreen, switches the current display interface of the touchscreen to the history display interface. By disabling the rollback function after the electronic device enters lying mode, erroneous responses when the user clicks or presses the preset area of ​​the touchscreen can be prevented. Enabling the rollback function when the electronic device exits lying mode improves the user experience.

[0066] Please see Figure 4 This application provides a device control method applied to an electronic device, the electronic device including a touch screen, the method comprising: Step S310: Obtain the acceleration data of the electronic device.

[0067] In this embodiment, the acceleration data of the electronic device can be the acceleration data collected by an acceleration sensor installed in the electronic device. This acceleration data may include acceleration data along the X-axis, Y-axis, and Z-axis.

[0068] One approach is to acquire the acceleration data of an electronic device when it is detected that the device is turned on.

[0069] Specifically, when the electronic device is detected to have just been turned on or has been turned on continuously, the acceleration data of the electronic device is acquired.

[0070] Alternatively, in response to a data acquisition command, the acceleration data of the electronic device is acquired.

[0071] The data acquisition instruction can be a command triggered when a specified operation is detected on the electronic device, or it can be a command sent by another electronic device that has established a communication connection with the electronic device; no specific limitation is made here. The specified operation can be a pre-set operation that can trigger the data acquisition instruction, such as a sliding operation on a specified control of the electronic device.

[0072] Optionally, the acquired acceleration data of the electronic device can be acceleration data collected by the accelerometer within a preset time period, or it can be acceleration data collected by the accelerometer in real time; no specific limitation is made here. The preset time period can be a pre-set time period during which the rollback or rebound function of the electronic device needs to be controlled. For example, the preset time period can be set to the duration during which the user holds the electronic device in a lying position.

[0073] Step S320: Based on the acceleration data, determine whether the electronic device has entered a lying mode.

[0074] In this embodiment of the application, after obtaining the acceleration data of the electronic device, it can be determined whether the electronic device has entered the lying mode based on the obtained acceleration data.

[0075] In one approach, if the electronic device is determined to be in a first state based on the acceleration data, the electronic device is determined to have entered a lying mode. The first state indicates that the electronic device is facing a specified direction, and the angle between the electronic device and the horizontal plane is within a preset angle range.

[0076] The specified direction is a pre-set direction, such as the ground. The orientation of the electronic device can be understood as the orientation of the surface containing the touchscreen within the electronic device; the specified orientation of the electronic device can be understood as the surface containing the touchscreen within the electronic device facing a specified direction. The preset angle range is a pre-set angle range representing the electronic device entering a reclining mode; for example, this preset angle range can be set to (30°, 90°).

[0077] The angle between the electronic device and the horizontal plane can be calculated based on the acquired acceleration data along the X-axis, Y-axis, and Z-axis.

[0078] Where the included angle between the electronic device and the horizontal plane = arctan|Y / Z|, or the included angle between the electronic device and the horizontal plane = arctan|X / Z|. The included angle between the electronic device and the horizontal plane being within a preset angle range can be expressed as: (30° < arctan|X / Z| < 90°), or (30° < arctan|Y / Z| < 90°) Similarly, whether the electronic device is facing a specified direction can be determined based on the acquired acceleration data of the Z-axis.

[0079] Specifically, if the acceleration data of the Z-axis < 0, it can be determined that the electronic device is facing the specified direction; conversely, if the acceleration data of the Z-axis > 0, it can be determined that the electronic device is not facing the specified direction.

[0080] When it is determined through the above method that the included angle between the electronic device and the horizontal plane is within the preset angle range and the electronic device is facing the specified direction, it can be determined that the electronic device enters the lying mode.

[0081] As another method, if it is determined based on the acceleration data that the electronic device is in a first state and the duration of being in the first state is greater than or equal to a first preset duration, it is determined that the electronic device enters the lying mode. The first state indicates that the electronic device is facing the specified direction and the included angle between the electronic device and the horizontal plane is within the preset angle range.

[0082] Where the first preset duration is a preset duration representing that the electronic device enters the lying mode. For example, the first preset duration can be set to 10s. Exemplarily, when it is determined that the electronic device is facing the specified direction, the included angle between the electronic device and the horizontal plane is within the preset angle range, and it lasts for 10s or more, it can be determined that the electronic device enters the lying mode.

[0083] Optionally, if it is determined based on the acceleration data that the electronic device is in a second state, it is determined that the electronic device exits the lying mode. The second state indicates that the electronic device is not facing the specified direction, or the electronic device is facing the specified direction, but the included angle between the electronic device and the horizontal plane is not within the preset angle range.

[0084] The included angle between the electronic device and the horizontal plane being within the preset angle range can be expressed as: arctan|X / Z| ≤ 30°, arctan|X / Z| ≥ 90°; or arctan|Y / Z| ≤ 30°, arctan|Y / Z| ≥ 90°.

[0085] Specifically, when it is determined that the electronic device is facing the specified direction through the above method, but the angle between the electronic device and the horizontal plane is not within the preset angle range, it can be determined that the electronic device exits the lying mode; or, when it is determined that the electronic device is not facing the specified direction through the above method, it can be determined that the electronic device exits the lying mode.

[0086] Optionally, if it is determined based on the acceleration data that the electronic device is in the second state, and the duration of being in the second state is greater than or equal to a second preset duration, it is determined that the electronic device exits the lying mode, where the second state indicates that the electronic device is not facing the specified direction, or the electronic device is facing the specified direction, but the angle between the electronic device and the horizontal plane is not within the preset angle range.

[0087] Among them, the second preset duration is a preset duration representing that the electronic device exits the lying mode. For example, the second preset duration can be set to 3s. Exemplarily, when it is determined that the electronic device is not facing the specified direction, or the electronic device is facing the specified direction, but the angle between the electronic device and the horizontal plane is not within the preset angle range, and it lasts for 3s or more, it can be determined that the electronic device exits the lying mode.

[0088] In the embodiments of the present application, the mapping relationship between the mode and the rollback and / or rebound can be shown in the following table: As a way, based on the above mapping relationship table, when the magnitude of the angle between the electronic device and the horizontal plane is determined, it is possible to determine whether the electronic device enters or exits the lying mode based on the above mapping relationship, and determine whether to open or close the top rebound and / or rollback function.

[0089] Exemplarily, the process of determining whether the electronic device enters or exits the lying mode can be as Figure 5 shown. First, listen to the acceleration data. When it is determined that the electronic device is facing downward (Z < 0) && the angle between the electronic device and the horizontal plane is within 30° - 90° (30° < arctan|X / Z| < 90° or 30° < arctan|Y / Z| < 90°) and lasts for 10s, it can be determined that the electronic device enters the lying mode; conversely, if the angle between the electronic device and the horizontal plane is at other angles and lasts for 3s, it can be determined that the electronic device exits the lying mode.

[0090] Optionally, the posture information of the electronic device can be determined based on the acquired sensor data, and then the posture information can be used to determine whether to rotate the display interface. When the posture information of the electronic device meets a preset condition, it can be determined that the display interface needs to be rotated; conversely, when the posture information of the electronic device does not meet the preset condition, it can be determined that the display interface does not need to be rotated. The preset condition can be a pre-set condition that triggers the rotation of the display interface, such as setting the relative position of the user's face and the electronic device to 90°.

[0091] The posture information of the electronic device can include various rotational data when the device rotates, especially when a user is using the device, such as when watching a movie or playing a game, and rotates the device to switch between portrait and landscape modes; or it can be due to changes in the user's posture or position relative to the device, causing relative rotation between the user and the device. Here, the position between the user and the device refers to the planar angle between the user and the device's display screen. For example, we can define the planar angle between the device's display and the user as 0 degrees when in portrait mode, and the position becomes 90 degrees when the device rotates to landscape mode; or the planar angle is 0 degrees when in landscape mode, and the position becomes 90 degrees when switching to portrait mode. No further limitations are made here; this is only for better explanation and understanding of the concept of the position between the user and the electronic device. Unless otherwise explained, the meaning of "position" in the following text is the same as here.

[0092] Additionally, in this step, when the electronic device rotates due to changes in the user's posture, position, or the position in which the user holds the electronic device, the device's own gravity sensor can be used to detect its posture information. However, this is not a limitation; other sensors on the electronic device capable of detecting motion information can also be used. When rotation is detected, the electronic device determines whether the detected posture information meets a preset trigger condition. This trigger condition is used to activate user feature detection to further determine the rotation status of the electronic device and confirm whether the display interface needs to be rotated.

[0093] Step S330: If the electronic device is detected to have entered a reclining mode, the rollback function of the electronic device is turned off. The rollback function is used to switch the current display interface of the touch screen to the history display interface when a preset area of ​​the touch screen is clicked or long-pressed.

[0094] Step S340: If it is detected that the electronic device has exited the lying mode, the rollback function of the electronic device is activated.

[0095] For example, the process described in steps S310-S340 can be as follows: Figure 6 As shown, the terminal system first periodically monitors whether it has entered lying mode. The algorithm listens to acceleration data, using Z-axis acceleration to determine whether the phone is facing up or down, and using Y / Z and X / Z to determine the angle between the phone and the horizontal plane. If the phone is facing down and the angle between the phone and the horizontal plane is between 30° and 90°, it enters lying mode after 10 seconds; if the angle between the phone and the horizontal plane is at other angles, it exits lying mode after 3 seconds.

[0096] If System Service 1 detects that it has exited the lying down mode, it sends a first instruction to System Service 2; if System Service 1 detects that it has entered the lying down mode, it sends a second instruction to System Service 2.

[0097] System Service 2 receives either a first instruction or a second instruction from System Service 1. Based on the first instruction, System Service 2 toggles the top bounce / rollback function on; based on the second instruction, System Service 2 disables the top bounce / rollback function.

[0098] When the top bounce and rollback function is enabled, system service 2 determines whether the user has long-pressed the preset area at the top. If the user has long-pressed the preset area at the top, the top bounce and rollback function is triggered. If the user has not long-pressed the preset area at the top, the system service 2 does not respond.

[0099] This application provides a device control method that first acquires acceleration data of an electronic device. Based on the acceleration data, it determines whether the electronic device has entered a lying mode. If the electronic device is detected to have entered a lying mode, the rollback function of the electronic device is disabled; if the electronic device is detected to have exited a lying mode, the rollback function is enabled. By disabling the rollback function after the electronic device enters a lying mode, the method prevents erroneous responses when the user clicks or presses a preset area on the touchscreen, thereby improving the user experience.

[0100] Please see Figure 7 This application provides a device control device 400 that operates on an electronic device, the electronic device including a touch screen, and the device 400 includes: The control unit 410 is configured to disable the rollback function of the electronic device if it is detected that the electronic device has entered a reclining mode. The rollback function is configured to switch the current display interface of the touch screen to the history display interface when a preset area of ​​the touch screen is clicked or long-pressed.

[0101] In one manner, the control unit 410 is also configured to activate the rollback function of the electronic device if it is detected that the electronic device has exited the lying mode.

[0102] Optional, such as Figure 8 As shown, the device 400 further includes: The response unit 420 is configured to respond to a click operation applied to a preset area of ​​the touchscreen and switch the current display interface of the touchscreen to a history display interface; or, respond to a long press operation applied to the preset area and switch the current display interface of the touchscreen to a history display interface.

[0103] The determining unit 430 is used to acquire the acceleration data of the electronic device; and based on the acceleration data, to determine whether the electronic device has entered a lying mode.

[0104] In one manner, the determining unit 430 is specifically used to determine that the electronic device enters a lying mode if it is determined based on the acceleration data that the electronic device is in a first state. The first state indicates that the electronic device is facing a specified direction and the angle between the electronic device and the horizontal plane is within a preset angle range.

[0105] Alternatively, the determining unit 430 is specifically used to determine that the electronic device enters a lying mode if it is determined based on the acceleration data that the electronic device is in a first state and the duration of being in the first state is greater than or equal to a first preset duration.

[0106] Optionally, the determining unit 430 is specifically used to determine that the electronic device exits the lying mode if it is determined based on the acceleration data that the electronic device is in a second state and the duration of being in the second state is greater than or equal to a second preset duration. The second state indicates that the electronic device is not facing a specified direction, or the electronic device is facing a specified direction, but the angle between the electronic device and the horizontal plane is not within a preset angle range.

[0107] It should be noted that the device embodiments in this application correspond to the aforementioned method embodiments. The specific principles in the device embodiments can be found in the content of the aforementioned method embodiments, and will not be repeated here.

[0108] The following will combine Figure 9 This application describes an electronic device.

[0109] Please see Figure 9 Based on the aforementioned device control method and apparatus, this application embodiment also provides another electronic device 800 capable of executing the aforementioned device control method. The electronic device 800 includes one or more (only one shown in the figure) processors 802, a memory 804, and a network module 806 coupled together. The memory 804 stores programs capable of executing the contents of the aforementioned embodiments, and the processor 802 can execute the programs stored in the memory 804.

[0110] The processor 802 may include one or more processing cores. The processor 802 connects to various parts within the electronic device 800 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 804, and by calling data stored in the memory 804. Optionally, the processor 802 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 802 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 802 and may be implemented separately using a communication chip.

[0111] The memory 804 may include random access memory (RAM) or read-only memory (ROM). The memory 804 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 804 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing functions (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the terminal 800 during use (such as phonebook data, audio and video data, chat log data, etc.).

[0112] The network module 806 is used to receive and transmit electromagnetic waves, realizing the mutual conversion between electromagnetic waves and electrical signals, thereby communicating with communication networks or other devices, such as electronic devices. The network module 806 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, SIM cards, memory, etc. The network module 806 can communicate with various networks such as the Internet, corporate intranets, and wireless networks, or communicate with other devices through wireless networks. The aforementioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. For example, the network module 806 can interact with base stations.

[0113] Please refer to Figure 10 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 900 stores program code that can be called by a processor to execute the methods described in the above method embodiments.

[0114] The computer-readable storage medium 900 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 900 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 900 has storage space for program code 910 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 910 may, for example, be compressed in a suitable form.

[0115] This application provides a device control method, apparatus, electronic device, and storage medium. If the electronic device is detected to have entered a lying-down mode, the rollback function of the electronic device is disabled. The rollback function is used to switch the current display interface of the touchscreen to a historical display interface when a preset area of ​​the touchscreen is clicked or long-pressed. By disabling the rollback function after the electronic device enters lying-down mode, erroneous responses when the user clicks or long-presses a preset area of ​​the touchscreen can be prevented, thereby improving the user experience.

[0116] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.

Claims

1. A device control method, characterized in that, Applied to an electronic device, the electronic device including a touchscreen, the method includes: If the electronic device is detected to have entered a reclining mode, the rollback function of the electronic device is turned off. The rollback function is used to switch the current display interface of the touch screen to the history display interface when a preset area of ​​the touch screen is clicked or long-pressed.

2. The method according to claim 1, characterized in that, The method further includes: If the electronic device is detected to have exited lying mode, the rollback function of the electronic device is activated.

3. The method according to claim 2, characterized in that, After activating the rollback function of the electronic device, the following is also included: In response to a click operation applied to a preset area of ​​the touchscreen, the current display interface of the touchscreen is switched to the history display interface; or, In response to a long press operation applied to the preset area, the current display interface of the touch screen is switched to the history display interface.

4. The method according to claim 1, characterized in that, Before disabling the rollback function of the electronic device if it is detected that the electronic device has entered a lying mode, the following steps are also included: Acquire the acceleration data of the electronic device; Based on the acceleration data, it is determined whether the electronic device has entered a lying mode.

5. The method according to claim 4, characterized in that, Determining whether the electronic device has entered a lying-down mode based on the acceleration data includes: If the electronic device is determined to be in a first state based on the acceleration data, the electronic device is determined to have entered a lying mode. The first state indicates that the electronic device is facing a specified direction and the angle between the electronic device and the horizontal plane is within a preset angle range.

6. The method according to claim 5, characterized in that, If the electronic device is determined to be in a first state based on the acceleration data, determining that the electronic device has entered a lying mode includes: If the electronic device is determined to be in a first state based on the acceleration data, and the duration of being in the first state is greater than or equal to a first preset duration, then the electronic device is determined to enter a lying mode.

7. The method according to claim 4, characterized in that, Determining whether the electronic device has entered a lying-down mode based on the acceleration data includes: If the electronic device is determined to be in a second state based on the acceleration data, and the duration of being in the second state is greater than or equal to a second preset duration, the electronic device is determined to exit the lying mode. The second state indicates that the electronic device is not facing the specified direction, or the electronic device is facing the specified direction, but the angle between the electronic device and the horizontal plane is not within the preset angle range.

8. A device control apparatus, characterized in that, Operating in an electronic device, the electronic device including a touchscreen, the device includes: The control unit is configured to disable the rollback function of the electronic device if it is detected that the electronic device has entered a reclining mode. The rollback function is configured to switch the current display interface of the touch screen to the history display interface when a preset area of ​​the touch screen is clicked or long-pressed.

9. An electronic device, characterized in that, Includes a memory; one or more processors; one or more programs stored in the memory and configured to be executed by the one or more processors according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code, wherein the program code, when executed by a processor, performs the method according to any one of claims 1-7.