CN114217700B - Touch pen switching method and input device - Google Patents

Touch pen switching method and input device Download PDF

Info

Publication number
CN114217700B
CN114217700B CN202210148170.9A CN202210148170A CN114217700B CN 114217700 B CN114217700 B CN 114217700B CN 202210148170 A CN202210148170 A CN 202210148170A CN 114217700 B CN114217700 B CN 114217700B
Authority
CN
China
Prior art keywords
stylus
feedback message
electronic device
active
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210148170.9A
Other languages
Chinese (zh)
Other versions
CN114217700A (en
Inventor
李哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210148170.9A priority Critical patent/CN114217700B/en
Publication of CN114217700A publication Critical patent/CN114217700A/en
Application granted granted Critical
Publication of CN114217700B publication Critical patent/CN114217700B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/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
    • 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/038Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
    • 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/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0414Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means using force sensing means to determine a position
    • 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/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/044Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means
    • G06F3/0441Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means using active external devices, e.g. active pens, for receiving changes in electrical potential transmitted by the digitiser, e.g. tablet driving signals

Abstract

The embodiment of the application provides a switching method of a touch pen and input equipment. Wherein the method comprises the following steps: judging whether a first feedback message is received or not when the touch pen executes touch operation; if the first feedback message is received, the touch pen judges whether the first feedback message is from the active device or not; if the first feedback message comes from the active equipment, the stylus judges whether a second feedback message is received in advance or not; if the second feedback message is received before, the stylus may determine that the user has switched it from the active device to the inactive device that sent the second feedback message to perform a touch operation, thus switching the inactive device that sent the second feedback message to the active device. Therefore, the touch pen does not need to send pressure information to each electronic device, so that the flow of switching the active device by the touch pen is simplified, the time delay of switching the active device by the touch pen is reduced, and the use experience of a user is improved.

Description

Touch pen switching method and input device
Technical Field
The application relates to the technical field of terminals, in particular to a switching method and input equipment of a touch pen.
Background
With the development of technology, a connection may be established between electronic devices. For example, after the electronic device establishes a connection with the stylus, the electronic device may display a touch trajectory of the stylus (i.e., content written by the stylus on the touch screen) on the touch screen in response to a touch operation of the stylus on the touch screen of the electronic device.
In the case where the stylus establishes a connection with a plurality of electronic devices, the stylus may set one of the electronic devices (e.g., electronic device a) as an active device and the other electronic devices as inactive devices. When the stylus detects that a user uses the stylus to perform writing operation, a corresponding coding signal is generated at the pen point according to coding frequency and screen parameters of the active device, and a pressure sensing signal is sent to the active device. In this way, when a user performs a touch operation on the active device using the stylus, the active device may receive the code signal, thereby displaying a touch trajectory of the stylus. After that, when the user switches the stylus from the active device to a certain inactive device (e.g., electronic device B) to perform a touch operation, the stylus performs a switching procedure to switch the inactive device to the active device. In a general switching process, the stylus generates a coding signal according to coding frequency and screen parameters of each electronic device connected with the stylus in turn, and sends a pressure sensing message to all the electronic devices to determine which electronic device is the device that the user wants to switch. The process can cause a certain time delay in the process of switching the active equipment from the electronic equipment A to the electronic equipment B, so that when the touch pen just starts to execute touch operation on the electronic equipment B, the situation that handwriting cannot be written exists, and the use experience of a user is reduced.
Disclosure of Invention
The embodiment of the application provides a switching method and input equipment of a touch pen, so that the speed of switching active equipment of the touch pen is improved, and the use experience of a user is improved.
In a first aspect, an embodiment of the present application provides a method for switching a stylus, where the method is applied to switching an active device between a plurality of connected electronic devices by the stylus; the plurality of electronic devices comprise one active device, and the rest are inactive devices; when a user uses a touch pen to execute touch operation, the touch pen is used for generating a code signal at a pen point according to code frequency and screen parameters of active equipment and sending a pressure sensing message to the active equipment through a communication network; the method specifically comprises the following steps: the touch control pen judges whether a first feedback message is received or not; the first feedback message is sent when the electronic equipment receives the coding signal and the state of the pressure sensing message is changed and the coding signal cannot be received, but the pressure sensing message can be received; if the first feedback message is received, the touch pen judges whether the first feedback message is from the active device or not; if the first feedback message comes from the active device, the stylus judges whether a second feedback message sent by the inactive device is received before; the second feedback message is sent when the electronic equipment receives the code signal and the pressure sensing message, and the state of the second feedback message is changed to be capable of receiving the code signal but incapable of receiving the pressure sensing message; and if the second feedback message sent by the inactive device is received previously, the stylus switches the electronic device sending the second feedback message to the active device.
According to the technical scheme, the stylus receives the second feedback message sent by the non-active device before receiving the first feedback message of the active device after receiving the second feedback message, the coding frequency and screen parameters of the non-active device can be determined to be the same as those of the active device, and the user is switching from the active device to the non-active device by using the stylus to execute touch operation. Thus, the stylus may directly switch this inactive device to an active device. Therefore, the touch pen does not need to send pressure information to each electronic device, so that the flow of switching the active device by the touch pen is simplified, the time delay of switching the active device by the touch pen is reduced, and the use experience of a user is improved.
In one implementation, the method further comprises: the touch control pen judges whether a second feedback message is received or not; if the second feedback message is received, the stylus judges whether the second feedback message is from the inactive device; if the second feedback message is from the inactive device, the stylus starts a timer that is used to run for a preset period of time after starting and then stops running. In this way, the stylus can preset a duration through the timer, and when the stylus receives the first feedback message, the stylus can judge whether the second feedback message sent by the inactive device is received in the preset duration according to the running state of the timer.
In one implementation, the stylus determining whether a second feedback message sent by the inactive device was previously received includes: the touch pen judges whether the timer is running or not; if the timer is running, the stylus determines that a second feedback message sent by the inactive device was previously received; if the timer is not running, the stylus determines that a second feedback message sent by the inactive device was not previously received.
In one implementation, the method further comprises: if the second feedback message sent by the inactive device is not received before, the stylus executes a multi-device switching process; the multi-device switching process includes cyclically executing the steps of: the touch pen selects a group of coding frequencies and screen parameters from a plurality of groups of coding frequencies and screen parameters recorded by the touch pen according to a preset sequence to generate corresponding coding signals; the touch pen sends a pressure sensing message to the electronic equipment corresponding to the selected coding frequency and screen parameters. In this way, the stylus can distinguish different electronic devices according to different coding frequencies and screen parameters, each group of coding frequencies and screen parameters are switched in turn to generate coding signals, and only the pressure sensing information is sent to the electronic devices corresponding to the group of coding frequencies and screen parameters to which the stylus is switched, and the pressure sensing information is not needed to be sent to all the electronic devices, so that signaling cost in the switching process of the active devices is reduced, the speed of switching the active devices by the stylus is improved, the power consumption is reduced, and the use experience of users is improved.
In one implementation, the multi-device handoff procedure further includes the steps of: the touch control pen judges whether a second feedback message is received or not; if the second feedback message is received, the stylus exits the multi-device switching process; the stylus switches the electronic device that sent the second feedback message to an active device. The stylus, if receiving the second feedback message, may determine that the coding frequency and screen parameters of the inactive device are the same as the active device and that the user is using the stylus to switch from the active device to perform a touch operation on the inactive device. Therefore, the stylus can directly switch the inactive device to the active device, thereby simplifying the flow of switching the active device by the stylus.
In one implementation, the multi-device handoff procedure further includes the steps of: the touch pen judges whether a third feedback message is received or not; the third feedback message is sent when the electronic equipment receives the code signal and the pressure sensing message, and the state of the third feedback message changes to be capable of receiving the code signal and the pressure sensing message; if the third feedback message is received, the stylus exits the multi-device switching process; the stylus switches the electronic device that sent the third feedback message to an active device. If the touch control pen receives the third feedback information, the currently selected coding frequency and screen parameters of the touch control pen can be determined to be the same as the coding frequency and screen parameters of the electronic equipment switched by the user, so that the electronic equipment of the third feedback information can be directly switched to the active equipment, and the flow of switching the active equipment by the touch control pen is simplified.
In one implementation, after the stylus sends the pressure-sensitive message to the electronic device corresponding to the selected coding frequency and the screen parameter, the method further includes: the touch pen judges whether a multi-device switching process is in progress or not; if the multi-device switching process is in progress, the stylus executes the next round of circulation; if the multi-device switching process has exited, the stylus stops cycling.
In one implementation, a stylus sends a pressure-sensitive message to an electronic device corresponding to a selected coding frequency and screen parameters, including: if the coding frequency and the screen parameter selected by the touch pen are the same as those of the active device, the touch pen only sends a pressure sensing message to the active device. Since the coding frequency and screen parameters of the inactive device and the active device are the same, if the stylus performs a touch operation on the inactive device, the inactive device actively transmits a second feedback message to the stylus, so that it is not necessary to transmit a pressure sensing message to the inactive device, thereby reducing signaling overhead of the stylus.
In one implementation, a stylus determines whether a first feedback message is from an active device, including: the touch pen judges whether the device identification of the electronic device sending the first feedback message is the same as the device identification of the active device recorded by the touch pen; if the first feedback message is the same, the stylus determines that the first feedback message is from an active device; if not, the stylus determines that the first feedback message is from an inactive device.
In one implementation, the stylus determines whether the second feedback message is from an active device, including: the touch pen judges whether the device identification of the electronic device sending the second feedback message is the same as the device identification of the active device recorded by the touch pen; if the first feedback message is the same, the stylus determines that the first feedback message is from the active device; if not, the stylus determines that the second feedback message is from an inactive device.
In one implementation, the method further comprises: when the timer is started, the stylus records device information of the inactive device which sends the second feedback message. And deleting the recorded device information when the touch pen stops running.
In a second aspect, embodiments of the present application provide an input device, including: a processor and a memory; one or more processors; the memory is coupled to the one or more processors, the memory for storing computer program code, the computer program code comprising computer instructions; the one or more processors are configured to invoke computer instructions to cause the input device to perform the method performed by the stylus in the aspects and implementations thereof described above.
In a third aspect, embodiments of the present application further provide a chip system, where the chip system includes a processor and a memory, and the memory stores program instructions that, when executed by the processor, cause the chip system to perform the methods in the above aspects and their respective implementations. For example, information related to the above method is generated or processed.
In a fourth aspect, embodiments of the present application further provide a computer-readable storage medium, in which program instructions are stored, which when run on a computer, cause the computer to perform the methods of the above aspects and their respective implementations.
In a fifth aspect, embodiments of the present application also provide a computer program product, which when run on a computer, causes the computer to perform the methods of the above aspects and their respective implementations.
Drawings
Fig. 1 is a schematic view of a scenario suitable for use in the embodiments of the present application;
fig. 2A and 2B are schematic structural diagrams of a stylus;
fig. 3A is a schematic hardware structure of a stylus according to an embodiment of the present application;
fig. 3B is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an electronic device sending a feedback message to a stylus;
fig. 5 is a flowchart of a method for switching a stylus according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a stylus switching active device according to an embodiment of the present application;
FIG. 7 is another flowchart of a stylus switching method according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram illustrating a stylus receiving only a first feedback message according to an embodiment of the present application;
Fig. 9 is a schematic diagram of a multi-device handover procedure shown in an embodiment of the present application;
FIG. 10 is another schematic diagram of a stylus switching active device shown in an embodiment of the present application;
fig. 11 is a schematic structural diagram of a file sharing device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The character "/" in the present application generally indicates that the front-rear association object is an "or" relationship. For example, A/B may be understood as A or B.
The terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more.
Furthermore, references to the terms "comprising" and "having" and any variations thereof in the description of the present application are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to only those steps or modules but may include other steps or modules not listed or inherent to such process, method, article, or apparatus.
In addition, in the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as examples, illustrations, or descriptions. Any embodiment or design described herein as "exemplary" or "e.g." should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present concepts in a concrete fashion.
In order to facilitate understanding of the technical solution of the present application, prior to describing in detail the connection method of the stylus according to the embodiments of the present application, a description will be given of a conventional technology.
With the development of technology, a connection may be established between electronic devices. For example, after the electronic device establishes a connection with the stylus, the electronic device may display a touch trajectory of the stylus (i.e., content written by the stylus on the touch screen) on the touch screen in response to a touch operation of the stylus on the touch screen of the electronic device.
In the current technical solution, the stylus may establish a connection with a plurality of electronic devices. After the stylus is connected with a plurality of electronic devices, the coding frequency and screen parameters of each electronic device are recorded. The coding frequency and screen parameters of different electronic devices may be the same or different. For example: if two electronic devices are of the same model and use the same screen (e.g., two electronic devices use the same model, the same lot, or the same hardware version of the screen of the same screen manufacturer), then the coding frequency and screen parameters of the two electronic devices are likely to be the same. Also for example: if the two electronic devices are different electronic devices or, although the two electronic devices are the same type of electronic device, different screens are used (e.g., the two electronic devices use screens of different screen manufacturers), the coding frequency and screen parameters of the two electronic devices are likely to be different.
In the case where the stylus establishes a connection with a plurality of electronic devices, the stylus may set one of the electronic devices (e.g., electronic device a) as an active device and the other electronic devices as inactive devices. When the stylus detects that a user uses the stylus to perform writing operation, a corresponding coding signal is generated at the pen point according to coding frequency and screen parameters of the active device, and a pressure sensing signal is sent to the active device. In this way, when a user performs a touch operation on the active device using the stylus, the active device may receive the code signal, thereby displaying a touch trajectory of the stylus. After that, when the user switches the stylus from the active device to a certain inactive device (e.g., electronic device B) to perform a touch operation, the stylus performs a switching procedure to switch the inactive device to the active device. In a general switching process, the stylus generates a coding signal according to coding frequency and screen parameters of each electronic device connected with the stylus in turn, and sends a pressure sensing message to all the electronic devices to determine which electronic device is the device that the user wants to switch. The process can cause a certain time delay in the process of switching the active equipment from the electronic equipment A to the electronic equipment B, so that when the touch pen just starts to execute touch operation on the electronic equipment B, the situation that handwriting cannot be written exists, and the use experience of a user is reduced.
Therefore, the embodiment of the application provides a switching method of a touch pen. The method may be used to switch an active device of a stylus between a plurality of electronic devices. In the method, the touch pen can be connected with a plurality of electronic devices, one electronic device is an active device, and the other electronic devices are inactive devices. When the touch pen executes touch input, feedback messages sent by all electronic devices can be received, if the feedback messages of a certain non-active device indicate that the feedback messages of the non-active device receive coding information of the touch pen but do not receive pressure sensing information of the touch pen, the touch pen can directly switch the non-active device into an active device, so that when a user uses the touch pen to switch among a plurality of electronic devices, the flow of switching the active device by the touch pen is simplified, the speed of switching the active device by the touch pen is improved, and the use experience of the user is improved.
Fig. 1 is a schematic view of a scenario suitable for the embodiment of the present application. Referring to fig. 1, a stylus (stylus) 100 and a plurality of electronic devices 200 (e.g., electronic device 200-1, electronic device 200-2, etc.) are included in the scene. In fig. 1, the electronic device 200 is taken as an example of a tablet pc (portable android device, PAD), which is not limited to this in practical application. The stylus 100 may provide input to the electronic device 200, and the electronic device 200 performs an operation responsive to the input based on the input of the stylus 100. In one embodiment, the stylus 100 and the electronic device 200 may be interconnected by a communication network to enable interaction of wireless signals. The communication network may be, but is not limited to: WI-FI hotspot networks, WI-FI peer-to-peer (P2P) networks, bluetooth networks, zigbee networks, or near field communication (near field communication, NFC) networks.
The stylus 100 may be, but is not limited to: inductive pens and capacitive pens. When the electronic device 200 has a touch screen 201 and the stylus 100 is an inductive pen, an electromagnetic induction board needs to be integrated on the touch screen 201 of the electronic device 200 that interacts with the stylus 100. The electromagnetic induction plate is distributed with coils, and the induction pen is also integrated with the coils. Based on the electromagnetic induction principle, in the magnetic field range generated by the electromagnetic induction plate, along with the movement of the induction pen, the induction pen can accumulate electric energy. The inductive pen can transmit the accumulated electric energy to the electromagnetic induction plate through the coil in the inductive pen through free oscillation. The electromagnetic induction plate can scan the coil on the electromagnetic induction plate based on the electric energy from the induction pen, and calculate the position of the induction pen on the touch screen 201.
The capacitive pen may include: passive capacitive pens and active capacitive pens. Passive capacitive pens may be referred to as passive capacitive pens and active capacitive pens may be referred to as active capacitive pens. The passive capacitance pen simulates the touch of a finger, and the pen tip 10 of the passive capacitance pen is made of conductive materials, such as conductive foam, metal, brush and the like. When the stylus 100 is a passive capacitive stylus, the capacitive sensing sensor needs to be integrated on the touch screen 201 of the electronic device 200 that interacts with the stylus 100. The distance between the passive capacitive pen and the touch screen 201 of the electronic device 200 is related to the capacitance value detected by the capacitive sensing sensor, and thus, the electronic device 200 may determine the distance between the passive capacitive pen and the touch screen 201 of the electronic device 200 based on the detected capacitance value. In addition, the movement of the passive capacitive pen on the touch screen 201 may cause a change in the capacitance value at the contact position of the passive capacitive pen with the touch screen 201, and thus, the electronic device 200 may determine the position of the passive capacitive pen on the touch screen 201 based on the detected capacitance value.
For example, as shown in FIG. 1, the stylus 100 may establish a connection with the electronic device 200-1, the electronic device 200-2, and so on simultaneously. When the stylus performs a touch operation on the electronic device 200-1, the stylus sets the electronic device 200-1 as an active device, so that the electronic device 200-1 can display a touch trajectory of the stylus 100 in response to the touch operation of the stylus 100. When the stylus performs a touch operation at the electronic device 200-2, the stylus switches the active device from the electronic device 200-1 to the electronic device 200-2 so that the electronic device 200-2 can respond to the touch operation of the stylus 100.
Fig. 2A and 2B are schematic structural diagrams of a stylus. Referring to fig. 2A and 2B, the stylus 100 may include a nib 10, a barrel 20, and a rear cover 30. The inside of the pen holder 20 is of a hollow structure, the pen point 10 and the rear end 30 are respectively positioned at two ends of the pen holder 20, the rear cover 30 and the pen holder 20 can be inserted or clamped, and the matching relationship between the pen point 10 and the pen holder 20 is detailed in the description of fig. 2B.
Referring to fig. 2B, the stylus 100 further includes a spindle assembly 50, the spindle assembly 50 is located in the pen holder 20, and the spindle assembly 50 is slidably disposed in the pen holder 20. Spindle assembly 50 has external threads 51 thereon and nib 10 includes writing end 11 and connecting end 12, wherein connecting end 12 of nib 10 has internal threads (not shown) that mate with external threads 51.
When the spindle assembly 50 is assembled into the barrel 20, the connecting end 12 of the nib 10 extends into the barrel 20 and is threadedly coupled with the external threads 51 of the spindle assembly 50. In some other examples, the connection between the connection end 12 of the pen tip 10 and the spindle assembly 50 may also be achieved by a removable manner, such as a snap fit. The replacement of the nib 10 is achieved by the removable connection between the connecting end 12 of the nib 10 and the spindle assembly 50.
In order to detect the pressure applied to the writing end 11 of the nib 10, referring to fig. 2A, a gap 10a is provided between the nib 10 and the barrel 20, so that when the writing end 11 of the nib 10 is subjected to an external force, the nib 10 can move towards the barrel 20, and the movement of the nib 10 drives the spindle assembly 50 to move in the barrel 20. In the detection of the external force, referring to fig. 2B, a pressure sensing assembly 60 is provided on the spindle assembly 50, and a portion of the pressure sensing assembly 60 is fixedly connected with a fixing structure in the pen holder 20, and a portion of the pressure sensing assembly 60 is fixedly connected with the spindle assembly 50. Thus, when the spindle assembly 50 moves along with the pen tip 10, since a portion of the pressure sensing assembly 60 is fixedly connected with the fixing structure in the pen holder 20, the movement of the spindle assembly 50 drives the pressure sensing assembly 60 to deform, the deformation of the pressure sensing assembly 60 is transmitted to the circuit board 70 (for example, the pressure sensing assembly 60 and the circuit board 70 can be electrically connected through a wire or a flexible circuit board), and the circuit board 70 detects the pressure of the writing end 11 of the pen tip 10 according to the deformation of the pressure sensing assembly 60, so that the thickness of the line of the writing end 11 is controlled according to the pressure of the writing end 11 of the pen tip 10.
Note that the pressure detection of the pen tip 10 includes, but is not limited to, the above method. For example, the pressure of the pen tip 10 may be detected by a pressure sensor provided in the writing end 11 of the pen tip 10.
In this embodiment, referring to fig. 2B, the stylus pen 100 further includes a plurality of electrodes, which may be, for example, a first transmitting electrode 41, a ground electrode 43, and a second transmitting electrode 42. The first emitter electrode 41, the ground electrode 43, and the second emitter electrode 42 are all electrically connected to the circuit board 70. The first transmitting electrode 41 may be located in the pen tip 10 and close to the writing end 11, and the circuit board 70 may be configured as a control board that may provide signals to the first transmitting electrode 41 and the second transmitting electrode 42, respectively, the first transmitting electrode 41 being configured to transmit a first signal, and when the first transmitting electrode 41 is close to the touch screen of the electronic device, a coupling capacitance may be formed between the first transmitting electrode 41 and the touch screen of the electronic device, so that the electronic device may receive the first signal. The second transmitting electrode 42 is configured to transmit a second signal, and the electronic device may determine the tilt angle of the stylus 100 according to the received second signal. In this embodiment, the second emitter electrode 42 may be located on the inner wall of the barrel 20. In one example, the second emitter electrode 42 may also be located on the spindle assembly 50.
The ground electrode 43 may be located between the first and second transmitting electrodes 41 and 42, or the ground electrode 43 may be located at the outer circumference of the first and second transmitting electrodes 41 and 42, the ground electrode 43 serving to reduce coupling of the first and second transmitting electrodes 41 and 42 with each other.
When the electronic device receives the first signal from the stylus 100, the capacitance value at the corresponding position of the touch screen may change. Accordingly, the electronic device may determine the location of the stylus 100 (or the tip of the stylus 100) on the touch screen based on the change in capacitance value on the touch screen. In addition, the electronic device may acquire the tilt angle of the stylus 100 using a dual-nib projection method in the tilt angle detection algorithm. The positions of the first transmitting electrode 41 and the second transmitting electrode 42 in the stylus 100 are different, so when the electronic device receives the first signal and the second signal from the stylus 100, the capacitance values at two positions on the touch screen will change. The electronic device may obtain the tilt angle of the stylus 100 by using the distance between the first emitter electrode 41 and the second emitter electrode 42 and the distance between the two positions where the capacitance value changes on the touch screen, and more detailed obtaining of the tilt angle of the stylus 100 may refer to the related description of the dual-nib projection method in the prior art.
In the embodiment of the present application, referring to fig. 2B, the stylus 100 further includes: and a battery assembly 80, the battery assembly 80 being configured to provide power to the circuit board 70.
Fig. 3A is a schematic hardware structure of a stylus according to an embodiment of the present application. Referring to fig. 3A, the stylus 100 may have a processor 110. The processor 110 may include storage and processing circuitry for supporting the operation of the stylus 100. The storage and processing circuitry may include storage devices such as non-volatile memory (e.g., flash memory or other electrically programmable read-only memory configured as a solid state drive), volatile memory (e.g., static or dynamic random access memory), and the like. Processing circuitry in the processor 110 may be used to control the operation of the stylus 100. The processing circuitry may be based on one or more microprocessors, microcontrollers, digital signal processors, baseband processors, power management units, audio chips, application specific integrated circuits, and the like.
One or more sensors may be included in the stylus 100. For example, the sensor may include a pressure sensor 120. The pressure sensor 120 may be disposed at the tip 10 of the stylus 100 (as shown in fig. 2A). Of course, the pressure sensor 120 may also be disposed in the barrel 20 of the stylus 100, such that when one end of the nib 10 of the stylus 100 is stressed, the other end of the nib 10 moves to apply force to the pressure sensor 120. In one embodiment, the processor 110 may adjust the line thickness of the stylus 100 at the point 10 writing according to the amount of pressure detected by the pressure sensor 120.
The sensors may also include inertial sensors 130. Inertial sensor 130 may include a three-axis accelerometer and a three-axis gyroscope, and/or other components for measuring motion of stylus 100, for example, a three-axis magnetometer may be included in the sensor in a nine-axis inertial sensor configuration. The sensors may also include additional sensors such as temperature sensors, ambient light sensors, light-based proximity sensors, contact sensors, magnetic sensors, pressure sensors, and/or other sensors.
Status indicators 140 such as light emitting diodes and buttons 150 may be included in the stylus 100. The status indicator 140 is used to alert the user of the status of the stylus 100. The buttons 150 may include mechanical buttons and non-mechanical buttons, and the buttons 150 may be used to collect button press information from a user.
In embodiments of the present application, one or more electrodes 160 may be included in the stylus 100, where one electrode 160 may be located at the writing end of the stylus 100 and one electrode 160 may be located within the pen tip 10.
A sensing circuit 170 may be included in the stylus 100. The sensing circuit 170 may sense capacitive coupling between the electrodes 160 and drive lines of a capacitive touch sensor panel that interacts with the stylus pen 100. The sensing circuit 170 may include an amplifier to receive the capacitance readings from the capacitive touch sensor panel, a clock to generate a demodulation signal, a phase shifter to generate a phase shifted demodulation signal, a mixer to demodulate the capacitance readings using in-phase demodulation frequency components, a mixer to demodulate the capacitance readings using quadrature demodulation frequency components, and the like. The result of the mixer demodulation may be used to determine an amplitude proportional to the capacitance so that the stylus 100 may sense contact with the capacitive touch sensor panel.
It will be appreciated that the stylus 100 may include a microphone, speaker, audio generator, vibrator, camera, data port, and other devices, as desired. A user may control the operation of the stylus 100 and the electronic device 200 interacting with the stylus 100 by providing commands with these devices and receive status information and other outputs.
The processor 110 may be used to run software on the stylus 100 that controls the operation of the stylus 100. During operation of the stylus 100, software running on the processor 110 may process sensor inputs, button inputs, and inputs from other devices to monitor movement of the stylus 100 and other user inputs. Software running on the processor 110 may detect user commands and may communicate with the electronic device 200.
To support wireless communication of the stylus 100 with the electronic device 200, the stylus 100 may include a wireless module. In fig. 3A, a bluetooth module 180 is taken as an example of the wireless module. The wireless module may also be a WI-FI hotspot module, a WI-FI point-to-point module, or the like. The bluetooth module 180 may include a radio frequency transceiver, such as a transceiver. Bluetooth module 180 may also include one or more antennas. The transceiver may transmit and/or receive wireless signals using an antenna, which may be based on the type of wireless module, bluetooth signals, wireless local area network signals, remote signals such as cellular telephone signals, near field communication signals, or other wireless signals.
The stylus 100 may also include a charging module 190, and the charging module 190 may support charging of the stylus 100 to provide power to the stylus 100.
It should be understood that the electronic device 200 in the embodiment of the present application may be referred to as a User Equipment (UE), a terminal (terminal), or the like, and for example, the electronic device 200 may be a tablet (portable android device, PAD), a personal digital assistant (personal digital assistant, PDA), a handheld device with a wireless communication function, a computing device, an in-vehicle device, or a wearable device, a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in self-driving (self-driving), a wireless terminal in remote medical (remote medical), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation security (transportation safety), a mobile terminal or a fixed terminal with a touch screen, such as a wireless terminal in smart city (smart home), or the like. The form of the terminal device in the embodiment of the present application is not specifically limited.
Fig. 3B is a schematic structural diagram of an electronic device 200 according to an embodiment of the present application. Referring to fig. 3B, the electronic device 200 may include multiple subsystems that cooperate to perform, coordinate, or monitor one or more operations or functions of the electronic device 202. Electronic device 200 includes processor 210, input surface 220, coordination engine 230, power subsystem 240, power connector 250, wireless interface 260, and display 270.
Illustratively, coordination engine 230 may be used to communicate and/or process data with other subsystems of electronic device 200; communication and/or transaction data with the stylus 100; measuring and/or obtaining an output of one or more analog or digital sensors (such as touch sensors); measuring and/or obtaining an output of one or more sensor nodes of an array of sensor nodes (such as an array of capacitive sensing nodes); receiving and locating tip and ring signals from the stylus 100; the stylus 100 or the like is positioned based on the positions of the tip signal crossing region and the ring signal crossing region.
The coordination engine 230 of the electronic device 200 includes or is otherwise communicatively coupled to a sensor layer located below or integral with the input surface 220. The coordination engine 230 utilizes the sensor layer to locate the stylus 100 on the input surface 220 and uses the techniques described herein to estimate the angular position of the stylus 100 relative to the plane of the input surface 220. In one embodiment, the input surface 220 may be referred to as a touch screen 201.
For example, the sensor layer of coordination engine 230 of electronic device 200 is a grid of capacitive sensing nodes arranged in columns and rows. More specifically, the array of column traces is arranged perpendicular to the array of row traces. The sensor layer may be separate from other layers of the electronic device, or the sensor layer may be disposed directly on another layer, such as but not limited to: display stack layers, force sensor layers, digitizer layers, polarizer layers, battery layers, structural or decorative housing layers, and the like.
The sensor layer can operate in a variety of modes. If operating in mutual capacitance mode, the column and row traces form a single capacitive sense node at each overlap point (e.g., a "vertical" mutual capacitance). If operating in self-capacitance mode, the column and row traces form two (vertically aligned) capacitive sense nodes at each overlap point. In another embodiment, if operating in a mutual capacitance mode, adjacent column traces and/or adjacent row traces may each form a single capacitive sense node (e.g., a "horizontal" mutual capacitance). As described above, the sensor layer may detect the presence of the tip 10 of the stylus 100 and/or the touch of a user's finger by monitoring the capacitance (e.g., mutual capacitance or self capacitance) change presented at each capacitive sensing node. In many cases, coordination engine 230 may be configured to detect tip and ring signals received from stylus 100 through the sensor layer via capacitive coupling.
Wherein the tip signal and/or the ring signal may include specific information and/or data that may be configured to cause the electronic device 200 to identify the stylus 100. Such information is generally referred to herein as "stylus identity" information. This information and/or data may be received by the sensor layer and interpreted, decoded, and/or demodulated by coordination engine 230.
Processor 210 may use the stylus identity information to simultaneously receive input from more than one stylus. In particular, coordination engine 230 may be configured to communicate to processor 210 the position and/or angular position of each of the number of styluses detected by coordination engine 230. In other cases, coordination engine 230 may also transmit information to processor 210 regarding the relative positions and/or relative angular positions of the plurality of styluses detected by coordination engine 230. For example, coordination engine 220 may notify processor 210 that the detected first stylus is located away from the detected second stylus.
In other cases, the end signal and/or ring signal may also include specific information and/or data for causing the electronic device 200 to identify a specific user. Such information is generally referred to herein as "user identity" information.
Coordination engine 230 may forward user identity information (if detected and/or recoverable) to processor 210. If the user identity information cannot be recovered from the tip signal and/or the ring signal, coordination engine 230 may optionally indicate to processor 210 that the user identity information is not available. Processor 210 can utilize user identity information (or the absence of such information) in any suitable manner, including but not limited to: accepting or rejecting input from a particular user, allowing or rejecting access to a particular function of the electronic device, etc. Processor 210 may use the user identity information to simultaneously receive input from more than one user.
In still other cases, the tip signal and/or the ring signal may include specific information and/or data that may be configured to cause the electronic device 200 to identify settings or preferences of the user or the stylus 100. Such information is generally referred to herein as "stylus setup" information.
Coordination engine 230 may forward the stylus setup information (if detected and/or recoverable) to processor 210. If the stylus setting information is not recoverable from the tip signal and/or the ring signal, coordination engine 230 may optionally indicate to processor 210 that the stylus setting information is not available. The electronic device 200 can utilize the stylus setting information (or the absence of the information) in any suitable manner, including but not limited to: applying settings to an electronic device, applying settings to a program running on an electronic device, changing line thickness, color, pattern presented by a graphics program of an electronic device, changing settings of a video game operating on an electronic device, and so forth.
In general, the processor 210 may be configured to perform, coordinate, and/or manage the functions of the electronic device 200. Such functions may include, but are not limited to: communication and/or transaction data with other subsystems of the electronic device 200, communication and/or transaction data with the stylus 100, data communication and/or transaction data over a wireless interface, data communication and/or transaction data over a wired interface, facilitating power exchange over a wireless (e.g., inductive, resonant, etc.) or wired interface, receiving a position and angular position of one or more styluses, etc.
Processor 210 may be implemented as any electronic device capable of processing, receiving, or transmitting data or instructions. For example, the processor may be a microprocessor, a central processing unit, an application specific integrated circuit, a field programmable gate array, a digital signal processor, an analog circuit, a digital circuit, or a combination of these devices. The processor may be a single-threaded or multi-threaded processor. The processor may be a single core or multi-core processor.
During use, processor 210 may be configured to access a memory storing instructions. The instructions may be configured to cause the processor to perform, coordinate, or monitor one or more operations or functions of the electronic device 200.
The instructions stored in the memory may be configured to control or coordinate the operation of other components of the electronic device 200, such as, but not limited to: another processor, analog or digital circuitry, a volatile or non-volatile memory module, a display, a speaker, a microphone, a rotational input device, buttons or other physical input devices, biometric sensors and/or systems, force or touch input/output components, a communication module (such as a wireless interface and/or power connector), and/or a haptic feedback device.
The memory may also store electronic data that may be used by the stylus or the processor. For example, the memory may store electronic data or content (such as media files, documents, and applications), device settings and preferences, timing signals and control signals, or data for various modules, data structures or databases, files or configurations related to detecting tip signals and/or ring signals, and so forth. The memory may be configured as any type of memory. For example, the memory may be implemented as random access memory, read only memory, flash memory, removable memory, other types of storage elements, or a combination of such devices.
The electronic device 200 also includes a power subsystem 240. The power subsystem 240 may include a battery or other power source. The power subsystem 240 may be configured to provide power to the electronic device 200. The power subsystem 240 may also be coupled to a power connector 250. The power connector 250 may be any suitable connector or port that may be configured to receive power from an external power source and/or to provide power to an external load. For example, in some embodiments, the power connector 250 may be used to recharge a battery within the power subsystem 240. In another embodiment, the power connector 250 may be used to transfer power stored (or available) within the power subsystem 240 to the stylus 100.
The electronic device 200 also includes a wireless interface 260 to facilitate electronic communications between the electronic device 200 and the stylus 100. In one embodiment, the electronic device 200 may be configured to communicate with the stylus 100 via a low energy bluetooth communication interface or a near field communication interface. In other examples, the communication interface facilitates electronic communications between the electronic device 200 and an external communication network, device, or platform.
The wireless interface 260 (whether the communication interface between the electronic device 200 and the stylus 100 or another communication interface) may be implemented as one or more wireless interfaces, bluetooth interfaces, near field communication interfaces, magnetic interfaces, universal serial bus interfaces, inductive interfaces, resonant interfaces, capacitively coupled interfaces, wi-Fi interfaces, TCP/IP interfaces, network communication interfaces, optical interfaces, acoustical interfaces, or any conventional communication interfaces.
The electronic device 200 also includes a display 270. The display 270 may be located behind the input surface 220 or may be integral therewith. A display 270 may be coupled to the processor 210. Processor 210 may present information to a user using display 270. In many cases, the processor 210 uses the display 270 to present an interface with which a user may interact. In many cases, the user manipulates the stylus 100 to interact with the interface.
It will be apparent to one skilled in the art that some of the specific details presented above with respect to the electronic device 200 may not be required to practice a particular described embodiment or equivalent thereof. Similarly, other electronic devices may include a greater number of subsystems, modules, components, etc. Some of the sub-modules may be implemented as software or hardware, where appropriate. It should be understood, therefore, that the foregoing description is not intended to be exhaustive or to limit the disclosure to the precise form described herein. On the contrary, many modifications and variations will be apparent to those of ordinary skill in the art in light of the above teachings.
The embodiment of the application is described below by taking an example that a touch pen is connected to a plurality of electronic devices, one of the electronic devices is an active device of the touch pen, and the other electronic devices are inactive devices. Connection can be established between the stylus and the electronic device through a communication network to realize interaction of wireless signals. The communication network may be, but is not limited to: WI-FI hotspot network, WI-FI point-to-point P2P network, bluetooth network, zigbee network, or near field communication NFC network.
Taking a touch pen and an electronic device as an example through a bluetooth connection, an exemplary procedure for establishing the bluetooth connection is described below, where the procedure for establishing the bluetooth connection may include the following steps S11-S13:
in step S11, when the stylus needs to be connected to the electronic device, the broadcast message is sent to the surrounding.
For example, when a stylus attached to an electronic device detects that a user has removed it from the electronic device, or when the user presses a button of the stylus, it may be determined that the user is about to use the stylus at this time, and thus a connection needs to be established with the electronic device, at which time the stylus may send a broadcast message to the surroundings. The broadcast message of the stylus may be transmitted at certain broadcast intervals. The stylus opens a radio frequency receive window for a period of time after each broadcast message is sent to receive a connection request that the electronic device may send.
In step S12, the electronic device sends a connection request message to the stylus in response to the broadcast message of the stylus.
The electronic device may monitor broadcast messages of surrounding bluetooth devices while turning on the bluetooth function. After listening for a broadcast message from the stylus, the electronic device may send a connection request message to the stylus requesting that a bluetooth connection be established with the stylus. For example: if the electronic device is not connected with the touch pen before, the electronic device can display the device information of the touch pen in a connectable device list after monitoring the broadcast message of the touch pen, and when a user clicks the device information, the electronic device sends a connection request message to the touch pen. For another example, if the electronic device was previously connected to the stylus, the electronic device may send a connection request message directly to the stylus after listening for a broadcast message from the stylus.
In step S13, the stylus transmits a connection acknowledgement message ACK to the electronic device in response to the connection request message of the electronic device. After receiving the connection request message of the electronic device, the stylus may send a connection confirmation message to the electronic device if it agrees to establish a connection with the electronic device. After receiving the connection confirmation message of the touch pen, the electronic device confirms that the Bluetooth connection with the touch pen is successfully established. The subsequent stylus and electronic device may then transmit data, such as pressure sensitive messages, feedback messages, etc., over the bluetooth connection.
In the embodiment of the application, when the user performs the touch operation by using the touch pen, the touch pen can generate the code signal matched with the code frequency and the screen parameter of the current active device, and send the pressure sensing message to the active device. The pressure sensing message can be transmitted through a communication network between the touch pen and the electronic equipment. In general, if a user switches from an active device to a certain inactive device using a stylus to perform a touch operation, a change in the state in which the active device and the inactive device receive the coded signal and the pressure-sensitive message may occur. For example: when a user uses a stylus to perform touch operation on the active device, the active device can receive a coding signal and also can receive a pressure sensing message (namely, the coding has pressure sensing); at this time, the inactive device receives neither the coding signal nor the pressure sensing signal, and when the user uses the stylus to change from the active device to a certain inactive device to perform a touch operation, the active device cannot receive the coding signal, but can still receive the pressure sensing message (i.e. there is a pressure sensing and no coding); at this time, for the inactive device, if the coding frequency and the screen parameter are the same as those of the active device, the inactive device may receive the coding signal, but cannot receive the pressure-sensitive message (i.e., there is no coding or no pressure-sensitive effect), and if the coding frequency and the screen parameter are different from those of the active device, the inactive device still cannot receive the coding signal and the pressure-sensitive message (i.e., no pressure-sensitive or no coding).
In this embodiment of the present application, each electronic device connected to the stylus includes an active device and an inactive device, and when a state of receiving a coding signal and a pressure sensing message (hereinafter referred to as a receiving state) changes, a feedback message is sent to the stylus, so as to indicate the changed state of receiving the coding signal and the pressure sensing message to the stylus. The feedback message can be transmitted through a communication network between the stylus and each electronic device. The communication network may comprise, for example: WI-FI hotspot network, WI-FI point-to-point network, bluetooth network, zigbee network, NFC network, or other near field communication network, etc.
The following describes the scenario in which the active device and the inactive device send feedback messages, respectively, in more detail:
for example: for active devices:
when the touch operation of the user using the stylus changes from the active device to the inactive device, the active device changes from a state where the active device can receive the code signal or the pressure sensing message (i.e. the code is coded with pressure sensing) to a state where the active device cannot receive the code signal, but still receives the pressure sensing message (i.e. the pressure sensing is not coded), at this time, the active device sends a first feedback message to the stylus through a communication network such as bluetooth to indicate to the stylus that the receiving state is changed to the pressure sensing is not coded through the first feedback message.
The first feedback message may be sent once or multiple times after the electronic device detects that the receiving state of the first feedback message is changed into the pressure sensing state without coding.
For example: for inactive devices:
if the coding frequency and screen parameters of the inactive device are the same as those of the active device, when the touch operation of the user using the stylus changes from the active device to the inactive device, the inactive device changes from a state where the coding signal is not received to a state where the coding signal is not received, but the pressure sensing message (i.e. the coding is not pressure-sensitive) is not received, at this time, the inactive device will send a message to the second feedback through the communication network such as bluetooth to indicate to the stylus that the receiving state of the inactive device changes to the coding is pressure-sensitive through the second feedback message.
The second feedback message may be sent once or multiple times after the electronic device detects that the receiving state of the second feedback message is changed into the coded non-pressure sensing state, which is not limited in the embodiment of the present application.
If the coding frequency and screen parameters of the inactive device are different from those of the active device, when the touch operation of the user using the stylus changes from the active device to the inactive device, the inactive device still receives neither the coding signal nor the pressure sensing signal (i.e. no pressure sensing and no coding), and thus does not send a feedback message like the stylus.
In addition, when the receiving state of the electronic device is changed from the presence of the code, the absence of the code, or the absence of the pressure, the electronic device may send a third feedback message to the stylus through a communication network such as bluetooth, so as to indicate to the stylus that the receiving state is changed to the presence of the code, the presence of the pressure, through the third feedback message.
The third feedback message may be sent once or multiple times after the electronic device detects that the receiving state of the third feedback message is changed into the coded state and the coded state has a pressure feel, which is not limited in the embodiment of the present application.
For example, referring to FIG. 4, the stylus is currently connected to four electronic devices, here denoted as electronic device 200-1, electronic device 200-2, electronic device 200-3, and electronic device 200-4, respectively, wherein electronic device 200-1 is an active device, electronic device 200-2, electronic device 200-3, and electronic device 200-4 are inactive devices, and the coding frequency and screen parameters of electronic device 200-1 and electronic device 200-2 are the same. Then, when the user switches from the electronic device 200-1 to the electronic device 200-2 to perform the touch operation using the touch pen, the electronic device 200-2 sends a second feedback message to the touch pen through a communication network such as bluetooth, and the electronic device 200-1 sends a first feedback message to the touch pen through a communication network such as bluetooth; when a user switches from the electronic device 200-1 to the electronic device 200-3 or the electronic device 200-4 using the stylus to perform a touch operation, the electronic device 200-3 and the electronic device 200-4 may not send any feedback message to the stylus, and the electronic device 200-1 may send a first feedback message to the stylus through a communication network such as bluetooth.
It will be appreciated that, due to possible differences in communication capabilities, connection quality, connection latency, task scheduling, etc. between the respective electronic devices and the stylus, when a user switches from an active device to an inactive device using the stylus to perform a touch operation, the times at which the active device and/or the inactive device send pressure-sensitive messages to the stylus may be different, and the order in which the stylus receives feedback messages from the active device and/or the inactive device may be uncertain. For example, referring to fig. 4, when a user switches from the electronic device 200-1 to the electronic device 200-2 using the stylus, the stylus may first receive a first feedback message of the electronic device 200-1 and then receive a second feedback message of the electronic device 200-2, or may first receive a second feedback message of the electronic device 200-2 and then receive a first feedback message of the electronic device 200-1.
In this embodiment of the present application, when the stylus receives the first feedback message and receives the second feedback message, the corresponding steps are executed, so as to implement switching of the active device. The steps performed by the stylus upon receiving the first feedback message and upon receiving the second feedback message are described below in connection with further figures.
Referring to fig. 5, a flowchart of a method for switching a stylus according to an embodiment of the present application includes steps executed by the stylus when receiving a second feedback message, and may specifically include the following steps S501 to S503:
in step S501, the stylus determines whether a second feedback message is received when performing a touch operation.
For example, referring to fig. 6, when the user switches from the electronic device 200-1 to the electronic device 200-2 using the stylus to perform a touch operation, the receiving state of the electronic device 200-2 may change from no-pressure sensing, no-code sensing, to code sensing, no-pressure sensing, and thus, the electronic device 200-2 may send a second feedback message to the stylus.
Some scenarios in which a user may use a stylus to switch from electronic device 200-1 to perform a touch operation on electronic device 200-2 are described below as examples.
For example: the user has two models of electronic devices, which have the same coding frequency and screen parameters, such as electronic device 200-1 and electronic device 200-2. When the user uses the stylus to perform drawing creation on the electronic device 200-1, some creation inspiration is suddenly generated and is wanted to be recorded, in this case, if the user does not want to switch out the current drawing interface, the user can use the stylus to switch to the electronic device 200-2 to perform touch operation so as to record the creation inspiration.
Also for example: the user has two identical electronic devices, such as electronic device 200-1 and electronic device 200-2. When the user uses the stylus to write on the electronic device 200-1, the electronic device 200-1 is insufficient in electric quantity and is about to be turned off, in which case, if the user does not want to interrupt writing, the user can use the stylus to switch to the electronic device to execute the touch operation, so as to continue to complete writing.
In step S502, if the second feedback message is received, the stylus determines whether the second feedback message is from an inactive device.
In one implementation, after receiving the second feedback message, the stylus may determine whether the second feedback message is from an inactive device according to a device identification of an electronic device that sent the second feedback message. The device identifier may be, for example, a bluetooth address of the electronic device, which is not limited in the embodiment of the present application.
If the device identification of the electronic device that sent the second feedback message is the same as the device identification of the active device recorded in the stylus record, the stylus determines that the second feedback message is from the active device. In this case, the stylus may determine that the touch operation is performed on the active device, and thus there is no need to switch active devices.
If the device identification of the electronic device that sent the second feedback message is different from the device identification of the active device recorded in the stylus record, the stylus determines that the second feedback message is from a non-active device.
For example, referring to FIG. 6, when a user switches from the electronic device 200-1 to the electronic device 200-2 using the stylus to perform a touch operation, the electronic device 200-2 may send a second feedback message to the stylus. Since the bluetooth address (e.g., MAC 2) of electronic device 200-2 is different from the bluetooth address (e.g., MAC 1) of the active device, the stylus may determine that the second feedback message is from an inactive device.
In step S503, if the second feedback message is from the inactive device, the inactive device is touch-controlled.
In a specific implementation, the stylus determines that the second feedback message is an inactive device, and may record the inactive device, for example, record a device identifier of the electronic device, or record other device information of the electronic device.
In addition, the stylus may also start a timer corresponding to the second feedback message. The running duration of the timer may be a preset duration, for example: 200 milliseconds (ms), 300ms, etc., which are not limiting in this embodiment. The timer runs for a corresponding period of time after being started, and stops running after overtime. For example, if the operation duration of the timer is set to 200ms, the timer stops operating after being started and operated for 200 ms.
In the embodiment of the present application, the timeout state of the timer may be used to determine whether the stylus is switched from one electronic device to another electronic device to perform a touch operation. If no switching occurs, the stylus also deletes the information previously recorded for the inactive device that sent the second feedback message after the timer expires.
Referring to fig. 7, another flowchart of a method for switching a stylus according to an embodiment of the present application includes steps executed by the stylus when receiving a first feedback message, and may specifically include the following steps S701-S705:
in step S701, when the stylus performs the touch operation, it is determined whether a first feedback message is received.
For example, referring to fig. 6, when a user switches from the electronic device 200-1 to the electronic device 200-2 using the stylus to perform a touch operation, the receiving state of the electronic device 200-1 may be changed from a pressure-sensitive coded to a pressure-sensitive non-coded, and thus, the electronic device 200-1 may send a first feedback message to the stylus.
In step S702, if the first feedback message is received, the stylus determines whether the first feedback message is from an active device.
In one implementation, after receiving the first feedback message, the stylus may determine whether the first feedback message is from an active device according to a device identification of an electronic device that sent the first feedback message. The device identifier may be, for example, a bluetooth address of the electronic device, which is not limited in the embodiment of the present application.
If the device identification of the electronic device that sent the first feedback message is the same as the device identification of the active device recorded in the stylus record, the stylus determines that the first feedback message is from the active device.
If the device identification of the electronic device that sent the first feedback message is different from the device identification of the active device recorded in the stylus record, the stylus determines that the first feedback message is from a non-active device.
For example, referring to FIG. 6, when a user switches from the electronic device 200-1 to the electronic device 200-2 using the stylus to perform a touch operation, the electronic device 200-1 may send a first feedback message to the stylus. Since the bluetooth address (e.g., MAC 1) of the electronic device 200-1 is the same as the bluetooth address (e.g., MAC 1) of the active device, the stylus may determine that the first feedback message is from the active device.
Here, since the stylus only sends the pressure sensing message to the active device, it is generally possible for the active device to feed back to the stylus that it received the pressure sensing message. That is, the first feedback message will typically only come from the active device. Thus, in some implementations, when the stylus receives the first feedback message, the first feedback message may be directly considered to be from the active device, thereby skipping step S702, and directly performing step S703.
In step S703, if the first feedback message is from the active device, the stylus determines whether the second feedback message was received.
Whether the stylus previously received the second feedback message may be whether the stylus received the second feedback message within a preset time period before the time of receiving the first feedback message. The preset time period may be the running time period of the timer set in step S503.
It can be appreciated that, since the stylus starts the timer after receiving the second feedback message, the stylus can determine whether the second feedback message is received before according to the running state of the timer. If the timer is in an operating state, the stylus is informed that the second feedback message is received. If the timer is in an inactive state, it is indicated that the stylus has not previously received the second feedback message.
In step S704, if the second feedback message is received previously, the stylus switches the electronic device that sent the second feedback message to an active device.
For example, referring to FIG. 6, if the stylus previously received a second feedback message sent by electronic device 200-2, the stylus may determine that the user is switching it to use at electronic device 200-1 to electronic device 200-2, and thus may switch the active device directly from electronic device 200-1 to electronic device 200-2.
In step S705, if the second feedback message is not received before, the stylus executes the multi-device switching procedure.
In a specific implementation, the stylus does not previously receive the second feedback message, which may at least include the following reasons:
the first reason is: the user uses the stylus to switch from the active device to the inactive device to perform a touch operation, but the frequency of coding and screen parameters of this inactive device are different from those of the active device. In this scenario, the inactive device is still in a pressureless, code-free state, and therefore does not send a second feedback message to the stylus. For example, referring to fig. 8, the coding frequency and screen parameters of the electronic device 200-3 and the electronic device 200-4 are different from those of the electronic device 200-1, and thus, if the user performs a touch operation on the electronic device 200-3 or the electronic device 200-4 using the stylus, the electronic device 200-3 or the electronic device 200-4 does not send the second feedback message to the stylus. Thus, the stylus will only receive the first feedback message sent by the electronic device 200-1.
Some scenarios in which a user may use a stylus to switch from electronic device 200-1 to electronic device 200-3 or to perform a touch operation on electronic device 200-4 are described below as examples.
For example: the user has two different types of electronic devices, which have different coding frequencies and screen parameters, such as a large-sized electronic device 200-1 and a small-sized electronic device 200-3. When the user uses the stylus to perform drawing creation on the electronic device 200-1, some creation inspiration is generated and is wanted to be recorded, in which case if the user does not want to switch out the current drawing interface, the user can use the stylus to switch to the electronic device 200-3 to perform touch operation so as to record the creation inspiration.
Also for example: the user has two different types of electronic devices, which have different coding frequencies and screen parameters, such as a large-sized electronic device 200-1 and a small-sized electronic device 200-3. When the user uses the stylus to write on the electronic device 200-1, the user suddenly wants to write while tracing the drama, and then plays the television drama on the electronic device 200-1, and switches the writing work to continue on the electronic device 200-3. In this case, the user may switch from the electronic device 200-1 to the electronic device 200-3 using the stylus to perform a touch operation.
The second reason is: the user uses the stylus to switch from the active device to the inactive device to perform a touch operation, and the coding frequency and screen parameters of this inactive device are the same as those of the active device. In this scenario, the receiving state of the inactive device changes from the no-pressure-sensing no-coding state to the coded no-pressure-sensing state, and thus a second feedback message is sent to the stylus, but the stylus does not receive the second feedback message before the first feedback message is received. For example, referring to fig. 6, if a user performs a touch operation on the electronic device 200-2 using a stylus, the electronic device 200-1 may send a first feedback message to the stylus, the electronic device 200-2 may send a second feedback message to the stylus, and if the first feedback message of the electronic device 200-1 is received by the stylus first, it means that the stylus did not receive the second feedback message first.
For a third reason, the user uses the stylus to switch from the active device to the inactive device to perform a touch operation, and the coding frequency and screen parameters of this inactive device are the same as those of the active device. In this scenario, the receiving state of the inactive device changes from the no-pressure-sensing no-coding state to the coded no-pressure-sensing state, and thus a second feedback message is sent to the stylus. However, although the stylus receives the second feedback message first, the time interval between the receipt of the second feedback message and the receipt of the first feedback message by the stylus exceeds a preset duration, resulting in the timer having stopped running when the stylus receives the first feedback message. At this point, the stylus may also consider that the second feedback message was not previously received.
In addition to the three reasons described above, the stylus may not have previously received a second feedback message for some other reason, such as: hardware faults, software faults, communication faults and the like occur in the electronic equipment or the touch pen, and the embodiment of the application is not repeated.
According to the technical scheme, when the stylus receives the first feedback message of the active device, whether the second feedback message of the inactive device is received or not is judged, if the second feedback message is received, it can be determined that the user switches the stylus from the active device to the inactive device which sends the second feedback message to execute touch operation, and therefore the inactive device which sends the second feedback message is switched to the active device. Therefore, the touch pen does not need to send pressure sensing information to all electronic devices, so that the flow of switching the active devices by the touch pen is simplified, the time delay of switching the active devices by the touch pen is reduced, and the use experience of a user is improved.
Fig. 9 is a schematic diagram of a multi-device handover procedure according to an embodiment of the present application.
Referring to fig. 9, in one embodiment, the multi-device handoff procedure may include two sub-procedures, such as: the multi-device switching sub-process and the judging sub-process are performed simultaneously. The touch control pen generates coding signals according to different coding frequencies and screen parameters in turn by executing a multi-device switching sub-flow, and sends pressure sensing information to the electronic devices corresponding to the coding frequencies and the screen parameters. Meanwhile, the stylus also judges whether the feedback message is received or not by executing the judging sub-flow, judges whether the multi-device switching flow is ended or not according to the type and the source of the feedback message, and realizes the switching of the active devices.
In one implementation, the stylus may start two processes in the system, where one process executes the multi-device switching sub-process and the other process executes the judging sub-process, so that parallel execution of the multi-device switching sub-process and the judging sub-process is realized, and the processes are not interfered with each other.
Referring to fig. 9, in one embodiment, the multi-device switching sub-flow may include a loop of steps S901-S903:
In step S901, in each cycle, the stylus selects a set of coding frequency and screen parameter from the multiple sets of coding frequency and screen parameter recorded by the stylus, and generates a corresponding coding signal.
In this embodiment of the present application, after the connection between the stylus and the plurality of electronic devices is established, the coding frequency and screen parameters of each electronic device are recorded. In each cycle, the stylus can select the coding frequency and the screen parameter from a plurality of groups of coding frequencies and screen parameters recorded by the stylus according to a certain sequence, and generate corresponding coding signals.
In one implementation, the stylus may record the coding frequency and the screen parameters of each electronic device in sequence according to the connection sequence of the plurality of electronic devices. When the coding frequency and the screen parameters of a plurality of electronic devices are the same, the stylus can record the coding frequency and the screen parameters only once. In the circulation process, the touch pen sequentially selects each group of coding frequency and screen parameters according to the sequence of recording the coding frequency and the screen parameters, and generates corresponding coding signals.
For example: the stylus currently records three sets of code frequency and screen parameters, here denoted record 1, record 2 and record 3 for ease of description. Wherein: record 1 corresponds to electronic device 200-1 and electronic device 200-2, record 2 corresponds to electronic device 200-3, record 3 corresponds to electronic device 200-4, electronic device 200-1 is an active device, and electronic device 200-2, electronic device 200-3, and electronic device 200-4 are inactive devices.
Then, in the first cycle, the stylus may generate a coding signal from record 1; in the second cycle, the stylus may generate a coding signal from record 2; in a third cycle, the stylus may generate a coding signal from record 3.
In step S902, the stylus sends a pressure-sensitive message to the electronic device corresponding to the selected coding frequency and screen parameter.
It should be noted here that, in each cycle, the stylus only sends the pressure-sensitive message to the electronic device corresponding to the selected coding frequency and screen parameter, instead of sending the pressure-sensitive message to all the electronic devices connected thereto. And, because the stylus selects different coding frequencies and screen parameters in turn during the cycling process. Therefore, as the number of cycles proceeds, the stylus rotates to send pressure-sensitive messages to each of the electronic devices to which it is connected.
In one implementation, if the stylus selects the coding frequency and screen parameters of an active device in a certain cycle and a certain inactive device also uses the same coding frequency and screen parameters, the stylus will only send a pressure-sensitive message to the active device and will not send coding information to this inactive device. The reason for this embodiment of the present application is that: since the coding frequency and screen parameters of the inactive device are the same as those of the active device, if the stylus performs a touch operation on the inactive device, the inactive device actively transmits a second feedback message to the stylus, so that the stylus can determine whether to switch the inactive device to the active device by performing steps S1001-S1003.
For example: in the first cycle, the stylus generates a coding signal according to record 1, and can send a pressure sensing message to the electronic device 200-1; in the second cycle, the stylus generates a coding signal according to record 2, and can send a pressure sensing message to the electronic device 200-3; in a third cycle, the stylus generates a coded signal from record 3 and may send a pressure-sensitive message to electronic device 200-4.
In step S903, the stylus determines whether a multi-device switching process is in progress. If the multi-device switching process is in progress, the process goes to step S901 to start the next cycle. If the multi-device switching process has ended, the loop is stopped.
In the embodiment of the present application, the stylus pen may end the multi-device switching flow under the condition of determining which electronic device is to be switched to the active device, so that steps S901-S903 stop cycling.
As further shown in fig. 9, in one implementation, the determination sub-process may include the following steps S1001-S1003:
in step S1001, the stylus determines whether the second feedback message or the third feedback message is received.
For example, referring to FIG. 6, when a user switches from the electronic device 200-1 to the electronic device 200-2 using a stylus to perform a touch operation, the electronic device 200-1 may send a first feedback message to the stylus and the electronic device 200-2 may send a second feedback message to the stylus. If the stylus receives the first feedback message, the multi-device switching process is started, and thus, the stylus receives the second feedback message of the electronic device 200-2 during the multi-device switching process.
In a specific implementation, the stylus receives the third feedback message, at least in the following scenario: in the process that a user uses a stylus to switch from an active device to a certain inactive device to perform touch operation, the stylus rotates to send a pressure sensing message to the electronic devices, and the pressure sensing message is set to coding frequency and screen parameters of the electronic devices in turn. Therefore, the stylus actually switches the receiving state of the past inactive device from no pressure sensing, no coding, to coded pressure sensing, and thus a third feedback message is sent to the stylus. In addition, due to the influence of the synchronicity of the pressure sensing message and the code printing information, the receiving state of the inactive equipment in the past actually switched by the user can be changed into the code printing without pressure sensing, and then the receiving state is changed into the code printing with pressure sensing, so that the second feedback message is sent to the touch pen first, and then the third feedback message is sent.
For example, referring to fig. 10, when a user switches from the electronic device 200-1 to the electronic device 200-4 using the stylus to perform a touch operation, if the currently selected code frequency and screen parameter of the stylus are the same as those of the electronic device 200-4 and the stylus also transmits a pressure-sensitive message to the electronic device 200-4, the receiving state of the electronic device 200-4 changes from no pressure-sensitive no code to coded pressure-sensitive, and thus a third feedback message is transmitted to the stylus.
In step S1002, if the second feedback message or the third feedback message is received, the electronic device that the touch record sends the second feedback message or the third feedback message ends the multi-device switching process.
In a specific implementation, if the stylus receives the second feedback message, the stylus may record which electronic device sent the second feedback message, and end the multi-device switching procedure. If the third feedback message is received, the stylus records which electronic device sent the third feedback message, and ends the multi-device switching flow.
For example, referring to fig. 6, if the stylus receives the second feedback message sent by the electronic device 200-2, the electronic device 200-2 may be recorded, and the multi-device switching procedure may be ended.
For another example, referring to fig. 10, if the stylus receives the second feedback message or the third feedback message sent by the electronic device 200-4, the electronic device 200-4 may be recorded, and the multi-device switching process may be ended.
In step S1003, the stylus switches the electronic device that sent the second feedback message or the third feedback message to an active device.
For example, referring to FIG. 6, if the second feedback message is from electronic device 200-2, the stylus may determine that the user is switching it to use at electronic device 200-1 to electronic device 200-2, and thus may switch the active device from electronic device 200-1 to electronic device 200-2.
It will be appreciated that when a user switches from the electronic device 200-1 to the electronic device 200-2 using the stylus, if the stylus receives the first feedback message sent by the electronic device 200-1 first, the second feedback message sent by the electronic device 200-2 will also be received quickly, that is, the time interval between the receipt of the first feedback message and the receipt of the second feedback message will be generally short. This is because the second feedback message is likely to have been generated when the stylus receives the first feedback message, but the first feedback message is received first and then the second feedback message is received due to the different order of reception. Therefore, according to the method provided by the embodiment of the application, after the touch pen receives the second feedback message, the electronic device sending the second feedback message is switched to the active device, so that the switching time delay can be shortened, and the speed of switching the active device by the touch pen can be improved.
For another example, referring to FIG. 10, if the third feedback message is from electronic device 200-4, the stylus may determine that the user is switching it to use at electronic device 200-1 to electronic device 200-4, and thus may switch the active device from electronic device 200-1 to electronic device 200-4.
According to the technical scheme, in the multi-device switching sub-process, the touch pen can distinguish different electronic devices according to different coding frequencies and screen parameters, each group of coding frequencies and screen parameters are switched in turn to generate coding signals, and only the electronic devices corresponding to the group of coding frequencies and screen parameters switched to by the touch pen are sent with pressure sensing messages, and then the switching of active devices is completed according to feedback messages of the electronic devices. Therefore, the touch pen does not need to send pressure sensing information to all electronic devices, so that signaling overhead in the switching process of the active devices is reduced, the speed of switching the active devices by the touch pen is improved, power consumption is reduced, and the use experience of a user is improved.
It will be apparent to those skilled in the art from this description that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the embodiments provided in the present application, the schemes of the switching method of the stylus provided in the present application are described from the perspective of the stylus itself and the interaction between the stylus and the electronic device. It will be appreciated that the stylus, in order to implement the above-described functions, includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
Fig. 11 is a schematic structural diagram of a switching device of a stylus according to an embodiment of the present application. As shown in fig. 11, the switching device of the stylus may include: a transceiver 1101, a memory 1102, and a processor 1103.
In some embodiments, the processor 1103 may include one or more processing units, such as: the processor 1103 may include an application processor, a modem processor, a controller, a digital signal processor, a baseband processor, and/or a neural network processor, etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors. A memory 1102 is coupled to the processor 1103 for storing various software programs and/or sets of instructions. In some embodiments, memory 1102 may include volatile memory and/or nonvolatile memory. The transceiver 1101 may include, for example, a radio frequency circuit, a mobile communication module, a wireless communication module, a bluetooth communication module, etc., for implementing a wireless communication function of the stylus.
In one embodiment, the software program and/or sets of instructions in the memory 1102, when executed by the processor 1103, cause the stylus to perform the method steps of: judging whether a first feedback message is received or not; the first feedback message is sent when the electronic equipment receives the coding signal and the state of the pressure sensing message is changed and the coding signal cannot be received, but the pressure sensing message can be received; if the first feedback message is received, judging whether the first feedback message is from the active equipment or not; if the first feedback message comes from the active equipment, judging whether a second feedback message sent by the inactive equipment is received before; the second feedback message is sent when the electronic equipment receives the code signal and the pressure sensing message, and the state of the second feedback message is changed to be capable of receiving the code signal but incapable of receiving the pressure sensing message; and if the second feedback message sent by the inactive equipment is received previously, switching the electronic equipment sending the second feedback message to the active equipment.
According to the technical scheme, the stylus receives the second feedback message sent by the non-active device before receiving the first feedback message of the active device after receiving the second feedback message, the coding frequency and screen parameters of the non-active device can be determined to be the same as those of the active device, and the user is switching from the active device to the non-active device by using the stylus to execute touch operation. Thus, the stylus may directly switch this inactive device to an active device. Therefore, the touch pen does not need to send pressure information to each electronic device, so that the flow of switching the active device by the touch pen is simplified, the time delay of switching the active device by the touch pen is reduced, and the use experience of a user is improved.
In one embodiment, the software program and/or sets of instructions in the memory 1102, when executed by the processor 1103, further cause the stylus to perform the method steps of: judging whether a second feedback message is received or not; if the second feedback message is received, judging whether the second feedback message is from the inactive equipment; if the second feedback message is from the inactive device, a timer is started, the timer is used for running a preset time period after starting, and then the running is stopped. In this way, the stylus can preset a duration through the timer, and when the stylus receives the first feedback message, the stylus can judge whether the second feedback message sent by the inactive device is received in the preset duration according to the running state of the timer.
In one embodiment, the software program and/or sets of instructions in the memory 1102, when executed by the processor 1103, cause the stylus to perform the method steps of: judging whether a timer is running or not; determining that a second feedback message sent by the inactive device was previously received if a timer is running; if the timer is not running, it is determined that a second feedback message sent by the inactive device was not previously received.
In one embodiment, the software program and/or sets of instructions in the memory 1102, when executed by the processor 1103, further cause the stylus to perform the method steps of: if the second feedback message sent by the inactive equipment is not received before, executing a multi-equipment switching flow; the multi-device switching process includes cyclically executing the steps of: selecting a group of coding frequency and screen parameters from the recorded multiple groups of coding frequency and screen parameters according to a preset sequence to generate corresponding coding signals; and sending a pressure sensing message to the electronic equipment corresponding to the selected coding frequency and screen parameters. In this way, the stylus can distinguish different electronic devices according to different coding frequencies and screen parameters, each group of coding frequencies and screen parameters are switched in turn to generate coding signals, and only the pressure sensing information is sent to the electronic devices corresponding to the group of coding frequencies and screen parameters to which the stylus is switched, and the pressure sensing information is not needed to be sent to all the electronic devices, so that signaling cost in the switching process of the active devices is reduced, the speed of switching the active devices by the stylus is improved, the power consumption is reduced, and the use experience of users is improved.
In one embodiment, the software program and/or sets of instructions in the memory 1102, when executed by the processor 1103, further cause the stylus to perform the method steps of: judging whether a second feedback message is received or not; if the second feedback message is received, the multi-device switching process is exited; and switching the electronic device sending the second feedback message to the active device. The stylus, if receiving the second feedback message, may determine that the coding frequency and screen parameters of the inactive device are the same as the active device and that the user is using the stylus to switch from the active device to perform a touch operation on the inactive device. Therefore, the stylus can directly switch the inactive device to the active device, thereby simplifying the flow of switching the active device by the stylus.
In one embodiment, the software program and/or sets of instructions in the memory 1102, when executed by the processor 1103, further cause the stylus to perform the method steps of: judging whether a third feedback message is received; the third feedback message is sent when the electronic equipment receives the code signal and the pressure sensing message, and the state of the third feedback message changes to be capable of receiving the code signal and the pressure sensing message; if a third feedback message is received, exiting the multi-device switching process; and switching the electronic device sending the third feedback message to an active device. If the touch control pen receives the third feedback information, the currently selected coding frequency and screen parameters of the touch control pen can be determined to be the same as the coding frequency and screen parameters of the electronic equipment switched by the user, so that the electronic equipment of the third feedback information can be directly switched to the active equipment, and the flow of switching the active equipment by the touch control pen is simplified.
In one embodiment, the software program and/or sets of instructions in the memory 1102, when executed by the processor 1103, further cause the stylus to perform the method steps of: judging whether a multi-device switching process is in progress or not; if the multi-device switching process is in progress, executing the next round of circulation; if the multi-device switching process has exited, the loop is stopped.
In one embodiment, the software program and/or sets of instructions in the memory 1102, when executed by the processor 1103, cause the stylus to perform the method steps of: and if the coding frequency and the screen parameter selected by the touch control pen are the same as those of the active device, only sending a pressure sensing message to the active device. Since the coding frequency and screen parameters of the inactive device and the active device are the same, if the stylus performs a touch operation on the inactive device, the inactive device actively transmits a second feedback message to the stylus, so that it is not necessary to transmit a pressure sensing message to the inactive device, thereby reducing signaling overhead of the stylus.
In one embodiment, the software program and/or sets of instructions in the memory 1102, when executed by the processor 1103, cause the stylus to perform the method steps of: judging whether the device identifier of the electronic device sending the first feedback message is the same as the device identifier of the active device recorded by the touch pen; if so, determining that the first feedback message is from the active device; if not, it is determined that the first feedback message is from an inactive device.
In one embodiment, the software program and/or sets of instructions in the memory 1102, when executed by the processor 1103, cause the stylus to perform the method steps of: judging whether the device identifier of the electronic device sending the second feedback message is the same as the device identifier of the active device recorded by the touch pen; if so, determining that the second feedback message is from the active device; if not, it is determined that the second feedback message is from an inactive device.
In one embodiment, the software program and/or sets of instructions in the memory 1102, when executed by the processor 1103, further cause the stylus to perform the method steps of: recording device information of the inactive device which transmits the second feedback message when the timer is started; when the timer stops running, the recorded device information is deleted.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a specific embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. A switching method of a stylus, characterized in that the switching method is applied to the stylus to switch active devices among a plurality of electronic devices connected with the stylus; the plurality of electronic devices comprise one active device, and the rest are inactive devices; when a user uses the touch pen to execute touch operation, the touch pen is used for generating a code signal at a pen point according to code frequency and screen parameters of the active equipment and sending a pressure sensing message to the active equipment through a communication network; the method comprises the following steps:
the touch control pen judges whether a first feedback message is received or not; the first feedback message is sent when the electronic equipment receives the coding signal and the pressure sensing message, and the state of the electronic equipment changes to a state that the coding signal cannot be received, but the pressure sensing message can be received;
if the first feedback message is received, the touch control pen judges whether the first feedback message is from active equipment or not;
If the first feedback message comes from the active equipment, the stylus judges whether a second feedback message sent by the inactive equipment is received before; the second feedback message is sent when the electronic equipment receives the code signal and the pressure sensing message, and the state of the second feedback message changes to be capable of receiving the code signal but incapable of receiving the pressure sensing message;
if the second feedback message sent by the inactive equipment is received in advance, the stylus switches the electronic equipment sending the second feedback message into the active equipment;
if the second feedback message sent by the inactive equipment is not received before, the stylus executes a multi-equipment switching flow; the multi-device switching process includes the steps of:
the touch control pen selects a group of target coding frequency and target screen parameters from a plurality of groups of coding frequency and screen parameters recorded by the touch control pen according to a preset sequence, generates corresponding coding signals, and sends pressure sensing information to electronic equipment corresponding to the target coding frequency and the target screen parameters; if the target coding frequency and the target screen parameter are the same as the coding frequency and the screen parameter of the active equipment, only sending a pressure sensing message to the active equipment, and not sending the pressure sensing message to the non-active equipment corresponding to the target coding frequency and the target screen parameter;
The touch control pen judges whether the second feedback message is received or not;
and if the second feedback message is received, the touch control pen switches the electronic equipment sending the second feedback message into an active equipment.
2. The method as recited in claim 1, further comprising:
the touch control pen judges whether the second feedback message is received or not;
if the second feedback message is received, the stylus judges whether the second feedback message is from inactive equipment;
and if the second feedback message is from the inactive equipment, the stylus starts a timer, and the timer is used for running for a preset time period after starting, and then stopping running.
3. The method of claim 2, wherein the stylus determining whether a second feedback message sent by an inactive device was previously received comprises:
the stylus judges whether the timer is running or not;
if the timer is running, the stylus determines that the second feedback message sent by the inactive device is received previously;
if the timer is not running, the stylus determines that the second feedback message sent by the inactive device was not previously received.
4. The method of claim 1, wherein the multi-device handoff procedure further comprises the steps of:
the touch control pen judges whether a third feedback message is received or not; the third feedback message is sent when the electronic equipment receives the code signal and the pressure sensing message, and the state of the third feedback message changes to be capable of receiving the code signal and the pressure sensing message;
if the third feedback message is received, the stylus exits the multi-device switching process;
the stylus switches the electronic device that sent the third feedback message to an active device.
5. The method according to claim 1 or 4, wherein after the stylus sends the pressure-sensitive message to the electronic device corresponding to the selected coding frequency and screen parameter, the method further comprises:
the touch pen judges whether the multi-device switching process is in progress or not;
if the multi-device switching process is in progress, the stylus executes the next round of the cycle;
and if the multi-device switching process has been exited, stopping the circulation by the stylus.
6. The method of claim 1, wherein the stylus determining whether the first feedback message is from an active device comprises:
The touch pen judges whether the equipment identifier of the electronic equipment sending the first feedback message is the same as the equipment identifier of the active equipment;
if so, the stylus determines that the first feedback message is from an active device;
if not, the stylus determines that the first feedback message is from an inactive device.
7. The method of claim 1, wherein the stylus determining whether the second feedback message is from an active device comprises:
the touch pen judges whether the equipment identifier of the electronic equipment sending the second feedback message is the same as the equipment identifier of the active equipment;
if so, the stylus determines that the second feedback message is from an active device;
if not, the stylus determines that the second feedback message is from an inactive device.
8. The method as recited in claim 2, further comprising:
when the touch control pen starts the timer, recording the equipment information of the inactive equipment which sends the second feedback message;
and deleting the recorded equipment information when the touch pen stops running by the timer.
9. An input device, comprising: a memory, one or more processors; the memory is coupled to the one or more processors, the memory for storing computer program code, the computer program code comprising computer instructions; the one or more processors are to invoke the computer instructions to cause the input device to implement the method of switching a stylus of any one of claims 1-8.
CN202210148170.9A 2022-02-18 2022-02-18 Touch pen switching method and input device Active CN114217700B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210148170.9A CN114217700B (en) 2022-02-18 2022-02-18 Touch pen switching method and input device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210148170.9A CN114217700B (en) 2022-02-18 2022-02-18 Touch pen switching method and input device

Publications (2)

Publication Number Publication Date
CN114217700A CN114217700A (en) 2022-03-22
CN114217700B true CN114217700B (en) 2023-05-12

Family

ID=80709290

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210148170.9A Active CN114217700B (en) 2022-02-18 2022-02-18 Touch pen switching method and input device

Country Status (1)

Country Link
CN (1) CN114217700B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115525176B (en) * 2022-04-01 2023-07-25 荣耀终端有限公司 Data transmission method, touch pen and storage medium
CN115113747B (en) * 2022-08-22 2023-04-07 荣耀终端有限公司 Touch pen using method and system and touch pen

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486340A (en) * 2020-11-27 2021-03-12 维沃移动通信有限公司 Touch pen and coding signal control method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9417754B2 (en) * 2011-08-05 2016-08-16 P4tents1, LLC User interface system, method, and computer program product
US9632597B2 (en) * 2014-06-12 2017-04-25 Amazon Technologies, Inc. Configurable active stylus devices
CN110708424B (en) * 2019-09-27 2021-05-11 北京字节跳动网络技术有限公司 Information presentation method and device and electronic equipment
CN111580690B (en) * 2020-04-28 2023-09-08 深圳市千分一智能技术有限公司 Touch pen mode switching method and device, touch pen and readable storage medium
CN111930253B (en) * 2020-09-14 2021-03-05 深圳市汇顶科技股份有限公司 Wireless communication method, active pen, touch screen, electronic device and communication system
CN112558797B (en) * 2021-02-19 2021-07-06 深圳市千分一智能技术有限公司 Active pen, control method and device thereof, and computer-readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486340A (en) * 2020-11-27 2021-03-12 维沃移动通信有限公司 Touch pen and coding signal control method

Also Published As

Publication number Publication date
CN114217700A (en) 2022-03-22

Similar Documents

Publication Publication Date Title
CN113220154B (en) Control method and system of refresh rate and electronic equipment
CN114217700B (en) Touch pen switching method and input device
CN113490158B (en) Bluetooth device pairing connection method, electronic device, Bluetooth device and terminal system
EP4116804B1 (en) Stylus pen and electronic device assembly comprising the stylus pen
CN114461129B (en) Handwriting drawing method and device, electronic equipment and readable storage medium
CN114465366B (en) Wireless charging method and electronic equipment
EP4274317A1 (en) Method for reducing power consumption of device, and electronic device
CN114911364B (en) Control method, touch pen and touch system
CN113810884B (en) Electronic equipment connection method, electronic equipment and medium
CN116088695B (en) System upgrading method and related device
CN114461092B (en) Touch pen connection method and electronic equipment
CN115543105B (en) Information transmission method and device
CN115599229B (en) Control method of touch pen and touch pen equipment
EP4206885A1 (en) Functional mode switching method, electronic device, and system
CN116736989A (en) Touch pen and control method thereof

Legal Events

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