A state switching method, device, equipment and storage medium

The state switching method on touch screen devices uses touch operation detection to efficiently transition between writing and erasing states, enhancing user experience by eliminating the need for manual icon clicks and reducing wrist fatigue.

CN114647359BActive Publication Date: 2024-12-17CHENGDU READING & WRITING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210189622.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-28
Publication Date
2024-12-17
Estimated Expiration
2042-02-28

AI Technical Summary

Technical Problem

The existing method of switching touch screen devices from a writing state to an erasing state by clicking interface icons is inefficient and provides a poor user experience.

Method used

A state switching method that detects touch operations on a touch screen, including contact time, area, and movement, to automatically switch the device to an erasing state based on preset conditions, allowing for efficient state transitions using a single-point touch operation.

Benefits of technology

Enables simple and efficient state switching with improved user experience by allowing users to switch from writing to erasing states through intuitive touch interactions, reducing the need for manual icon clicks and minimizing wrist fatigue.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114647359B_ABST
    Figure CN114647359B_ABST
Patent Text Reader

Abstract

The present application provides a state switching method, device, equipment and storage medium, wherein the state switching method includes: after the electronic device enters the writing state, detecting the touch operation of the first operation object on the touch screen; if the touch operation information corresponding to the touch operation meets the preset conditions, then controlling the electronic device to switch to the erasing state, wherein the touch operation information includes: the contact time between the first operation object and the touch screen, the contact area between the first operation object and the touch screen, and the movement of the first operation object on the touch screen. The state switching method provided by the present application can realize state switching through simple touch operations, the switching method is simple and efficient, and the user experience is good.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of touch screen devices, and in particular to a state switching method, device, equipment and storage medium. Background Art

[0002] A touch screen device with a writing function (such as an ink screen device) generally has a writing state and an erasing state. In the writing state, the user can use a writing device (such as a stylus matched with the touch screen device) to write in the writing area of ​​the device screen, and in the erasing state, the user can erase the written content.

[0003] It is understandable that the user may need to make modifications during the writing process, that is, the user needs to erase the written content, which means that the touch screen device needs to switch from the writing state to the erasing state.

[0004] Currently, the way to switch the touch screen device from the writing state to the erasing state is mostly based on the switching method of the interface icon, that is, switching the state by clicking the interface icon. However, switching the state by clicking the cross-section icon is not efficient and the user experience is not good. Summary of the invention

[0005] In view of this, the present application provides a state switching method, apparatus, device and storage medium to solve the problem that the existing method of switching states by clicking interface icons is inefficient and has a poor user experience. The technical solution is as follows:

[0006] A state switching method is applied to an electronic device with a touch screen, wherein the electronic device has a writing state and an erasing state, and the method comprises:

[0007] After the electronic device enters the writing state, detecting a touch operation of the first operation object on the touch screen;

[0008] If the touch operation information corresponding to the touch operation meets a preset condition, controlling the electronic device to switch to the erasing state;

[0009] The touch operation information includes: the contact time between the first operation object and the touch screen, the contact area between the first operation object and the touch screen, and the movement of the first operation object on the touch screen.

[0010] Optionally, the state switching method further includes:

[0011] After controlling the electronic device to switch to the erasing state, drawing and displaying the erasable area;

[0012] Based on the operation of the first operation object in the erasable area, the written content in the erasable area is erased.

[0013] Optionally, the preset conditions include:

[0014] The contact time between the first operation object and the touch screen is greater than a preset first time threshold;

[0015] The contact area between the first operation object and the touch screen is greater than a preset area threshold;

[0016] The displacement of the first operation object on the touch screen is less than a preset first displacement threshold.

[0017] Optionally, drawing and displaying the erasable area includes:

[0018] Based on the contact point between the first operation object and the touch screen and a preset graphic size, an erasable area of ​​a set shape is drawn and displayed.

[0019] Optionally, erasing the written content in the erasable area based on the operation of the first operation object on the erasable area includes:

[0020] Detecting whether the displacement of the first operation object is greater than a preset second displacement threshold;

[0021] If the displacement of the first operating object is greater than the preset second displacement threshold, in response to the operation of the first operating object in the erasable area, the written content operated by the first operating object in the erasable area is erased.

[0022] Optionally, the state switching method further includes:

[0023] After the electronic device is switched to the erasing state, if it is detected that the first operation object is lifted, or it is detected that the first operation object slides out of the writing area on the touch screen, the electronic device is controlled to switch to the erasing protection state;

[0024] Within the preset erasing state protection time, if it is detected that the first operation object contacts the erasable area, the electronic device is controlled to switch to the erasing state.

[0025] Optionally, the state switching method further includes:

[0026] If it is detected that the electronic device is in the erasure protection state for a period exceeding the preset erasure state protection time, or if it is detected that the second operation object contacts the writing area of ​​the touch screen, the electronic device is controlled to switch to the writing state.

[0027] A state switching device is applied to an electronic device with a touch screen, the electronic device has a writing state and an erasing state, the device comprises: a detection module and a first control module;

[0028] The detection module is used to detect a touch operation of the first operation object on the touch screen;

[0029] The first control module is used to control the electronic device to switch to the erasing state when the touch operation information corresponding to the touch operation meets a preset condition;

[0030] The touch operation information includes: the contact time between the first operation object and the touch screen, the contact area between the first operation object and the touch screen, and the movement of the first operation object on the touch screen.

[0031] Optionally, the state switching device further includes: an erasable area drawing and display module and a written content erasing module;

[0032] The erasable area drawing and display module is used to draw and display the erasable area after the first control module controls the electronic device to switch to the erasing state;

[0033] The written content erasing module is used to erase the written content in the erasable area based on the operation of the first operating object in the erasable area.

[0034] Optionally, the state switching device further includes: a second control module and a third control module;

[0035] The second control module is configured to control the electronic device to switch to the erasing protection state after the first control module controls the electronic device to switch to the erasing state, if it is detected that the first operation object is lifted, or it is detected that the first operation object slides out of the writing area on the touch screen;

[0036] The third control module is used to control the electronic device to switch to the erasing state if it is detected that the first operating object contacts the erasable area within a preset erasing state protection time.

[0037] An electronic device comprising: a memory and a processor;

[0038] The memory is used to store programs;

[0039] The processor is used to execute the program to implement each step of the state switching method described in any one of the above items.

[0040] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, each step of any of the above-mentioned state switching methods is implemented.

[0041] The state switching method, device, equipment and storage medium provided by the present application can detect the touch operation of the first operation object on the touch screen after the electronic device enters the writing state, and when the touch operation information corresponding to the touch operation meets the preset conditions, the electronic device can be controlled to switch to the erasing state. The state switching method provided by the present application can realize the switching of the electronic device state based on the simple touch operation of the first operation object, the switching method is simple and efficient, and the user experience is good. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0043] Figure 1 A schematic diagram of a flow chart of a state switching method provided in an embodiment of the present application;

[0044] Figure 2 A flowchart of another state switching method provided in an embodiment of the present application;

[0045] Figure 3 A flowchart of another state switching method provided in an embodiment of the present application;

[0046] Figure 4 A schematic diagram of the structure of a state switching device provided in an embodiment of the present application;

[0047] Figure 5 A schematic diagram of the structure of a state switching device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] Currently, the method of switching a touch screen device from a writing state to an erasing state is mostly based on an interface icon switching method, that is, when the state needs to be switched, first click on the state switching interface, and then click on the switch button in the state switching interface. It can be seen that the switching process is relatively cumbersome and the switching efficiency is not high.

[0050] In order to achieve rapid switching of device states, the applicant conducted research and, through continuous research, finally proposed a state switching method with simple operation and high switching efficiency. The state switching method can be applied to electronic devices with a touch screen and a writing state and an erasing state. Exemplarily, the electronic device can be a mobile phone, PAD, tablet computer, handheld computer, etc.

[0051] It should be noted that those skilled in the art should understand that the electronic devices listed above are only examples, and other existing or future electronic devices that are applicable to the present application should also be included in the protection scope of the present application and are included here by reference.

[0052] Next, the state switching method provided by the present application is introduced through the following embodiments.

[0053] First embodiment

[0054] This embodiment provides a state switching method, which is applied to an electronic device with a touch screen. The electronic device has a writing state and an erasing state. Figure 1 , which shows a schematic flow chart of the state switching method provided in this embodiment, and may include:

[0055] Step S101: After the electronic device enters a writing state, a touch operation of a first operation object on the touch screen is detected.

[0056] The electronic device enters the writing state, and the touch screen of the electronic device displays an interface with a writing area, and the user can use the second operation object to write in the writing area of ​​the touch screen. The second operation object is an object that can be written in the writing area of ​​the touch screen, such as a stylus (such as an electromagnetic pen, a capacitive pen, etc.).

[0057] The present application detects a touch operation of the first operation object on the touch screen after the electronic device enters a writing state. Optionally, the touch operation of the first operation object on the touch screen may be but is not limited to a touch operation of the first operation object on the writing area of ​​the touch screen.

[0058] Optionally, the first operation object may be but is not limited to a finger of a user, and the touch operation of the first operation object on the touch screen may be a single-point touch operation of the user's finger on the touch screen.

[0059] Step S102: If the touch operation information corresponding to the touch operation of the first operation object on the touch screen meets a preset condition, the electronic device is controlled to switch to an erasing state.

[0060] The touch operation information corresponding to the touch operation of the first operation object on the touch screen may include but is not limited to: the contact time between the first operation object and the touch screen, the contact area between the first operation object and the touch screen, and the movement of the first operation object on the touch screen.

[0061] Exemplarily, the first operation object is the user's finger, then the contact time between the first operation object and the touch screen is the contact time between the user's finger and the writing area of ​​the touch screen, the contact area between the first operation object and the touch screen is the contact area between the user's finger and the writing area of ​​the touch screen, and the movement of the first operation object on the touch screen can be the displacement of the user's finger in the writing area of ​​the touch screen.

[0062] After detecting the touch operation of the first operation object on the touch screen, this embodiment determines whether the touch operation information corresponding to the touch operation of the first operation object on the touch screen meets the preset conditions. Specifically, it determines whether the contact time between the first operation object and the touch screen is greater than the preset first time threshold, whether the contact area between the first operation object and the touch screen is greater than the preset area threshold, and whether the displacement of the first operation object on the touch screen is less than the preset first displacement threshold. If the contact time between the first operation object and the touch screen is greater than the preset first time threshold, and the contact area between the first operation object and the touch screen is greater than the preset area threshold, and the displacement of the first operation object on the touch screen is less than the preset first displacement threshold, it can be considered that the user intends to erase the written content, and the electronic device needs to be switched from the writing state to the erasing state. In view of this, the electronic device is controlled to switch to the erasing state. It should be noted that the displacement of the first operation object on the touch screen can be the displacement within a preset time period from the first operation object contacting the touch screen. If the displacement of the first operation object on the touch screen is less than the preset first displacement threshold, it indicates that the first operation object has not moved or has only moved slightly.

[0063] It can be seen that if the first operation object is a user's finger, the user only needs to perform a single-point touch operation on the touch screen with his finger to switch the electronic device from the handwriting state to the erasing state.

[0064] In this embodiment, the touch operation can be detected by the screen sensor of the electronic device. When the first operation object, such as the user's finger, touches the touch screen, the touch signal can be received by the screen sensor of the electronic device. Receiving the touch signal indicates that the touch operation is detected. After receiving the touch signal, the touch time and touch position of the first operation object on the touch screen can be obtained through the driver. It should be noted that from the time the first operation object touches the touch screen, the touch time and touch position of the first operation object will be continuously obtained until the first operation object leaves the touch screen (that is, the first operation object no longer touches the touch screen). For example, the touch coordinates at time t1 and time t1, the touch coordinates at time t2 and time t2, the touch coordinates at time t3 and time t3, etc. are obtained. The contact time of the first operation object and the touch screen (the contact time here is the contact duration) can be determined through the obtained touch time, and the touch coordinates of the first operation object can be determined through the obtained touch coordinates. For example, after obtaining the first touch moment, each time a touch moment is obtained, the current contact time between the first operation object and the touch screen can be obtained by subtracting the latest touch moment from the first touch moment, and the difference between the last touch moment and the first touch moment is the contact time between the first operation object and the touch screen. For the displacement of the first operation object on the touch screen, after obtaining the first touch coordinate, each time a touch coordinate is obtained, the current displacement of the first operation object on the touch screen can be determined based on the latest touch coordinate and the first touch coordinate (the displacement can be determined based on sqrt((x2-x1)2, (y2-y1)2), (x1, y1) is the first touch coordinate, that is, the touch coordinate when the first operation object starts to contact the touch screen, and (x2, y2) is the latest touch coordinate). The displacement determined based on the last touch coordinate and the first touch coordinate is the displacement of the first operation object on the touch screen.

[0065] After the electronic device enters the erasing state, the first operating object can perform an erasing operation to erase the content written in the writing area displayed on the touch screen.

[0066] Exemplarily, the first operation object is a finger, and the user usually erases written content by sliding the finger. For some devices, sliding the finger may trigger other functions, such as page turning. In order to avoid triggering other functions and affecting erasure when erasing written content with a finger, the triggering of other functions can be intercepted after the electronic device enters the erasing state.

[0067] The state switching method provided in the embodiment of the present application can detect the touch operation of the first operation object on the touch screen after the electronic device enters the writing state, and when the touch operation information corresponding to the touch operation meets the preset conditions, the electronic device can be controlled to switch to the erasing state. The state switching method provided in the embodiment of the present application can realize the switching of the electronic device state based on the simple touch operation of the first operation object, the switching method is simple and efficient, and the user experience is good.

[0068] Second embodiment

[0069] Based on the state switching method provided in the above embodiment, this embodiment provides another state switching method, which is applied to an electronic device with a touch screen, and the electronic device has a writing state and an erasing state. Figure 2 , which shows a schematic flow chart of the state switching method provided in this embodiment, and may include:

[0070] Step S201: After the electronic device enters the writing state, detecting a touch operation of a first operation object on the touch screen.

[0071] Optionally, the first operation object may be but is not limited to a finger of a user, and the touch operation of the first operation object on the touch screen may be a single-point touch operation of the user's finger on the touch screen.

[0072] Step S202: If the touch operation information corresponding to the touch operation of the first operation object on the touch screen meets a preset condition, the electronic device is controlled to switch to an erasing state.

[0073] The touch operation information corresponding to the touch operation of the first operation object on the touch screen may include but is not limited to: the contact time between the first operation object and the touch screen, the contact area between the first operation object and the touch screen, and the movement of the first operation object on the touch screen.

[0074] Among them, the preset conditions may include: the contact time between the first operation object and the touch screen is greater than the preset first time threshold; the contact area between the first operation object and the touch screen is greater than the preset area threshold; the displacement of the first operation object on the touch screen is less than the preset first displacement threshold.

[0075] It should be noted that the specific implementation process and related explanations of steps S201 to S202 in this embodiment can refer to the specific implementation process and related explanations of steps S101 to S102 in the first embodiment, and this embodiment will not be repeated here.

[0076] Step S203: after controlling the electronic device to switch to the erasing state, drawing and displaying the erasable area.

[0077] The erasable area may indicate which part of the written content the user can erase.

[0078] Optionally, when drawing and displaying the erasable area, the erasable area of ​​a set shape may be drawn and displayed based on the contact point between the first operation object and the touch screen and a preset graphic size.

[0079] For example, a circular erasable area with the contact point between the first operation object and the touch screen as the center and the preset graphic size as the radius can be drawn. For another example, a square erasable area with the contact point between the first operation object and the touch screen as the center and the preset graphic size as the side length can be drawn.

[0080] In one possible implementation, after the electronic device is controlled to switch to the erasing state, the erasable area can be continuously drawn, that is, based on the latest contact point between the first operation object and the touch screen and the preset graphic size, the erasable area of ​​the set shape is drawn. Considering the refresh rate limit of some screens (such as ink screens), in another possible implementation, the erasable area of ​​the set shape can be drawn based on the contact point between the first operation object and the touch screen and the preset graphic size only at the moment when the electronic device is controlled to switch to the erasing state, and the erasable area is no longer drawn during the erasing process.

[0081] Optionally, after determining that the electronic device needs to enter the erase state, a prompt message indicating that the electronic device has entered the erase state may be output to prompt the user that the electronic device has currently entered the erase state and the user may perform an erase operation. Optionally, the prompt message may be output in voice or text form, for example, playing a prompt voice indicating that the electronic device has entered the erase state, or displaying a prompt text indicating that the electronic device has entered the erase state.

[0082] Step S204: based on the operation of the first operation object in the erasable area, erasing the written content in the erasable area.

[0083] Based on the operation of the first operation object in the erasable area, there are multiple ways to implement erasing the written content in the erasable area: in one possible implementation method, the operation of the first operation object in the erasable area can be directly responded to, and the written content of the first operation object in the erasable area can be erased; considering the possible existence of accidental touch operations, in order to avoid responding to accidental touch operations, in another possible implementation method, it can be detected whether the displacement of the first operation object in the operable area is greater than a preset second displacement threshold; if the displacement of the first operation object in the operable area is greater than the preset second displacement threshold, it means that the operation of the first operation object in the operable area is an erasing operation, not an accidental touch operation, then the operation of the first operation object in the erasable area is responded to, and the written content of the first operation object in the erasable area is erased.

[0084] In the process of implementing the present application, the applicant discovered that currently, touch screen devices (such as ink screen devices) have a solution of writing with the tip of the pen and erasing with the tail of the pen, that is, use the tip of the stylus to write in the writing area of ​​the screen. During the writing process, if you want to erase the written content, flip the stylus and use the tail of the stylus to erase the written content. It is understandable that the user may need to make multiple modifications during the writing process, that is, the user needs to erase the written content multiple times, which means that the user needs to flip the stylus frequently. However, frequent flipping of the stylus can easily lead to wrist fatigue. Moreover, if the material of the tail of the stylus is too hard, frequent erasing will damage the screen. If the material is too soft, it is easy to wear and needs to be replaced frequently. Compared with the solution of writing with the tip of the pen and erasing with the tail of the pen, the present application can realize the switching of device status through a single-point touch operation of the finger without flipping the stylus, and erasing the written content with the finger will not damage the screen or wear the stylus.

[0085] The state switching method provided in the embodiment of the present application can detect the touch operation of the first operation object on the touch screen after the electronic device enters the writing state, and when the touch operation information corresponding to the touch operation meets the preset conditions, the electronic device can be controlled to switch to the erasing state. After the electronic device switches to the erasing state, the erasable area can be drawn and displayed, and the written content in the erasable area can be erased based on the operation of the first operation object in the erasable area. The state switching method provided in the embodiment of the present application can realize the switching of the electronic device state based on the simple touch operation of the first operation object. The switching method is simple and efficient. After switching to the erasing state, the written content in the erasable area can be erased based on the operation of the first operation object in the erasable area, and the user experience is good.

[0086] Third embodiment

[0087] It is understandable that when the user erases the written content based on the first operation object, the first operation object may leave the touch screen or the erasable area for some reason (for example, the user raises his hand because he needs to adjust the erased content). In order to ensure the continuity of the erasing process and give the user a better erasing experience, the embodiment of the present application provides another state switching method, which is applied to an electronic device with a touch screen, and the electronic device has a writing state and an erasing state. Please refer to Figure 3 , which shows a schematic flow chart of the state switching method provided in this embodiment, and may include:

[0088] Step S301: After the electronic device enters the writing state, detecting a touch operation of a first operation object on the touch screen.

[0089] Optionally, the first operation object may be but is not limited to a finger of a user, and the touch operation of the first operation object on the touch screen may be a single-point touch operation of the user's finger on the touch screen.

[0090] Step S302: If the touch operation information corresponding to the touch operation of the first operation object on the touch screen meets a preset condition, the electronic device is controlled to switch to an erasing state.

[0091] The touch operation information corresponding to the touch operation of the first operation object on the touch screen may include but is not limited to: the contact time between the first operation object and the touch screen, the contact area between the first operation object and the touch screen, and the movement of the first operation object on the touch screen.

[0092] Among them, the preset conditions may include: the contact time between the first operation object and the touch screen is greater than the preset first time threshold; the contact area between the first operation object and the touch screen is greater than the preset area threshold; the displacement of the first operation object on the touch screen is less than the preset first displacement threshold.

[0093] It should be noted that the specific implementation process and related explanations of steps S301 to S302 in this embodiment can refer to the specific implementation process and related explanations of steps S101 to S102 in the first embodiment, and this embodiment will not be repeated here.

[0094] Step S303: after controlling the electronic device to switch to the erasing state, drawing and displaying the erasable area.

[0095] Optionally, after determining that the electronic device needs to enter the erase state, a prompt message that the electronic device enters the erase state may be output to prompt the user that the electronic device currently enters the erase state, and the user may perform an operation. Optionally, the prompt message may be output in voice or text form.

[0096] Step S304: based on the operation of the first operation object in the erasable area, erasing the written content in the erasable area.

[0097] It should be noted that the specific implementation process and related explanations of steps S303 to S304 in this embodiment can be found in the specific implementation process and related explanations of steps S203 to S204 in the second embodiment, which will not be elaborated in this embodiment.

[0098] Step S305: If it is detected that the first operation object is lifted, or if it is detected that the first operation object slides out of the writing area on the touch screen, the electronic device is controlled to switch to the erasure protection state.

[0099] It should be noted that controlling the electronic device to switch to the erasure protection state is essentially to delay the electronic device from exiting the erasure state, thereby ensuring the continuity of the erasure.

[0100] Step S306a: within the preset erasing state protection time, if it is detected that the first operating object contacts the erasable area, the electronic device is controlled to switch to the erasing state.

[0101] While controlling the electronic device to switch to the erasure protection state, the time the electronic device is in the erasure protection state is counted.

[0102] Within the preset erasing state protection time, if it is detected that the first operating object contacts the erasable area, it indicates that the first operating object continues to perform the erasing operation. At this time, the electronic device is controlled to switch to the erasing state, that is, the electronic device restores the erasing state. After the electronic device restores the erasing state, step S304 and subsequent steps can be executed.

[0103] Step S306b: If it is detected that the electronic device is in the erasure protection state for a period exceeding a preset erasure state protection time, or if it is detected that the second operation object contacts the writing area of ​​the touch screen, the electronic device is controlled to switch to the writing state.

[0104] The second operation object is an object that can be used for writing in the writing area of ​​the touch screen, such as a touch pen (such as an electromagnetic pen, a capacitive pen, etc.).

[0105] It should be noted that if it is detected that the electronic device is in the erasing protection state for a period exceeding the preset erasing state protection time, it is considered that the first operation object will not continue the erasing operation, and the electronic device is controlled to switch to the writing state, that is, the electronic device exits the erasing state. If it is detected that the second operation object contacts the writing area of ​​the touch screen, indicating that the user wants to perform a writing operation, the electronic device is controlled to switch to the writing state.

[0106] The state switching method provided by the embodiment of the present application can detect the touch operation of the first operation object on the touch screen after the electronic device enters the writing state. When the touch operation information corresponding to the touch operation meets the preset conditions, the electronic device can be controlled to switch to the erasing state. It can be seen that the embodiment of the present application can realize the efficient switching of the electronic device state. After the electronic device switches to the erasing state, the erasable area can be drawn and displayed. Based on the operation of the first operation object in the erasable area, the written content in the erasable area is erased. In order to ensure the continuity of erasing, when the first operation object is detected to be lifted, or when the first operation object is detected to slide out of the writing area on the touch screen, the electronic device can be controlled to switch to the erasing protection state. Within the preset erasing state protection time, if the first operation object is detected to contact the erasable area, the electronic device is controlled to restore the erasing state. The state switching method provided by the embodiment of the present application can realize the efficient switching of the electronic device state and the efficient erasing of the written content, and can also ensure the continuity of erasing, and the user experience is good.

[0107] Fourth embodiment

[0108] An embodiment of the present application also provides a state switching device, which is applied to an electronic device with a touch screen, and the electronic device has a writing state and an erasing state. The state switching device provided by the embodiment of the present application is described below, and the state switching device described below and the state switching method described above can be referenced to each other.

[0109] See also Figure 4 , shows a schematic diagram of the structure of the state switching device provided in an embodiment of the present application, which may include: a detection module 401 and a first control module 402.

[0110] The detection module 401 is used to detect a touch operation of a first operation object on the touch screen.

[0111] The first control module 402 is configured to control the electronic device to switch to the erasing state when the touch operation information corresponding to the touch operation meets a preset condition.

[0112] The touch operation information includes: the contact time between the first operation object and the touch screen, the contact area between the first operation object and the touch screen, and the movement of the first operation object on the touch screen.

[0113] Optionally, the state switching device provided in the embodiment of the present application may further include: an erasable area drawing and display module and a written content erasing module.

[0114] The erasable area drawing and display module is used to draw and display the erasable area after the first control module controls the electronic device to switch to the erasing state.

[0115] The written content erasing module is used to erase the written content in the erasable area based on the operation of the first operating object in the erasable area.

[0116] Optionally, the preset conditions include:

[0117] The contact time between the first operation object and the touch screen is greater than a preset first time threshold;

[0118] The contact area between the first operation object and the touch screen is greater than a preset area threshold;

[0119] The displacement of the first operation object on the touch screen is less than a preset first displacement threshold.

[0120] Optionally, when drawing and displaying the erasable area, the erasable area drawing and displaying module is specifically used to:

[0121] Based on the contact point between the first operation object and the touch screen and a preset graphic size, an erasable area of ​​a set shape is drawn and displayed.

[0122] Optionally, when erasing the written content in the erasable area based on the operation of the first operation object on the erasable area, the written content erasing module is specifically used to:

[0123] Detecting whether the displacement of the first operation object is greater than a preset second displacement threshold;

[0124] If the displacement of the first operating object is greater than the preset second displacement threshold, in response to the operation of the first operating object in the erasable area, the written content operated by the first operating object in the erasable area is erased.

[0125] Optionally, the state switching device provided in the embodiment of the present application may further include: a second control module and a third control module.

[0126] The second control module is used to control the electronic device to switch to the erasure protection state after the first control module controls the electronic device to switch to the erasure state, if it is detected that the first operation object is lifted, or it is detected that the first operation object slides out of the writing area on the touch screen.

[0127] The third control module is used to control the electronic device to switch to the erasing state if it is detected that the first operating object contacts the erasable area within a preset erasing state protection time.

[0128] Optionally, the state switching device provided in the embodiment of the present application may further include: a fourth control module.

[0129] The fourth control module is used to control the electronic device to switch to the writing state when it is detected that the time when the electronic device is in the erasure protection state exceeds the preset erasure state protection time, or when it is detected that the second operation object contacts the writing area of ​​the touch screen.

[0130] The state switching device provided in the embodiment of the present application can detect the touch operation of the first operation object on the touch screen after the electronic device enters the writing state, and when the touch operation information corresponding to the touch operation meets the preset conditions, the electronic device can be controlled to switch to the erasing state. It can be seen that the state switching device provided in the embodiment of the present application can realize the switching of the electronic device state based on the simple touch operation of the first operation object, and the switching method is simple and efficient.

[0131] The state switching device provided in the embodiment of the present application can also draw and display an erasable area after controlling the electronic device to switch to the erasing state. Based on the operation of the first operation object in the erasable area, the written content in the erasable area is erased. In order to ensure the continuity of erasing, when the first operation object is detected to be lifted, or when the first operation object is detected to slide out of the writing area on the touch screen, the electronic device can be controlled to switch to the erasing protection state. Within the preset erasing state protection time, if the first operation object is detected to contact the erasable area, the electronic device can be controlled to restore the erasing state. The state switching device provided in the embodiment of the present application can realize efficient switching of the electronic device state and efficient erasing of the written content, and can also ensure the continuity of erasing, and the user experience is good.

[0132] Fifth embodiment

[0133] The present application also provides an electronic device. Figure 5 , shows a schematic diagram of the structure of the electronic device, which may include: at least one processor 501, at least one communication interface 502, at least one memory 503 and at least one communication bus 504;

[0134] In the embodiment of the present application, the number of the processor 501, the communication interface 502, the memory 503, and the communication bus 504 is at least one, and the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504;

[0135] The processor 501 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention;

[0136] The memory 503 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;

[0137] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:

[0138] After the electronic device enters the writing state, determining whether the electronic device needs to switch to the erasing state based on the contact time between the first operation object and the touch screen, the contact area between the first operation object and the touch screen, and the movement of the first operation object on the touch screen;

[0139] If the electronic device needs to be switched to the erased state, the electronic device is controlled to switch to the erased state.

[0140] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0141] Sixth embodiment

[0142] The embodiment of the present application further provides a computer-readable storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:

[0143] After the electronic device enters the writing state, determining whether the electronic device needs to switch to the erasing state based on the contact time between the first operation object and the touch screen, the contact area between the first operation object and the touch screen, and the movement of the first operation object on the touch screen;

[0144] If the electronic device needs to be switched to the erased state, the electronic device is controlled to switch to the erased state.

[0145] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0146] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0147] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0148] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A state switching method, characterized in that: Applied to an electronic device with a touch screen, the electronic device has a writing state and an erasing state, and the method includes: After the electronic device enters the writing state, detecting a touch operation of the first operation object on the touch screen; If the touch operation information corresponding to the touch operation meets a preset condition, the electronic device is controlled to switch to the erase state, and the preset condition includes: the contact time between the first operation object and the touch screen is greater than a preset first time threshold; and the contact area between the first operation object and the touch screen is greater than a preset area threshold; and the displacement of the first operation object on the touch screen is less than a preset first displacement threshold; The touch operation information includes: the contact time between the first operation object and the touch screen, the contact area between the first operation object and the touch screen, and the movement of the first operation object on the touch screen; Also includes: After the electronic device is switched to the erasing state, if it is detected that the first operation object is lifted, or it is detected that the first operation object slides out of the writing area on the touch screen, the electronic device is controlled to switch to the erasing protection state, so that the electronic device delays exiting the erasing state; Within the preset erasing state protection time, if it is detected that the first operation object contacts the erasable area, the electronic device is controlled to switch to the erasing state.

2. The state switching method according to claim 1, characterized in that: Also includes: After controlling the electronic device to switch to the erasing state, drawing and displaying the erasable area; Based on the operation of the first operation object in the erasable area, the written content in the erasable area is erased.

3. The state switching method according to claim 2, characterized in that: The drawing and displaying of the erasable area includes: Based on the contact point between the first operation object and the touch screen and a preset graphic size, an erasable area of ​​a set shape is drawn and displayed.

4. The state switching method according to claim 2, characterized in that: Erasing the written content in the erasable area based on the operation of the first operation object on the erasable area includes: Detecting whether the displacement of the first operation object is greater than a preset second displacement threshold; If the displacement of the first operating object is greater than the preset second displacement threshold, in response to the operation of the first operating object in the erasable area, the written content operated by the first operating object in the erasable area is erased.

5. The state switching method according to claim 1, characterized in that: Also includes: If it is detected that the electronic device is in the erasure protection state for a period exceeding the preset erasure state protection time, or if it is detected that the second operation object contacts the writing area of ​​the touch screen, the electronic device is controlled to switch to the writing state.

6. A state switching device, characterized in that: Applicable to an electronic device with a touch screen, the electronic device has a writing state and an erasing state, the device comprises: a detection module and a first control module; The detection module is used to detect a touch operation of the first operation object on the touch screen; The first control module is used to control the electronic device to switch to the erase state when the touch operation information corresponding to the touch operation meets a preset condition, wherein the preset condition includes: the contact time between the first operation object and the touch screen is greater than a preset first time threshold; and the contact area between the first operation object and the touch screen is greater than a preset area threshold; and the displacement of the first operation object on the touch screen is less than a preset first displacement threshold; The touch operation information includes: the contact time between the first operation object and the touch screen, the contact area between the first operation object and the touch screen, and the movement of the first operation object on the touch screen; Also includes: a second control module and a third control module; The second control module is used to control the electronic device to switch to the erasing protection state after the first control module controls the electronic device to switch to the erasing state, if it is detected that the first operation object is lifted, or it is detected that the first operation object slides out of the writing area on the touch screen, so that the electronic device delays exiting the erasing state; The third control module is used to control the electronic device to switch to the erasing state if it is detected that the first operating object contacts the erasable area within a preset erasing state protection time.

7. The state switching device according to claim 6, characterized in that: Also includes: Erasable area drawing and display module and written content erasing module; The erasable area drawing and display module is used to draw and display the erasable area after the first control module controls the electronic device to switch to the erasing state; The written content erasing module is used to erase the written content in the erasable area based on the operation of the first operating object in the erasable area.

8. An electronic device, characterized in that: include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the state switching method according to any one of claims 1 to 5.

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