WO2022247638A1 - Method for controlling connection of stylus, and electronic device - Google Patents

Method for controlling connection of stylus, and electronic device Download PDF

Info

Publication number
WO2022247638A1
WO2022247638A1 PCT/CN2022/092249 CN2022092249W WO2022247638A1 WO 2022247638 A1 WO2022247638 A1 WO 2022247638A1 CN 2022092249 W CN2022092249 W CN 2022092249W WO 2022247638 A1 WO2022247638 A1 WO 2022247638A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
stylus
wireless connection
screen projection
connection
Prior art date
Application number
PCT/CN2022/092249
Other languages
French (fr)
Chinese (zh)
Inventor
罗诚
段潇潇
刘开罩
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022247638A1 publication Critical patent/WO2022247638A1/en

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/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • 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/0416Control or interface arrangements specially adapted for digitisers
    • G06F3/04162Control or interface arrangements specially adapted for digitisers for exchanging data with external devices, e.g. smart pens, via the digitiser sensing hardware
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections

Definitions

  • the present application relates to the technical field of terminals, and in particular to a connection control method of a stylus and an electronic device.
  • a stylus can support connecting to one electronic device or support connecting to multiple electronic devices at the same time.
  • the stylus When the stylus is used with the electronic device for the first time, it must be paired. After the pairing is successful, the user can use the stylus on the electronic device normally. At present, users must manually pair the stylus with the electronic device. If the stylus is used in various screen projection scenarios, the user needs to manually manage the connection and disconnection of the stylus, which makes the operation cumbersome. The operation process for the user to use the stylus is increased, and the user experience is reduced.
  • the present application provides a connection control method of a stylus and an electronic device, which are used to reduce the operation process when the user uses the stylus and improve user experience.
  • the first aspect provides a method for controlling the connection of a stylus, the method is applied to a first electronic device, the stylus establishes a first wireless connection with a second electronic device, and the first wireless connection is used to implement universal Business data transmission; the method includes: the first electronic device receives a screen projection request sent by the second electronic device; the first electronic device responds to the screen projection request and displays the screen projection of the second electronic device Screen projection interface: the first electronic device automatically establishes the first wireless connection with the stylus.
  • the first electronic device before automatically establishing the first wireless connection with the stylus, the first electronic device further includes:
  • the first electronic device If the first electronic device is not paired with the stylus, the first electronic device first performs pairing with the stylus, and then performs the establishment of the first wireless connection with the stylus and/or, if the first electronic device is paired with the stylus, directly execute the establishment of the first wireless connection between the first electronic device and the stylus.
  • the first electronic device after the first electronic device automatically establishes the first wireless connection with the stylus, it further includes: the first electronic device records wireless connection establishment information, and the wireless connection establishment The information is used to indicate that the first wireless connection between itself and the stylus is triggered by a screen projection operation.
  • the first electronic device automatically establishes the first wireless connection with the stylus, including: The device acquires the physical address of the stylus, and establishes the first wireless connection with the stylus.
  • the screen projection request includes the physical address of the stylus.
  • the first electronic device further includes: the first electronic device receives the screen projection sent by the second electronic device Disconnect instruction; the first electronic device stops displaying the screen projection interface of the second electronic device in response to the screen projection disconnection instruction; the first electronic device inquires the first wireless connection between itself and the stylus The first wireless connection is automatically disconnected from the stylus by being triggered by the screen projection operation.
  • the querying that the establishment of the first wireless connection between itself and the stylus is triggered by a screen projection operation includes: the first electronic device establishes information according to the recorded wireless connection, It is found out that the first wireless connection between itself and the stylus is triggered by a screen projection operation.
  • the automatically disconnecting the first wireless connection with the stylus includes: the first electronic device obtains from the second electronic device according to the screen projection disconnection process. The physical address of the stylus is automatically disconnected from the first wireless connection with the stylus.
  • the screen projection disconnection instruction includes the physical address of the stylus.
  • the stylus establishes a second wireless connection with the second electronic device, and the second wireless connection is used to realize human-computer interaction service data transmission;
  • the method further includes: disconnecting the second wireless connection between the stylus and the second electronic device by the first electronic device Afterwards, the second wireless connection is automatically established with the stylus.
  • the first wireless connection is a general attribute protocol GATT connection.
  • the second wireless connection is a GATT-based HOGP connection.
  • the second aspect provides a connection control method of a stylus, the method is applied to a first electronic device, the stylus establishes a first wireless connection with a second electronic device, and the first wireless connection is used to realize universal Business data transmission; the method includes: the first electronic device sends a screen projection request to the second electronic device to display its own screen projection interface on the second electronic device; the first electronic device receiving a successful screen projection message returned by the second electronic device; and automatically establishing the first wireless connection with the stylus by the first electronic device.
  • the first electronic device before the first electronic device automatically establishes the first wireless connection with the stylus, it further includes: if the first electronic device is not paired with the stylus, the The first electronic device performs pairing with the stylus first, and then performs the establishment of the first wireless connection with the stylus; and/or, if the first electronic device is paired with the stylus already paired, directly perform establishment of the first wireless connection between the first electronic device and the stylus.
  • the first electronic device after the first electronic device automatically establishes the first wireless connection with the stylus, it further includes: the first electronic device records wireless connection establishment information, and the wireless connection establishment The information is used to indicate that the first wireless connection between itself and the stylus is triggered by a screen projection operation.
  • the first electronic device automatically establishes the first wireless connection with the stylus, including: The device acquires the physical address of the stylus, and automatically establishes the first wireless connection with the stylus.
  • the screen casting success message includes the physical address of the stylus.
  • the first electronic device after the first electronic device automatically establishes the first wireless connection with the stylus, it further includes: the first electronic device sends a screen projection message to the second electronic device. open instruction, so that its own screen projection interface stops displaying on the second electronic device; the first electronic device receives the screen projection disconnection success message returned by the second electronic device; the first electronic device queries The first wireless connection between itself and the stylus is established by being triggered by the screen projection operation, and the first wireless connection with the stylus is automatically disconnected.
  • the inquiring that the establishment of the first wireless connection between itself and the stylus is triggered by a screen projection operation includes:
  • the first electronic device finds out that the first wireless connection between itself and the stylus is triggered by a screen projection operation.
  • the automatically disconnecting the first wireless connection with the stylus includes: the first electronic device obtains from the second electronic device according to the screen projection disconnection process. The physical address of the stylus is automatically disconnected from the first wireless connection with the stylus.
  • the screen projection disconnection success message includes the physical address of the stylus.
  • the stylus establishes a second wireless connection with the second electronic device, and the second wireless connection is used to realize human-computer interaction service data transmission;
  • the method further includes: after the first electronic device disconnects the second wireless connection between the stylus and the second electronic device , automatically establishing the second wireless connection with the stylus.
  • the first wireless connection is a GATT connection.
  • the second wireless connection is a HOGP connection.
  • the third aspect provides a first electronic device, the stylus establishes a first wireless connection with the second electronic device, and the first wireless connection is used to realize general service data transmission;
  • the first electronic device comprises: a display screen; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more A computer program includes an instruction, and when the instruction is executed by the first electronic device, the first electronic device executes the connection control method of the stylus in the first aspect or any possible implementation manner of the first aspect.
  • the fourth aspect provides a first electronic device, the stylus establishes a first wireless connection with the second electronic device, and the first wireless connection is used to realize general service data transmission;
  • the first electronic device comprises: a display screen; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more A computer program includes an instruction.
  • the instruction executes the connection control method of the stylus in the second aspect or any possible implementation manner of the second aspect.
  • a fifth aspect provides a computer-readable storage medium, the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the first aspect or the first A method for controlling the connection of a stylus in any possible implementation of the aspect, or controlling the device where the computer-readable storage medium is located when the program is running to execute the second aspect or handwriting in any possible implementation of the second aspect Pen connection control method.
  • a sixth aspect provides a computer program product containing instructions, when the computer program product runs on a computer or any at least one processor, the computer executes the first aspect or any possibility of the first aspect.
  • the stylus establishes a first wireless connection with the second electronic device, and the first electronic device responds to the screen projection request sent by the second electronic device and displays the screen projection of the second electronic device. screen interface, the first electronic device automatically establishes a first wireless connection with the stylus, without the need for the user to manually manage the connection between the first electronic device and the stylus, thereby reducing the user's operating procedures for using the stylus and improving user experience.
  • Fig. 1 is a schematic structural diagram of a stylus communication system in some embodiments
  • Fig. 2 is a schematic diagram of the hardware structure of an electronic device in some embodiments
  • Figure 3 is a block diagram of the software structure of the stylus and electronic equipment in some embodiments.
  • Fig. 4 is a schematic diagram of screen projection in some embodiments.
  • 5a to 5d are schematic diagrams of establishing a first wireless connection and a second wireless connection between a stylus and an electronic device in some embodiments;
  • Fig. 5e is a schematic diagram of disconnecting the first wireless connection between the stylus and the electronic device in some embodiments
  • Fig. 6a is a flowchart of a connection control method of a stylus in some embodiments
  • Fig. 6b is a flowchart of a method for pairing a first electronic device with a stylus and establishing a first wireless connection in some embodiments
  • Fig. 6c is a flowchart of a connection control method of a stylus in other embodiments.
  • Fig. 6d is a schematic flowchart of a method for establishing a HOGP connection between a stylus and an electronic device in some embodiments
  • Fig. 7a is a flowchart of a connection control method of a stylus in some other embodiments.
  • Fig. 7b is a flowchart of a connection control method of a stylus in some other embodiments.
  • 8a to 8d are schematic diagrams of establishing a first wireless connection and a second wireless connection between a stylus and an electronic device in other embodiments;
  • Fig. 8e is a schematic diagram of disconnecting the first wireless connection between the stylus and the electronic device in some other embodiments
  • Fig. 9a is a flowchart of a connection control method of a stylus in some other embodiments.
  • Fig. 9b is a flowchart of a connection control method of a stylus in other embodiments.
  • Fig. 10a is a flowchart of a connection control method of a stylus in other embodiments.
  • Fig. 10b is a flowchart of a connection control method of a stylus in some other embodiments.
  • FIG. 1 is a schematic structural diagram of a stylus communication system in some embodiments.
  • the system includes: a stylus 200 and at least two electronic devices, and pairing can be performed between the stylus 200 and each electronic device. And the stylus 200 can maintain the first wireless connection with multiple electronic devices at the same time.
  • the stylus 200 and the electronic device can be paired through Bluetooth (BT for short), Near Field Communication (NFC for short) or USB-C interface.
  • BT Bluetooth
  • NFC Near Field Communication
  • USB-C interface USB-C interface
  • FIG. 1 shows the application scenario of "one-stroke multi-connection".
  • the "one-stroke multi-connection" technology means that a stylus 200 can be connected to multiple electronic devices at the same time, and can be connected between multiple electronic devices. Switch operations freely. Any appropriate standard can be complied with between the stylus 200 and the electronic device, for example, Huawei Pen Protocol (Huawei Pen Protocol, HPP for short) 3.x, HPP 3.x is a fusion protocol, including the compatibility scheme of HPP2.x.
  • the electronic device is a device with a touch screen.
  • electronic devices include but are not limited to carrying or devices with other operating systems.
  • Electronic devices include but are not limited to mobile phones, tablet computers, laptops, desktop computers, smart screens, etc.
  • the stylus 200 maintains the first wireless connection with the mobile phone 100a, the notebook computer 100b, the tablet computer 100c and the mobile phone 100d at the same time, and can be freely connected between the mobile phone 100a, the notebook computer 100b, the tablet computer 100c and the mobile phone 100d. Toggle action.
  • the stylus can include an active stylus or a passive stylus.
  • the stylus 200 may be an active stylus.
  • the active stylus is an active capacitive stylus, and the active capacitive stylus can emit a voltage driving signal to change the electric field at the touch point of the touch screen, thereby changing the electrode at the touch point.
  • Capacitance the control chip of the touch screen can determine the position of the touch point by detecting the change of the electrode capacitance.
  • the active stylus can also use an active electromagnetic stylus, which can emit an electromagnetic drive signal to change the magnetic flux at the touch point of the touch screen.
  • the control chip can determine the position of the touch point through the change of the magnetic flux.
  • a pressure sensor is usually added to the tip of the pen, so that different strokes under different strengths can be realized to simulate real human handwriting.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193 , a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors. Wherein, the controller can generate an operation control signal according to the instruction operation code and the timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input and output
  • subscriber identity module subscriber identity module
  • SIM subscriber identity module
  • USB universal serial bus
  • the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be disposed in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G/6G applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is passed to the application processor after being processed by the baseband processor.
  • the application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 .
  • the modem processor may be a stand-alone device. In some other embodiments, the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless fidelity, Wi-Fi) network), bluetooth (Bluetooth, BT), global navigation satellite, etc. System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (long term evolution, LTE), 5G and subsequent evolution standards, BT , GNSS, WLAN, NFC, FM, and/or IR technologies, etc.
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • code division multiple access code division multiple access
  • CDMA broadband Code division multiple access
  • WCDMA wideband code division multiple access
  • TD-SCDMA time-division code division multiple access
  • LTE long term evolution
  • 5G and subsequent evolution standards BT , GN
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou satellite navigation system (Beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou satellite navigation system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute instructions to generate or alter display information.
  • the electronic device 101 may realize the shooting function through an ISP, one or more cameras 193 , a video codec, a GPU, one or more display screens 194 , and an application processor.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
  • the internal memory 121 may be used to store computer-executable program codes including instructions.
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
  • the storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
  • the touch sensor 180K is also called "touch device”.
  • the touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
  • the SIM card interface 195 is used for connecting a SIM card.
  • the SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards may be the same or different.
  • the SIM card interface 195 is also compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as calling and data communication.
  • the electronic device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
  • a software structural block diagram of the stylus 200 and the electronic device 100 is provided.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
  • the system of the electronic device 100 is divided into three layers, which are application program layer, service layer, and driver layer from top to bottom.
  • the application program layer can include a series of application program packages, and the application programs can include collaborative office applications and screen projection applications
  • the service layer can include stylus management services, screen projection management services, and short-distance communication management services
  • driver The layer may include a touch screen (Touch Panel, TP for short) driver, a Human Interface Device (Human Interface Device, HID for short) driver, and a short-range communication driver.
  • the short-range communication management service may include Bluetooth management service, NFC management service, Wi-Fi management service, etc.
  • the short-range communication driver may include Bluetooth driver, NFC driver, Wi-Fi driver, etc.
  • the system of the stylus 200 is divided into three layers, which are application program layer, service layer, and driver layer from top to bottom.
  • the application layer may include a series of application packages
  • the application layer may include a host-side communication agent
  • the service layer may include touch management and connection management
  • the driver layer may include a pen driver.
  • stylus 200 includes, but is not limited to or devices with other operating systems.
  • the stylus 200 carries For example, Hongmeng lightweight system, electronic equipment 100 equipped with
  • the multiple electronic devices 100 can also perform screen projection operations.
  • the source (Source) end device can cast the screen projection interface to the destination (Sink) end device through wired or wireless means, wherein, the source end device is the central device for screen projection, and the destination end device is the projected device. screen device.
  • the source device is a first electronic device
  • the destination device is a second electronic device
  • the first electronic device projects a screen to the second electronic device.
  • the source device is the second electronic device
  • the destination device is the first electronic device
  • the second electronic device projects a screen to the first electronic device.
  • the mobile phone when the first electronic device is a mobile phone and the second electronic device is a tablet computer or when the second electronic device is a mobile phone and the first electronic device is a tablet computer, the mobile phone will project the screen projection interface to the tablet computer, so that the The content displayed on the screen projection interface of the mobile phone is displayed on the computer.
  • the mobile phone when the first electronic device is a mobile phone and the second electronic device is a notebook computer, or when the second electronic device is a mobile phone and the first electronic device is a notebook computer, the mobile phone will cast the screen projection interface to the notebook computer to display the screen on the tablet computer.
  • the tablet computer will project screen to the laptop, so that the content displayed on the screen projection of the tablet can be displayed on the laptop.
  • screen projection can be implemented between the first electronic device and the second electronic device through a homologous screen projection technology or a heterogeneous screen projection technology. If the first electronic device and the second electronic device use the same-source screen projection technology to perform screen projection, the first electronic device and the second electronic device synchronously display the screen projection content. If the heterogenous screen projection technology is used between the first electronic device and the second electronic device for screen projection, the first electronic device and the second electronic device may display the screen projection content asynchronously.
  • the first electronic device projects the screen to the second electronic device through the same-source screen projection technology.
  • the screen projection interface of the first electronic device displayed on the second electronic device is the display interface of the first electronic device.
  • the display interface of the first electronic device is a display interface of a video application
  • the collaborative window of the second electronic device also displays the display interface of the video application
  • the first electronic device exits the video application and displays the main interface then the second electronic device
  • the collaboration window of the second electronic device also displays the main interface of the first electronic device.
  • the first electronic device projects a screen to the second electronic device through a heterogeneous screen projection technology.
  • the first electronic device currently displays the display interface of the video application, and the first electronic device projects the display interface of the video application to the second electronic device, so that the collaborative window of the second electronic device displays the display interface of the video application.
  • the screen projection interface of the first electronic device is the display interface of the video application; then, the first electronic device switches the video application to run in the background, and the main interface or other application display interfaces are displayed in the foreground, while the collaboration window of the second electronic device can still
  • the display interface of the video application is displayed, that is, the first electronic device and the second electronic device are displayed asynchronously.
  • FIG. 4 shows an application scenario in which the second electronic device 300 projects the screen projection interface to the first electronic device 400.
  • the second electronic device 300 is a mobile phone
  • the first electronic device 400 is a tablet computer.
  • the screen projection interface of the second electronic device 300 includes a status bar 301 and a menu bar 302 .
  • the status column 301 includes signal status, network status, power supply, current geographic location, current time and local weather.
  • the signal status is a full signal, indicating that the current signal is strong;
  • the network status includes Wi-Fi network and Bluetooth network;
  • the black part of the power supply can indicate the remaining power of the electronic device;
  • the current geographical location is Tianjin; the current time is 4 Saturday, March 17th, the sixth day of March in the Xin Chou Year, 08:08; the weather in Tianjin is cloudy and the temperature is 8°C.
  • the menu bar 302 includes icons of at least one application program, for example, the and Gallery, along with Phone, Messages, Settings, and Camera on the lower row.
  • the positions of the icon of the application program and the name of the corresponding application program may be adjusted according to the preference of the user, which is not limited in this embodiment of the present application.
  • the screen projection interface of the first electronic device 400 includes icons of at least one application program, for example, setting, camera and gallery.
  • the positions of the icon of the application program and the name of the corresponding application program can be adjusted according to the preference of the user, which is not limited in this embodiment of the present application.
  • a wireless connection is established between the second electronic device 300 and the first electronic device 400, for example, the second electronic device 300 and the first electronic device 400 can share a touch transmission (Huawei Share OneHop) between the second electronic device 300 and the first electronic device 400.
  • a touch transmission Huawei Share OneHop
  • the second electronic device 300 will cast the screen projection interface to the first electronic device 400
  • the first electronic device 400 will display the collaboration window 500 generated by the second electronic device 300 on the first electronic device 400.
  • the window 500 includes the screen projection interface of the second electronic device 300 , so as to realize the function of "multi-screen collaboration". Exemplarily, as shown in FIG.
  • a top title bar is provided above the screen projection interface of the second electronic device 300 in the collaboration window 500, and the top title bar includes the device name of the second electronic device 300 "HUAWEI Mate 40Pro". " and a plurality of function buttons, for example, the plurality of function buttons are a minimize button, a maximize button, and a close button in turn; a function bar at the bottom is also provided below the screen projection interface of the second electronic device 300 in the collaborative window 500, and the bottom
  • the function bar includes a back key, a main desktop key and a menu key. The back key is used to return to the previous level, the main desktop key is used to return to the main desktop, and the menu key is used to display multiple background applications.
  • an electronic device serving as a source device may simultaneously project a screen to multiple other electronic devices serving as destination devices. This situation is not specifically drawn.
  • the embodiments of the present application provide a connection control method of the stylus and an electronic device.
  • the stylus establishes the first wireless connection with the second electronic device, and the first electronic device displays the screen projection interface of the second electronic device in response to receiving the screen projection request sent by the second electronic device, then The first electronic device automatically establishes the first wireless connection with the stylus, and the user does not need to manually manage the connection between the first electronic device and the stylus, thereby reducing the operation process for the user to use the stylus and improving user experience.
  • the first electronic device stops displaying the screen projection interface of the second electronic device in response to receiving the screen projection disconnection instruction sent by the second electronic device, and then the first electronic device inquires about the screen projection interface between itself and the stylus.
  • the first wireless connection is triggered by the screen projection operation and is automatically disconnected from the first wireless connection with the stylus, without the need for the user to manually manage the disconnection of the first electronic device from the stylus, thereby reducing the user's operations with the stylus flow, improving the user experience.
  • FIG. 5a to FIG. 5d provide schematic diagrams of establishing a first wireless connection and a second wireless connection between a stylus and an electronic device.
  • 5a to 5d show the stylus 200, the second electronic device 300 and the first electronic device 400, for example, the second electronic device 300 is a mobile phone, and the first electronic device 400 is a tablet computer.
  • the first wireless connection is used to realize the transmission of general business data.
  • the general business data may include business data such as the attributes of the stylus and screen parameters;
  • the second wireless connection is used to realize the transmission of human-computer interaction business data.
  • the human-computer interaction business data may include business data such as attributes of the stylus, screen parameters, and pressure data of the stylus.
  • a first wireless connection needs to be established between the stylus 200 and the second electronic device 300 .
  • the second electronic device 300 and the stylus 200 may establish a first wireless connection through a short-range communication technology, and the short-range communication technology may include but not limited to Bluetooth, Wi-Fi or NFC.
  • the second electronic device 300 and the stylus 200 may establish a first wireless connection through Bluetooth.
  • the established first wireless connection may be a Generic Attribute Profile (GATT) connection.
  • GATT Generic Attribute Profile
  • GATT is a general specification for sending and receiving very short data segments over a Bluetooth connection. It should be noted that: in the embodiment of the present application, the first wireless connection is a GATT connection as an example for description.
  • the second electronic device 300 needs to perform pairing with the stylus 200, specifically, the second electronic device 300 and the stylus
  • the pen 200 can be paired via Bluetooth, NFC or USB-C interface. Then, the second electronic device 300 performs establishment of a GATT connection with the stylus 200 .
  • the stylus 200 can establish a second wireless connection with the second electronic device 300, and the user can use the stylus 200 to touch on the second electronic device 300.
  • the second wireless connection is a GATT-based Human-Machine Interface Device Protocol (HID Over GATT Protocol, HOGP for short) connection.
  • the second wireless connection is an HOGP connection as an example to describe.
  • the GATT connection can support the transmission of business data such as stylus attributes and screen parameters, but does not support the transmission of stylus pressure data;
  • the HOGP connection can support stylus attributes, screen parameters, and stylus pressure data and other business data transmission.
  • the first electronic device 400 and the second electronic device 300 perform a screen projection operation, and the screen projection operation is successful.
  • the second electronic device 300 casts the screen projection interface to the first electronic device 400
  • the first electronic device 400 displays the collaboration window 500 generated on the first electronic device 400 by the second electronic device 300 projection.
  • the collaboration window 500 includes a screen projection interface of the second electronic device 300 to realize the "multi-screen collaboration" function.
  • the screen projection interface is the main interface of the second electronic device 300 .
  • the content of the collaboration window 500 changes accordingly with the user's operations on the second electronic device 300.
  • the content displayed on the second electronic device 300 changes from the main interface to the handwriting interface in FIG. 5a, and the collaboration window 500 in FIG. 5b displays The content of is also changed to the handwriting interface in Fig. 5a, which is not specifically drawn in this case.
  • the first electronic device 400 displays the screen projection interface of the second electronic device 300 , indicating that the screen projection operation is successful, and the first electronic device 400 automatically establishes a first wireless connection with the stylus 200 .
  • the first electronic device 400 and the stylus 200 can automatically establish a first wireless connection through short-range communication technology, which may include but not limited to Bluetooth, Wi-Fi or NFC.
  • the first electronic device 400 and the stylus 200 may automatically establish a first wireless connection through Bluetooth, and at this time, the established first wireless connection may be a GATT connection.
  • the first electronic device 400 inquires whether a GATT connection has been established with the stylus 200.
  • a GATT connection has been established with the stylus 200, it indicates that the first electronic device 400 has already established a GATT connection with the stylus 200 before screen projection. Establish a GATT connection; if it is found out that the GATT connection with the stylus 200 has not been established, the GATT connection with the stylus 200 can be directly established.
  • the first electronic device 400 needs to perform pairing with the stylus 200, for example, the first electronic device 400 can pass Bluetooth or NFC performs pairing with the stylus 200, thereby realizing automatic pairing between the first electronic device 100 and the stylus 200, without manual operation by the user, and improving user experience.
  • the first electronic device 400 pops up a prompt box, and the user clicks the "Connect” button in the prompt box to express agreement to establish a GATT connection, and then the second An electronic device 400 establishes a GATT connection with the stylus 200 .
  • the user clicks “cancel” in the prompt box it means that the establishment of the GATT connection is not agreed, and the establishment of the GATT connection between the first electronic device 400 and the stylus 200 fails.
  • the first electronic device 400 can automatically establish a second wireless connection with the stylus 200, and the user can use the stylus 200 on the first electronic
  • a touch operation is performed on the device 400, for example, the second wireless connection is a HOGP connection.
  • the stylus 200 disconnects the HOGP connection established between the second electronic device 300 and automatically establishes a HOGP connection with the first electronic device 400 , so that the user can use the stylus 200 to perform a touch operation on the first electronic device 400 .
  • the first electronic device 400 displays a handwriting interface, and the user can use the stylus 200 to perform writing operations on the handwriting interface, for example, write "Huawei" on the handwriting interface.
  • FIG. 5e provides a schematic diagram of disconnecting the first wireless connection between the stylus and the electronic device.
  • the device 400 After executing the process of establishing the first wireless connection between the stylus and the electronic device shown in FIGS.
  • the device 400 has established a GATT connection with the stylus 200 .
  • the first electronic device 400 and the second electronic device 300 perform screen projection disconnection, and the screen projection disconnection is successful.
  • the second electronic device 300 sends a screen projection disconnection command to the first electronic device 400, so that the first electronic device 400 stops displaying the screen projection interface of the second electronic device 300.
  • the collaboration window 500 is displayed, and the communication channel established when the first electronic device 400 and the second electronic device 300 project screens is disconnected.
  • the GATT connection between the first electronic device 400 and the stylus 200 is triggered by the screen projection operation, when the screen projection between the first electronic device 400 and the second electronic device 300 is disconnected, the first electronic device The device 400 disconnects the GATT connection with the stylus 200 automatically. However, since the GATT connection between the second electronic device 300 and the stylus 200 is not triggered by the screen projection operation, the GATT connection between the second electronic device 300 and the stylus 200 is not affected by the disconnection of the screen projection. The second electronic device 300 and the stylus 200 still maintain the GATT connection.
  • the stylus 200 can establish a HOGP connection with the second electronic device 300, so that the user can use the stylus 200 to perform touch operations on the second electronic device 300. For example, as shown in FIG. The electronic device 300 clicks the gallery icon.
  • the GATT connection between the first electronic device 400 and the stylus 200 is not established in response to the trigger of the screen projection operation, the GATT connection between the first electronic device 400 and the stylus 200 will not be disconnected by the screen projection.
  • the first electronic device 400 and the stylus 200 still maintain a GATT connection, and the user can continue to use the stylus 200 to perform touch operations on the first electronic device 400, which is not specifically shown.
  • the connection life cycle between the stylus 200 and the first electronic device 400 is consistent with the screen projection cycle. That is: during the screen projection process, the stylus 200 maintains a GATT connection with both the first electronic device 400 and the second electronic device 300, and the stylus 200 can freely switch between touch operations on the first electronic device 400 and the second electronic device 300 ; When the projection screen is disconnected, the stylus 200 is disconnected from the GATT connection with the first electronic device 400, and the touch operation cannot be performed on the first electronic device 400, but because the GATT connection between the stylus 200 and the second electronic device 300 is not controlled The GATT connection is not affected by the disconnection of the screen projection, so the stylus 200 can continue to maintain the GATT connection with the second electronic device 300, and can perform touch operations on the second electronic device 300 . Thereby, the management of the connection life cycle between the stylus and the electronic device is realized.
  • Figure 6a is a flow chart of the connection control method of the stylus in some embodiments, the workflow shown in Figure 6a can be used to implement the connection control method of the stylus shown in Figure 5a to Figure 5c, as shown in Figure 6a, the method include:
  • Step 102 the second electronic device establishes a first wireless connection with the stylus.
  • the second electronic device 300 establishes a first wireless connection with the stylus 200 through Bluetooth, Wi-Fi or NFC.
  • the first wireless connection is a GATT connection.
  • step 102 it may further include: step 100 , the second electronic device 300 executes pairing with the stylus 200 . Then, the second electronic device 300 executes the establishment of the first wireless connection with the stylus 200 , that is, executes step 102 .
  • the user may further include: the second electronic device 300 establishes a second wireless connection with the stylus 200, for example, the second wireless The connection is a HOGP connection.
  • Step 104 the second electronic device establishes a communication channel with the first electronic device.
  • the second electronic device and the first electronic device can transmit data during screen projection through the communication channel.
  • Step 106 the second electronic device sends a screen projection request to the first electronic device, and the screen projection request includes the physical address of the stylus.
  • the physical address of the stylus is used to uniquely identify a stylus and can be used to ensure the uniqueness of the stylus.
  • the physical address of the stylus includes a Media Access Control (MAC) address of the stylus, for example, a Bluetooth MAC address.
  • MAC Media Access Control
  • the second electronic device sends the physical address of the stylus to the first electronic device through a screen projection request, so that the first electronic device performs the screen projection operation with the second electronic device
  • the physical address of the stylus is obtained from the second electronic device.
  • the second electronic device may also send the physical address of the stylus to the first electronic device separately, for example, after the second electronic device sends the first electronic device After the screen projection request, the second electronic device sends the physical address of the stylus to the first electronic device.
  • the screen projection request includes screen projection parameters, and the screen projection parameters include one or more of screen projection resolution, transmission code rate, encoding compression rate, or key frame interval time.
  • Step 108 the first electronic device displays the screen projection interface of the second electronic device in response to the screen projection request.
  • the first electronic device 400 analyzes the screen projection parameters, and after determining that it has the ability to accept the screen projection of the second electronic device 300, accepts the screen projection request and displays the screen projection interface of the second electronic device 300, Thus the projection is successful.
  • step 110 the first electronic device returns a successful screen projection message to the second electronic device.
  • Step 112 the first electronic device automatically establishes a first wireless connection with the stylus according to the physical address of the stylus.
  • FIG. 6b provides a flowchart of a method for pairing a first electronic device with a stylus and establishing a first wireless connection in some embodiments, wherein the first electronic device and the stylus can be connected via Bluetooth Low Energy (Bluetooth Low Energy) , referred to as BLE) technology for the first wireless connection.
  • step 112 may specifically include:
  • Step 1122 the first electronic device receives the broadcast packet (Adv) broadcast by the stylus.
  • Step 1124 the first electronic device sends a connection request (Page Request) to the stylus according to the physical address of the stylus.
  • Page Request a connection request
  • Step 1126 the stylus returns a connection response (Page Response) to the first electronic device.
  • Step 1128 the stylus sends a Connection Establish message to the first electronic device.
  • step 112 before step 112, it also includes: the first electronic device inquires whether it has been paired with the stylus, if it has been paired with the stylus, then directly execute step 112; if it is not paired with the stylus, then first execute step 111 . The first electronic device executes pairing with the stylus, and then executes step 112 after the pairing is successful.
  • the first electronic device may store paired device information, and the paired device information may include the name and type of the paired device, for example, the name of the paired device is "HUAWEI PEN", and the type is a stylus. Then in step 112, the first electronic device can query whether the name and type of the stylus are included in the paired device information, if so, it indicates that the first electronic device and the stylus have been paired, and directly executes step 112; if not, it indicates If the first electronic device is not paired with the stylus, step 111 is performed first, and step 112 is performed after the pairing is successful.
  • step 111 may specifically include:
  • Step 1112 the first electronic device sends a pairing request (Pairing Request) to the stylus according to the physical address of the stylus.
  • Step 1114 the stylus returns a pairing response (Pairing Response) to the first electronic device.
  • Step 1116 the stylus sends a pairing message based on the Secure Manager Protocol (SMP for short) to the first electronic device.
  • SMP Secure Manager Protocol
  • the SMP-based pairing message is a "Paring Over SMP" message.
  • the embodiment of the present application realizes the automatic pairing between the first electronic device and the stylus without manual operation by the user, thus improving the user experience.
  • the first electronic device if it finds out that it has been paired with the stylus, it can continue to perform the following steps: the first electronic device inquires whether the first wireless connection has been established with the stylus, and if it finds out that the first wireless connection with the stylus has not been established If there is a wireless connection, directly execute step 112; if it is found out that the first wireless connection has been established with the stylus, it is not necessary to continue to execute step 112.
  • the first electronic device may store connected device information, and the connected device information may include the name and type of the connected device, for example, the name of the connected device is "HUAWEI PEN", and the type is a stylus. Then the first electronic device can inquire whether the connected device information includes the name and type of the stylus, if not, it indicates that the first electronic device and the stylus have not established the first wireless connection, and directly executes step 112; if so, it indicates If the first electronic device has established the first wireless connection with the stylus, then step 112 does not need to be performed again.
  • the connected device information may include the name and type of the connected device, for example, the name of the connected device is "HUAWEI PEN", and the type is a stylus.
  • Step 114 the first electronic device records wireless connection establishment information, and the wireless connection establishment information is used to indicate that the first wireless connection between the first electronic device and the stylus is established by being triggered by a screen projection operation.
  • the wireless connection establishment information may be used to indicate whether the first wireless connection between the first electronic device and the stylus is established by being triggered by a screen projection operation.
  • step 112 the first electronic device automatically establishes a first wireless connection with the stylus, and the wireless connection establishment information recorded by the first electronic device in step 114 is used to indicate that the first wireless connection between the first electronic device and the stylus Created by triggering screen operations.
  • the wireless connection is established
  • the information is used to indicate that the establishment of the first wireless connection between the first electronic device and the stylus is not triggered by the screen projection operation.
  • the electronic device may include a screen projection management service unit and a stylus management service unit.
  • FIG. 6c provides a flow chart of the connection control method of the stylus in other embodiments.
  • the workflow shown in FIG. 6c can be used to implement the connection control method of the stylus shown in FIG. 5a to FIG. 5c, as As shown in Figure 6c, the method includes:
  • Step 202 the stylus management service unit of the second electronic device establishes a first wireless connection with the stylus connection management unit.
  • step 200 the stylus management service unit of the second electronic device performs pairing with the connection management unit of the stylus. Then, the stylus management service unit of the second electronic device executes the establishment of the first wireless connection with the connection management unit of the stylus, that is, executes step 202 .
  • step 202 it may further include: the stylus management service unit of the second electronic device establishes a HOGP connection with the stylus connection management unit.
  • Step 204 the screen projection management service unit of the second electronic device establishes a communication channel with the screen projection management service unit of the first electronic device.
  • Step 206 the screen projection management service unit of the second electronic device sends a screen projection request to the screen projection management service unit of the first electronic device, where the screen projection request includes the physical address of the stylus.
  • Step 208 The screen projection management service unit of the first electronic device displays the screen projection interface of the second electronic device in response to the screen projection request.
  • Step 210 the screen projection management service unit of the first electronic device returns a screen projection success message to the screen projection management service unit of the second electronic device.
  • Step 212 The screen projection management service unit of the first electronic device sends a stylus connection establishment notification to the stylus management service unit of the first electronic device, and the stylus connection establishment notification includes the physical address of the stylus.
  • Step 214 The stylus management service unit of the first electronic device automatically establishes a first wireless connection with the stylus connection management unit according to the physical address of the stylus.
  • step 214 it also includes: the stylus management service unit of the first electronic device inquires whether it has been paired with the stylus, if it has been paired with the stylus, then directly execute step 214; if it is not paired with the stylus , the following steps are performed first: the stylus management service unit of the first electronic device performs pairing with the stylus connection management unit, and then step 214 is performed after the pairing is successful.
  • the stylus management service unit of the first electronic device if it inquires that the stylus has been paired, it may continue to perform the following steps: the stylus management service unit of the first electronic device inquires whether the first wireless communication with the stylus has been established. connection, if it is found that the first wireless connection has not been established with the stylus, directly execute step 214;
  • Step 216 the stylus management service unit of the first electronic device records wireless connection establishment information, the wireless connection establishment information is used to indicate that the first wireless connection between the first electronic device and the stylus is triggered by the screen projection operation.
  • this embodiment realizes the establishment of the first wireless connection between the first electronic device 400 and the stylus 200 as shown in FIG. 5c.
  • both the first electronic device 400 and the second electronic device 300 establish a first wireless connection with the stylus 200 .
  • the stylus 200 needs to perform a touch operation on the electronic device, it needs to establish a second wireless connection with the electronic device, for example, the second wireless connection is a HOGP connection.
  • the stylus 200 can freely switch between the first electronic device 400 and the second electronic device 300 by establishing a HOGP connection.
  • Fig. 6d is a schematic flowchart of a method for establishing a HOGP connection between a stylus and an electronic device in some embodiments. Taking the establishment of a HOGP connection between the stylus 200 and the first electronic device 400 as an example for description, as shown in FIG. 6d, the method includes:
  • step 302 the stylus and the first electronic device perform a process of establishing a GATT connection. If the GATT connection is established successfully, then step 304 is performed; if the GATT connection fails to be established, the process ends.
  • Step 304 touch the screen of the first electronic device with the stylus to read the screen parameters of the first electronic device.
  • the screen parameters of the first electronic device are read out, and the screen parameters may include screen type and/or coding frequency points, etc., for example, the screen type may include embedded ( in cell) or embedded (on cell), coded frequency points are used to indicate that frequency hopping is required when there is interference.
  • Step 306 the stylus determines a first working mode according to the screen parameters of the first electronic device, and the first working mode is a working mode between the stylus and the first electronic device.
  • the stylus determines that the first working mode is the HPP 3.x mode according to the screen type and the coding frequency. That is: the first working mode is the HPP 3.x mode, that is, the stylus is connected to the first electronic device in the HPP 3.x mode.
  • Step 308 the stylus checks whether a HOGP connection has been established with other electronic devices, if yes, execute step 310 ; if not, execute step 318 .
  • the other electronic device may be the second electronic device, or the other electronic device may be an electronic device other than the first electronic device and the second electronic device.
  • Step 310 the stylus disconnects the HOGP connection with other electronic devices.
  • step 310 is performed, and the stylus disconnects the HOGP connection with the second electronic device.
  • Step 312 the stylus establishes a HOGP connection with the first electronic device.
  • Step 314 the stylus judges whether the first working mode is the same as the second working mode, the second working mode is the working mode of the stylus and other electronic devices, if yes, the process ends; if not, go to step 316 .
  • the stylus when the second working mode is HPP 3.x mode, the stylus is connected to the other electronic device in HPP 3.x mode; or, when the second working mode is HPP 2.x mode, the stylus is connected to the other electronic device Connect in HPP 2.x mode.
  • a stylus cannot be connected with the first electronic device in HPP 3.x mode, and at the same time be connected with other electronic devices in HPP 2.x mode. Therefore, for the same stylus, when the first working mode and the second working mode are different, for example, when the first working mode is HPP 3.x mode and the second working mode is HPP 2.x mode, if the stylus and the second working mode An electronic device connected in HPP 3.x mode cannot be connected with other electronic devices in HPP 2.x mode.
  • the first working mode is HPP 3.x mode
  • the second working mode is HPP 3.x mode, indicating that the stylus is connected to the first electronic device in HPP 3.x mode, and can also be connected to other electronic devices in the HPP 3.x mode.
  • HPP 3.x mode there is no need to disconnect the GATT connection between the stylus and other electronic devices, and the stylus maintains a GATT connection with other electronic devices.
  • the first working mode is HPP 3.x mode and the second working mode is HPP 2.x mode
  • the stylus is connected to the first electronic device in HPP 3.x mode, but it cannot be connected to other electronic devices at the same time
  • HPP 2.x mode the stylus is disconnected from other electronic devices through GATT.
  • Step 316 the stylus and other electronic devices disconnect the GATT connection, and the process ends.
  • Step 318 the stylus establishes a HOGP connection with the first electronic device, and the process ends.
  • the stylus After the stylus establishes a HOGP connection with the first electronic device, the stylus can perform a touch operation on the first electronic device.
  • Fig. 7a is a flow chart of a method for controlling the connection of a stylus in other embodiments.
  • the workflow shown in Fig. 7a can be used to implement the method for controlling the connection of a stylus shown in Fig. 5e.
  • the method includes:
  • Step 402 the first electronic device receives a screen projection disconnection command sent by the second electronic device, and the screen projection disconnection command includes the physical address of the stylus.
  • the physical address of the stylus includes a MAC address of the stylus, for example, a Bluetooth MAC address.
  • the second electronic device sends the physical address of the stylus to the first electronic device through the screen projection disconnection command, so that the first electronic device obtains the stylus from the second electronic device during the screen projection disconnection process with the second electronic device physical address.
  • Step 404 the first electronic device stops displaying the screen projection interface of the second electronic device in response to the screen projection disconnection instruction.
  • the first electronic device 400 no longer displays the screen projection interface of the second electronic device 300 .
  • Step 406 the first electronic device returns a screen projection disconnection success message to the second electronic device.
  • Step 408 the first electronic device finds out that the first wireless connection between itself and the stylus is triggered by the screen projection operation.
  • Step 410 the first electronic device automatically disconnects the first wireless connection with the stylus according to the physical address of the stylus.
  • step 408 the first electronic device inquires whether the first wireless connection between itself and the stylus is triggered by a screen projection operation; if it is found that the first wireless connection between itself and the stylus is triggered by a screen projection operation If the first wireless connection between itself and the stylus is not triggered by the screen projection operation, step 410 is not performed, and the first electronic device maintains the first wireless connection with the stylus. connect.
  • the first electronic device inquires whether the first wireless connection between itself and the stylus is triggered by a screen projection operation.
  • step 408 Before inquiring in step 408 whether the first wireless connection between itself and the stylus is triggered by the screen projection operation, it also includes: the first electronic device inquires whether it is in the state of establishing the first wireless connection with the stylus, if , then execute step 408; if no, it indicates that the first electronic device disconnects the first wireless connection with the stylus, then step 408 and step 410 may not be executed again.
  • this embodiment realizes disconnection of the first wireless connection between the first electronic device 400 and the stylus 200 as shown in FIG. 5e.
  • FIG. 7b provides a flow chart of the connection control method of the stylus in other embodiments.
  • the workflow shown in FIG. 7b can be used to implement the connection control method of the stylus shown in FIG. 5e, as shown in FIG. 7b , the method includes:
  • Step 502 the screen projection management service unit of the first electronic device receives a screen projection disconnection instruction sent by the screen projection management service unit of the second electronic device, and the screen projection disconnection instruction includes the physical address of the stylus.
  • Step 504 the screen projection management service unit of the first electronic device stops displaying the screen projection interface of the second electronic device in response to the screen projection disconnection instruction.
  • Step 506 the screen projection management service unit of the first electronic device returns a screen projection disconnection success message to the screen projection management service unit of the second electronic device.
  • Step 508 the screen projection management service unit of the first electronic device sends a stylus connection disconnection notification to the stylus management service unit of the first electronic device, and the stylus connection disconnection notification includes the physical address of the stylus.
  • Step 510 the stylus management service unit of the first electronic device finds out that the first wireless connection between itself and the stylus is triggered by a screen projection operation.
  • step 510 it also includes: the stylus management service unit of the first electronic device inquires whether it is in the state of establishing the first wireless connection with the stylus, if yes, directly executes step 510; if not, indicates If the first electronic device disconnects the first wireless connection with the stylus, then step 510 and step 512 may not be executed again.
  • Step 512 the stylus management service unit of the first electronic device automatically disconnects the first wireless connection with the stylus connection management unit according to the physical address of the stylus.
  • the stylus establishes a first wireless connection with the second electronic device as the source device, and when the second electronic device successfully projects the screen-casting interface to the target
  • the first electronic device is triggered to actively establish a first wireless connection with the stylus; when the second electronic device and the first electronic device are successfully disconnected from the first electronic device Disconnect the first wireless connection.
  • FIGS. 8a to 8d provide another schematic diagram of establishing a first wireless connection and a second wireless connection between a stylus and an electronic device. 8a to 8d show the stylus 200, the first electronic device 600 and the second electronic device 700, for example, the first electronic device 600 is a mobile phone, and the second electronic device 700 is a tablet computer.
  • the second electronic device 700 and the stylus 200 may establish a first wireless connection through a short-range communication technology, and the short-range communication technology may include but not limited to Bluetooth, Wi-Fi or NFC.
  • the second electronic device 700 and the stylus 200 may establish a first wireless connection through Bluetooth, and at this time, the established first wireless connection may be a GATT connection.
  • the second electronic device 700 needs to perform pairing with the stylus 200, specifically, the second electronic device 700 and the stylus
  • the pen 200 can be paired via Bluetooth, NFC or USB-C interface. Then, the second electronic device 700 performs establishment of a GATT connection with the stylus 200 .
  • the stylus 200 can establish a second wireless connection with the second electronic device 700, and the user can use the stylus 200 to touch on the second electronic device 700.
  • control operations for example, the second wireless connection is a HOGP connection.
  • a HOGP connection is established with the second electronic device 700 .
  • the second electronic device 700 displays a handwriting interface, and the user can use the stylus 200 to perform writing operations on the handwriting interface, for example, writing the word "Huawei" on the handwriting interface.
  • the first electronic device 600 and the second electronic device 700 perform a screen projection operation, and the screen projection operation is successful.
  • the first electronic device 600 casts the screen projection interface to the second electronic device 700
  • the second electronic device 700 displays the collaborative window 500 generated on the second electronic device 700 by the first electronic device 600.
  • the collaborative window 500 includes a screen projection interface of the first electronic device 600 to realize the "multi-screen collaboration" function.
  • the screen projection interface is the main interface of the first electronic device 600 .
  • the content of the collaboration window 500 changes correspondingly with the user's operation on the first electronic device 600 .
  • the first electronic device 600 automatically establishes a first wireless connection with the stylus 200, and the first electronic device 600 and the stylus 200 can automatically establish the first wireless connection through short-range communication technology. Including but not limited to Bluetooth, Wi-Fi or NFC.
  • the first electronic device 600 and the stylus 200 may automatically establish a first wireless connection through Bluetooth, and at this time, the established first wireless connection may be a GATT connection.
  • the first electronic device 600 inquires whether a GATT connection has been established with the stylus 200.
  • a GATT connection has been established with the stylus 200, it indicates that the first electronic device 600 has already established a GATT connection with the stylus 200 before screen projection. Establish a GATT connection; if it is found out that the GATT connection with the stylus 200 has not been established, the GATT connection with the stylus 200 can be directly established.
  • the first electronic device 600 needs to perform pairing with the stylus 200, for example, the first electronic device 600 can pass Bluetooth or NFC performs pairing with the stylus 200, thereby realizing automatic pairing between the first electronic device 600 and the stylus 200, without manual operation by the user, and improving user experience.
  • the first electronic device 600 pops up a prompt box, and the user clicks the "Connect” button in the prompt box to express agreement to establish a GATT connection, and then the second An electronic device 600 establishes a GATT connection with the stylus 200 .
  • the user clicks "cancel" in the prompt box it means that the establishment of the GATT connection is not agreed, and the establishment of the GATT connection between the first electronic device 600 and the stylus 200 fails.
  • the first electronic device 600 can automatically establish a second wireless connection with the stylus 200, and the user can use the stylus 200 on the first electronic
  • a touch operation is performed on the device 600, for example, the second wireless connection is a HOGP connection.
  • the stylus 200 disconnects the HOGP connection established between the second electronic device 700 and automatically establishes a HOGP connection with the first electronic device 600 , so that the user can use the stylus 200 to perform a touch operation on the first electronic device 600 .
  • the first electronic device 600 displays a handwriting interface, and the user can use the stylus 200 to perform writing operations on the handwriting interface, for example, write the word "Huawei" on the handwriting interface.
  • FIG. 8e provides another schematic diagram of disconnecting the first wireless connection between the stylus and the electronic device.
  • the first electronic device 600 and the second electronic device 700 After executing the process of establishing the first wireless connection between the stylus and the electronic device shown in Figure 8a to Figure 8d, the first electronic device 600 and the second electronic device 700 have established screen projection, The device 700 has established a GATT connection with the stylus 200 .
  • the first electronic device 600 and the second electronic device 700 perform screen projection disconnection, and the screen projection disconnection is successful.
  • the first electronic device 600 sends a screen projection disconnection command to the second electronic device 700, so that the second electronic device 700 stops displaying the screen projection interface of the first electronic device 600.
  • the second electronic device 700 no longer The collaboration window 500 is displayed, and the communication channel established when the first electronic device 600 and the second electronic device 700 project screens is disconnected. Since the GATT connection between the first electronic device 600 and the stylus 200 is triggered by the screen projection operation, when the screen projection between the first electronic device 600 and the second electronic device 700 is disconnected, the first electronic device The device 600 disconnects the GATT connection with the stylus 200 automatically. However, since the GATT connection between the second electronic device 700 and the stylus 200 is not triggered by the screen projection operation, the GATT connection between the second electronic device 700 and the stylus 200 is not affected by the disconnection of the screen projection. The electronic device 700 and the stylus 200 still maintain the GATT connection.
  • the stylus 200 can establish a HOGP connection with the second electronic device 700, so that the user can use the stylus 200 to perform touch operations on the second electronic device 700. For example, as shown in FIG. The electronic device 700 clicks on the gallery icon.
  • the GATT connection between the first electronic device 600 and the stylus 200 is not triggered by the screen projection operation, the GATT connection between the first electronic device 600 and the stylus 200 is not affected by the disconnection of the screen projection.
  • the first electronic device 600 and the stylus 200 still maintain a GATT connection, and the user can continue to use the stylus 200 to perform touch operations on the first electronic device 600 , which is not shown in detail.
  • FIG. 8a to FIG. 8e are exemplary representations of the embodiment of the present application, and the schematic diagram of the interface of the electronic device may also be in other styles, which is not limited in the embodiment of the present application.
  • Fig. 9a is a flow chart of the connection control method of the stylus in other embodiments.
  • the workflow shown in Fig. 9a can be used to realize the connection control method of the stylus shown in Fig. 8a to Fig. 8c, as shown in Fig. 9a, the Methods include:
  • Step 602 the second electronic device establishes a first wireless connection with the stylus.
  • Step 604 the second electronic device establishes a communication channel with the first electronic device.
  • Step 606 the first electronic device sends a screen projection request to the second electronic device.
  • Step 608 the second electronic device displays the screen projection interface of the first electronic device in response to the screen projection request.
  • Step 610 the second electronic device returns a screen casting success message to the first electronic device, and the screen casting success message includes the physical address of the stylus.
  • the second electronic device When the first electronic device is projecting the screen to the second electronic device, the second electronic device sends the physical address of the stylus to the first electronic device through a successful screen projection message, so that the first electronic device performs The physical address of the stylus is acquired from the second electronic device during the screen projection operation.
  • the second electronic device may also send the physical address of the stylus to the first electronic device separately, for example, after the second electronic device sends the first electronic device Before the screen casting success message, the second electronic device sends the physical address of the stylus to the first electronic device.
  • Step 612 the first electronic device automatically establishes a first wireless connection with the stylus according to the physical address of the stylus.
  • Step 614 the first electronic device records wireless connection establishment information, and the wireless connection establishment information is used to indicate that the first wireless connection between the first electronic device and the stylus is established by being triggered by the screen projection operation.
  • FIG. 9b provides a flow chart of the connection control method of the stylus in other embodiments.
  • the workflow shown in FIG. 9b can be used to implement the connection control method of the stylus shown in FIG. 8a to FIG. 8c, as As shown in Figure 9b, the method includes:
  • Step 702 the stylus management service unit of the second electronic device establishes a first wireless connection with the stylus connection management unit.
  • Step 704 the screen projection management service unit of the second electronic device establishes a communication channel with the screen projection management service unit of the first electronic device.
  • Step 706 the screen projection management service unit of the first electronic device sends a screen projection request to the screen projection management service unit of the second electronic device.
  • Step 708 The screen projection management service unit of the second electronic device displays the screen projection interface of the first electronic device in response to the screen projection request.
  • Step 710 the screen projection management service unit of the second electronic device returns a screen projection success message to the screen projection management service unit of the first electronic device, and the screen projection success message includes the physical address of the stylus.
  • Step 712 The screen projection management service unit of the first electronic device sends a stylus connection establishment notification to the stylus management service unit of the first electronic device, and the stylus connection establishment notification includes the physical address of the stylus.
  • Step 714 The stylus management service unit of the first electronic device automatically establishes a first wireless connection with the stylus connection management unit according to the physical address of the stylus.
  • step 714 it also includes: the stylus management service unit of the first electronic device inquires whether it has been paired with the stylus, if it has been paired with the stylus, then directly execute step 714; if it is not paired with the stylus , the following steps are performed: the stylus management service unit of the first electronic device performs pairing with the stylus connection management unit, and then step 714 is performed after the pairing is successful.
  • the stylus management service unit of the first electronic device if it inquires that the stylus has been paired, it may continue to perform the following steps: the stylus management service unit of the first electronic device inquires whether the first wireless communication with the stylus has been established. connection, if it is found that the first wireless connection has not been established with the stylus, directly perform step 714;
  • Step 716 the stylus management service unit of the first electronic device records wireless connection establishment information, the wireless connection establishment information is used to indicate that the first wireless connection between the first electronic device and the stylus is triggered by the screen projection operation.
  • this embodiment realizes the establishment of the first wireless connection between the first electronic device 600 and the stylus 200 as shown in FIG. 8 c .
  • both the first electronic device 600 and the second electronic device 700 establish a first wireless connection with the stylus 200 .
  • the stylus 200 needs to perform a touch operation on the electronic device, it needs to establish a second wireless connection with the electronic device, and the second wireless connection is a HOGP connection.
  • the stylus 200 can freely switch between the first electronic device 600 and the second electronic device 700 by establishing a HOGP connection.
  • FIG. 6d a schematic flowchart of a method for establishing a HOGP connection between the stylus and the first electronic device may be shown in FIG. 6d.
  • Fig. 10a is a flowchart of a connection control method of a stylus in other embodiments.
  • the workflow shown in Fig. 10a can be used to realize the connection control method of a stylus shown in Fig. 8e.
  • the method includes:
  • Step 802 the second electronic device receives a screen projection disconnection instruction sent by the first electronic device.
  • Step 804 the second electronic device stops displaying the screen projection interface of the first electronic device in response to the screen projection disconnection instruction.
  • Step 806 the second electronic device returns a screen projection disconnection success message to the second electronic device, and the screen projection disconnection success message includes the physical address of the stylus.
  • the second electronic device sends the physical address of the stylus to the first electronic device through a screen projection disconnection success message, so that the first electronic device obtains handwriting from the second electronic device during the screen projection disconnection process with the second electronic device The physical address of the pen.
  • Step 808 the first electronic device finds out that the first wireless connection between itself and the stylus is triggered by a screen projection operation.
  • Step 810 the first electronic device automatically disconnects the first wireless connection with the stylus according to the physical address of the stylus.
  • step 808 the first electronic device inquires whether the first wireless connection between itself and the stylus is triggered by a screen projection operation; if it is found that the first wireless connection between itself and the stylus is triggered by a screen projection operation If the first wireless connection between itself and the stylus is not triggered by the screen projection operation, step 810 is not performed, and the first electronic device maintains the first wireless connection with the stylus. connect.
  • the first electronic device inquires whether the first wireless connection between itself and the stylus is triggered by a screen projection operation.
  • step 808 Before inquiring in step 808 whether the first wireless connection between itself and the stylus is established in response to the success of the screen projection operation, it also includes: the first electronic device inquires whether it is in the state of establishing the first wireless connection with the stylus, if , then execute step 808; if no, it indicates that the first electronic device disconnects the first wireless connection with the stylus, then step 808 and step 810 may not be executed again.
  • this embodiment realizes disconnection of the first wireless connection between the first electronic device 400 and the stylus 200 as shown in FIG. 8e.
  • Fig. 10b provides a flow chart of the method for controlling the connection of the stylus in other embodiments, and the workflow shown in Fig. 10b can be used to implement the method for controlling the connection of the stylus shown in Fig. 8e, as shown in Fig. 10b , the method includes:
  • Step 902 the screen projection management service unit of the second electronic device receives the screen projection disconnection instruction sent by the screen projection management service unit of the first electronic device.
  • Step 904 the screen projection management service unit of the second electronic device stops displaying the screen projection interface of the first electronic device in response to the screen projection disconnection instruction.
  • Step 906 The screen projection management service unit of the second electronic device returns a screen projection disconnection success message to the screen projection management service unit of the first electronic device, and the screen projection disconnection success message includes the physical address of the stylus.
  • Step 908 the screen projection management service unit of the first electronic device sends a notification of disconnecting the stylus to the stylus management service unit of the first electronic device, where the notification of disconnecting the stylus includes the physical address of the stylus.
  • Step 910 the stylus management service unit of the first electronic device finds out that the first wireless connection between itself and the stylus is triggered by the screen projection operation.
  • step 910 before step 910, it also includes: the stylus management service unit of the first electronic device inquires whether it is in the state of establishing the first wireless connection with the stylus, if yes, directly executes step 910; if not, indicates If the first electronic device disconnects the first wireless connection with the stylus, then step 910 and step 912 may not be executed again.
  • Step 912 The stylus management service unit of the first electronic device automatically disconnects the first wireless connection with the stylus connection management unit according to the physical address of the stylus.
  • the stylus establishes the first wireless connection with the second electronic device, and the first electronic device displays the screen projection interface of the second electronic device in response to the received screen projection request sent by the second electronic device, then The first electronic device automatically establishes the first wireless connection with the stylus, and the user does not need to manually manage the connection between the first electronic device and the stylus, thereby reducing the operation process for the user to use the stylus and improving user experience.
  • the first electronic device stops displaying the screen projection interface of the second electronic device in response to the received screen projection disconnection command sent by the second electronic device, and then the first electronic device inquires the connection between itself and the stylus.
  • the first wireless connection is established by being triggered by the screen projection operation, and automatically disconnects the first wireless connection with the stylus, eliminating the need for the user to manually manage the disconnection of the first electronic device from the stylus, thereby reducing the user's operation process for using the stylus , improving the user experience.
  • An embodiment of the present application provides a first electronic device, and the first electronic device may be a terminal device or a circuit device built in the terminal device.
  • the electronic device comprises: a display screen; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs Instructions are included, and when the instructions are executed by the device, the device can be used to execute the various steps in the above embodiment of the connection control method for the stylus.
  • An embodiment of the present application provides a computer-readable storage medium, and instructions are stored in the computer-readable storage medium, and when the instructions are run on a computer, the computer is made to execute each of the above-mentioned embodiments of the connection control method for the stylus. step.
  • An embodiment of the present application provides a computer program product containing instructions.
  • the computer program product runs on a computer or any at least one processor, the computer executes the method described in the above embodiment of the connection control method for the stylus. each step.
  • "at least one” means one or more, and “multiple” means two or more.
  • “And/or” describes the association relationship of associated objects, indicating that there may be three kinds of relationships, for example, A and/or B may indicate that A exists alone, A and B exist simultaneously, or B exists alone. Among them, A and B can be singular or plural.
  • the character “/” generally indicates that the contextual objects are an “or” relationship.
  • “At least one of the following” and similar expressions refer to any combination of these items, including any combination of single items or plural items.
  • At least one of a, b, and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, and c may be single or multiple.
  • any function is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

Provided are a method for controlling connection of a stylus, and an electronic device. The method is applied to a first electronic device, first wireless connection is established between a stylus and a second electronic device, and the first wireless connection is used for implementing general service data transmission. The method comprises: the first electronic device receives a screen projection request sent by the second electronic device; the first electronic device displays a screen projection interface of the second electronic device in response to the screen projection request; and the first electronic device automatically establishes the first wireless connection with the stylus. The technical solution provided herein does not require a user to manually manage connection between the first electronic device and the stylus, thereby simplifying the operation process when the user uses the stylus and then improving user experience.

Description

一种手写笔的连接控制方法和电子设备A connection control method and electronic device of a stylus
本申请要求于2021年05月26日提交中国专利局、申请号为202110578582.1、申请名称为“一种手写笔的连接控制方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110578582.1 and the application title "A connection control method and electronic device for a stylus" submitted to the China Patent Office on May 26, 2021, the entire contents of which are incorporated by reference in this application.
技术领域technical field
本申请涉及终端技术领域,具体地涉及一种手写笔的连接控制方法和电子设备。The present application relates to the technical field of terminals, and in particular to a connection control method of a stylus and an electronic device.
背景技术Background technique
随着触控技术的发展,越来越多的电子设备通过触控方式实现人机交互功能。用户除了通过手指在电子设备上进行触控操作之外,还可以通过手写笔在电子设备上进行触控操作。通常,一个用户只有一支手写笔,但却同时拥有多个具备触控屏的电子设备,例如,手机、平板电脑等。一支手写笔可支持连接一个电子设备或支持同时连接多个电子设备。With the development of touch technology, more and more electronic devices realize human-computer interaction functions through touch. In addition to performing touch operations on the electronic device with fingers, the user may also perform touch operations on the electronic device with a stylus. Usually, a user has only one stylus, but simultaneously owns multiple electronic devices with touch screens, such as mobile phones and tablet computers. A stylus can support connecting to one electronic device or support connecting to multiple electronic devices at the same time.
手写笔与电子设备首次配合使用时必须进行配对,配对成功后用户才能在电子设备上正常使用手写笔。目前,用户必须通过手动操作的方式将手写笔和电子设备进行配对,若在各种投屏场景中使用手写笔,则需要用户手动管理手写笔的连接、断开等操作,使得操作繁琐,从而增加了用户使用手写笔的操作流程,降低了用户体验。When the stylus is used with the electronic device for the first time, it must be paired. After the pairing is successful, the user can use the stylus on the electronic device normally. At present, users must manually pair the stylus with the electronic device. If the stylus is used in various screen projection scenarios, the user needs to manually manage the connection and disconnection of the stylus, which makes the operation cumbersome. The operation process for the user to use the stylus is increased, and the user experience is reduced.
发明内容Contents of the invention
有鉴于此,本申请提供一种手写笔的连接控制方法和电子设备,用于减少用户使用手写笔时的操作流程,提高了用户体验。In view of this, the present application provides a connection control method of a stylus and an electronic device, which are used to reduce the operation process when the user uses the stylus and improve user experience.
第一方面提供了一种手写笔的连接控制方法,所述方法应用于第一电子设备,所述手写笔与第二电子设备建立了第一无线连接,所述第一无线连接用于实现通用业务数据传输;所述方法包括:所述第一电子设备接收所述第二电子设备发送的投屏请求;所述第一电子设备响应于所述投屏请求,显示所述第二电子设备的投屏界面;所述第一电子设备自动与所述手写笔建立所述第一无线连接。The first aspect provides a method for controlling the connection of a stylus, the method is applied to a first electronic device, the stylus establishes a first wireless connection with a second electronic device, and the first wireless connection is used to implement universal Business data transmission; the method includes: the first electronic device receives a screen projection request sent by the second electronic device; the first electronic device responds to the screen projection request and displays the screen projection of the second electronic device Screen projection interface: the first electronic device automatically establishes the first wireless connection with the stylus.
在一种可能的实现方式中,所述第一电子设备自动与所述手写笔建立所述第一无线连接之前,还包括:In a possible implementation manner, before automatically establishing the first wireless connection with the stylus, the first electronic device further includes:
所述第一电子设备若与所述手写笔未配对,所述第一电子设备先执行与所述手写笔之间的配对,再执行与所述手写笔之间所述第一无线连接的建立;和/或,所述第一电子设备若与所述手写笔已配对,直接执行所述第一电子设备与所述手写笔之间所述第一无线连接的建立。If the first electronic device is not paired with the stylus, the first electronic device first performs pairing with the stylus, and then performs the establishment of the first wireless connection with the stylus and/or, if the first electronic device is paired with the stylus, directly execute the establishment of the first wireless connection between the first electronic device and the stylus.
在一种可能的实现方式中,所述第一电子设备自动与所述手写笔建立所述第一无线连接之后,还包括:所述第一电子设备记录无线连接建立信息,所述无线连接建立信息用于 指示自身与所述手写笔的第一无线连接是受到投屏操作的触发而建立的。In a possible implementation manner, after the first electronic device automatically establishes the first wireless connection with the stylus, it further includes: the first electronic device records wireless connection establishment information, and the wireless connection establishment The information is used to indicate that the first wireless connection between itself and the stylus is triggered by a screen projection operation.
在一种可能的实现方式中,所述第一电子设备自动与所述手写笔建立所述第一无线连接,包括:所述第一电子设备根据执行投屏操作过程中从所述第二电子设备获取的所述手写笔的物理地址,与所述手写笔建立所述第一无线连接。In a possible implementation manner, the first electronic device automatically establishes the first wireless connection with the stylus, including: The device acquires the physical address of the stylus, and establishes the first wireless connection with the stylus.
在一种可能的实现方式中,所述投屏请求包括所述手写笔的物理地址。In a possible implementation manner, the screen projection request includes the physical address of the stylus.
在一种可能的实现方式中,所述第一电子设备自动与所述手写笔建立所述第一无线连接之后,还包括:所述第一电子设备接收所述第二电子设备发送的投屏断开指令;所述第一电子设备响应于投屏断开指令,停止显示所述第二电子设备的投屏界面;所述第一电子设备查询出自身与所述手写笔的第一无线连接是受到投屏操作的触发而建立,自动与所述手写笔断开所述第一无线连接。In a possible implementation manner, after the first electronic device automatically establishes the first wireless connection with the stylus, the first electronic device further includes: the first electronic device receives the screen projection sent by the second electronic device Disconnect instruction; the first electronic device stops displaying the screen projection interface of the second electronic device in response to the screen projection disconnection instruction; the first electronic device inquires the first wireless connection between itself and the stylus The first wireless connection is automatically disconnected from the stylus by being triggered by the screen projection operation.
在一种可能的实现方式中,所述查询出自身与所述手写笔的第一无线连接是受到投屏操作的触发而建立,包括:所述第一电子设备根据记录的无线连接建立信息,查询出自身与所述手写笔的第一无线连接是受到投屏操作的触发而建立的。In a possible implementation manner, the querying that the establishment of the first wireless connection between itself and the stylus is triggered by a screen projection operation includes: the first electronic device establishes information according to the recorded wireless connection, It is found out that the first wireless connection between itself and the stylus is triggered by a screen projection operation.
在一种可能的实现方式中,所述自动与所述手写笔断开所述第一无线连接,包括:所述第一电子设备根据执行投屏断开过程中从所述第二电子设备获取的所述手写笔的物理地址,自动与所述手写笔断开第一无线连接。In a possible implementation manner, the automatically disconnecting the first wireless connection with the stylus includes: the first electronic device obtains from the second electronic device according to the screen projection disconnection process. The physical address of the stylus is automatically disconnected from the first wireless connection with the stylus.
在一种可能的实现方式中,所述投屏断开指令包括所述手写笔的物理地址。In a possible implementation manner, the screen projection disconnection instruction includes the physical address of the stylus.
在一种可能的实现方式中,所述手写笔与所述第二电子设备建立了第二无线连接,所述第二无线连接用于实现人机交互业务数据传输;In a possible implementation manner, the stylus establishes a second wireless connection with the second electronic device, and the second wireless connection is used to realize human-computer interaction service data transmission;
所述第一电子设备自动与所述手写笔建立所述第一无线连接之后,还包括:所述第一电子设备在所述手写笔与所述第二电子设备断开所述第二无线连接之后,与所述手写笔自动建立所述第二无线连接。After the first electronic device automatically establishes the first wireless connection with the stylus, the method further includes: disconnecting the second wireless connection between the stylus and the second electronic device by the first electronic device Afterwards, the second wireless connection is automatically established with the stylus.
在一种可能的实现方式中,所述第一无线连接为普通属性协议GATT连接。In a possible implementation manner, the first wireless connection is a general attribute protocol GATT connection.
在一种可能的实现方式中,所述第二无线连接为基于GATT的人机接口设备协议HOGP连接。In a possible implementation manner, the second wireless connection is a GATT-based HOGP connection.
第二方面提供了一种手写笔的连接控制方法,所述方法应用于第一电子设备,所述手写笔与第二电子设备建立了第一无线连接,所述第一无线连接用于实现通用业务数据传输;所述方法包括:所述第一电子设备向所述第二电子设备发送投屏请求,以将自身的投屏界面在所述第二电子设备上显示;所述第一电子设备接收所述第二电子设备返回的投屏成功消息;所述第一电子设备自动与所述手写笔建立所述第一无线连接。The second aspect provides a connection control method of a stylus, the method is applied to a first electronic device, the stylus establishes a first wireless connection with a second electronic device, and the first wireless connection is used to realize universal Business data transmission; the method includes: the first electronic device sends a screen projection request to the second electronic device to display its own screen projection interface on the second electronic device; the first electronic device receiving a successful screen projection message returned by the second electronic device; and automatically establishing the first wireless connection with the stylus by the first electronic device.
在一种可能的实现方式中,所述第一电子设备自动与所述手写笔建立所述第一无线连接之前,还包括:所述第一电子设备若与所述手写笔未配对,所述第一电子设备先执行与所述手写笔之间的配对,再执行与所述手写笔之间所述第一无线连接的建立;和/或,所述第一电子设备若与所述手写笔已配对,直接执行所述第一电子设备与所述手写笔之间所述第一无线连接的建立。In a possible implementation manner, before the first electronic device automatically establishes the first wireless connection with the stylus, it further includes: if the first electronic device is not paired with the stylus, the The first electronic device performs pairing with the stylus first, and then performs the establishment of the first wireless connection with the stylus; and/or, if the first electronic device is paired with the stylus already paired, directly perform establishment of the first wireless connection between the first electronic device and the stylus.
在一种可能的实现方式中,所述第一电子设备自动与所述手写笔建立所述第一无线连接之后,还包括:所述第一电子设备记录无线连接建立信息,所述无线连接建立信息用于指示自身与所述手写笔的第一无线连接是受到投屏操作的触发而建立的。In a possible implementation manner, after the first electronic device automatically establishes the first wireless connection with the stylus, it further includes: the first electronic device records wireless connection establishment information, and the wireless connection establishment The information is used to indicate that the first wireless connection between itself and the stylus is triggered by a screen projection operation.
在一种可能的实现方式中,所述第一电子设备自动与所述手写笔建立所述第一无线连 接,包括:所述第一电子设备根据执行投屏操作过程中从所述第二电子设备获取的所述手写笔的物理地址,自动与所述手写笔建立所述第一无线连接。In a possible implementation manner, the first electronic device automatically establishes the first wireless connection with the stylus, including: The device acquires the physical address of the stylus, and automatically establishes the first wireless connection with the stylus.
在一种可能的实现方式中,所述投屏成功消息包括所述手写笔的物理地址。In a possible implementation manner, the screen casting success message includes the physical address of the stylus.
在一种可能的实现方式中,所述第一电子设备自动与所述手写笔建立所述第一无线连接之后,还包括:所述第一电子设备向所述第二电子设备发送投屏断开指令,以使自身的投屏界面停止在所述第二电子设备上显示;所述第一电子设备接收所述第二电子设备返回的投屏断开成功消息;所述第一电子设备查询出自身与所述手写笔的第一无线连接是受到投屏操作的触发而建立,自动与所述手写笔断开所述第一无线连接。In a possible implementation manner, after the first electronic device automatically establishes the first wireless connection with the stylus, it further includes: the first electronic device sends a screen projection message to the second electronic device. open instruction, so that its own screen projection interface stops displaying on the second electronic device; the first electronic device receives the screen projection disconnection success message returned by the second electronic device; the first electronic device queries The first wireless connection between itself and the stylus is established by being triggered by the screen projection operation, and the first wireless connection with the stylus is automatically disconnected.
在一种可能的实现方式中,所述查询出自身与所述手写笔的第一无线连接是受到投屏操作的触发而建立,包括:In a possible implementation manner, the inquiring that the establishment of the first wireless connection between itself and the stylus is triggered by a screen projection operation includes:
所述第一电子设备根据记录的无线连接建立信息,查询出自身与所述手写笔的第一无线连接是受到投屏操作的触发而建立的。According to the recorded wireless connection establishment information, the first electronic device finds out that the first wireless connection between itself and the stylus is triggered by a screen projection operation.
在一种可能的实现方式中,所述自动与所述手写笔断开所述第一无线连接,包括:所述第一电子设备根据执行投屏断开过程中从所述第二电子设备获取的所述手写笔的物理地址,自动与所述手写笔断开第一无线连接。In a possible implementation manner, the automatically disconnecting the first wireless connection with the stylus includes: the first electronic device obtains from the second electronic device according to the screen projection disconnection process. The physical address of the stylus is automatically disconnected from the first wireless connection with the stylus.
在一种可能的实现方式中,所述投屏断开成功消息包括所述手写笔的物理地址。In a possible implementation manner, the screen projection disconnection success message includes the physical address of the stylus.
在一种可能的实现方式中,所述手写笔与所述第二电子设备建立了第二无线连接,所述第二无线连接用于实现人机交互业务数据传输;In a possible implementation manner, the stylus establishes a second wireless connection with the second electronic device, and the second wireless connection is used to realize human-computer interaction service data transmission;
所述第一电子设备与所述手写笔建立所述第一无线连接之后,还包括:所述第一电子设备在所述手写笔与所述第二电子设备断开所述第二无线连接之后,与所述手写笔自动建立所述第二无线连接。After the first electronic device establishes the first wireless connection with the stylus, the method further includes: after the first electronic device disconnects the second wireless connection between the stylus and the second electronic device , automatically establishing the second wireless connection with the stylus.
在一种可能的实现方式中,所述第一无线连接为GATT连接。In a possible implementation manner, the first wireless connection is a GATT connection.
在一种可能的实现方式中,所述第二无线连接为HOGP连接。In a possible implementation manner, the second wireless connection is a HOGP connection.
第三方面提供了一种第一电子设备,手写笔与第二电子设备建立了第一无线连接,所述第一无线连接用于实现通用业务数据传输;The third aspect provides a first electronic device, the stylus establishes a first wireless connection with the second electronic device, and the first wireless connection is used to realize general service data transmission;
所述第一电子设备包括:显示屏;一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述第一电子设备执行时,使得所述第一电子设备执行第一方面或者第一方面的任一可能的实现方式中手写笔的连接控制方法。The first electronic device comprises: a display screen; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more A computer program includes an instruction, and when the instruction is executed by the first electronic device, the first electronic device executes the connection control method of the stylus in the first aspect or any possible implementation manner of the first aspect.
第四方面提供了一种第一电子设备,手写笔与第二电子设备建立了第一无线连接,所述第一无线连接用于实现通用业务数据传输;The fourth aspect provides a first electronic device, the stylus establishes a first wireless connection with the second electronic device, and the first wireless connection is used to realize general service data transmission;
所述第一电子设备包括:显示屏;一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述第一电子设备执行时,使得所述第一电子设备执行第二方面或者第二方面的任一可能的实现方式中手写笔的连接控制方法。The first electronic device comprises: a display screen; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more A computer program includes an instruction. When the instruction is executed by the first electronic device, the first electronic device executes the connection control method of the stylus in the second aspect or any possible implementation manner of the second aspect.
第五方面提供了一种计算机可读存储介质,所述计算机可读存储介质包括存储的程序,其中,在所述程序运行时控制所述计算机可读存储介质所在设备执行第一方面或者第一方面的任一可能的实现方式中手写笔的连接控制方法,或者在所述程序运行时控制所述计算机可读存储介质所在设备执行第二方面或者第二方面的任一可能的实现方式中手写笔的 连接控制方法。A fifth aspect provides a computer-readable storage medium, the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the first aspect or the first A method for controlling the connection of a stylus in any possible implementation of the aspect, or controlling the device where the computer-readable storage medium is located when the program is running to execute the second aspect or handwriting in any possible implementation of the second aspect Pen connection control method.
第六方面提供了一种包含指令的计算机程序产品,当所述计算机程序产品在计算机或任一至少一种处理器上运行时,使得所述计算机执行第一方面或者第一方面的任一可能的实现方式中手写笔的连接控制方法,或者使得所述计算机执行第二方面或者第二方面的任一可能的实现方式中手写笔的连接控制方法。A sixth aspect provides a computer program product containing instructions, when the computer program product runs on a computer or any at least one processor, the computer executes the first aspect or any possibility of the first aspect. The connection control method of the stylus in the implementation manner of the stylus, or make the computer execute the connection control method of the stylus in the second aspect or any possible implementation manner of the second aspect.
本申请实施例提供的技术方案中,手写笔与第二电子设备建立了第一无线连接,第一电子设备响应于接收到的第二电子设备发送的投屏请求,显示第二电子设备的投屏界面,则第一电子设备自动与手写笔建立第一无线连接,无需用户手动管理第一电子设备与手写笔的连接,从而减少了用户使用手写笔的操作流程,提高了用户体验。In the technical solution provided by the embodiment of this application, the stylus establishes a first wireless connection with the second electronic device, and the first electronic device responds to the screen projection request sent by the second electronic device and displays the screen projection of the second electronic device. screen interface, the first electronic device automatically establishes a first wireless connection with the stylus, without the need for the user to manually manage the connection between the first electronic device and the stylus, thereby reducing the user's operating procedures for using the stylus and improving user experience.
附图说明Description of drawings
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings that need to be used in the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. Those of ordinary skill in the art can also obtain other drawings based on these drawings without paying creative labor.
图1是一些实施例中手写笔通信系统的结构示意图;Fig. 1 is a schematic structural diagram of a stylus communication system in some embodiments;
图2是一些实施例中电子设备的硬件结构示意图;Fig. 2 is a schematic diagram of the hardware structure of an electronic device in some embodiments;
图3是一些实施例中手写笔和电子设备的软件结构框图;Figure 3 is a block diagram of the software structure of the stylus and electronic equipment in some embodiments;
图4是一些实施例中投屏的示意图;Fig. 4 is a schematic diagram of screen projection in some embodiments;
图5a至图5d是一些实施例中手写笔与电子设备建立第一无线连接和第二无线连接的示意图;5a to 5d are schematic diagrams of establishing a first wireless connection and a second wireless connection between a stylus and an electronic device in some embodiments;
图5e是一些实施例中手写笔与电子设备断开第一无线连接的示意图;Fig. 5e is a schematic diagram of disconnecting the first wireless connection between the stylus and the electronic device in some embodiments;
图6a是一些实施例中手写笔的连接控制方法的流程图;Fig. 6a is a flowchart of a connection control method of a stylus in some embodiments;
图6b是一些实施例中第一电子设备与手写笔配对和建立第一无线连接的方法流程图;Fig. 6b is a flowchart of a method for pairing a first electronic device with a stylus and establishing a first wireless connection in some embodiments;
图6c是另一些实施例中手写笔的连接控制方法的流程图;Fig. 6c is a flowchart of a connection control method of a stylus in other embodiments;
图6d是一些实施例中手写笔与电子设备建立HOGP连接的方法流程示意图;Fig. 6d is a schematic flowchart of a method for establishing a HOGP connection between a stylus and an electronic device in some embodiments;
图7a是另一些实施例中手写笔的连接控制方法的流程图;Fig. 7a is a flowchart of a connection control method of a stylus in some other embodiments;
图7b是另一些实施例中手写笔的连接控制方法的流程图;Fig. 7b is a flowchart of a connection control method of a stylus in some other embodiments;
图8a至图8d是另一些实施例中手写笔与电子设备建立第一无线连接和第二无线连接的示意图;8a to 8d are schematic diagrams of establishing a first wireless connection and a second wireless connection between a stylus and an electronic device in other embodiments;
图8e是另一些实施例中手写笔与电子设备断开第一无线连接的示意图;Fig. 8e is a schematic diagram of disconnecting the first wireless connection between the stylus and the electronic device in some other embodiments;
图9a是另一些实施例中手写笔的连接控制方法的流程图;Fig. 9a is a flowchart of a connection control method of a stylus in some other embodiments;
图9b是另一些实施例中手写笔的连接控制方法的流程图;Fig. 9b is a flowchart of a connection control method of a stylus in other embodiments;
图10a是另一些实施例中手写笔的连接控制方法的流程图;Fig. 10a is a flowchart of a connection control method of a stylus in other embodiments;
图10b是另一些实施例中手写笔的连接控制方法的流程图。Fig. 10b is a flowchart of a connection control method of a stylus in some other embodiments.
具体实施方式Detailed ways
为了更好的理解本申请的技术方案,下面结合附图对本申请实施例进行详细描述。In order to better understand the technical solutions of the present application, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings.
应当明确,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它 实施例,都属于本申请保护的范围。It should be clear that the described embodiments are only some of the embodiments of the present application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.
在本申请实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。Terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of this application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,甲和/或乙,可以表示:单独存在甲,同时存在甲和乙,单独存在乙这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" used herein is only an association relationship describing associated objects, which means that there may be three relationships, for example, A and/or B, which may mean that A exists alone, and A and B exist simultaneously. B, there are three situations of B alone. In addition, the character "/" in this article generally indicates that the contextual objects are an "or" relationship.
图1是一些实施例中手写笔通信系统的结构示意图,如图1所示,该系统包括:手写笔200和至少二个电子设备,手写笔200和每个电子设备之间均可进行配对,且手写笔200可同时与多个电子设备保持第一无线连接。在一些实施例中,手写笔200与电子设备可通过蓝牙(Bluetooth,简称BT)、近场通信(Near Field Communication,简称NFC)或者USB-C接口进行配对。FIG. 1 is a schematic structural diagram of a stylus communication system in some embodiments. As shown in FIG. 1 , the system includes: a stylus 200 and at least two electronic devices, and pairing can be performed between the stylus 200 and each electronic device. And the stylus 200 can maintain the first wireless connection with multiple electronic devices at the same time. In some embodiments, the stylus 200 and the electronic device can be paired through Bluetooth (BT for short), Near Field Communication (NFC for short) or USB-C interface.
示例性地,图1中以4个电子设备为例进行描述,4个电子设备依次为手机100a、笔记本电脑100b、平板电脑100c和手机100d。图1示出了“一笔多连”的应用场景,“一笔多连”技术指的是一支手写笔200可同时与多个电子设备保持连接,并可在多个电子设备之间进行自由切换操作。手写笔200和电子设备之间可遵守任何适当的标准,例如,华为笔协议(Huawei Pen Protocol,简称HPP)3.x,HPP 3.x是一个融合协议,包含了HPP2.x的兼容方案。Exemplarily, four electronic devices are taken as an example in FIG. 1 for description, and the four electronic devices are a mobile phone 100a, a notebook computer 100b, a tablet computer 100c, and a mobile phone 100d in sequence. Figure 1 shows the application scenario of "one-stroke multi-connection". The "one-stroke multi-connection" technology means that a stylus 200 can be connected to multiple electronic devices at the same time, and can be connected between multiple electronic devices. Switch operations freely. Any appropriate standard can be complied with between the stylus 200 and the electronic device, for example, Huawei Pen Protocol (Huawei Pen Protocol, HPP for short) 3.x, HPP 3.x is a fusion protocol, including the compatibility scheme of HPP2.x.
电子设备为具备触控屏的设备。在一些实施例中,电子设备包括但不限于搭载
Figure PCTCN2022092249-appb-000001
Figure PCTCN2022092249-appb-000002
或者其他操作系统的设备。电子设备包括但不限于手机、平板电脑、笔记本电脑、桌面型计算机、智慧屏等。如图1所示,手写笔200同时与手机100a、笔记本电脑100b、平板电脑100c和手机100d保持第一无线连接,并可在手机100a、笔记本电脑100b、平板电脑100c和手机100d之间进行自由切换操作。
The electronic device is a device with a touch screen. In some embodiments, electronic devices include but are not limited to carrying
Figure PCTCN2022092249-appb-000001
Figure PCTCN2022092249-appb-000002
or devices with other operating systems. Electronic devices include but are not limited to mobile phones, tablet computers, laptops, desktop computers, smart screens, etc. As shown in FIG. 1 , the stylus 200 maintains the first wireless connection with the mobile phone 100a, the notebook computer 100b, the tablet computer 100c and the mobile phone 100d at the same time, and can be freely connected between the mobile phone 100a, the notebook computer 100b, the tablet computer 100c and the mobile phone 100d. Toggle action.
手写笔可包括主动式触控笔或被动式触控笔。本申请实施例中,手写笔200可采用主动式触控笔。在一些实施例中,主动式触控笔为主动式电容触控笔,主动式电容触控笔可以发射出电压驱动信号,以改变触控屏触摸点处的电场,从而改变触摸点处的电极电容,触控屏的控制芯片通过检测电极电容的变化可以确定出触摸点的位置。在另一些实施例中,主动式触控笔还可以采用主动式电磁触控笔,主动式电磁触控笔可以发射出电磁驱动信号,以改变触控屏触摸点处的磁通量,触控屏的控制芯片通过磁通量的变化可以确定出触摸点的位置。另外,主动式触控笔中为实现自然的书写效果通常会在笔头加入压力传感器,这样可以实现不同力度下的不同笔锋以模拟人的真实书写笔迹。The stylus can include an active stylus or a passive stylus. In the embodiment of the present application, the stylus 200 may be an active stylus. In some embodiments, the active stylus is an active capacitive stylus, and the active capacitive stylus can emit a voltage driving signal to change the electric field at the touch point of the touch screen, thereby changing the electrode at the touch point. Capacitance, the control chip of the touch screen can determine the position of the touch point by detecting the change of the electrode capacitance. In other embodiments, the active stylus can also use an active electromagnetic stylus, which can emit an electromagnetic drive signal to change the magnetic flux at the touch point of the touch screen. The control chip can determine the position of the touch point through the change of the magnetic flux. In addition, in order to achieve a natural writing effect in an active stylus, a pressure sensor is usually added to the tip of the pen, so that different strokes under different strengths can be realized to simulate real human handwriting.
示例性地,如图2所示,提供了一种图1中电子设备的硬件结构示意图,图1中的手机100a、笔记本电脑100b、平板电脑100c和手机100d均可采用图2中电子设备的硬件结构。如图2所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification  module,SIM)卡接口195等。可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。Exemplarily, as shown in FIG. 2, a schematic diagram of the hardware structure of the electronic device in FIG. 1 is provided. The mobile phone 100a, notebook computer 100b, tablet computer 100c, and mobile phone 100d in FIG. hardware structure. As shown in Figure 2, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193 , a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195, etc. It can be understood that, the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。其中,控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors. Wherein, the controller can generate an operation control signal according to the instruction operation code and the timing signal, and complete the control of fetching and executing the instruction. A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc. It can be understood that the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is configured to receive a charging input from a charger. Wherein, the charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be disposed in the processor 110 . In some other embodiments, the power management module 141 and the charging management module 140 may also be set in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like. Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G/6G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G/6G applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device. A modem processor may include a modulator and a demodulator. Wherein, the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is passed to the application processor after being processed by the baseband processor. The application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In some other embodiments, the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(Bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近场通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless fidelity, Wi-Fi) network), bluetooth (Bluetooth, BT), global navigation satellite, etc. System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),5G以及后续演进标准,BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(Beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (long term evolution, LTE), 5G and subsequent evolution standards, BT , GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou satellite navigation system (Beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行指令以生成或改变显示信息。电子设备101可以通过ISP,一个或多个摄像头193,视频编解码器,GPU,一个或多个显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute instructions to generate or alter display information. The electronic device 101 may realize the shooting function through an ISP, one or more cameras 193 , a video codec, a GPU, one or more display screens 194 , and an application processor.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备 100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。The internal memory 121 may be used to store computer-executable program codes including instructions. The internal memory 121 may include an area for storing programs and an area for storing data. Wherein, the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like. The storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。其中,触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc. Among them, the touch sensor 180K is also called "touch device". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used for connecting a SIM card. The SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards may be the same or different. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calling and data communication. In some embodiments, the electronic device 100 adopts an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
示例性地,如图3所示,提供了一种手写笔200和电子设备100的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。Exemplarily, as shown in FIG. 3 , a software structural block diagram of the stylus 200 and the electronic device 100 is provided. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
在一些实施例中,将电子设备100的系统分为三层,从上至下分别为应用程序层,服务层,以及驱动层。如图3所示,应用程序层可以包括一系列应用程序包,应用程序可包括协同办公应用和投屏应用;服务层可包括手写笔管理服务、投屏管理服务和近距离通信管理服务;驱动层可包括触摸屏(Touch Panel,简称TP)驱动、人机接口设备(Human Interface Device,简称HID)驱动和近距离通信驱动。例如,近距离通信管理服务可包括蓝牙管理服务、NFC管理服务、Wi-Fi管理服务等;近距离通信驱动可包括蓝牙驱动、NFC驱动、Wi-Fi驱动等。In some embodiments, the system of the electronic device 100 is divided into three layers, which are application program layer, service layer, and driver layer from top to bottom. As shown in Figure 3, the application program layer can include a series of application program packages, and the application programs can include collaborative office applications and screen projection applications; the service layer can include stylus management services, screen projection management services, and short-distance communication management services; driver The layer may include a touch screen (Touch Panel, TP for short) driver, a Human Interface Device (Human Interface Device, HID for short) driver, and a short-range communication driver. For example, the short-range communication management service may include Bluetooth management service, NFC management service, Wi-Fi management service, etc.; the short-range communication driver may include Bluetooth driver, NFC driver, Wi-Fi driver, etc.
在一些实施例中,将手写笔200的系统分为三层,从上至下分别为应用程序层,服务层,以及驱动层。如图3所示,应用程序层可以包括一系列应用程序包,应用程序层可包括主机端通信代理;服务层可包括触控管理和连接管理;驱动层可包括笔端驱动。In some embodiments, the system of the stylus 200 is divided into three layers, which are application program layer, service layer, and driver layer from top to bottom. As shown in Figure 3, the application layer may include a series of application packages, the application layer may include a host-side communication agent; the service layer may include touch management and connection management; the driver layer may include a pen driver.
在一些实施例中,手写笔200包括但不限于搭载
Figure PCTCN2022092249-appb-000003
Figure PCTCN2022092249-appb-000004
或者其他操作系统的设备。示例性地,手写笔200搭载
Figure PCTCN2022092249-appb-000005
例如,鸿蒙轻量系统,电子设备100搭载
Figure PCTCN2022092249-appb-000006
In some embodiments, stylus 200 includes, but is not limited to
Figure PCTCN2022092249-appb-000003
Figure PCTCN2022092249-appb-000004
or devices with other operating systems. Exemplarily, the stylus 200 carries
Figure PCTCN2022092249-appb-000005
For example, Hongmeng lightweight system, electronic equipment 100 equipped with
Figure PCTCN2022092249-appb-000006
目前,用户在拥有多个电子设备100时,除了会使用手写笔200在多个电子设备100上进行触控操作之外,多个电子设备100之间还可进行投屏操作。在一些实施例中,源(Source)端设备可将投屏界面通过有线或无线方式投屏至目的(Sink)端设备,其中,源端设备为投屏的中心设备,目的端设备为被投屏的设备。Currently, when a user owns multiple electronic devices 100 , in addition to using the stylus 200 to perform touch operations on the multiple electronic devices 100 , the multiple electronic devices 100 can also perform screen projection operations. In some embodiments, the source (Source) end device can cast the screen projection interface to the destination (Sink) end device through wired or wireless means, wherein, the source end device is the central device for screen projection, and the destination end device is the projected device. screen device.
在一些实施例中,源端设备为第一电子设备,目的端设备为第二电子设备,则第一电子设备向第二电子设备投屏。在另一些实施例中,源端设备为第二电子设备,目的端设备为第一电子设备,则第二电子设备向第一电子设备投屏。其中,第一电子设备和第二电子设备均可采用上述图2中所示的电子设备100的硬件结构,且第一电子设备和第二电子设备均可采用上述图3所示的电子设备100的软件结构,此处不再赘述。In some embodiments, the source device is a first electronic device, and the destination device is a second electronic device, and the first electronic device projects a screen to the second electronic device. In some other embodiments, the source device is the second electronic device, and the destination device is the first electronic device, and the second electronic device projects a screen to the first electronic device. Wherein, both the first electronic device and the second electronic device can adopt the hardware structure of the electronic device 100 shown in FIG. 2 above, and both the first electronic device and the second electronic device can adopt the electronic device 100 shown in FIG. 3 above. The software structure of , will not be repeated here.
示例性地,第一电子设备为手机且第二电子设备为平板电脑时或第二电子设备为手机且第一电子设备为平板电脑时,手机将投屏界面投屏至平板电脑,以在平板电脑上显示手机的投屏界面所显示的内容。或者,第一电子设备为手机且第二电子设备为笔记本电脑时或第二电子设备为手机且第一电子设备为笔记本电脑时,手机将投屏界面投屏至笔记本电脑,以在平板电脑上显示手机的投屏界面所显示的内容;或者,第一电子设备为平板电脑且第二电子设备为笔记本电脑时或第二电子设备为平板电脑且第一电子设备为笔记本电脑,平板电脑将投屏界面投屏至笔记本电脑,以在笔记本电脑上显示平板电脑的投屏界面所显示的内容。Exemplarily, when the first electronic device is a mobile phone and the second electronic device is a tablet computer or when the second electronic device is a mobile phone and the first electronic device is a tablet computer, the mobile phone will project the screen projection interface to the tablet computer, so that the The content displayed on the screen projection interface of the mobile phone is displayed on the computer. Alternatively, when the first electronic device is a mobile phone and the second electronic device is a notebook computer, or when the second electronic device is a mobile phone and the first electronic device is a notebook computer, the mobile phone will cast the screen projection interface to the notebook computer to display the screen on the tablet computer. Display the content displayed on the screen projection interface of the mobile phone; or, when the first electronic device is a tablet computer and the second electronic device is a notebook computer or the second electronic device is a tablet computer and the first electronic device is a notebook computer, the tablet computer will project screen to the laptop, so that the content displayed on the screen projection of the tablet can be displayed on the laptop.
本申请实施例中,第一电子设备和第二电子设备之间可通过同源投屏技术或者异源投屏技术实现投屏。若第一电子设备和第二电子设备之间采用同源投屏技术进行投屏时,第一电子设备和第二电子设备同步显示投屏内容。若第一电子设备和第二电子设备之间采用异源投屏技术进行投屏时,第一电子设备和第二电子设备可以不同步显示投屏内容。In the embodiment of the present application, screen projection can be implemented between the first electronic device and the second electronic device through a homologous screen projection technology or a heterogeneous screen projection technology. If the first electronic device and the second electronic device use the same-source screen projection technology to perform screen projection, the first electronic device and the second electronic device synchronously display the screen projection content. If the heterogenous screen projection technology is used between the first electronic device and the second electronic device for screen projection, the first electronic device and the second electronic device may display the screen projection content asynchronously.
在一些实施例中,以第一电子设备通过同源投屏技术向第二电子设备投屏为例。第二电子设备上显示的第一电子设备的投屏界面为第一电子设备的显示界面。例如,第一电子设备的显示界面为视频应用的显示界面,则第二电子设备的协同窗口也显示该视频应用的显示界面;若第一电子设备退出该视频应用,显示主界面时,则第二电子设备的协同窗口也显示第一电子设备的主界面。In some embodiments, it is taken as an example that the first electronic device projects the screen to the second electronic device through the same-source screen projection technology. The screen projection interface of the first electronic device displayed on the second electronic device is the display interface of the first electronic device. For example, if the display interface of the first electronic device is a display interface of a video application, then the collaborative window of the second electronic device also displays the display interface of the video application; if the first electronic device exits the video application and displays the main interface, then the second electronic device The collaboration window of the second electronic device also displays the main interface of the first electronic device.
在另一些实施例中,以第一电子设备通过异源投屏技术向第二电子设备投屏为例。第一电子设备当前显示视频应用的显示界面,第一电子设备将视频应用的显示界面投屏至第二电子设备,以使第二电子设备的协同窗口显示该视频应用的显示界面,此时,第一电子设备的投屏界面为视频应用的显示界面;而后,第一电子设备将视频应用切换到后台运行,前台显示主界面或其它应用的显示界面,而第二电子设备的协同窗口仍然可以显示该视频应用的显示界面,即第一电子设备和第二电子设备不同步显示。In some other embodiments, it is taken as an example that the first electronic device projects a screen to the second electronic device through a heterogeneous screen projection technology. The first electronic device currently displays the display interface of the video application, and the first electronic device projects the display interface of the video application to the second electronic device, so that the collaborative window of the second electronic device displays the display interface of the video application. At this time, The screen projection interface of the first electronic device is the display interface of the video application; then, the first electronic device switches the video application to run in the background, and the main interface or other application display interfaces are displayed in the foreground, while the collaboration window of the second electronic device can still The display interface of the video application is displayed, that is, the first electronic device and the second electronic device are displayed asynchronously.
示例性地,如图4所示,提供了一种投屏的示意图。图4示出了第二电子设备300将 投屏界面投屏至第一电子设备400的应用场景。例如,第二电子设备300为手机,第一电子设备400为平板电脑。Exemplarily, as shown in FIG. 4 , a schematic diagram of screen projection is provided. FIG. 4 shows an application scenario in which the second electronic device 300 projects the screen projection interface to the first electronic device 400. For example, the second electronic device 300 is a mobile phone, and the first electronic device 400 is a tablet computer.
如图4所示,示例性地,第二电子设备300的投屏界面包括状态栏301和菜单栏302。状态栏301包括信号状态、网络状态、电源电量、当前地理位置、当前时间及当地天气。其中,信号状态为满格信号,表示当前信号较强;网络状态包括Wi-Fi网络和蓝牙网络;电源电量中的黑色部分可以表示电子设备的剩余电量;当前地理位置为天津;当前时间为4月17日星期六、辛丑年三月初六、08:08;天津天气为多云且温度为8℃。另外,状态栏301的左上角位置,信号状态的左侧设置有摄像头。菜单栏302包括至少一个应用程序的图标,例如,位于上方一行的
Figure PCTCN2022092249-appb-000007
和图库,位于下方一行的电话、信息、设置和相机。其中,应用程序的图标以及相应的应用程序的名称的位置可以根据用户的喜好进行调整,本申请实施例对此不作限定。
As shown in FIG. 4 , for example, the screen projection interface of the second electronic device 300 includes a status bar 301 and a menu bar 302 . The status column 301 includes signal status, network status, power supply, current geographic location, current time and local weather. Among them, the signal status is a full signal, indicating that the current signal is strong; the network status includes Wi-Fi network and Bluetooth network; the black part of the power supply can indicate the remaining power of the electronic device; the current geographical location is Tianjin; the current time is 4 Saturday, March 17th, the sixth day of March in the Xin Chou Year, 08:08; the weather in Tianjin is cloudy and the temperature is 8°C. In addition, at the upper left corner of the status bar 301 , a camera is set on the left side of the signal status. The menu bar 302 includes icons of at least one application program, for example, the
Figure PCTCN2022092249-appb-000007
and Gallery, along with Phone, Messages, Settings, and Camera on the lower row. Wherein, the positions of the icon of the application program and the name of the corresponding application program may be adjusted according to the preference of the user, which is not limited in this embodiment of the present application.
如图4所示,示例性地,第一电子设备400的投屏界面包括至少一个应用程序的图标,例如,设置、相机和图库。其中,应用程序的图标以及相应的应用程序的名称的位置可以根据用户的喜好进行调整,本申请实施例对此不作限定。As shown in FIG. 4 , for example, the screen projection interface of the first electronic device 400 includes icons of at least one application program, for example, setting, camera and gallery. Wherein, the positions of the icon of the application program and the name of the corresponding application program can be adjusted according to the preference of the user, which is not limited in this embodiment of the present application.
如图4所示,第二电子设备300和第一电子设备400之间建立无线连接,例如,第二电子设备300和第一电子设备400之间可通过华为分享一碰传(Huawei Share OneHop)技术建立无线连接,第二电子设备300将投屏界面投屏至第一电子设备400,第一电子设备400显示第二电子设备300投屏在第一电子设备400上生成的协同窗口500,协同窗口500包括第二电子设备300的投屏界面,从而实现“多屏协同”功能,协同窗口500的内容随着用户在第二电子设备300上的操作相应变化。示例性地,如图4所示,协同窗口500中第二电子设备300的投屏界面的上方还设置有顶部的标题栏,顶部的标题栏包括第二电子设备300的设备名“HUAWEI Mate 40Pro”以及多个功能按钮,例如,多个功能按钮依次为最小化按钮、最大化按钮以及关闭按钮;协同窗口500中第二电子设备300的投屏界面的下方还设置有底部的功能栏,底部的功能栏包括返回键、主桌面键和菜单键,返回键用于返回上一级,主桌面键用于返回主桌面,菜单键用于显示出多个后台应用。As shown in Figure 4, a wireless connection is established between the second electronic device 300 and the first electronic device 400, for example, the second electronic device 300 and the first electronic device 400 can share a touch transmission (Huawei Share OneHop) between the second electronic device 300 and the first electronic device 400. technology to establish a wireless connection, the second electronic device 300 will cast the screen projection interface to the first electronic device 400, and the first electronic device 400 will display the collaboration window 500 generated by the second electronic device 300 on the first electronic device 400. The window 500 includes the screen projection interface of the second electronic device 300 , so as to realize the function of "multi-screen collaboration". Exemplarily, as shown in FIG. 4 , a top title bar is provided above the screen projection interface of the second electronic device 300 in the collaboration window 500, and the top title bar includes the device name of the second electronic device 300 "HUAWEI Mate 40Pro". " and a plurality of function buttons, for example, the plurality of function buttons are a minimize button, a maximize button, and a close button in turn; a function bar at the bottom is also provided below the screen projection interface of the second electronic device 300 in the collaborative window 500, and the bottom The function bar includes a back key, a main desktop key and a menu key. The back key is used to return to the previous level, the main desktop key is used to return to the main desktop, and the menu key is used to display multiple background applications.
本申请实施例中,作为另一种可选方案,作为源端设备的电子设备可同时投屏至多个作为目的端设备的其它电子设备。此种情况未具体画出。In the embodiment of the present application, as another optional solution, an electronic device serving as a source device may simultaneously project a screen to multiple other electronic devices serving as destination devices. This situation is not specifically drawn.
相关技术中,用户在将第一电子设备投屏至第二电子设备或将第二电子设备投屏至第一电子设备时,若需要在第一电子设备和第二电子设备上使用手写笔,则需要手动将手写笔与第一电子设备和第二电子设备分别进行配对,而后在使用过程中还需要手动管理手写笔的连接、断开等操作,使得操作繁琐,从而增加了用户使用手写笔的操作流程,降低了用户体验。In the related art, when the user projects the screen of the first electronic device to the second electronic device or the screen of the second electronic device to the first electronic device, if the user needs to use the stylus on the first electronic device and the second electronic device, Then it is necessary to manually pair the stylus with the first electronic device and the second electronic device respectively, and then manually manage operations such as connection and disconnection of the stylus during use, which makes the operation cumbersome, thereby increasing the user's use of the stylus. The operation process reduces the user experience.
为解决上述相关技术中存在的增加用户使用手写笔的操作流程,降低用户体验的问题,本申请实施例提供了一种手写笔的连接控制方法和电子设备。在一些实施例中,手写笔与第二电子设备建立了第一无线连接,第一电子设备响应于接收到的第二电子设备发送的投屏请求,显示第二电子设备的投屏界面,则第一电子设备自动与手写笔建立第一无线连接,无需用户手动管理第一电子设备与手写笔的连接,从而减少了用户使用手写笔的操作流程,提高了用户体验。在另一些实施例中,第一电子设备响应于接收到的第二电子设备发送的投屏断开指令,停止显示第二电子设备的投屏界面,则第一电子设备查询出自身与手写笔 的第一无线连接是受到投屏操作的触发而建立,自动与手写笔断开第一无线连接,无需用户手动管理第一电子设备与手写笔的断开,从而减少了用户使用手写笔的操作流程,提高了用户体验。In order to solve the problem of increasing the operation process of the user using the stylus and reducing the user experience existing in the above-mentioned related technologies, the embodiments of the present application provide a connection control method of the stylus and an electronic device. In some embodiments, the stylus establishes the first wireless connection with the second electronic device, and the first electronic device displays the screen projection interface of the second electronic device in response to receiving the screen projection request sent by the second electronic device, then The first electronic device automatically establishes the first wireless connection with the stylus, and the user does not need to manually manage the connection between the first electronic device and the stylus, thereby reducing the operation process for the user to use the stylus and improving user experience. In some other embodiments, the first electronic device stops displaying the screen projection interface of the second electronic device in response to receiving the screen projection disconnection instruction sent by the second electronic device, and then the first electronic device inquires about the screen projection interface between itself and the stylus. The first wireless connection is triggered by the screen projection operation and is automatically disconnected from the first wireless connection with the stylus, without the need for the user to manually manage the disconnection of the first electronic device from the stylus, thereby reducing the user's operations with the stylus flow, improving the user experience.
示例性地,图5a至图5d提供了一种手写笔与电子设备建立第一无线连接和第二无线连接的示意图。图5a至图5d示出了手写笔200、第二电子设备300和第一电子设备400,例如,第二电子设备300为手机,第一电子设备400为平板电脑。Exemplarily, FIG. 5a to FIG. 5d provide schematic diagrams of establishing a first wireless connection and a second wireless connection between a stylus and an electronic device. 5a to 5d show the stylus 200, the second electronic device 300 and the first electronic device 400, for example, the second electronic device 300 is a mobile phone, and the first electronic device 400 is a tablet computer.
本申请实施例中,第一无线连接用于实现通用业务数据传输,例如,通用业务数据可包括手写笔的属性、屏幕参数等业务数据;第二无线连接用于实现人机交互业务数据传输,例如,人机交互业务数据可包括手写笔的属性、屏幕参数和手写笔的压力数据等业务数据。In the embodiment of the present application, the first wireless connection is used to realize the transmission of general business data. For example, the general business data may include business data such as the attributes of the stylus and screen parameters; the second wireless connection is used to realize the transmission of human-computer interaction business data. For example, the human-computer interaction business data may include business data such as attributes of the stylus, screen parameters, and pressure data of the stylus.
如图5a所示,用户若使用手写笔200在第二电子设备300上进行触控操作,首先需要将手写笔200与第二电子设备300之间建立第一无线连接。第二电子设备300与手写笔200可通过近距离通信技术建立第一无线连接,近距离通信技术可包括但不限于蓝牙、Wi-Fi或NFC。示例性地,第二电子设备300与手写笔200可通过蓝牙建立第一无线连接,此时,建立的第一无线连接可以为普通属性协议(Generic Attribute Profile,简称GATT)连接。其中,GATT是一个在蓝牙连接之上的发送和接收很短的数据段的通用规范。需要说明的是:本申请实施例中,以第一无线连接为GATT连接为例进行描述。As shown in FIG. 5 a , if the user uses the stylus 200 to perform a touch operation on the second electronic device 300 , firstly, a first wireless connection needs to be established between the stylus 200 and the second electronic device 300 . The second electronic device 300 and the stylus 200 may establish a first wireless connection through a short-range communication technology, and the short-range communication technology may include but not limited to Bluetooth, Wi-Fi or NFC. Exemplarily, the second electronic device 300 and the stylus 200 may establish a first wireless connection through Bluetooth. At this time, the established first wireless connection may be a Generic Attribute Profile (GATT) connection. Among them, GATT is a general specification for sending and receiving very short data segments over a Bluetooth connection. It should be noted that: in the embodiment of the present application, the first wireless connection is a GATT connection as an example for description.
若用户首次在第二电子设备300上使用该手写笔200,则在建立GATT连接之前,第二电子设备300需要先执行与手写笔200之间的配对,具体地,第二电子设备300与手写笔200可通过蓝牙、NFC或者USB-C接口进行配对。而后,第二电子设备300再执行与手写笔200之间的GATT连接的建立。第二电子设备300与手写笔200已配对并建立GATT连接之后,手写笔200可以与第二电子设备300之间建立第二无线连接,用户可以使用手写笔200在第二电子设备300上进行触控操作,例如,第二无线连接为基于GATT的人机接口设备协议(HID Over GATT Protocol,简称HOGP)连接,需要说明的是:本申请实施例中,以第二无线连接为HOGP连接为例进行描述。具体地,手写笔200的笔尖第一次触控第二电子设备300的屏幕时,与第二电子设备300之间建立HOGP连接。如图5a所示,示例性地,第二电子设备300展示手写界面,用户可使用手写笔200在手写界面上进行书写操作,例如,在手写界面上书写“华为”字样。其中,GATT连接可支持手写笔的属性、屏幕参数等业务数据的传输,但不支持手写笔的压力数据的传输;HOGP连接可支持手写笔的属性、屏幕参数和手写笔的压力数据等业务数据的传输。If the user uses the stylus 200 on the second electronic device 300 for the first time, before establishing a GATT connection, the second electronic device 300 needs to perform pairing with the stylus 200, specifically, the second electronic device 300 and the stylus The pen 200 can be paired via Bluetooth, NFC or USB-C interface. Then, the second electronic device 300 performs establishment of a GATT connection with the stylus 200 . After the second electronic device 300 and the stylus 200 have been paired and a GATT connection is established, the stylus 200 can establish a second wireless connection with the second electronic device 300, and the user can use the stylus 200 to touch on the second electronic device 300. For example, the second wireless connection is a GATT-based Human-Machine Interface Device Protocol (HID Over GATT Protocol, HOGP for short) connection. It should be noted that: in the embodiment of this application, the second wireless connection is an HOGP connection as an example to describe. Specifically, when the tip of the stylus 200 touches the screen of the second electronic device 300 for the first time, a HOGP connection is established with the second electronic device 300 . As shown in FIG. 5a , for example, the second electronic device 300 displays a handwriting interface, and the user can use the stylus 200 to perform writing operations on the handwriting interface, for example, writing the word "Huawei" on the handwriting interface. Among them, the GATT connection can support the transmission of business data such as stylus attributes and screen parameters, but does not support the transmission of stylus pressure data; the HOGP connection can support stylus attributes, screen parameters, and stylus pressure data and other business data transmission.
如图5b所示,第一电子设备400与第二电子设备300执行投屏操作,且投屏操作成功。具体地,第二电子设备300将投屏界面投屏至第一电子设备400,第一电子设备400上显示第二电子设备300投屏在第一电子设备400上生成的协同窗口500,协同窗口500包括第二电子设备300的投屏界面,以实现“多屏协同”功能。如图5b所示,示例性地,投屏界面为第二电子设备300的主界面。协同窗口500的内容随着用户在第二电子设备300上的操作相应变化,例如,第二电子设备300显示的内容从主界面变为图5a中的手写界面,则图5b中协同窗口500显示的内容也变为图5a中的手写界面,此种情况未具体画出。As shown in FIG. 5 b , the first electronic device 400 and the second electronic device 300 perform a screen projection operation, and the screen projection operation is successful. Specifically, the second electronic device 300 casts the screen projection interface to the first electronic device 400, and the first electronic device 400 displays the collaboration window 500 generated on the first electronic device 400 by the second electronic device 300 projection. The collaboration window 500 includes a screen projection interface of the second electronic device 300 to realize the "multi-screen collaboration" function. As shown in FIG. 5 b , for example, the screen projection interface is the main interface of the second electronic device 300 . The content of the collaboration window 500 changes accordingly with the user's operations on the second electronic device 300. For example, the content displayed on the second electronic device 300 changes from the main interface to the handwriting interface in FIG. 5a, and the collaboration window 500 in FIG. 5b displays The content of is also changed to the handwriting interface in Fig. 5a, which is not specifically drawn in this case.
如图5c所示,第一电子设备400显示第二电子设备300的投屏界面,可表明投屏操作成功,则第一电子设备400自动与手写笔200建立第一无线连接。第一电子设备400与手写笔200可通过近距离通信技术自动建立第一无线连接,近距离通信技术可包括但不限于 蓝牙、Wi-Fi或NFC。示例性地,第一电子设备400与手写笔200可通过蓝牙自动建立第一无线连接,此时,建立的第一无线连接可以为GATT连接。在建立GATT连接之前,第一电子设备400查询是否与手写笔200已建立GATT连接,若查询出与手写笔200已建立GATT连接,表明在投屏之前第一电子设备400就已经与手写笔200建立GATT连接;若查询出与手写笔200未建立GATT连接可直接执行与手写笔200之间GATT连接的建立。另外,若用户首次在第一电子设备400上使用该手写笔200,则在建立GATT连接之前,第一电子设备400需要执行与手写笔200之间的配对,例如,第一电子设备400可通过蓝牙或NFC执行与手写笔200之间的配对,从而实现了第一电子设备100与手写笔200的自动配对,无需用户手动操作,提高了用户体验。如图5c所示,第一电子设备400与手写笔200建立GATT连接的过程中,第一电子设备400弹出提示框,用户点击提示框中的“连接”按钮,表示同意建立GATT连接,而后第一电子设备400与手写笔200建立GATT连接。如图5c所示,若用户点击提示框中的“取消”,表示不同意建立GATT连接,第一电子设备400与手写笔200建立GATT连接失败。As shown in FIG. 5 c , the first electronic device 400 displays the screen projection interface of the second electronic device 300 , indicating that the screen projection operation is successful, and the first electronic device 400 automatically establishes a first wireless connection with the stylus 200 . The first electronic device 400 and the stylus 200 can automatically establish a first wireless connection through short-range communication technology, which may include but not limited to Bluetooth, Wi-Fi or NFC. Exemplarily, the first electronic device 400 and the stylus 200 may automatically establish a first wireless connection through Bluetooth, and at this time, the established first wireless connection may be a GATT connection. Before establishing a GATT connection, the first electronic device 400 inquires whether a GATT connection has been established with the stylus 200. If it is found that a GATT connection has been established with the stylus 200, it indicates that the first electronic device 400 has already established a GATT connection with the stylus 200 before screen projection. Establish a GATT connection; if it is found out that the GATT connection with the stylus 200 has not been established, the GATT connection with the stylus 200 can be directly established. In addition, if the user uses the stylus 200 on the first electronic device 400 for the first time, before establishing a GATT connection, the first electronic device 400 needs to perform pairing with the stylus 200, for example, the first electronic device 400 can pass Bluetooth or NFC performs pairing with the stylus 200, thereby realizing automatic pairing between the first electronic device 100 and the stylus 200, without manual operation by the user, and improving user experience. As shown in Figure 5c, during the process of establishing a GATT connection between the first electronic device 400 and the stylus 200, the first electronic device 400 pops up a prompt box, and the user clicks the "Connect" button in the prompt box to express agreement to establish a GATT connection, and then the second An electronic device 400 establishes a GATT connection with the stylus 200 . As shown in FIG. 5 c , if the user clicks “cancel” in the prompt box, it means that the establishment of the GATT connection is not agreed, and the establishment of the GATT connection between the first electronic device 400 and the stylus 200 fails.
如图5d所示,第一电子设备400与手写笔200已配对并建立GATT连接之后,第一电子设备400可以与手写笔200自动建立第二无线连接,用户可以使用手写笔200在第一电子设备400上进行触控操作,例如,第二无线连接为HOGP连接。具体地,手写笔200的笔尖第一次接触第一电子设备400的屏幕时,手写笔200断开与第二电子设备300之间建立的HOGP连接,并与第一电子设备400自动建立HOGP连接,从而使得用户可以使用手写笔200在第一电子设备400上进行触控操作。如图5d所示,示例性地,第一电子设备400展示手写界面,用户可使用手写笔200在手写界面上进行书写操作,例如,在手写界面上书写“华为”字样。As shown in Figure 5d, after the first electronic device 400 and the stylus 200 have been paired and a GATT connection is established, the first electronic device 400 can automatically establish a second wireless connection with the stylus 200, and the user can use the stylus 200 on the first electronic A touch operation is performed on the device 400, for example, the second wireless connection is a HOGP connection. Specifically, when the tip of the stylus 200 touches the screen of the first electronic device 400 for the first time, the stylus 200 disconnects the HOGP connection established between the second electronic device 300 and automatically establishes a HOGP connection with the first electronic device 400 , so that the user can use the stylus 200 to perform a touch operation on the first electronic device 400 . As shown in FIG. 5d , for example, the first electronic device 400 displays a handwriting interface, and the user can use the stylus 200 to perform writing operations on the handwriting interface, for example, write "Huawei" on the handwriting interface.
示例性地,图5e提供了一种手写笔与电子设备断开第一无线连接的示意图。在执行完图5a至图5d所示的手写笔与电子设备建立第一无线连接的流程之后,第一电子设备400与第二电子设备300已建立投屏,第二电子设备300和第一电子设备400均与手写笔200已建立GATT连接。如图5e所示,第一电子设备400和第二电子设备300执行投屏断开,且投屏断开成功。具体地,第二电子设备300向第一电子设备400发送投屏断开指令,使得第一电子设备400停止显示第二电子设备300的投屏界面,此时,第一电子设备400上不再显示协同窗口500,第一电子设备400和第二电子设备300投屏时建立的通信通道断开。由于第一电子设备400与手写笔200之间的GATT连接是受到投屏操作的触发而建立的,因此当第一电子设备400与第二电子设备300之间投屏断开时,第一电子设备400自动与手写笔200断开GATT连接。但是,由于第二电子设备300与手写笔200之间的GATT连接不是受到投屏操作的触发而建立的,因此第二电子设备300与手写笔200的GATT连接不受投屏断开的影响,第二电子设备300与手写笔200仍然保持GATT连接。由于第一电子设备400与手写笔200的GATT连接断开,因此第一电子设备400与手写笔200的HOGP连接断开,用户无法在第一电子设备400上使用手写笔200进行触控操作。手写笔200可与第二电子设备300建立HOGP连接,以使用户可在第二电子设备300上使用手写笔200进行触控操作,例如,如图5e所示,用户使用手写笔200在第二电子设备300点击图库图标。另一种情况中,若第一电子设备400与手写笔200的GATT连接不是响应于投屏操作的触发而建立的,则第一电子设备400与手写笔200的GATT连接不受投屏断开的 影响,第一电子设备400与手写笔200仍然保持GATT连接,用户可继续在第一电子设备400上使用手写笔200进行触控操作,此种情况未具体画出。Exemplarily, FIG. 5e provides a schematic diagram of disconnecting the first wireless connection between the stylus and the electronic device. After executing the process of establishing the first wireless connection between the stylus and the electronic device shown in FIGS. The device 400 has established a GATT connection with the stylus 200 . As shown in FIG. 5e , the first electronic device 400 and the second electronic device 300 perform screen projection disconnection, and the screen projection disconnection is successful. Specifically, the second electronic device 300 sends a screen projection disconnection command to the first electronic device 400, so that the first electronic device 400 stops displaying the screen projection interface of the second electronic device 300. The collaboration window 500 is displayed, and the communication channel established when the first electronic device 400 and the second electronic device 300 project screens is disconnected. Since the GATT connection between the first electronic device 400 and the stylus 200 is triggered by the screen projection operation, when the screen projection between the first electronic device 400 and the second electronic device 300 is disconnected, the first electronic device The device 400 disconnects the GATT connection with the stylus 200 automatically. However, since the GATT connection between the second electronic device 300 and the stylus 200 is not triggered by the screen projection operation, the GATT connection between the second electronic device 300 and the stylus 200 is not affected by the disconnection of the screen projection. The second electronic device 300 and the stylus 200 still maintain the GATT connection. Since the GATT connection between the first electronic device 400 and the stylus 200 is disconnected, the HOGP connection between the first electronic device 400 and the stylus 200 is disconnected, and the user cannot use the stylus 200 to perform touch operations on the first electronic device 400 . The stylus 200 can establish a HOGP connection with the second electronic device 300, so that the user can use the stylus 200 to perform touch operations on the second electronic device 300. For example, as shown in FIG. The electronic device 300 clicks the gallery icon. In another case, if the GATT connection between the first electronic device 400 and the stylus 200 is not established in response to the trigger of the screen projection operation, the GATT connection between the first electronic device 400 and the stylus 200 will not be disconnected by the screen projection. The first electronic device 400 and the stylus 200 still maintain a GATT connection, and the user can continue to use the stylus 200 to perform touch operations on the first electronic device 400, which is not specifically shown.
综上所述,若第一电子设备400与手写笔200的GATT连接是受到投屏操作的触发而建立的,则手写笔200与第一电子设备400的连接生命周期与投屏周期一致。即:投屏过程中手写笔200与第一电子设备400和第二电子设备300均保持GATT连接,手写笔200在第一电子设备400和第二电子设备300上可进行触控操作的自由切换;投屏断开时,手写笔200与第一电子设备400断开GATT连接,无法在第一电子设备400上进行触控操作,但是由于手写笔200和第二电子设备300的GATT连接不是受投屏操作的触发而建立的,GATT连接不受投屏断开的影响,因此手写笔200还可与第二电子设备300继续保持GATT连接,且可在第二电子设备300上进行触控操作。从而实现了对手写笔与电子设备之间的连接生命周期的管理。To sum up, if the GATT connection between the first electronic device 400 and the stylus 200 is triggered by the screen projection operation, the connection life cycle between the stylus 200 and the first electronic device 400 is consistent with the screen projection cycle. That is: during the screen projection process, the stylus 200 maintains a GATT connection with both the first electronic device 400 and the second electronic device 300, and the stylus 200 can freely switch between touch operations on the first electronic device 400 and the second electronic device 300 ; When the projection screen is disconnected, the stylus 200 is disconnected from the GATT connection with the first electronic device 400, and the touch operation cannot be performed on the first electronic device 400, but because the GATT connection between the stylus 200 and the second electronic device 300 is not controlled The GATT connection is not affected by the disconnection of the screen projection, so the stylus 200 can continue to maintain the GATT connection with the second electronic device 300, and can perform touch operations on the second electronic device 300 . Thereby, the management of the connection life cycle between the stylus and the electronic device is realized.
需要说明的是,图4、图5a至图5e所示的电子设备的界面示意图为本申请实施例的示例性展示,电子设备的界面示意图也可以为其它样式,本申请实施例对此不作限定。It should be noted that the schematic diagrams of the interfaces of the electronic devices shown in Figure 4 and Figures 5a to 5e are exemplary illustrations of the embodiments of the present application, and the schematic diagrams of the interfaces of the electronic devices can also be in other styles, which are not limited by the embodiments of the present application .
下面通过一个具体的实施例,示例性说明手写笔的连接控制方法的工作流程。图6a是一些实施例中手写笔的连接控制方法的流程图,图6a所示的工作流程可用于实现图5a至图5c所示的手写笔的连接控制方法,如图6a所示,该方法包括:The working flow of the method for controlling the connection of the stylus is exemplified below through a specific embodiment. Figure 6a is a flow chart of the connection control method of the stylus in some embodiments, the workflow shown in Figure 6a can be used to implement the connection control method of the stylus shown in Figure 5a to Figure 5c, as shown in Figure 6a, the method include:
步骤102、第二电子设备与手写笔建立第一无线连接。Step 102, the second electronic device establishes a first wireless connection with the stylus.
示例性地,如图5a所示,第二电子设备300与手写笔200通过蓝牙、Wi-Fi或NFC建立第一无线连接。例如,该第一无线连接为GATT连接。Exemplarily, as shown in FIG. 5 a , the second electronic device 300 establishes a first wireless connection with the stylus 200 through Bluetooth, Wi-Fi or NFC. For example, the first wireless connection is a GATT connection.
若用户首次在第二电子设备300使用手写笔200时,则在步骤102之前可以还包括:步骤100、第二电子设备300执行与手写笔200之间的配对。而后,第二电子设备300再执行与手写笔200之间第一无线连接的建立,即执行步骤102。If the user uses the stylus 200 on the second electronic device 300 for the first time, before step 102 , it may further include: step 100 , the second electronic device 300 executes pairing with the stylus 200 . Then, the second electronic device 300 executes the establishment of the first wireless connection with the stylus 200 , that is, executes step 102 .
若用户需要使用手写笔200在第二电子设备300上进行触控操作时,则在步骤102之后可以还包括:第二电子设备300与手写笔200建立第二无线连接,例如,该第二无线连接为HOGP连接。If the user needs to use the stylus 200 to perform a touch operation on the second electronic device 300, after step 102, it may further include: the second electronic device 300 establishes a second wireless connection with the stylus 200, for example, the second wireless The connection is a HOGP connection.
步骤104、第二电子设备与第一电子设备建立通信通道。Step 104, the second electronic device establishes a communication channel with the first electronic device.
建立通信通道之后,第二电子设备和第一电子设备可通过该通信通道进行投屏过程中数据的传输。After the communication channel is established, the second electronic device and the first electronic device can transmit data during screen projection through the communication channel.
步骤106、第二电子设备向第一电子设备发送投屏请求,该投屏请求包括手写笔的物理地址。Step 106, the second electronic device sends a screen projection request to the first electronic device, and the screen projection request includes the physical address of the stylus.
手写笔的物理地址用于唯一标识一个手写笔,可用于保证手写笔的唯一性。示例性地,手写笔的物理地址包括手写笔的媒体访问控制(Media Access Control,简称MAC)地址,例如,蓝牙MAC地址。The physical address of the stylus is used to uniquely identify a stylus and can be used to ensure the uniqueness of the stylus. Exemplarily, the physical address of the stylus includes a Media Access Control (MAC) address of the stylus, for example, a Bluetooth MAC address.
第二电子设备在向第一电子设备投屏过程中,通过投屏请求将手写笔的物理地址发送给第一电子设备,从而使得第一电子设备在与第二电子设备执行投屏操作过程中从第二电子设备获取手写笔的物理地址。作为另一种可选方案,在步骤104中建立通信通道之后,第二电子设备还可以单独将手写笔的物理地址发送至第一电子设备,例如,在第二电子设备向第一电子设备发送投屏请求之后,第二电子设备将手写笔的物理地址发送至第一电子设备。During the process of screen projection to the first electronic device, the second electronic device sends the physical address of the stylus to the first electronic device through a screen projection request, so that the first electronic device performs the screen projection operation with the second electronic device The physical address of the stylus is obtained from the second electronic device. As another optional solution, after the communication channel is established in step 104, the second electronic device may also send the physical address of the stylus to the first electronic device separately, for example, after the second electronic device sends the first electronic device After the screen projection request, the second electronic device sends the physical address of the stylus to the first electronic device.
该投屏请求包括投屏参数,该投屏参数包括投屏分辨率、传输码率、编码压缩率或关键帧间隔时间中的一个或多个。The screen projection request includes screen projection parameters, and the screen projection parameters include one or more of screen projection resolution, transmission code rate, encoding compression rate, or key frame interval time.
步骤108、第一电子设备响应于投屏请求,显示第二电子设备的投屏界面。Step 108, the first electronic device displays the screen projection interface of the second electronic device in response to the screen projection request.
具体地,如图5b所示,第一电子设备400解析投屏参数,确定出具备接受第二电子设备300投屏的能力之后,接受投屏请求,显示第二电子设备300的投屏界面,从而投屏成功。Specifically, as shown in FIG. 5b, the first electronic device 400 analyzes the screen projection parameters, and after determining that it has the ability to accept the screen projection of the second electronic device 300, accepts the screen projection request and displays the screen projection interface of the second electronic device 300, Thus the projection is successful.
步骤110、第一电子设备向第二电子设备返回投屏成功消息。In step 110, the first electronic device returns a successful screen projection message to the second electronic device.
步骤112、第一电子设备根据手写笔的物理地址,自动与手写笔建立第一无线连接。Step 112, the first electronic device automatically establishes a first wireless connection with the stylus according to the physical address of the stylus.
当第一电子设备上显示第二电子设备的投屏界面,即第二电子设备在第一电子设备上投屏操作成功时,可触发第一电子设备自动与手写笔建立第一无线连接的流程。示例性地,图6b提供了一些实施例中第一电子设备与手写笔配对和建立第一无线连接的方法流程图,其中,第一电子设备与手写笔可通过低功耗蓝牙(Bluetooth Low Energy,简称BLE)技术进行第一无线连接。如图6b所示,步骤112具体可包括:When the screen projection interface of the second electronic device is displayed on the first electronic device, that is, when the screen projection operation of the second electronic device on the first electronic device is successful, the process of automatically establishing the first wireless connection between the first electronic device and the stylus can be triggered . Exemplarily, FIG. 6b provides a flowchart of a method for pairing a first electronic device with a stylus and establishing a first wireless connection in some embodiments, wherein the first electronic device and the stylus can be connected via Bluetooth Low Energy (Bluetooth Low Energy) , referred to as BLE) technology for the first wireless connection. As shown in Figure 6b, step 112 may specifically include:
步骤1122、第一电子设备接收手写笔广播的广播包(Adv)。Step 1122, the first electronic device receives the broadcast packet (Adv) broadcast by the stylus.
步骤1124、第一电子设备根据手写笔的物理地址向手写笔发送连接请求(Page Request)。Step 1124, the first electronic device sends a connection request (Page Request) to the stylus according to the physical address of the stylus.
步骤1126、手写笔向第一电子设备返回连接响应(Page Response)。Step 1126, the stylus returns a connection response (Page Response) to the first electronic device.
步骤1128、手写笔向第一电子设备发送连接建立(Connection Establish)消息。Step 1128, the stylus sends a Connection Establish message to the first electronic device.
在一些实施例中,在步骤112之前还包括:第一电子设备查询是否与手写笔已配对,若与手写笔已配对,则直接执行步骤112;若与手写笔未配对,则先执行步骤111、第一电子设备执行与手写笔之间的配对,配对成功后再执行步骤112。In some embodiments, before step 112, it also includes: the first electronic device inquires whether it has been paired with the stylus, if it has been paired with the stylus, then directly execute step 112; if it is not paired with the stylus, then first execute step 111 . The first electronic device executes pairing with the stylus, and then executes step 112 after the pairing is successful.
具体地,第一电子设备可存储已配对设备信息,该已配对设备信息可包括已配对设备的名称和类型,例如,已配对设备的名称为“HUAWEI PEN”,类型为手写笔。则步骤112中,第一电子设备可查询已配对设备信息中是否包括该手写笔的名称和类型,若是,则表明第一电子设备与手写笔已配对,直接执行步骤112;若否,则表明第一电子设备与手写笔未配对,先执行步骤111,配对成功后再执行步骤112。Specifically, the first electronic device may store paired device information, and the paired device information may include the name and type of the paired device, for example, the name of the paired device is "HUAWEI PEN", and the type is a stylus. Then in step 112, the first electronic device can query whether the name and type of the stylus are included in the paired device information, if so, it indicates that the first electronic device and the stylus have been paired, and directly executes step 112; if not, it indicates If the first electronic device is not paired with the stylus, step 111 is performed first, and step 112 is performed after the pairing is successful.
示例性地,如图6b所示,步骤111具体可包括:Exemplarily, as shown in FIG. 6b, step 111 may specifically include:
步骤1112、第一电子设备根据手写笔的物理地址向手写笔发送配对请求(Pairing Request)。Step 1112, the first electronic device sends a pairing request (Pairing Request) to the stylus according to the physical address of the stylus.
步骤1114、手写笔向第一电子设备返回配对响应(Pairing Response)。Step 1114, the stylus returns a pairing response (Pairing Response) to the first electronic device.
步骤1116、手写笔向第一电子设备发送基于安全管理协议(Secure Manager Protocol,简称SMP)的配对消息。Step 1116, the stylus sends a pairing message based on the Secure Manager Protocol (SMP for short) to the first electronic device.
其中,基于SMP的配对消息为“Paring Over SMP”消息。Among them, the SMP-based pairing message is a "Paring Over SMP" message.
本申请实施例实现了第一电子设备与手写笔的自动配对,无需用户手动操作,提高了用户体验。The embodiment of the present application realizes the automatic pairing between the first electronic device and the stylus without manual operation by the user, thus improving the user experience.
在一些实施例中,第一电子设备若查询出与手写笔已配对,可继续执行如下步骤:第一电子设备查询是否与手写笔已建立第一无线连接,若查询出与手写笔未建立第一无线连接,直接执行步骤112;若查询出与手写笔已建立第一无线连接,则无需再继续执行步骤112。In some embodiments, if the first electronic device finds out that it has been paired with the stylus, it can continue to perform the following steps: the first electronic device inquires whether the first wireless connection has been established with the stylus, and if it finds out that the first wireless connection with the stylus has not been established If there is a wireless connection, directly execute step 112; if it is found out that the first wireless connection has been established with the stylus, it is not necessary to continue to execute step 112.
具体地,第一电子设备可存储已连接设备信息,该已连接设备信息可包括已连接设备的名称和类型,例如,已连接设备的名称为“HUAWEI PEN”,类型为手写笔。则第一电子设备可查询已连接设备信息中是否包括该手写笔的名称和类型,若否,则表明第一电子设备与手写笔未建立第一无线连接,直接执行步骤112;若是,则表明第一电子设备与手写笔已建立第一无线连接,则无需再执行步骤112。Specifically, the first electronic device may store connected device information, and the connected device information may include the name and type of the connected device, for example, the name of the connected device is "HUAWEI PEN", and the type is a stylus. Then the first electronic device can inquire whether the connected device information includes the name and type of the stylus, if not, it indicates that the first electronic device and the stylus have not established the first wireless connection, and directly executes step 112; if so, it indicates If the first electronic device has established the first wireless connection with the stylus, then step 112 does not need to be performed again.
步骤114、第一电子设备记录无线连接建立信息,该无线连接建立信息用于指示第一电子设备与手写笔的第一无线连接是受到投屏操作的触发而建立的。Step 114, the first electronic device records wireless connection establishment information, and the wireless connection establishment information is used to indicate that the first wireless connection between the first electronic device and the stylus is established by being triggered by a screen projection operation.
在一些实施例中,无线连接建立信息可用于指示第一电子设备与手写笔的第一无线连接是否是受到投屏操作的触发而建立的。In some embodiments, the wireless connection establishment information may be used to indicate whether the first wireless connection between the first electronic device and the stylus is established by being triggered by a screen projection operation.
步骤112中,第一电子设备自动与手写笔建立第一无线连接,则步骤114中第一电子设备记录的无线连接建立信息用于指示第一电子设备与手写笔的第一无线连接是受到投屏操作的触发而建立的。In step 112, the first electronic device automatically establishes a first wireless connection with the stylus, and the wireless connection establishment information recorded by the first electronic device in step 114 is used to indicate that the first wireless connection between the first electronic device and the stylus Created by triggering screen operations.
若第一电子设备与手写笔的第一无线连接不是受到投屏操作的触发而建立的,例如,在投屏操作之前,第一电子设备与手写笔已建立第一无线连接,则无线连接建立信息用于指示第一电子设备与手写笔的第一无线连接不是受到投屏操作的触发而建立的。在一些实施例中,针对图3示出的手写笔和电子设备的软件结构框图,手写笔可包括连接管理单元,第一电子设备可包括投屏管理服务单元和手写笔管理服务单元,第二电子设备可包括投屏管理服务单元和手写笔管理服务单元。则示例性地,图6c提供了另一些实施例中手写笔的连接控制方法的流程图,图6c所示的工作流程可用于实现图5a至图5c所示的手写笔的连接控制方法,如图6c所示,该方法包括:If the first wireless connection between the first electronic device and the stylus is not triggered by the screen projection operation, for example, before the screen projection operation, the first electronic device and the stylus have established the first wireless connection, the wireless connection is established The information is used to indicate that the establishment of the first wireless connection between the first electronic device and the stylus is not triggered by the screen projection operation. In some embodiments, for the software structural block diagram of the stylus and the electronic device shown in FIG. The electronic device may include a screen projection management service unit and a stylus management service unit. As an example, FIG. 6c provides a flow chart of the connection control method of the stylus in other embodiments. The workflow shown in FIG. 6c can be used to implement the connection control method of the stylus shown in FIG. 5a to FIG. 5c, as As shown in Figure 6c, the method includes:
步骤202、第二电子设备的手写笔管理服务单元与手写笔的连接管理单元建立第一无线连接。Step 202, the stylus management service unit of the second electronic device establishes a first wireless connection with the stylus connection management unit.
若用户首次在第二电子设备使用手写笔时,则在步骤202之前可以还包括:步骤200、第二电子设备的手写笔管理服务单元与手写笔的连接管理单元执行配对。而后,第二电子设备的手写笔管理服务单元再与手写笔的连接管理单元之间执行第一无线连接的建立,即执行步骤202。If the user uses the stylus on the second electronic device for the first time, before step 202, it may further include: step 200, the stylus management service unit of the second electronic device performs pairing with the connection management unit of the stylus. Then, the stylus management service unit of the second electronic device executes the establishment of the first wireless connection with the connection management unit of the stylus, that is, executes step 202 .
若用户需要使用手写笔在第二电子设备上进行触控操作时,则在步骤202之后可以还包括:第二电子设备的手写笔管理服务单元与手写笔的连接管理单元建立HOGP连接。If the user needs to use a stylus to perform a touch operation on the second electronic device, after step 202 it may further include: the stylus management service unit of the second electronic device establishes a HOGP connection with the stylus connection management unit.
步骤204、第二电子设备的投屏管理服务单元与第一电子设备的投屏管理服务单元建立通信通道。Step 204, the screen projection management service unit of the second electronic device establishes a communication channel with the screen projection management service unit of the first electronic device.
步骤206、第二电子设备的投屏管理服务单元向第一电子设备的投屏管理服务单元发送投屏请求,该投屏请求包括手写笔的物理地址。Step 206, the screen projection management service unit of the second electronic device sends a screen projection request to the screen projection management service unit of the first electronic device, where the screen projection request includes the physical address of the stylus.
步骤208、第一电子设备的投屏管理服务单元响应于投屏请求,显示第二电子设备的投屏界面。Step 208: The screen projection management service unit of the first electronic device displays the screen projection interface of the second electronic device in response to the screen projection request.
步骤210、第一电子设备的投屏管理服务单元向第二电子设备的投屏管理服务单元返回投屏成功消息。Step 210, the screen projection management service unit of the first electronic device returns a screen projection success message to the screen projection management service unit of the second electronic device.
步骤212、第一电子设备的投屏管理服务单元向第一电子设备的手写笔管理服务单元发送建立手写笔连接通知,建立手写笔连接通知包括手写笔的物理地址。Step 212: The screen projection management service unit of the first electronic device sends a stylus connection establishment notification to the stylus management service unit of the first electronic device, and the stylus connection establishment notification includes the physical address of the stylus.
步骤214、第一电子设备的手写笔管理服务单元根据手写笔的物理地址,自动与手写 笔的连接管理单元建立第一无线连接。Step 214: The stylus management service unit of the first electronic device automatically establishes a first wireless connection with the stylus connection management unit according to the physical address of the stylus.
在一些实施例中,在步骤214之前还包括:第一电子设备的手写笔管理服务单元查询是否与手写笔已配对,若与手写笔已配对,则直接执行步骤214;若与手写笔未配对,则先执行如下步骤:第一电子设备的手写笔管理服务单元与手写笔的连接管理单元执行配对,配对成功后再执行步骤214。In some embodiments, before step 214, it also includes: the stylus management service unit of the first electronic device inquires whether it has been paired with the stylus, if it has been paired with the stylus, then directly execute step 214; if it is not paired with the stylus , the following steps are performed first: the stylus management service unit of the first electronic device performs pairing with the stylus connection management unit, and then step 214 is performed after the pairing is successful.
在一些实施例中,第一电子设备的手写笔管理服务单元若查询出与手写笔已配对,可继续执行如下步骤:第一电子设备手写笔管理服务单元查询是否与手写笔已建立第一无线连接,若查询出与手写笔未建立第一无线连接,直接执行步骤214;若查询出与手写笔已建立第一无线连接,则无需再执行步骤214。In some embodiments, if the stylus management service unit of the first electronic device inquires that the stylus has been paired, it may continue to perform the following steps: the stylus management service unit of the first electronic device inquires whether the first wireless communication with the stylus has been established. connection, if it is found that the first wireless connection has not been established with the stylus, directly execute step 214;
步骤216、第一电子设备的手写笔管理服务单元记录无线连接建立信息,该无线连接建立信息用于指示第一电子设备与手写笔的第一无线连接是受到投屏操作的触发而建立的。Step 216, the stylus management service unit of the first electronic device records wireless connection establishment information, the wireless connection establishment information is used to indicate that the first wireless connection between the first electronic device and the stylus is triggered by the screen projection operation.
至此,本实施例实现了如图5c所示的第一电子设备400和手写笔200之间建立第一无线连接。此时,第一电子设备400和第二电子设备300均与手写笔200建立第一无线连接。若手写笔200需要在电子设备上进行触控操作,则需要与该电子设备建立第二无线连接,例如,第二无线连接为HOGP连接。并且手写笔200可通过建立HOGP连接在第一电子设备400和第二电子设备300之间进行自由切换操作。示例性地,图6d是一些实施例中手写笔与电子设备建立HOGP连接的方法流程示意图。以手写笔200与第一电子设备400之间建立HOGP连接为例进行描述,如图6d所示,该方法包括:So far, this embodiment realizes the establishment of the first wireless connection between the first electronic device 400 and the stylus 200 as shown in FIG. 5c. At this time, both the first electronic device 400 and the second electronic device 300 establish a first wireless connection with the stylus 200 . If the stylus 200 needs to perform a touch operation on the electronic device, it needs to establish a second wireless connection with the electronic device, for example, the second wireless connection is a HOGP connection. And the stylus 200 can freely switch between the first electronic device 400 and the second electronic device 300 by establishing a HOGP connection. Exemplarily, Fig. 6d is a schematic flowchart of a method for establishing a HOGP connection between a stylus and an electronic device in some embodiments. Taking the establishment of a HOGP connection between the stylus 200 and the first electronic device 400 as an example for description, as shown in FIG. 6d, the method includes:
步骤302、手写笔与第一电子设备执行建立GATT连接流程,若建立GATT连接成功,则执行步骤304;若建立GATT连接失败,则流程结束。In step 302, the stylus and the first electronic device perform a process of establishing a GATT connection. If the GATT connection is established successfully, then step 304 is performed; if the GATT connection fails to be established, the process ends.
步骤304、手写笔触控第一电子设备的屏幕,以读取第一电子设备的屏幕参数。 Step 304, touch the screen of the first electronic device with the stylus to read the screen parameters of the first electronic device.
手写笔的笔尖第一次触控屏幕时,读取出第一电子设备的屏幕参数,该屏幕参数可包括屏幕类型和/或打码的频点等,例如,屏幕类型可包括内嵌式(in cell)或外嵌式(on cell),打码的频点用于指示存在干扰时需要跳频。When the tip of the stylus touches the screen for the first time, the screen parameters of the first electronic device are read out, and the screen parameters may include screen type and/or coding frequency points, etc., for example, the screen type may include embedded ( in cell) or embedded (on cell), coded frequency points are used to indicate that frequency hopping is required when there is interference.
步骤306、手写笔根据第一电子设备的屏幕参数确定出第一工作模式,第一工作模式为手写笔与第一电子设备的工作模式。 Step 306 , the stylus determines a first working mode according to the screen parameters of the first electronic device, and the first working mode is a working mode between the stylus and the first electronic device.
例如,手写笔根据屏幕类型和打码的频点,确定出第一工作模式为HPP 3.x模式。即:第一工作模式为HPP 3.x模式,即手写笔与第一电子设备连接在HPP 3.x模式。For example, the stylus determines that the first working mode is the HPP 3.x mode according to the screen type and the coding frequency. That is: the first working mode is the HPP 3.x mode, that is, the stylus is connected to the first electronic device in the HPP 3.x mode.
步骤308、手写笔查询是否与其它电子设备已建立HOGP连接,若是,则执行步骤310;若否,则执行步骤318。 Step 308 , the stylus checks whether a HOGP connection has been established with other electronic devices, if yes, execute step 310 ; if not, execute step 318 .
本申请实施例中,其它电子设备可以为第二电子设备,或者其它电子设备可以为第一电子设备和第二电子设备之外的电子设备。In the embodiment of the present application, the other electronic device may be the second electronic device, or the other electronic device may be an electronic device other than the first electronic device and the second electronic device.
步骤310、手写笔与其它电子设备断开HOGP连接。 Step 310, the stylus disconnects the HOGP connection with other electronic devices.
例如,手写笔查询出与第二电子设备已建立HOGP连接,则执行步骤310,手写笔与第二电子设备断开HOGP连接。For example, if the stylus finds out that a HOGP connection has been established with the second electronic device, step 310 is performed, and the stylus disconnects the HOGP connection with the second electronic device.
步骤312、手写笔与第一电子设备建立HOGP连接。 Step 312, the stylus establishes a HOGP connection with the first electronic device.
步骤314、手写笔判断第一工作模式与第二工作模式是否相同,第二工作模式为手写笔与其它电子设备的工作模式,若是,则流程结束;若否,则执行步骤316。 Step 314 , the stylus judges whether the first working mode is the same as the second working mode, the second working mode is the working mode of the stylus and other electronic devices, if yes, the process ends; if not, go to step 316 .
例如,第二工作模式为HPP 3.x模式时,手写笔与该其它电子设备连接在HPP 3.x模式;或者,第二工作模式为HPP 2.x模式时,手写笔与该其它电子设备连接在HPP 2.x模式。需要说明的是:一支手写笔不能与第一电子设备连接在HPP 3.x模式,且同时又与其它电子设备连接在HPP 2.x模式。因此,对于同一支手写笔,第一工作模式和第二工作模式不同时,例如,第一工作模式为HPP 3.x模式,第二工作模式为HPP 2.x模式时,若手写笔与第一电子设备连接在HPP 3.x模式,则无法与其它电子设备连接在HPP 2.x模式。For example, when the second working mode is HPP 3.x mode, the stylus is connected to the other electronic device in HPP 3.x mode; or, when the second working mode is HPP 2.x mode, the stylus is connected to the other electronic device Connect in HPP 2.x mode. It should be noted that a stylus cannot be connected with the first electronic device in HPP 3.x mode, and at the same time be connected with other electronic devices in HPP 2.x mode. Therefore, for the same stylus, when the first working mode and the second working mode are different, for example, when the first working mode is HPP 3.x mode and the second working mode is HPP 2.x mode, if the stylus and the second working mode An electronic device connected in HPP 3.x mode cannot be connected with other electronic devices in HPP 2.x mode.
例如,第一工作模式为HPP 3.x模式,而第二工作模式为HPP 3.x模式,表明手写笔与第一电子设备连接在HPP 3.x模式,同时还可以与其它电子设备连接在HPP 3.x模式,则无需断开手写笔和其它电子设备之间的GATT连接,手写笔与其它电子设备保持GATT连接。For example, the first working mode is HPP 3.x mode, and the second working mode is HPP 3.x mode, indicating that the stylus is connected to the first electronic device in HPP 3.x mode, and can also be connected to other electronic devices in the HPP 3.x mode. In HPP 3.x mode, there is no need to disconnect the GATT connection between the stylus and other electronic devices, and the stylus maintains a GATT connection with other electronic devices.
例如,若第一工作模式为HPP 3.x模式,而第二工作模式为HPP 2.x模式,表明手写笔与第一电子设备连接在HPP 3.x模式,但无法同时与其它电子设备连接在HPP 2.x模式,则手写笔与其它电子设备断开GATT连接。For example, if the first working mode is HPP 3.x mode and the second working mode is HPP 2.x mode, it means that the stylus is connected to the first electronic device in HPP 3.x mode, but it cannot be connected to other electronic devices at the same time In HPP 2.x mode, the stylus is disconnected from other electronic devices through GATT.
步骤316、手写笔和其它电子设备断开GATT连接,流程结束。 Step 316, the stylus and other electronic devices disconnect the GATT connection, and the process ends.
步骤318、手写笔与第一电子设备建立HOGP连接,流程结束。 Step 318, the stylus establishes a HOGP connection with the first electronic device, and the process ends.
当手写笔与第一电子设备建立HOGP连接之后,手写笔就可以在第一电子设备上进行触控操作。After the stylus establishes a HOGP connection with the first electronic device, the stylus can perform a touch operation on the first electronic device.
下面通过另一个具体的实施例,示例性说明手写笔的连接控制方法的工作流程。图7a是另一些实施例中手写笔的连接控制方法的流程图,图7a所示的工作流程可用于实现图5e所示的手写笔的连接控制方法,如图7a所示,该方法包括:The following uses another specific embodiment to exemplify the workflow of the method for controlling the connection of the stylus. Fig. 7a is a flow chart of a method for controlling the connection of a stylus in other embodiments. The workflow shown in Fig. 7a can be used to implement the method for controlling the connection of a stylus shown in Fig. 5e. As shown in Fig. 7a, the method includes:
步骤402、第一电子设备接收第二电子设备发送的投屏断开指令,该投屏断开指令包括手写笔的物理地址。Step 402, the first electronic device receives a screen projection disconnection command sent by the second electronic device, and the screen projection disconnection command includes the physical address of the stylus.
示例性地,手写笔的物理地址包括手写笔的MAC地址,例如,蓝牙MAC地址。Exemplarily, the physical address of the stylus includes a MAC address of the stylus, for example, a Bluetooth MAC address.
第二电子设备通过投屏断开指令将手写笔的物理地址发送给第一电子设备,从而使得第一电子设备在与第二电子设备执行投屏断开过程中从第二电子设备获取手写笔的物理地址。The second electronic device sends the physical address of the stylus to the first electronic device through the screen projection disconnection command, so that the first electronic device obtains the stylus from the second electronic device during the screen projection disconnection process with the second electronic device physical address.
步骤404、第一电子设备响应于投屏断开指令,停止显示第二电子设备的投屏界面。Step 404, the first electronic device stops displaying the screen projection interface of the second electronic device in response to the screen projection disconnection instruction.
具体地,如图5e所示,第一电子设备400不再显示第二电子设备300的投屏界面。Specifically, as shown in FIG. 5e , the first electronic device 400 no longer displays the screen projection interface of the second electronic device 300 .
步骤406、第一电子设备向第二电子设备返回投屏断开成功消息。Step 406, the first electronic device returns a screen projection disconnection success message to the second electronic device.
步骤408、第一电子设备查询出自身与手写笔的第一无线连接是受到投屏操作的触发而建立的。Step 408, the first electronic device finds out that the first wireless connection between itself and the stylus is triggered by the screen projection operation.
步骤410、第一电子设备根据手写笔的物理地址,自动与手写笔断开第一无线连接。Step 410, the first electronic device automatically disconnects the first wireless connection with the stylus according to the physical address of the stylus.
在步骤408中,第一电子设备查询自身与手写笔的第一无线连接是否是受到投屏操作的触发而建立的;若查询出自身与手写笔的第一无线连接是受到投屏操作的触发而建立的,则执行步骤410;若查询出自身与手写笔的第一无线连接不是受到投屏操作的触发而建立的,则不执行步骤410,第一电子设备保持与手写笔的第一无线连接。In step 408, the first electronic device inquires whether the first wireless connection between itself and the stylus is triggered by a screen projection operation; if it is found that the first wireless connection between itself and the stylus is triggered by a screen projection operation If the first wireless connection between itself and the stylus is not triggered by the screen projection operation, step 410 is not performed, and the first electronic device maintains the first wireless connection with the stylus. connect.
具体地,第一电子设备根据记录的无线连接建立信息,查询自身与手写笔的第一无线连接是否是受到投屏操作的触发而建立的。Specifically, according to the recorded wireless connection establishment information, the first electronic device inquires whether the first wireless connection between itself and the stylus is triggered by a screen projection operation.
在步骤408中查询自身与手写笔的第一无线连接是否是受到投屏操作的触发而建立的 之前,还包括:第一电子设备查询是否处于与手写笔已建立第一无线连接的状态,若是,则执行步骤408;若否,表明第一电子设备与手写笔断开第一无线连接,则可以不再执行步骤408和步骤410。Before inquiring in step 408 whether the first wireless connection between itself and the stylus is triggered by the screen projection operation, it also includes: the first electronic device inquires whether it is in the state of establishing the first wireless connection with the stylus, if , then execute step 408; if no, it indicates that the first electronic device disconnects the first wireless connection with the stylus, then step 408 and step 410 may not be executed again.
至此,本实施例实现了如图5e所示的第一电子设备400和手写笔200之间断开第一无线连接。So far, this embodiment realizes disconnection of the first wireless connection between the first electronic device 400 and the stylus 200 as shown in FIG. 5e.
在一些实施例中,针对图3示出的手写笔和电子设备的软件结构框图,手写笔可包括连接管理单元,第一电子设备可包括投屏管理服务单元和手写笔管理服务单元,第二电子设备可包括投屏管理服务单元和手写笔管理服务单元。则示例性地,图7b提供了另一些实施例中手写笔的连接控制方法的流程图,图7b所示的工作流程可用于实现图5e所示的手写笔的连接控制方法,如图7b所示,该方法包括:In some embodiments, for the software structural block diagram of the stylus and the electronic device shown in FIG. The electronic device may include a screen projection management service unit and a stylus management service unit. As an example, FIG. 7b provides a flow chart of the connection control method of the stylus in other embodiments. The workflow shown in FIG. 7b can be used to implement the connection control method of the stylus shown in FIG. 5e, as shown in FIG. 7b , the method includes:
步骤502、第一电子设备的投屏管理服务单元接收第二电子设备的投屏管理服务单元发送的投屏断开指令,该投屏断开指令包括手写笔的物理地址。Step 502, the screen projection management service unit of the first electronic device receives a screen projection disconnection instruction sent by the screen projection management service unit of the second electronic device, and the screen projection disconnection instruction includes the physical address of the stylus.
步骤504、第一电子设备的投屏管理服务单元响应于投屏断开指令,停止显示第二电子设备的投屏界面。Step 504, the screen projection management service unit of the first electronic device stops displaying the screen projection interface of the second electronic device in response to the screen projection disconnection instruction.
步骤506、第一电子设备的投屏管理服务单元向第二电子设备的投屏管理服务单元返回投屏断开成功消息。Step 506, the screen projection management service unit of the first electronic device returns a screen projection disconnection success message to the screen projection management service unit of the second electronic device.
步骤508、第一电子设备的投屏管理服务单元向第一电子设备的手写笔管理服务单元发送断开手写笔连接通知,该断开手写笔连接通知包括手写笔的物理地址。Step 508 , the screen projection management service unit of the first electronic device sends a stylus connection disconnection notification to the stylus management service unit of the first electronic device, and the stylus connection disconnection notification includes the physical address of the stylus.
步骤510、第一电子设备的手写笔管理服务单元查询出自身与手写笔的第一无线连接是受到投屏操作的触发而建立的。Step 510, the stylus management service unit of the first electronic device finds out that the first wireless connection between itself and the stylus is triggered by a screen projection operation.
在一些实施例中,在步骤510之前还包括:第一电子设备的手写笔管理服务单元查询是否处于与手写笔已建立第一无线连接的状态,若是,则直接执行步骤510;若否,表明第一电子设备与手写笔断开第一无线连接,则可以不再执行步骤510和步骤512。In some embodiments, before step 510, it also includes: the stylus management service unit of the first electronic device inquires whether it is in the state of establishing the first wireless connection with the stylus, if yes, directly executes step 510; if not, indicates If the first electronic device disconnects the first wireless connection with the stylus, then step 510 and step 512 may not be executed again.
步骤512、第一电子设备的手写笔管理服务单元根据手写笔的物理地址,自动与手写笔的连接管理单元断开第一无线连接。Step 512, the stylus management service unit of the first electronic device automatically disconnects the first wireless connection with the stylus connection management unit according to the physical address of the stylus.
上述图5a至图5e中所示的方案提供了一种场景:手写笔与作为源端设备的第二电子设备建立第一无线连接,当第二电子设备将投屏界面成功投屏至作为目的端设备的第一电子设备时,触发第一电子设备主动与手写笔建立第一无线连接;当第二电子设备与第一电子设备成功断开投屏时,触发第一电子设备主动与手写笔断开第一无线连接。The solutions shown in Figures 5a to 5e above provide a scenario: the stylus establishes a first wireless connection with the second electronic device as the source device, and when the second electronic device successfully projects the screen-casting interface to the target When the first electronic device of the terminal device is used, the first electronic device is triggered to actively establish a first wireless connection with the stylus; when the second electronic device and the first electronic device are successfully disconnected from the first electronic device Disconnect the first wireless connection.
在另一些实施例中,还提供了另一种场景:手写笔与作为目的端设备的第二电子设备建立第一无线连接,当作为源端设备的第一电子设备将投屏界面成功投屏至第二电子设备时,触发第一电子设备主动与手写笔建立第一无线连接;当第二电子设备与第一电子设备成功断开投屏时,触发第一电子设备主动与手写笔断开第一无线连接。示例性地,图8a至图8d提供了另一种手写笔与电子设备建立第一无线连接和第二无线连接的示意图。图8a至图8d示出了手写笔200、第一电子设备600和第二电子设备700,例如,第一电子设备600为手机,第二电子设备700为平板电脑。In other embodiments, another scenario is provided: the stylus establishes a first wireless connection with the second electronic device as the destination device, and when the first electronic device as the source device successfully casts the screen projection interface When connecting to the second electronic device, trigger the first electronic device to actively establish a first wireless connection with the stylus; when the second electronic device and the first electronic device successfully disconnect the screen projection, trigger the first electronic device to actively disconnect from the stylus First wireless connection. Exemplarily, FIGS. 8a to 8d provide another schematic diagram of establishing a first wireless connection and a second wireless connection between a stylus and an electronic device. 8a to 8d show the stylus 200, the first electronic device 600 and the second electronic device 700, for example, the first electronic device 600 is a mobile phone, and the second electronic device 700 is a tablet computer.
如图8a所示,用户若使用手写笔200在第二电子设备700上进行触控操作,首先需要将手写笔200与第二电子设备700之间建立第一无线连接。第二电子设备700与手写笔200可通过近距离通信技术建立第一无线连接,近距离通信技术可包括但不限于蓝牙、Wi-Fi 或NFC。示例性地,第二电子设备700与手写笔200可通过蓝牙建立第一无线连接,此时,建立的第一无线连接可以为GATT连接。As shown in FIG. 8 a , if the user uses the stylus 200 to perform a touch operation on the second electronic device 700 , it is first necessary to establish a first wireless connection between the stylus 200 and the second electronic device 700 . The second electronic device 700 and the stylus 200 may establish a first wireless connection through a short-range communication technology, and the short-range communication technology may include but not limited to Bluetooth, Wi-Fi or NFC. Exemplarily, the second electronic device 700 and the stylus 200 may establish a first wireless connection through Bluetooth, and at this time, the established first wireless connection may be a GATT connection.
若用户首次在第二电子设备700上使用该手写笔200,则在建立GATT连接之前,第二电子设备700需要先执行与手写笔200之间的配对,具体地,第二电子设备700与手写笔200可通过蓝牙、NFC或者USB-C接口进行配对。而后,第二电子设备700再执行与手写笔200之间的GATT连接的建立。第二电子设备700与手写笔200已配对并建立GATT连接之后,手写笔200可以与第二电子设备700之间建立第二无线连接,用户可以使用手写笔200在第二电子设备700上进行触控操作,例如,第二无线连接为HOGP连接。具体地,手写笔200的笔尖第一次触控第二电子设备700的屏幕时,与第二电子设备700之间建立HOGP连接。如图8a所示,示例性地,第二电子设备700展示手写界面,用户可使用手写笔200在手写界面上进行书写操作,例如,在手写界面上书写“华为”字样。If the user uses the stylus 200 on the second electronic device 700 for the first time, before establishing a GATT connection, the second electronic device 700 needs to perform pairing with the stylus 200, specifically, the second electronic device 700 and the stylus The pen 200 can be paired via Bluetooth, NFC or USB-C interface. Then, the second electronic device 700 performs establishment of a GATT connection with the stylus 200 . After the second electronic device 700 and the stylus 200 have been paired and a GATT connection is established, the stylus 200 can establish a second wireless connection with the second electronic device 700, and the user can use the stylus 200 to touch on the second electronic device 700. control operations, for example, the second wireless connection is a HOGP connection. Specifically, when the tip of the stylus 200 touches the screen of the second electronic device 700 for the first time, a HOGP connection is established with the second electronic device 700 . As shown in FIG. 8a , for example, the second electronic device 700 displays a handwriting interface, and the user can use the stylus 200 to perform writing operations on the handwriting interface, for example, writing the word "Huawei" on the handwriting interface.
如图8b所示,第一电子设备600与第二电子设备700执行投屏操作,且投屏操作成功。具体地,第一电子设备600将投屏界面投屏至第二电子设备700,第二电子设备700上显示第一电子设备600投屏在第二电子设备700上生成的协同窗口500,协同窗口500包括第一电子设备600的投屏界面,以实现“多屏协同”功能。如图8b所示,示例性地,投屏界面为第一电子设备600的主界面。协同窗口500的内容随着用户在第一电子设备600上的操作相应变化。As shown in FIG. 8b , the first electronic device 600 and the second electronic device 700 perform a screen projection operation, and the screen projection operation is successful. Specifically, the first electronic device 600 casts the screen projection interface to the second electronic device 700, and the second electronic device 700 displays the collaborative window 500 generated on the second electronic device 700 by the first electronic device 600. The collaborative window 500 includes a screen projection interface of the first electronic device 600 to realize the "multi-screen collaboration" function. As shown in FIG. 8 b , for example, the screen projection interface is the main interface of the first electronic device 600 . The content of the collaboration window 500 changes correspondingly with the user's operation on the first electronic device 600 .
如图8b所示,第二电子设备700显示第一电子设备600的投屏界面,则表明投屏操作成功。则如图8c所示,第一电子设备600自动与手写笔200建立第一无线连接,第一电子设备600与手写笔200可通过近距离通信技术自动建立第一无线连接,近距离通信技术可包括但不限于蓝牙、Wi-Fi或NFC。示例性地,第一电子设备600与手写笔200可通过蓝牙自动建立第一无线连接,此时,建立的第一无线连接可以为GATT连接。在建立GATT连接之前,第一电子设备600查询是否与手写笔200已建立GATT连接,若查询出与手写笔200已建立GATT连接,表明在投屏之前第一电子设备600就已经与手写笔200建立GATT连接;若查询出与手写笔200未建立GATT连接,可直接执行与手写笔200之间GATT连接的建立。另外,若用户首次在第一电子设备600上使用该手写笔200,则在建立GATT连接之前,第一电子设备600需要执行与手写笔200之间的配对,例如,第一电子设备600可通过蓝牙或NFC执行与手写笔200之间的配对,从而实现了第一电子设备600与手写笔200的自动配对,无需用户手动操作,提高了用户体验。如图8c所示,第一电子设备600与手写笔200建立GATT连接的过程中,第一电子设备600弹出提示框,用户点击提示框中的“连接”按钮,表示同意建立GATT连接,而后第一电子设备600与手写笔200建立GATT连接。如图8c所示,若用户点击提示框中的“取消”,表示不同意建立GATT连接,第一电子设备600与手写笔200建立GATT连接失败。As shown in FIG. 8b, if the second electronic device 700 displays the screen projection interface of the first electronic device 600, it indicates that the screen projection operation is successful. Then, as shown in FIG. 8c, the first electronic device 600 automatically establishes a first wireless connection with the stylus 200, and the first electronic device 600 and the stylus 200 can automatically establish the first wireless connection through short-range communication technology. Including but not limited to Bluetooth, Wi-Fi or NFC. Exemplarily, the first electronic device 600 and the stylus 200 may automatically establish a first wireless connection through Bluetooth, and at this time, the established first wireless connection may be a GATT connection. Before establishing a GATT connection, the first electronic device 600 inquires whether a GATT connection has been established with the stylus 200. If it is found that a GATT connection has been established with the stylus 200, it indicates that the first electronic device 600 has already established a GATT connection with the stylus 200 before screen projection. Establish a GATT connection; if it is found out that the GATT connection with the stylus 200 has not been established, the GATT connection with the stylus 200 can be directly established. In addition, if the user uses the stylus 200 on the first electronic device 600 for the first time, before establishing a GATT connection, the first electronic device 600 needs to perform pairing with the stylus 200, for example, the first electronic device 600 can pass Bluetooth or NFC performs pairing with the stylus 200, thereby realizing automatic pairing between the first electronic device 600 and the stylus 200, without manual operation by the user, and improving user experience. As shown in Figure 8c, during the process of establishing a GATT connection between the first electronic device 600 and the stylus 200, the first electronic device 600 pops up a prompt box, and the user clicks the "Connect" button in the prompt box to express agreement to establish a GATT connection, and then the second An electronic device 600 establishes a GATT connection with the stylus 200 . As shown in FIG. 8 c , if the user clicks "cancel" in the prompt box, it means that the establishment of the GATT connection is not agreed, and the establishment of the GATT connection between the first electronic device 600 and the stylus 200 fails.
如图8d所示,第一电子设备600与手写笔200已配对并建立GATT连接之后,第一电子设备600可以与手写笔200自动建立第二无线连接,用户可以使用手写笔200在第一电子设备600上进行触控操作,例如,第二无线连接为HOGP连接。具体地,手写笔200的笔尖第一次接触第一电子设备600的屏幕时,手写笔200断开与第二电子设备700之间建立的HOGP连接,并与第一电子设备600自动建立HOGP连接,从而使得用户可以使用手写笔200在第一电子设备600上进行触控操作。如图8d所示,示例性地,第一电子设 备600展示手写界面,用户可使用手写笔200在手写界面上进行书写操作,例如,在手写界面上书写“华为”字样。As shown in Figure 8d, after the first electronic device 600 and the stylus 200 have been paired and a GATT connection is established, the first electronic device 600 can automatically establish a second wireless connection with the stylus 200, and the user can use the stylus 200 on the first electronic A touch operation is performed on the device 600, for example, the second wireless connection is a HOGP connection. Specifically, when the tip of the stylus 200 touches the screen of the first electronic device 600 for the first time, the stylus 200 disconnects the HOGP connection established between the second electronic device 700 and automatically establishes a HOGP connection with the first electronic device 600 , so that the user can use the stylus 200 to perform a touch operation on the first electronic device 600 . As shown in FIG. 8d, for example, the first electronic device 600 displays a handwriting interface, and the user can use the stylus 200 to perform writing operations on the handwriting interface, for example, write the word "Huawei" on the handwriting interface.
示例性地,图8e提供了另一种手写笔与电子设备断开第一无线连接的示意图。在执行完图8a至图8d所示的手写笔与电子设备建立第一无线连接的流程之后,第一电子设备600与第二电子设备700已建立投屏,第一电子设备600和第二电子设备700均与手写笔200已建立GATT连接。如图8e所示,第一电子设备600和第二电子设备700执行投屏断开,且投屏断开成功。具体地,第一电子设备600向第二电子设备700发送投屏断开指令,使得第二电子设备700停止显示第一电子设备600的投屏界面,此时,第二电子设备700上不再显示协同窗口500,第一电子设备600和第二电子设备700投屏时建立的通信通道断开。由于第一电子设备600与手写笔200之间的GATT连接是受到投屏操作的触发而建立的,因此当第一电子设备600与第二电子设备700之间投屏断开时,第一电子设备600自动与手写笔200断开GATT连接。但是,由于第二电子设备700与手写笔200的GATT连接不是受到投屏操作的触发而建立的,因此第二电子设备700与手写笔200的GATT连接不受投屏断开的影响,第二电子设备700与手写笔200仍然保持GATT连接。由于第一电子设备600与手写笔200的GATT连接断开,因此第一电子设备600与手写笔200的HOGP连接断开,用户无法在第一电子设备600上使用手写笔200进行触控操作。手写笔200可与第二电子设备700建立HOGP连接,以使用户可在第二电子设备700上使用手写笔200进行触控操作,例如,如图8e所示,用户使用手写笔200在第二电子设备700点击图库图标。另一种情况中,若第一电子设备600与手写笔200的GATT连接不是受到投屏操作的触发而建立的,则第一电子设备600与手写笔200的GATT连接不受投屏断开的影响,第一电子设备600与手写笔200仍然保持GATT连接,用户可继续在第一电子设备600上使用手写笔200进行触控操作,此种情况未具体画出。Exemplarily, FIG. 8e provides another schematic diagram of disconnecting the first wireless connection between the stylus and the electronic device. After executing the process of establishing the first wireless connection between the stylus and the electronic device shown in Figure 8a to Figure 8d, the first electronic device 600 and the second electronic device 700 have established screen projection, The device 700 has established a GATT connection with the stylus 200 . As shown in FIG. 8e , the first electronic device 600 and the second electronic device 700 perform screen projection disconnection, and the screen projection disconnection is successful. Specifically, the first electronic device 600 sends a screen projection disconnection command to the second electronic device 700, so that the second electronic device 700 stops displaying the screen projection interface of the first electronic device 600. At this time, the second electronic device 700 no longer The collaboration window 500 is displayed, and the communication channel established when the first electronic device 600 and the second electronic device 700 project screens is disconnected. Since the GATT connection between the first electronic device 600 and the stylus 200 is triggered by the screen projection operation, when the screen projection between the first electronic device 600 and the second electronic device 700 is disconnected, the first electronic device The device 600 disconnects the GATT connection with the stylus 200 automatically. However, since the GATT connection between the second electronic device 700 and the stylus 200 is not triggered by the screen projection operation, the GATT connection between the second electronic device 700 and the stylus 200 is not affected by the disconnection of the screen projection. The electronic device 700 and the stylus 200 still maintain the GATT connection. Since the GATT connection between the first electronic device 600 and the stylus 200 is disconnected, the HOGP connection between the first electronic device 600 and the stylus 200 is disconnected, and the user cannot use the stylus 200 to perform touch operations on the first electronic device 600 . The stylus 200 can establish a HOGP connection with the second electronic device 700, so that the user can use the stylus 200 to perform touch operations on the second electronic device 700. For example, as shown in FIG. The electronic device 700 clicks on the gallery icon. In another case, if the GATT connection between the first electronic device 600 and the stylus 200 is not triggered by the screen projection operation, the GATT connection between the first electronic device 600 and the stylus 200 is not affected by the disconnection of the screen projection. As a result, the first electronic device 600 and the stylus 200 still maintain a GATT connection, and the user can continue to use the stylus 200 to perform touch operations on the first electronic device 600 , which is not shown in detail.
需要说明的是,图8a至图8e所示的电子设备的界面示意图为本申请实施例的示例性展示,电子设备的界面示意图也可以为其它样式,本申请实施例对此不作限定。It should be noted that the schematic diagrams of the interface of the electronic device shown in FIG. 8a to FIG. 8e are exemplary representations of the embodiment of the present application, and the schematic diagram of the interface of the electronic device may also be in other styles, which is not limited in the embodiment of the present application.
下面通过一个具体的实施例,示例性说明手写笔的连接控制方法的工作流程。图9a是另一些实施例中手写笔的连接控制方法的流程图,图9a所示的工作流程可用于实现图8a至图8c所示的手写笔的连接控制方法,如图9a所示,该方法包括:The working flow of the method for controlling the connection of the stylus is exemplified below through a specific embodiment. Fig. 9a is a flow chart of the connection control method of the stylus in other embodiments. The workflow shown in Fig. 9a can be used to realize the connection control method of the stylus shown in Fig. 8a to Fig. 8c, as shown in Fig. 9a, the Methods include:
步骤602、第二电子设备与手写笔建立第一无线连接。Step 602, the second electronic device establishes a first wireless connection with the stylus.
步骤604、第二电子设备与第一电子设备建立通信通道。Step 604, the second electronic device establishes a communication channel with the first electronic device.
步骤606、第一电子设备向第二电子设备发送投屏请求。Step 606, the first electronic device sends a screen projection request to the second electronic device.
步骤608、第二电子设备响应于投屏请求,显示第一电子设备的投屏界面。Step 608, the second electronic device displays the screen projection interface of the first electronic device in response to the screen projection request.
步骤610、第二电子设备向第一电子设备返回投屏成功消息,该投屏成功消息包括手写笔的物理地址。Step 610, the second electronic device returns a screen casting success message to the first electronic device, and the screen casting success message includes the physical address of the stylus.
第一电子设备在向第二电子设备投屏过程中,第二电子设备通过投屏成功消息将手写笔的物理地址发送给第一电子设备,从而使得第一电子设备在与第二电子设备执行投屏操作过程中从第二电子设备获取手写笔的物理地址。作为另一种可选方案,在步骤604中建立通信通道之后,第二电子设备还可以单独将手写笔的物理地址发送至第一电子设备,例如,在第二电子设备向第一电子设备发送投屏成功消息之前,第二电子设备将手写笔的物理地址发送至第一电子设备。When the first electronic device is projecting the screen to the second electronic device, the second electronic device sends the physical address of the stylus to the first electronic device through a successful screen projection message, so that the first electronic device performs The physical address of the stylus is acquired from the second electronic device during the screen projection operation. As another optional solution, after the communication channel is established in step 604, the second electronic device may also send the physical address of the stylus to the first electronic device separately, for example, after the second electronic device sends the first electronic device Before the screen casting success message, the second electronic device sends the physical address of the stylus to the first electronic device.
步骤612、第一电子设备根据手写笔的物理地址,自动与手写笔建立第一无线连接。Step 612, the first electronic device automatically establishes a first wireless connection with the stylus according to the physical address of the stylus.
步骤614、第一电子设备记录无线连接建立信息,该无线连接建立信息用于指示第一电子设备与手写笔的第一无线连接是受到投屏操作的触发而建立的。Step 614, the first electronic device records wireless connection establishment information, and the wireless connection establishment information is used to indicate that the first wireless connection between the first electronic device and the stylus is established by being triggered by the screen projection operation.
在一些实施例中,针对图3示出的手写笔和电子设备的软件结构框图,手写笔可包括连接管理单元,第一电子设备可包括投屏管理服务单元和手写笔管理服务单元,第二电子设备可包括投屏管理服务单元和手写笔管理服务单元。则示例性地,图9b提供了另一些实施例中手写笔的连接控制方法的流程图,图9b所示的工作流程可用于实现图8a至图8c所示的手写笔的连接控制方法,如图9b所示,该方法包括:In some embodiments, for the software structural block diagram of the stylus and the electronic device shown in FIG. The electronic device may include a screen projection management service unit and a stylus management service unit. As an example, FIG. 9b provides a flow chart of the connection control method of the stylus in other embodiments. The workflow shown in FIG. 9b can be used to implement the connection control method of the stylus shown in FIG. 8a to FIG. 8c, as As shown in Figure 9b, the method includes:
步骤702、第二电子设备的手写笔管理服务单元与手写笔的连接管理单元建立第一无线连接。Step 702, the stylus management service unit of the second electronic device establishes a first wireless connection with the stylus connection management unit.
步骤704、第二电子设备的投屏管理服务单元与第一电子设备的投屏管理服务单元建立通信通道。Step 704, the screen projection management service unit of the second electronic device establishes a communication channel with the screen projection management service unit of the first electronic device.
步骤706、第一电子设备的投屏管理服务单元向第二电子设备的投屏管理服务单元发送投屏请求。Step 706, the screen projection management service unit of the first electronic device sends a screen projection request to the screen projection management service unit of the second electronic device.
步骤708、第二电子设备的投屏管理服务单元响应于投屏请求,显示第一电子设备的投屏界面。Step 708: The screen projection management service unit of the second electronic device displays the screen projection interface of the first electronic device in response to the screen projection request.
步骤710、第二电子设备的投屏管理服务单元向第一电子设备的投屏管理服务单元返回投屏成功消息,该投屏成功消息包括手写笔的物理地址。Step 710, the screen projection management service unit of the second electronic device returns a screen projection success message to the screen projection management service unit of the first electronic device, and the screen projection success message includes the physical address of the stylus.
步骤712、第一电子设备的投屏管理服务单元向第一电子设备的手写笔管理服务单元发送建立手写笔连接通知,建立手写笔连接通知包括手写笔的物理地址。Step 712: The screen projection management service unit of the first electronic device sends a stylus connection establishment notification to the stylus management service unit of the first electronic device, and the stylus connection establishment notification includes the physical address of the stylus.
步骤714、第一电子设备的手写笔管理服务单元根据手写笔的物理地址,自动与手写笔的连接管理单元建立第一无线连接。Step 714: The stylus management service unit of the first electronic device automatically establishes a first wireless connection with the stylus connection management unit according to the physical address of the stylus.
在一些实施例中,在步骤714之前还包括:第一电子设备的手写笔管理服务单元查询是否与手写笔已配对,若与手写笔已配对,则直接执行步骤714;若与手写笔未配对,则执行如下步骤:第一电子设备的手写笔管理服务单元与手写笔的连接管理单元执行配对,配对成功后再执行步骤714。In some embodiments, before step 714, it also includes: the stylus management service unit of the first electronic device inquires whether it has been paired with the stylus, if it has been paired with the stylus, then directly execute step 714; if it is not paired with the stylus , the following steps are performed: the stylus management service unit of the first electronic device performs pairing with the stylus connection management unit, and then step 714 is performed after the pairing is successful.
在一些实施例中,第一电子设备的手写笔管理服务单元若查询出与手写笔已配对,可继续执行如下步骤:第一电子设备手写笔管理服务单元查询是否与手写笔已建立第一无线连接,若查询出与手写笔未建立第一无线连接,直接执行步骤714;若查询出与手写笔已建立第一无线连接,则无需再执行步骤714。In some embodiments, if the stylus management service unit of the first electronic device inquires that the stylus has been paired, it may continue to perform the following steps: the stylus management service unit of the first electronic device inquires whether the first wireless communication with the stylus has been established. connection, if it is found that the first wireless connection has not been established with the stylus, directly perform step 714;
步骤716、第一电子设备的手写笔管理服务单元记录无线连接建立信息,该无线连接建立信息用于指示第一电子设备与手写笔的第一无线连接是受到投屏操作的触发而建立的。Step 716, the stylus management service unit of the first electronic device records wireless connection establishment information, the wireless connection establishment information is used to indicate that the first wireless connection between the first electronic device and the stylus is triggered by the screen projection operation.
至此,本实施例实现了如图8c所示的第一电子设备600和手写笔200之间建立第一无线连接。此时,第一电子设备600和第二电子设备700均与手写笔200建立第一无线连接。若手写笔200需要在电子设备上进行触控操作,则需要与该电子设备建立第二无线连接,该第二无线连接为HOGP连接。并且手写笔200可通过建立HOGP连接在第一电子设备600和第二电子设备700之间进行自由切换操作。示例性地,手写笔与第一电子设备建立HOGP连接的方法流程示意图可如图6d所示。So far, this embodiment realizes the establishment of the first wireless connection between the first electronic device 600 and the stylus 200 as shown in FIG. 8 c . At this point, both the first electronic device 600 and the second electronic device 700 establish a first wireless connection with the stylus 200 . If the stylus 200 needs to perform a touch operation on the electronic device, it needs to establish a second wireless connection with the electronic device, and the second wireless connection is a HOGP connection. And the stylus 200 can freely switch between the first electronic device 600 and the second electronic device 700 by establishing a HOGP connection. Exemplarily, a schematic flowchart of a method for establishing a HOGP connection between the stylus and the first electronic device may be shown in FIG. 6d.
下面通过另一个具体的实施例,示例性说明手写笔的连接控制方法的工作流程。图10a是另一些实施例中手写笔的连接控制方法的流程图,图10a所示的工作流程可用于实现图8e所示的手写笔的连接控制方法,如图10a所示,该方法包括:The following uses another specific embodiment to exemplify the workflow of the method for controlling the connection of the stylus. Fig. 10a is a flowchart of a connection control method of a stylus in other embodiments. The workflow shown in Fig. 10a can be used to realize the connection control method of a stylus shown in Fig. 8e. As shown in Fig. 10a, the method includes:
步骤802、第二电子设备接收第一电子设备发送的投屏断开指令。Step 802, the second electronic device receives a screen projection disconnection instruction sent by the first electronic device.
步骤804、第二电子设备响应于投屏断开指令,停止显示第一电子设备的投屏界面。Step 804, the second electronic device stops displaying the screen projection interface of the first electronic device in response to the screen projection disconnection instruction.
步骤806、第二电子设备向第二电子设备返回投屏断开成功消息,该投屏断开成功消息包括手写笔的物理地址。Step 806, the second electronic device returns a screen projection disconnection success message to the second electronic device, and the screen projection disconnection success message includes the physical address of the stylus.
第二电子设备通过投屏断开成功消息将手写笔的物理地址发送给第一电子设备,从而使得第一电子设备在与第二电子设备执行投屏断开过程中从第二电子设备获取手写笔的物理地址。The second electronic device sends the physical address of the stylus to the first electronic device through a screen projection disconnection success message, so that the first electronic device obtains handwriting from the second electronic device during the screen projection disconnection process with the second electronic device The physical address of the pen.
步骤808、第一电子设备查询出自身与手写笔的第一无线连接是受到投屏操作的触发而建立的。Step 808, the first electronic device finds out that the first wireless connection between itself and the stylus is triggered by a screen projection operation.
步骤810、第一电子设备根据手写笔的物理地址,自动与手写笔断开第一无线连接。Step 810, the first electronic device automatically disconnects the first wireless connection with the stylus according to the physical address of the stylus.
在步骤808中,第一电子设备查询自身与手写笔的第一无线连接是否是受到投屏操作的触发而建立的;若查询出自身与手写笔的第一无线连接是受到投屏操作的触发而建立的,则执行步骤810;若查询出自身与手写笔的第一无线连接不是受到投屏操作的触发而建立的,则不执行步骤810,第一电子设备保持与手写笔的第一无线连接。In step 808, the first electronic device inquires whether the first wireless connection between itself and the stylus is triggered by a screen projection operation; if it is found that the first wireless connection between itself and the stylus is triggered by a screen projection operation If the first wireless connection between itself and the stylus is not triggered by the screen projection operation, step 810 is not performed, and the first electronic device maintains the first wireless connection with the stylus. connect.
具体地,第一电子设备根据记录的无线连接建立信息,查询自身与手写笔的第一无线连接是否是受到投屏操作的触发而建立的。Specifically, according to the recorded wireless connection establishment information, the first electronic device inquires whether the first wireless connection between itself and the stylus is triggered by a screen projection operation.
在步骤808中查询自身与手写笔的第一无线连接是否是响应于投屏操作成功而建立的之前,还包括:第一电子设备查询是否处于与手写笔已建立第一无线连接的状态,若是,则执行步骤808;若否,表明第一电子设备与手写笔断开第一无线连接,则可以不再执行步骤808和步骤810。Before inquiring in step 808 whether the first wireless connection between itself and the stylus is established in response to the success of the screen projection operation, it also includes: the first electronic device inquires whether it is in the state of establishing the first wireless connection with the stylus, if , then execute step 808; if no, it indicates that the first electronic device disconnects the first wireless connection with the stylus, then step 808 and step 810 may not be executed again.
至此,本实施例实现了如图8e所示的第一电子设备400和手写笔200之间断开第一无线连接。So far, this embodiment realizes disconnection of the first wireless connection between the first electronic device 400 and the stylus 200 as shown in FIG. 8e.
在一些实施例中,针对图3示出的手写笔和电子设备的软件结构框图,手写笔可包括连接管理单元,第一电子设备可包括投屏管理服务单元和手写笔管理服务单元,第二电子设备可包括投屏管理服务单元和手写笔管理服务单元。则示例性地,图10b提供了另一些实施例中手写笔的连接控制方法的流程图,图10b所示的工作流程可用于实现图8e所示的手写笔的连接控制方法,如图10b所示,该方法包括:In some embodiments, for the software structural block diagram of the stylus and the electronic device shown in FIG. The electronic device may include a screen projection management service unit and a stylus management service unit. As an example, Fig. 10b provides a flow chart of the method for controlling the connection of the stylus in other embodiments, and the workflow shown in Fig. 10b can be used to implement the method for controlling the connection of the stylus shown in Fig. 8e, as shown in Fig. 10b , the method includes:
步骤902、第二电子设备的投屏管理服务单元接收第一电子设备的投屏管理服务单元发送的投屏断开指令。Step 902, the screen projection management service unit of the second electronic device receives the screen projection disconnection instruction sent by the screen projection management service unit of the first electronic device.
步骤904、第二电子设备的投屏管理服务单元响应于投屏断开指令,停止显示第一电子设备的投屏界面。Step 904, the screen projection management service unit of the second electronic device stops displaying the screen projection interface of the first electronic device in response to the screen projection disconnection instruction.
步骤906、第二电子设备的投屏管理服务单元向第一电子设备的投屏管理服务单元返回投屏断开成功消息,该投屏断开成功消息包括手写笔的物理地址。Step 906: The screen projection management service unit of the second electronic device returns a screen projection disconnection success message to the screen projection management service unit of the first electronic device, and the screen projection disconnection success message includes the physical address of the stylus.
步骤908、第一电子设备的投屏管理服务单元向第一电子设备的手写笔管理服务单元发送断开手写笔连接通知,该断开手写笔连接通知包括手写笔的物理地址。Step 908, the screen projection management service unit of the first electronic device sends a notification of disconnecting the stylus to the stylus management service unit of the first electronic device, where the notification of disconnecting the stylus includes the physical address of the stylus.
步骤910、第一电子设备的手写笔管理服务单元查询出自身与手写笔的第一无线连接 是受到投屏操作的触发而建立的。Step 910, the stylus management service unit of the first electronic device finds out that the first wireless connection between itself and the stylus is triggered by the screen projection operation.
在一些实施例中,在步骤910之前还包括:第一电子设备的手写笔管理服务单元查询是否处于与手写笔已建立第一无线连接的状态,若是,则直接执行步骤910;若否,表明第一电子设备与手写笔断开第一无线连接,则可以不再执行步骤910和步骤912。In some embodiments, before step 910, it also includes: the stylus management service unit of the first electronic device inquires whether it is in the state of establishing the first wireless connection with the stylus, if yes, directly executes step 910; if not, indicates If the first electronic device disconnects the first wireless connection with the stylus, then step 910 and step 912 may not be executed again.
步骤912、第一电子设备的手写笔管理服务单元根据手写笔的物理地址,自动与手写笔的连接管理单元断开第一无线连接。Step 912: The stylus management service unit of the first electronic device automatically disconnects the first wireless connection with the stylus connection management unit according to the physical address of the stylus.
本申请实施例中,手写笔与第二电子设备建立了第一无线连接,第一电子设备响应于接收到的第二电子设备发送的投屏请求,显示第二电子设备的投屏界面,则第一电子设备自动与手写笔建立第一无线连接,无需用户手动管理第一电子设备与手写笔的连接,从而减少了用户使用手写笔的操作流程,提高了用户体验。In the embodiment of the present application, the stylus establishes the first wireless connection with the second electronic device, and the first electronic device displays the screen projection interface of the second electronic device in response to the received screen projection request sent by the second electronic device, then The first electronic device automatically establishes the first wireless connection with the stylus, and the user does not need to manually manage the connection between the first electronic device and the stylus, thereby reducing the operation process for the user to use the stylus and improving user experience.
本申请实施例中,第一电子设备响应于接收到的第二电子设备发送的投屏断开指令,停止显示第二电子设备的投屏界面,则第一电子设备查询出自身与手写笔的第一无线连接是受到投屏操作的触发而建立,自动与手写笔断开第一无线连接,无需用户手动管理第一电子设备与手写笔的断开,从而减少了用户使用手写笔的操作流程,提高了用户体验。In the embodiment of the present application, the first electronic device stops displaying the screen projection interface of the second electronic device in response to the received screen projection disconnection command sent by the second electronic device, and then the first electronic device inquires the connection between itself and the stylus. The first wireless connection is established by being triggered by the screen projection operation, and automatically disconnects the first wireless connection with the stylus, eliminating the need for the user to manually manage the disconnection of the first electronic device from the stylus, thereby reducing the user's operation process for using the stylus , improving the user experience.
本申请实施例提供了一种第一电子设备,该第一电子设备可以是终端设备也可以是内置于所述终端设备的电路设备。该电子设备包括:显示屏;一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述设备执行时,使得所述设备可以用于执行上述手写笔的连接控制方法实施例中的各个步骤。An embodiment of the present application provides a first electronic device, and the first electronic device may be a terminal device or a circuit device built in the terminal device. The electronic device comprises: a display screen; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs Instructions are included, and when the instructions are executed by the device, the device can be used to execute the various steps in the above embodiment of the connection control method for the stylus.
本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当该指令在计算机上运行时,使得计算机执行如上述手写笔的连接控制方法实施例中的各个步骤。An embodiment of the present application provides a computer-readable storage medium, and instructions are stored in the computer-readable storage medium, and when the instructions are run on a computer, the computer is made to execute each of the above-mentioned embodiments of the connection control method for the stylus. step.
本申请实施例提供了一种包含指令的计算机程序产品,当所述计算机程序产品在计算机或任一至少一种处理器上运行时,使得所述计算机执行上述手写笔的连接控制方法实施例中的各个步骤。An embodiment of the present application provides a computer program product containing instructions. When the computer program product runs on a computer or any at least one processor, the computer executes the method described in the above embodiment of the connection control method for the stylus. each step.
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. "And/or" describes the association relationship of associated objects, indicating that there may be three kinds of relationships, for example, A and/or B may indicate that A exists alone, A and B exist simultaneously, or B exists alone. Among them, A and B can be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, and c may be single or multiple.
本领域普通技术人员可以意识到,本文中公开的实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can appreciate that each unit and algorithm steps described in the embodiments disclosed herein can be realized by a combination of electronic hardware, computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本 申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。In several embodiments provided in this application, if any function is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准。The foregoing is only a specific implementation of the present application. Any person skilled in the art within the technical scope disclosed in the present application can easily think of changes or substitutions, which should be covered by the protection scope of the present application. The protection scope of the present application shall be based on the protection scope of the claims.

Claims (27)

  1. 一种手写笔的连接控制方法,其特征在于,所述方法应用于第一电子设备,所述手写笔与第二电子设备建立了第一无线连接,所述第一无线连接用于实现通用业务数据传输;A connection control method for a stylus, characterized in that the method is applied to a first electronic device, and the stylus establishes a first wireless connection with a second electronic device, and the first wireless connection is used to implement general services data transmission;
    所述方法包括:The methods include:
    所述第一电子设备接收所述第二电子设备发送的投屏请求;The first electronic device receives the screen projection request sent by the second electronic device;
    所述第一电子设备响应于所述投屏请求,显示所述第二电子设备的投屏界面;The first electronic device displays a screen projection interface of the second electronic device in response to the screen projection request;
    所述第一电子设备自动与所述手写笔建立所述第一无线连接。The first electronic device automatically establishes the first wireless connection with the stylus.
  2. 根据权利要求1所述的方法,其特征在于,所述第一电子设备自动与所述手写笔建立所述第一无线连接之前,还包括:The method according to claim 1, wherein before the first electronic device automatically establishes the first wireless connection with the stylus, further comprising:
    所述第一电子设备若与所述手写笔未配对,所述第一电子设备先执行与所述手写笔之间的配对,再执行与所述手写笔之间所述第一无线连接的建立;和/或,If the first electronic device is not paired with the stylus, the first electronic device first performs pairing with the stylus, and then performs the establishment of the first wireless connection with the stylus ;and / or,
    所述第一电子设备若与所述手写笔已配对,直接执行所述第一电子设备与所述手写笔之间所述第一无线连接的建立。If the first electronic device is paired with the stylus, directly implement the establishment of the first wireless connection between the first electronic device and the stylus.
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一电子设备自动与所述手写笔建立所述第一无线连接之后,还包括:The method according to claim 1 or 2, wherein after the first electronic device automatically establishes the first wireless connection with the stylus, further comprising:
    所述第一电子设备记录无线连接建立信息,所述无线连接建立信息用于指示自身与所述手写笔的第一无线连接是受到投屏操作的触发而建立的。The first electronic device records wireless connection establishment information, where the wireless connection establishment information is used to indicate that the first wireless connection between itself and the stylus is established by being triggered by a screen projection operation.
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述第一电子设备自动与所述手写笔建立所述第一无线连接,包括:The method according to any one of claims 1 to 3, wherein the first electronic device automatically establishes the first wireless connection with the stylus, comprising:
    所述第一电子设备根据执行投屏操作过程中从所述第二电子设备获取的所述手写笔的物理地址,自动与所述手写笔建立所述第一无线连接。The first electronic device automatically establishes the first wireless connection with the stylus according to the physical address of the stylus obtained from the second electronic device during the screen projection operation.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述投屏请求包括所述手写笔的物理地址。The method according to any one of claims 1 to 4, wherein the screen projection request includes the physical address of the stylus.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述第一电子设备自动与所述手写笔建立所述第一无线连接之后,还包括:The method according to any one of claims 1 to 5, wherein after the first electronic device automatically establishes the first wireless connection with the stylus, further comprising:
    所述第一电子设备接收所述第二电子设备发送的投屏断开指令;The first electronic device receives the screen projection disconnection instruction sent by the second electronic device;
    所述第一电子设备响应于投屏断开指令,停止显示所述第二电子设备的投屏界面;The first electronic device stops displaying the screen projection interface of the second electronic device in response to the screen projection disconnection instruction;
    所述第一电子设备查询出自身与所述手写笔的第一无线连接是受到投屏操作的触发而建立,自动与所述手写笔断开所述第一无线连接。The first electronic device finds out that the first wireless connection between itself and the stylus is triggered by a screen projection operation, and automatically disconnects the first wireless connection with the stylus.
  7. 根据权利要求6所述的方法,其特征在于,所述查询出自身与所述手写笔的第一无线连接是受到投屏操作的触发而建立,包括:The method according to claim 6, wherein the querying that the first wireless connection between itself and the stylus is triggered by a screen projection operation includes:
    所述第一电子设备根据记录的无线连接建立信息,查询出自身与所述手写笔的第一无线连接是受到投屏操作的触发而建立的。According to the recorded wireless connection establishment information, the first electronic device finds out that the first wireless connection between itself and the stylus is triggered by a screen projection operation.
  8. 根据权利要求6或7所述的方法,其特征在于,所述自动与所述手写笔断开所述第一无线连接,包括:The method according to claim 6 or 7, wherein the automatically disconnecting the first wireless connection with the stylus includes:
    所述第一电子设备根据执行投屏断开过程中从所述第二电子设备获取的所述手写笔的物理地址,自动与所述手写笔断开第一无线连接。The first electronic device automatically disconnects the first wireless connection with the stylus according to the physical address of the stylus acquired from the second electronic device during the screen projection disconnection process.
  9. 根据权利要求6至8任一项所述的方法,其特征在于,所述投屏断开指令包括所 述手写笔的物理地址。The method according to any one of claims 6 to 8, wherein the screen projection disconnection command includes the physical address of the stylus.
  10. 根据权利要求1至9任一项所述的方法,其特征在于,所述手写笔与所述第二电子设备建立了第二无线连接,所述第二无线连接用于实现人机交互业务数据传输;The method according to any one of claims 1 to 9, wherein the stylus establishes a second wireless connection with the second electronic device, and the second wireless connection is used to realize human-computer interaction business data transmission;
    所述第一电子设备自动与所述手写笔建立所述第一无线连接之后,还包括:After the first electronic device automatically establishes the first wireless connection with the stylus, it further includes:
    所述第一电子设备在所述手写笔与所述第二电子设备断开所述第二无线连接之后,与所述手写笔自动建立所述第二无线连接。The first electronic device automatically establishes the second wireless connection with the stylus after the stylus disconnects the second wireless connection with the second electronic device.
  11. 根据权利要求1至10任一项所述的方法,其特征在于,所述第一无线连接为普通属性协议GATT连接。The method according to any one of claims 1 to 10, wherein the first wireless connection is a GATT connection.
  12. 根据权利要求1至11任一项所述的方法,其特征在于,所述第二无线连接为基于GATT的人机接口设备协议HOGP连接。The method according to any one of claims 1 to 11, wherein the second wireless connection is a GATT-based HOGP connection.
  13. 一种手写笔的连接控制方法,其特征在于,所述方法应用于第一电子设备,所述手写笔与第二电子设备建立了第一无线连接,所述第一无线连接用于实现通用业务数据传输;A connection control method for a stylus, characterized in that the method is applied to a first electronic device, and the stylus establishes a first wireless connection with a second electronic device, and the first wireless connection is used to implement general services data transmission;
    所述方法包括:The methods include:
    所述第一电子设备向所述第二电子设备发送投屏请求,以将自身的投屏界面在所述第二电子设备上显示;The first electronic device sends a screen projection request to the second electronic device to display its own screen projection interface on the second electronic device;
    所述第一电子设备接收所述第二电子设备返回的投屏成功消息;The first electronic device receives the screen projection success message returned by the second electronic device;
    所述第一电子设备自动与所述手写笔建立所述第一无线连接。The first electronic device automatically establishes the first wireless connection with the stylus.
  14. 根据权利要求13所述的方法,其特征在于,所述第一电子设备自动与所述手写笔建立所述第一无线连接之前,还包括:The method according to claim 13, wherein before the first electronic device automatically establishes the first wireless connection with the stylus, further comprising:
    所述第一电子设备若与所述手写笔未配对,所述第一电子设备先执行与所述手写笔之间的配对,再执行与所述手写笔之间所述第一无线连接的建立;和/或,If the first electronic device is not paired with the stylus, the first electronic device first performs pairing with the stylus, and then performs the establishment of the first wireless connection with the stylus ;and / or,
    所述第一电子设备若与所述手写笔已配对,直接执行所述第一电子设备与所述手写笔之间所述第一无线连接的建立。If the first electronic device is paired with the stylus, directly implement the establishment of the first wireless connection between the first electronic device and the stylus.
  15. 根据权利要求13或14所述的方法,其特征在于,所述第一电子设备自动与所述手写笔建立所述第一无线连接之后,还包括:The method according to claim 13 or 14, wherein after the first electronic device automatically establishes the first wireless connection with the stylus, further comprising:
    所述第一电子设备记录无线连接建立信息,所述无线连接建立信息用于指示自身与所述手写笔的第一无线连接是受到投屏操作的触发而建立的。The first electronic device records wireless connection establishment information, where the wireless connection establishment information is used to indicate that the first wireless connection between itself and the stylus is established by being triggered by a screen projection operation.
  16. 根据权利要求13至15任一项所述的方法,其特征在于,所述第一电子设备自动与所述手写笔建立所述第一无线连接,包括:The method according to any one of claims 13 to 15, wherein the first electronic device automatically establishes the first wireless connection with the stylus, comprising:
    所述第一电子设备根据执行投屏操作过程中从所述第二电子设备获取的所述手写笔的物理地址,自动与所述手写笔建立所述第一无线连接。The first electronic device automatically establishes the first wireless connection with the stylus according to the physical address of the stylus obtained from the second electronic device during the screen projection operation.
  17. 根据权利要求13至16任一项所述的方法,其特征在于,所述投屏成功消息包括所述手写笔的物理地址。The method according to any one of claims 13 to 16, wherein the screen casting success message includes the physical address of the stylus.
  18. 根据权利要求13至17任一项所述的方法,其特征在于,所述第一电子设备自动与所述手写笔建立所述第一无线连接之后,还包括:The method according to any one of claims 13 to 17, wherein after the first electronic device automatically establishes the first wireless connection with the stylus, further comprising:
    所述第一电子设备向所述第二电子设备发送投屏断开指令,以使自身的投屏界面停止在所述第二电子设备上显示;The first electronic device sends a screen projection disconnection command to the second electronic device, so that its own screen projection interface stops being displayed on the second electronic device;
    所述第一电子设备接收所述第二电子设备返回的投屏断开成功消息;The first electronic device receives the screen projection disconnection success message returned by the second electronic device;
    所述第一电子设备查询出自身与所述手写笔的第一无线连接是受到投屏操作的触发而建立,自动与所述手写笔断开所述第一无线连接。The first electronic device finds out that the first wireless connection between itself and the stylus is triggered by a screen projection operation, and automatically disconnects the first wireless connection with the stylus.
  19. 根据权利要求18所述的方法,其特征在于,所述查询出自身与所述手写笔的第一无线连接是受到投屏操作的触发而建立,包括:The method according to claim 18, wherein the querying that the first wireless connection between itself and the stylus is triggered by a screen projection operation includes:
    所述第一电子设备根据记录的无线连接建立信息,查询出自身与所述手写笔的第一无线连接是受到投屏操作的触发而建立的。According to the recorded wireless connection establishment information, the first electronic device finds out that the first wireless connection between itself and the stylus is triggered by a screen projection operation.
  20. 根据权利要求18或19所述的方法,其特征在于,所述自动与所述手写笔断开所述第一无线连接,包括:The method according to claim 18 or 19, wherein the automatically disconnecting the first wireless connection with the stylus includes:
    所述第一电子设备根据执行投屏断开过程中从所述第二电子设备获取的所述手写笔的物理地址,自动与所述手写笔断开第一无线连接。The first electronic device automatically disconnects the first wireless connection with the stylus according to the physical address of the stylus acquired from the second electronic device during the screen projection disconnection process.
  21. 根据权利要求18至20任一项所述的方法,其特征在于,所述投屏断开成功消息包括所述手写笔的物理地址。The method according to any one of claims 18 to 20, wherein the screen projection disconnection success message includes the physical address of the stylus.
  22. 根据权利要求13至21任一项所述的方法,其特征在于,所述手写笔与所述第二电子设备建立了第二无线连接,所述第二无线连接用于实现人机交互业务数据传输;The method according to any one of claims 13 to 21, wherein the stylus establishes a second wireless connection with the second electronic device, and the second wireless connection is used to realize human-computer interaction business data transmission;
    所述第一电子设备与所述手写笔建立所述第一无线连接之后,还包括:After the first electronic device establishes the first wireless connection with the stylus, it further includes:
    所述第一电子设备在所述手写笔与所述第二电子设备断开所述第二无线连接之后,与所述手写笔自动建立所述第二无线连接。The first electronic device automatically establishes the second wireless connection with the stylus after the stylus disconnects the second wireless connection with the second electronic device.
  23. 根据权利要求13至22任一项所述的方法,其特征在于,所述第一无线连接为GATT连接。The method according to any one of claims 13 to 22, wherein the first wireless connection is a GATT connection.
  24. 根据权利要求13至23任一项所述的方法,其特征在于,所述第二无线连接为HOGP连接。The method according to any one of claims 13 to 23, wherein the second wireless connection is a HOGP connection.
  25. 一种第一电子设备,其特征在于,包括:显示屏;一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述设备执行时,使得所述设备执行权利要求1至12任一项所述的手写笔的连接控制方法或者权利要求13至24任一项所述的手写笔的连接控制方法。A first electronic device, characterized by comprising: a display screen; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, The one or more computer programs include instructions, and when the instructions are executed by the device, the device executes the connection control method of a stylus according to any one of claims 1 to 12 or claims 13 to 24 The connection control method of the stylus described in any one.
  26. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括存储的程序,其中,在所述程序运行时控制所述计算机可读存储介质所在设备执行权利要求1至12中任一项所述的手写笔的连接控制方法或者权利要求13至24任一项所述的手写笔的连接控制方法。A computer-readable storage medium, characterized in that the computer-readable storage medium includes a stored program, wherein, when the program is running, the device where the computer-readable storage medium is located is controlled to execute any one of claims 1 to 12. A connection control method of a stylus or a connection control method of a stylus according to any one of claims 13 to 24.
  27. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在计算机或任一至少一种处理器上运行时,使得所述计算机执行如权利要求1至12中任一项所述的手写笔的连接控制方法或者权利要求13至24任一项所述的手写笔的连接控制方法。A computer program product comprising instructions, characterized in that, when the computer program product is run on a computer or any at least one processor, the computer is made to execute the program described in any one of claims 1 to 12. The connection control method of the stylus or the connection control method of the stylus according to any one of claims 13 to 24.
PCT/CN2022/092249 2021-05-26 2022-05-11 Method for controlling connection of stylus, and electronic device WO2022247638A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110578582.1 2021-05-26
CN202110578582.1A CN115407885A (en) 2021-05-26 2021-05-26 Connection control method of stylus and electronic equipment

Publications (1)

Publication Number Publication Date
WO2022247638A1 true WO2022247638A1 (en) 2022-12-01

Family

ID=84156051

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/092249 WO2022247638A1 (en) 2021-05-26 2022-05-11 Method for controlling connection of stylus, and electronic device

Country Status (2)

Country Link
CN (1) CN115407885A (en)
WO (1) WO2022247638A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117135602A (en) * 2023-04-25 2023-11-28 荣耀终端有限公司 Data interaction method for handwriting pen multi-connection scene, handwriting pen and Bluetooth system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110347269A (en) * 2019-06-06 2019-10-18 华为技术有限公司 A kind of sky mouse mode implementation method and relevant device
US20200249773A1 (en) * 2019-02-01 2020-08-06 Samsung Electronics Co., Ltd. Electronic device and method for mapping function of electronic device to operation of stylus pen

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200249773A1 (en) * 2019-02-01 2020-08-06 Samsung Electronics Co., Ltd. Electronic device and method for mapping function of electronic device to operation of stylus pen
CN110347269A (en) * 2019-06-06 2019-10-18 华为技术有限公司 A kind of sky mouse mode implementation method and relevant device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117135602A (en) * 2023-04-25 2023-11-28 荣耀终端有限公司 Data interaction method for handwriting pen multi-connection scene, handwriting pen and Bluetooth system

Also Published As

Publication number Publication date
CN115407885A (en) 2022-11-29

Similar Documents

Publication Publication Date Title
WO2021078284A1 (en) Content continuation method and electronic device
WO2020168965A1 (en) Method for controlling electronic device having folding screen, and electronic device
US11683850B2 (en) Bluetooth reconnection method and related apparatus
WO2020134872A1 (en) Message processing method, related device, and system
WO2020224449A1 (en) Split-screen display operation method and electronic device
WO2021052279A1 (en) Foldable screen display method and electronic device
WO2020216156A1 (en) Screen projection method and computing device
CN111132234B (en) Data transmission method and corresponding terminal
US20220086735A1 (en) Method and Device for Controlling Connection to Network
WO2022100610A1 (en) Screen projection method and apparatus, and electronic device and computer-readable storage medium
CN111182614B (en) Method and device for establishing network connection and electronic equipment
CN114079893B (en) Bluetooth communication method, terminal device and computer readable storage medium
WO2021037146A1 (en) File sharing method and device for mobile terminal
CN112130788A (en) Content sharing method and device
AU2018443268B2 (en) File transfer method and electronic device
WO2021197071A1 (en) Wireless communication system and method
EP4180944A1 (en) Screen mirroring abnormality processing method and electronic device
CN113672133A (en) Multi-finger interaction method and electronic equipment
WO2020221062A1 (en) Navigation operation method and electronic device
US20230087282A1 (en) Dual wi-fi connection method and electronic device
WO2022247638A1 (en) Method for controlling connection of stylus, and electronic device
WO2023051204A1 (en) Cross-device connection method, electronic device and storage medium
WO2023236670A1 (en) Data transmission management method, electronic device and storage medium
WO2023116472A1 (en) Method for receiving and sending red envelope, and electronic device
EP4290375A1 (en) Display method, electronic device and system

Legal Events

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

Ref document number: 22810365

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22810365

Country of ref document: EP

Kind code of ref document: A1