CN106681592B - Display switching method and device based on electronic equipment and electronic equipment - Google Patents

Display switching method and device based on electronic equipment and electronic equipment Download PDF

Info

Publication number
CN106681592B
CN106681592B CN201611264613.1A CN201611264613A CN106681592B CN 106681592 B CN106681592 B CN 106681592B CN 201611264613 A CN201611264613 A CN 201611264613A CN 106681592 B CN106681592 B CN 106681592B
Authority
CN
China
Prior art keywords
electronic equipment
acceleration
preset
knocking
detected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611264613.1A
Other languages
Chinese (zh)
Other versions
CN106681592A (en
Inventor
刘颖红
李国盛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201611264613.1A priority Critical patent/CN106681592B/en
Publication of CN106681592A publication Critical patent/CN106681592A/en
Application granted granted Critical
Publication of CN106681592B publication Critical patent/CN106681592B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/106Enforcing content protection by specific content processing
    • G06F21/1066Hiding content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • User Interface Of Digital Computer (AREA)
  • Electrophonic Musical Instruments (AREA)

Abstract

The disclosure provides a display switching method and device based on electronic equipment and the electronic equipment, and belongs to the field of terminal equipment. The method comprises the following steps: judging whether a knocking operation which is executed on the electronic equipment and meets a preset condition is detected; when the knocking operation which is executed on the electronic equipment and meets the preset condition is detected, the display state of a target suspension graph in the current user interface of the electronic equipment is obtained; and when the display state of the target floating graph in the current user interface of the electronic equipment is visible, switching the display state of the target floating graph in the current user interface of the electronic equipment to be hidden. The design of hiding the target suspension graph when the knocking operation meeting the preset condition is detected can enable the user to hide the suspension graph only through simple knocking operation, and usability of related applications is improved.

Description

Display switching method and device based on electronic equipment and electronic equipment
Technical Field
The present disclosure relates to the field of terminal devices, and in particular, to a display switching method and apparatus based on an electronic device, and an electronic device.
Background
With the development of software technology, personalized services that terminals can provide for users are more and more colorful, and more applications begin to use floating graphics as user interfaces for personalized services. Due to the characteristics that the top layer of the floating graph is displayed and does not disappear along with the switching of the bottom layer page, and the like, the related application has very outstanding advantages in the aspects of displaying important information, providing a quick function interface and the like. However, the existence of the floating graphics inevitably occupies the display area of the user interface, which not only destroys the integrity of the screen, but also easily obscures the critical content of the underlying page. In contrast, the related art can alleviate the above-mentioned drawbacks caused by using the floating graphics to some extent by using a design in which the floating graphics can be dragged and a design in which a software interface for hiding the floating graphics is provided. However, dragging merely changes the position of the hover graphic, which still destroys the integrity of the screen and may still obscure critical content. The software interface for hiding the floating graphics usually requires the user to sequentially execute a plurality of operation steps, which is too complicated.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a display switching method and apparatus based on an electronic device, and an electronic device.
According to a first aspect of the embodiments of the present disclosure, there is provided a display switching method based on an electronic device, the method including:
judging whether a knocking operation which is executed on the electronic equipment and meets a preset condition is detected;
when the knocking operation which is executed on the electronic equipment and meets the preset condition is detected, the display state of a target suspension graph in the current user interface of the electronic equipment is obtained;
and when the display state of the target floating graph in the current user interface of the electronic equipment is visible, switching the display state of the target floating graph in the current user interface of the electronic equipment to be hidden.
According to the display switching method based on the electronic equipment, the design of hiding the target floating graph when the knocking operation meeting the preset condition is detected can enable the user to hide the floating graph only through simple knocking operation, a new user interface for hiding the floating graph is provided for the electronic equipment, and therefore usability of related applications installed on the electronic equipment can be improved.
In one possible implementation manner, the display switching method further includes:
and when the display state of the target floating graph in the current user interface of the electronic equipment is hidden, switching the display state of the target floating graph in the current user interface of the electronic equipment to be visible.
In the embodiment of the disclosure, the visible target floating graph can be hidden by the tapping operation meeting the preset condition, and the hidden target floating graph can be exhaled, so that the operation flow of the user for exhaling the target floating graph can be simplified (for example, the target floating graph is exhaled again by the simple tapping operation when the target floating graph is hidden carelessly), and the usability of the related application is further improved.
In one possible implementation manner, the determining whether a tapping operation performed on the electronic device, which meets a preset condition, is detected includes:
judging whether single-time knocking operations with the same two continuous knocking directions executed on the electronic equipment are detected within a first preset time length;
when two continuous single-time knocking operations with the same knocking direction, which are executed on the electronic equipment, are detected within a first preset time length, judging whether the time interval between the two single-time knocking operations is smaller than a second preset time length or not;
and when the time interval between the two single-tapping operations is smaller than a second preset time length, determining that the tapping operation which is executed on the electronic equipment and meets a preset condition is detected.
In the embodiment of the present disclosure, two continuous single-tap operations that meet the limiting conditions in the aspects of the first preset duration, the second preset duration, the tap direction, and the like may be determined as tap operations that meet the preset conditions, so that the occurrence of false detection may be reduced by using the limiting conditions in many aspects, and at the same time, only a user needs to perform a simple double-tap operation, thereby achieving a relatively high detection accuracy with a relatively low operation complexity.
In one possible implementation manner, the determining whether a tapping operation performed on the electronic device, which meets a preset condition, is detected includes:
judging whether the maximum angular velocity variation of the electronic equipment in a first preset time period is smaller than an angular velocity variation threshold value or not according to the angular velocity sensing signal of the electronic equipment;
when the maximum angular velocity variation of the electronic equipment in the first preset time period is smaller than an angular velocity variation threshold, it is determined that the knocking operation which is executed on the electronic equipment and meets a preset condition is not detected in the first preset time period.
In the embodiment of the disclosure, a part of the situation that may cause false detection (for example, the electronic device is rotating and falling on the ground, or the electronic device is rotating and touching a user or other objects in the process of being thrown by the user) can be excluded in terms of the change of the angular velocity, thereby helping to reduce the false detection rate of the knocking operation and improving the accuracy of detecting the knocking operation.
In one possible implementation manner, the determining whether a tapping operation performed on the electronic device, which meets a preset condition, is detected includes:
and judging whether the acceleration change of the electronic equipment conforms to a preset acceleration change characteristic or not according to the acceleration sensing signal of the electronic equipment.
In the embodiment of the disclosure, the acceleration sensing signal of the electronic device is used for detecting the knocking operation, the preset acceleration change characteristic is used for screening the knocking operation meeting the preset condition, the detection of the knocking operation can be realized by using the motion sensor frequently arranged in the terminal device, and the reduction of the hardware cost is facilitated.
In one possible implementation manner, the preset acceleration variation characteristic includes a waveform numerical characteristic that an acceleration waveform of an acceleration sensing signal of the electronic device in a single direction should meet within a second preset time period, where the second preset time period is a time period between two adjacent blank time periods in the acceleration waveform; the waveform numerical characteristics include one or more of:
the absolute value of the maximum peak value of the acceleration waveform is positioned in a first preset interval with an upper bound;
the absolute value of the minimum valley value of the acceleration waveform is positioned in a second preset interval with an upper bound;
the time interval between the maximum peak point of the acceleration waveform and the starting point of the second preset time period is positioned in a third preset interval with an upper bound;
the time interval between the maximum peak point and the minimum valley point of the acceleration waveform is within a fourth preset interval having an upper bound.
In the embodiment of the disclosure, the relatively lower false detection rate and the relatively lower missed detection rate of the single knocking operation can be achieved through relatively fewer judgment times, and the accuracy of detecting the knocking operation is improved.
In one possible implementation manner, the preset acceleration change characteristic comprises an acceleration waveform characteristic to which an acceleration sensing signal is to conform when a knocking operation is performed on the electronic device; the acceleration waveform characteristics include:
the maximum amplitude of the acceleration waveform in the first direction when the electronic equipment is subjected to knocking operation is within a fifth preset interval with a lower boundary;
the maximum amplitude of the acceleration waveform in the second direction when the electronic equipment is subjected to knocking operation is within a sixth preset interval with an upper bound;
the maximum amplitude of the acceleration waveform in the third direction when the electronic equipment is subjected to knocking operation is within a seventh preset interval with an upper bound;
wherein the first direction, the second direction and the third direction are orthogonal pairwise; and two sides of the electronic equipment in the first direction are two sides for detecting the knocking operation.
In the embodiment of the disclosure, the side of the electronic device for detecting the knocking operation is defined, and a part of situations (such as accidental dropping, impact, bump and the like of the electronic device) which may cause false detection is excluded by limiting the maximum amplitude of the acceleration waveform in other directions, so that the false detection rate of the knocking operation is reduced, and the accuracy of detecting the knocking operation is improved.
According to a second aspect of the embodiments of the present disclosure, there is provided a display switching apparatus based on an electronic device, the display switching apparatus including:
the judging module is used for judging whether the knocking operation which is executed on the electronic equipment and meets the preset condition is detected;
the electronic equipment comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring the display state of a target suspension graph in a current user interface of the electronic equipment when the knocking operation which is executed on the electronic equipment and meets a preset condition is detected;
the first switching module is configured to switch a display state of the target floating graphic in the current user interface of the electronic device to be hidden when the display state of the target floating graphic in the current user interface of the electronic device is visible.
In one possible implementation, the apparatus further includes:
and the second switching unit is used for switching the display state of the target floating graph in the current user interface of the electronic equipment to be visible when the display state of the target floating graph in the current user interface of the electronic equipment is hidden.
In one possible implementation manner, the determining module includes:
the first judging unit is used for judging whether single-time knocking operations with the same two continuous knocking directions, which are executed on the electronic equipment, are detected within a first preset time length;
the second judging unit is used for judging whether the time interval between two continuous single-time knocking operations is smaller than a second preset time length or not when the two continuous single-time knocking operations with the same knocking direction executed on the electronic equipment are detected in the first preset time length;
the first determination unit is used for determining that the knocking operation which is executed on the electronic equipment and meets the preset condition is detected when the time interval between the two single-knocking operations is smaller than a second preset time length.
In one possible implementation manner, the determining module includes:
the third judging unit is used for judging whether the maximum angular velocity variation of the electronic equipment in a first preset time period is smaller than an angular velocity variation threshold value or not according to the angular velocity sensing signal of the electronic equipment;
and the second determining unit is used for determining that the knocking operation which is executed on the electronic equipment and meets the preset condition is not detected in the first preset time period when the maximum angular speed variation of the electronic equipment in the first preset time period is smaller than an angular speed variation threshold.
In one possible implementation manner, the determining module includes:
and the third judging unit is used for judging whether the acceleration change of the electronic equipment accords with the preset acceleration change characteristic or not according to the acceleration sensing signal of the electronic equipment.
In one possible implementation manner, the preset acceleration variation characteristic includes a waveform numerical characteristic that an acceleration waveform of an acceleration sensing signal of the electronic device in a single direction should meet within a second preset time period, where the second preset time period is a time period between two adjacent blank time periods in the acceleration waveform; the waveform numerical characteristics include one or more of:
the absolute value of the maximum peak value of the acceleration waveform is positioned in a first preset interval with an upper bound;
the absolute value of the minimum valley value of the acceleration waveform is positioned in a second preset interval with an upper bound;
the time interval between the maximum peak point of the acceleration waveform and the starting point of the second preset time period is positioned in a third preset interval with an upper bound;
the time interval between the maximum peak point and the minimum valley point of the acceleration waveform is within a fourth preset interval having an upper bound.
In one possible implementation manner, the preset acceleration change characteristic comprises an acceleration waveform characteristic to which an acceleration sensing signal is to conform when a knocking operation is performed on the electronic device; the acceleration waveform characteristics include:
the maximum amplitude of the acceleration waveform in the first direction when the electronic equipment is subjected to knocking operation is within a fifth preset interval with a lower boundary;
the maximum amplitude of the acceleration waveform in the second direction when the electronic equipment is subjected to knocking operation is within a sixth preset interval with an upper bound;
the maximum amplitude of the acceleration waveform in the third direction when the electronic equipment is subjected to knocking operation is within a seventh preset interval with an upper bound;
wherein the first direction, the second direction and the third direction are orthogonal pairwise; and two sides of the electronic equipment in the first direction are two sides for detecting the knocking operation.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
judging whether a knocking operation which is executed on the electronic equipment and meets a preset condition is detected;
when the knocking operation which is executed on the electronic equipment and meets the preset condition is detected, the display state of a target suspension graph in the current user interface of the electronic equipment is obtained;
and when the display state of the target floating graph in the current user interface of the electronic equipment is visible, switching the display state of the target floating graph in the current user interface of the electronic equipment to be hidden.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the design of hiding the target suspension graph when the knocking operation meeting the preset condition is detected can enable the user to hide the suspension graph only through simple knocking operation, and usability of related applications is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
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 disclosure.
FIG. 1 is a flow diagram illustrating a method for electronic device based display switching in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method for electronic device based display switching in accordance with an exemplary embodiment;
fig. 3A and 3B are partial waveform diagrams illustrating two acceleration sensing signals in a display switching method based on an electronic device according to an exemplary embodiment;
FIG. 4 is a schematic diagram illustrating an external appearance of an electronic device according to an exemplary embodiment;
FIG. 5 is a flow chart illustrating a method for electronic device based display switching in accordance with an exemplary embodiment;
fig. 6 is a block diagram illustrating a structure of a display switching apparatus based on an electronic device according to an exemplary embodiment;
FIG. 7 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a display switching method based on an electronic device according to an exemplary embodiment, where the method is used in the electronic device, as shown in fig. 1, and includes the following steps:
in step 101, judging whether a knocking operation which is executed on the electronic equipment and meets a preset condition is detected;
in step 102, when a knocking operation which is executed on the electronic equipment and meets a preset condition is detected, acquiring a display state of a target floating graph in a current user interface of the electronic equipment;
in step 103, when the display state of the target floating graphic in the current user interface of the electronic device is visible, the display state of the target floating graphic in the current user interface of the electronic device is switched to be hidden.
It should be noted that the electronic device in this embodiment may be any device having a tap detection function and a display function, such as a smart phone, a tablet computer, a notebook computer, a Personal Digital Assistant (PDA) and the like, which are equipped with a tap detection device.
It should be further noted that the tapping operation meeting the preset condition in the embodiment refers to an action of tapping the electronic device by a user of a pre-specified type or class, wherein the preset condition is used by the electronic device to determine whether the change sensed within a period of time belongs to the manner of tapping the electronic device by the user of the pre-specified type or class. For example, the tapping operation meeting the preset condition may be pre-specified as an action of tapping the electronic device twice with a finger when the user holds the electronic device, so that the change range and the change rule of each physical quantity sensed by the electronic device under the influence of factors such as tapping position, tapping direction, tapping force, time interval of the two taps and the like are considered, effective change and ineffective change can be defined by setting the preset condition, and the tapping operation which should be effective in general can be detected by the judgment of the preset condition as much as possible, and the change which should not be determined to be effective (such as external tapping, misoperation and the like) sensed by the electronic device in general can be eliminated by the judgment of the preset condition.
It should be further noted that the target hover graphic in this embodiment may be preconfigured within a range including at least one of a hover ball, a hover button, a hover icon, a hover menu, a hover window, and a hover page. The target floating pattern refers to one or a combination of one or more floating patterns that are configured in advance. For example, the preset range of the target hover graphic may include four items, namely, a status bar hover page, a USB connection status hover page, a hover ball specifying an application name, and hover windows of all types, and a user of the electronic device may select any of the four items in a setting page provided by the electronic device, for example, two items, namely, the hover ball specifying the application name and the hover windows of all types, as objects hidden by the electronic device when a tapping operation meeting a preset condition is detected (of course, this function may not be selected to be cancelled). For another example, the preset range of the target hover graphic may include only one hover ball in the system application, and the manufacturer of the electronic device may select to configure the hover ball in the system application as the target hover graphic, so that the electronic device hides the hover ball in the system application when a tapping operation meeting a preset condition is detected, and becomes a factory configuration of the electronic device.
Compared with the related art, the embodiment is based on the design of hiding the target floating graph when the knocking operation meeting the preset condition is detected, so that the user can hide the floating graph only through simple knocking operation. Compared with the design that the floating graph can be dragged in the related technology, the method of the embodiment can more thoroughly eliminate the influence of the floating graph on the aspects of destroying the integrity of the screen, shielding key content and the like; compared with the design of a software interface for hiding the floating graph in the related art, the method of the embodiment can simplify the operation process of hiding the floating graph by a user. Therefore, the method of the embodiment can improve the usability of the application for realizing the related functions by using the suspension graph, and is beneficial to popularization and application of the application products; in addition, the method of the embodiment provides a new user interface for hiding the floating graphics for the electronic device, so that the usability of the application installed on the electronic device can be improved, and the popularization and the use of electronic device products are facilitated.
In a possible implementation manner of the embodiment of the present disclosure, the preset condition includes: the maximum angular velocity variation of the electronic device during the tapping operation should be less than the angular velocity variation threshold. The sensing of the change of the angular velocity of the electronic device can be achieved by an angular velocity sensor (e.g., a vibration type or a tuning fork type) disposed in the electronic device, and the threshold value of the change of the angular velocity used for defining the allowable degree of the change of the angular velocity and the unallowable degree of the change of the angular velocity can be obtained by experimental determination of the electronic device in advance. Based on the fact that the rotation speed of the electronic equipment in any direction should not be changed drastically in the process of knocking the electronic equipment by the user, the display switching method in the implementation mode can eliminate some situations (for example, the electronic equipment is rotated and dropped on the ground, or the electronic equipment is rotated and touched with the user or other objects in the process of being thrown and received by the user) which may cause false detection in terms of the change of the angular speed, thereby being beneficial to reducing the false detection rate of knocking operation and improving the accuracy of detecting the knocking operation.
For example, fig. 2 is a flowchart illustrating a display switching method based on an electronic device according to an exemplary embodiment, and as shown in fig. 2, the method is used in the electronic device and includes the following steps:
in step 201, an acceleration sensing signal of the electronic device is acquired.
The acceleration sensing signal may be from an acceleration sensor, the acceleration sensor may be configured in the electronic device, and any one of a piezoelectric type, a piezoresistive type, and a capacitive type acceleration sensor may be used in the implementation, which is not specifically limited in this disclosure.
In step 202, it is determined whether the acceleration variation of the electronic device conforms to a preset acceleration variation characteristic according to the acceleration sensing signal of the electronic device.
If not, the step 201 is returned to continue to acquire the acceleration sensing signal until the acceleration variation meeting the preset acceleration variation characteristic is detected. Thereby, a continuous monitoring of the acceleration change of the preset acceleration change characteristic can be formed. In other implementations of the present disclosure, the acceleration sensing signal may not be continuously acquired without returning to step 201 when it is determined that the acceleration change meeting the preset acceleration change characteristic is not detected, for example, the process is directly ended with the determination result that the tapping operation meeting the predetermined condition is not detected, which is not specifically limited by the present disclosure.
It should be noted that the preset acceleration change characteristic is a characteristic that the acceleration change of the electronic device during the knocking operation in the preset condition corresponds to, and is used for defining an allowable acceleration change and an unallowable acceleration change, and the allowable acceleration change and the unallowable acceleration change can be obtained through experimental measurement of the electronic device in advance.
The detection process may include: acquiring an acceleration sensing signal, judging whether the acceleration change in the acceleration sensing signal accords with each single feature in preset acceleration change features item by item, judging that the acceleration change does not accord with the preset acceleration change features when the acceleration change does not accord with any single feature, and judging that the acceleration change accords with the preset acceleration change features when the acceleration change accords with all the single features.
In step 203, when an acceleration change conforming to a preset acceleration change characteristic is detected, it is determined whether a maximum angular velocity change amount of the electronic device within a duration of the acceleration change is smaller than an angular velocity change amount threshold according to an angular velocity sensing signal of the electronic device.
It should be noted that the angular velocity sensing signal may be from an angular velocity sensor provided in the electronic device; the threshold of the angular velocity variation is a value that the maximum angular velocity variation of the electronic device during the tapping operation in the preset condition should be smaller than, and is used for defining an allowable degree of angular velocity variation and an unallowable degree of angular velocity variation, and can be obtained by experimental determination of the electronic device in advance. Moreover, the angular velocity sensing signal may be in a single rotational direction, or may be in more than one rotational direction; when the angular velocity sensing signal is in more than one rotation direction, the maximum angular velocity variation in each rotation direction should be smaller than the threshold value of the angular velocity variation in the corresponding rotation direction. The upper determination process may include: the method includes acquiring an angular velocity sensing signal, calculating a maximum amplitude within a duration of an acceleration change in the angular velocity sensing signal, acquiring an angular velocity change amount threshold in a memory, and comparing a magnitude between the maximum amplitude and the angular velocity change amount threshold.
In step 204, when the maximum angular velocity change amount of the electronic device within the duration of the acceleration change is not less than the angular velocity change amount threshold, it is determined that the tapping operation performed on the electronic device that meets the preset condition is not detected within the duration of the acceleration change (i.e., it is determined that the acceleration change that meets the preset acceleration change characteristic is not the tapping operation that meets the preset condition).
Thus, "the maximum angular velocity change amount of the electronic apparatus for the duration of the acceleration change is not less than the angular velocity change amount threshold" is a negative determination condition included in the above-described preset condition, that is, once the condition is satisfied, it is impossible to detect a tapping operation satisfying the preset condition within a corresponding time. That is, when the maximum angular velocity change amount of the electronic device within the first preset period is smaller than the angular velocity change amount threshold, it may be determined that the tapping operation performed on the electronic device that meets the preset condition is not detected within the first preset period. In the embodiment of the present disclosure, the first preset period, that is, the duration of the acceleration change conforming to the preset acceleration change characteristic, the judgment about the angular velocity change amount threshold in the preset condition is performed after the judgment about the preset acceleration change characteristic.
In other possible implementations, the order between the determination regarding the angular velocity variation threshold and other determination processes in the preset condition may be set arbitrarily, such as being performed first in all the determination processes, or being performed last in all the determination processes. In an implementation performed first, the angular velocity change of the electronic device may be monitored at every moment, and the tapping operation may be detected only in a period in which the maximum angular velocity change amount is smaller than the angular velocity change amount threshold (i.e., the above-described first preset period). In a last-executed implementation, a period of time may be determined whether the maximum angular velocity variation is smaller than the angular velocity variation threshold for the duration of the tapping operation to be determined to meet the preset condition, and it will be determined that it meets the preset condition only if the determination result is yes. Of course, the "determination" in step 204 may not include any specific operation, and may be one or more subsequent operations triggered by the determination result, which is not specifically limited by the present disclosure.
In step 205, when the maximum angular velocity variation of the electronic device within the duration of the acceleration variation is smaller than the angular velocity variation threshold, the display state of the target floating graphic in the current user interface of the electronic device is obtained.
In other implementation manners of the present disclosure, before obtaining the display state of the target floating graphic in the current user interface of the electronic device, other determination items that may affect the determination result may be further set in the preset condition, for example, determining whether the user holds the electronic device by using at least one of the palm print detection device and the temperature detection device (if not holding the electronic device, it is determined that the tapping operation meeting the preset condition is not detected), or determining whether the screen is not in the display state by obtaining the working state of the electronic screen (if not in the display state, it is determined that the tapping operation meeting the preset condition is not detected), and the like.
As an example of an obtaining process, all the target floating graphics may be determined by reading a user configuration file in a memory, and according to an attribute of each target floating graphic, a display state identifier of each target floating graphic in a current user interface of the electronic device is returned through a corresponding query instruction, so that a display state of each target floating graphic is determined through the display state identifier in a subsequent process.
In step 206, when the display state of the target floating graphic in the current user interface is visible, the display state of the target floating graphic in the current user interface of the electronic device is switched to be hidden.
For example, more than one hiding operation (such as modifying the attribute of the graph to be transparent, modifying the attribute of a window containing the graph to be transparent or invisible, closing the window containing the graph, closing a main program of the graph, and the like) can be sequentially tried in sequence according to the influence degree on the user from low to high aiming at each visible target floating graph until the visible target floating graph is successfully hidden. In other implementations of the present disclosure, hiding the target hover graphic visible in the current user interface may also be implemented in other ways, which are not specifically limited by the present disclosure.
Compared with the step flow of the display switching method based on the electronic device shown in fig. 1, in the present embodiment, based on the design that the step 101 specifically includes the determination processes in the steps 203 and 204, a part of the situation that may cause false detection (for example, the electronic device is rotating and falling on the ground, or the electronic device is rotating and touching the user or other objects during being thrown by the user) can be excluded in terms of the change of the angular velocity, thereby helping to reduce the false detection rate of the tapping operation and improving the accuracy of the tapping operation.
In general, in any possible implementation manner of the present disclosure, the preset condition may include at least one requirement and any number of negative judgment conditions, and the change sensed by the electronic device needs to satisfy all the requirements and does not satisfy any of the negative judgment conditions, so that the change can be determined as the knocking operation satisfying the preset condition. In the process of determining whether the change sensed by the electronic device satisfies the preset condition, the determination on each necessary condition and each negative determination condition may be performed in any order (including simultaneous determination and non-sequential determination), which is not specifically limited by the present disclosure. In order to simplify the process, if any negative judgment condition is satisfied, the process of judging whether the change sensed by the electronic device satisfies the preset condition may be ended, which is not specifically limited by the present disclosure.
Fig. 3A and 3B are partial waveform diagrams illustrating two acceleration sensing signals in a display switching method based on an electronic device according to an exemplary embodiment. In fig. 3A and 3B, the abscissa is time T, the ordinate is acceleration a, the dots are acceleration value points at a certain time, and the broken line is a connection line of the acceleration value points in time sequence; for convenience, in fig. 3A showing a general state and fig. 3B showing two consecutive single-tap operations, the vertical axes showing the acceleration a are scaled by the same magnitude. As can be seen by comparing fig. 3A and 3B, the acceleration waveform in the normal state remains in a blank state with negligible fluctuation, while the acceleration waveform in the single-tap operation has waveform changes with relatively sharp oscillation. In order to determine whether the acceleration variation belongs to the knocking operation, the preset acceleration variation characteristic may include a waveform numerical characteristic that an acceleration waveform of the acceleration sensing signal of the electronic device in a single direction should conform within a second preset time period, where the second preset time period is a time period between two adjacent blank time periods in the acceleration waveform. Referring to fig. 3B, the waveform numerical characteristics of the embodiments of the present disclosure include the following four requirements:
absolute value of maximum peak of acceleration waveform (e.g., | a (P))max) |) is located within a first predetermined interval having an upper bound;
absolute value of minimum valley of acceleration waveform (e.g., | a (P)min) |) is located within a second predetermined interval having an upper bound;
maximum peak point of acceleration waveform (e.g. P)max) And the starting point of the second preset period (e.g. P)start) Time interval between (e.g. T (P)max)-T(Pstart) Within a third predetermined interval having an upper bound;
maximum peak point of acceleration waveform (e.g. P)max) And a minimum valley point (e.g., P)min) Time interval between (e.g. T (P)max)-T(Pmin) Is within a fourth predetermined interval having an upper bound.
It should be noted that the starting point and the ending point of the second preset period, for example, the starting point P shown in fig. 3BstartAnd a termination point PfinThe acceleration value points with the acceleration absolute value smaller than the threshold value belong to, and not only the acceleration value points with the value of zero. Furthermore, each of the first predetermined interval, the second predetermined interval, the third predetermined interval and the fourth predetermined interval may be selected between single-sided unbounded and double-sided bounded, and the value of the interval endpoint may be determined by experiments performed in advance, for example: the method comprises the steps of obtaining a prediction model of single-tap operation through training samples of a plurality of acceleration sensing signals and a single-tap operation judgment result in a machine learning mode, wherein the prediction model comprises a numerical value of each interval endpoint of a first preset interval, a second preset interval, a third preset interval and a fourth preset interval. There is practical data showing that compared with other common prediction models, the waveform numerical characteristics with the four requirements of the above form can reach relatively lower false detection rate and false detection rate of single-tap operation through relatively less judgment timesIn the waveform numerical characteristics of the four necessary conditions in the above form, the false detection rate of single-time tapping operation can be further reduced by adding a lower bound interval endpoint to each pair of one single-side unbounded preset intervals. In addition, it is consistent with the conventional theory that the false detection rate of a single-tap operation rises to a certain extent when one of the four requirements is removed from the waveform numerical characteristics.
In addition to or instead of the preset acceleration variation characteristic shown in the embodiments of the present disclosure, in another implementation manner of the present disclosure, the preset acceleration variation characteristic includes an acceleration waveform characteristic to which an acceleration sensing signal should conform when a tapping operation is performed on the electronic device. Referring to the electronic device shown in fig. 4 and the first direction R1, the second direction R2 and the third direction R3 relative to the electronic device, the acceleration waveform characteristics include:
the maximum amplitude of the acceleration waveform in the first direction R1 when a tapping operation is performed on the electronic device is within a fifth preset interval having a lower bound;
the maximum amplitude of the acceleration waveform in the second direction R2 when the tapping operation is performed on the electronic device is within a sixth preset interval having an upper bound;
the maximum amplitude of the acceleration waveform in the third direction R3 when the tapping operation is performed on the electronic device is within a seventh preset interval having an upper bound;
wherein the first direction R1 is preset according to both sides of the electronic device in the first direction R1 as both sides for detecting a tapping operation; the first direction R1, the second direction R2 and the third direction R3 are orthogonal to each other. The fifth preset section, the sixth preset section, and the seventh preset section are used to define the maximum amplitude allowed by the acceleration waveform in each direction, and may be obtained by experimental measurement performed in advance.
It can be seen that, the implementation manner defines the side of the electronic device for detecting the knocking operation, and eliminates a part of situations (such as accidental dropping, impact, bump and the like of the electronic device) which may cause false detection by using the limitation on the maximum amplitude of the acceleration waveform in other directions, thereby being beneficial to reducing the false detection rate of the knocking operation and improving the accuracy of detecting the knocking operation.
Fig. 5 is a flowchart illustrating a display switching method based on an electronic device according to an exemplary embodiment. Referring to fig. 5, the method is used in an electronic device, and includes the following steps:
in step 501, the electronic device determines whether a tapping operation performed on the electronic device, which meets a preset condition, is detected.
It may include, for example, the processes shown in step 201 to step 204, which are not described herein again.
In step 502, when a tapping operation which is executed on the electronic device and meets a preset condition is detected, a display state of a target floating graph in a current user interface of the electronic device is acquired.
For example, the step may specifically include: when the electronic equipment detects the knocking operation meeting the preset condition, directly determining an object contained in the target suspension graph as a suspension ball in system application by factory configuration of the electronic equipment; the electronic device judges whether the floating ball in the system application is visible in the current user interface, and the method can be realized by any one or more of searching for the display state parameter of the floating window, searching for the running state parameter of the floating window and calling a display state query function for the floating window.
In step 503, when the display state of the target floating graphic in the current user interface of the electronic device is visible, the display state of the target floating graphic in the current user interface of the electronic device is switched to be hidden.
For example, the step may specifically include: and sequentially trying more than one hiding operation (such as modifying the attribute of the graph to be transparent, modifying the attribute of a window containing the graph to be transparent or invisible, closing the window containing the graph, closing a main program of the graph and the like) aiming at each visible target floating graph from low to high influence degree on the user until the displayed object is successfully hidden. In other implementations of the present disclosure, the electronic device may also implement hiding the target hover graphic visible in the current user interface in other ways, which is not specifically limited by the present disclosure.
In step 504, when the display state of the target floating graphic in the current user interface of the electronic device is hidden, the display state of the target floating graphic in the current user interface of the electronic device is switched to be visible.
For example, the manner in which the electronic device switches the display state of the target floating graphic to be visible may specifically include: the method includes running a main program for generating the target floating graph, switching the display state of the generated target floating graph to be visible, or moving the layer where the target floating graph is located upwards, and the like, which is not specifically limited by the present disclosure. Of course, the display state of the target floating graphic in the current user interface of the electronic device is hidden (invisible) does not necessarily only result from the execution result of the step 503, but may also result from, for example, a user operation, a corresponding application not being started, or other graphic elements being overlaid on an upper layer, and the like.
It can be seen that, compared with the step flow of the display switching method based on the electronic device shown in fig. 1, the display switching method of this embodiment is based on the design including the step 504, so that the tapping operation meeting the preset condition can hide the visible target floating graphic and can also exhale the hidden target floating graphic, the operation flow of the user for exhaling the target floating graphic can be simplified (for example, the target floating graphic is exhaled again through a simple tapping operation when the target floating graphic is inadvertently hidden), the usability of the related application is further improved, and the popularization and the use of the related products are facilitated.
Fig. 6 is a block diagram illustrating a structure of a display switching apparatus based on an electronic device according to an exemplary embodiment. Referring to fig. 6, the display switching apparatus based on an electronic device in the embodiment of the present disclosure includes:
the judging module 61 is used for judging whether a knocking operation which is executed on the electronic equipment and meets a preset condition is detected;
the obtaining module 62 is configured to obtain a display state of a target floating graphic in a current user interface of the electronic device when a tapping operation that is performed on the electronic device and meets a preset condition is detected;
the first switching module 63 is configured to switch the display state of the target floating graphic in the current user interface of the electronic device to be hidden when the display state of the target floating graphic in the current user interface of the electronic device is visible.
It should be noted that the electronic device in this embodiment may be any device having a tap detection function and a display function, such as a smart phone, a tablet computer, a notebook computer, a Personal Digital Assistant (PDA) and the like, which are equipped with a tap detection device.
It should be further noted that the tapping operation meeting the preset condition in the embodiment refers to an action of tapping the electronic device by a user of a pre-specified type or class, wherein the preset condition is used by the electronic device to determine whether the change sensed within a period of time belongs to the manner of tapping the electronic device by the user of the pre-specified type or class. For example, the tapping operation meeting the preset condition may be pre-specified as an action of tapping the electronic device twice with a finger when the user holds the electronic device, so that the change range and the change rule of each physical quantity sensed by the electronic device under the influence of factors such as tapping position, tapping direction, tapping force, time interval of the two taps and the like are considered, effective change and ineffective change can be defined by setting the preset condition, and the tapping operation which should be effective in general can be detected by the judgment of the preset condition as much as possible, and the change which should not be determined to be effective (such as external tapping, misoperation and the like) sensed by the electronic device in general can be eliminated by the judgment of the preset condition.
It should be noted that the target hover graphic in this embodiment is preconfigured within a range including at least one of a hover ball, a hover button, a hover icon, a hover menu, a hover window, and a hover page. The target floating pattern refers to one or a combination of one or more floating patterns that are configured in advance. For example, the preset range of the target hover graphic may include four items, namely, a status bar hover page, a USB connection status hover page, a hover ball specifying an application name, and hover windows of all types, and a user of the electronic device may select any of the four items in a setting page provided by the electronic device, for example, two items, namely, the hover ball specifying the application name and the hover windows of all types, as objects hidden by the electronic device when a tapping operation meeting a preset condition is detected (of course, this function may not be selected to be cancelled). For another example, the preset range of the target hover graphic may include only one hover ball in the system application, and the manufacturer of the electronic device may select to configure the hover ball in the system application as the target hover graphic, so that the electronic device hides the hover ball in the system application when a tapping operation meeting a preset condition is detected, and becomes a factory configuration of the electronic device.
Compared with the related art, the embodiment is based on the design of hiding the target floating graph when the knocking operation meeting the preset condition is detected, so that the user can hide the floating graph only through simple knocking operation. Compared with the design that the floating graphics can be dragged in the related art, the device of the embodiment can more thoroughly eliminate the influence of the floating graphics on the aspects of destroying the integrity of the screen, shielding key contents and the like; compared with the design of providing the software interface for hiding the floating graphics in the related art, the device of the embodiment can simplify the operation process of hiding the floating graphics by a user. Therefore, the device of the embodiment can improve the usability of the application of realizing related functions by utilizing the suspension graph, and is beneficial to popularization and application of application products; moreover, the device of the embodiment provides a new user interface for hiding the floating graphics for the electronic device, so that the usability of the related application installed on the electronic device can be improved, and the popularization and the use of electronic device products are facilitated.
It is understood that the preset condition in the present embodiment may have the same form as any one of the preset conditions described above, and is not described herein again. In a possible implementation manner, the apparatus further includes a second switching unit, which is not shown in the drawings, and the second switching unit is configured to switch the display state of the target floating graphic in the current user interface of the electronic device to be visible when the display state of the target floating graphic in the current user interface of the electronic device is hidden. Based on this, the device of this embodiment can make the knocking operation that satisfies the preset condition both can hide the target suspended graph that visible, also can exhale the target suspended graph that is hidden, can simplify the user for the operation procedure of exhaling the target suspended graph (for example, exhale the target suspended graph again through simple knocking operation when the target suspended graph has been hidden carelessly), further promotes the ease of use of relevant application, helps the popularization and use of relevant product.
In one possible implementation, the apparatus further includes:
and the second switching unit is used for switching the display state of the target floating graph in the current user interface of the electronic equipment to be visible when the display state of the target floating graph in the current user interface of the electronic equipment is hidden.
In one possible implementation manner, the determining module includes:
the first judging unit is used for judging whether single-time knocking operations with the same two continuous knocking directions, which are executed on the electronic equipment, are detected within a first preset time length;
the second judging unit is used for judging whether the time interval between two continuous single-time knocking operations is smaller than a second preset time length or not when the two continuous single-time knocking operations with the same knocking direction executed on the electronic equipment are detected in the first preset time length;
the first determination unit is used for determining that the knocking operation which is executed on the electronic equipment and meets the preset condition is detected when the time interval between the two single-knocking operations is smaller than a second preset time length.
In one possible implementation manner, the determining module includes:
the third judging unit is used for judging whether the maximum angular velocity variation of the electronic equipment in a first preset time period is smaller than an angular velocity variation threshold value or not according to the angular velocity sensing signal of the electronic equipment;
and the second determining unit is used for determining that the knocking operation which is executed on the electronic equipment and meets the preset condition is not detected in the first preset time period when the maximum angular speed variation of the electronic equipment in the first preset time period is smaller than an angular speed variation threshold.
In one possible implementation manner, the determining module includes:
and the third judging unit is used for judging whether the acceleration change of the electronic equipment accords with the preset acceleration change characteristic or not according to the acceleration sensing signal of the electronic equipment.
In one possible implementation manner, the preset acceleration variation characteristic includes a waveform numerical characteristic that an acceleration waveform of an acceleration sensing signal of the electronic device in a single direction should meet within a second preset time period, where the second preset time period is a time period between two adjacent blank time periods in the acceleration waveform; the waveform numerical characteristics include one or more of:
the absolute value of the maximum peak value of the acceleration waveform is positioned in a first preset interval with an upper bound;
the absolute value of the minimum valley value of the acceleration waveform is positioned in a second preset interval with an upper bound;
the time interval between the maximum peak point of the acceleration waveform and the starting point of the second preset time period is positioned in a third preset interval with an upper bound;
the time interval between the maximum peak point and the minimum valley point of the acceleration waveform is within a fourth preset interval having an upper bound.
In one possible implementation manner, the preset acceleration change characteristic comprises an acceleration waveform characteristic to which an acceleration sensing signal is to conform when a knocking operation is performed on the electronic device; the acceleration waveform characteristics include:
the maximum amplitude of the acceleration waveform in the first direction when the electronic equipment is subjected to knocking operation is within a fifth preset interval with a lower boundary;
the maximum amplitude of the acceleration waveform in the second direction when the electronic equipment is subjected to knocking operation is within a sixth preset interval with an upper bound;
the maximum amplitude of the acceleration waveform in the third direction when the electronic equipment is subjected to knocking operation is within a seventh preset interval with an upper bound;
wherein the first direction, the second direction and the third direction are orthogonal pairwise; and two sides of the electronic equipment in the first direction are two sides for detecting the knocking operation.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 7 is a block diagram illustrating an electronic device in accordance with an example embodiment. For example, the electronic device 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 4, electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls overall operation of the electronic device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 702 may include one or more processors 720 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operations at the electronic device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or non-volatile memory devices 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 or optical disks.
The power supply component 706 provides power to the various components of the electronic device 700. The power components 706 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 700.
The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and a 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 an input signal from a 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 boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 700 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 704 or transmitted via the communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be 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.
The sensor assembly 714 includes one or more sensors for providing various aspects of state assessment for the electronic device 700, such as the acceleration sensors (piezo, piezoresistive, or capacitive) described above, and the angular rate sensors (e.g., gyroscope) described above. The sensor assembly 714 may detect the open/closed status of the device 700, the relative positioning of the components, such as a display and keypad of the electronic device 700, the sensor assembly 714 may also detect a change in the position of the electronic device 700 or a component of the electronic device 700, the presence or absence of user contact with the electronic device 700, orientation or acceleration/deceleration of the electronic device 700, and a change in the temperature of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include a magnetic sensor, a pressure sensor, or a temperature sensor for enabling sensing of a magnetic signal, a pressure signal, or a temperature signal.
The communication component 716 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 may 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 section 716 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 716 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 700 may 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, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 704 comprising instructions, executable by the processor 720 of the electronic device 700 to perform the display switching method described above is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements 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 (10)

1. A display switching method based on electronic equipment is characterized by comprising the following steps:
judging whether a knocking operation performed on the electronic equipment is detected;
when the knocking operation performed on the electronic equipment is detected, judging whether the acceleration change of the electronic equipment conforms to a preset acceleration change characteristic or not according to the acquired acceleration sensing signal of the electronic equipment;
when the acceleration change conforming to the preset acceleration change characteristic is detected, judging whether the maximum angular velocity change quantity of the electronic equipment in the duration time of the acceleration change of the electronic equipment is smaller than an angular velocity change quantity threshold value according to the acquired angular velocity sensing signal of the electronic equipment;
when the maximum angular velocity variation is smaller than the angular velocity variation threshold, judging whether the electronic screen is in a display state or not by acquiring the working state of the electronic screen;
when the working state of the electronic screen is in a display state, determining that the knocking operation which is executed on the electronic equipment and meets a preset condition is detected, and acquiring the display state of a target suspension graph in a current user interface of the electronic equipment;
when the display state of the target floating graph in the current user interface of the electronic equipment is visible, switching the display state of the target floating graph in the current user interface of the electronic equipment to be hidden;
the preset acceleration change characteristics comprise acceleration waveform characteristics which are met by an acceleration sensing signal when the electronic equipment is subjected to knocking operation; the acceleration waveform characteristics include:
the maximum amplitude of the acceleration waveform in the first direction when the electronic equipment is subjected to knocking operation is within a fifth preset interval with a lower boundary;
the maximum amplitude of the acceleration waveform in the second direction when the electronic equipment is subjected to knocking operation is within a sixth preset interval with an upper bound;
the maximum amplitude of the acceleration waveform in the third direction when the electronic equipment is subjected to knocking operation is within a seventh preset interval with an upper bound;
wherein the first direction, the second direction and the third direction are orthogonal pairwise; and two sides of the electronic equipment in the first direction are two sides for detecting the knocking operation.
2. The method of claim 1, further comprising:
and when the display state of the target floating graph in the current user interface of the electronic equipment is hidden, switching the display state of the target floating graph in the current user interface of the electronic equipment to be visible.
3. The method according to claim 1 or 2, wherein the determining whether the knocking operation performed on the electronic device is detected comprises:
judging whether single-time knocking operations with the same two continuous knocking directions executed on the electronic equipment are detected within a first preset time length;
when two continuous single-time knocking operations with the same knocking direction, which are executed on the electronic equipment, are detected within a first preset time length, judging whether the time interval between the two single-time knocking operations is smaller than a second preset time length or not;
and when the time interval between the two single-tapping operations is less than a second preset time length, determining that the tapping operation performed on the electronic equipment is detected.
4. The method according to claim 1, wherein the preset acceleration variation characteristic comprises a waveform numerical characteristic that an acceleration waveform of an acceleration sensing signal of the electronic device in a single direction should conform within a second preset time period, and the second preset time period is a time period between two adjacent blank time periods in the acceleration waveform; the waveform numerical characteristics include one or more of:
the absolute value of the maximum peak value of the acceleration waveform is positioned in a first preset interval with an upper bound;
the absolute value of the minimum valley value of the acceleration waveform is positioned in a second preset interval with an upper bound;
the time interval between the maximum peak point of the acceleration waveform and the starting point of the second preset time period is positioned in a third preset interval with an upper bound;
the time interval between the maximum peak point and the minimum valley point of the acceleration waveform is within a fourth preset interval having an upper bound.
5. An electronic device based display switching apparatus, the apparatus comprising:
the judging module is used for judging whether the knocking operation executed on the electronic equipment is detected;
the electronic equipment comprises an acquisition module, a processing module and a control module, wherein the acquisition module is used for judging whether the acceleration change of the electronic equipment accords with a preset acceleration change characteristic or not according to an acquired acceleration sensing signal of the electronic equipment when the knocking operation executed on the electronic equipment is detected; when the acceleration change conforming to the preset acceleration change characteristic is detected, judging whether the maximum angular velocity change quantity of the electronic equipment in the duration time of the acceleration change of the electronic equipment is smaller than an angular velocity change quantity threshold value according to the acquired angular velocity sensing signal of the electronic equipment; when the maximum angular velocity variation is smaller than the angular velocity variation threshold, determining that the knocking operation which is executed on the electronic equipment and meets a preset condition is detected, and acquiring the display state of a target suspension graph in the current user interface of the electronic equipment;
the first switching module is used for switching the display state of the target floating graph in the current user interface of the electronic equipment to be hidden when the display state of the target floating graph in the current user interface of the electronic equipment is visible;
the preset acceleration change characteristics comprise acceleration waveform characteristics which are met by an acceleration sensing signal when the electronic equipment is subjected to knocking operation; the acceleration waveform characteristics include:
the maximum amplitude of the acceleration waveform in the first direction when the electronic equipment is subjected to knocking operation is within a fifth preset interval with a lower boundary;
the maximum amplitude of the acceleration waveform in the second direction when the electronic equipment is subjected to knocking operation is within a sixth preset interval with an upper bound;
the maximum amplitude of the acceleration waveform in the third direction when the electronic equipment is subjected to knocking operation is within a seventh preset interval with an upper bound;
wherein the first direction, the second direction and the third direction are orthogonal pairwise; and two sides of the electronic equipment in the first direction are two sides for detecting the knocking operation.
6. The apparatus of claim 5, further comprising:
and the second switching unit is used for switching the display state of the target floating graph in the current user interface of the electronic equipment to be visible when the display state of the target floating graph in the current user interface of the electronic equipment is hidden.
7. The apparatus of claim 5 or 6, wherein the determining module comprises:
the first judging unit is used for judging whether single-time knocking operations with the same two continuous knocking directions, which are executed on the electronic equipment, are detected within a first preset time length;
the second judging unit is used for judging whether the time interval between two continuous single-time knocking operations is smaller than a second preset time length or not when the two continuous single-time knocking operations with the same knocking direction executed on the electronic equipment are detected in the first preset time length;
a first determination unit, configured to determine that a tapping operation performed on the electronic device is detected when a time interval between the two single tapping operations is less than a second preset time duration.
8. The apparatus according to claim 5, wherein the preset acceleration variation characteristic comprises a waveform numerical characteristic that an acceleration waveform of an acceleration sensing signal of the electronic device in a single direction should conform within a second preset time period, and the second preset time period is a time period between two adjacent blank time periods in the acceleration waveform; the waveform numerical characteristics include one or more of:
the absolute value of the maximum peak value of the acceleration waveform is positioned in a first preset interval with an upper bound;
the absolute value of the minimum valley value of the acceleration waveform is positioned in a second preset interval with an upper bound;
the time interval between the maximum peak point of the acceleration waveform and the starting point of the second preset time period is positioned in a third preset interval with an upper bound;
the time interval between the maximum peak point and the minimum valley point of the acceleration waveform is within a fourth preset interval having an upper bound.
9. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
judging whether a knocking operation performed on the electronic equipment is detected;
when the knocking operation performed on the electronic equipment is detected, judging whether the acceleration change of the electronic equipment conforms to a preset acceleration change characteristic or not according to the acquired acceleration sensing signal of the electronic equipment;
when the acceleration change conforming to the preset acceleration change characteristic is detected, judging whether the maximum angular velocity change quantity of the electronic equipment in the duration time of the acceleration change of the electronic equipment is smaller than an angular velocity change quantity threshold value according to the acquired angular velocity sensing signal of the electronic equipment;
when the maximum angular velocity variation is smaller than the angular velocity variation threshold, determining that the knocking operation which is executed on the electronic equipment and meets a preset condition is detected, and acquiring the display state of a target suspension graph in the current user interface of the electronic equipment;
when the display state of the target floating graph in the current user interface of the electronic equipment is visible, switching the display state of the target floating graph in the current user interface of the electronic equipment to be hidden;
the preset acceleration change characteristics comprise acceleration waveform characteristics which are met by an acceleration sensing signal when the electronic equipment is subjected to knocking operation; the acceleration waveform characteristics include:
the maximum amplitude of the acceleration waveform in the first direction when the electronic equipment is subjected to knocking operation is within a fifth preset interval with a lower boundary;
the maximum amplitude of the acceleration waveform in the second direction when the electronic equipment is subjected to knocking operation is within a sixth preset interval with an upper bound;
the maximum amplitude of the acceleration waveform in the third direction when the electronic equipment is subjected to knocking operation is within a seventh preset interval with an upper bound;
wherein the first direction, the second direction and the third direction are orthogonal pairwise; and two sides of the electronic equipment in the first direction are two sides for detecting the knocking operation.
10. A computer-readable storage medium having stored thereon at least one instruction which is loaded and executed by a processor to implement operations executed in the electronic device based display switching method according to any one of claims 1 to 4.
CN201611264613.1A 2016-12-30 2016-12-30 Display switching method and device based on electronic equipment and electronic equipment Active CN106681592B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611264613.1A CN106681592B (en) 2016-12-30 2016-12-30 Display switching method and device based on electronic equipment and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611264613.1A CN106681592B (en) 2016-12-30 2016-12-30 Display switching method and device based on electronic equipment and electronic equipment

Publications (2)

Publication Number Publication Date
CN106681592A CN106681592A (en) 2017-05-17
CN106681592B true CN106681592B (en) 2020-06-02

Family

ID=58850575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611264613.1A Active CN106681592B (en) 2016-12-30 2016-12-30 Display switching method and device based on electronic equipment and electronic equipment

Country Status (1)

Country Link
CN (1) CN106681592B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108628526A (en) * 2017-03-22 2018-10-09 北京小米移动软件有限公司 Display changeover method and device, electronic equipment based on electronic equipment
CN108600495A (en) * 2018-01-29 2018-09-28 北京硬壳科技有限公司 Control method of electronic device and apply its electronic equipment
CN110531910A (en) * 2018-05-24 2019-12-03 上海掌门科技有限公司 A kind of interface display method and equipment
CN109471578B (en) * 2018-10-31 2021-04-30 广州致远电子有限公司 Waveform local display method, device, equipment and storage medium
CN110109581A (en) * 2019-03-29 2019-08-09 努比亚技术有限公司 Application interface shows that content determines method, wearable device and storage medium
CN115243125A (en) * 2021-04-23 2022-10-25 华为技术有限公司 Control method and electronic equipment
WO2023005362A1 (en) * 2021-07-30 2023-02-02 深圳传音控股股份有限公司 Processing method, processing device and storage medium
CN113485783B (en) * 2021-09-07 2022-03-25 深圳传音控股股份有限公司 Processing method, processing apparatus, and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741985A (en) * 2009-12-24 2010-06-16 深圳市同洲电子股份有限公司 Call-based method for processing screen of mobile terminal and mobile terminal
CN103870114A (en) * 2014-02-18 2014-06-18 联想(北京)有限公司 Information processing method and electronic equipment
CN104166458A (en) * 2014-08-12 2014-11-26 广州华多网络科技有限公司 Method and device for controlling multimedia player

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741985A (en) * 2009-12-24 2010-06-16 深圳市同洲电子股份有限公司 Call-based method for processing screen of mobile terminal and mobile terminal
CN103870114A (en) * 2014-02-18 2014-06-18 联想(北京)有限公司 Information processing method and electronic equipment
CN104166458A (en) * 2014-08-12 2014-11-26 广州华多网络科技有限公司 Method and device for controlling multimedia player

Also Published As

Publication number Publication date
CN106681592A (en) 2017-05-17

Similar Documents

Publication Publication Date Title
CN106681592B (en) Display switching method and device based on electronic equipment and electronic equipment
US10642476B2 (en) Method and apparatus for single-hand operation on full screen
EP3232299B1 (en) Physical key component, terminal, and touch response method and device
CN108776568B (en) Webpage display method, device, terminal and storage medium
CN105955607B (en) Content sharing method and device
CN105975166B (en) Application control method and device
EP3099040B1 (en) Button operation processing method in single-hand mode, apparatus and electronic device
US11016609B2 (en) Distance-time based hit-testing for displayed target graphical elements
US10721196B2 (en) Method and device for message reading
US20160210034A1 (en) Method and apparatus for switching display mode
EP3260967A1 (en) Method and apparatus for text selection
EP3012725B1 (en) Method, device and electronic device for displaying descriptive icon information
EP3109772A1 (en) Text input method and device
CN103945051A (en) Mobile terminal and control method thereof
EP3232314A1 (en) Method and device for processing an operation
CN107168566B (en) Operation mode control method and device and terminal electronic equipment
EP3035172A1 (en) Method and device for activating operation state of mobile terminal
CN111522498A (en) Touch response method and device and storage medium
CN107168631B (en) Application program closing method and device and terminal electronic equipment
CN112764658B (en) Content display method and device and storage medium
CN106775329B (en) Method and device for triggering click event and electronic equipment
CN115543064A (en) Interface display control method, interface display control device and storage medium
CN111930296A (en) Electronic equipment control method and device and electronic equipment
CN114115768A (en) Control method and device
CN109614000B (en) Information processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant