CN117707349A - Method for detecting pen point direction of handwriting pen, electronic equipment and handwriting pen - Google Patents

Method for detecting pen point direction of handwriting pen, electronic equipment and handwriting pen Download PDF

Info

Publication number
CN117707349A
CN117707349A CN202311243500.3A CN202311243500A CN117707349A CN 117707349 A CN117707349 A CN 117707349A CN 202311243500 A CN202311243500 A CN 202311243500A CN 117707349 A CN117707349 A CN 117707349A
Authority
CN
China
Prior art keywords
stylus
acceleration
handwriting pen
pen
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311243500.3A
Other languages
Chinese (zh)
Inventor
刘开罩
李铁良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202311243500.3A priority Critical patent/CN117707349A/en
Publication of CN117707349A publication Critical patent/CN117707349A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0346Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of the device orientation or free movement in a 3D space, e.g. 3D mice, 6-DOF [six degrees of freedom] pointers using gyroscopes, accelerometers or tilt-sensors
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P15/00Measuring acceleration; Measuring deceleration; Measuring shock, i.e. sudden change of acceleration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • G06F3/03545Pens or stylus

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The electronic equipment can be a mobile phone, a tablet device and other equipment comprising a display screen, and the method can judge the actual orientation of the handwriting pen nib according to the relative value between the acceleration value reported by the handwriting pen and the acceleration value of the electronic equipment, so that the electronic equipment can be used for matching the current handwriting pen with a target picture with the consistent nib orientation according to the actual orientation of the handwriting pen nib; in addition, the actual orientation of the handwriting pen nib can be judged according to the working state of the Hall sensor acquired by the electronic equipment, so that the electronic equipment can match a target picture for the current handwriting pen according to the actual orientation of the handwriting pen nib. The method can accurately judge the actual orientation of the pen point of the handwriting pen, avoids the problem that the electronic equipment cannot recognize the direction when the handwriting pen is adsorbed, enriches popup window pictures in a prompt window on the electronic equipment, and improves user experience.

Description

Method for detecting pen point direction of handwriting pen, electronic equipment and handwriting pen
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a method for detecting a pen tip direction of a handwriting pen, an electronic device, and a handwriting pen.
Background
Along with the development of electronic equipment, the functions of the electronic equipment are more and more abundant, and the use requirements of users in different scenes are almost met, for example, the users can record notes through the electronic equipment in the scenes of daily conferences, video learning and the like, so that the recording requirements of the users are met.
Many people may still be enthusiastic to use traditional papers and pens during the process of recording notes by electronic devices, and various electronic devices are currently configured with corresponding "handwriting pens" such as the HUAWEI M-pen of the chinese company, etc., in order to bring the user with the traditional papers and pens writing experience. By way of example, taking a tablet device as an example, a user may attach a stylus to the tablet device when the user does not need to use the stylus; when a user uses the stylus, bluetooth of the tablet device can be opened, available devices can be searched, pairing, connection and the like between the tablet device and the stylus can be established.
In a possible implementation manner, during the adsorption and pairing process of the handwriting pen and the tablet device, a prompt window can be automatically popped up on a display screen of the tablet device, and the prompt window can comprise pictures and/or prompt information of the handwriting pen. The prompt window may alert the user: and detecting that the handwriting pen is in an adsorption state, or establishing Bluetooth connection between a handwriting pen request and the tablet equipment, and the like. In the implementation manner, the tablet device cannot detect and identify the direction of the pen tip of the handwriting pen, only the preset picture of the handwriting pen is displayed in the prompt window, the picture of the handwriting pen is fixed and single, the specific use condition, the use habit and the like of a user cannot be combined, the actual direction of the pen tip of the handwriting pen cannot be obtained and matched, the proper picture is displayed for the user, and the use experience of the user is affected.
In another possible implementation manner, when the tablet device and the stylus complete primary pairing, the tablet device may store device information, bluetooth connection information, etc. of the stylus, and in a subsequent use process, if the tablet device and the stylus are paired again, a prompt window is not popped up on the tablet device, and a picture of the stylus is not displayed any more. The implementation mode can not timely display the adsorption state, the pairing state and the like of the handwriting pen for the user, and the use experience of the user can be influenced.
Disclosure of Invention
The method can accurately judge the actual direction of the pen point of the handwriting pen, solves the problem that the electronic equipment cannot recognize the direction when the handwriting pen adsorbs the electronic equipment, can display the handwriting pen picture consistent with the actual direction of the pen point of the handwriting pen in the prompt window, enriches the popup window picture in the prompt window on the electronic equipment, and improves the user experience.
A first aspect provides a method of detecting a stylus tip direction for an electronic device including a display screen, the electronic device being capable of supporting a stylus as an input device for the electronic device, the method comprising: when the stylus is adsorbed to a preset position of a target frame of the electronic equipment, receiving information which is sent by the stylus and comprises acceleration of the stylus in a first axis direction, acceleration of the stylus in a second axis direction and acceleration of the stylus in a third axis direction, wherein the first axis is parallel to the target frame, the second axis is parallel to an adjacent frame of the target frame, and the third axis is perpendicular to a plane determined by the first axis and the second axis; acquiring acceleration of the electronic equipment in the first axis direction, acceleration of the electronic equipment in the second axis direction and acceleration of the electronic equipment in the third axis direction; calculating the relative values of the acceleration of the handwriting pen and the acceleration of the electronic equipment in the first axis direction, the second axis direction and the third axis direction respectively, and determining the actual direction of the handwriting pen point; determining a target picture of the handwriting pen according to the actual direction of the handwriting pen nib, wherein the direction of the handwriting pen nib displayed in the target picture of the handwriting pen is the same as the actual direction of the handwriting pen nib; and displaying a prompt window on the display screen, wherein the prompt window displays the target picture of the handwriting pen. It should be understood that: herein, "the direction of the pen tip displayed in the target picture of the pen and the actual direction of the pen tip are the same" includes both cases where the direction of the pen tip displayed in the target picture of the pen and the actual direction of the pen tip are identical, and also includes cases where the direction of the pen tip displayed in the target picture of the pen and the actual direction of the pen tip are not identical, for example, cases where some deviation exists. As an implementation, only the large direction is kept consistent.
Alternatively, the acceleration may be measured by any one of an acceleration sensor, a gyroscope, a magnetometer (magnetometer sensor, M-sensor), an inertial detection unit (inertial measurement unit, IMU), and the like, which is not limited in this embodiment of the present application.
By the method, when the handwriting pen is adsorbed on the frame of the electronic device, the electronic device can receive the acceleration value of the pen end acceleration sensor in the direction of each coordinate axis sent by the handwriting pen, and the electronic device judges the actual orientation of the handwriting pen point according to the relative value between the acceleration value of the handwriting pen in the direction of each coordinate axis and the acceleration value output by the acceleration sensor of the electronic device, so that the electronic device can be used for matching a target picture for the current handwriting pen according to the actual orientation of the handwriting pen point.
According to the implementation process, when the handwriting pen is adsorbed on the frame of the electronic equipment and is matched with the electronic equipment, the electronic equipment can accurately judge the actual direction of the handwriting pen point, so that the problem that the electronic equipment cannot identify the direction of the handwriting pen point when the handwriting pen is adsorbed is avoided; in addition, when the electronic equipment displays the handwriting pen picture through the popup window, the picture matched with the actual direction of the handwriting pen nib can be selected, the preset picture with the unique nib direction can not be displayed singly, the content and the variety of the popup window picture are enriched, and the user experience in the handwriting pen using process is greatly improved.
With reference to the first aspect, in certain implementation manners of the first aspect, the calculating a relative value of an acceleration of the stylus and an acceleration of the electronic device in the first axis direction, the second axis direction, and the third axis direction, respectively, and determining an actual direction of a pen tip of the stylus includes: determining the difference value between the acceleration of the stylus and the acceleration of the electronic device as the relative value between the acceleration of the stylus and the acceleration of the electronic device in the first axis direction, the second axis direction and the third axis direction respectively; when the relative values of the acceleration of the handwriting pen and the acceleration of the electronic equipment in the first axis direction, the second axis direction and the third axis direction are all 0, determining that the actual direction of the handwriting pen point is the first axis direction; and when the relative value of the acceleration of the stylus and the acceleration of the electronic equipment in the first axis direction and the third axis direction is not 0, determining that the actual direction of the stylus pen point is the opposite direction of the first axis direction.
For example, when the tablet device is taken as an example and the stylus is adsorbed on the long frame of the tablet device, the first axis may be parallel to the long frame of the tablet device, the second axis may be parallel to the short frame of the tablet device, and the third axis may be perpendicular to the plane of the display screen of the tablet device, that is, "the third axis is perpendicular to the plane determined by the first axis and the second axis".
It should be understood that the acceleration sensor of the tablet device and the acceleration sensor of the stylus may be three-axis sensors, which may be referred to as "three-axis sensor of the tablet device" and "three-axis sensor of the pen end of the stylus", respectively, and the type of the acceleration sensor is not limited in the embodiments of the present application.
It should also be understood that for tablet devices and handwriting pens, the mounting location of the acceleration sensor is fixed, i.e. the coordinate system to which the acceleration value obtained by the acceleration sensor during operation corresponds is also fixed. Then, during actual use of the tablet device, the positions of the tablet device and the stylus are relatively fixed after the stylus is attached to the long bezel of the tablet device, i.e., the positions of the acceleration sensor of the tablet device and the acceleration sensor of the stylus are also relatively fixed, regardless of how the tablet device is placed, e.g., horizontally placed, obliquely placed, inverted placed, etc. In other words, the magnitude of the acceleration in each direction of the coordinate axes is also fixed, i.e., the first axis direction, the second axis direction, the third axis direction are all fixed. Therefore, the actual orientation of the stylus tip can be determined by the relative value of the acceleration in each direction.
For example, in the present embodiment, "the relative value of the acceleration in each direction" can be understood as: in this direction, the acceleration value of the tablet device is subtracted by the acceleration value of the stylus. Alternatively, the difference (i.e., the "relative value" of the acceleration in that direction) may be positive, negative, or 0, and the tablet device may determine the actual orientation of the stylus tip based on the relative values of the acceleration in each direction.
For example, if the relative value of the acceleration in each axis direction is 0 in only one direction, the relative value of the acceleration in the two directions is not 0 and the magnitude of the relative value is 2 times the magnitude of the acceleration, the tablet device may determine that the directions of the acceleration in the two directions are opposite, and then the actual direction of the stylus tip is parallel to the long frame and changes to the opposite direction of the original first axis direction.
Through the process, according to the relative value between the acceleration value of the acceleration sensor at the pen end of the handwriting pen and the acceleration value output by the acceleration sensor of the electronic equipment, the electronic equipment can judge the actual orientation of the pen point of the handwriting pen, so that a target picture can be matched for the current handwriting pen according to the actual orientation of the pen point of the handwriting pen.
In one possible implementation, the electronic device may store a handwriting photo library locally, where the handwriting photo library may include a plurality of handwriting photos of different manufacturers, different models, different styles, different types, and different pen tip orientations. Or, different manufacturers and different models of handwriting pens are provided with a plurality of different pictures to form a handwriting pen picture library, and the electronic equipment can select matched target pictures.
Optionally, in this embodiment of the present application, first, according to the device information of the handwriting pen acquired in the first stage, the electronic device may select, from a plurality of handwriting pen pictures of different manufacturers and different models included in the handwriting pen picture library, a plurality of pictures consistent with the manufacturer and the product model of the current handwriting pen. Next, the electronic device may continue to select, as the "target picture", a stylus picture matching the actual orientation of the pen tip from the plurality of stylus pictures according to the actual orientation of the pen tip determined in step 407.
It should be understood that the "target picture" finally determined by the electronic device is a picture consistent with the current manufacturer, product model, and actual orientation of the pen tip of the handwriting pen, where the target picture may include information related to the manufacturer, product model, and the like, and the embodiment of the present application is not limited thereto.
In another possible implementation manner, after determining the actual orientation of the pen tip of the stylus, the electronic device may send a request message to the server, where the request message is used to request to obtain a picture of the stylus, and the request message carries indication information, where the indication information is used to indicate the actual orientation of the pen tip of the stylus. The server may select, according to a request message sent by the electronic device, a handwriting picture matching with an actual direction of the pen tip from a plurality of handwriting pictures of the stored handwriting picture resource as a "target picture", and then return the "target picture" to the electronic device. The method for the electronic device to acquire the target picture of the stylus is not limited in the embodiment of the application.
Alternatively, the server may be a server corresponding to the electronic device, a server corresponding to the handwriting pen, or a server corresponding to an application program (for example, a third party application), which is not limited in the embodiment of the present application.
By the method, when the electronic equipment displays the handwriting pen picture through the popup window, the picture matched with the actual direction of the handwriting pen nib can be selected, and a preset picture with the unique nib direction can not be displayed singly; and the handwriting pen pictures are wide in source, so that the content and the variety of the popup window pictures can be enriched, and the user experience in the handwriting pen using process is greatly improved.
With reference to the first aspect and the foregoing implementation manner, in some implementation manners of the first aspect, the electronic device further includes one or more magnetic attraction modules, and a plurality of hall sensors, where the magnetic attraction modules are used for adsorbing the handwriting pen to a preset position of the target frame, and at least one hall sensor is respectively disposed on two sides of each magnetic attraction module, and the method further includes: acquiring working state information of each Hall sensor in the plurality of Hall sensors; and determining the actual direction of the pen point of the handwriting pen according to the working state information of each Hall sensor in the plurality of Hall sensors.
It should be understood that in the embodiment of the present application, the electronic device and the stylus are both provided with hall sensors, and the hall sensors may be composed of hall elements, accessory circuits, and the like. On one hand, the Hall sensors on the electronic equipment and the handwriting pen can monitor the change of the magnetic field, and on the other hand, the Hall sensors on the electronic equipment and the handwriting pen can also be used as a switch, so that the information interaction (beginning to send handshake data and the like) flow between the electronic equipment and the handwriting pen can be automatically controlled.
By the method, in another possible scenario, if the acceleration value of the pen end acceleration sensor of the stylus is not transmitted to the electronic device side, or the acceleration value of the pen end acceleration sensor of the stylus fails to be transmitted, in the embodiment of the application, the electronic device can also judge the actual orientation of the pen point through the working state of the hall sensor, so that the electronic device can match the target picture with the current stylus according to the actual orientation of the pen point.
With reference to the first aspect and the foregoing implementation manner, in some implementation manners of the first aspect, the prompt window is further configured to display one or more of a device name, a product model, a manufacturer, a remaining power of a current stylus, a battery identifier, a charging progress bar, a cancel control, and a connect control of the stylus.
Optionally, the prompt window may further display at least one of a product model of the current handwriting pen, a manufacturer, and other contents, and at least one of a remaining capacity of the current handwriting pen, a battery identifier, a charging progress bar, and other contents, where in the embodiment of the present application, the content displayed in the prompt window popped up by the electronic device is not limited. The remaining power may be displayed in a percentage form, so as to prompt the user that the current power of the handwriting pen occupies the percentage of the power in the fully charged state, which is not repeated herein for simplicity.
With reference to the first aspect and the foregoing implementation manner, in some implementation manners of the first aspect, the displaying a prompt window on the display screen includes: determining a target display effect according to the actual direction of the pen point of the handwriting pen, the acceleration of the handwriting pen in the first axis direction, the acceleration of the handwriting pen in the second axis direction, the acceleration of the handwriting pen in the third axis direction, the number of pictures contained in a target picture of the handwriting pen, and/or a plurality of preset popup effects; and displaying the prompt window on the display screen according to the target display effect.
Optionally, when the electronic device automatically pops up the prompt window, the prompt window may have different styles and different sizes, and the prompt window may have different popup animations, which is not limited in the embodiments of the present application.
For example, the display position of the prompt window may be determined according to a preset position of a target frame absorbed by the stylus, for example, a long frame immediately below a display screen absorbed by the stylus, and the like.
Optionally, the electronic device may also automatically adjust the size of the prompt window. For example, the prompt window may be a smaller-sized longitudinal window in close proximity to the short frame of the display screen; the electronic device may also adjust the layout in the prompt window, for example, adjust the size of a preset picture of the stylus, cancel the control, connect the control, which is not limited in this embodiment of the present application.
In a possible implementation manner, the electronic device may increase the corresponding display effect during the process of popup of the prompt window.
Alternatively, the display of the prompt window may have a static display effect, or a dynamic display effect, that is, the popup window process also has a dynamic play effect.
For example, the prompt window may move from top to bottom, from bottom to top, according to a certain track, or the prompt window may appear on the display screen in a shutter, diamond-shaped lattice, or the like, which may have a dynamic playing effect in the embodiment of the present application is not limited.
Alternatively, the animation effect may match the acceleration of the pen tip in any one of the coordinate axes of the stylus, e.g., the prompt window may be moved at a rate on the display screen of the electronic device. Alternatively, the animation effect may match the user's usage habits, e.g., the prompt window is set by the user to a blinking appearance, a bouncing appearance, etc. Still alternatively, the pop-up window process of the electronic device may be presented with a default of a plurality of possible animation effects, which are not limited in this embodiment of the present application.
Optionally, the popup process may be accompanied by a dynamic change process such as a size and transparency of a target picture of the handwriting pen in the prompt window, for example, the size of the target picture of the handwriting pen may be displayed in an enlarged manner with an increase of the playing window or in a reduced manner with a decrease of the playing window, so that an animation effect of the popup process may further provide a coherent immersive experience for the user, and a visual experience of the user is improved.
With reference to the first aspect and the foregoing implementation manner, in some implementation manners of the first aspect, when the target picture of the stylus includes a plurality of stylus pictures, displaying the target picture of the stylus in the prompt window includes: and displaying each of the plurality of handwriting pen pictures in the prompt window in sequence according to the preset duration.
In another possible implementation manner, the "target picture of the stylus" in the embodiments of the present application may be one picture, or multiple pictures. For example, when the "target picture of the handwriting pen" is a plurality of pictures, the target pictures of the handwriting pen may be replaced in turn in the process of popping up the prompt window, for example, each of the plurality of pictures is displayed for a fixed period of time, so that the prompt window also has a display effect of dynamic playing.
Through the implementation manner, the embodiment of the application can provide various possible display effects of the prompt window for the user, such as animation of the popup window, change process of the prompt window on the display screen, picture display effect inside the prompt window and the like, enriches window content and improves visual experience of the user.
With reference to the first aspect and the foregoing implementation manner, in some implementation manners of the first aspect, the electronic device stores a handwriting pen data set, where the handwriting pen data set includes device information and bluetooth information of one or more handwriting pens that can be adapted to the electronic device, and the method further includes: receiving equipment information sent by the handwriting pen, and carrying out equipment verification on the handwriting pen according to the handwriting pen data set and the equipment information; and/or receiving Bluetooth information sent by the handwriting pen, and carrying out Bluetooth verification on the handwriting pen according to the handwriting pen data set and the Bluetooth information.
Optionally, the device information includes one or more of a device name, a product serial number, software system information, and product hardware information of the stylus, which is not limited in the embodiment of the present application.
Optionally, the bluetooth information includes one or more of bluetooth protocol information, wireless information, media access control address information during bluetooth connection, and internet protocol address information of the stylus, which is not limited in the embodiments of the present application.
In summary, by the method for detecting the direction of the pen tip of the handwriting pen described in the embodiment of the present application, the handwriting pen may send the acceleration value of the pen end acceleration sensor in the direction of each coordinate axis to the electronic device, and the electronic device may determine the actual direction of the pen tip of the handwriting pen according to the relative value between the acceleration value reported by the handwriting pen and the acceleration value output by the acceleration sensor of the electronic device, so that the electronic device may match the current handwriting pen with the target picture according to the actual direction of the pen tip of the handwriting pen.
Or if the acceleration value of the pen end acceleration sensor of the handwriting pen is not transmitted to the electronic equipment side, or if the acceleration value of the pen end acceleration sensor of the handwriting pen fails to be transmitted, in the embodiment of the application, the electronic equipment can judge the actual orientation of the pen point of the handwriting pen through the working state of the Hall sensor, so that the electronic equipment can match a target picture for the current handwriting pen according to the actual orientation of the pen point of the handwriting pen.
According to the implementation process, when the handwriting pen is adsorbed on the frame of the electronic equipment and is matched with the electronic equipment, the electronic equipment can accurately judge the actual direction of the handwriting pen point, so that the problem that the electronic equipment cannot identify the direction of the handwriting pen point when the handwriting pen is adsorbed is avoided; in addition, when the electronic equipment displays the handwriting pen picture through the popup window, the picture matched with the actual direction of the handwriting pen nib can be selected, the preset picture with the unique nib direction can not be displayed singly, the content and the variety of the popup window picture are enriched, and the user experience in the handwriting pen using process is greatly improved.
A second aspect provides a method of detecting a pen tip direction for a stylus capable of functioning as an input device for an electronic device including a display screen, the method comprising: when the distance between the handwriting pen and the electronic equipment is smaller than or equal to a preset distance, sending equipment information to the electronic equipment, wherein the equipment information comprises one or more of equipment names, product serial numbers, software system information and product hardware information of the handwriting pen; receiving device verification information sent by the electronic device, and determining information of acceleration of the handwriting pen in a first axis direction, acceleration of the handwriting pen in a second axis direction and acceleration of the handwriting pen in a third axis direction when the device verification information indicates that the handwriting pen can be matched with the electronic device, wherein the first axis is parallel to the target frame, the second axis is parallel to an adjacent frame of the target frame, and the third axis is perpendicular to a plane determined by the first axis and the second axis; transmitting Bluetooth information, acceleration of the stylus in a first axis direction, acceleration of the stylus in a second axis direction and acceleration of the stylus in a third axis direction to the electronic equipment, wherein the Bluetooth information comprises one or more of Bluetooth protocol information, wireless information, media Access Control (MAC) address information during Bluetooth connection and Internet Protocol (IP) address information of the stylus; and receiving Bluetooth verification information sent by the electronic equipment, and determining whether the handwriting pen can establish Bluetooth connection with the electronic equipment.
With reference to the second aspect, in some implementations of the second aspect, the stylus includes at least one magnetic attraction module, and at least one hall sensor, where the magnetic attraction module is configured to attract the stylus to a preset position of the target frame.
It should be understood that in the embodiments of the present application, both the electronic device and the stylus may have a wireless chip, where the wireless chip may support wireless communication within a preset distance, that is, it may be implemented that the stylus may send handshake data to the electronic device based on a "wireless transparent manner". In this embodiment of the present application, the information sent by the handwriting pen to the electronic device may include, in addition to the device information and bluetooth information of the handwriting pen, also send numerical information of a pen end acceleration sensor to the electronic device, where the numerical information of the pen end acceleration sensor may be used by the electronic device to determine an actual direction of a pen tip of the handwriting pen.
It should be understood that the data volume of the numerical information of the pen end acceleration sensor of the handwriting pen is extremely small, new information can be generated by combining the numerical information with the Bluetooth information of the handwriting pen, the small data volume can be transmitted to the electronic equipment in the existing wireless transparent transmission mode, and the wireless transparent transmission data volume cannot be increased.
A third aspect provides an electronic device comprising: a display screen; one or more sensors of an acceleration sensor, an inertial detection unit IMU and a gyroscope; one or more processors; one or more memories; a module in which a plurality of application programs are installed; the memory stores one or more programs that, when executed by the processor, cause the electronic device to perform the method of any of the first and second aspects.
A fourth aspect provides a stylus capable of functioning as an input device for an electronic device comprising a display screen, the stylus comprising: a pen point; one or more sensors of an acceleration sensor, an inertial detection unit IMU and a gyroscope; one or more processors; one or more memories; the memory stores one or more programs that, when executed by the processor, cause the stylus to perform the method of any one of the second and third aspects.
A fifth aspect provides a system comprising an electronic device capable of communicating with each other and a stylus capable of functioning as an input device for an electronic device comprising a display screen, the electronic device being capable of performing the method as claimed in any of the implementations of the first and second aspects, the stylus being capable of performing the method as claimed in any of the implementations of the second and second aspects.
A sixth aspect provides a graphical user interface system on an electronic device with a touch screen, one or more memories, and one or more processors to execute one or more computer programs stored in the one or more memories, the graphical user interface system comprising a graphical user interface displayed by the electronic device when the electronic device performs the method of any of the first and second aspects.
A seventh aspect provides an apparatus, the apparatus being comprised in an electronic device, the apparatus having functionality to implement the electronic device behaviour of the first aspect and any one of the possible implementations of the first aspect. Alternatively, the device may be incorporated in a stylus, the device having the functionality to enable the stylus behaviour described in the second aspect and any one of the possible implementations of the second aspect.
Alternatively, the functions of the device may be implemented by hardware, or may be implemented by executing corresponding software by hardware. The hardware or software includes one or more modules or units corresponding to the functions described above. Such as a display module or unit, a detection module or unit, a processing module or unit, etc.
An eighth aspect provides a computer readable storage medium storing computer instructions that, when run on an electronic device, cause the electronic device to perform the above-described first aspect or any of the possible methods of the first aspect, or perform the method as described in any of the second and second aspects.
A ninth aspect provides a computer program product for causing an electronic device to carry out any one of the possible methods of the first aspect or the first aspect described above or for causing the electronic device to carry out any one of the possible methods of the stylus according to the second aspect and the second aspect when the computer program product is run on the electronic device.
Drawings
FIG. 1 is a diagram illustrating an example of a graphical user interface in which a user may attach a stylus to a side frame of a tablet device.
Fig. 2 is a schematic structural diagram of an example of an electronic device according to an embodiment of the present application.
Fig. 3 is a software configuration block diagram of an example of an electronic device according to an embodiment of the present application.
Fig. 4 is a schematic flowchart of a method for detecting a pen tip direction of a stylus according to an embodiment of the present application.
Fig. 5 is a schematic diagram of an operation principle of an acceleration sensor of a stylus pen and a tablet device according to an embodiment of the present application.
Fig. 6 is a schematic diagram illustrating the operation of the hall sensor when the stylus is attached to the side frame of the tablet device.
Fig. 7 is a schematic view of a popup window when a handwriting pen is adsorbed on a side frame of a tablet device according to an embodiment of the present application.
Detailed Description
In this embodiment of the present application, to implement pairing and bluetooth connection processes between an electronic device such as a tablet device and a mobile phone and a stylus, and further implement an operation process of a user using the stylus to record notes ON a display screen of the electronic device, first, the user may set the "stylus" control switch to an ON (or "ON") state according to an operation path of the "set application" — "auxiliary function" option "—" stylus "option" - "stylus" control switch ", so that the electronic device may receive and detect one or more operations performed by the user using the stylus ON the display screen of the electronic device, which is not described in detail later in this embodiment of the present application.
In addition, electronic devices of different types or having different software system versions may be adapted to one or more fixed types of handwriting pens, and the type of the electronic device, the software system version and the type of the handwriting pen are not limited in this embodiment, and it is assumed that the type of the electronic device, the software system version and the type of the handwriting pen are mutually adapted, which will not be described in detail in the following embodiments.
For ease of understanding, the following will take as an example a tablet device (e.g. Mate Pad Pro of wagons) and a stylus (e.g. HUAWEI M-pen) that are mutually adapted, and the adsorption, pairing and bluetooth connection procedure between the tablet device and the stylus will be specifically described with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of a graphical user interface (graphical user interface, GUI) in which a user holds a stylus on a side frame of a tablet device.
By way of example, fig. 1 (a) illustrates an interface 101 displayed by the tablet device 10 in the unlock mode, which interface 101 may display various applications (apps) and the like. The plurality of applications may include clocks, calendars, gallery, memos, weChat, music, settings, etc., among others. It should be appreciated that the interface 101 may also include other more content and more applications, for example, the interface 101 may also display more content of a current time and date, weather components, etc., which are not limited in this embodiment of the present application.
In one possible implementation, the user may trigger the pairing process of the stylus 20 and tablet device 10 if the stylus 20 is directly attached to the side frame of the tablet device 10.
Alternatively, when the user does not need to use the stylus 20, or the stylus 20 is not in a mated state, or the remaining amount of the stylus 20 is insufficient, the user may directly approach the stylus 20 to the tablet device 10 and attach the stylus 20 to the bezel of the tablet device 10 by means of "strong magnetic attraction", for example, the stylus 20 may be attached to a long bezel of the tablet device 10.
It should be understood that the storage safety of the stylus 20 can be ensured by the "strong magnetic attraction", on one hand, the "strong magnetic attraction" can trigger the pairing of the stylus 20 and the tablet device 10, and on the other hand, the magnetic attraction type charging process of the stylus 20 can be completed, which is not repeated in the embodiment of the present application.
For example, when the tablet device 10 displays the interface 101 as shown in fig. 1 (a), if the user directly adsorbs the stylus 20 to the target position of the long bezel of the tablet device 10, the stylus 20 and the tablet device 10 may be triggered to pair and magnetically-attractive charge. Accordingly, in response to the adsorption process and the pairing process of the stylus 20, the prompt window 101-1 may be automatically popped up on the interface 101 of the tablet device 10, and the prompt window 101-1 may display: preset pictures of stylus 20, device names of stylus 20, "cancel" control, "connect" control, etc. The user can click on the "connect" control in the prompt window 101-1 according to the own requirement, so as to further trigger the handwriting pen 20 and the tablet device 10 to establish bluetooth connection; alternatively, clicking the "cancel" control in the prompt window 101-1 interrupts the process of establishing bluetooth connection with the stylus 20 and the tablet device 10, and for simplicity, will not be described in detail herein.
It should be noted that, no matter what interface is displayed on the display screen of the tablet device 10, for example, the main interface shown in fig. 1 (a), or any running interface of an application program, when the stylus 20 is adsorbed to the target position of the long border of the tablet device 10, the stylus 20 and the tablet device 10 may be triggered to pair and automatically pop up the prompt window 101-1, and the interface displayed on the tablet device 10 is not limited in this embodiment of the present application.
Illustratively, taking the setting application installed on the tablet device 10 as an example, when the tablet device 10 displays the running interface 102 of the setting application as shown in the (b) diagram in fig. 1, if the user directly adsorbs the stylus 20 to the target position of the long frame of the tablet device 10, the stylus 20 and the tablet device 10 may be triggered to pair and magnetically-attractive charge. Accordingly, in response to the adsorption process and the pairing process of the stylus 20, the prompt window 102-1 may be automatically popped up on the interface 102 of the tablet device 10, and the prompt window 102-1 may display the same content as the prompt window 101-1, which is not described herein again for brevity.
It should be further noted that, the tablet device 10 includes at least 4 frames, such as 2 long frames and 2 short frames, and the stylus 20 may be attached to a target position of any one frame of the tablet device 10, and the target position of the stylus 20 attached to the long frame of the tablet device 10 will be described herein as an example. It should be appreciated that the embodiments of the present application are not limited to a bezel to which stylus 20 can be attached.
Alternatively, the tip of stylus 20 may face a different direction, or alternatively, the tip of stylus 20 may have a different "orientation", when the user is sucking stylus 20 to the target location of the long bezel of tablet device 10.
Illustratively, in fig. 1 (a), when the tablet device 10 is placed as shown, the actual orientation of the pen tip of the stylus 20 may be parallel to the long bezel of the tablet device 10 and point to the left as indicated by the black arrow; in fig. 1 (b), the actual orientation of the tip of stylus 20 may be parallel to the long bezel of tablet device 10 and pointed to the right as indicated by the black arrow.
For the two different orientations that the pen tip of the stylus 20 may have as listed above, when the stylus 20 begins to mate with the tablet device 10, a prompt window, such as the prompt window 101-1 shown in fig. 1 (a), and the prompt window 102-1 shown in fig. 1 (b), may automatically pop up on the display screen of the tablet device 10. The prompt window 101-1 and the prompt window 102-1 may display the same content, that is, the prompt window 101-1 and the prompt window 102-1 display the same preset picture of the handwriting pen 20, the device name of the handwriting pen 20, the "cancel" control, and the "connect" control, where the orientation of the pen point in the preset picture of the same handwriting pen 20 is kept consistent.
It should be appreciated that the alert window 101-1 (or alert window 102-1) is automatically popped up on the display of the tablet device 10 before the tablet device 10 and stylus 20 establish a bluetooth connection, in other words, the tablet device 10 and stylus 20 do not establish a bluetooth connection when the alert window 101-1 (or alert window 102-1) is popped up on the tablet device 10. Specifically, before the bluetooth connection is established between the tablet device 10 and the stylus 20, when the stylus 20 is infinitely close to the tablet device 10 (i.e., the distance between the stylus 20 and the tablet device 10 is less than or equal to a preset distance) until the stylus 20 is adsorbed to the frame of the tablet device 10, the stylus 20 may send handshake data to the tablet device 10 based on the "wireless transparent transmission manner", and after the tablet device 10 receives the handshake data, the prompt window 101-1 (or the prompt window 102-1) is displayed based on the content included in the received handshake data.
Specifically, the tablet device 10 and the stylus 20 may both be mounted with a wireless chip that may support wireless communication within a preset distance. The wireless transparent transmission mode can be based on wireless chips of the tablet device 10 and the stylus 20, and can be understood as transparent transmission of data, or referred to as "serial transparent transmission", the wireless transparent transmission mode does not need to perform any protocol encapsulation and processing on the data, as long as the distance between the tablet device 10 and the stylus 20 meets the range requirement of serial transmission, the stylus 20 can send handshake data to the tablet device 10, that is, the stylus 20 described above can send handshake data to the tablet device 10 based on the wireless transparent transmission mode, and the implementation process of wireless transparent transmission is not repeated in the embodiment of the present application.
It should also be appreciated that in embodiments of the present application, when the prompt window 101-1 (or the prompt window 102-1) is automatically popped up on the tablet device 10, the bluetooth switch of the tablet device 10 and/or the stylus 20 may be in an off state or an on state, which embodiments of the present application are not limited. In other words, the on or off state of the Bluetooth switch of tablet device 10 and/or stylus 20 does not affect the wireless transmission between tablet device 10 and stylus 20, as well as the automatic pop-up process of tablet device 10.
Optionally, the handshake data may include content related to device information of the handwriting pen 20, such as a device name, a product Serial Number (SN), version information of a software system, and product hardware information, where the handshake data includes a small amount of data, and the specific content of the handshake data is not limited in the embodiment of the present application.
The above implementation does not focus on the actual state of the stylus 20, such as the actual orientation of the tip of the stylus 20, for example, the tablet device 10 may not be able to detect and identify the actual orientation of the tip of the stylus 20 when it is attached to the bezel, or, even if the tablet device 10 is able to detect and identify the actual orientation of the tip of the stylus 20 when it is attached, no relevant channel may send information to the tablet device 10 about the actual orientation of the tip of the stylus 20, etc., before the tablet device 10 and the stylus 20 establish a bluetooth connection, while handshaking data relies primarily on wireless transmission of the tablet device 10 and the stylus 20 before the bluetooth connection, in a manner that does not enable the transfer of a large amount of data containing information about the actual orientation of the tip, etc., to the tablet device 10.
Therefore, when the tablet device 10 displays the prompt window 101-1 (or the prompt window 102-1), the actual orientation of the pen tip of the stylus 20 cannot be obtained and determined, only the content related to the device information, such as the device name, the device model, etc., of the stylus 20 can be obtained, the preset picture of the stylus 20 is displayed in the prompt window 101-1 (or the prompt window 102-1), the preset picture is often fixed, the pen tip orientation in the preset picture is single, the actual orientation of the pen tip of the stylus 20 cannot be matched, i.e. the handwriting picture meeting the user requirement cannot be displayed in combination with the specific use condition, the use habit, etc., and the visual experience and the use experience of the user are reduced.
In view of the above problems, an embodiment of the present application provides a method for detecting a direction of a pen tip of a stylus, where the method can detect and identify an actual direction of the pen tip of the stylus in different scenes, and can match different pen pictures according to the actual direction of the pen tip of the stylus, so as to consider use habits of different users, display pen pictures and popup window content meeting actual demands of the users for the users, and improve use experience of the users.
The following describes a technical solution for detecting a pen tip direction in an embodiment of the present application with reference to the drawings in the embodiment of the present application.
The method for detecting the pen tip direction of the handwriting pen provided by the embodiment of the application can be applied to any one of a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (augmented reality, AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA) and the like, which can be paired with the handwriting pen, and can be used as an electronic device of an input device, for example, the electronic device can be the tablet device 10 introduced in fig. 1 and the like, and the specific type of the electronic device is not limited in this application.
For the application scenario shown in fig. 1, before the bluetooth connection between the tablet device 10 and the stylus 20 is established from the user interaction level, a popup window display process and a possible implementation manner of a display screen of the tablet device 10 are described, and a bottom implementation process corresponding to the method for detecting the pen tip direction provided by the embodiment of the present application will be described from the bottom implementation policy level.
It should be understood that the method for detecting the pen tip direction provided in the embodiments of the present application may occur between the stylus 20 and the tablet device 10, the mobile phone, and other electronic devices, where the tablet device, the mobile phone, and other electronic devices in the embodiments of the present application, and the stylus 20, and the like may have a certain hardware structure and a certain software structure.
Fig. 2 is a schematic structural diagram of an example of an electronic device 100 according to an embodiment of the present application.
It should be understood that the electronic device such as a mobile phone, a tablet device, etc. in the embodiments of the present application may include a part of or all of the structures of the electronic device 100 shown in fig. 2, or may further include other structures not shown, which are not limited in the embodiments of the present application.
Likewise, the stylus 20 according to the embodiment of the present application may also include a part of or all of the structure of the electronic device 100 shown in fig. 2, or may further include other structures not shown, which are not limited in this embodiment of the present application.
For example, the stylus 20 may include a nib portion, a body portion, a hall sensor, an acceleration sensor, a wireless chip, a bluetooth module, a magnetic attraction module, etc., and for brevity, the description thereof will not be repeated here.
By way of example, as shown in fig. 2, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In the embodiment of the present application, if the electronic device 100 represents the tablet device 10 in fig. 1, the processor 110 of the electronic device 100 stores device information, bluetooth information, etc. of one or more handwriting pens that can be adapted. Illustratively, it is assumed that the processor 110 of the electronic device 100 stores therein device information such as a device name, a device model number, version information of a software system, product hardware information, and the like of the stylus 20. After the electronic device 100 receives the handshake data sent by the stylus 20, it can check according to the device information of the stylus 20 included in the handshake data and the device information of the stylus capable of being adapted stored in the electronic device 100, to check whether the current stylus 20 is the stylus capable of being adapted, i.e. to check whether the stylus 20 can be used as an input device of the electronic device 100.
Similarly, it is assumed that bluetooth information of the stylus 20, such as bluetooth protocol information, wireless information of the stylus 20, media access control (media access control, MAC) address information at the time of bluetooth connection, internet protocol address (Internet protocol address), and the like, related to bluetooth connection are stored in the processor 110 of the electronic device 100. The electronic device 100 may also verify the bluetooth information of the current stylus 20 to determine whether a bluetooth connection with the stylus 20 can be established, which is not described herein.
Further, in the present embodiment, the processor 110 of the electronic device 100 stores a program code for executing the embodiment of the present application, which enables the electronic device 100 to realize: and receiving the acceleration value information sent by the handwriting pen 20, judging the actual orientation of the pen point of the handwriting pen according to the relative value between the acceleration value reported by the handwriting pen 20 and the acceleration value of the handwriting pen, and then matching the current handwriting pen 20 with a target picture with the same pen point orientation according to the actual orientation of the pen point of the handwriting pen 20. In addition, the working state of the hall sensor can be obtained, and the actual orientation of the pen tip of the stylus 20 is judged according to the working state of the hall sensor, so that the electronic device 100 can match the target picture for the current stylus according to the actual orientation of the pen tip of the stylus 20.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL).
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. In the embodiment of the present application, the processor 110 communicates with the bluetooth module in the wireless communication module 160 through a UART interface, so as to implement the bluetooth function of the electronic device 100.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing functions of electronic device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display functionality of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G/6G, etc. applied on the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In the present embodiment, the electronic device 100 and the stylus are two different electronic devices, and may each include a wireless communication module 160.
For example, both the electronic device 100 and the stylus may have wireless chips that may support wireless communications within a preset distance, i.e., the stylus may send handshaking data to the electronic device 100 based on a "wireless transparent manner".
In this embodiment of the present application, the information sent by the handwriting pen to the electronic device 100 may include bluetooth information of the handwriting pen, and also send numerical information of a pen end acceleration sensor to the electronic device 100, where the numerical information of the pen end acceleration sensor may be used by the electronic device 100 to determine an actual orientation of a pen tip of the handwriting pen.
It should be understood that the data amount of the numerical information of the pen end acceleration sensor of the stylus is also very small, and can be combined with the bluetooth information of the stylus to generate new information, and the smaller data amount can be transmitted to the electronic device 100 in the existing wireless transparent transmission mode without increasing the data amount of the wireless transparent transmission.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques.
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
In this embodiment, taking the connection between the tablet device 10 and the stylus 20 shown in fig. 1 as an example, after receiving handshake data sent by the stylus 20, the display screen 194 of the mobile phone may further display a prompt window 101-1 shown in (a) or a prompt window 102-1 shown in (b) in fig. 1 on the display screen 194, and detect operations performed by a user in different prompt window contents, and respond according to the operations of the user, which will not be described herein.
In addition, if the user can record the notes on the electronic device through the handwriting pen in the scenes of daily meeting, video learning and the like, the display screen 194 can also receive the operations executed by the user through the handwriting pen, and respond according to the operations of the user, which will not be described herein.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 100 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions.
The internal memory 121 may be used to store computer executable program code including instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a nonvolatile memory.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals.
The earphone interface 170D is used to connect a wired earphone. The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100. In some embodiments, the gyro sensor 180B may also be referred to as a "tri-axis sensor", with the gyro sensor 180B determining the angular velocity of the electronic device 100 about three axes (i.e., x, y, and z axes). The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 180D. For example, in the embodiment of the present application, the stylus pen 20 is mainly attached to the side frame of the electronic device 100 at a fixed position by means of the strong adsorption function of the magnetic attraction module. Alternatively, the magnetic attraction module between the stylus and the electronic device 100 may be a set of magnets, which is not limited in this embodiment.
Further, in the embodiment of the present application, both the stylus pen and the electronic apparatus 100 are mounted with hall sensors, which may be composed of hall elements, accessory circuits, and the like. On the one hand, the electronic equipment 100 and the Hall sensor on the handwriting pen can monitor the change of the magnetic field and play a certain role in adsorption; on the other hand, the hall sensors on the electronic device 100 and the stylus pen may also be used as switches, so that the processes of information interaction (sending handshake data and the like) between the electronic device 100 and the stylus pen and the like can be automatically controlled, which will not be described in detail herein.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
For example, in the embodiment of the present application, the acceleration sensor 180E is installed on both the stylus and the electronic device 100, and the acceleration sensor 180E may be used to determine the acceleration of the stylus on each axis, and the acceleration of the electronic device 100 on each axis, so that the electronic device 100 may determine the actual direction of the stylus tip according to the relative value between the accelerations on each axis, which is not described in detail herein.
It should be understood that in the present embodiment, the gyro sensor 180B and the acceleration sensor 180E may cooperate with each other to enable the tablet device 10 and the stylus 20 to accurately acquire information of the acceleration value on each coordinate axis, and the like.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, the electronic device 100 may range using the distance sensor 180F to achieve quick focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode.
The ambient light sensor 180L is used to sense ambient light level.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint feature to unlock the fingerprint, access the application lock, photograph the fingerprint, answer the incoming call, etc.
The temperature sensor 180J is for detecting temperature. In some embodiments, the electronic device 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J.
The touch sensor 180K may be disposed on the display 194, and the touch sensor 180K and the display 194 form a touch screen. The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
Optionally, in the embodiment of the present application, the touch sensor 180K may detect a touch, a click, or an operation of a user, generate an operation event, transmit the operation event to the processor 110, and determine, by the processor 110, that the operation event includes the coordinates of the touch point, the touch state, and other relevant parameters, and respond according to the operation event.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, bone conduction sensor 180M may acquire a vibration signal of a human vocal tract vibrating bone pieces.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. Embodiments of the present application are in a layered architectureThe system is an example illustrating the software architecture of the electronic device 100.
Fig. 3 is a software configuration block diagram of an example of an electronic device according to an embodiment of the present application.
Alternatively, the electronic device 100 of the embodiment of the present application may haveThe system, i.e. having the structure shown in FIG. 3The hierarchical architecture may include several layers, each layer having distinct roles and branches, and the layers communicating via software interfaces.
Exemplary, in some embodiments, as shown in FIG. 3, one mayThe system is divided into four layers, namely an application program layer, an application program framework layer and a An Zhuoyun line (++)>runtimes) and system libraries, and kernel layers.
The application layer may include a series of application packages. For example, as shown in fig. 3, the application layer may include application packages corresponding to applications such as a camera, bluetooth, and setting, which is not limited in this embodiment of the present application.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
By way of example, as shown in FIG. 3, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether the screen has a status bar or participate in executing the operations of locking the screen, intercepting the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The stored data may include video data, image data, audio data, etc., and may further include call record data for dialing and answering, browsing history of the user, bookmarks, etc., which are not described herein.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including the connection, hang-up, etc. of a phone).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar of the screen, which can be used to convey a message to the user, which can automatically disappear after the status bar stays briefly, without the user having to perform interactive procedures such as closing operations. Such as a notification manager may inform the user of a download completion message. The notification manager may also be a notification in the form of a chart or scroll bar text that appears in the system top status bar, such as a notification of a background running application; alternatively, the notification manager may be a notification that appears on the screen in the form of a dialog window, such as a text message in a status bar, etc.; or, the notification manager may also control the electronic device to send out a prompt tone, vibration of the electronic device, flashing of an indicator light of the electronic device, and so on, which will not be described herein.
runtimes include core libraries and virtual machines. />runtime is responsible for scheduling and management of the android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of life cycle management, stack management, thread management, security and exception management, garbage collection and the like of the object.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media library (media library), three-dimensional (three dimensional, 3D) graphics processing library (e.g., openGL ES), two-dimensional (2D) graphics engine, image processing library, etc.
The surface manager is used to manage the display subsystem of the electronic device and provides a fusion of 2D and 3D layers for a plurality of applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
A two-dimensional graphics engine is a drawing engine that draws two-dimensional drawings.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
It should be understood that, in the embodiment of the present application, the software structure of the electronic device 100 is not strictly required, as long as the electronic device 100 can determine the actual orientation of the pen tip according to the received information, and after the target picture of the pen is matched according to the actual orientation of the pen tip, the display screen of the electronic device 100 can be flicked to display, so as to display the pen picture matched with the actual orientation of the pen tip for the user; or, when the popup window is displayed, an animation effect can be added to the prompt window; or in the prompt window, an effect of dynamic playing is added to one or more handwriting pen pictures, and the like, which are not described in detail herein.
For ease of understanding, the following embodiments of the present application will take the tablet device 10 having the structure shown in fig. 2 and 3 as an example, and the method for detecting the pen tip direction provided in the embodiments of the present application will be specifically described with reference to the accompanying drawings and application scenarios.
Fig. 4 is a schematic flowchart of a method for detecting a pen tip direction of a stylus according to an embodiment of the present application.
By way of example, taking the pairing process between the tablet device 10 and the stylus 20 shown in fig. 1 as an example, the implementation process for detecting the direction of the stylus tip provided in the embodiments of the present application may include three different stages, each including different steps. As shown in fig. 4, the method 400 may include the following different stages:
the first stage: pairing phase
401, when the distance of the stylus 20 and the tablet device 10 is less than or equal to the preset distance, the stylus 20 sends handshake data to the tablet device 10.
The tablet device 10 performs device verification based on the received handshake data 402.
403, tablet device 10 returns the result of the device verification to stylus 20.
Alternatively, both tablet device 10 and stylus 20 may have wireless chips that may support wireless communications within a preset distance. Specifically, in step 401 of the first stage, stylus 20 may send handshake data to tablet device 10 based on a wireless transparent manner.
It should be appreciated that the "preset distance" may be a maximum transmission distance for communication with the stylus 20 and the wireless chip of the tablet device 10, e.g., within 10 millimeters, etc. In addition, for the implementation process of wireless transparent transmission, please refer to the related description of the foregoing embodiments, and for brevity, the description is omitted here.
Alternatively, the handshake data may include content related to the device information of the stylus 20, such as a device name, a product Serial Number (SN), software system information, and product hardware information of the stylus 20, which is not limited in the embodiment of the present application.
In a possible implementation manner, the tablet device 10 stores device information of the stylus pen that can be adapted to the tablet device 10 when leaving the factory, so that the tablet device 10 can accurately know device information such as a device name, a device model, version information of a software system, and product hardware information of the stylus pen that can be adapted to the tablet device. It should be appreciated that the stylus that tablet device 10 is capable of adapting may be one or more types, and tablet device 10 may store device information for each type of stylus that is capable of adapting, as embodiments of the present application are not limited in this respect.
Illustratively, taking the Mate Pad Pro of Hua corporation as an example, the Mate Pad Pro may support the first generation M-pen and the second generation M-pen, and operations performed by a user on a display screen of the Mate Pad Pro using the two handwriting pens may be detected and received. Therefore, the Mate Pad Pro stores device information such as device names, device models, version information of software systems, and product hardware information of the first generation M-pecil and the second generation M-pecil from the factory.
In the first stage of the embodiment of the present application, after the tablet device 10 receives the handshake data sent by the stylus 20, device information including the device name, the device model, version information of the software system, product hardware information and the like of the stylus 20 currently included in the handshake data may be obtained, so that the tablet device 10 compares the device information of the stylus 20 with the device information of the adaptable stylus stored by itself, that is, the "device verification" process of step 402.
In a possible scenario, when the tablet device 10 detects that the current stylus 20 is an adaptable stylus in step 402, the verification passes, i.e. in step 403, the tablet device 10 may indicate to the stylus 20 that the verification result returned: the device information verification of the stylus 20 passes.
In another possible scenario, in step 402, when the tablet device 10 detects that the current stylus 20 is a non-adaptable stylus, the verification is not passed, i.e., in step 403, the tablet device 10 may indicate to the stylus 20 that the verification result returned: the device information verification of the stylus 20 is not passed. At this time, the current pairing process may be terminated, and no subsequent other steps may be performed, or other stages such as a subsequent bluetooth connection may be entered, which will not be described herein.
And a second stage: bluetooth information transmission stage
404, when the result of the device verification returned from the tablet device 10 to the stylus 20 indicates that the verification is passed, the stylus 20 transmits the bluetooth information of the stylus 20 and the numerical information of the pen-end acceleration sensor to the tablet device 10.
The tablet device 10 performs bluetooth information verification according to the received bluetooth information 405.
406, the tablet device 10 returns the result of the bluetooth information verification to the stylus 20.
It should be appreciated that in the present embodiment, tablet device 10 and stylus 20 each include a bluetooth module integrated with bluetooth functionality for communicating via bluetooth transmissions. Optionally, the bluetooth module may include a chip, a circuit set, other peripheral devices, and the like, which are not described herein.
Alternatively, the bluetooth module may include a bluetooth module (BT) or a bluetooth module with low energy (bluetooth low energy module, BLE), which is not limited in implementation form.
It should also be understood that, in the embodiment of the present application, the "bluetooth information of the stylus 20" may include bluetooth protocol information, wireless information of the stylus 20, information related to bluetooth connection such as media access control (media access control, MAC) address information, internet protocol address (Internet protocol address, IP address) and the like, and the embodiment of the present application is referred to as "bluetooth information", which may be used to support the tablet device 10 and the stylus 20 to establish a bluetooth channel, and the specific content of the "bluetooth information" is not limited in the embodiment of the present application.
For example, when the bluetooth module is a BLE module, in step 404, the "bluetooth information" of the stylus 20 sent by the stylus 20 to the tablet device 10 may include BLE-MAC address information, BLE-model information, and the like, which is not limited in the embodiment of the present application.
In the second stage of the embodiment of the present application, after the tablet device 10 receives the bluetooth information sent by the stylus 20, bluetooth information such as BLE-MAC address information and BLE-model information of the stylus 20 may be obtained, and then the tablet device 10 compares the bluetooth information such as BLE-MAC address information and BLE-model information with the bluetooth information corresponding to the adaptable stylus 20 stored in itself, that is, the "bluetooth information verification" process of step 405.
In a possible case, after determining that the bluetooth information such as BLE-MAC address information, BLE-model information, etc. of the stylus 20 passes in step 405 in the second stage, the tablet device 10 may return, in step 406, a result of the bluetooth information verification to the stylus 20, where the result of the bluetooth information verification is used to indicate: the bluetooth information verification of the stylus 20 passes.
In another possible case, in step 405 of the second stage, when the tablet device 10 determines that the bluetooth information check, such as BLE-MAC address information, BLE-model information, of the stylus 20 is not passed, a result of the bluetooth information check may be returned to the stylus 20 in step 406, where the result of the bluetooth information check is used to indicate: the bluetooth information verification of the stylus 20 is not passed. At this time, the current bluetooth information transmission stage may be terminated, and other stages such as subsequent bluetooth connection may not be entered, or other subsequent steps may be executed, which will not be described herein.
In a possible implementation manner, in step 404 of the second stage of the embodiment of the present application, the information sent by the stylus 20 to the tablet device 10 may include, in addition to bluetooth information of the stylus 20, numerical information of a pen-end acceleration sensor, which may be used by the tablet device 10 to determine the actual orientation of the pen tip of the stylus 20, also be sent to the tablet device 10.
It should be understood that, the bluetooth information of the stylus 20 and the numerical information of the pen-end acceleration sensor are simultaneously sent to the tablet device 10, the data volume of the numerical information of the pen-end acceleration sensor of the stylus 20 is also very small, new information can be generated by combining with the bluetooth information of the stylus 20, and a smaller data volume can be transmitted to the tablet device 10 by the existing wireless transparent transmission mode without increasing the data volume of the wireless transparent transmission. In addition, how the tablet device 10 determines the actual orientation of the pen tip of the stylus 20 according to the numerical information of the pen tip acceleration sensor will be described in detail in the following third stage (step 407, etc.).
Through the above two-stage verification process, the stylus 20 that can be verified by the device verification and bluetooth information can be ensured to be a device that can be matched with the tablet device 10 and can be connected with the tablet device 10 through bluetooth, and when the device verification and bluetooth information verification are both passed, the following flow of the third stage can be continued.
And a third stage: spring window stage
407, when the result of the bluetooth information verification indicates that the verification is passed, the tablet device 10 determines the actual orientation of the pen tip of the handwriting pen according to the value of the pen end acceleration sensor.
Alternatively, the acceleration sensor of the tablet device 10 and the acceleration sensor of the stylus 20 may be three-axis sensors, which may be referred to as "three-axis sensor of the tablet device 10" and "three-axis sensor of the pen tip of the stylus 20", respectively, and the type of the acceleration sensor is not limited in the embodiment of the present application.
It should be understood that for the tablet device 10 and stylus 20, the mounting location of the acceleration sensor is fixed, i.e. the coordinate system to which the acceleration values acquired by the acceleration sensor during operation are also fixed. Then, during actual use of the tablet device 10, regardless of how the tablet device 10 is placed, such as landscape placement, tilt placement, inverted placement, etc., after the stylus 20 is attached to the long bezel of the tablet device 10, the positions of the tablet device 10 and the stylus 20 are relatively fixed, that is, the positions of the acceleration sensor of the tablet device 10 and the acceleration sensor of the stylus 20 are also relatively fixed, in other words, the magnitude of the acceleration in each direction of the coordinate axes is also fixed. Therefore, the actual orientation of the tip of the stylus 20 can be judged by the relative value of the acceleration in each direction.
For example, in the present embodiment, "the relative value of the acceleration in each direction" can be understood as: in this orientation, the acceleration value of tablet device 10 minus the acceleration value of stylus 20. Alternatively, the difference (i.e., the "relative value" of the acceleration in that direction) may be positive, negative, or 0, and tablet device 10 may determine the actual orientation of the tip of stylus 20 based on the relative values of the acceleration in each direction.
Fig. 5 is a schematic diagram of an operation principle of an acceleration sensor of a stylus pen and a tablet device according to an embodiment of the present application, and an operation procedure of the acceleration sensor is described below with reference to fig. 5.
Exemplary, as shown in fig. 5 (a), it is assumed that the mounting position of the acceleration sensor of the tablet device 10 is at O 1 Where the position of the center of gravity (geometric center) of the acceleration sensor is O 1 And after the acceleration sensor position of the tablet device 10 is fixed, the coordinate system O shown in the (a) diagram in fig. 5 is determined 1 -X 1 Y 1 Z 1 . Assume that the mounting position of the acceleration sensor of the stylus 20 is at O 2 Where the position of the center of gravity (geometric center) of the acceleration sensor is O 2 After the position of the acceleration sensor of the stylus 20 is fixed, a coordinate system O as shown in the figure is determined 2 -X 2 Y 2 Z 2
The display screen of the tablet device 10 is directed to the user, the straight line where the long frame is located is a horizontal reference line, the straight line where the short frame is located is a vertical reference line, and the placement position of the camera of the tablet device 10 when the camera is located at the upper left corner of the display screen is a reference position, which may be referred to as a "forward position", where the tablet device 10 is located as shown in fig. 5 (a) or (b).
Assuming that the tablet device 10 is in the forward position, a coordinate system O is determined by an acceleration sensor of the tablet device 10 1 -X 1 Y 1 Z 1 As shown in FIG. 5 (a), X is 1 The axis is parallel to and pointing to the right of the long bezel of tablet device 10, Z 1 The axis is parallel to the short frame of the tablet device 10 and pointing above the tablet device display screen, Y 1 The axis is perpendicular to the plane of the display screen of the tablet device 10 and points to the outside of the display screen. Wherein X is 1 Axis and Z 1 The plane formed by the axes is the plane in which the display screen of the tablet device 10 is located, Y 1 The axis is in a line perpendicular to the plane of the display screen of the tablet device 10.
Accordingly, when the tablet device 10 is in the forward position, the stylus 20 is attached to the long frame of the tablet device 10, and the placement position of the pen tip of the stylus 20 facing the camera is referred to as the "forward position" of the stylus 20, and the current position of the stylus 20 shown in fig. 5 (a) is the forward position.
Assuming that the stylus 20 is in a forward position and is attracted to the tablet device 10, a coordinate system O is determined by an acceleration sensor of the stylus 20 2 -X 2 Y 2 Z 2 As shown in FIG. 5 (a), X is 2 The axis is parallel to the central axis of the stylus 20 and points to the end of the stylus 20 away from the pen tip (the opposite end of the pen tip), Z 2 The axis is parallel to the short frame of the tablet device 10 absorbed by the stylus 20 and points to the outer side of the long frame of the tablet device 10, Y 2 The axis is perpendicular to the plane of the display screen of the tablet device 10 and points to the outside of the display screen (or directly above the display screen). Wherein X is 2 Axis and Z 2 The plane formed by the axes is the same plane as the plane of the display screen of the tablet device 10 or the plane parallel to the plane of the display screen, Y 2 The axis is in a line perpendicular to the plane of the display screen of the tablet device 10.
From the coordinate system O introduced above 1 -X 1 Y 1 Z 1 And a coordinate system O 2 -X 2 Y 2 Z 2 It can be seen that in the scene shown in fig. 5 (a), X 1 Axis and X 2 The directions of axes are consistent, Z 1 Axis and Z 2 The directions of the axes are consistent, Y 1 Axes and Y 2 The axes are oriented in a uniform manner.
Illustratively, when the user brings the stylus 20 infinitely close to the tablet device 10, and the stylus 20 is sucked to the long bezel of the tablet device 10 in the direction shown in (a) of fig. 5. Assuming that the device verification passing result has been returned to the stylus 20 by the tablet device 10 through the step 403 in the first stage, in the step 404 in the second stage, the stylus 20 may send the current acceleration value of the pen-end acceleration sensor of the stylus 20 to the tablet device 10 while sending the bluetooth information of the stylus 20 to the tablet device 10, and the tablet device 10 may calculate the relative value of the acceleration in each direction according to the pen-end acceleration of the stylus 20 and the value of the acceleration sensor of the tablet device, and further determine the actual orientation of the pen tip of the stylus 20 according to the relative values of the accelerations in the three directions.
Table 1 shows acceleration values output from the acceleration sensor of the stylus pen 20 and the tablet device 10, which are examples of embodiments of the present application.
Illustratively, when the stylus 20 is attached to the long bezel of the tablet device 10 in the positional relationship shown in fig. 5 (a), as shown in table 1, it is assumed that the acceleration value output by the acceleration sensor of the tablet device 10 is a x 、a y And a z And the tablet device 10 obtains the acceleration value a of the stylus 20 according to the step 404 x 、a y And a z The actual orientation of the pen tip of the stylus 20 along the long frame of the tablet device 10 and pointing in the left direction can be determined in the positional relationship shown in fig. 5 (a) by calculating the relative value of the acceleration in the X-axis direction to be 0, the relative value of the acceleration in the y-axis direction to be 0, and the relative value of the acceleration in the z-axis direction to be 0.
It will be appreciated that if the relative values of the accelerations in each direction are all 0 as listed in Table 1, it can be determined that the directions of the accelerations in each direction are the same, i.e., X 1 Axis and X 2 The directions of axes are consistent, Z 1 Axis and Z 2 The directions of the axes are consistent, Y 1 Axes and Y 2 The axes are oriented in a uniform manner. Then, the stylus 20 and the tablet device 10 are both the aforementioned assumed "forward positions", and the tablet device 10 can determine that the actual orientation of the tip of the stylus 20 is parallel to the long bezel and directed to the left in the scene shown in fig. 5 (a).
TABLE 1
Table 2 shows acceleration values output from the acceleration sensor of the stylus 20 and the tablet device 10 according to another example of the embodiment of the present application.
ExampleWhen the stylus 20 is attached to the long frame of the tablet device 10 in the positional relationship shown in fig. 5 (b), it is assumed that the acceleration value output from the acceleration sensor of the tablet device 10 is a as shown in table 2 x 、a y And a z And the tablet device 10 obtains the acceleration value of the stylus 20 of-a according to the step 404 x 、-a y And a z Calculating to obtain the relative value of the acceleration in the X-axis direction as 2a x The relative value of the acceleration in the Y-axis direction is 2a y The relative value of the acceleration in the Z-axis direction is 0, and it can be determined that the actual orientation of the tip of the stylus 20 is along the long frame of the tablet device 10 and directed in the right direction in the positional relationship shown in the (b) diagram in fig. 5.
It should be appreciated that if the relative value of the acceleration in each direction is 0 in only one direction as listed in Table 2, the relative value of the acceleration in both directions is not 0 and the magnitude of the relative value is 2 times the magnitude of the acceleration, then tablet device 10 may determine that the directions of the acceleration in both directions are opposite, i.e., X 1 Axis and X 2 The axes being opposite in direction, Y 1 Axes and Y 2 The axes being opposite in direction, Z 1 Axis and Z 2 The axes are oriented in a uniform manner. Then, the stylus 20 starts from the "forward position", at X 2 Axes and Y 2 The axis is rotated 180 deg. in the plane defined by the axis, and tablet device 10 can determine that the actual orientation of the tip of stylus 20 is parallel to the long border and pointed to the right in the scenario shown in figure 5 (b).
TABLE 2
Through the above process, according to the relative value between the acceleration value of the acceleration sensor at the pen end of the stylus 20 and the acceleration value output by the acceleration sensor of the tablet device 10 itself in the direction of each coordinate axis, the tablet device 10 can determine the actual orientation of the pen tip of the stylus 20, so that the process of step 408 can be further executed, and the target picture is matched for the current stylus 20 according to the actual orientation of the pen tip of the stylus 20.
In another possible scenario, if the acceleration value of the pen-end acceleration sensor of the stylus 20 is not transmitted to the tablet device 10 side, or if the transmission of the acceleration value of the pen-end acceleration sensor of the stylus 20 fails, the embodiment of the present application further provides another possible method, where the tablet device 10 may determine the actual orientation of the pen tip of the stylus 20 through the working state of the hall sensor.
It should be appreciated that in the embodiments of the present application, the tablet device 10 and the stylus 20 are each provided with a hall sensor, which may be composed of a hall element, an accessory circuit, and the like. On the one hand, the hall sensors on the tablet device 10 and the stylus 20 can monitor the change of the magnetic field, and on the other hand, the hall sensors on the tablet device 10 and the stylus 20 can also be used as switches, so that the information interaction (beginning to send handshake data and the like) flow between the tablet device 10 and the stylus 20 can be automatically controlled.
Illustratively, the tablet device 10 and the stylus 20 each include one or more hall sensors thereon, and when the distance between the tablet device 10 and the stylus 20 is less than or equal to a predetermined distance, the hall sensors of the tablet device 10 and the hall sensors of the stylus 20 start to operate, switch on related circuits and trigger the stylus 20 to start sending handshake data to the tablet device 10 in a wireless transparent manner. From this, the hall sensors of tablet device 10 and stylus 20 can be understood as switches that automatically control the interaction of information between tablet device 10 and stylus 20.
It should also be appreciated that the stylus 20 is primarily attached to the side frame of the tablet device 10 at a fixed location by virtue of the strong attachment function of the magnetic attachment module. Alternatively, the magnetic attraction module between tablet device 10 and stylus 20 may be a set of magnets, which is not limited in this embodiment of the present application.
Fig. 6 is a schematic diagram illustrating the operation of the hall sensor when the stylus is attached to the side frame of the tablet device.
Illustratively, as shown in fig. 6 (a), a magnetic attraction module 30 is included between the tablet device 10 and the stylus 20, and the magnetic attraction module 30 includes at least a first portion mounted at a fixed position of the stylus 20 and a second portion mounted at a fixed position of the tablet device 10. Wherein the first and second portions may be brought into close proximity and attached together to ensure that stylus 20 may be attached to a fixed location of the bezel of tablet device 10 without misalignment.
In a possible scenario, when the stylus 20 is attached to the long frame of the tablet device 10 in the positional relationship shown in fig. 6 (a), the first portion and the second portion of the magnetic attraction module 30 are attached together, and the distance between the hall sensor 1 of the stylus 20 and the hall sensor 2 of the tablet device 10 is less than or equal to the preset distance, so as to trigger the hall sensor 1 and the hall sensor 2 to enter the operation state, that is, the hall sensor 1 and the hall sensor 2 are connected to the relevant control circuit, the stylus 20 is automatically controlled to start sending handshake data to the tablet device 10, and the hall sensor 3 of the tablet device 10 is in the non-operation state (idle state), or the hall sensor 3 of the tablet device 10 does not participate as a switching device in the process.
In another possible scenario, when the stylus 20 is attached to the long bezel of the tablet device 10 in the positional relationship shown in fig. 6 (b), the first portion and the second portion of the magnetic attraction module 30 are attached together, and the distance between the hall sensor 1 of the stylus 20 and the hall sensor 3 of the tablet device 10 is less than or equal to the preset distance, so as to trigger the hall sensor 1 and the hall sensor 3 to enter the operation state, i.e., the hall sensor 1 and the hall sensor 3 are connected to the relevant control circuits, the stylus 20 is automatically controlled to start sending handshake data to the tablet device 10, and the hall sensor 2 of the tablet device 10 is in the non-operation state (idle state), or the hall sensor 2 of the tablet device 10 does not participate as a switching device in the process.
It should be appreciated that for the above possible scenario, the tablet device 10 may accurately obtain the operating state of each hall sensor, and determine the actual orientation of the pen tip of the stylus 20 according to the operating state of each hall sensor, regardless of which hall sensor is in the operating state.
Illustratively, table 3 is an illustration of the operating states of the stylus 20 and hall sensors of the tablet device 10 as exemplified in the embodiments of the present application. Illustratively, as shown in Table 3, when any one of the Hall sensors is in an operating state, it is denoted as "1", and when a certain Hall sensor is in an idle state, it is denoted as "0". The tablet device 10 can determine the actual orientation of the pen tip of the stylus 20 according to the operating state of its hall sensor.
TABLE 3 Table 3
Through the above scheme, the tablet device 10 can judge the actual orientation of the pen tip of the stylus 20 according to the relative value between the acceleration value of the pen end acceleration sensor sent by the stylus 20 and the acceleration value output by the acceleration sensor of the tablet device 10 itself; alternatively, when the tablet device 10 cannot acquire the acceleration value of the pen end acceleration sensor of the stylus 20 or does not receive the acceleration value of the pen end acceleration sensor of the stylus 20, the actual orientation of the pen tip of the stylus 20 can also be determined in real time according to the adsorption state, the operating state, and the like of the hall sensor, so that the process of step 408 can be further executed, and the current stylus 20 can be matched with the target picture according to the actual orientation of the pen tip of the stylus 20.
At 408, tablet device 10 determines a target picture of the stylus that matches the actual orientation of the stylus tip based on the actual orientation of the stylus tip.
409, the tablet device 10 acquires a target picture of the stylus and popup displays the target picture of the stylus.
In one possible implementation, tablet device 10 may have stored locally a library of stylus pictures that may include a plurality of different manufacturer, different model, different style, different type, different pen tip orientation of the stylus pictures. Alternatively, different manufacturers and different models of handwriting pens are configured with a plurality of different pictures to form a handwriting pen picture library, and the tablet device 10 can select matched target pictures.
Alternatively, in this embodiment of the present application, first, according to the device information of the stylus 20 acquired in the first stage, the tablet device 10 may select, from a plurality of stylus pictures of different manufacturers and different models included in the stylus picture library, a plurality of pictures consistent with the manufacturer and product model of the current stylus 20. Next, the tablet device 10 may continue to select a stylus picture from the plurality of stylus pictures that matches the actual orientation of the nib as a "target picture" according to the actual orientation of the nib determined in step 407.
It should be understood that the "target picture" finally determined by the tablet device 10 is a picture consistent with the current manufacturer, product model, and actual orientation of the stylus tip of the stylus 20, and the target picture may include information related to the manufacturer, product model, and the like, which is not limited in this embodiment of the present application. In another possible implementation, after determining the actual orientation of the pen tip of the stylus 20, the tablet device 10 may send a request message to the server, where the request message is used to request that a picture of the stylus be obtained, and the request message carries indication information for indicating the actual orientation of the pen tip of the stylus 20. The server may select, according to the request message sent by the tablet device 10, a handwriting picture matching with the actual orientation of the pen tip from the plurality of handwriting pictures of the stored handwriting picture resource as a "target picture", and then return the "target picture" to the tablet device 10. The manner in which the tablet device 10 obtains the target picture of the stylus is not limited in this embodiment of the present application.
Alternatively, the server may be a server corresponding to the tablet device 10, a server corresponding to the stylus 20, or a server corresponding to an application program (such as a third party application), which is not limited in the embodiment of the present application.
By the method, when the electronic equipment displays the handwriting pen picture through the popup window, the picture matched with the actual direction of the handwriting pen nib can be selected, and a preset picture with the unique nib direction can not be displayed singly; and the handwriting pen pictures are wide in source, so that the content and the variety of the popup window pictures can be enriched, and the user experience in the handwriting pen using process is greatly improved.
Optionally, after the tablet device 10 obtains the target picture matching the actual orientation of the pen tip of the stylus 20, a prompt window may be automatically popped up on the display screen, and one or more of the device name, target picture, cancel control, connect control of the stylus 20 may be displayed in the prompt window.
Optionally, the prompt window may further display at least one of the current product model of the stylus 20, the manufacturer, and the like, and the content of the current remaining power of the stylus 20, the battery identifier, the charging progress bar, and the like, which is displayed in the prompt window popped up by the tablet device 10 in the embodiment of the present application is not limited. The remaining power may be displayed in a percentage form, so as to prompt the user that the current power of the handwriting pen occupies the percentage of the power in the fully charged state, which is not repeated herein for simplicity.
Alternatively, when tablet device 10 automatically pops up a reminder window, the reminder window may have a different style, a different size, and the reminder window may have a different pop-up animation, which is not limited in the embodiments of the present application.
Fig. 7 is a schematic view of a popup window when a handwriting pen is adsorbed on a side frame of a tablet device according to an embodiment of the present application.
In a possible scenario, when the tablet device 10 displays the interface 701 as shown in fig. 7 (a), if the user directly adsorbs the stylus 20 to the target position of the long border above the tablet device 10, the stylus 20 and the tablet device 10 may be triggered to pair, and the adsorption process and the pairing process of the stylus 20 described above are performed, and the prompt window 701-1 may be automatically popped up on the interface 701 of the tablet device 10.
For example, the display position of the prompt window 701-1 may be determined according to the target position of the stylus 20, for example, a long border immediately below the display screen of the stylus 20, as shown in fig. 7 (a). In addition, the hint window 701-1 can display a target picture of the stylus 20, a device name (HUAWI M-Pencil) of the stylus 20, a "cancel" control, and a "connect" control.
In another possible scenario, if the user directly adsorbs the stylus 20 to the target location of the long border below the tablet device 10, the stylus 20 and the tablet device 10 may be triggered to pair, and the adsorption process and the pairing process of the stylus 20 described above are performed, and the prompt window 702-1 may be automatically popped up on the interface 702 of the tablet device 10.
For example, the display position of the prompt window 702-1 may be determined according to the target position of the stylus 20, for example, a long border immediately below the display screen of the stylus 20, as shown in fig. 7 (b).
In addition, since the prompt window 702-1 is closely adjacent to the long border below the display screen, the icons of the application program may be easily blocked, and accordingly, the tablet device 10 may also automatically adjust the color, transparency, picture style, etc. of the prompt window 702-1 to be more suitable for different display styles on the display screen, which will not be described in detail herein.
Compared with the diagram (b) in fig. 1, by the method for detecting the nib direction of the handwriting pen according to the embodiment of the present application, in the diagram (b) in fig. 7, the preset picture of the handwriting pen 20 displayed can be kept consistent with the actual nib direction of the handwriting pen 20, so that the visual experience of the user is improved.
In yet another possible scenario, if the user adsorbs stylus 20 to the target location of the left short bezel of tablet device 10, stylus 20 may be triggered to pair with tablet device 10, and a prompt window 703-1 may automatically pop up on interface 703 of tablet device 10.
The display position of the prompt window 703-1 may be determined according to the target position of the stylus 400, for example, a short border immediately on the left side of the display screen of the stylus 400, as shown in fig. 7 (c). In addition, the prompt window 703-1 may display a target picture of the stylus 20, a device name (HUAWI M-Pencil) of the stylus 20, a "cancel" control, and a "connect" control.
In addition, tablet device 10 may also automatically resize alert window 703-1. For example, the prompt window 703-1 of fig. 7 (c) may be a smaller-sized vertical window that abuts against the short frame of the display screen. Tablet device 10 may also adjust the layout within prompt window 703-1, such as adjusting the size of a preset picture of stylus 20, cancelling the control, connecting the control, which is not limited in this embodiment.
In yet another possible scenario, if the user adsorbs stylus 20 to the target location of the right short bezel of tablet device 10, stylus 20 may be triggered to pair with tablet device 10, and a prompt window 704-1 may automatically pop up on interface 704 of tablet device 10.
Illustratively, the display position of the prompt window 704-1 may also default to a centered display as shown in the (d) diagram of FIG. 7, facilitating user viewing of the prompt window and performing operations on the prompt window. In addition, the prompt window 704-1 may display a target picture of the stylus 20, a device name (HUAWEI M-Pencil) of the stylus 20, a cancel control, and a connect control, and the tablet device 10 may make appropriate modifications to the content layout of the prompt window 704-1, which will not be described in detail in the embodiments of the present application.
In one possible implementation, tablet device 10 may also add to the corresponding display during the process of popping up the alert windows (e.g., alert window 701-1, alert window 702-1, alert window 703-1, and alert window 704-1). Alternatively, the display of the prompt window may have a static display effect, or a dynamic display effect, that is, the popup window process also has a dynamic play effect.
For example, the prompt window may move from top to bottom, from bottom to top, according to a certain track, or the prompt window may appear on the display screen in a shutter, diamond-shaped lattice, or the like, which may have a dynamic playing effect in the embodiment of the present application is not limited.
Alternatively, the animation effect may match the tip acceleration of stylus 20, for example, the prompt window may be moved at a rate on the display screen of tablet device 10. Alternatively, the animation effect may match the user's usage habits, e.g., the prompt window is set by the user to a blinking appearance, a bouncing appearance, etc. Still alternatively, the pop-up process of tablet device 10 may be presented with a default of a variety of possible animation effects, as embodiments of the present application are not limited in this regard.
Optionally, the popup process may be accompanied by a dynamic change process such as a size and transparency of a target picture of the handwriting pen in the prompt window, for example, the size of the target picture of the handwriting pen may be displayed in an enlarged manner with an increase of the playing window or in a reduced manner with a decrease of the playing window, so that an animation effect of the popup process may further provide a coherent immersive experience for the user, and a visual experience of the user is improved.
In another possible implementation manner, the "target picture of the stylus" in the embodiments of the present application may be one picture, or multiple pictures. For example, when the "target picture of the handwriting pen" is a plurality of pictures, the target pictures of the handwriting pen may be replaced in turn in the process of popping up the prompt window, for example, each of the plurality of pictures is displayed for a fixed period of time, so that the prompt window also has a display effect of dynamic playing.
Through the implementation manner, the embodiment of the application can provide various possible display effects of the prompt window for the user, such as animation of the popup window, change process of the prompt window on the display screen, picture display effect inside the prompt window and the like, enriches window content and improves visual experience of the user.
410, determining whether to establish a bluetooth connection according to the operation of the user.
Optionally, for a prompt window popped up on the display screen of tablet device 10, the prompt window includes a preset picture of stylus 20, a device name of stylus 20, a "cancel" control, a "connect" control, and so forth. The user can click on the "connect" control in the prompt window according to the own requirement, so as to further trigger the stylus 20 and the tablet device 10 to establish bluetooth connection; or, in the prompt window, click on the "cancel" control, and interrupt the process of establishing bluetooth connection with the stylus 20 and the tablet device 10, which will not be described in detail herein for the sake of brevity.
In summary, by the method for detecting the direction of the pen tip of the stylus 20 according to the embodiment of the present application, the stylus 20 may send the acceleration value of the pen-tip acceleration sensor in the direction of each coordinate axis to the tablet device 10, and the tablet device 10 determines the actual direction of the pen tip of the stylus 20 according to the relative value between the acceleration value reported by the stylus 20 and the acceleration value output by the acceleration sensor of the tablet device 10, so that the tablet device 10 may match the current pen 20 with the target picture according to the actual direction of the pen tip of the stylus 20.
Or, if the acceleration value of the pen end acceleration sensor of the stylus 20 is not transmitted to the tablet device 10 side, or if the transmission of the acceleration value of the pen end acceleration sensor of the stylus 20 fails, in the embodiment of the present application, the tablet device 10 may further determine the actual orientation of the pen tip of the stylus 20 through the working state of the hall sensor, so that the tablet device 10 may match the current pen 20 with the target picture according to the actual orientation of the pen tip of the stylus 20.
According to the implementation process, when the handwriting pen is adsorbed on the frame of the tablet device and is matched with the electronic device, the tablet device can accurately judge the actual direction of the handwriting pen nib, so that the problem that the tablet device cannot identify the direction of the handwriting pen nib when the handwriting pen is adsorbed is avoided; in addition, when the flat panel device displays the handwriting pen picture through the popup window, the picture matched with the actual direction of the handwriting pen nib can be selected, the preset picture with the unique nib direction can not be displayed singly, the content and the variety of the popup window picture are enriched, and the user experience in the handwriting pen using process is greatly improved.
It should be noted that, in the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" means two or more than two.
It should be understood that the manner, the case, the category, and the division of the embodiments in the embodiments of the present application are for convenience of description only, and should not be construed as a particular limitation, and the features in the various manners, the categories, the cases, and the embodiments may be combined without contradiction.
It should also be understood that the terms "first," "second," and "third" in the embodiments of the present application are merely for distinction and should not be construed as limiting the present application in any way. For example, "first operation", "second operation", and the like, represent different operations performed by a user on a touch screen of an electronic device.
It should also be understood that, in various embodiments of the present application, the size of the sequence number of each process does not mean that the execution sequence of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
It should be further noted that, in the embodiment of the present application, the "preset", "fixed value", and the like may be implemented by pre-storing corresponding codes, tables, or other manners that may be used to indicate relevant information in electronic devices (e.g., a sending end device, a receiving end device, and the like), and the specific implementation manner of the present application is not limited. For example, in the embodiment of the present application, "preset distance", "preset duration", and the like.
It will be appreciated that the electronic device, in order to achieve the above-described functions, includes corresponding hardware and/or software modules that perform the respective functions. The steps of an algorithm for each example described in connection with the embodiments disclosed herein may be embodied in hardware or a combination of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation is not to be considered as outside the scope of this application.
The present embodiment may divide the functional modules of the electronic device according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated modules described above may be implemented in hardware. It should be noted that, in this embodiment, the division of the modules is schematic, only one logic function is divided, and another division manner may be implemented in actual implementation.
In the case of dividing the respective functional modules with the respective functions, one possible composition diagram of the electronic device involved in the above-described embodiment may include: a display unit, a detection unit and a processing unit. Wherein the display unit, the detection unit and the processing unit cooperate with each other, may be used to support the electronic device to perform the above-described steps, etc., and/or for other processes of the techniques described herein.
It should be noted that, all relevant contents of each step related to the above method embodiment may be cited to the functional description of the corresponding functional module, which is not described herein.
The electronic device provided in this embodiment is configured to perform the method for playing video, so that the same effect as the implementation method can be achieved.
In case an integrated unit is employed, the electronic device may comprise a processing module, a storage module and a communication module. The processing module may be configured to control and manage actions of the electronic device, for example, may be configured to support the electronic device to execute the steps executed by the display unit, the detection unit, and the processing unit. The memory module may be used to support the electronic device to execute stored program code, data, etc. And the communication module can be used for supporting the communication between the electronic device and other devices.
Wherein the processing module may be a processor or a controller. Which may implement or perform the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. A processor may also be a combination that performs computing functions, e.g., including one or more microprocessors, digital signal processing (digital signal processing, DSP) and microprocessor combinations, and the like. The memory module may be a memory. The communication module can be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip and other equipment which interact with other electronic equipment.
In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device according to this embodiment may be a device having the structure shown in fig. 2.
The present embodiment also provides a computer-readable storage medium having stored therein computer instructions that, when executed on an electronic device, cause the electronic device to perform the above-described related method steps to implement the method for detecting a stylus tip direction in the above-described embodiments.
The present embodiment also provides a computer program product which, when run on a computer, causes the computer to perform the above-described related steps to implement the method for detecting the pen tip direction in the above-described embodiments.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component, or a module, and may include a processor and a memory connected to each other; the memory is used for storing computer-executable instructions, and when the device is operated, the processor can execute the computer-executable instructions stored in the memory, so that the chip can execute the method for detecting the pen point direction of the handwriting pen in the method embodiments.
The electronic device, the computer readable storage medium, the computer program product or the chip provided in this embodiment are used to execute the corresponding method provided above, so that the beneficial effects thereof can be referred to the beneficial effects in the corresponding method provided above, and will not be described herein.
It will be appreciated by those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of detecting a stylus tip orientation for an electronic device including a display screen, the electronic device being capable of supporting a stylus as an input device for the electronic device, the method comprising:
when the stylus is adsorbed to a preset position of a target frame of the electronic equipment, determining the actual direction of the stylus nib;
determining a target picture of the handwriting pen according to the actual direction of the handwriting pen nib, wherein the direction of the handwriting pen nib displayed in the target picture of the handwriting pen is the same as the actual direction of the handwriting pen nib;
and displaying a prompt window on the display screen, wherein the prompt window displays the target picture of the handwriting pen.
2. The method of claim 1, wherein said determining an actual direction of the stylus tip comprises:
receiving information sent by the stylus and comprising acceleration of the stylus in a first axis direction, acceleration of the stylus in a second axis direction and acceleration of the stylus in a third axis direction, wherein the first axis is parallel to the target frame, the second axis is parallel to an adjacent frame of the target frame, and the third axis is perpendicular to a plane determined by the first axis and the second axis;
Acquiring acceleration of the electronic equipment in the first axis direction, acceleration of the electronic equipment in the second axis direction and acceleration of the electronic equipment in the third axis direction;
and calculating the relative values of the acceleration of the handwriting pen and the acceleration of the electronic equipment in the first axis direction, the second axis direction and the third axis direction respectively, and determining the actual direction of the handwriting pen point.
3. The method of claim 2, wherein the calculating the relative values of the acceleration of the stylus and the acceleration of the electronic device in the first axis direction, the second axis direction, and the third axis direction, respectively, and determining the actual direction of the stylus tip comprises:
determining the difference value between the acceleration of the stylus and the acceleration of the electronic device as the relative value between the acceleration of the stylus and the acceleration of the electronic device in the first axis direction, the second axis direction and the third axis direction respectively;
when the relative values of the acceleration of the handwriting pen and the acceleration of the electronic equipment in the first axis direction, the second axis direction and the third axis direction are all 0, determining that the actual direction of the handwriting pen point is the first axis direction;
And when the relative value of the acceleration of the stylus and the acceleration of the electronic equipment in the first axis direction and the third axis direction is not 0, determining that the actual direction of the stylus pen point is the opposite direction of the first axis direction.
4. A method according to any one of claims 1 to 3, wherein the electronic device further comprises one or more magnetic attraction modules for attracting the handwriting pen to a preset position of the target frame, and a plurality of hall sensors respectively provided on both sides of each magnetic attraction module, and the method further comprises:
acquiring working state information of each Hall sensor in the plurality of Hall sensors;
and determining the actual direction of the pen point of the handwriting pen according to the working state information of each Hall sensor in the plurality of Hall sensors.
5. The method according to any one of claims 1 to 4, wherein the prompt window is further used for displaying one or more of a device name, a product model, a manufacturer, a remaining power of a current stylus, a battery identifier, a charging progress bar, a cancel control, and a connect control of the stylus.
6. The method of any one of claims 1 to 5, wherein displaying a prompt window on the display screen comprises:
determining a target display effect according to the actual direction of the pen point of the handwriting pen, the acceleration of the handwriting pen in the first axis direction, the acceleration of the handwriting pen in the second axis direction, the acceleration of the handwriting pen in the third axis direction, the number of pictures contained in a target picture of the handwriting pen, and/or a plurality of preset popup effects;
and displaying the prompt window on the display screen according to the target display effect.
7. The method of any one of claims 1 to 6, wherein displaying the target picture of the stylus in the hint window when the target picture of the stylus includes a plurality of stylus pictures, comprises:
and displaying each of the plurality of handwriting pen pictures in the prompt window in sequence according to the preset duration.
8. The method of any of claims 1 to 7, wherein the electronic device stores a stylus dataset comprising device information and bluetooth information for one or more preset types of styli that are adaptable to the electronic device, the method further comprising:
Receiving equipment information sent by the handwriting pen, and carrying out equipment verification on the handwriting pen according to the handwriting pen data set and the equipment information; and/or
And receiving Bluetooth information sent by the handwriting pen, and carrying out Bluetooth verification on the handwriting pen according to the handwriting pen data set and the Bluetooth information.
9. An electronic device, comprising:
a display screen;
one or more sensors of an acceleration sensor, an inertial detection unit IMU and a gyroscope;
one or more processors;
one or more memories;
the memory stores one or more programs that, when executed by the processor, cause the electronic device to perform the method of any of claims 1-8.
10. A readable storage medium, characterized in that the readable storage medium stores a program which, when run on an electronic device, causes the electronic device to perform the method of any one of claims 1 to 9.
CN202311243500.3A 2021-11-02 2021-11-02 Method for detecting pen point direction of handwriting pen, electronic equipment and handwriting pen Pending CN117707349A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311243500.3A CN117707349A (en) 2021-11-02 2021-11-02 Method for detecting pen point direction of handwriting pen, electronic equipment and handwriting pen

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202311243500.3A CN117707349A (en) 2021-11-02 2021-11-02 Method for detecting pen point direction of handwriting pen, electronic equipment and handwriting pen
CN202111297664.5A CN114217699B (en) 2021-11-02 2021-11-02 Method for detecting pen point direction of handwriting pen, electronic equipment and handwriting pen

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202111297664.5A Division CN114217699B (en) 2021-11-02 2021-11-02 Method for detecting pen point direction of handwriting pen, electronic equipment and handwriting pen

Publications (1)

Publication Number Publication Date
CN117707349A true CN117707349A (en) 2024-03-15

Family

ID=80696510

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202311243500.3A Pending CN117707349A (en) 2021-11-02 2021-11-02 Method for detecting pen point direction of handwriting pen, electronic equipment and handwriting pen
CN202111297664.5A Active CN114217699B (en) 2021-11-02 2021-11-02 Method for detecting pen point direction of handwriting pen, electronic equipment and handwriting pen

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202111297664.5A Active CN114217699B (en) 2021-11-02 2021-11-02 Method for detecting pen point direction of handwriting pen, electronic equipment and handwriting pen

Country Status (1)

Country Link
CN (2) CN117707349A (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117707349A (en) * 2021-11-02 2024-03-15 华为技术有限公司 Method for detecting pen point direction of handwriting pen, electronic equipment and handwriting pen
CN116931746A (en) * 2022-04-06 2023-10-24 荣耀终端有限公司 Fitting detection system
CN116929188A (en) * 2022-04-06 2023-10-24 荣耀终端有限公司 Accessory in-place detection system
CN115543106B (en) * 2022-04-06 2024-04-19 荣耀终端有限公司 Adsorption detection system of handwriting pen
CN115431660B (en) * 2022-09-06 2024-04-26 福州笔姿科技有限公司 Method for identifying pen holding direction
CN116679243A (en) * 2022-12-12 2023-09-01 荣耀终端有限公司 Detection method, readable storage medium, program product, and electronic device
CN117130496A (en) * 2023-04-24 2023-11-28 荣耀终端有限公司 Handwriting pen offset detection method and electronic equipment
CN116247837B (en) * 2023-05-08 2023-10-20 荣耀终端有限公司 Wireless charging system, method and related equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102135821A (en) * 2011-03-08 2011-07-27 中国科学技术大学 Handwriting pen and graphic restoration system
CN103246431A (en) * 2013-04-27 2013-08-14 深圳市金立通信设备有限公司 Method, device and system for adjusting display directions of screen
CN110956939A (en) * 2019-11-27 2020-04-03 华为技术有限公司 Method for adjusting screen brightness and electronic equipment
CN111240503A (en) * 2020-04-08 2020-06-05 深圳市千分一智能技术有限公司 Method and device for converting nib pressure of active pen, active pen and storage medium
CN113115294A (en) * 2021-04-22 2021-07-13 荣耀终端有限公司 Stylus pen connection method and Bluetooth system
CN114217699A (en) * 2021-11-02 2022-03-22 华为技术有限公司 Method for detecting pen point direction of stylus pen, electronic equipment and stylus pen

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9342162B2 (en) * 2013-01-29 2016-05-17 Lg Electronics Inc. Mobile terminal and controlling method thereof
KR20160023163A (en) * 2014-08-21 2016-03-03 삼성전자주식회사 Electronic device and method for operating the electronic device by an electronic pen
US20210382684A1 (en) * 2018-10-29 2021-12-09 Kyocera Corporation Information display apparatus, electronic device, electronic pen, system, method and program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102135821A (en) * 2011-03-08 2011-07-27 中国科学技术大学 Handwriting pen and graphic restoration system
CN103246431A (en) * 2013-04-27 2013-08-14 深圳市金立通信设备有限公司 Method, device and system for adjusting display directions of screen
CN110956939A (en) * 2019-11-27 2020-04-03 华为技术有限公司 Method for adjusting screen brightness and electronic equipment
CN111240503A (en) * 2020-04-08 2020-06-05 深圳市千分一智能技术有限公司 Method and device for converting nib pressure of active pen, active pen and storage medium
CN113115294A (en) * 2021-04-22 2021-07-13 荣耀终端有限公司 Stylus pen connection method and Bluetooth system
CN114217699A (en) * 2021-11-02 2022-03-22 华为技术有限公司 Method for detecting pen point direction of stylus pen, electronic equipment and stylus pen

Also Published As

Publication number Publication date
CN114217699B (en) 2023-10-20
CN114217699A (en) 2022-03-22

Similar Documents

Publication Publication Date Title
CN114217699B (en) Method for detecting pen point direction of handwriting pen, electronic equipment and handwriting pen
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
WO2020119493A1 (en) Response method for touch screen and electronic device
WO2021213164A1 (en) Application interface interaction method, electronic device, and computer readable storage medium
CN110536004B (en) Method for applying multiple sensors to electronic equipment with flexible screen and electronic equipment
CN110543289B (en) Method for controlling volume and electronic equipment
WO2021036770A1 (en) Split-screen processing method and terminal device
WO2021063237A1 (en) Control method for electronic device, and electronic device
JP2022501741A (en) System navigation bar display method, system navigation bar control method, graphical user interface, and electronic devices
WO2021008589A1 (en) Application running mehod and electronic device
WO2021078032A1 (en) User interface display method and electronic device
CN108717365B (en) Method and device for executing function in application program
JP2022501739A (en) Stylus pen detection method, system and related equipment
WO2022095744A1 (en) Vr display control method, electronic device, and computer readable storage medium
CN113190362B (en) Service calling method and device, computer equipment and storage medium
WO2022052712A1 (en) Method and apparatus for processing interaction event
WO2022105702A1 (en) Method and electronic device for saving image
EP4228233A1 (en) Method for adding operation sequence, electronic device, and system
WO2022048453A1 (en) Unlocking method and electronic device
WO2022022674A1 (en) Application icon layout method and related apparatus
CN115016697A (en) Screen projection method, computer device, readable storage medium, and program product
WO2021190524A1 (en) Screenshot processing method, graphic user interface and terminal
CN115309547B (en) Method and device for processing asynchronous binder call
WO2020233581A1 (en) Height measuring method and electronic device
CN115701018A (en) Method for safely calling service, method and device for safely registering service

Legal Events

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