WO2023273530A1 - 手写笔检测方法、装置及终端设备 - Google Patents

手写笔检测方法、装置及终端设备 Download PDF

Info

Publication number
WO2023273530A1
WO2023273530A1 PCT/CN2022/087684 CN2022087684W WO2023273530A1 WO 2023273530 A1 WO2023273530 A1 WO 2023273530A1 CN 2022087684 W CN2022087684 W CN 2022087684W WO 2023273530 A1 WO2023273530 A1 WO 2023273530A1
Authority
WO
WIPO (PCT)
Prior art keywords
stylus
terminal device
adsorption
detection
prompt
Prior art date
Application number
PCT/CN2022/087684
Other languages
English (en)
French (fr)
Inventor
凌华兵
毕阳
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP22831361.5A priority Critical patent/EP4350522A1/en
Publication of WO2023273530A1 publication Critical patent/WO2023273530A1/zh
Priority to US18/397,255 priority patent/US20240127686A1/en

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B21/00Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
    • G08B21/18Status alarms
    • G08B21/24Reminder alarms, e.g. anti-loss alarms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • 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
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories

Definitions

  • the present application relates to the field of computer technology, and in particular to a stylus detection method and a terminal device.
  • a stylus is a common electronic product that can be used for information input and operation through a touch input terminal device such as a tablet computer.
  • the user can use the stylus to input text, graphics, etc. on the terminal device.
  • the user first moves the stylus to make it adsorb to the terminal device, and then picks up the stylus for use.
  • the terminal device determines whether the stylus is adsorbed by the strength of the magnetic field, and there is a problem that the determination of the detection of the stylus adsorption is inaccurate or even misjudged.
  • the embodiments of the present application provide a method for detecting a stylus, which is applied to a terminal device.
  • the terminal device is provided with a first area for absorbing the stylus, and the interior of the stylus is provided with a
  • the stylus is adsorbed and fixed on the magnetic adsorption component in the first region, and the method includes:
  • the adsorption object When it is detected that the adsorption object is adsorbed and fixed in the first area, the adsorption object is detected to obtain a detection result, and the detection includes detecting whether the adsorption position of the adsorption object is accurate;
  • the detection result is a target detection result
  • a first prompt and/or a second prompt is issued, and the target detection result includes that the adsorption position of the adsorption object is inaccurate;
  • the first prompt is used to remind the user that the suction position is inaccurate
  • the second prompt is used to remind the user of the correct suction position of the stylus
  • the adsorption object adsorbed in the first area is detected, and a reminder is issued when the detection result is the target detection result
  • the first prompt indicating that the suction position of the user is inaccurate and/or the second prompt for reminding the user of the correct suction position of the stylus.
  • the detection further includes detecting whether the adsorption object is a stylus, and the target detection result further includes that the adsorption object is a stylus.
  • the first prompt and/or the second prompt can be issued, so that the detection accuracy of the stylus is higher.
  • the detection includes a first detection step and a second detection step, the first detection step is used to detect whether the adsorption object is a stylus, and the second detection step is used to detect Whether the adsorption position of the adsorption object is accurate.
  • the execution sequence between the first detection step and the second detection step may not be limited, and the efficiency of the stylus detection can be improved only based on whether the target detection result is achieved.
  • the second detection step is performed when the first detection result of the first detection step is that the adsorption object is a stylus. In this way, after it is determined that the adsorption object is the stylus, the second detection step is performed, which can reduce operations performed by the terminal device and save processor resources of the terminal device.
  • the first detection step includes: sending a private message to the adsorption object, and listening to the private reply message returned by the adsorption object in response to the private message; wherein, the adsorption The object is a stylus, including: receiving the private reply message within a first preset time after sending the private message. In this way, the accuracy of detecting whether the adsorption object is a stylus can be improved.
  • the second detecting step includes: sending a connection diagnosis message to the adsorption object, and listening to a diagnosis reply message returned by the adsorption object in response to the connection diagnosis message, and the connection The diagnosis message includes a wireless charging protocol message; wherein, the adsorption position of the adsorption object is inaccurate, including: not receiving the diagnosis reply message within a second preset time after sending the connection diagnosis message.
  • the operations required to be performed by the terminal device for detecting whether the suction position of the suction object is accurate can be simplified.
  • the private message is further used to obtain first position information of the adsorbed object, and the private reply message includes the first position information of the adsorbed object;
  • sending a connection diagnosis message to the adsorption object includes:
  • a connection diagnosis message is sent to the adsorption object.
  • the preset conditions include:
  • the difference between the first position coordinates of the adsorption object and the second position coordinates of the terminal device in at least one coordinate axis is less than or equal to a preset difference, and the first position the coordinates are determined based on said first location information received within a first preset time; or
  • the actual spatial position of the adsorption object is the same as the predicted spatial position of the stylus, the actual spatial position is determined according to the first position information received within a first preset time, the predicted spatial position of the stylus It is determined according to the second position information of the terminal device and the third position information of the first area relative to the terminal device.
  • the detection accuracy of the stylus may be improved based on the determined relative positional relationship between the attracted object and the terminal device.
  • issuing the first prompt includes at least one of the following operations:
  • Sending out the second prompt includes: displaying the second prompt on a display screen of the terminal device, and/or controlling an indicator light located in the first area to emit light.
  • the user can be reminded in various possible ways, so that the user can adjust the position of the stylus in time to charge or use the stylus, or keep other objects or electronic products that are not the stylus away from the terminal device to avoid interference with the terminal device.
  • the embodiment of the present application provides a detection method for a stylus, which is applied to a terminal device.
  • the terminal device is provided with a first area for absorbing the stylus, and the interior of the stylus is provided with a
  • the stylus is adsorbed and fixed on the magnetic adsorption component in the first region, and the method includes:
  • the adsorption object When it is detected that the adsorption object is adsorbed and fixed in the first area, the adsorption object is detected to obtain a detection result, and the detection includes detecting whether the adsorption object is a stylus;
  • the detection result is a target detection result
  • a first prompt and/or a second prompt is issued, and the target detection result includes that the adsorption object is not a stylus
  • the first prompt is used to remind the user that the suction position is inaccurate
  • the second prompt is used to remind the user of the correct suction position of the stylus
  • an embodiment of the present application provides a terminal device.
  • the terminal device is provided with a first area for placing a stylus, and the stylus is internally provided with an area for absorbing and fixing the stylus on the
  • the magnetic adsorption component in the first area the terminal device includes:
  • the object detector is arranged at a position corresponding to the first area inside the terminal device, and is used to detect whether the first area has an adsorption object specified for adsorption;
  • a processor configured to implement the above stylus detection method.
  • the embodiments of the present application provide a non-volatile computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above-mentioned stylus detection method is realized.
  • the embodiments of the present application provide a non-volatile computer-readable storage medium including computer-readable codes, or bearing computer-readable codes.
  • the computer-readable codes are run in a terminal device, the The processor in the terminal device executes the above-mentioned stylus detection method
  • Fig. 1 shows a schematic diagram of an application scenario of a method for detecting a stylus according to an embodiment of the present application.
  • Fig. 2 shows a flowchart of a method for detecting a stylus according to an embodiment of the present application.
  • Fig. 3 shows a schematic diagram of detection steps of a stylus detection method according to an embodiment of the present application.
  • FIG. 4 shows a flow chart of a stylus detection method corresponding to the first implementation of "detection" according to an embodiment of the present application.
  • Fig. 5 shows a schematic diagram of a third prompt according to an embodiment of the present application.
  • Fig. 6 shows a schematic diagram of a second prompt according to an embodiment of the present application.
  • FIG. 7 shows a schematic structural diagram of a terminal device 100 .
  • Fig. 1 shows a schematic diagram of an application scenario of a method for detecting a stylus according to an embodiment of the present application.
  • Fig. 2 shows a flowchart of a method for detecting a stylus according to an embodiment of the present application.
  • Fig. 3 shows a schematic diagram of a detection method of a stylus detection method according to an embodiment of the present application.
  • a first area 101 for absorbing a stylus is provided on the terminal device 100 , and a magnetic component, such as a magnetic metal strip, is provided inside or on the surface of the terminal device 100 corresponding to the first area 101 .
  • At least one magnetic attraction component is arranged inside the stylus 200 , and the magnetic attraction component can attract the magnetic component of the terminal device 100 when the stylus 200 approaches or touches the first area 101 , so that the stylus 200 Adsorption fixation at the first region 101 .
  • the stylus 200 may also be provided with a sensor capable of detecting its spatial position, such as a gyroscope sensor, so as to feed back its first position information to the terminal device.
  • a communication connection such as Bluetooth can be performed between the terminal device 100 and the stylus 200 .
  • the method is applied to a terminal device 100, and the method includes step S11-step S12.
  • step S11 when it is detected that an adsorption object is adsorbed and fixed in the first region, the adsorption object is detected, and a detection result is obtained.
  • the first region 101 is adsorbed and fixed with the adsorption object 300 when it is detected that the magnetic field strength at the first region 101 is within a preset strength range.
  • the stylus that the terminal device 100 can absorb and fix can be varied, and can be determined according to the minimum magnetic field strength and the maximum magnetic field strength that the terminal device 100 can detect when the stylus 200 is adsorbed to the first area 101.
  • Preset intensity ranges are set.
  • the preset strength range may be a magnetic field strength interval composed of a minimum magnetic field strength and a maximum magnetic field strength, that is, the magnetic field strength at the first region 101 is greater than or equal to the minimum magnetic field strength and the magnetic field strength at the first region 101 is less than or equal to the maximum magnetic field strength, Then it is determined that the adsorption object 300 is adsorbed and fixed in the first area 101 .
  • the magnetic field strength interval may also be determined based on the minimum magnetic field strength, that is, the magnetic field strength at the first region 101 is greater than or equal to the minimum magnetic field strength, then it is determined that the first region 101 is adsorbed and fixed with the adsorption object 300 .
  • an object detector such as a magnetic field sensor such as a Hall sensor, may be provided at a position corresponding to the first area 101 inside the terminal device 100 .
  • the magnetic field sensor is used to detect the magnetic field strength of part or all of the first region 101 and output a magnetic field detection signal.
  • the terminal device 100 can analyze and obtain the magnetic field strength of the first region 101 based on the magnetic field detection signal, and then judge whether it is within a preset strength range.
  • step S12 when the detection result is the target detection result, a first prompt and/or a second prompt are issued.
  • the first prompt is used to remind the user that the adsorption position is inaccurate, and the second prompt is used to remind The correct snap position for the user's stylus.
  • the "detection" performed in step S11 and the corresponding target detection results in step S12, and the prompts issued may include the following implementation methods:
  • a first implementation manner the detection includes detecting whether the adsorption position of the adsorption object is accurate.
  • the target detection result includes that the adsorption position of the adsorption object is inaccurate.
  • a first prompt and/or a second prompt may be issued. The first prompt.
  • the detection includes detecting whether the adsorption position of the adsorption object is accurate, and detecting whether the adsorption object is a stylus, and the target detection result includes that the adsorption position of the adsorption object is inaccurate and the The snapping object is a stylus.
  • a first prompt and/or a second prompt may be issued. The first prompt.
  • a third implementation manner the detection includes detecting whether the adsorption object is a stylus, and the target detection result includes that the adsorption object is not a stylus. Then in step S12, only the second prompt may be issued, or the first prompt and the second prompt may also be issued.
  • a third prompt is issued.
  • the third prompt may be used to remind the user that the stylus is in a charging state and/or in a connected state.
  • the detection of the adsorption object in step S11 includes at least one of the first detection step, the second detection step, and the third detection step.
  • the execution process of the pen detection method uses different implementation modes 1 to 6 of "detection" to illustrate.
  • the implementation process of the first detection step, the second detection step, and the third detection step will be described first, and then the implementation modes 1 to 6 will be illustrated.
  • the detection purpose of each step can naturally be achieved through the above-mentioned first detection step, second detection step and third detection step .
  • Other electronic products can also achieve the detection purpose through at least one of the first detection step, the second detection step and the third detection step.
  • the first detection step may include:
  • adsorption object sending a private message to the adsorption object, and listening to a private reply message returned by the adsorption object in response to the private message.
  • it may be determined whether the adsorption object is a stylus according to the monitored response result of the adsorption object to the private message.
  • the first preset time after sending the private message (such as 5s, etc., the first preset time may be greater than or equal to the interval for returning the private reply message when the adsorption object is a stylus) received
  • the first preset time may be greater than or equal to the interval for returning the private reply message when the adsorption object is a stylus
  • the private reply message, and the private message and/or the private reply message meet an expected condition, then it may be determined that the adsorption object is a stylus. If the private reply message is not received within the first preset time after the private message is sent and/or the received private reply message does not meet expected conditions, it may be determined that the adsorption object is not a stylus.
  • the private message may be a message that can only be received and parsed by different stylus attached to the terminal device.
  • the preset encryption password of the private message can be preset, and the preset encryption password (or the decryption password corresponding to the preset encryption password) can be stored in the stylus in advance; After establishing the communication connection, the terminal device sends the preset encryption password (or the decryption password corresponding to the preset encryption password) to the stylus for storage. In this way, it can be ensured that other electronic products that are not the stylus (that is, the adsorption object) cannot respond to the private message, thereby improving the accuracy of recognition and detection of the stylus.
  • the stylus can also be set in advance, so that the private reply message returned by the stylus carries a tag that can indicate that the private reply message comes from the stylus, such as the name and type of the stylus can be used as the tag.
  • the terminal device can determine whether the electronic product (that is, the adsorption object) that sends the private reply message is a stylus based on the tag carried in the private reply message, which improves the accuracy of stylus recognition and detection.
  • the expected condition may include that the private message has been encrypted by a preset encryption password and/or the returned private reply message "has a label corresponding to the stylus", otherwise, the expected condition is not met. Failure to meet the expected conditions can be, for example, the label of the private reply message is incorrect, the content of the private reply message cannot be parsed, or the private reply message is an error message, and so on.
  • the first detection step may include a first seed detection step, a second seed detection step, and a third seed detection step.
  • the first sub-detection step may include: when it is determined that no Bluetooth connection is established between the adsorption object and the terminal device, sending a private message satisfying the first condition to the adsorption object, and listening to the adsorption object for a response A private reply message returned from a private message satisfying the first condition.
  • the first condition is that the private message is the wireless charging protocol message.
  • the private reply message can also reflect whether the adsorption position of the adsorption object is accurate. Then, if the private reply message is received within the first preset time after sending the private message, and the private message and/or the private reply message meet the expected conditions, it can be determined that the adsorption object is Stylus and the adsorption position of the stylus is accurate. If the private reply message is not received within the first preset time after sending the private message and/or the received private reply message does not meet the expected conditions, it can be determined that the adsorption object is not a stylus and the adsorption position is also Inaccurate.
  • the second sub-detection step may include: when it is determined that a Bluetooth connection has been established between the adsorption object and the terminal device, sending a private message to the adsorption object through the Bluetooth connection, and listening to the response of the adsorption object A private reply message returned from a private message. Since the private message is sent via Bluetooth, the private reply message can only reflect whether the adsorption object is a stylus, and whether the adsorption position of the adsorption object is accurate requires further detection and judgment.
  • the third sub-detection step may include: sending a private message satisfying the second condition to the attached object, and listening to a private reply message returned by the attached object in response to the private message meeting the second condition.
  • the second condition includes that the private message can also be used to acquire the first location information of the adsorption object, and the private reply message includes the first location information of the adsorption object.
  • the relative positional relationship between the attracted object and the terminal device is determined, and furthermore, if the relative positional relationship satisfies a preset condition, it may be at least preliminarily or directly determined that the attracted object is a stylus.
  • the relative positional relationship does not satisfy the preset condition, it can be determined that the adsorption object is not a stylus. Then, if the relative positional relationship satisfies the preset condition, it means that the private reply message satisfies the expected condition.
  • the preset condition may include: a first preset condition or a second preset condition.
  • the first preset condition is that in the reference coordinate system, the difference between the first position coordinates of the adsorption object and the second position coordinates of the terminal device in at least one coordinate axis is less than or equal to the preset difference .
  • the first location coordinates are determined according to the first location information received within a first preset time. Wherein, the preset difference may be zero.
  • the terminal device may obtain gyroscope data of its own gyroscope sensor, and use the gyroscope data set as the second position information. Then, the second position coordinates (x2, y2, z2) of the terminal device 100 in the coordinate system OXYZ shown in FIG. 3 are determined based on the determined second position information. And determine the first position coordinates (x1, y1, z1) of the adsorption object 300 in the coordinate system OXYZ shown in FIG. 3 based on the first position information.
  • the coordinate values of the first position coordinate and the second position coordinate should be consistent in at least one coordinate axis of the coordinate system OXYZ (such as the OZ axis in FIG. 3 ). Therefore, when it is determined that the difference in coordinate values between the first position coordinates and the second position coordinates in at least one coordinate axis is less than or equal to the preset difference, it can be determined that the relative positional relationship satisfies the first preset condition.
  • the second preset condition is that the actual spatial position of the adsorption object 300 is the same as the predicted spatial position 200' of the stylus.
  • the actual spatial position is determined according to the first position information received within a first preset time, and the predicted spatial position 200' of the stylus is determined according to the second position information of the terminal device 100, the first An area 101 is determined relative to the third position information of the terminal device 100 .
  • the third position information may include the size of the first area 101 , the position of any point such as the center of the first area 101 on the terminal device 100 , and so on.
  • the actual spatial position of the adsorption object 300 may be determined according to the first position information.
  • the actual spatial position may be the spatial position of any point on the adsorbed object such as the center of the adsorbed object 300 , or a set of spatial positions that can represent the position of each point on the adsorbed object in space.
  • the terminal device 100 may determine the actual spatial position of the terminal device 100 based on the second position information, for example, the second position coordinates (x2, y2 , z2). Then based on the third position information of the first area 101, it can be predicted that when the stylus is attached to the first area 101, the predicted spatial position 200' (x0, y0, z0) of the stylus corresponding to the attached stylus. Based on the first position information, the first position coordinates (x1, y1, z1) of the adsorption object 300 in the coordinate system OXYZ shown in FIG. 3 (that is, the actual spatial position of the adsorption object 300) are determined.
  • the first position information can indicate the actual spatial position of the adsorption object, if the first position information can meet the detection standard for the adsorption position of the adsorption object, based on the first position information, it can also It is judged whether the adsorption position of the adsorption object is accurate. If the relative positional relationship satisfies the preset condition in this case, not only can it be determined whether the adsorption object is a stylus, but also the accuracy of the adsorption position of the stylus can be determined.
  • the second detection step may include: sending a connection diagnosis message to the adsorption object 300, and listening to a diagnosis reply message returned by the adsorption object 300 in response to the connection diagnosis message.
  • the connection diagnostic message includes a wireless charging protocol message.
  • the wireless charging protocol includes the Qi protocol (a "wireless charging" standard launched by the Wireless Power Consortium (Qi)), the PMA protocol (Power Matters Alliance), the A4WP protocol (Alliance for Wireless Power), and the like.
  • the connection diagnosis message may be a ping message (communication connection detection packet) and other messages.
  • the terminal device 100 may determine whether the adsorption position of the adsorption object is accurate based on the monitored response result of the adsorption object to the connection diagnosis message, and then determine whether the communication connection and/or the connection required for charging between the adsorption object and the terminal device have been completed. Connect normally.
  • diagnosis reply message is not received within a second preset time after sending the connection diagnosis message, it may be determined that the adsorption position of the adsorption object is inaccurate. If the diagnosis reply message is received within a second preset time after sending the connection diagnosis message, it may be determined that the adsorption position of the adsorption object is inaccurate.
  • the second preset time may be 5s, etc., and the second preset time may be greater than or equal to the interval between returning the reply message when the adsorption object is a stylus.
  • the third detection step may include: the terminal device may acquire a target detection signal sent by the target sensor. Furthermore, it may be determined based on the target detection signal whether the adsorption object is a stylus and/or whether the adsorption position of the adsorption object is inaccurate.
  • Detection” implementation mode 1 “detection” includes a first detection step and a second detection step. And the second detection step is executed when the first detection result of the first detection step is that the adsorption object is a stylus.
  • FIG. 4 shows a flow chart of a stylus detection method corresponding to the first implementation of "detection” according to an embodiment of the present application.
  • the method of realizing the first detection of the stylus through “detection” includes step S101-step S108.
  • step S101 the detection of the adsorption object for the first area is performed.
  • the way of detecting the attracted object can be realized by referring to the above way of using whether the magnetic field strength in the first region is within the preset strength range.
  • step S102 it is determined whether the first area 101 is adsorbed and fixed with an adsorption object.
  • Step S103 is executed when the adsorption object is fixed in the first area. In the case that the first region 101 does not adsorb and fix the adsorption object, step S101 is continued.
  • step S103 a first detection step is performed.
  • the first detection step may be any one of the first seed detection step, the second seed detection step and the third detection step described above.
  • step S104 it is determined whether the adsorption object is a stylus.
  • the private reply message may also reflect whether the adsorption position of the adsorption object is accurate. Then, if the private reply message is received within the first preset time after sending the private message, and the private message and/or the private reply message meet the expected conditions, it can be determined that the adsorption object is stylus and the adsorption position of the stylus is accurate, then step S108 can be executed directly.
  • step S105 can be executed directly.
  • the first detection step is the second seed detection step
  • the private reply message is received within the first preset time after sending the private message, and the private message and/or the private reply If the message meets the expected condition, it can be determined that the adsorption object is a stylus, and step S106 is continued. If the private reply message is not received within the first preset time after sending the private message and/or the received private reply message does not meet the expected conditions, it can be determined that the adsorption object is not a stylus, and continue Execute step S105.
  • the first detection step is the third detection step
  • the private reply message is received within the first preset time after sending the private message, and the private message and/or according to the private reply message If the determined relative positional relationship satisfies the preset condition, it can be determined that the adsorption object is a stylus, and step S106 is continued. If the private reply message is not received within the first preset time after sending the private message and/or the relative positional relationship determined according to the received private reply message does not meet the preset condition, the adsorption can be determined If the object is not a stylus, proceed to step S105.
  • step S105 a first prompt and/or a second prompt corresponding to the first detection step is issued.
  • step S105 may issue a second prompt.
  • step S105 may issue a first prompt and/or a second prompt.
  • step S106 in the case that only the suction object is determined to be the stylus, it is necessary to further perform the second detection step, so as to further perform step S107 to determine whether the suction position of the stylus is correct.
  • step S107 it is determined whether the suction position of the stylus is accurate. If the diagnosis reply message is not received within the second preset time after sending the connection diagnosis message, it may be determined that the adsorption position of the adsorption object is inaccurate, and step S105 may be continued. If the diagnosis reply message is received within the second preset time after sending the connection diagnosis message, it may be determined that the adsorption position of the adsorption object is inaccurate, and step S108 may be continued.
  • step S108 a third prompt is issued.
  • the third prompt is also used to remind the user that the stylus is in a charging state and/or is in a ready-to-use state.
  • issuing the third prompt may include at least one of the following operations: displaying the third prompt on a display screen of the terminal device. Vibrate in a manner corresponding to said third prompt. Ring the bell in the manner corresponding to the third prompt. Lights up in a manner corresponding to the third cue, such as a flashing light. Speak the voice corresponding to the third prompt.
  • FIG. 5 shows a schematic diagram of a third prompt according to an embodiment of the present application.
  • the notification bar L can be displayed on the display screen 102 of the terminal device 100.
  • the third prompt T3 in the notification bar L.
  • Text such as "the stylus is connected and charging” can be used in T3 to remind the user that the stylus is normally connected and can be used and is in a charging state.
  • the third prompt may be displayed directly in the interface currently displayed to the user through a pop-up window or the like.
  • vibration, ringing, and light corresponding to the accurate reminder of adsorption can be issued according to the user's settings or the default settings of the terminal device (such as using a flashlight to flash).
  • the voice corresponding to the accurate prompt of the suction can be a prompt such as "the suction of the stylus is connected and charging”.
  • the first prompt may include at least one of the following operations: displaying the first prompt on a display screen of the terminal device. Vibrating in a manner corresponding to said first prompt. Ring the bell in a manner corresponding to the first prompt. Flashing light in a manner corresponding to the first prompt (such as flashing with a flashlight). A voice corresponding to the first prompt is emitted.
  • the second prompt may include displaying the second prompt on a display screen of the terminal device, and/or controlling an indicator light located in the first area to emit light.
  • an indicator light located in the first area to emit light.
  • a strip indicator light can be installed in the first area, and the user can determine the position of the first area based on the light-emitting position by controlling the strip indicator light to continuously light or flash.
  • FIG. 6 shows a schematic diagram of a second prompt according to an embodiment of the present application.
  • the terminal device 100 determines that it is necessary to issue the first prompt and the second prompt
  • the terminal device 100 when the terminal device 100 is in the unlocked state or in the non-unlocked state, it can be displayed in the form of a pop-up window on the display screen 102 of the terminal device 100.
  • the user can be reminded by text such as "Please press the stylus in the position shown in the figure” and pictures or animations in T2-1 (the animation is not shown in the figure).
  • the implementation manner of the above-mentioned operation of issuing the first prompt is similar to the implementation manner of the third prompt, which can be set with reference to the above, and will not be repeated here.
  • the implementation of the first prompt, the second prompt and the third prompt is not limited to the examples given above, and may also include other methods. Those skilled in the art can accurately prompt for adsorption and position adjustment prompts according to actual needs.
  • the implementation method is set, which is not limited in this application.
  • the second implementation mode of “detection” includes a first detection step and a second detection step. And the execution sequence of the first detection step and the second detection step is not limited. The two can be executed simultaneously or sequentially.
  • the first prompt and/or the second prompt may be issued.
  • a third prompt may be issued.
  • the third implementation mode of "detection” only includes the third detection step. Then, as long as it is determined that the adsorption position of the adsorption object is inaccurate and/or the adsorption object is not a stylus, the first prompt and/or the second prompt may be issued. When it is determined that the adsorption object is the stylus and the adsorption position of the stylus is accurate, a third prompt may be issued. In this way, the detection of the adsorbed object can be realized only by means of an independently arranged target sensor.
  • Detection” implementation mode four “detection” includes a first detection step, a second detection step, and a third detection step, and the first detection result of the second detection step in the first detection step is that the adsorption object is In the case of a stylus, the third detection step is performed after the second detection step determines that the adsorption position is correct.
  • step S107 a third detection step needs to be performed, and if it is determined through the third detection step that the adsorption position is correct, continue to execute step S108. If it is determined through the third detection step that the adsorption position is inaccurate, continue to execute step S105.
  • "Detection” implementation mode five “detection” includes a first detection step, a second detection step, and a third detection step, and the first detection result of the third detection step in the first detection step is that the adsorption object is In the case of a stylus, the second detection step is performed after the third detection step determines that the suction position is correct. Since the fifth implementation of “detection” is the same as some steps of the first implementation of “detection”, please refer to the above for the same parts, and will not be repeated here, but the difference between the fifth implementation of "detection” and the first implementation of "detection” in:
  • step S104 a third detection step is performed, and in the case that the adsorption position is determined to be correct through the third detection step, step S106 is continued. If it is determined through the third detection step that the adsorption position is inaccurate, continue to execute step S105.
  • Detection” implementation method six “detection” includes a first detection step, a second detection step, and a third detection step, and the first detection result of the third detection step in the first detection step is that the adsorption object is In the case of a stylus, the second detection step is performed after the third detection step determines that the adsorption object is a stylus. Since the sixth implementation of “detection” is the same as the first implementation of "detection", you can refer to the above for the same parts, and will not go into details here, but the difference between the sixth implementation of "detection” and the first implementation of “detection” in:
  • step S104 a third detection step is performed, and in the case that the adsorption object is determined to be a stylus through the third detection step, step S106 is continued. If it is determined through the third detection step that the adsorption object is not the stylus, continue to execute step S105.
  • the terminal device can continue to monitor the connection status between the stylus and the terminal device, and issue corresponding prompts according to different connection statuses. For example, when no operation on the stylus is detected for longer than the waiting time, a prompt that the stylus is about to be disconnected may be issued to remind the user that the stylus has not been used for a long time and is about to disconnect from the stylus. When it is detected that the power of the stylus is too low to be powered off, a low battery prompt can be issued to remind the user that the stylus is about to be powered off due to low power, so that the user can charge the stylus in time. wait.
  • FIG. 7 shows a schematic structural diagram of a terminal device 100 .
  • the terminal device 100 may include a mobile phone, a foldable electronic device, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal At least one of digital assistant (personal digital assistant, PDA), artificial intelligence (artificial intelligence, AI) equipment, vehicle equipment, smart home equipment, or smart city equipment.
  • PDA digital assistant
  • AI artificial intelligence
  • vehicle equipment smart home equipment
  • smart city equipment smart city equipment
  • the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) connector 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
  • the structure shown in the embodiment of the present application does not constitute a specific limitation on the terminal device 100 .
  • the terminal device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the processor can generate an operation control signal according to the instruction opcode and the timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 may be a cache memory.
  • the memory may store instructions or data used by the processor 110 or used frequently. If the processor 110 needs to use the instruction or data, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • the interface 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 transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
  • the processor 110 may be connected to modules such as a touch sensor, an audio module, a wireless communication module, a display, and a camera through at least one of the above interfaces.
  • the processor 110 is configured to execute the above-mentioned stylus detection method.
  • the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the terminal device 100 .
  • the terminal device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
  • the USB connector 130 is an interface conforming to the USB standard specification, and can be used to connect the terminal device 100 and peripheral devices, specifically, it can be a Mini USB connector, a Micro USB connector, a USB Type C connector, and the like.
  • the USB connector 130 can be used to connect to a charger to charge the terminal device 100 , and can also be used to connect to other terminal devices to realize data transmission between the terminal device 100 and other terminal devices. It can also be used to connect earphones to output the audio stored in the terminal device through the earphones. This connector can also be used to connect other terminal devices, such as VR devices.
  • the standard specifications of the Universal Serial Bus may be USB1.x, USB2.0, USB3.x and USB4.
  • the charging management module 140 is used for receiving charging input of the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through the wireless charging coil of the terminal device 100 . While the charging management module 140 is charging the battery 142 , it can also supply power to the terminal device through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be disposed in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the terminal 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.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the terminal device 100 can be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the terminal device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • a 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 to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is passed to the application processor after being processed by the baseband processor.
  • the application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the terminal device 100 including wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), bluetooth low power consumption (bluetooth low energy, BLE), ultra wide band (UWB), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other terminal devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology, etc.
  • the GNSS can include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou satellite navigation system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi- zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • global positioning system global positioning system, GPS
  • global navigation satellite system global navigation satellite system
  • GLONASS global navigation satellite system
  • Beidou satellite navigation system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quasi-zenith satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the terminal device 100 may implement a display function 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 screen 194 and the application processor. GPUs are 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 screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the terminal device 100 may include one or more display screens 194 .
  • the terminal device 100 may implement an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an application processor. For example, music playing, recording, playing the voice and ringing corresponding to the accurate prompt of adsorption, playing the voice and ringing corresponding to the position adjustment prompt, and so on.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
  • Speaker 170A also referred to as a "horn" is used to convert audio electrical signals into sound signals.
  • the terminal device 100 can listen to music through the speaker 170A, or output an audio signal of a hands-free call.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the receiver 170B can be placed close to the human ear to receive the voice.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C.
  • the terminal device 100 may be provided with at least one microphone 170C. In some other embodiments, the terminal device 100 may be provided with two microphones 170C, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the terminal device 100 can also be provided with three, four or more microphones 170C to realize sound signal collection, noise reduction, identify sound sources, realize directional recording functions, and the like.
  • the earphone interface 170D is used for connecting wired earphones.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (open mobile terminal platform, OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the gyroscope sensor 180B can be used to determine the motion posture of the terminal device 100 .
  • the angular velocity of the terminal device 100 around three axes ie, x, y and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shake angle of the terminal device 100, calculates the distance that the lens module needs to compensate according to the angle, and controls the reverse movement of the lens to offset the shake of the terminal device 100 to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the gyro sensor 180B may provide the terminal device with the above second location information.
  • the magnetic sensor 180D includes a Hall sensor.
  • the terminal device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip holster.
  • the magnetic sensor 180D may be used to detect folding or unfolding of the terminal device, or a folding angle.
  • the terminal device 100 when the terminal device 100 is a clamshell machine, the terminal device 100 may detect opening and closing of the clamshell according to the magnetic sensor 180D.
  • the magnetic sensor 180D is also disposed inside the terminal device 100 at a position corresponding to the first area 101 for detecting the magnetic field strength in the first area.
  • the acceleration sensor 180E can detect the acceleration of the terminal device 100 in various directions (generally three axes). When the terminal device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to recognize the posture of terminal equipment, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the distance sensor 180F is used to measure the distance.
  • the terminal device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the terminal device 100 emits infrared light through the light emitting diode.
  • the terminal device 100 detects infrared reflected light from nearby objects using a photodiode. When the intensity of the detected reflected light is greater than the threshold, it may be determined that there is an object near the terminal device 100 . When the intensity of the detected reflected light is less than the threshold, the terminal device 100 may determine that there is no object near the terminal device 100 .
  • the terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear for a call, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, automatic unlock and lock screen in pocket mode.
  • the ambient light sensor 180L can be used to sense ambient light brightness.
  • the terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is blocked, for example, the terminal device is in a pocket. When it is detected that the terminal device is blocked or in a pocket, some functions (such as a touch function) can be disabled to prevent misuse.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the terminal device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access to the application lock, take pictures with fingerprints, answer incoming calls with fingerprints, and so on.
  • the temperature sensor 180J is used to detect temperature.
  • the terminal device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature processing strategy. For example, when the temperature detected by the temperature sensor 180J exceeds a threshold, the terminal device 100 executes reducing the performance of the processor so as to reduce the power consumption of the terminal device to implement thermal protection.
  • the terminal device 100 when the temperature detected by the temperature sensor 180J is lower than another threshold, the terminal device 100 heats the battery 142 . In some other embodiments, when the temperature is lower than another threshold, the terminal device 100 may boost the output voltage of the battery 142 .
  • the touch sensor 180K is also called “touch device”.
  • the touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the terminal device 100 , which is different from the position of the display screen 194 .
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the human pulse and receive the blood pressure beating signal.
  • the bone conduction sensor 180M can also be disposed in the earphone, combined into a bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vibrating bone mass of the vocal part acquired by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, and realize the heart rate detection function.
  • the keys 190 may include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100 .
  • the motor 191 can generate a vibrating reminder.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • the motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the motor 191 may vibrate corresponding to a cling-accurate cue, vibrate corresponding to a position adjustment cue, and so on.
  • the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • An embodiment of the present application provides a device for detecting a stylus, including: a processor and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions.
  • An embodiment of the present application provides a non-volatile computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is realized.
  • An embodiment of the present application provides a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium bearing computer-readable codes, when the computer-readable codes are stored in a processor of a terminal device When running in the terminal device, the processor in the terminal device executes the above method.
  • a computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device.
  • a computer readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer-readable storage media include: portable computer disk, hard disk, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), erasable Electrically Programmable Read-Only-Memory (EPROM or flash memory), Static Random-Access Memory (Static Random-Access Memory, SRAM), Portable Compression Disk Read-Only Memory (Compact Disc Read-Only Memory, CD -ROM), Digital Video Disc (DVD), memory sticks, floppy disks, mechanically encoded devices such as punched cards or raised structures in grooves with instructions stored thereon, and any suitable combination of the foregoing .
  • RAM Random Access Memory
  • ROM read only memory
  • EPROM or flash memory erasable Electrically Programmable Read-Only-Memory
  • Static Random-Access Memory SRAM
  • Portable Compression Disk Read-Only Memory Compact Disc Read-Only Memory
  • CD -ROM Compact Disc Read-Only Memory
  • DVD Digital Video Disc
  • Computer readable program instructions or codes described herein may be downloaded from a computer readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as the Internet, local area network, wide area network, and/or wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or a network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • Computer program instructions for performing the operations of the present application may be assembly instructions, instruction set architecture (Instruction Set Architecture, ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in one or more source or object code written in any combination of programming languages, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as the “C” language or similar programming languages.
  • Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer can be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external computer such as use an Internet service provider to connect via the Internet).
  • electronic circuits such as programmable logic circuits, field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or programmable logic arrays (Programmable Logic Array, PLA), the electronic circuit can execute computer-readable program instructions, thereby realizing various aspects of the present application.
  • These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or block diagrams.
  • each block in a flowchart or block diagram may represent a module, a portion of a program segment, or an instruction that includes one or more Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block in the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented with hardware (such as circuits or ASIC (Application Specific Integrated Circuit, application-specific integrated circuit)), or can be implemented with a combination of hardware and software, such as firmware.
  • hardware such as circuits or ASIC (Application Specific Integrated Circuit, application-specific integrated circuit)
  • firmware such as firmware

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Emergency Management (AREA)
  • Position Input By Displaying (AREA)
  • Measurement Of Length, Angles, Or The Like Using Electric Or Magnetic Means (AREA)
  • Length Measuring Devices With Unspecified Measuring Means (AREA)

Abstract

本申请涉及一种手写笔检测方法、装置及终端设备,该方法应用于设置有用于吸附手写笔的第一区域的终端设备,手写笔的内部设置有用于将手写笔吸附固定在第一区域的磁力吸附部件,方法包括:在检测到第一区域吸附固定有吸附对象的情况下,对吸附对象进行检测,得到检测结果,检测包括检测吸附对象的吸附位置是否准确;在检测结果为目标检测结果的情况下,发出第一提示和/或第二提示,目标检测结果包括吸附对象的吸附位置不准确;其中,第一提示用于提醒用户吸附位置不准确,第二提示用于提醒用户手写笔的正确吸附位置。能快速、准确地进行手写笔检测。

Description

手写笔检测方法、装置及终端设备
本申请要求于2021年06月29日提交中国专利局、申请号为202110726723.X、申请名称为“手写笔检测方法、装置及终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,尤其涉及一种手写笔检测方法及终端设备。
背景技术
手写笔是平板电脑等可以通过触控式输入的终端设备进行信息输入及操作的常用电子产品。用户利用手写笔可以在终端设备上进行文字、图形等的输入。用户先移动手写笔使其吸附到终端设备上之后,再拿起手写笔进行使用。而由于手写笔是利用磁力吸附固定到终端设备上的,相关技术中终端设备通过磁场强度确定手写笔是否吸附,存在对手写笔的吸附检测的判断不准确、甚至会误判断的问题。
发明内容
有鉴于此,提出了一种手写笔检测方法、装置及终端设备。
第一方面,本申请的实施例提供了一种手写笔检测方法,应用于终端设备,所述终端设备上设置有用于吸附手写笔的第一区域,所述手写笔的内部设置有用于将所述手写笔吸附固定在所述第一区域的磁力吸附部件,所述方法包括:
在检测到所述第一区域吸附固定有吸附对象的情况下,对所述吸附对象进行检测,得到检测结果,所述检测包括检测所述吸附对象的吸附位置是否准确;
在所述检测结果为目标检测结果的情况下,发出第一提示和/或第二提示,所述目标检测结果包括所述吸附对象的吸附位置不准确;
其中,所述第一提示用于提醒用户吸附位置不准确,所述第二提示用于提醒用户手写笔的正确吸附位置。
根据第一方面,能快速、准确地检测到第一区域吸附固定有吸附对象的情况下,对第一区域吸附的吸附对象进行检测,并在检测结果为目标检测结果的情况下发出用于提醒用户吸附位置不准确的第一提示和/或用于提醒用户手写笔的正确吸附位置的第二提示。
在一种可能的实现方式中,所述检测还包括检测所述吸附对象是否为手写笔,所述目标检测结果还包括所述吸附对象为手写笔。
这样,可以在吸附对象为手写笔且吸附对象的吸附位置不准确的情况下发出第一提示和/或第二提示,使得手写笔检测的准确性更高。
在一种可能的实现方式中,所述检测包括第一检测步骤和第二检测步骤,所述第一检测步骤用于检测所述吸附对象是否为手写笔,所述第二检测步骤用于检测所述吸附对象的吸附位置是否准确。这样,可以不限定第一检测步骤和第二检测步骤之间的执行顺序,仅以目标检测结果是否达到为基准,可以提高手写笔检测的效率。
在一种可能的实现方式中,所述第二检测步骤在所述第一检测步骤的第一检测结果为所述吸附对象为手写笔的情况下执行。这样,在确定吸附对象为手写笔之后,再执行第二检测步骤,可以减少终端设备所执行的操作,节省终端设备的处理器资源。
在一种可能的实现方式中,所述第一检测步骤,包括:向所述吸附对象发送私有消息,并监听所述吸附对象响应于所述私有消息返回的私有回复消息;其中,所述吸附对象为手写笔,包括:在发出所述私有消息后的第一预设时间内接收到所述私有回复消息。这样,可以提高吸附对象是否为手写笔检测的准确性。
在一种可能的实现方式中,所述第二检测步骤,包括:向所述吸附对象发送连接诊断消息,并监听所述吸附对象响应于所述连接诊断消息返回的诊断回复消息,所述连接诊断消息包括无线充电协议消息;其中,所述吸附对象的吸附位置不准确,包括:在发出所述连接诊断消息后的第二预设时间内未接收到所述诊断回复消息。这样,可以简化为检测吸附对象的吸附位置是否准确终端设备所需执行的操作。
在一种可能的实现方式中,所述私有消息还用于获取所述吸附对象的第一位置信息,所述私有回复消息包括所述吸附对象的第一位置信息;
其中,向所述吸附对象发送连接诊断消息,包括:
根据所述第一位置信息,确定出所述吸附对象与所述终端设备之间的相对位置关系;
在所述相对位置关系满足预设条件的情况下,向所述吸附对象发送连接诊断消息。
在一种可能的实现方式中,所述预设条件包括:
在参考坐标系中,所述吸附对象的第一位置坐标与所述终端设备的第二位置坐标的至少在一个坐标轴中的坐标值差值小于或等于预设差值,所述第一位置坐标是根据在第一预设时间内接收到的所述第一位置信息确定的;或者
所述吸附对象的实际空间位置与所述手写笔预测空间位置相同,所述实际空间位置是根据第一预设时间内接收到的所述第一位置信息确定的,所述手写笔预测空间位置是根据所述终端设备的第二位置信息、所述第一区域相对于所述终端设备的第三位置信息确定的。
这样,由于第一位置信息可以指示吸附对象的实际空间位置,进而基于确定的吸附对象与所述终端设备之间的相对位置关系可以提高手写笔检测的准确性。
在一种可能的实现方式中,发出第一提示包括以下至少一种操作:
在所述终端设备的显示屏中显示所述第一提示;
以对应于所述第一提示的方式进行震动;
以对应于所述第一提示的方式响铃;
以对应于所述第一提示的方式闪光;
发出对应于所述第一提示的语音;
发出第二提示包括:在所述终端设备的显示屏中显示所述第二提示,和/或控制位于所述第一区域的指示灯发光。
这样,可以通过各种可能的方式提醒用户,以使得用户可以及时调整手写笔位置实现手写笔充电或使用,或者将不是手写笔的其他物体或电子产品与终端设备远离,避免其干扰终端设备。
第二方面,本申请的实施例提供了一种手写笔检测方法,应用于终端设备,所述终端设备上设置有用于吸附手写笔的第一区域,所述手写笔的内部设置有用于将所述手写笔吸 附固定在所述第一区域的磁力吸附部件,所述方法包括:
在检测到所述第一区域吸附固定有吸附对象的情况下,对所述吸附对象进行检测,得到检测结果,所述检测包括检测所述吸附对象是否为手写笔;
在所述检测结果为目标检测结果的情况下,发出第一提示和/或第二提示,所述目标检测结果包括所述吸附对象不是手写笔;
其中,所述第一提示用于提醒用户吸附位置不准确,所述第二提示用于提醒用户手写笔的正确吸附位置。
第三方面,本申请的实施例提供了一种终端设备所述终端设备上设置有用于放置手写笔的第一区域,所述手写笔通过内部设置有用于将所述手写笔吸附固定在所述第一区域的磁力吸附部件,所述终端设备包括:
对象检测器,设置在所述终端设备内部与所述第一区域对应的位置,用于检测所述第一区域是否吸附规定有吸附对象;
处理器,配置为实现上述手写笔检测方法。
第四方面,本申请的实施例提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述手写笔检测方法。
第五方面,本申请的实施例提供了包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在终端设备中运行时,所述终端设备中的处理器执行上述手写笔检测方法
本申请的这些和其他方面在以下(多个)实施例的描述中会更加简明易懂。
附图说明
包含在说明书中并且构成说明书的一部分的附图与说明书一起示出了本申请的示例性实施例、特征和方面,并且用于解释本申请的原理。
图1示出根据本申请一实施例的手写笔检测方法的应用场景示意图。
图2示出根据本申请一实施例的手写笔检测方法的流程图。
图3示出根据本申请一实施例的手写笔检测方法的检测步骤示意图。
图4示出根据本申请一实施例的手写笔检测方法对应于“检测”实现方式一的流程图。
图5示出根据本申请一实施例的第三提示的示意图。
图6示出根据本申请一实施例的第二提示的示意图。
图7示意了一种终端设备100的结构示意图。
具体实施方式
以下将参考附图详细说明本申请的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
另外,为了更好的说明本申请,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本申请同样可以实施。在一些实例中,对于 本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本申请的主旨。
为解决上述问题,本申请提供了一种手写笔检测方法、装置及终端设备,能快速、准确地检测到第一区域吸附固定有吸附对象的情况下,对第一区域吸附的吸附对象进行检测,并根据检测结果发出对应的提示。图1示出根据本申请一实施例的手写笔检测方法的应用场景示意图。图2示出根据本申请一实施例的手写笔检测方法的流程图。图3示出根据本申请一实施例的手写笔检测方法的检测示意图。
如图1所示,终端设备100上设置有用于吸附手写笔的第一区域101,终端设备100内部或表面对应于第一区域101的位置设置有磁性部件,如磁性金属条。
如图1所示,手写笔200内部设置有至少一个磁力吸附部件,该磁力吸附部件可在手写笔200靠近或接触到第一区域101时与终端设备100的磁性部件吸引,以将手写笔200吸附固定在第一区域101处。手写笔200内部还可以设置有陀螺仪传感器等能够对其进行空间位置检测的传感器,以向终端设备反馈其第一位置信息。终端设备100与手写笔200之间可以进行蓝牙等通信连接。
如图1、图2、图3所示,该方法应用于终端设备100,该方法包括步骤S11-步骤S12。
在步骤S11中,在检测到所述第一区域吸附固定有吸附对象的情况下,对所述吸附对象进行检测,得到检测结果。
其中,可以在检测到所述第一区域101处磁场强度处于预设强度范围的情况下,确定所述第一区域101吸附固定有吸附对象300。
其中,终端设备100所能吸附固定的手写笔可以是多种多样的,可以根据不同手写笔200吸附到第一区域101时,终端设备100所能检测到的最小磁场强度和最大磁场强度,对预设强度范围进行设置。预设强度范围可以是由最小磁场强度和最大磁场强度构成的磁场强度区间,也即第一区域101处磁场强度大于或等于最小磁场强度且第一区域101处磁场强度小于或等于最大磁场强度,则确定所述第一区域101吸附固定有吸附对象300。还可以是基于最小磁场强度确定磁场强度区间,也即第一区域101处磁场强度大于或等于最小磁场强度,则确定所述第一区域101吸附固定有吸附对象300。
在一种可能的实现方式中,可以在终端设备100内部对应于第一区域101的位置设置对象检测器,如霍尔传感器等磁场传感器。以磁场传感器为例,磁场传感器用于对第一区域101的部分或全部区域进行磁场强度检测,输出磁场检测信号。终端设备100基于该磁场检测信号就可以分析得到所述第一区域101的磁场强度,进而判断其是否处于预设强度范围。
在步骤S12中,在所述检测结果为目标检测结果的情况下,发出第一提示和/或第二提示所述第一提示用于提醒用户吸附位置不准确,所述第二提示用于提醒用户手写笔的正确吸附位置。
其中,步骤S11中执行的“检测”以及对应的步骤S12中的目标检测结果、所发出的提示可以包括以下几种实现方式:
第一种实现方式:所述检测包括检测所述吸附对象的吸附位置是否准确。所述目标检测结果包括所述吸附对象的吸附位置不准确。步骤S12中可以发出第一提示和/或第二提示所述第一提示。
第二种实现方式:所述检测包括检测所述吸附对象的吸附位置是否准确、以及检测所 述吸附对象是否为手写笔,所述目标检测结果包括所述吸附对象的吸附位置不准确和所述吸附对象为手写笔。步骤S12中可以发出第一提示和/或第二提示所述第一提示。
第三种实现方式:所述检测包括检测所述吸附对象是否为手写笔,所述目标检测结果包括所述吸附对象不是手写笔。则步骤S12中可以仅发出第二提示,或者也可以发出第一提示和第二提示。
在一种可能的实现方式中,在所述检测结果为吸附目标为手写笔且手写笔的吸附位置准确的情况下,发出第三提示。所述第三提示可以用于提醒用户手写笔处于充电状态和/或已连接状态。
其中,步骤S11中对所述吸附对象的检测包括第一检测步骤、第二检测步骤、第三检测步骤中的至少一个步骤,在“检测”所包含的检测步骤不同的情况下,本申请手写笔检测方法的执行过程存在一定差异,以下通过“检测”的不同的实现方式一至六进行示例性说明。为简明下面先对第一检测步骤、第二检测步骤、第三检测步骤的执行过程进行说明后,再对实现方式一至六进行示例性说明。其中,若吸附对象并不是手写笔,而是磁铁等物体,由于物体并不能与终端设备进行通信,通过上述第一检测步骤、第二检测步骤和第三检测步骤自然可以实现各步骤的检测目的。而其他电子产品通过第一检测步骤、第二检测步骤和第三检测步骤中的至少一种步骤,也可以实现检测目的。
第一检测步骤可以包括:
向所述吸附对象发送私有消息,并监听所述吸附对象响应于所述私有消息返回的私有回复消息。其中,根据监听到的所述吸附对象对所述私有消息的响应结果可以判断出吸附对象是否为手写笔。
其中,若在发出所述私有消息后的第一预设时间内(如5s等,第一预设时间可以大于或等于吸附对象为手写笔的情况下其返回私有回复消息的间隔时长)接收到所述私有回复消息、且所述私有消息和/或所述私有回复消息满足预期条件,则可以确定所述吸附对象为手写笔。若在发出所述私有消息后的第一预设时间内未接收到所述私有回复消息和/或收到的私有回复消息不满足预期条件,则可以确定所述吸附对象不是手写笔。
其中,私有消息可以是仅吸附到终端设备上的不同手写笔能够接收并解析的消息。例如,可以预先设置私有消息的预设加密密码,并预先在手写笔中存储该预设加密密码(或者存储对应于该预设加密密码的解密密码);或者还可以在手写笔第一次与终端设备建立通信连接之后将该预设加密密码(或者对应于该预设加密密码的解密密码)发送至手写笔以供其存储。这样,可以保证其他不是手写笔的电子产品(也即吸附对象)无法响应该私有消息,提高了手写笔识别检测的准确性。
其中,还可以预先对手写笔进行设置,以使得手写笔返回的私有回复消息中携带有能够指示该私有回复消息来自手写笔的标签,如手写笔的名称、类型等均可以作为该标签。这样,终端设备就可以基于私有回复消息中携带的标签判断发出该私有回复消息的电子产品(也即吸附对象)是否为手写笔,提高了手写笔识别检测的准确性。
这样,预期条件可以包括私有消息已经通过预设加密密码加密的和/或返回的私有回复消息“带有对应于手写笔的标签”,反之即为不满足预期条件。不满足预期条件可以如私有回复消息的标签不对、私有回复消息的内容无法解析、或者私有回复消息为报错消息,等等。
基于不同的私有消息发送方式,第一检测步骤可以包括第一种子检测步骤、第二种子检测步骤和第三种子检测步骤三种。
第一种子检测步骤可以包括:在确定所述吸附对象与所述终端设备之间未建立蓝牙连接的情况下,向所述吸附对象发送满足第一条件的私有消息,并监听所述吸附对象响应于满足第一条件的私有消息返回的私有回复消息。所述第一条件为所述私有消息为所述无线充电协议消息。
而由于私有消息满足第一条件,所以私有回复消息还可以反应吸附对象的吸附位置是否准确。则,若在发出所述私有消息后的第一预设时间内接收到所述私有回复消息、且所述私有消息和/或所述私有回复消息满足预期条件,则可以确定所述吸附对象为手写笔且手写笔的吸附位置准确。在发出所述私有消息后的第一预设时间内未接收到所述私有回复消息和/或收到的私有回复消息不满足预期条件,则可以确定所述吸附对象不是手写笔且吸附位置也不准确。
第二种子检测步骤可以包括:在确定所述吸附对象与所述终端设备之间已建立蓝牙连接的情况下,通过所述蓝牙连接向所述吸附对象发送私有消息,并监听所述吸附对象响应于私有消息返回的私有回复消息。而由于私有消息通过蓝牙发送,所以私有回复消息仅能反应吸附对象是否为手写笔,吸附对象的吸附位置是否准确还需要进一步检测判断。
第三种子检测步骤可以包括:向所述吸附对象发送满足第二条件的私有消息,并监听所述吸附对象响应于满足第二条件的私有消息返回的私有回复消息。第二条件包括私有消息还可以用于获取所述吸附对象的第一位置信息,私有回复消息包括所述吸附对象的第一位置信息。而后根据第一位置信息确定吸附对象与终端设备之间的相对位置关系,进而在相对位置关系满足预设条件的情况下,也可以至少初步或直接判断出吸附对象为手写笔。相对位置关系不满足预设条件的情况下,可以判断出吸附对象不是手写笔。则相对位置关系满足预设条件即为所述私有回复消息满足预期条件。
其中,所述预设条件可以包括:第一预设条件或第二预设条件。
第一预设条件为在参考坐标系中,所述吸附对象的第一位置坐标与所述终端设备的第二位置坐标的至少在一个坐标轴中的坐标值差值小于或等于预设差值。所述第一位置坐标是根据在第一预设时间内接收到的所述第一位置信息确定的。其中,预设差值可以为零。
其中,终端设备可以获取其自身陀螺仪传感器的陀螺仪数据,并将该陀螺仪数据组作为第二位置信息。而后基于确定的第二位置信息确定出终端设备100在如图3所示的坐标系OXYZ中的第二位置坐标(x2,y2,z2)。以及基于第一位置信息确定出吸附对象300在如图3所示的坐标系OXYZ中的第一位置坐标(x1,y1,z1)。而由于在吸附对象300为手写笔的情况下,第一位置坐标与第二位置坐标至少在坐标系OXYZ的一个坐标轴(如图3中的OZ轴)中的坐标值应是一致的。因此,在确定第一位置坐标和第二位置坐标的至少在一个坐标轴中的坐标值差值小于或等于预设差值,则可以确定相对位置关系满足第一预设条件。
第二预设条件为所述吸附对象300的实际空间位置与所述手写笔预测空间位置200’相同。所述实际空间位置是根据第一预设时间内接收到的所述第一位置信息确定的,所述手写笔预测空间位置200’是根据所述终端设备100的第二位置信息、所述第一区域101相对于所述终端设备100的第三位置信息确定的。第三位置信息可以包括第一区域101的尺寸、 第一区域101的中心等任意一个点在终端设备100上位置,等等。可以根据所述第一位置信息,确定所述吸附对象300的实际空间位置。实际空间位置可以为吸附对象300的中心等吸附对象上任意点的空间位置,还可以是能够表示吸附对象上每个点在空间中的位置的空间位置集合。
例如,如图3所示,终端设备100可以基于第二位置信息确定出终端设备100的实际空间位置,如,终端设备100的中心等点在坐标系OXYZ中的第二位置坐标(x2,y2,z2)。而后基于第一区域101的第三位置信息就可以预测出手写笔吸附在第一区域101的情况下,该被吸附的手写笔对应的手写笔预测空间位置200’(x0,y0,z0)。再基于第一位置信息确定出吸附对象300在如图3所示的坐标系OXYZ中的第一位置坐标(x1,y1,z1)(也即吸附对象300的实际空间位置)。若(x1,y1,z1)与(x0,y0,z0)相同,则确定相对位置关系满足第二预设条件。其中,(x1,y1,z1)与(x0,y0,z0)相同可以是指x1=x0±δ0,y1=y0±δ1,z1=z0±δ2。δ0、δ1、δ2为手写笔吸附固定在第一区域101时的允许误差。
在一种可能的实现方式中,由于第一位置信息能够指示吸附对象的实际空间位置,在第一位置信息能够达到对吸附对象的吸附位置的检测标准的情况下,基于第一位置信息还可以判断吸附对象的吸附位置是否准确,若此种情况下若确定相对位置关系满足预设条件,则不但可以确定吸附对象是否为手写笔、还可以确定该手写笔的吸附位置准确。
第二检测步骤可以包括:向所述吸附对象300发送连接诊断消息,并监听所述吸附对象300响应于所述连接诊断消息返回的诊断回复消息。所述连接诊断消息包括无线充电协议消息。所述无线充电协议包括Qi协议(无线充电联盟(Wireless Power Consortium,Qi)推出的“无线充电”标准)、PMA协议(Power Matters Alliance)、A4WP协议(Alliance for Wireless Power),等等。其中,连接诊断消息可以为ping消息(通信连接探测包)等消息。终端设备100可以基于监听到的吸附对象针对该连接诊断消息的响应结果,确定吸附对象的吸附位置是否准确,进而确定吸附对象与终端设备之间的通信连接和/或充电所需的连接是否已经正常连接。
其中,若在发出所述连接诊断消息后的第二预设时间内未接收到所述诊断回复消息,则可以确定所述吸附对象的吸附位置不准确。若在发出所述连接诊断消息后的第二预设时间内接收到所述诊断回复消息,则可以确定所述吸附对象的吸附位置不准确。第二预设时间可以为5s等,第二预设时间可以大于或等于吸附对象为手写笔的情况下其返回针对回复消息的间隔时长。
第三检测步骤可以包括:终端设备可以获取目标传感器发出的目标检测信号。进而可以基于所述目标检测信号确定所述吸附对象是否为手写笔和/或确定所述吸附对象的吸附位置是否不准确。
“检测”实现方式一:“检测”包括第一检测步骤和第二检测步骤。且所述第二检测步骤在所述第一检测步骤的第一检测结果为所述吸附对象为手写笔的情况下执行。
图4示出根据本申请一实施例的手写笔检测方法对应于“检测”实现方式一的流程图。如图4所示,通过“检测”实现方式一实现手写笔检测的方法包括步骤S101-步骤S108。
在步骤S101中,进行针对第一区域的吸附对象检测。吸附对象检测的方式可以参照上文利用第一区域磁场强是否处于预设强度范围的方式实现。
在步骤S102中,判断第一区域101是否吸附固定有吸附对象。在第一区域固定有吸附对象的情况下执行步骤S103。在第一区域101没有吸附固定吸附对象的情况下继续执行步骤S101。
在步骤S103中,执行第一检测步骤。其中,该第一检测步骤可以是上文所述的第一种子检测步骤、第二种子检测步骤和第三种检测步骤中的任意一种。
在步骤S104中,判断吸附对象是否为手写笔。
其中,在第一检测步骤为第一种子检测步骤的情况下,由于私有消息满足第一条件,所以私有回复消息还可以反应吸附对象的吸附位置是否准确。则,若在发出所述私有消息后的第一预设时间内接收到所述私有回复消息、且所述私有消息和/或所述私有回复消息满足预期条件,则可以确定所述吸附对象为手写笔且手写笔的吸附位置准确,则可以直接执行步骤S108。而若在发出所述私有消息后的第一预设时间内未接收到所述私有回复消息和/或收到的私有回复消息不满足预期条件,则可以确定所述吸附对象不是手写笔且吸附位置也不准确,可以直接执行步骤S105。
在第一检测步骤为第二种子检测步骤的情况下,若在发出所述私有消息后的第一预设时间内接收到所述私有回复消息、且所述私有消息和/或所述私有回复消息满足预期条件,则可以确定所述吸附对象为手写笔,并继续执行步骤S106。若在发出所述私有消息后的第一预设时间内未接收到所述私有回复消息和/或收到的私有回复消息不满足预期条件,则可以确定所述吸附对象不是手写笔,则继续执行步骤S105。
在第一检测步骤为第三种检测步骤的情况下,若在发出所述私有消息后的第一预设时间内接收到所述私有回复消息、且所述私有消息和/或根据私有回复消息确定的相对位置关系满足预设条件,则可以确定所述吸附对象为手写笔,并继续执行步骤S106。若在发出所述私有消息后的第一预设时间内未接收到所述私有回复消息和/或根据收到的私有回复消息确定的相对位置关系不满足预设条件,则可以确定所述吸附对象不是手写笔,则继续执行步骤S105。
在步骤S105中,发出与第一检测步骤对应的第一提示和/或第二提示。
其中,在第一检测步骤为第二种子检测条件或第三种子检测步骤的情况下,步骤S105可以发出第二提示。在在第一检测步骤为第一种子检测步骤的情况下,步骤S105可以发出第一提示和/或第二提示。
在步骤S106中,在仅确定出吸附对象为手写笔的情况下,还需要进一步执行第二检测步骤,以进一步执行步骤S107判断手写笔的吸附位置是否准确。
在步骤S107中,判断手写笔的吸附位置是否准确。若在发出所述连接诊断消息后的第二预设时间内未接收到所述诊断回复消息,则可以确定所述吸附对象的吸附位置不准确,可以继续执行步骤S105。若在发出所述连接诊断消息后的第二预设时间内接收到所述诊断回复消息,则可以确定所述吸附对象的吸附位置不准确,可以继续执行步骤S108。
在步骤S108中,发出第三提示。
其中,第三提示还用于提醒用户所述手写笔处于充电状态和/或待使用状态。
在一种可能的实现方式中,发出第三提示,可以包括以下至少一种操作:在所述终端 设备的显示屏中显示所述第三提示。以对应于所述第三提示的方式进行震动。以对应于第三提示的方式响铃。以对应于第三提示的方式发光,如闪灯。发出对应于第三提示的语音。
其中,图5示出根据本申请一实施例的第三提示的示意图。如图5所示,终端设备在确定吸附对象为手写笔且手写笔吸附位置准确后,在终端设备100处于解锁状态或非解锁状态下,可以在终端设备100的显示屏102中显示通知栏L,并在通知栏L中显示第三提示T3。可以在T3中通过如“手写笔已连接且正在充电”等文字来提醒用户手写笔已经正常连接可以使用并处于充电状态。或者,在终端设备100处于解锁状态下,可以直接在当前为用户展示的界面中通过弹窗等形式展示第三提示。
其中,可以根据用户设置或者终端设备的默认设置发出对应于吸附准确提示的震动、响铃、发光(如利用闪光灯通过闪光实现)。对应于吸附准确提示的语音可以为如“手写笔吸附已连接且正在充电”等提示。
在一种可能的实现方式中,第一提示可以包括以下至少一种操作:在所述终端设备的显示屏中显示所述第一提示。以对应于所述第一提示的方式进行震动。以对应于所述第一提示的方式响铃。以对应于所述第一提示的方式闪光(如利用闪光灯进行闪光)。发出对应于所述第一提示的语音。
在一种可能的实现方式中,第二提示可以包括在所述终端设备的显示屏中显示所述第二提示,和/或控制位于所述第一区域的指示灯发光。如可以在第一区域出安装条状指示灯,通过控制该条状指示灯持续发光或闪烁,以使得用户可以基于发光位置确定第一区域的位置。
其中,图6示出根据本申请一实施例的第二提示的示意图。如图6所示,终端设备在确定需要发出第一提示和第二提示后,在终端设备100处于解锁状态或非解锁状态下,可以在终端设备100的显示屏102中已弹窗等形式显示第二提示T2。可以在T2中通过如“请按图示位置方式手写笔”等文字以及T2-1中的图片或动图(图中未示出动图)来提醒用户。
其中,发出第一提示的上述操作的实现方式与第三提示的实现方式类似,可以参照上文进行设置,此处不予赘述。
可以理解的是,第一提示、第二提示和第三提示的实现方式并不仅限于上述给出的示例,还可以包括其他方式,本领域技术人员可以根据实际需要对吸附准确提示、位置调整提示的实现方式进行设置,本申请对此不作限定。
“检测”实现方式二:“检测”包括第一检测步骤和第二检测步骤。且第一检测步骤和第二检测步骤的执行顺序无限定。二者可以同时执行,也可以先后执行。
而无论第一检测步骤和第二检测步骤的执行顺序是怎样的,以及第一检测步骤具体使用的哪一种子检测步骤(也即第一种子检测步骤、第二种子检测步骤和第三种子检测步骤中的任意一种),只要在确定出吸附对象的吸附位置不准确和/或吸附对象不是手写笔的情况下,即可以发出第一提示和/或第二提示。在确定吸附对象是手写笔且手写笔的吸附位置准确的情况下,即可以发出第三提示。
“检测”实现方式三:“检测”仅包括第三检测步骤。则只要在确定出吸附对象的吸附位置不准确和/或吸附对象不是手写笔的情况下,即可以发出第一提示和/或第二提示。在确 定吸附对象是手写笔且手写笔的吸附位置准确的情况下,即可以发出第三提示。这样,可以仅借助独立设置的目标传感器就可以实现针对吸附对象的检测。
“检测”实现方式四:“检测”包括第一检测步骤、第二检测步骤、第三检测步骤,所述第二检测步骤在所述第一检测步骤的第一检测结果为所述吸附对象为手写笔的情况下执行,第三检测步骤在第二检测步骤确定出吸附位置准确之后执行。
而由于“检测”实现方式四与“检测”实现方式一的部分步骤相同,对于相同部分可参见上文,此处不予赘述,而“检测”实现方式四与“检测”实现方式一的区别在于:
在步骤S107之后,还需进行执行第三检测步骤,在通过第三检测步骤确定吸附位置准确的情况下,继续执行步骤S108。在通过第三检测步骤确定吸附位置不准确的情况下,继续执行步骤S105。
“检测”实现方式五:“检测”包括第一检测步骤、第二检测步骤、第三检测步骤,所述第三检测步骤在所述第一检测步骤的第一检测结果为所述吸附对象为手写笔的情况下执行,第二检测步骤在第三检测步骤确定出吸附位置准确之后执行。而由于“检测”实现方式五与“检测”实现方式一的部分步骤相同,对于相同部分可参见上文,此处不予赘述,而“检测”实现方式五与“检测”实现方式一的区别在于:
在步骤S104之后,执行第三检测步骤,在通过第三检测步骤确定吸附位置准确的情况下,继续执行步骤S106。在通过第三检测步骤确定吸附位置不准确的情况下,继续执行步骤S105。
“检测”实现方式六:“检测”包括第一检测步骤、第二检测步骤、第三检测步骤,所述第三检测步骤在所述第一检测步骤的第一检测结果为所述吸附对象为手写笔的情况下执行,第二检测步骤在第三检测步骤确定出吸附对象为手写笔之后执行。而由于“检测”实现方式六与“检测”实现方式一的部分步骤相同,对于相同部分可参见上文,此处不予赘述,而“检测”实现方式六与“检测”实现方式一的区别在于:
在步骤S104之后,执行第三检测步骤,在通过第三检测步骤确定吸附对象为手写笔的情况下,继续执行步骤S106。在通过第三检测步骤确定吸附对象不是手写笔的情况下,继续执行步骤S105。
其中,“检测”实现方式四、“检测”实现方式五、“检测”实现方式六,通过第三检测步骤对吸附位置是否准确、或吸附对象是否为手写笔进行了二次检测,进一步提高了手写笔检测的准确性。
可以理解的是,本领域技术人员可以基于上述第一检测步骤、第二检测步骤和第二检测步骤检测后所能得到的结果,参照上文给出的“检测”实现方式一~“检测”实现方式六的示例性示例,对手写笔检测方法中“检测”所包含的检测步骤、检测步骤之间的执行顺序和条件、目标检测结果等进行设置,本申请对此不作限定。
在本申请中,在发出第三提示之后,终端设备可以继续对手写笔与终端设备之间的连 接状态进行监测,并根据不同的连接状态发出对应的提示。例如,在未检测到针对手写笔的操作的时长超过等待时长的情况下,可以发出手写笔即将断开提示,以提醒用户已经长时间未使用手写笔即将断开与手写笔的通信连接。在检测到手写笔的电量过低即将断电的情况下,可以发出低电量提示,以提醒用户手写笔即将因电量过低而断电,以便于用户及时为手写笔充电。等等。
图7示意了一种终端设备100的结构示意图。
终端设备100可以包括手机、可折叠电子设备、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、蜂窝电话、个人数字助理(personal digital assistant,PDA)、人工智能(artificial intelligence,AI)设备、车载设备、智能家居设备、或智慧城市设备中的至少一种。本申请实施例对该终端设备100的具体类型不作特殊限制。
终端设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接头130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对终端设备100的具体限定。在本申请另一些实施例中,终端设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
处理器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器可以为高速缓冲存储器。该存储器可以保存处理器110用过或使用频率较高的指令或数据。如果处理器110需要使用该指令或数据,可从该存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal  asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。处理器110可以通过以上至少一种接口连接触摸传感器、音频模块、无线通信模块、显示器、摄像头等模块。
处理器110用于执行上述手写笔检测方法。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端设备100的结构限定。在本申请另一些实施例中,终端设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
USB接头130是一种符合USB标准规范的接口,可以用于连接终端设备100和外围设备,具体可以是Mini USB接头,Micro USB接头,USB Type C接头等。USB接头130可以用于连接充电器,实现充电器为该终端设备100充电,也可以用于连接其他终端设备,实现终端设备100与其他终端设备之间传输数据。也可以用于连接耳机,通过耳机输出终端设备中存储的音频。该接头还可以用于连接其他终端设备,例如VR设备等。在一些实施例中,通用串行总线的标准规范可以为USB1.x、USB2.0、USB3.x和USB4。
充电管理模块140用于接收充电器的充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过终端设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为终端设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
终端设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。终端设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在终端设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在终端设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),蓝牙低功耗(bluetooth low energy,BLE),超宽带(ultra wide band,UWB),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,终端设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得终端设备100可以通过无线通信技术与网络和其他终端设备通信。该无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。该GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
终端设备100可以通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,终端设备100可以包括1个或多个显示屏194。
终端设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音,播放对应于吸附准确提示的语音、响铃,播放对应于位置调整提示的语音、响铃,等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端设备100可以通过扬声器170A收听音乐,或输出免提通话的音频信号。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。终端设备100可以设置至少一个麦克风170C。在另一些实施例中,终端设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,终端设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动终端设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
陀螺仪传感器180B可以用于确定终端设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定终端设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测终端设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,控制镜头反向运动抵消终端设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。陀螺仪传感器180B可以为终端设备提供上述第二位置信息。
磁传感器180D包括霍尔传感器。终端设备100可以利用磁传感器180D检测翻盖皮套的开合。当终端设备为可折叠终端设备,磁传感器180D可以用于检测终端设备的折叠或展开,或折叠角度。在一些实施例中,当终端设备100是翻盖机时,终端设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。磁传感器180D还设置于终端设备100内部与第一区域101对应的位置,用于对第一区域处的磁场强度进行检测。
加速度传感器180E可检测终端设备100在各个方向上(一般为三轴)加速度的大小。当终端设备100静止时可检测出重力的大小及方向。还可以用于识别终端设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。终端设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,终端设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。终端设备100通过发光二极管向外发射红外光。终端设备100使用光电二极管检测来自附近物体的红外反射光。当检测到的反射光的强度大于阈值时,可以确定终端设备100附近有物体。当检测到的反射光的强度小于阈值时,终端设备100可以确定终端设备100附近没有物体。终端设备100可以利用接近光传感器180G 检测用户手持终端设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L可以用于感知环境光亮度。终端设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测终端设备100是否被遮挡,例如终端设备在口袋里。当检测到终端设备被遮挡或在口袋里,可以使部分功能(例如触控功能)处于禁用状态,以防误操作。
指纹传感器180H用于采集指纹。终端设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,终端设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当通过温度传感器180J检测的温度超过阈值,终端设备100执行降低处理器的性能,以便降低终端设备的功耗以实施热保护。在另一些实施例中,当通过温度传感器180J检测的温度低于另一阈值时,终端设备100对电池142加热。在其他一些实施例中,当温度低于又一阈值时,终端设备100可以对电池142的输出电压升压。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于终端设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于该骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于该骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190可以包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。终端设备100可以接收按键输入,产生与终端设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。马达191可以进行对应于吸附准确提示的震动,进行对应于位置调整提示的震动,等等。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
本申请的实施例提供了一种手写笔检测装置,包括:处理器以及用于存储处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令时实现上述方法。
本申请的实施例提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。
本申请的实施例提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在终端设备的处理器中运行时,所述终端设备中的处理器执行上述方法。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(Random Access Memory,RAM)、只读存储器(Read Only Memory,ROM)、可擦式可编程只读存储器(Electrically Programmable Read-Only-Memory,EPROM或闪存)、静态随机存取存储器(Static Random-Access Memory,SRAM)、便携式压缩盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能盘(Digital Video Disc,DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。
这里所描述的计算机可读程序指令或代码可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本申请操作的计算机程序指令可以是汇编指令、指令集架构(Instruction Set Architecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(Local Area Network,LAN)或广域网(Wide Area Network,WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或可编程逻辑阵列(Programmable Logic Array,PLA),该电子电路可以执行计算机可读程序指令,从而实现本申请的各个方面。
这里参照根据本申请实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本申请的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理 装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本申请的多个实施例的装置、系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。
也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行相应的功能或动作的硬件(例如电路或ASIC(Application Specific Integrated Circuit,专用集成电路))来实现,或者可以用硬件和软件的组合,如固件等来实现。
尽管在此结合各实施例对本发明进行了描述,然而,在实施所要求保护的本发明过程中,本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其它变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其它单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。
以上已经描述了本申请的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。

Claims (12)

  1. 一种手写笔检测方法,其特征在于,应用于终端设备,所述终端设备上设置有用于吸附手写笔的第一区域,所述手写笔的内部设置有用于将所述手写笔吸附固定在所述第一区域的磁力吸附部件,所述方法包括:
    在检测到所述第一区域吸附固定有吸附对象的情况下,对所述吸附对象进行检测,得到检测结果,所述检测包括检测所述吸附对象的吸附位置是否准确;
    在所述检测结果为目标检测结果的情况下,发出第一提示和/或第二提示,所述目标检测结果包括所述吸附对象的吸附位置不准确;
    其中,所述第一提示用于提醒用户吸附位置不准确,所述第二提示用于提醒用户手写笔的正确吸附位置。
  2. 根据权利要求1所述的方法,其特征在于,所述检测还包括检测所述吸附对象是否为手写笔,所述目标检测结果还包括所述吸附对象为手写笔。
  3. 根据权利要求2所述的方法,其特征在于,所述检测包括第一检测步骤和第二检测步骤,所述第一检测步骤用于检测所述吸附对象是否为手写笔,所述第二检测步骤用于检测所述吸附对象的吸附位置是否准确。
  4. 根据权利要求3所述的方法,其特征在于,所述第二检测步骤在所述第一检测步骤的第一检测结果为所述吸附对象为手写笔的情况下执行。
  5. 根据权利要求3或4所述的方法,其特征在于,所述第一检测步骤,包括:
    向所述吸附对象发送私有消息,并监听所述吸附对象响应于所述私有消息返回的私有回复消息;
    其中,所述吸附对象为手写笔,包括:在发出所述私有消息后的第一预设时间内接收到所述私有回复消息。
  6. 根据权利要求3-5任意一项所述的方法,其特征在于,所述第二检测步骤,包括:
    向所述吸附对象发送连接诊断消息,并监听所述吸附对象响应于所述连接诊断消息返回的诊断回复消息,所述连接诊断消息包括无线充电协议消息;
    其中,所述吸附对象的吸附位置不准确,包括:在发出所述连接诊断消息后的第二预设时间内未接收到所述诊断回复消息。
  7. 根据权利要求5所述的方法,其特征在于,所述私有消息还用于获取所述吸附对象的第一位置信息,所述私有回复消息包括所述吸附对象的第一位置信息;
    其中,向所述吸附对象发送连接诊断消息,包括:
    根据所述第一位置信息,确定出所述吸附对象与所述终端设备之间的相对位置关系;
    在所述相对位置关系满足预设条件的情况下,向所述吸附对象发送连接诊断消息。
  8. 根据权利要求7所述的方法,其特征在于,所述预设条件包括:
    在参考坐标系中,所述吸附对象的第一位置坐标与所述终端设备的第二位置坐标的至少在一个坐标轴中的坐标值差值小于或等于预设差值,所述第一位置坐标是根据在第一预设时间内接收到的所述第一位置信息确定的;或者
    所述吸附对象的实际空间位置与所述手写笔预测空间位置相同,所述实际空间位置是根据第一预设时间内接收到的所述第一位置信息确定的,所述手写笔预测空间位置是根据所述终端设备的第二位置信息、所述第一区域相对于所述终端设备的第三位置信息确定的。
  9. 根据权利要求1-8任意一项所述的方法,其特征在于,发出第一提示包括以下至少一种操作:
    在所述终端设备的显示屏中显示所述第一提示;
    以对应于所述第一提示的方式进行震动;
    以对应于所述第一提示的方式响铃;
    以对应于所述第一提示的方式闪光;
    发出对应于所述第一提示的语音;
    发出第二提示包括:在所述终端设备的显示屏中显示所述第二提示,和/或控制位于所述第一区域的指示灯发光。
  10. 一种终端设备,其特征在于,所述终端设备上设置有用于放置手写笔的第一区域,所述手写笔通过内部设置有用于将所述手写笔吸附固定在所述第一区域的磁力吸附部件,所述终端设备包括:
    对象检测器,设置在所述终端设备内部与所述第一区域对应的位置,用于检测所述第一区域是否吸附规定有吸附对象;
    处理器,配置为实现权利要求1-9任意一项所述的方法。
  11. 一种非易失性计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1-9中任意一项所述的方法。
  12. 一种计算机程序产品,其特征在于,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在终端设备中运行时,所述终端设备中的处理器执行权利要求1-9中任意一项所述的方法。
PCT/CN2022/087684 2021-06-29 2022-04-19 手写笔检测方法、装置及终端设备 WO2023273530A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP22831361.5A EP4350522A1 (en) 2021-06-29 2022-04-19 Stylus detection method, apparatus, and terminal device
US18/397,255 US20240127686A1 (en) 2021-06-29 2023-12-27 Stylus detection method, apparatus, and terminal device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110726723.X 2021-06-29
CN202110726723.XA CN115543700A (zh) 2021-06-29 2021-06-29 手写笔检测方法、装置及终端设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/397,255 Continuation US20240127686A1 (en) 2021-06-29 2023-12-27 Stylus detection method, apparatus, and terminal device

Publications (1)

Publication Number Publication Date
WO2023273530A1 true WO2023273530A1 (zh) 2023-01-05

Family

ID=84690217

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/087684 WO2023273530A1 (zh) 2021-06-29 2022-04-19 手写笔检测方法、装置及终端设备

Country Status (4)

Country Link
US (1) US20240127686A1 (zh)
EP (1) EP4350522A1 (zh)
CN (1) CN115543700A (zh)
WO (1) WO2023273530A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116247837B (zh) * 2023-05-08 2023-10-20 荣耀终端有限公司 无线充电系统、方法和相关设备
CN117349125A (zh) * 2023-12-04 2024-01-05 荣耀终端有限公司 设备状态获取方法、电子设备及计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201345092Y (zh) * 2009-02-09 2009-11-11 深圳华为通信技术有限公司 一种手写笔及移动终端
US20100081479A1 (en) * 2008-09-30 2010-04-01 Samsung Electronics Co., Ltd. Portable communication device having a touch-screen locking unit
CN104076876A (zh) * 2013-03-28 2014-10-01 三星电子株式会社 具有触摸笔的电子设备
CN109542254A (zh) * 2018-10-31 2019-03-29 广州三星通信技术研究有限公司 手写笔以及包含该手写笔的电子装置
CN110941865A (zh) * 2019-12-11 2020-03-31 上海传英信息技术有限公司 一种移动终端手写笔的提醒方法、装置、移动终端及计算机可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100081479A1 (en) * 2008-09-30 2010-04-01 Samsung Electronics Co., Ltd. Portable communication device having a touch-screen locking unit
CN201345092Y (zh) * 2009-02-09 2009-11-11 深圳华为通信技术有限公司 一种手写笔及移动终端
CN104076876A (zh) * 2013-03-28 2014-10-01 三星电子株式会社 具有触摸笔的电子设备
CN109542254A (zh) * 2018-10-31 2019-03-29 广州三星通信技术研究有限公司 手写笔以及包含该手写笔的电子装置
CN110941865A (zh) * 2019-12-11 2020-03-31 上海传英信息技术有限公司 一种移动终端手写笔的提醒方法、装置、移动终端及计算机可读存储介质

Also Published As

Publication number Publication date
CN115543700A (zh) 2022-12-30
EP4350522A1 (en) 2024-04-10
US20240127686A1 (en) 2024-04-18

Similar Documents

Publication Publication Date Title
WO2020041952A1 (zh) 一种基于快递消息控制快递柜的方法及电子设备
WO2021036776A1 (zh) 一种无线充电方法及电子设备
CN111369988A (zh) 一种语音唤醒方法及电子设备
EP4024907A1 (en) Data processing method, bluetooth module, electronic device, and readable storage medium
WO2023273530A1 (zh) 手写笔检测方法、装置及终端设备
WO2021023046A1 (zh) 一种电子设备控制方法及一种电子设备
WO2020216098A1 (zh) 一种跨电子设备转接服务的方法、设备以及系统
CN110798568A (zh) 具有折叠屏的电子设备的显示控制方法及电子设备
EP3809248A1 (en) Application icon display method and terminal
EP4171135A1 (en) Device control method, and related apparatus
WO2021180085A1 (zh) 拾音方法、装置和电子设备
EP4250075A1 (en) Content sharing method, electronic device, and storage medium
CN116233300A (zh) 控制通信服务状态的方法、终端设备和可读存储介质
CN113645571A (zh) 数据传输方法及电子设备
CN112686981A (zh) 画面渲染方法、装置、电子设备及存储介质
WO2021000817A1 (zh) 环境音处理方法及相关装置
WO2023273476A1 (zh) 一种检测设备方法和电子设备
WO2022257563A1 (zh) 一种音量调节的方法,电子设备和系统
JP7204902B2 (ja) ファイル転送方法および電子デバイス
WO2023174161A1 (zh) 一种消息传输的方法及相应终端
EP4336356A1 (en) Screen projection method and related apparatus
WO2022068670A1 (zh) 设备间触碰建立无线连接的方法、电子设备及芯片
WO2020062308A1 (zh) 位置信息处理方法及相关装置
CN116346982B (zh) 处理音频的方法、电子设备及可读存储介质
CN116320880B (zh) 音频处理方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22831361

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022831361

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2022831361

Country of ref document: EP

Effective date: 20231219

NENP Non-entry into the national phase

Ref country code: DE