Handwriting pen connection method and device, electronic equipment and storage medium

By integrating a passive RFID tag into the stylus, pairing and connection can be automatically triggered using RFID signals, solving the problem of cumbersome Bluetooth pairing, achieving an efficient and low-power connection process, and improving the user experience.

CN121842640APending Publication Date: 2026-04-10SHENZHEN XINWEI INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

The existing Bluetooth pairing method for styluses is cumbersome, inefficient, and results in a poor user experience.

Method used

The stylus uses an integrated passive RFID tag. It activates the tag by receiving the RFID signal emitted by the terminal device, modulates the stylus's identity information and sends a response request. After the terminal device decodes the signal, it confirms the pairing and connection and transmits usage data via near-field communication or Bluetooth.

Benefits of technology

It simplifies the connection process between the stylus and the terminal device, improves connection efficiency, eliminates the need for cumbersome user operations, reduces power consumption, and extends the usage time of the stylus.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121842640A_ABST
    Figure CN121842640A_ABST
Patent Text Reader

Abstract

The invention provides a handwriting pen connection method and device, electronic equipment and a storage medium, and relates to the technical field of handwriting pens. The method is applied to a handwriting pen, and the handwriting pen is integrated with a passive radio frequency tag. The method comprises the following steps: activating a passive radio frequency tag under the condition that a radio frequency identification signal transmitted by terminal equipment is received; the radio frequency identification signal is used for triggering pairing connection with the handwriting pen; modulating the identity information of the handwriting pen to a radio frequency signal through a passive radio frequency tag to obtain a response request; the response request is sent to the terminal equipment, so that the terminal equipment is in paired connection with the handwriting pen according to the response request; and under the condition that the handwriting pen is in paired connection with the terminal equipment, sending the use data of the handwriting pen to the terminal equipment through a preset transmission mode. The terminal device and the handwriting pen are automatically triggered to be paired and connected through the passive tag, the connection process between the handwriting pen and the terminal device can be reduced, and the connection efficiency between the handwriting pen and the terminal device is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of stylus technology, and in particular to a stylus connection method, device, electronic device, and storage medium. Background Technology

[0002] A stylus pen, also known as a smart stylus, is a device used by users to input information into electronic devices. Due to its high precision, low latency, and ability to adjust line thickness based on pressure, styluses are commonly used for writing, drawing, and other tasks on electronic devices. Typically, styluses communicate with electronic devices via Bluetooth. Before using a stylus pen as an input device, it needs to be paired with the electronic device via Bluetooth to establish a connection.

[0003] However, the Bluetooth pairing method used to connect styluses and electronic devices requires users to perform a rather cumbersome pairing process, and the connection efficiency is not high, resulting in a poor user experience. Summary of the Invention

[0004] This invention provides a stylus connection method, device, electronic device, and storage medium, aiming to solve the problems of cumbersome operation and low connection efficiency of existing Bluetooth pairing connection methods.

[0005] A first aspect of the present invention provides a stylus connection method, applied to a stylus, wherein the stylus integrates a passive radio frequency tag; the method includes: Upon receiving an RFID signal transmitted by a terminal device, the passive RFID tag is activated; the RFID signal is used to trigger pairing and connection with the stylus. The passive RFID tag modulates the stylus's identity information onto a radio frequency signal to obtain a response request. The response request is sent to the terminal device so that the terminal device can pair and connect with the stylus according to the response request; When the stylus is paired and connected with the terminal device, the stylus usage data is sent to the terminal device through a preset transmission method.

[0006] Optionally, the passive RFID tag includes an antenna, a chip, and an energy storage unit. The energy storage unit is connected to the chip and the antenna respectively. The antenna is used to transmit and receive radio frequency signals, and the chip is used to store the identity information of the stylus. Activating the passive RFID tag upon receiving an RFID signal transmitted by the terminal device includes: Upon receiving a radio frequency identification (RFID) signal transmitted by a terminal device, the antenna converts the electromagnetic waves of the RFID signal into electrical energy using the principle of electromagnetic induction. The energy is stored in the energy storage unit to power the chip and the antenna, thereby activating the passive RFID tag.

[0007] Optionally, the step of modulating the stylus's identity information onto a radio frequency signal via the RFID tag to obtain a response request includes: Obtain a preset modulation rule; the modulation rule is stored in the passive RFID tag; The identity information is modulated onto the radio frequency signal according to the modulation rules through the antenna to obtain the response request.

[0008] Optionally, the stylus further includes a first communication module, wherein sending the response request to the terminal device, so that the terminal device pairs and connects with the stylus according to the response request, includes: The response request is sent to the terminal device, so that the terminal device decodes the response request according to a preset demodulation rule to obtain identity information; the demodulation rule is associated with the modulation rule; based on the identity information, it is determined whether the stylus is a pairable device; if the stylus is a pairable device, a pairing confirmation signal is sent to the stylus, the pairing confirmation signal being used to indicate that the terminal device has confirmed the recognition of the stylus; Upon receiving the pairing confirmation signal, the first communication module is activated to complete the pairing connection with the terminal device.

[0009] Optionally, the first communication module includes a Bluetooth communication unit and a near-field communication unit. When the stylus is paired and connected to the terminal device, sending the stylus usage data to the terminal device via a preset transmission method includes: Determine the distance between the stylus and the terminal device; Based on the preset correspondence between distance range and transmission method, a target transmission method matching the distance is determined; the transmission method includes transmission via the near-field communication unit or transmission via the Bluetooth communication unit. According to the target transmission method, the usage data is sent to the terminal device.

[0010] Optionally, determining the target transmission method matching the distance based on the preset correspondence between distance range and transmission method includes: When the distance is within a first distance range, the target transmission method is determined to be transmission via the near-field communication unit; the first distance range corresponds to the near-field communication connection. When the distance is within the second distance range, the target transmission method is determined to be transmission via the Bluetooth communication unit; the upper limit of the second distance range is greater than the upper limit of the first distance range.

[0011] Optionally, before determining the distance between the stylus and the terminal device, the method further includes: Under the condition of meeting the preset triggering conditions, the near-field communication unit in the first communication module is activated, and a near-field communication triggering command is sent to the terminal device, so that the terminal device activates the near-field communication unit in the preset second communication module. The triggering conditions include at least one of the following: the physical button of the stylus is triggered, the stylus detects a pressure-sensitive signal, and the acceleration of the stylus is greater than a preset acceleration threshold. After determining that the target transmission method is via the Bluetooth communication unit when the distance is within the second distance range, the method further includes: The near-field communication unit in the first communication module is turned off.

[0012] A second aspect of the present invention provides a stylus connection method applied to a terminal device, the method comprising: Transmit an RFID signal to trigger a pairing connection with the stylus, so that the stylus can activate the passive RFID tag integrated in the stylus; Receive a response request returned by the stylus; the response request is obtained by the stylus modulating the stylus's identity information onto a radio frequency signal through the passive RFID tag; The stylus is paired and connected according to the response request; When the stylus is paired and connected with the terminal device, the stylus usage data is received from the stylus via a preset transmission method.

[0013] Optionally, the step of pairing and connecting with the stylus according to the response request includes: Upon receiving the response request, a preset demodulation rule is obtained; the demodulation rule is a rule associated with the modulation rule. The response request is decoded according to the demodulation rules to obtain the identity information; Based on the identity information, determine whether the stylus is a pairable device; If the stylus is a pairable device, a pairing confirmation signal is sent to the stylus so that the stylus, upon receiving the pairing confirmation signal, activates the first communication module built into the stylus. The pairing confirmation signal is used to indicate that the terminal device has confirmed and recognized the stylus.

[0014] A third aspect of the present invention provides a smart pen tail assembly, wherein the smart pen tail assembly integrates a passive radio frequency tag, and the smart pen tail assembly is fixed to the body of a stylus by a fastener. The intelligent pen tail component is used to activate the passive RFID tag upon receiving an RFID signal emitted by the terminal device; the RFID signal is used to trigger a pairing connection with the stylus; the stylus's identity information is modulated onto the RFID signal via the passive RFID tag to obtain a response request; the response request is sent to the terminal device so that the terminal device pairs with the stylus according to the response request; when the stylus is paired with the terminal device, the stylus's usage data is sent to the terminal device through a preset transmission method.

[0015] A fourth aspect of the present invention provides an electronic device comprising: A processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the program, implements a stylus connection method as described in any of the foregoing examples.

[0016] A fourth aspect of the present invention provides a readable storage medium including computer instructions that, when executed by a processor of an electronic device, enable the electronic device to perform any of the aforementioned stylus connection methods.

[0017] In this invention, the passive tag automatically triggers the pairing and connection between the terminal device and the stylus, eliminating the need for the user to perform pairing operations such as searching for the device, selecting the device, and waiting for the connection. This reduces the connection process between the stylus and the terminal device and improves the connection efficiency between them.

[0018] The above-mentioned stylus connection methods, devices, electronic devices, and readable storage media have the same or similar beneficial effects, and will not be described again here to avoid repetition. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A flowchart illustrating the steps of a stylus connection method according to an embodiment of the present invention is shown.

[0021] Figure 2 A flowchart illustrating the specific steps of a stylus connection method according to an embodiment of the present invention is shown.

[0022] Figure 3 A flowchart illustrating the steps of another stylus connection method in an embodiment of the present invention is shown.

[0023] Figure 4 A schematic diagram of a smart pen tail component according to an embodiment of the present invention is shown.

[0024] Figure 5 A schematic diagram of a stylus connection device according to an embodiment of the present invention is shown.

[0025] Figure 6 A schematic diagram of another stylus connection device in an embodiment of the present invention is shown.

[0026] Figure 7 This is a block diagram of an electronic device provided in an embodiment of this application.

[0027] Figure 8 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0029] This invention provides a method for connecting a stylus, referring to... Figure 1 This stylus connection method is applied to a stylus that integrates a passive RFID tag, and the method may include the following steps.

[0030] Step 101: Upon receiving the radio frequency identification signal transmitted by the terminal device, activate the passive radio frequency tag.

[0031] In this embodiment of the application, the radio frequency identification (RFID) signal is used to trigger pairing and connection with the stylus.

[0032] In some embodiments, the passive radio frequency tag is an RFID tag. The RFID tag does not include a battery and relies on radio frequency signals emitted by the receiving terminal device to obtain power to work. In response to receiving the radio frequency identification signal, the RFID tag is activated.

[0033] For example, passive RFID tags are high-frequency (HF) tags. The operating frequency of passive RFID tags is 13.56 MHz, and the identification distance is 1-10 cm.

[0034] For example, passive RFID tags are anti-metal tags. Anti-metal tags are wrapped with materials such as ceramics and wave-absorbing materials, which can solve the problem of the metal pen body shielding the radio frequency signal and ensure that it can still work normally in a metal-cased stylus.

[0035] In the embodiments of this application, the stylus can be a touch device used for handwriting input, drawing, and operation on an electronic device.

[0036] Optionally, the stylus can be resistive, where pressure deforms a resistive film on the screen, changing the resistance value to determine the touch position, thus enabling handwriting input. Alternatively, the stylus can be capacitive, utilizing the capacitance effect of the human body; when the stylus touches the screen, it changes the electric field distribution on the screen surface, allowing the screen to recognize the touch position. This application does not limit the specific form of the stylus in its embodiments.

[0037] In the embodiments of this application, the terminal device can be an electronic device with communication functions, including mobile phones, cameras, camcorders, and tablet computers, etc.

[0038] Step 102: Modulate the stylus's identity information onto the radio frequency signal using a passive RFID tag to obtain a response request.

[0039] In some embodiments, the passive RFID tag includes an antenna for transmitting and receiving radio frequency signals. The antenna modulates the identity information onto the radio frequency signal according to a modulation rule to obtain a response request. The modulation rule is stored in the passive RFID tag.

[0040] In some embodiments, the stylus's identity information includes its device identifier (ID). This ID is modulated onto a radio frequency signal via an antenna according to a preset modulation rule to receive a response request. The preset modulation rule may include Amplitude Shift Keying (ASK), Frequency Shift Keying (FSK), and Phase Shift Keying (PSK).

[0041] In some embodiments, the stylus's identification information may include a stylus identification code, which is a unique code used to distinguish different stylus devices. For example, the stylus identification code consists of letters, numbers, etc., and is used for pairing and connecting the stylus with a tablet computer. The tablet computer uses the identification code to determine the specific stylus that needs to be connected, thereby enabling correct identification and function invocation of the stylus, and ensuring that the input from the stylus is accurately processed and displayed on the corresponding device.

[0042] Step 103: Send a response request to the terminal device so that the terminal device can pair and connect with the stylus according to the response request.

[0043] In this embodiment of the application, since the response request includes the stylus's identity information, the terminal device can verify whether the stylus is a pairable device based on the stylus's identity information.

[0044] In some embodiments, the pairable device may be a stylus of the same brand as the terminal device, or it may be a stylus model that the terminal device supports connection to. The pairable devices of the terminal device are preset and pre-stored in the terminal device.

[0045] In some embodiments, a response request is sent to a terminal device, which then decodes the response request according to a preset demodulation rule to obtain identity information; based on the identity information, it is determined whether the stylus is a pairable device; if the stylus is a pairable device, a pairing confirmation signal is sent to the stylus, which indicates that the terminal device has confirmed the recognition of the stylus; upon receiving the pairing confirmation signal, the first communication module is activated to complete the pairing connection with the terminal device.

[0046] Step 104: When the stylus is paired and connected with the terminal device, send the stylus usage data to the terminal device through a preset transmission method.

[0047] In the embodiments of this application, the preset transmission methods include sending via a near-field communication unit or sending via a Bluetooth communication unit.

[0048] In this embodiment of the application, the data used may include writing trajectory data, usage time data, device connection data, etc.

[0049] In some embodiments, the stylus also includes a data storage unit for storing usage data.

[0050] In some embodiments, the writing trajectory data includes coordinate information, pressure data, and tilt angle data. The coordinate information records the coordinate position of each point on the stylus during writing or drawing, allowing for accurate reconstruction of the writing or drawing trajectory. The pressure data records the magnitude of pressure applied during writing.

[0051] In some embodiments, the time data used includes start time and end time, and usage frequency.

[0052] In some embodiments, device connection data includes connection status, connection time, and pairing information.

[0053] In some embodiments, the stylus usage data may also include stylus battery information, function usage data, etc.

[0054] In some embodiments, the distance between the stylus and the terminal device is determined; a target transmission method matching the distance is determined according to a preset correspondence between distance range and transmission method; the transmission method includes transmission via a near-field communication unit or transmission via a Bluetooth communication unit; and the usage data is transmitted to the terminal device according to the target transmission method.

[0055] In this invention, the passive tag automatically triggers the pairing and connection between the terminal device and the stylus, eliminating the need for the user to perform pairing operations such as searching for the device, selecting the device, and waiting for the connection. This reduces the connection process between the stylus and the terminal device and improves the connection efficiency between them.

[0056] Figure 2 This is a flowchart illustrating the specific steps of a stylus connection method provided in an embodiment of this application. (Refer to...) Figure 2 This stylus connection method is applied to a stylus and may include the following steps.

[0057] Step 201: Upon receiving the radio frequency identification (RFID) signal transmitted by the terminal device, the electromagnetic waves of the RFID signal are converted into electrical energy using the principle of electromagnetic induction via an antenna.

[0058] In this embodiment, the electromagnetic waves of the radio frequency identification signal are converted into electrical energy using the principle of electromagnetic induction via an antenna. Therefore, the pairing and connection process can be completed without the need for a built-in battery or other power source.

[0059] In some embodiments, the radio frequency identification (RFID) signal is used to generate an alternating electromagnetic wave field. When the RFID signal transmitted by the terminal device is received, the passive tag is in the alternating electromagnetic wave field generated by the RFID signal. The coil of the passive tag's antenna passes through the alternating electromagnetic wave field. According to the law of electromagnetic induction, the coil of the antenna generates an induced voltage, which is the electrical energy converted from the electromagnetic wave.

[0060] Step 202: Store electrical energy through the energy storage unit to power the chip and antenna to activate the passive RFID tag.

[0061] In some embodiments, the energy storage unit may be an energy storage circuit, which is connected to the chip and the antenna respectively, and is used to supply power to the chip and the antenna.

[0062] For example, the energy storage unit can be a rectifier circuit composed of Schottky barrier diodes. By utilizing the unidirectional conductivity of the diodes, the alternating positive and negative radio frequency signals are rectified into unidirectional DC signals. After filtering and voltage regulation, the signals provide a stable power supply for subsequent circuits, powering the chips and antennas to activate the passive RFID tags.

[0063] For example, the energy storage unit can be a capacitor circuit. Utilizing the energy storage characteristics of capacitors, the radio frequency signals received by the antenna are converted into DC power and stored in the capacitor to power the chip and antenna, thereby activating the passive RFID tag.

[0064] In some embodiments, electrical energy is also used to transmit the stylus's identity information to the terminal device.

[0065] The above technical solution uses energy storage units to obtain electrical energy generated in the radio frequency field for power supply. Therefore, the pairing and connection process does not require the use of a built-in battery or other power source. Since there is no need for a built-in power source and complex electronic components to ensure data communication, the hardware cost of the stylus is saved.

[0066] Step 203: Obtain the preset modulation rules.

[0067] In this embodiment of the application, the modulation rules are stored in the passive RFID tag.

[0068] In some embodiments, the modulation rules may also be sent by the terminal device.

[0069] In some embodiments, modulation rules may include: Amplitude Shift Keying (ASK), Frequency Shift Keying (FSK), and Phase Shift Keying (PSK).

[0070] Step 204: Modulate the identity information onto the radio frequency signal according to the modulation rules through the antenna to obtain the response request.

[0071] In some embodiments, the stylus's identification information may include a stylus identification code, which is a unique code used to distinguish different stylus devices. For example, the stylus identification code consists of letters, numbers, etc., and is used for pairing and connecting the stylus with a tablet computer. The tablet computer uses the identification code to determine the specific stylus that needs to be connected, thereby enabling correct identification and function invocation of the stylus, and ensuring that the input from the stylus is accurately processed and displayed on the corresponding device.

[0072] In some embodiments, step 204 may include: using load modulation to change the amplitude, phase, or frequency of the radio frequency signal reflected back to the terminal device by changing the load impedance of the antenna, thereby modulating the identity information onto the radio frequency signal to obtain a response request.

[0073] For example, in amplitude modulation, different data bits are represented by changing the amplitude of the reflected signal. The electrical energy of the energy storage unit is used to modulate the identity information onto the radio frequency signal to obtain a response request.

[0074] Through the above technical solution, the stylus modulates the radio frequency signal through the antenna to obtain a response request, and interacts with the terminal device according to the response request. Since the interaction is carried out by transmitting and receiving radio frequency signals through the antenna, and the antenna is powered by the energy storage unit, it not only simplifies the pairing process, but also reduces the power consumption of the stylus.

[0075] Step 205: Send the response request to the terminal device.

[0076] In this embodiment, the power of the energy storage unit is used to send the response request to the terminal device. Since the response request includes the stylus's identity information, the terminal device can verify whether the stylus is a pairable device based on the stylus's identity information.

[0077] In this embodiment, the terminal device decodes the response request according to a preset demodulation rule to obtain identity information, wherein the demodulation rule is a rule associated with the modulation rule; based on the identity information, it determines whether the stylus belongs to a pairable device.

[0078] In some embodiments, the pairable device may be a stylus of the same brand as the terminal device, or it may be a stylus model that the terminal device supports connection to. The pairable devices of the terminal device are preset and pre-stored in the terminal device.

[0079] Step 206: Upon receiving a pairing confirmation signal, activate the first communication module to complete the pairing connection with the terminal device.

[0080] In this embodiment of the application, the pairing confirmation signal is used to indicate that the terminal device has confirmed the recognition of the stylus. If the stylus is a pairable device, the pairing confirmation signal is sent to the stylus.

[0081] In this embodiment of the application, the stylus also includes a first communication module, which is used to transmit stylus usage data.

[0082] In this embodiment of the application, in the actual stylus system, the passive tag is only responsible for initial authentication and pairing triggering, and transmitting statically pre-stored short data such as the stylus's identity information. The stylus transmits usage data through the stylus's built-in active communication module (first communication module). The first communication module includes a Bluetooth communication unit and a near-field communication unit. Both the Bluetooth communication unit and the near-field communication unit are used to transmit usage data, which can meet the need for real-time transmission of usage data during the writing process.

[0083] The above technical solution activates the first communication module of the stylus upon receiving a pairing confirmation signal to complete the pairing connection with the terminal device, ensuring rapid interconnection between the stylus and the terminal device and simplifying the connection steps between them.

[0084] Step 207: Determine the distance between the stylus and the terminal device.

[0085] In some embodiments, 207 may include: determining the distance between the stylus and the terminal device based on the signal strength of the received radio frequency identification (RFID) signal. It is understood that the RFID signal weakens as the distance between the stylus and the terminal device increases, and the distance between the stylus and the terminal device can be obtained by detecting the Received Signal Strength Indication (RSSI).

[0086] In other embodiments, both the stylus and the terminal device are integrated with an Ultra Wide Band (UWB) module. Step 207 may further include: sending a UWB pulse signal to the terminal device and receiving a response signal returned by the terminal device; obtaining the one-way propagation time based on the time difference between the first moment of sending the UWB pulse signal and the second moment of receiving the response signal; and calculating the product of the one-way propagation time and the speed of light to obtain the distance between the stylus and the terminal device.

[0087] In addition to determining the distance between the stylus and the terminal device using the methods described in the above embodiments, other methods can also be used to determine the distance, which will not be discussed in detail here.

[0088] In some embodiments, before step 207, the stylus connection method may further include: activating the near-field communication unit in the first communication module and sending a near-field communication trigger command to the terminal device when a preset trigger condition is met, so that the terminal device activates the near-field communication unit in the preset second communication module. The trigger condition includes at least one of the following: triggering of the physical button of the stylus, the stylus detecting a pressure-sensitive signal, and the acceleration of the stylus being greater than a preset acceleration threshold.

[0089] It should be noted that the triggering condition set in this embodiment is to detect whether the user is holding the stylus. When the user is holding the stylus, in order to reduce the time the user waits to establish a communication connection, it is necessary to ensure the prerequisites for establishing a communication connection. Therefore, when the preset triggering condition is met, the near-field communication unit of the stylus is activated and linked with the terminal device to send a near-field communication trigger command to the terminal device, so that the terminal device activates its own near-field communication unit, providing the prerequisites for the subsequent execution of the communication connection establishment process.

[0090] In some embodiments, the stylus may be provided with a physical button for triggering the near-field communication function. When the physical button is pressed, the near-field communication unit in the first communication module is activated.

[0091] In some embodiments, the stylus may integrate a pressure sensor for detecting pressure signals. It is understood that when the stylus detects a pressure signal, it indicates that the user is holding the stylus.

[0092] In this embodiment of the application, the acceleration threshold can be 4 meters per second squared (m / s²). 2 Alternatively, other acceleration thresholds may be set based on actual application conditions, which will not be discussed in detail here. It is understandable that when the acceleration of the stylus is large, such as when the stylus is picked up from the table, the acceleration of the stylus increases, indicating that the user is holding the stylus.

[0093] In some embodiments, the above-described stylus connection method may further include: receiving a near-field communication signal sent by a terminal device through a second near-field communication unit, and activating the near-field communication unit in the first communication module.

[0094] For example, the near-field communication signal may be generated by the terminal device in response to a pressure signal on the screen.

[0095] It should be noted that when the stylus receives a near-field communication signal sent by the terminal device through the second near-field communication unit, it indicates that the user is using the terminal device. In order to ensure a fast connection for the stylus, the stylus's near-field communication unit needs to be activated.

[0096] Through the above technical solution, the near-field communication unit of the stylus can be activated when the triggering conditions are met, which can ensure the rapid interconnection between the stylus and the terminal device and the transmission of usage data, simplifying the connection steps between the stylus and the terminal device.

[0097] Step 208: Determine the target transmission method that matches the distance based on the preset correspondence between the distance range and the transmission method.

[0098] In this embodiment of the application, the transmission method includes sending via a near-field communication unit or sending via a Bluetooth communication unit.

[0099] In this embodiment, a signal corresponding to the first distance range is transmitted via a near-field communication unit, and a signal corresponding to the second distance range is transmitted via a Bluetooth unit. The maximum value of the second distance range is greater than the maximum value of the first distance range.

[0100] In some embodiments, the near-field communication unit can be an NFC unit, a ZigBee technology-based communication unit, or a UWB communication unit. For ease of description, the near-field communication unit will be referred to as an NFC unit in the following explanation.

[0101] It's worth noting that NFC has a very short effective connection range, generally within a few centimeters. For example, when transferring a business card using NFC, the two phones need to be very close together or touching for the transfer to complete. Bluetooth, on the other hand, has a relatively longer connection range, typically around 10 meters, with some enhanced Bluetooth devices offering even greater ranges. For instance, within a 10-meter range, a Bluetooth speaker can maintain a stable connection with a phone and play music.

[0102] In some embodiments, step 208 includes sub-steps 2081 and 2082.

[0103] Sub-step 2081: If the distance is within the first distance range, determine that the target transmission method is to send via the near-field communication unit; Sub-step 2082: If the distance is within the second distance range, determine that the target transmission method is to send via Bluetooth communication unit.

[0104] In this embodiment of the application, the first distance range corresponds to the near-field communication connection; the upper limit of the second distance range is greater than the upper limit of the first distance range.

[0105] For example, the first distance range can be 0 to 10 centimeters (cm), and the second distance range can be 0 to 5 meters (m).

[0106] In some embodiments, after sub-step 2082, the above-mentioned stylus connection method further includes: sending the Bluetooth physical (Media Access Control, MAC) address to the terminal device via the Bluetooth unit; and establishing a Bluetooth communication connection between the stylus and the terminal device upon receiving a response message from the terminal device.

[0107] In some embodiments, the terminal device receives device information sent by the stylus to enable the stylus to establish a connection with the terminal device.

[0108] With the above technical solution, when the distance between the stylus and the terminal device is within a first distance range, a near-field communication unit is used for transmission; when the distance is within a second distance range, the target transmission method is determined to be transmission via a Bluetooth communication unit. By determining the transmission method between the stylus and the terminal device based on the distance, the transmission efficiency can be maximized, and the transmission efficiency of usage data between the stylus and the terminal device can be improved.

[0109] In some embodiments, when the connection distance is greater than a preset distance threshold, the near-field communication connection is disconnected and pairing information is broadcast through the Bluetooth communication unit; when a response message is received from the terminal device, a Bluetooth connection is established with the terminal device according to the broadcast information, wherein the response message is generated by the terminal device through a preset second communication module after the terminal device identifies the stylus as a pairable device.

[0110] In this embodiment of the application, the distance threshold is the upper limit of the first distance range.

[0111] In this embodiment of the application, when the connection distance between the stylus and the terminal device is greater than the upper limit of the first distance range, continuing to use the near-field communication unit to send will result in low transmission efficiency and poor stability. In order to ensure the efficiency and stability of the communication connection, it is necessary to switch the transmission via the near-field communication unit to the transmission via the Bluetooth unit.

[0112] In some embodiments, after sub-step 2081, the above-mentioned stylus connection method may further include: when the stylus establishes a Bluetooth connection with the terminal device, periodically obtaining the connection distance between the stylus and the terminal device; when the connection distance is less than or equal to the upper limit of a first distance range, switching the Bluetooth connection to a near-field communication connection.

[0113] In some embodiments, after sub-step 2082, the above-mentioned stylus connection method further includes: sub-step 2083, disabling the near-field communication unit in the first communication module.

[0114] In some embodiments, the connection of the stylus may further include: when the stylus establishes a communication connection with the terminal device and the target connection method is a near-field communication connection, keeping the near-field communication unit of the stylus in an on state.

[0115] Understandably, turning off the near-field communication unit of the stylus when using Bluetooth connection can reduce the power consumption of the first communication module, thereby reducing the overall power consumption of the stylus and extending its usage time.

[0116] By using the above technical solution, the near-field communication unit can be turned off in scenarios where data transmission via near-field communication is not required, thereby reducing the power consumption of the stylus and extending its usage time.

[0117] Step 209: Send the usage data to the terminal device according to the target transmission method.

[0118] In some embodiments, step 209 may include: sending usage data to a terminal device via a near-field communication unit; or, sending usage data to a terminal device via a Bluetooth communication unit.

[0119] In some embodiments, sending usage data to a terminal device via a Bluetooth communication unit includes: the stylus encapsulating the usage data according to the Generic Attribute Profile (GATT) protocol to obtain a Bluetooth broadcast data packet; and broadcasting the Bluetooth broadcast data packet to the terminal device using Bluetooth broadcast.

[0120] In other embodiments, the usage data is sent to the terminal device via a near-field communication unit, including: the stylus receiving the communication protocol sent by the terminal device via an antenna; encapsulating the usage data according to the communication protocol; using the same modulation technique as the terminal device, modulating the digital signal corresponding to the encapsulated usage data onto a carrier wave; and sending the modulated signal to the terminal device via an antenna.

[0121] It should be noted that the stylus transmits data to the terminal device at the same speed. This is because handwriting input usually has high real-time requirements. Users expect to see the corresponding trajectory on the screen the moment they write. Transmitting the data back at the same speed ensures that the terminal device receives the data from the stylus in a timely manner, which helps to maintain the smoothness of writing.

[0122] In some embodiments, after step 209, the terminal device may export the usage data in a table or other form.

[0123] In some embodiments, after step 209, the above-described stylus connection method further includes: When data transmission ends and no Bluetooth broadcast signal or NFC signal is received within a preset time, the first communication module is controlled to enter a sleep state.

[0124] In this embodiment of the application, the preset duration can be 5 minutes or 30 seconds, which can be set according to actual needs.

[0125] By using the above technical solutions, different transmission methods can be selected based on the connection distance between the stylus and the terminal device, thereby reducing the data transmission process between the stylus and the terminal device and improving the connection efficiency between them.

[0126] This invention provides another method for connecting a stylus, see reference. Figure 3This stylus connection method is applied to terminal devices and may include the following steps.

[0127] Step 301: Transmit an RFID signal to trigger the pairing connection with the stylus, so that the stylus can activate the passive RFID tag integrated in the stylus.

[0128] In this embodiment of the application, the radio frequency identification (RFID) signal is used to trigger pairing and connection with the stylus.

[0129] In some embodiments, the passive radio frequency tag is an RFID tag. The RFID tag does not include a battery and relies on radio frequency signals emitted by the receiving terminal device to obtain power to work. In response to receiving the radio frequency identification signal, the RFID tag is activated.

[0130] In the embodiments of this application, the terminal device can be an electronic device with communication functions, including mobile phones, cameras, camcorders, and tablet computers, etc.

[0131] In some embodiments, the terminal device integrates an RF transmitter for periodically transmitting RF identification signals to trigger a pairing connection with a stylus.

[0132] In one possible implementation, the radio frequency transmitter can be a small RFID reader used for transmitting and receiving radio frequency signals.

[0133] Step 302: Receive the response request returned by the stylus.

[0134] In this embodiment of the application, the response request is obtained by the stylus pen modulating its identity information onto a radio frequency signal via a passive RFID tag.

[0135] In some embodiments, the stylus's identification information may include a stylus identification code, which is a unique code used to distinguish different stylus devices. For example, the stylus identification code consists of letters, numbers, etc., and is used for pairing and connecting the stylus with a tablet computer. The tablet computer uses the identification code to determine the specific stylus that needs to be connected, thereby enabling correct identification and function invocation of the stylus, and ensuring that the input from the stylus is accurately processed and displayed on the corresponding device.

[0136] Step 303: Pair and connect with the stylus according to the response request.

[0137] In some embodiments, step 303 may include sub-steps 3031 to 3034.

[0138] Sub-step 3031: Upon receiving a response request, obtain the preset demodulation rules; Sub-step 3032: Decode the response request according to the demodulation rules to obtain the identity information; Sub-step 3033: Based on the identity information, determine whether the stylus is a pairable device; Sub-step 3034: If the stylus is a pairable device, send a pairing confirmation signal to the stylus.

[0139] In this embodiment of the application, the stylus is configured to activate its built-in first communication module upon receiving a pairing confirmation signal. The pairing confirmation signal is used to indicate that the terminal device has confirmed and recognized the stylus.

[0140] In this embodiment of the application, the demodulation rule is a rule associated with the modulation rule.

[0141] In some embodiments, sub-step 3032 may include: decoding the response request according to demodulation rules to obtain the stylus identification code.

[0142] Optionally, the pairable device can be a stylus of the same brand as the terminal device, or it can be a stylus model that the terminal device supports. The pairable devices of the terminal device are preset and pre-stored in the terminal device.

[0143] In some embodiments, sub-step 3033 may include: comparing the identification code of the stylus with the identification code of a pairable device; determining that the stylus belongs to a pairable device if the identification code of the stylus belongs to a pairable device; and determining that the stylus does not belong to a pairable device if the identification code of the stylus does not belong to a pairable device.

[0144] In some embodiments, sub-step 3034 may include: if the stylus is a pairable device, sending a pairing confirmation signal to the stylus through a preset second communication module, wherein the second communication module may include a near-field communication unit and a Bluetooth unit.

[0145] The above technical solution decodes the response request upon receipt of a response request according to demodulation rules to obtain identity information. Based on the identity information, it determines whether the stylus is a pairable device to complete the pairing connection with the terminal device, reducing the user's pairing time and simplifying the connection steps between the stylus and the terminal device.

[0146] Step 304: When the stylus is paired and connected with the terminal device, receive the stylus usage data sent by the stylus through a preset transmission method.

[0147] In some embodiments, prior to step 304, the stylus connection method may further include: activating the near-field communication unit in the second communication module when a preset trigger condition is met. For example, the trigger condition may include: the screen of the terminal device detecting pressure.

[0148] In some embodiments, the above-described stylus connection method may further include: sending a near-field communication signal to the stylus via a second near-field communication unit when pressure is detected on the screen of the terminal device.

[0149] In this invention, the terminal device transmits an RFID signal to trigger pairing with the stylus. The stylus automatically triggers pairing between the terminal device and the stylus via a passive tag, eliminating the need for the user to perform pairing operations such as searching for the device, selecting the device, and waiting for connection. This reduces the connection process between the stylus and the terminal device and improves the connection efficiency between them.

[0150] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential to the embodiments of this application.

[0151] This application also provides a smart pen tail component, as shown in the reference. Figure 4 The smart pen tail component 40 integrates a passive radio frequency tag, and the smart pen tail component 40 is fixed to the pen body 42 of the stylus by a fastener 41. The intelligent pen tail component 40 is used to activate a passive RFID tag when it receives an RFID signal emitted by a terminal device; the RFID signal is used to trigger pairing and connection with the stylus; the stylus's identity information is modulated onto the RFID signal through the passive RFID tag to obtain a response request; the response request is sent to the terminal device so that the terminal device can pair and connect with the stylus according to the response request; when the stylus and the terminal device are paired and connected, the stylus usage data is sent to the terminal device through a preset transmission method.

[0152] In some embodiments, the smart pen tail assembly 40 adopts a cylindrical hollow structure and is equipped with a passive radio frequency tag.

[0153] In one possible implementation, the pen body 42 of the stylus can be a non-electronic device.

[0154] For example, the pen body 42 is a pencil, and the data used is writing trajectory data. The smart pen tail component 40 sends the writing trajectory data of the stylus to the terminal device, so that the terminal device can display the writing trajectory corresponding to the writing trajectory data on the terminal device's display screen.

[0155] For example, the pen body 42 has the structure of a regular writing pen tip. The stylus can simultaneously perform handwriting input, drawing and operation on electronic devices, as well as writing on materials such as paper.

[0156] For example, the pen body may be made of non-electronic materials such as wood, ceramic, or carbon fiber. The data used is positional movement trajectory data, and different positional movement trajectory data correspond to different control commands. These control commands include one of the following functions: bringing up the cursor, moving the cursor, clicking, and turning pages. The intelligent pen tail component 40 sends the stylus's positional movement trajectory data to the terminal device to trigger the terminal device to perform functions such as bringing up the cursor, moving the cursor, clicking, and turning pages.

[0157] In one possible implementation, the same smart pen tail component 40 can be paired with multiple types of terminal devices, such as office laptops, home tablets, and electronic whiteboards for teaching, thereby improving the reusability of the stylus.

[0158] In some embodiments, the end of the pen body 42 is provided with a fixing member 41, which is a cap-shaped structure and has a groove. The fixing member 41 is fixed to the pen body 42 of the stylus through the groove.

[0159] In some embodiments, the smart pen tail assembly 40 and the fixing member 41, and the pen body 42 of the stylus and the fixing member 41 are all connected by a threaded connection.

[0160] In this invention, the smart pen tail component integrates a passive RFID tag. The stylus automatically triggers pairing and connection between the stylus and the terminal device via the passive tag, eliminating the need for users to perform pairing operations such as searching for, selecting, and waiting for the connection. This reduces the connection process between the stylus and the terminal device and improves the connection efficiency. In addition, the smart pen tail component is fixed to the stylus body by a fastener, making it easy to disassemble. This reduces the process and time required to replace the smart pen tail component, facilitating its maintenance and improving the stylus's practicality.

[0161] This application also provides a stylus connection device, as shown in the reference. Figure 5 The stylus connection device 500 is used with a stylus pen that integrates a passive RFID tag. The stylus connection device 500 includes: The tag activation module 501 is used to activate a passive RFID tag upon receiving an RFID signal transmitted by a terminal device; the RFID signal is used to trigger pairing and connection with a stylus. The response generation module 502 is used to modulate the identity information of the stylus onto a radio frequency signal using a passive RFID tag to obtain a response request. The response sending module 503 is used to send a response request to the terminal device so that the terminal device can pair and connect with the stylus according to the response request. The data transmission module 504 is used to send stylus usage data to the terminal device through a preset transmission method when the stylus is paired and connected with the terminal device.

[0162] Optionally, the passive RFID tag includes an antenna, a chip, and an energy storage unit. The energy storage unit is connected to both the chip and the antenna. The antenna is used to transmit and receive radio frequency signals, and the chip is used to store the stylus's identification information. The tag activation module 501 includes: The power conversion submodule is used to convert the electromagnetic waves of the radio frequency identification signal transmitted by the terminal device into electrical energy through the principle of electromagnetic induction via an antenna. The energy storage submodule is used to store electrical energy through the energy storage unit to power the chip and antenna to activate the passive RFID tag.

[0163] Optionally, the response generation module 502 includes: The first acquisition submodule is used to acquire the preset modulation rules; the modulation rules are stored in the passive RFID tag. The modulation submodule is used to modulate the identity information onto the radio frequency signal according to the modulation rules through the antenna to obtain the response request.

[0164] Optionally, the stylus also includes a first communication module, a response sending module 503, including: The response sending submodule is used to send the response request to the terminal device, so that the terminal device can decode the response request according to the preset demodulation rules to obtain the identity information; the demodulation rules are associated with the modulation rules; based on the identity information, it determines whether the stylus is a pairable device; if the stylus is a pairable device, it sends a pairing confirmation signal to the stylus, which is used to indicate that the terminal device has confirmed the recognition of the stylus; The communication module startup submodule is used to start the first communication module upon receiving a pairing confirmation signal to complete the pairing connection with the terminal device.

[0165] Optionally, the first communication module includes a Bluetooth communication unit and a near-field communication unit, and the data transmission module 504 includes: The distance determination submodule is used to determine the distance between the stylus and the terminal device; The transmission determination submodule is used to determine the target transmission method that matches the distance based on the preset correspondence between the distance range and the transmission method; the transmission method includes transmission via the near-field communication unit or transmission via the Bluetooth communication unit; The data sending submodule is used to send the data to the terminal device according to the target transmission method.

[0166] Optionally, the transmission determination submodule includes: The first determining unit is used to determine that the target transmission method is to send via a near-field communication unit when the distance is within a first distance range; the first distance range corresponds to the near-field communication connection. The second determining unit is used to determine that the target transmission method is to send via Bluetooth communication unit when the distance is within the second distance range; the upper limit of the second distance range is greater than the upper limit of the first distance range.

[0167] Optionally, the stylus connector 500 also includes: The communication trigger command sending module is used to activate the near-field communication unit in the first communication module and send a near-field communication trigger command to the terminal device when a preset trigger condition is met, so that the terminal device activates the near-field communication unit in the preset second communication module. The trigger condition includes at least one of the following: triggering of the physical button of the stylus, the stylus detecting a pressure-sensitive signal, and the acceleration of the stylus being greater than a preset acceleration threshold. The communication unit shutdown module is used to shut down the near-field communication unit in the first communication module.

[0168] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0169] This application also provides a stylus connection device, as shown in the reference. Figure 6 The stylus connection device 600 is used in a terminal device, and the stylus connection device 600 includes: The signal transmitting module 601 is used to transmit a radio frequency identification signal for triggering pairing and connection with the stylus, so that the stylus can activate the passive radio frequency tag integrated in the stylus; The response receiving module 602 is used to receive the response request returned by the stylus; the response request is obtained by the stylus modulating the stylus's identity information onto the radio frequency signal through a passive RFID tag; Pairing and connection module 603 is used to pair and connect with the stylus according to a response request; The data receiving module 604 is used to receive stylus usage data sent by the stylus through a preset transmission method when the stylus is paired and connected with the terminal device.

[0170] Optionally, the pairing connection module 603 includes: The second acquisition submodule is used to acquire preset demodulation rules upon receiving a response request; the demodulation rules are the rules associated with the modulation rules. The decoding submodule is used to decode the response request according to the demodulation rules to obtain the identity information; The identity verification submodule is used to determine whether the stylus is a pairable device based on the identity information. The signal transmission submodule is used to send a pairing confirmation signal to the stylus when the stylus is a pairable device, so that the stylus can activate its built-in first communication module upon receiving the pairing confirmation signal. The pairing confirmation signal is used to indicate that the terminal device has confirmed and recognized the stylus.

[0171] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0172] like Figure 7 As shown, this application embodiment also provides an electronic device 700, including a processor 701 and a memory 702. The memory 702 stores a program or instructions that can run on the processor 701. When the program or instructions are executed by the processor 701, they implement the various steps of the above-described stylus pen connection method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0173] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0174] Figure 8 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0175] The electronic device 800 includes, but is not limited to, components such as: radio frequency unit 801, network module 802, audio output unit 803, input unit 804, communication module 805, interface unit 808, memory 809, and processor 810.

[0176] Those skilled in the art will understand that the electronic device 800 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 810 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 8The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0177] The processor 810 is used to activate a passive RFID tag when it receives an RFID signal transmitted by a terminal device; the RFID signal is used to trigger a pairing connection with a stylus; the stylus's identity information is modulated onto the RFID signal through the passive RFID tag to obtain a response request; the response request is sent to the terminal device so that the terminal device can pair and connect with the stylus according to the response request; when the stylus and the terminal device are paired and connected, the processor 810 sends stylus usage data to the terminal device through a preset transmission method.

[0178] In this embodiment, the passive tag automatically triggers the pairing and connection between the terminal device and the stylus, eliminating the need for the user to perform pairing operations such as searching for the device, selecting the device, and waiting for the connection. This reduces the connection process between the stylus and the terminal device and improves the connection efficiency between them.

[0179] It should be understood that, in this embodiment, the input unit 804 can be a passive RFID tag, wherein the input unit 804 includes an antenna 8041, a chip 8042, and an energy storage unit 8043. The energy storage unit 8041 is connected to both the chip 8041 and the antenna 8042. The antenna 8041 is used to transmit and receive radio frequency signals, the chip 8042 is used to store the stylus's identity information, and the energy storage unit 8043 is used to store electrical energy and power the chip and the antenna. The communication module 805 includes a Bluetooth communication unit and a near-field communication unit, wherein both the Bluetooth communication unit and the near-field communication unit are used to transmit stylus usage data.

[0180] The memory 809 can be used to store software programs and various data. The memory 809 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs, or instructions required for functions (such as sound playback functions, image playback functions, etc.). Furthermore, the memory 809 may include volatile memory or non-volatile memory, or it may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (Synchlink DRAM, SLDRAM), and direct memory bus RAM (DRRAM). The memory 809 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0181] Processor 810 may include one or more processing units; optionally, processor 810 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 810.

[0182] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described stylus connection method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0183] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0184] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described stylus pen connection method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0185] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system-on-a-chip, chip system, or system-on-chip, etc. The present invention also provides a readable storage medium, wherein when the instructions in the storage medium are executed by the processor of an electronic device, the electronic device is able to perform the steps of the above-described stylus connection method.

[0186] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the aforementioned stylus connection method.

[0187] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0188] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0189] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A stylus connection method, characterized by, The application is applied to a handwriting pen integrated with a passive radio frequency tag; the method comprises: activating the passive radio frequency tag in the case of receiving a radio frequency identification signal transmitted by a terminal device; the radio frequency identification signal is used to trigger a pairing connection with the handwriting pen; modulating identity information of the handwriting pen onto a radio frequency signal through the passive radio frequency tag to obtain a response request; sending the response request to the terminal device to make the terminal device pair with the handwriting pen according to the response request; in the case of pairing connection between the handwriting pen and the terminal device, sending usage data of the handwriting pen to the terminal device through a preset transmission mode.

2. The method of claim 1, wherein, The passive radio frequency tag comprises an antenna, a chip and an energy storage unit, the energy storage unit is connected with the chip and the antenna respectively, the antenna is used to transmit and receive radio frequency signals, the chip is used to store identity information of the handwriting pen, and the activating the passive radio frequency tag in the case of receiving a radio frequency identification signal transmitted by a terminal device comprises: in the case of receiving a radio frequency identification signal transmitted by a terminal device, converting electromagnetic waves of the radio frequency identification signal into electric energy through the antenna by using electromagnetic induction principle; storing the electric energy through the energy storage unit to supply power to the chip and the antenna to activate the passive radio frequency tag.

3. The method of claim 2, wherein, The modulating identity information of the handwriting pen onto a radio frequency signal through the radio frequency tag to obtain a response request comprises: obtaining a preset modulation rule; the modulation rule is stored in the passive radio frequency tag; modulating the identity information onto the radio frequency signal through the antenna according to the modulation rule to obtain the response request.

4. The method of claim 1, wherein, The handwriting pen further comprises a first communication module, and the sending the response request to the terminal device to make the terminal device pair with the handwriting pen according to the response request comprises: sending the response request to the terminal device to make the terminal device decode the response request according to a preset demodulation rule to obtain identity information; the demodulation rule is a rule associated with the modulation rule; according to the identity information, determining whether the handwriting pen belongs to a pairable device; in the case of the handwriting pen belonging to a pairable device, sending a pairing confirmation signal to the handwriting pen, the pairing confirmation signal is used to represent that the terminal device has confirmed to identify the handwriting pen; in the case of receiving the pairing confirmation signal, starting the first communication module to complete the pairing connection with the terminal device.

5. The method of claim 4, wherein, The first communication module comprises a Bluetooth communication unit and a near field communication unit, and the sending usage data of the handwriting pen to the terminal device through a preset transmission mode in the case of pairing connection between the handwriting pen and the terminal device comprises: determining a distance between the handwriting pen and the terminal device; determining a target transmission mode matched with the distance according to a correspondence between a preset distance range and a transmission mode; the transmission mode comprises sending through the near field communication unit or sending through the Bluetooth communication unit. According to the target transmission mode, the usage data is sent to the terminal device.

6. The method of claim 5, wherein, The target transmission mode matching the distance is determined according to a preset correspondence between distance ranges and transmission modes, including: In a case where the distance is in a first distance range, the target transmission mode is determined to be sent through the near field communication unit; the first distance range corresponds to the near field communication connection; In a case where the distance is in a second distance range, the target transmission mode is determined to be sent through the Bluetooth communication unit; the upper limit of the second distance range is greater than the upper limit of the first distance range.

7. The method of claim 6, wherein, Before the distance between the stylus and the terminal device is determined, the method further includes: In a case where a preset trigger condition is met, the near field communication unit in the first communication module is started, and a near field communication trigger instruction is sent to the terminal device, so that the terminal device starts the near field communication unit in the preset second communication module; the trigger condition includes at least one of the following: triggering of a physical button of the stylus, detection of a pressure signal by the stylus; the acceleration of the stylus is greater than a preset acceleration threshold; After the target transmission mode is determined to be sent through the Bluetooth communication unit in a case where the distance is in the second distance range, the method further includes: The near field communication unit in the first communication module is closed.

8. A stylus connection method, characterized by, Applied to a terminal device, the method includes: Transmitting a radio frequency identification signal for triggering pairing connection with a stylus, so that the stylus activates a passive radio frequency tag integrated in the stylus; Receiving a response request returned by the stylus; the response request is obtained by modulating identity information of the stylus onto a radio frequency signal by the passive radio frequency tag; According to the response request, the stylus is paired with the terminal device; In a case where the stylus is paired with the terminal device, receiving usage data of the stylus sent by the stylus through a preset transmission mode.

9. The method of claim 8, wherein, According to the response request, the stylus is paired with the terminal device, including: In a case where the response request is received, a preset demodulation rule is obtained; the demodulation rule is a rule associated with the modulation rule; According to the demodulation rule, the response request is decoded to obtain the identity information; According to the identity information, it is determined whether the stylus belongs to a pairable device; In a case where the stylus belongs to a pairable device, a pairing confirmation signal is sent to the stylus, so that the stylus starts a first communication module built-in in the stylus in a case where the pairing confirmation signal is received; the pairing confirmation signal is used to indicate that the terminal device has confirmed to recognize the stylus.

10. A smart pen tail assembly, characterized by, The smart pen tail assembly integrates a passive radio frequency tag, and the smart pen tail assembly is fixed with the pen body of the stylus through a fixing member; The smart pen tail assembly is used to activate the passive radio frequency tag in a case where a radio frequency identification signal transmitted by a terminal device is received; The radio frequency identification signal is used to trigger pairing connection with the stylus; Modulate the identity information of the stylus pen onto a radio frequency signal through the passive radio frequency tag to obtain a response request; send the response request to the terminal device to make the terminal device pair and connect with the stylus pen according to the response request; and send the use data of the stylus pen to the terminal device through a preset transmission mode in the case that the stylus pen is paired and connected with the terminal device.

11. An electronic device, comprising: Comprising: A processor, a memory, and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the stylus pen connection method of any one of claims 1-7 or 8-9 when executing the program.

12. A readable storage medium, characterized by, Computer instructions, when executed by a processor of an electronic device, enable the electronic device to perform the stylus pen connection method of any one of claims 1-7 or 8-9.