Control method and equipment

By automatically switching the writing and erasing functions by detecting the spatial state signal of the electronic device, the problem of low convenience in the prior art is solved and efficient function switching is achieved.

CN120255779APending Publication Date: 2025-07-04LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510386542.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

In the prior art, switching between writing and erasing functions of electronic devices requires the user to manually operate physical keys or virtual controls, resulting in less convenience.

Method used

By detecting the spatial status signal of the electronic device, automatically switch the writing and erasing functions, and using signals such as inclination sensors and pressure sensors to determine the status of the device, to achieve function switching without manual operation by users.

Benefits of technology

It improves the convenience of electronic devices between writing and erasing functions, conforms to user usage habits, and simplifies operational processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120255779A_ABST
    Figure CN120255779A_ABST
Patent Text Reader

Abstract

The invention discloses a control method and device, and the method comprises the steps: obtaining a detection signal representing the spatial state of a first electronic device; when it is determined that the first electronic device is in a second state according to the detection signal, a first control signal is sent to a second electronic device, so that the second electronic device erases at least part of the displayed track image when meeting a first preset condition associated with the second end of the first electronic device, and when the first electronic device is in the first state, the second electronic device erases at least part of the displayed track image. And the first electronic equipment moves on the touch surface of the second electronic equipment through a first end opposite to the second end to input first touch data, so that the second electronic equipment generates a track image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of control technologies, and particularly to a control method and device. Background Art

[0002] Some electronic devices with touch functions can provide writing and erasing functions. For example, when a tablet computer with a touch screen provides a writing function, the tablet computer can display a trajectory image corresponding to the touch trajectory based on the touch data obtained from the touch screen. When providing an erasing function, at least part of the displayed trajectory image can be erased based on the touch data obtained from the touch screen.

[0003] In related technologies, an electronic device generally switches between a writing function and an erasing function based on a physical button or a virtual control. This switching method requires the user to find the corresponding physical button or virtual control and click it, so there is a problem of low convenience. Summary of the Invention

[0004] To this end, the present application discloses the following technical solutions:

[0005] A first aspect of the present application provides a control method, which is applied to a first electronic device and includes:

[0006] Obtain a detection signal characterizing the spatial state of the first electronic device;

[0007] When it is determined according to the detection signal that the first electronic device is in a second state, send a first control signal to a second electronic device, so that when the second electronic device meets a first preset condition associated with the second end of the first electronic device, at least part of the displayed trajectory image is erased, where when the first electronic device is in a first state, the first electronic device moves on the touch surface of the second electronic device through a first end opposite to the second end to input first touch data, so that the second electronic device generates the trajectory image.

[0008] Optionally, the detection signal includes a first detection signal and a second detection signal. The first detection signal is used to detect the spatial state between the first end of the first electronic device and the second electronic device, and the second detection signal is used to detect the inclination state of the first electronic device;

[0009] The obtaining of the detection signal characterizing the spatial state of the first electronic device includes:

[0010] Obtain a detection signal, where the detection signal characterizes whether the spatial state of the first electronic device has flipped.

[0011] Optionally, the determining that the first electronic device is in a second state according to the detection signal includes:

[0012] The first detection signal is detected at a first moment, and the second detection signal is detected at a second moment within a predetermined time later than the first moment. If it is determined according to the second detection signal that the first electronic device meets the flipping condition, it is determined that the first electronic device is in a second state.

[0013] Optionally, determining that the first electronic device meets the flipping condition according to the second detection signal includes:

[0014] Obtaining a rotation angle of the first electronic device in a target direction according to the second detection signal;

[0015] When the rotation angle is greater than or equal to an angle threshold, it is determined that the first electronic device meets the flipping condition.

[0016] Optionally, the detection signal includes a first detection signal and a third detection signal. The first detection signal is used to detect a spatial state between a first end of the first electronic device and the second electronic device, and the third detection signal is used to detect a spatial state between the first electronic device and the second electronic device.

[0017] Optionally, the first detection signal is a signal obtained based on a pressure sensor at the first end, and the third detection signal is a communication signal formed when the touch surfaces of the first electronic device and the second electronic device are in contact.

[0018] Optionally, determining that the first electronic device is in the second state according to the detection signal includes:

[0019] When it is determined according to the pressure sensing signal that the first electronic device is not in the first state and the communication signal is received, it is determined that the first electronic device is in the second state.

[0020] A second aspect of this application provides a control method applied to a second electronic device, including:

[0021] Receiving a control signal of a first electronic device, where the control signal is related to a detection signal of the first electronic device, and the detection signal is used to characterize a spatial state of the first electronic device;

[0022] When it is determined according to the control signal that the first electronic device is in the first state, obtaining first touch data input by the first electronic device moving on the touch surface of the second electronic device through a first end, so as to generate a trajectory image according to the first touch data;

[0023] When it is determined that the first electronic device is in the second state according to the control signal, second touch data is obtained according to the movement of the first electronic device on the touch surface of the second electronic device through the second end, so as to erase at least part of the displayed trajectory image based on the second touch data.

[0024] Optionally, a communication signal formed when the first electronic device contacts the touch surface of the second electronic device is used to generate the control signal.

[0025] A third aspect of the present application provides an electronic device, which is the first electronic device and includes:

[0026] A first end and a second end opposite to the first end;

[0027] A detector for obtaining a detection signal characterizing the spatial state of the first electronic device;

[0028] A controller for:

[0029] When it is determined that the first electronic device is in the second state according to the detection signal, a first control signal is sent to the second electronic device, so that the second electronic device erases at least part of the displayed trajectory image when a first preset condition associated with the second end is met;

[0030] When the first electronic device is in the first state, first touch data is input by moving the first end of the first electronic device on the touch surface of the second electronic device, so that the second electronic device generates the trajectory image.

[0031] A fourth aspect of the present application provides an electronic device, which is the second electronic device and includes:

[0032] A receiver for receiving a control signal of the first electronic device, where the control signal is related to the detection signal of the first electronic device, and the detection signal is used to characterize the spatial state of the first electronic device;

[0033] A processor for:

[0034] When it is determined that the first electronic device is in the first state according to the control signal, the first touch data input by moving the first end of the first electronic device on the touch surface of the second electronic device is obtained, so as to generate a trajectory image according to the first touch data;

[0035] When it is determined that the first electronic device is in the second state according to the control signal, second touch data is obtained according to the movement of the first electronic device on the touch surface of the second electronic device, so as to erase at least part of the displayed trajectory image based on the second touch data. Description of the Drawings

[0036] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on the provided drawings.

[0037] Figure 1 is a flowchart of a control method provided by an embodiment of the present application;

[0038] Figure 2 is a schematic diagram of the spatial state of a first electronic device provided by an embodiment of the present application;

[0039] Figure 3 is a schematic diagram of the display interface of a second electronic device when the first electronic device is in different states provided by an embodiment of the present application;

[0040] Figure 4 is a flowchart of a method for determining whether it is in the first state or the second state provided by an embodiment of the present application;

[0041] Figure 5 is a flowchart of another control method provided by an embodiment of the present application;

[0042] Figure 6 is a schematic diagram of the structure of a first electronic device provided by an embodiment of the present application;

[0043] Figure 7 is a schematic diagram of the structure of a second electronic device provided by an embodiment of the present application. Detailed implementation manners

[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0045] This embodiment provides a control method, which can be applied to a first electronic device. Please refer to Figure 1 , and the method may include the following steps.

[0046] S101, obtain a detection signal characterizing the spatial state of the first electronic device.

[0047] The first electronic device in this embodiment can be any electronic device capable of performing a touch operation on the second electronic device. The second electronic device can be any electronic device having at least one touch surface and capable of recognizing a touch operation by the user on the touch surface.

[0048] As some examples, the first electronic device can be various active styluses, and the second electronic device can be a mobile phone, a laptop computer, a tablet computer, etc.

[0049] The detection signal can include a signal capable of characterizing the spatial attitude or the amplitude of the change in the spatial attitude of the first electronic device itself. For example, the signal output by an inclination sensor can characterize the rotation angle of the first electronic device.

[0050] The detection signal can include a signal capable of characterizing the relationship between a specific part of the first electronic device and the second electronic device. For example, it can include a signal capable of characterizing whether the tip of an active stylus is in contact with the touch surface of the second electronic device. In some embodiments, at least one of the signal output by a pressure sensor and the uplink signal can be used as such a detection signal.

[0051] S102. When it is determined according to the detection signal that the first electronic device is in the second state, send a first control signal to the second electronic device, so that when the second electronic device meets a first preset condition associated with the second end of the first electronic device, at least part of the displayed trajectory image is erased. When the first electronic device is in the first state, the first electronic device moves on the touch surface of the second electronic device through the first end opposite to the second end to input first touch data, so that the second electronic device generates a trajectory image.

[0052] The first electronic device can at least have a first end and a second end. Taking the active stylus shown in (1) of Figure 2 as an example, the first end can be the relatively sharp end of the stylus, that is, the tip of the pen, and the second end can be the relatively smooth end of the stylus, that is, the tail end of the pen.

[0053] The second electronic device can include a touch module integrated with the screen, that is, the second electronic device can have a touch screen. At this time, the touch surface can include the surface of the touch screen.

[0054] The second electronic device can include an independent touch module, such as a touch panel used to replace the mouse operation in a laptop computer. At this time, the touch surface can include the surface of the touch panel.

[0055] Such as Figure 2As shown in (1) below, when the first electronic device is in the first state, its first end can be in contact with the touch surface of the second electronic device. In this state, the first electronic device can input first touch data to the second electronic device. The first touch data can represent the position of the contact point between the touch surface and the first end. When the first end touches the touch surface and moves on the touch surface, the second electronic device can obtain the first touch data in real time during the movement, and then display a trajectory image matching the movement trajectory of the first end on the screen according to the first touch data.

[0056] The way for the first electronic device to input the first touch data to the second electronic device can be that the first end is provided with an electrode. When the first end is in contact with the touch surface, the first electronic device can transmit a downlink signal to the touch surface through the electrode at the first end, and the second electronic device can obtain the first touch data by analyzing the received downlink signal.

[0057] As Figure 2 As shown in (2) below, when in the second state, the second end of the first electronic device can be in contact with the touch surface of the second electronic device. In this state, if the second electronic device meets the first preset condition, the second electronic device can erase at least part of the displayed trajectory image, that is to say, the second electronic device can cancel the display of at least part of the displayed trajectory image.

[0058] Among them, the first preset condition can be that the second end moves on the touch surface of the second electronic device. Correspondingly, when the first preset condition is met, the second electronic device can, based on the movement of the second end, erase at least part of the displayed trajectory image. For example, it can erase the part of the trajectory image covered by the movement trajectory of the second end.

[0059] As an example, as Figure 3 shown in (1) below, when in the first state, the first electronic device moves from left to right, and its first end also moves from left to right on the surface of the touch screen. Based on this movement trajectory, the second electronic device displays Figure 3 the trajectory image shown in (1) below on the screen.

[0060] As Figure 3 shown in (2) below, when in the second state, the first electronic device moves from right to left, and its second end also moves from right to left on the surface of the touch screen. At this time, the second electronic device will Figure 3 in the trajectory image shown in (1) below, erase the part covered by the movement trajectory of the second end, that is, the right half of the trajectory image.

[0061] The second electronic device can determine whether the first preset condition is met based on various methods.

[0062] In some embodiments, the second end of the first electronic device may also have an electrode. Thus, when the second end of the first electronic device touches the touch surface, the first electronic device can send a downlink signal to the second electronic device through the electrode at the second end, and the second electronic device can determine whether the first preset condition is met based on the downlink signal.

[0063] In some embodiments, the second end of the first electronic device may not have an electrode. The touch module of the second electronic device can sense the electrical signals at various positions on the contact surface, such as capacitance signals at various positions on the contact surface. When the second end touches the touch surface, the electrical signals at the contact position will change, and the touch module can determine the contact position between the second end and the touch surface by sensing the change in the electrical signals, and then determine whether the first preset condition is met.

[0064] The first control signal can be sent to the second electronic device in various ways. As an example, a Bluetooth connection can be established between the first electronic device and the second electronic device, and the first electronic device can send the first control signal to the second electronic device through the Bluetooth connection.

[0065] When determining that it is in the first state, the first electronic device can also send the second control signal to the second electronic device in the same way, so that the second electronic device generates a trajectory image based on the input first touch data.

[0066] When the second electronic device generates a trajectory image, it can be displayed on the screen or not. Instead, the trajectory image can be processed and the processing result can be output, such as recognizing the trajectory image to obtain the corresponding text and outputting the recognized text.

[0067] The beneficial effect of this embodiment is that when using the first electronic device to perform a touch operation on the second electronic device, only by changing the spatial state of the first electronic device, it is possible to switch between the writing function and the erasing function, thereby improving the usability of the first electronic device.

[0068] In some alternative embodiments, the detection signal may include a first detection signal and a second detection signal. The first detection signal is used to detect the spatial state between the first end of the first electronic device and the second electronic device, and the second detection signal is used to detect the tilt state of the first electronic device;

[0069] Obtaining the detection signal characterizing the spatial state of the first electronic device includes:

[0070] Obtaining the detection signal to detect whether the spatial state of the first electronic device has flipped.

[0071] The spatial state between the first end of the first electronic device and the second electronic device can be that the first end is in contact with the touch surface of the second electronic device, or the first end is not in contact with the touch surface of the second electronic device.

[0072] According to the different structures of the first electronic device, the first detection signal can be different signals. For example, when a pressure sensor is installed at the first end of the first electronic device, the first detection signal can be the pressure sensing signal output by the pressure sensor at the first end; when an electrode is installed at the first end of the first electronic device and no electrode is installed at the second end, the first detection signal can be the communication signal between the electrode and the touch surface of the second electronic device, for example, the uplink signal sent by the second electronic device to the electrode at the first end through the touch surface.

[0073] In the case where the first detection signal is a pressure sensing signal, if the first end is in contact with the touch surface, the pressure sensor can sense the pressure exerted on the first end by the touch surface, and then output a pressure sensing signal representing the magnitude of the pressure. If the first end is not in contact with the touch surface, there is no pressure acting on the first end, and at this time the pressure sensor may not output a pressure sensing signal. Therefore, if the pressure sensing signal of the pressure sensor at the first end can be detected, it indicates that the first end is in contact with the touch surface. If the pressure sensing signal cannot be detected, it indicates that the first end is not in contact with the touch surface.

[0074] In the case where the first detection signal is an uplink signal, the electrode at the first end can receive the uplink signal sent by the second electronic device through the touch surface when it comes into contact with the touch surface, and cannot receive the uplink signal sent through the touch surface when it is not in contact with the touch surface. Therefore, if the uplink signal can be detected, it indicates that the first end is in contact with the touch surface. If the uplink signal cannot be detected, it indicates that the first end is not in contact with the touch surface.

[0075] The second detection signal can be a signal that can represent the magnitude of the current inclination angle of the first electronic device, for example, the magnitude of the inclination angle of the first electronic device relative to the direction of gravity at its location; or, the second detection signal can be a signal that can represent the magnitude of the change in the inclination angle of the first electronic device. In other words, the second detection signal can be a signal that can represent the magnitude of the rotation angle of the first electronic device.

[0076] As some examples, when an inclination sensor capable of detecting the rotation angle is provided in the first electronic device, the second detection signal can be the signal output by the inclination sensor.

[0077] Among them, the inclination sensor can detect the rotation angle of the first electronic device in different directions. Figure 2Taking (1) as an example, the tilt sensor can detect the rotation angle of the first electronic device rotating around the R axis, the rotation angle rotating around the P axis, and the rotation angle rotating around the Y axis. The R axis is the connection line between the first end and the second end. The P axis can be any axis perpendicular to the R axis, and the Y axis can be perpendicular to the R axis and perpendicular to the P axis.

[0078] Combining the above first detection signal and the second detection signal, the first electronic device can determine whether the spatial state of itself has flipped at different times. Therefore, obtaining the detection signal characterizing the spatial state of the first electronic device in S101 is equivalent to obtaining the detection signal, and the detection signal characterizes whether the spatial state of the first electronic device has flipped.

[0079] The beneficial effect of this embodiment is that the first electronic device can determine its own spatial state based on the detection signal characterizing whether its own spatial state has flipped, and then trigger the second electronic device to switch between the writing function and the erasing function based on the spatial state. Thus, when the user uses the writing function, only by flipping the first electronic device can they switch to the erasing function to erase the trajectory image, making the switching between writing and erasing have a high degree of convenience and be more in line with the usage habits of general users.

[0080] In some embodiments, based on the above first detection signal and second detection signal, the method for determining that the first electronic device is in the second state in S102 can be:

[0081] Detect the first detection signal at the first moment, and detect the second detection signal at the second moment within a predetermined time later than the first moment. If it is determined according to the second detection signal that the first electronic device meets the flipping condition, then determine that the first electronic device is in the second state.

[0082] The above detection method can be implemented by Figure 4 the detection method shown, as Figure 4 shown, this detection method can include the following steps.

[0083] A1, Detect the first detection signal and the second detection signal.

[0084] When the first detection signal is obtained, execute step A2. When the first detection signal is not obtained, execute step A3.

[0085] A2, Determine to be in the first state.

[0086] A3, Determine whether the second detection signal is obtained within a predetermined time.

[0087] A4, Judge whether the flipping condition is met.

[0088] A5, Determine to be in the second state.

[0089] In this embodiment, the second detection signal can be a signal capable of characterizing the magnitude of the inclination change of the first electronic device, and the second detection signal can be output by the inclination sensor of the first electronic device. If the first electronic device is not rotated, resulting in no change in its inclination, the inclination sensor may not output the second detection signal. If the first electronic device is rotated, resulting in a change in its inclination, the inclination sensor may output the second detection signal.

[0090] In step A1, the first electronic device can continuously detect whether there is a first detection signal through the pressure sensor or the electrode at the first end, and continuously detect whether there is a second detection signal through the inclination sensor.

[0091] At any moment, if the first detection signal can be detected, it indicates that the first end is in contact with the touch surface. Thus, step A2 can be executed to determine that the first electronic device is in the first state at the current moment.

[0092] In step A3, it can be determined whether the second detection signal is obtained within a predetermined time. The predetermined time can be a certain length of time period starting from the most recent moment when the first detection signal can be detected. The length of the predetermined time can be set as needed without limitation. For example, it can be set to 1 second or 2 seconds.

[0093] Taking the length of the predetermined time as 1 second as an example, during the continuous detection of the first detection signal, the first electronic device detects the first detection signal at time T0, and does not detect the first detection signal at the next moment after T0, that is, at time T1. Thus, T0 can be taken as the first moment, and it is determined whether the second detection signal can be obtained within 1 second starting from the first moment, that is, during the period from T0 to T0 + 1 second;

[0094] If the second detection signal is obtained at any moment during this period, that is, at the above-mentioned second moment, it indicates that the first electronic device is rotated at this time, and step A4 is started to be executed at this time;

[0095] If the second detection signal is not obtained at every moment during this period, it indicates that the first electronic device is not rotated during this period. At this time, it can return to step A1 to continue detecting the first detection signal and the second detection signal.

[0096] In A4, the first electronic device can continuously detect the second detection signal, and determine whether the first electronic device meets the flipping condition based on the detected second detection signal. If the flipping condition is met, it indicates that the spatial state of the first electronic device is flipped, that is, from the first state to the second state. If the flipping condition is not met, it indicates that the spatial state of the first electronic device is not flipped.

[0097] When it is determined that the first electronic device is in the second state, the first electronic device may continue to execute A1. If the first detection signal is detected in A1 at any time, it may be determined that the first electronic device is in the first state.

[0098] When it is determined that the first electronic device is in the second state, the first electronic device may stop determining whether it meets the flipping condition.

[0099] Switching from detecting the first detection signal to not detecting the first detection signal is equivalent to the first end that was originally in contact with the touch surface leaving the touch surface. Therefore, the above embodiment is equivalent to determining whether the first electronic device is rotated within a predetermined time when the first end just leaves the touch surface. If the first electronic device is rotated during this period, it is determined whether it is in the second state by combining the second detection signal and the flipping condition. If the first electronic device is not rotated during this period, there is no need to determine whether the first electronic device meets the flipping condition. This can reduce the power consumption generated by the first electronic device in determining whether it meets the flipping condition on the one hand, and prevent the first electronic device from being determined to be in the second state when the user does not use the first electronic device for writing on the other hand.

[0100] In an example of a usage scenario, the user can first pick up and rotate the stylus, that is, the first electronic device. At this time, since it is not within the above-mentioned predetermined time, the first electronic device only needs to continuously detect the first detection signal and the second detection signal;

[0101] After rotating the stylus, the user presses the tip of the stylus, that is, the first end, on the touch surface and moves the stylus to write. At this time, the first electronic device detects the first detection signal and determines that it is in the first state. The second electronic device obtains and displays a trajectory image based on the first touch data input when the first end moves;

[0102] After writing for a certain period of time, the user lifts the stylus. At this time, the first end does not contact the touch surface. After lifting, the user flips the stylus. After flipping, the tail of the stylus, that is, the second end, is flipped to a position close to the touch surface, and the first end is flipped to a position away from the touch surface, as shown in (2) of Figure 2 shown;

[0103] Since the flipping is performed immediately after lifting, the first electronic device can detect the second detection signal within the predetermined time and determine that the first electronic device meets the flipping condition according to the second detection signal. Then it is determined to be in the second state and sends a first control signal to the second electronic device;

[0104] After flipping, the user presses the second end on the touch surface and moves the stylus to erase. At this time, the second electronic device responds to the first control signal and erases at least part of the trajectory image covered by the movement trajectory according to the movement trajectory of the second end on the touch surface;

[0105] After erasing part of the trajectory image, the user raises the stylus again and flips it. After flipping, the first end is pressed on the touch surface again to continue writing. At this time, since the first detection signal is detected, the first electronic device determines that it is in the first state, and the second electronic device continues to obtain the trajectory image based on the touch data input by the first end.

[0106] In some optional embodiments, when the first detection signal can be detected and when the first detection signal is continuously not detected within a predetermined time, the first electronic device can control the tilt sensor for detecting the second detection signal to be in a powered-off state or a sleep state; only when the first detection signal can be detected at the previous moment and the first detection signal cannot be detected at the next moment, that is, when the first end of the first electronic device changes from touching the touch surface to not touching the touch surface, the tilt sensor is controlled to be in a normal working state to detect the second detection signal through the tilt sensor.

[0107] If the tilt sensor is controlled in the above manner, the foregoing step A1 can be changed to detect the first detection signal, and A3 can be changed to detect the second detection signal when the first detection signal is not obtained, and determine whether the second detection signal is obtained within a predetermined time.

[0108] Controlling the tilt sensor in the above manner can reduce the power consumption of the tilt sensor without affecting the accuracy of the method of this embodiment.

[0109] The foregoing tilt sensor can be any device capable of detecting the rotation angle of the first electronic device. For example, it can be a six-axis chip including a three-axis accelerometer and a three-axis gyroscope. This chip can detect the linear acceleration and angular velocity of the device to which it belongs. Thus, the first electronic device can obtain its own rotation angle based on the signal output by this chip.

[0110] Optionally, determining that the first electronic device meets the flipping condition according to the second detection signal includes:

[0111] Obtaining the rotation angle of the first electronic device in the target direction according to the second detection signal;

[0112] When the rotation angle is greater than or equal to the angle threshold, it is determined that the first electronic device meets the flipping condition.

[0113] The target direction can be any direction perpendicular to the axis direction of the first electronic device. The axis can be understood as the connection line between the first end and the second end of the first electronic device. Taking Figure 2 (1) as an example, the target direction can include the direction of rotation around the Y axis and can also include the direction of rotation around the P axis.

[0114] The second detection signal may characterize the change amplitude of the inclination angle of the first electronic device. When the first electronic device rotates, the inclination angle sensor may periodically output the second detection signal, and each second detection signal may characterize the angle value that the first electronic device rotates in different directions during the period from the previous moment to the current moment. Thus, starting from the moment when it is determined whether the flipping condition is satisfied, that is, the above-mentioned second moment, the first electronic device may accumulate the angle values obtained based on the second detection signal at each moment, and then the rotation angle in the target direction from the second moment until now can be obtained.

[0115] Optionally, the angle values obtained based on the second detection signal may be positive and negative to characterize the clockwise rotation and counterclockwise rotation of the first electronic device. Correspondingly, when the rotation angle is greater than or equal to the angle threshold, it can be understood that the absolute value of the rotation angle is greater than or equal to the angle threshold.

[0116] In the case where there are multiple target directions, for example, when the target directions include the direction of rotation around the Y axis and the direction of rotation around the P axis, as long as the rotation angle in at least one target direction is greater than the angle threshold, it can be determined that the first electronic device satisfies the flipping condition.

[0117] The angle threshold may be determined according to the angle that the first electronic device needs to rotate from the first state to the second state. For Figure 2 example, for Figure 2 the stylus shown, when the stylus rotates 180 degrees, the positions of its tip and tail are exactly swapped. Considering that in the actual use scenario, the angle that the user rotates from the tip to the tail may be less than 180 degrees and generally greater than 90 degrees, so the angle threshold may be set to a value between 90 degrees and 180 degrees, such as 120 degrees.

[0118] In some alternative embodiments, the detection signal may include a first detection signal and a third detection signal. The first detection signal is used to detect the spatial state between the first end of the first electronic device and the second electronic device, and the third detection signal is used to detect the spatial state between the first electronic device and the second electronic device.

[0119] The spatial state between the first electronic device and the second electronic device may be that any end of the first electronic device contacts the touch surface of the second electronic device; or that any end of the first electronic device does not contact the touch surface of the second electronic device; any end refers to either the first end or the second end of the first electronic device.

[0120] Optionally, the first end of the first electronic device may have a pressure sensor, and both the first end and the second end of the first electronic device may have electrodes capable of transmitting and receiving communication signals. Based on the above structure, the first detection signal may be a pressure sensing signal output by the pressure sensor at the first end, and the third detection signal may be a communication signal formed when the electrode at any end of the first electronic device contacts the touch surface of the second electronic device.

[0121] For example, the communication signal as the third detection signal may be an uplink signal sent by the second electronic device to the first electronic device via the touch surface and the electrode when the electrode at any end contacts the touch surface.

[0122] If the first electronic device can receive the above communication signal, it indicates that the first end or the second end of the first electronic device contacts the touch surface. If the first electronic device can detect the pressure sensing signal at the first end at this time, it indicates that the first end is pressed. Thus, it can be determined that the first end contacts the touch surface, and further determine that the first electronic device is in the first state.

[0123] Based on the above detection signals, the method for determining that the first electronic device is in the second state according to the detection signals may be:

[0124] When it is determined according to the pressure sensing signal that the first electronic device is not in the first state and a communication signal is received, it is determined that the first electronic device is in the second state.

[0125] If the pressure sensing signal at the first end cannot be detected, it indicates that the first end is not pressed, and further it can be determined that the first end does not contact the touch surface and the first electronic device is not in the first state.

[0126] When the first electronic device is not in the first state, if a communication signal can be received, it indicates that the first end or the second end of the first electronic device contacts the touch surface. Combining with the judgment result that the first electronic device is not in the first state, it can be determined that the part contacting the touch surface at this time is the second end, and thus it can be determined that the first electronic device is in the second state.

[0127] That is to say, if the first electronic device cannot detect the pressure sensing signal at the first end and can receive the communication signal of the second electronic device, it can be determined that the first electronic device is in the second state.

[0128] Optionally, when the second end has an electrode capable of communication, if the first electronic device is in the second state, the first electronic device may input second touch data to the second electronic device based on the contact between the second end and the touch surface, and the second electronic device may determine the position where the second end contacts the touch surface based on the second touch data.

[0129] Thus, when the second end touches the touch surface, the second electronic device can determine the movement trajectory of the second end on the touch surface based on the second touch data input from the second end, and then erase at least part of the displayed trajectory image according to the movement trajectory.

[0130] In some alternative embodiments, the detection signal may include the foregoing first detection signal, second detection signal, and third detection signal. The first detection signal may be a pressure sensing signal of the first end, the second detection signal may be a signal of an inclination sensor, and the third detection signal may be a communication signal formed by the electrode of the first electronic device in contact with the touch surface.

[0131] In the case where the pressure sensing signal is detected, it can be determined that the first electronic device is in the first state. In the case where the pressure sensing signal is not detected, it can be determined that the first electronic device is not in the first state.

[0132] In the case where it is determined that the first electronic device is not in the first state, if the second detection signal is detected within a predetermined time, and based on the second detection signal, it is determined that the first electronic device meets the flipping condition and can receive the communication signal, then it is determined that the first electronic device is in the second state. If none of the above conditions are met, it is determined that the first electronic device is not in the second state.

[0133] Through the above embodiments, the first electronic device can switch to the second state only after a trajectory image has been written and the second end touches the touch surface, thereby triggering the second electronic device to erase the previously written trajectory image. If no trajectory image has been generated on the second electronic device or the second end has not touched the touch surface, the second electronic device will not be triggered to erase. On the one hand, this can prevent incorrect erasure of other content displayed on the screen when no trajectory image has been generated. On the other hand, it can prevent the user from using other objects other than the first electronic device, such as a finger, to erase the trajectory image during the erasure operation, improving the accuracy of the erasure operation.

[0134] In some embodiments, the detection signal may include a first detection signal and a fourth detection signal. The first detection signal is used to detect the spatial state between the first end of the first electronic device and the second electronic device, and the fourth detection signal is used to detect the spatial state between the second end of the first electronic device and the second electronic device.

[0135] The spatial state between the second end and the second electronic device may be that the second end is in contact with the touch surface, or the second end is not in contact with the touch surface.

[0136] In this embodiment, the first end may have an electrode capable of receiving a communication signal, the second end may have a pressure sensor, the first detection signal may be a communication signal formed by the contact between the electrode at the first end and the touch surface, and the fourth detection signal may be a pressure sensing signal output by the pressure sensor at the second end.

[0137] Based on the above first detection signal and fourth detection signal, the first electronic device can determine that it is in the first state when the first detection signal is detected and the fourth detection signal is not detected, and determine that it is in the second state when the first detection signal is not detected and the fourth detection signal is detected.

[0138] An embodiment of the present application also provides a control method applied to a second electronic device. Please refer to Figure 5 , and the method may include the following steps.

[0139] S501: Receive the control signal of the first electronic device. The control signal is related to the detection signal of the first electronic device, and the detection signal is used to characterize the spatial state of the first electronic device.

[0140] S502: When it is determined according to the control signal that the first electronic device is in the first state, obtain the first touch data input by the first electronic device through the first end on the touch surface of the second electronic device, so as to generate a trajectory image according to the first touch data.

[0141] S503: When it is determined according to the control signal that the first electronic device is in the second state, obtain the second touch data based on the movement of the first electronic device through the second end on the touch surface of the second electronic device, so as to erase at least part of the displayed trajectory image based on the second touch data.

[0142] The control signal received by the second electronic device may be a first control signal or a second control signal. If the first control signal is received, it can be determined that the first electronic device is in the second state. If the second control signal is received, it can be determined that the first electronic device is in the first state.

[0143] The manner in which the first electronic device obtains the first control signal and the second control signal may refer to the foregoing embodiment.

[0144] The manner in which the second electronic device obtains the first touch data may refer to the content of the first electronic device inputting the first touch data in the foregoing embodiment.

[0145] If the second end of the first electronic device has an electrode, when the second end contacts the touch surface, the first electronic device can send a downlink signal to the second electronic device through the electrode at the second end, and the second electronic device can analyze the received downlink signal to obtain the second touch data.

[0146] If the second end of the first electronic device does not have an electrode, the touch module of the second electronic device can sense the electrical signals at various positions on the contact surface, such as capacitance signals at various positions on the contact surface. When the second end touches the touch surface, the electrical signals at the contact position will change. Thus, the second electronic device can obtain the second touch data by sensing the change in the electrical signals on the touch surface.

[0147] Optionally, in the case where the first end of the first electronic device has an electrode, or both the first end and the second end have electrodes, if the electrode of the first electronic device touches the touch surface of the second electronic device, the second electronic device can form a communication signal sent to the first electronic device based on the contact between the electrode and the touch surface, and then send the communication signal as an uplink signal to the first electronic device through the electrode. The communication signal can be used for the first electronic device to generate the above control signal.

[0148] The embodiments of the present application also provide an electronic device. Please refer to Figure 6 , where the electronic device can be the aforementioned first electronic device, and the first electronic device can include:

[0149] A first end 601 and a second end 602 opposite to the first end 601;

[0150] A detector 603 for obtaining a detection signal characterizing the spatial state of the first electronic device;

[0151] A controller 604 for:

[0152] When it is determined according to the detection signal that the first electronic device is in the second state, sending a first control signal to the second electronic device so that the second electronic device erases at least part of the displayed trajectory image when meeting the first preset condition associated with the second end;

[0153] When the first electronic device is in the first state, inputting first touch data by moving the first end of the first electronic device on the touch surface of the second electronic device so that the second electronic device generates a trajectory image.

[0154] The detector can include a pressure sensor provided at the first end, can include a pressure sensor provided at the second end, can include an inclination sensor provided inside the housing of the first electronic device, can include an electrode provided at the first end and capable of receiving and transmitting communication signals, or can include an electrode provided at the second end and capable of receiving and transmitting communication signals. According to different detectors, the controller can determine that the first electronic device is in the first state or the second state based on the corresponding methods in the above embodiments.

[0155] Optionally, the detection signal includes a first detection signal and a second detection signal. The first detection signal is used to detect the spatial state between the first end of the first electronic device and the second electronic device, and the second detection signal is used to detect the inclination state of the first electronic device;

[0156] The detector 603 obtains a detection signal characterizing the spatial state of the first electronic device, including:

[0157] Obtain a detection signal, and the detection signal characterizes whether the spatial state of the first electronic device has flipped.

[0158] Optionally, the controller 604 determines that the first electronic device is in the second state according to the detection signal, including:

[0159] Detect the first detection signal at a first moment, and detect the second detection signal at a second moment within a predetermined time later than the first moment. If it is determined according to the second detection signal that the first electronic device meets the flipping condition, it is determined that the first electronic device is in the second state.

[0160] Optionally, the controller 604 determines that the first electronic device meets the flipping condition according to the second detection signal, including:

[0161] Obtain the rotation angle of the first electronic device in the target direction according to the second detection signal;

[0162] When the rotation angle is greater than or equal to the angle threshold, it is determined that the first electronic device meets the flipping condition.

[0163] Optionally, the detection signal includes a first detection signal and a third detection signal. The first detection signal is used to detect the spatial state between the first end of the first electronic device and the second electronic device, and the third detection signal is used to detect the spatial state between the first electronic device and the second electronic device.

[0164] Optionally, the first detection signal is a signal obtained based on a pressure sensor at the first end, and the third detection signal is a communication signal formed when the touch surfaces of the first electronic device and the second electronic device are in contact.

[0165] Optionally, the controller 604 determines that the first electronic device is in the second state according to the detection signal, including:

[0166] When it is determined according to the pressure sensing signal that the first electronic device is not in the first state and a communication signal is received, it is determined that the first electronic device is in the second state.

[0167] An embodiment of this application also provides an electronic device, which may be the second electronic device. Please refer to Figure 7 , and the second electronic device may include the following components.

[0168] A receiver 701, configured to receive a control signal of a first electronic device, where the control signal is related to a detection signal of the first electronic device, and the detection signal is used to characterize a spatial state of the first electronic device;

[0169] A processor 702, configured to:

[0170] When it is determined according to the control signal that the first electronic device is in a first state, obtain first touch data input by the first electronic device moving on a touch surface of a second electronic device through a first end, so as to generate a trajectory image according to the first touch data;

[0171] When it is determined according to the control signal that the first electronic device is in a second state, obtain second touch data according to the movement of the first electronic device on the touch surface of the second electronic device, so as to erase at least part of the displayed trajectory image based on the second touch data.

[0172] The receiver 701 may be a Bluetooth communication module, or may be other wireless communication modules.

[0173] Optionally, when the first electronic device is in contact with the touch surface of the second electronic device, the processor 702 may form a communication signal, and the communication signal may be used to generate a control signal.

[0174] For the working principle of the above electronic device, reference may be made to the relevant steps in the control method of the foregoing embodiments, which will not be elaborated herein.

[0175] It should be noted that the embodiments in this specification are all described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the embodiments may be referred to each other.

[0176] For the sake of description convenience, when describing the above system or device, various modules or units are described separately according to functions. Of course, when implementing this application, the functions of each unit may be implemented in one or more software and / or hardware.

[0177] Through the description of the above embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0178] Finally, it should also be noted that in this text, relational terms such as first, second, third, and fourth are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising said element.

[0179] The above are only the preferred embodiments of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. A control method, applied to a first electronic device, comprising: Obtaining a detection signal characterizing the spatial state of the first electronic device; When it is determined according to the detection signal that the first electronic device is in a second state, sending a first control signal to a second electronic device, so that when the second electronic device meets a first preset condition associated with a second end of the first electronic device, at least part of a displayed trajectory image is erased, wherein when the first electronic device is in a first state, the first electronic device moves on a touch surface of the second electronic device through a first end opposite to the second end to input first touch data, so that the second electronic device generates the trajectory image.

2. The method according to claim 1, wherein the detection signal includes a first detection signal and a second detection signal, the first detection signal is used to detect the spatial state between a first end of the first electronic device and the second electronic device, and the second detection signal is used to detect the inclination state of the first electronic device; The obtaining a detection signal characterizing the spatial state of the first electronic device includes: Obtaining a detection signal, the detection signal characterizing whether the spatial state of the first electronic device has flipped.

3. The method according to claim 2, wherein the determining that the first electronic device is in a second state according to the detection signal includes: Detecting the first detection signal at a first moment, and detecting the second detection signal at a second moment within a predetermined time later than the first moment. If it is determined according to the second detection signal that the first electronic device meets a flipping condition, it is determined that the first electronic device is in a second state.

4. The method according to claim 3, wherein the determining that the first electronic device meets a flipping condition according to the second detection signal includes: Obtaining a rotation angle of the first electronic device in a target direction according to the second detection signal; When the rotation angle is greater than or equal to an angle threshold, determining that the first electronic device meets a flipping condition.

5. The method according to claim 1, wherein the detection signal includes a first detection signal and a third detection signal, the first detection signal is used to detect the spatial state between a first end of the first electronic device and the second electronic device, and the third detection signal is used to detect the spatial state between the first electronic device and the second electronic device.

6. The method according to claim 5, wherein the first detection signal is a signal obtained by a pressure sensor based on the first end, and the third detection signal is a communication signal formed when the first electronic device is in contact with a touch surface of the second electronic device.

7. The method according to claim 6, wherein the determining that the first electronic device is in a second state according to the detection signal includes: When it is determined according to a pressure sensing signal that the first electronic device is not in a first state and the communication signal is received, determining that the first electronic device is in a second state.

8. A control method, applied to a second electronic device, comprising: Receiving a control signal of a first electronic device, the control signal being related to a detection signal of the first electronic device, the detection signal being used to characterize a spatial state of the first electronic device; When it is determined according to the control signal that the first electronic device is in a first state, obtaining first touch data input by the first electronic device moving on a touch surface of the second electronic device through a first end, so as to generate a trajectory image according to the first touch data; When it is determined according to the control signal that the first electronic device is in a second state, obtaining second touch data according to the first electronic device moving on the touch surface of the second electronic device through a second end, so as to erase at least part of the displayed trajectory image based on the second touch data.

9. The method according to claim 8, wherein A communication signal formed when the first electronic device is in contact with the touch surface of the second electronic device is used to generate the control signal.

10. An electronic device, the electronic device being the first electronic device, comprising: A first end and a second end opposite to the first end; A detector for obtaining a detection signal characterizing a spatial state of the first electronic device; A controller for: When it is determined according to the detection signal that the first electronic device is in a second state, sending a first control signal to a second electronic device, so that the second electronic device erases at least part of the displayed trajectory image when a first preset condition associated with the second end is satisfied; When the first electronic device is in a first state, moving on the touch surface of the second electronic device through the first end of the first electronic device to input first touch data, so that the second electronic device generates the trajectory image.