Multi-device switching data communication method, capacitance pen, device, storage medium and computer program product

By updating the connection identification code and disconnecting the current connection, the capacitance pen can quickly switch between multiple devices, solving the problem of high switching delay of the capacitance pen in the prior art and improving the smoothness.

CN119088233APending Publication Date: 2024-12-06MAXEYE SMART TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411152428.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

When switching between multiple terminal devices, existing capacitance pens require users to manually re-probe, pair and connect, resulting in high delays and affecting fluency.

Method used

By obtaining and updating the connection identification code, disconnecting the current connection and communicating with the new device, the capacitor pen can be quickly switched between multiple devices and reduced delay.

Benefits of technology

The device can be switched quickly without re-pairing, reducing the switching delay of the capacitor pen between multiple devices and improving writing fluency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088233A_ABST
    Figure CN119088233A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-device switching data communication method, a capacitive stylus, a device, a storage medium and a computer program product, relates to the technical field of capacitive stylus, is applied to the capacitive stylus, and comprises the following steps: obtaining a device identification code wirelessly sent by the capacitive stylus and an external device in current communication connection, and storing the device identification code as a connection identification code; when the capacitive pen writes on the external equipment, acquiring an equipment identification code received from a writing part of the capacitive pen; and when the equipment identification code received from the writing part of the capacitance pen is inconsistent with the connection identification code, disconnecting the communication connection with the external equipment in current communication connection, and communicating with the written external equipment, and updating the equipment identification code received from the writing part of the capacitance pen into the connection identification code, according to the invention, rapid and automatic switching of data communication among multiple devices is realized, re-pairing during switching of the devices is not needed, and time delay of switching of the capacitance pen among the multiple devices is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of capacitive stylus technology, and in particular to a data communication method for multi-device switching, a capacitive stylus, a device, a storage medium, and a computer program product. Background Art

[0002] With the popularization of electronic products, capacitive pens are increasingly used in conjunction with terminal devices such as tablets. In order to achieve lower latency and more functional control, capacitive pens usually use wireless communication technology to establish a connection with terminal devices.

[0003] However, when the existing capacitive stylus is used to switch writing between multiple terminal devices, the user is usually required to operate the capacitive stylus to go through the detection, pairing and connection steps again before normal writing on the next terminal device. As a result, when the capacitive stylus is used to switch between multiple terminal devices, it takes more time to spend on the detection, pairing and connection steps, that is, the delay in switching terminal devices for writing is high, and the user may even be required to manually switch the connection, affecting the overall fluency of the user's switching writing between multiple devices.

[0004] Therefore, how to reduce the delay when switching between multiple devices with a capacitive stylus is a problem that urgently needs to be solved. Summary of the invention

[0005] The main purpose of the present application is to provide a data communication method for switching between multiple devices, a capacitive pen, a device, a storage medium and a computer program product, aiming to solve the technical problem of how to reduce the delay when the capacitive pen is switched between multiple devices.

[0006] To achieve the above purpose, the present application proposes a data communication method for multi-device switching, which is applied to a capacitive stylus pen. The method includes:

[0007] Obtaining a device identification code wirelessly sent between the capacitive stylus and the external device currently communicating, and storing the code as a connection identification code;

[0008] When the capacitive pen writes on an external device, obtaining a device identification code received from a writing portion of the capacitive pen;

[0009] When the device identification code received from the writing part of the capacitive pen is inconsistent with the connection identification code, the communication connection with the external device currently connected is disconnected, and the communication connection with the external device in writing is established, and the device identification code received from the writing part of the capacitive pen is updated to the connection identification code.

[0010] In one embodiment, before the step of obtaining a device identification code wirelessly transmitted between the capacitive stylus and the external device currently in communication connection and storing the code as a connection identification code, the method further includes:

[0011] When multiple external devices are detected, the last connection time and connection frequency between each external device and the capacitive stylus are respectively obtained;

[0012] The device is communicatively connected to the external device whose last connection time is the most recent among the multiple external devices, or is communicatively connected to the external device with the highest connection frequency among the multiple external devices.

[0013] In one embodiment, after the step of obtaining the device identification code wirelessly sent by the capacitive stylus and the external device currently communicating and storing it as the connection identification code, the step further includes:

[0014] When the external device currently in communication connection is in sleep or shut down, obtain the last connection time and connection frequency of other external devices;

[0015] Re-establishing a communication connection with an external device that was last connected to the device most recently among the multiple external devices, or re-establishing a communication connection with an external device that was connected to the device most frequently among the multiple external devices;

[0016] The device identification code of the external device for reestablishing the communication connection is obtained and stored as the connection identification code.

[0017] In one embodiment, after the step of obtaining the device identification code wirelessly sent by the capacitive stylus and the external device currently communicating and storing it as the connection identification code, the step further includes:

[0018] When the capacitive pen does not write within a preset time, the communication connection with the external device is disconnected.

[0019] In one embodiment, after the step of acquiring the device identification code received from the writing part of the capacitive pen when the capacitive pen is writing on the external device, the method further includes:

[0020] When the device identification code received from the writing part of the capacitive pen is inconsistent with the connection identification code, the communication connection is maintained with the external device currently in communication connection.

[0021] In one embodiment, before the step of obtaining a device identification code wirelessly transmitted between the capacitive stylus and the external device currently in communication connection and storing the code as a connection identification code, the method further includes:

[0022] A corresponding device identification code is sent to the external device with which the communication connection is established for the first time, so that when the capacitive stylus pen and the external device establish a communication connection again, the external device is identified by the device identification code.

[0023] In addition, to achieve the above-mentioned purpose, the present application also proposes a capacitive stylus, the capacitive stylus comprising: a communication chip and a processing chip,

[0024] The communication chip is communicatively connected with the processing chip;

[0025] The communication chip is used to execute the steps of the data communication method for multi-device switching as described above.

[0026] In addition, to achieve the above-mentioned purpose, the present application also proposes a data communication device for multi-device switching, characterized in that the data communication device for multi-device switching includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the data communication method for multi-device switching as described above.

[0027] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the data communication method for multi-device switching as described above are implemented.

[0028] In addition, to achieve the above-mentioned purpose, the present application also proposes a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the data communication method for multi-device switching as described above are implemented.

[0029] The present application provides a data communication method for switching multiple devices. The present application first determines the device of the current communication connection through a connection identification code, and can update the connection identification code according to the device identification code of the current writing external device transmitted by the capacitive pen writing part. When the two are inconsistent, the updated connection identification code is saved, the currently connected external device is disconnected and the communication connection with the external device currently writing with the capacitive pen is established, and the switching of data communication between multiple devices is completed, so that the capacitive pen can quickly switch to data communication with the writing device without re-pairing, thereby reducing the delay of the capacitive pen switching between multiple devices and improving the fluency of the capacitive pen switching writing between multiple devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0032] Figure 1 A flowchart of a data communication method for multi-device switching provided in Embodiment 1 of the present application;

[0033] Figure 2 A flowchart diagram of an implementation method of a data communication method for multi-device switching according to the present application is provided;

[0034] Figure 3 A flowchart diagram of another implementation method of the first embodiment of the data communication method for multi-device switching of the present application is provided;

[0035] Figure 4 A flowchart diagram of another implementation of the first embodiment of the data communication method for multi-device switching of the present application;

[0036] Figure 5 A flowchart of a second embodiment of a data communication method for multi-device switching provided in the present application;

[0037] Figure 6 A flowchart of a data communication method for multi-device switching provided in Embodiment 3 of the present application;

[0038] Figure 7 A brief flowchart diagram of the third embodiment of the data communication method for multi-device switching of the present application is provided;

[0039] Figure 8 This is a schematic diagram of the module of the capacitive stylus according to an embodiment of the present application;

[0040] Fig. 9 A schematic diagram of the structure of a data communication device for multi-device switching according to an embodiment of the present application.

[0041] Description of Figure Numbers:

[0042] 101, processing chip; 102, communication chip; ID, device identification code;

[0043] 1001, processing device; 1002, ROM; 1003, storage device; 1004, RAM; 1005, bus;

[0044] 1006, I / O interface; 1007, input device; 1008, output device; 1009, communication device.

[0045] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0046] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0047] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0048] When an existing capacitive stylus is used to switch between multiple terminal devices for writing, it is usually necessary to go through the detection, pairing and connection steps again before normal writing can be performed on the next terminal device. As a result, when the capacitive stylus is used to switch between multiple terminal devices, it is necessary to spend more time on the detection, pairing and connection steps, that is, the delay in switching terminal devices for writing is high, and the user may even need to manually switch the connection, affecting the overall fluency of the user's switching writing between multiple devices.

[0049] The present application first determines the device of the current communication connection through the connection identification code, and can update the connection identification code according to the device identification code of the current writing external device transmitted by the writing part of the capacitive pen. When the two are inconsistent, the updated connection identification code is saved, the currently connected external device is disconnected and the communication connection with the external device currently writing with the capacitive pen is completed, and the switching of data communication between multiple devices is completed, so that the capacitive pen can quickly switch to data communication with the writing device without re-pairing, reducing the delay of the capacitive pen switching between multiple devices and improving the fluency of the capacitive pen switching writing between multiple devices.

[0050] It should be noted that the external device described in the multi-device switching of this embodiment refers to a device having a display screen and capable of performing touch operations through the display screen, which may be a tablet computer, a touch mobile phone, a touch personal computer, a drawing board, etc. The capacitive pen includes a communication chip and a processing chip, the communication chip may be a wireless communication chip such as a Bluetooth chip or a WiFi chip, and the processing chip may be a MCU (Microcontroller Unit) chip, a FPGA (Field-Programmable Gate Array, Field Programmable Gate Array) chip, an STM32 chip, an STM chip, an ARM (Advanced RISC Machines, Advanced Reduced Instruction Set Processor 31) chip, etc., which have control capabilities, and this embodiment does not specifically limit this.

[0051] Based on this, the present application proposes a data communication method for multi-device switching in the first embodiment, which is applied to a capacitive stylus. Please refer to Figure 1 , Figure 1 This is a flow chart of a first embodiment of a data communication method for multi-device switching of the present application, wherein the method comprises steps S10 to S30:

[0052] Step S10, obtaining a device identification code wirelessly transmitted between the capacitive stylus and the external device currently in communication connection, and storing the code as a connection identification code;

[0053] It should be noted that when the capacitive pen establishes a Bluetooth or other wireless connection with an external device for the first time, the built-in processing chip of the capacitive pen is responsible for generating a unique device identification code and transmitting it to the communication chip through a callback function. This device identification code can be an ID generated based on a timestamp, a random number, a MAC address, or any other unique algorithm, and the communication chip transmits the device identification code to the corresponding device, and the device that establishes the connection receives and saves the device identification code. When the capacitive pen and the external device establish a Bluetooth or other wireless communication connection again, the external device sends communication data to the capacitive pen through the wireless communication connection and attaches the device identification code saved by the external device. The communication chip of the capacitive pen will receive the device identification code and save it in the communication chip as a connection identification code. This connection identification code is used in the subsequent data processing and communication of the capacitive pen to ensure that data can be accurately sent to the correct device and received from the correct device.

[0054] Step S20, when the capacitive pen is writing on an external device, obtaining a device identification code received from a writing portion of the capacitive pen;

[0055] It should be noted that the writing part of the capacitive pen is connected to the processing chip. When the capacitive pen is writing on an external device, the writing part of the capacitive pen contacts the screen of the external device, and the original data containing the device identification code of the external device currently written by the capacitive pen is transmitted to the processing chip of the capacitive pen through pressure reporting. The processing chip demodulates the original data, obtains the device identification code of the device being written, and transmits it to the communication chip of the capacitive pen.

[0056] Step S30, when the device identification code received from the writing part of the capacitive pen is inconsistent with the connection identification code, disconnect the communication connection with the external device currently connected to the communication, and connect the communication with the external device in writing, and update the device identification code received from the writing part of the capacitive pen to the connection identification code.

[0057] It can be understood that the processing chip of the capacitive pen is responsible for receiving the original data from the writing part, and performing data processing and analysis on it to obtain the device identification code of the external device currently written by the capacitive pen, and transmit it to the communication chip; the communication chip is a key component for the capacitive pen to communicate with the external device, and is used to determine the device identification code of the external device currently connected for communication and receive the device identification code transmitted by the processing chip, and judge whether the device identification codes of the two are consistent, so as to determine the external device that needs to be communicated. The processing chip of the capacitive pen transmits the device identification code received from the writing part of the capacitive pen to the communication chip. If the device identification code received from the writing part of the capacitive pen is inconsistent with the connection identification code, it means that the device written by the capacitive pen has been replaced, and the external device of the communication connection needs to be switched, so that the capacitive pen disconnects the current communication connection and communicates with the written external device. The communication chip of the capacitive pen will use the device identification code received from the writing part of the capacitive pen as a new connection identification code, and establish a communication connection with the external device corresponding to the updated connection identification code, that is, establish a communication connection with the currently written external device.

[0058] In this embodiment, the application first determines the device of the current communication connection through the connection identification code, and can update the connection identification code according to the device identification code of the external device currently writing transmitted by the capacitive pen writing part. When the two are inconsistent, the updated connection identification code is saved, the currently connected external device is disconnected and the communication connection with the external device currently writing with the capacitive pen is completed, and the switching of data communication between multiple devices is completed, so that the capacitive pen can quickly switch to data communication with the writing device without re-pairing, thereby reducing the delay of the capacitive pen switching between multiple devices and improving the fluency of the capacitive pen switching writing between multiple devices.

[0059] In one possible implementation, see Figure 2 Before step S10, the method may include steps A10 to A20:

[0060] Step A10, when multiple external devices are detected, respectively obtaining the last connection time and connection frequency between each external device and the capacitive stylus;

[0061] Step A20: Communicate and connect with the external device whose last connection time is the most recent among the multiple external devices, or communicate and connect with the external device with the highest connection frequency among the multiple external devices.

[0062] It should be noted that for multiple external devices, the communication chip of the capacitive pen will also obtain and record the time when each device was last connected to the capacitive pen (last connection time) and the connection frequency of each device and the capacitive pen since the last reset (connection frequency). And it will give priority to establishing communication connection with the external device that was recently connected or has a high connection frequency.

[0063] In this embodiment, by obtaining the last connection time and connection frequency of the device corresponding to each identification code, and giving priority to establishing a communication connection with the external device that was most recently connected or has a high connection frequency, the capacitive pen can automatically connect to the user's preferred external device, allowing the user to communicate and connect with the preferred external device without manually operating the capacitive pen, thereby reducing reconnection delays and power consumption and improving user experience.

[0064] In other feasible implementations, the connection signal strength of the device corresponding to each identification code, the power information of the device, etc. may also be obtained to comprehensively evaluate the priority of establishing a communication connection with an external device.

[0065] In one possible implementation, see Figure 3 After step S10, the method may include steps B10 to B30:

[0066] Step B10, when the external device currently in communication connection is in sleep or shut down, obtaining the last connection time and connection frequency of other external devices;

[0067] Step B20, re-establishing a communication connection with the external device with the most recent last connection time among the multiple external devices, or re-establishing a communication connection with the external device with the highest connection frequency among the multiple external devices;

[0068] Step B30, obtaining a device identification code of the external device for re-establishing the communication connection, and storing it as a connection identification code.

[0069] It should be noted that the communication chip of the capacitive stylus will periodically or trigger-check whether the device currently connected to the communication is still online (i.e. not in sleep mode or powered off). This is usually achieved by sending a heartbeat packet, requesting a response, or checking a connection status flag. If the communication chip of the capacitive stylus detects that the currently connected device has no response or returns a specific error code, it indicates that the device may have been in sleep mode or powered off. The communication chip of the capacitive stylus will determine the new communication connected device based on the last connection time and connection frequency of the device corresponding to each of the identification codes.

[0070] In this embodiment, by automatically switching the connection of dormant or powered-off devices, the capacitive pen can always maintain an available device for communication connection, allowing the user to respond quickly when using it. There is no need for the user to manually switch the connection of the device, thereby improving the fluency of the capacitive pen in switching writing between multiple devices.

[0071] In one possible implementation, see Figure 4 After step S10, the method may include step C10:

[0072] Step C10, when the capacitive pen does not write within a preset time, disconnect the communication connection with the external device.

[0073] It should be noted that the preset time is the automatic sleep time of the capacitive pen, and the user can set this preset time according to his or her usage habits and needs. For example, if the user often does not need to use the capacitive pen for a long time but does not want to manually turn it off frequently, the preset time can be set slightly longer; conversely, if the user wants to save power faster or avoid potential interference, the preset time can be set shorter. If the capacitive pen is not written within the preset time, it means that the capacitive pen is not currently in use, and maintaining a communication connection will consume a certain amount of power, especially in wireless communication technologies such as Bluetooth. The capacitive pen needs to disconnect the communication connection with the external device and enter a dormant state. When the user uses the capacitive pen to write again, the capacitive pen re-establishes a communication connection with the device being written.

[0074] In this implementation, by setting a preset time, the capacitive stylus automatically disconnects the communication connection with the external device when not in use, thereby reducing unnecessary power consumption and extending the battery life.

[0075] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 5 After step S20, the data communication method for multi-device switching further includes step S031:

[0076] Step S031, when the device identification code received from the writing part of the capacitive stylus is consistent with the connection identification code, maintaining a communication connection with the external device currently in communication connection.

[0077] It should be noted that if the device identification code received from the writing part of the capacitive pen is consistent with the connection identification code, the external device currently being written by the capacitive pen is the device with which the current communication chip maintains data communication, and there is no need to switch the external device to which the capacitive pen is currently communicating.

[0078] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those of the above-mentioned first and second embodiments can refer to the above introduction, and will not be repeated later. Figure 6 Before the step S10 of acquiring the device identification code wirelessly transmitted between the capacitive stylus and the external device currently communicating and storing it as the connection identification code, the method further includes step D10:

[0079] Step D10, sending a corresponding device identification code to the external device with which the communication connection is first established, so that when the capacitive stylus pen and the external device establish a communication connection again, the external device is identified by the device identification code.

[0080] It should be noted that when the capacitive pen establishes a Bluetooth or other wireless connection with an external device for the first time, the built-in processing chip of the capacitive pen is responsible for generating a unique device identification code and transmitting it to the communication chip. This device identification code can be an ID generated based on a timestamp, a random number, a MAC address or any other unique algorithm, and the communication chip transmits the device identification code to the corresponding device, and the device that establishes the connection receives the device identification code and saves it. When the device transmits communication data to the Bluetooth chip of the capacitive pen, the device identification code is attached, so that the communication chip can identify the device that sends the communication data through the device identification code. As the capacitive pen establishes more and more connections with external devices, the device identification code of each new device will be accumulated and saved, which can be achieved through data structures such as lists, databases or hash tables, and this embodiment does not specifically limit this.

[0081] In this embodiment, the device sending the communication data is quickly identified through the device identification code, and the capacitive stylus can respond to and process requests from known devices more quickly, reducing the time required for device identification and identity authentication in multiple device environments, thereby improving overall communication efficiency. Users do not need to manually perform complex configuration or identity authentication processes every time they connect. Once the device identification code is saved and recognized, the capacitive stylus can automatically establish a connection with the known device, thereby simplifying the operation process and improving the user experience.

[0082] For example, in order to help understand the technical concept or technical principle of the data communication method for multi-device switching obtained by combining the above-mentioned embodiment 1 and embodiment 2, please refer to Figure 7 , Figure 7 A brief flow chart of a data communication method for multi-device switching is provided, specifically:

[0083] First, send the device identification code that is uniquely corresponding to the connected device to identify the device according to the device identification code; then obtain the last connection time and connection frequency of each external device that has established a connection, and judge the priority of the external device connection according to the last connection time and connection frequency of the external device; communicate and connect with the external device with the most recent last connection time or the highest connection frequency, obtain the device identification code of the external device of the communication connection, and save it as a connection identification code. Through the connection identification code, the capacitive pen can ensure that data can be accurately sent to the correct device and receive data from the correct device in subsequent data processing and communication; if the currently connected device is turned off or dormant, the capacitive pen does not need to continue to maintain a connection with the device, and it is necessary to maintain a connection with the device with the most recent last connection time or the highest connection frequency according to the last connection time and connection frequency information, and use the identification code of the new communication connection device as the connection identification code. And when the capacitive pen does not write on the device within a preset time, disconnect the communication connection with the external device to reduce power consumption and extend the life of the capacitive pen.

[0084] When the capacitive pen is writing on the device, the processing chip receives the device identification code of the device being written received by the writing part of the self-capacitive pen, and transmits it to the communication chip. If the device identification code of the device being written is inconsistent with the connection identification code, it means that the device currently being written by the capacitive pen is inconsistent with the device currently connected to the communication chip, and the communication chip needs to update the connection identification code, use the device identification code received from the writing part of the self-capacitive pen as the new connection identification code, and disconnect the current communication connection, and communicate with the external device written by the capacitive pen; if the active identification code is consistent with the connection identification code, it means that the device currently being written by the capacitive pen is consistent with the device that the communication chip maintains a connection to, and data communication can be performed with the device being written without switching the communication connection. In this way, the capacitive pen can automatically communicate with the external device currently being written, and there is no need for re-pairing or manual operation by the user.

[0085] During the above operation process, the following operation process is also interspersed: when the capacitive pen does not write within a preset time, the communication connection with the external device is disconnected; when the capacitive pen is writing, the communication connection with the writing device is reconnected to reduce unnecessary power consumption, thereby extending its battery life.

[0086] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the data communication method for multi-device switching of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0087] The present application provides a capacitive stylus, the capacitive stylus comprising: a communication chip 102 and a processing chip 101,

[0088] The communication chip 102 is communicatively connected with the processing chip 101;

[0089] The communication chip 102 is used to execute the steps of the data communication method for multi-device switching as described in any one of the above embodiments.

[0090] It should be noted that the processing chip 101 can be a chip with control capability such as an MCU (Microcontroller Unit) chip, an FPGA (Field-Programmable Gate Array) chip, an STM32 chip, an STM chip, an ARM (Advanced RISC Machines, Advanced Reduced Instruction Set Processor 31) chip, etc., and this embodiment does not specifically limit this. The communication chip 102 can be a wireless communication chip such as a Bluetooth chip, a Wi-Fi chip, a ZigBee chip, and a LoRa chip, and this embodiment does not specifically limit this.

[0091] For example, switching data communication between three devices, see Figure 8 , the module diagram of the capacitive pen can be expressed as follows Figure 8 As shown, the communication chip 102 uses a Bluetooth chip, the processing chip 101 uses an MCU, ID is a device identification code, and ID1, ID2, and ID3 are device identification codes corresponding to device 1, device 2, and device 3, respectively.

[0092] The capacitive stylus provided by the present application adopts the data communication method for switching multiple devices in the above-mentioned embodiment, which can solve the technical problem of how to reduce the delay when the capacitive stylus is switched between multiple devices. Compared with the prior art, the beneficial effects of the capacitive stylus provided by the present application are the same as the beneficial effects of the data communication method for switching multiple devices provided by the above-mentioned embodiment, and the other technical features of the capacitive stylus are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.

[0093] The present application provides a data communication device for multi-device switching, the data communication device for multi-device switching comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data communication method for multi-device switching in the above-mentioned embodiment one.

[0094] Reference below Fig. 9, which shows a schematic diagram of the structure of a data communication device suitable for implementing multi-device switching in an embodiment of the present application. The data communication device for multi-device switching in an embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The multi-device switching data communication device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0095] like Fig. 9 As shown, the data communication device with multiple device switching may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the data communication device with multiple device switching are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the data communication device of the multi-device switching to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows the data communication device of the multi-device switching with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0096] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0097] The data communication device for multi-device switching provided by the present application adopts the data communication method for multi-device switching in the above-mentioned embodiment, which can solve the technical problem of how to reduce the delay when the capacitive pen is switched between multiple devices. Compared with the prior art, the beneficial effects of the data communication device for multi-device switching provided by the present application are the same as the beneficial effects of the data communication method for multi-device switching provided by the above-mentioned embodiment, and the other technical features in the data communication device for multi-device switching are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0098] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0099] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0100] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the data communication method for multi-device switching in the above-mentioned embodiment.

[0101] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0102] The computer-readable storage medium may be included in the data communication device for multi-device switching; or may exist independently without being assembled into the data communication device for multi-device switching.

[0103] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a data communication device for multi-device switching, the data communication device for multi-device switching: establishes connections with multiple devices respectively and sends corresponding identification codes to each of the devices respectively; maintains connection with one of the multiple devices, obtains the identification code of the device that maintains connection, and uses the identification code of the device that maintains connection as the connection identification code; obtains the identification code transmitted by the processing chip, and uses the identification code transmitted by the processing chip as the active identification code; if the active identification code is inconsistent with the connection identification code, updates the connection identification code, uses the active identification code as the connection identification code, and maintains connection with the device corresponding to the updated connection identification code.

[0104] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0105] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0106] The modules involved in the embodiments of the present application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0107] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data communication method for switching multiple devices, and can solve the technical problem of how to reduce the delay when the capacitive stylus is switched between multiple devices. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the data communication method for switching multiple devices provided by the above-mentioned embodiment, and will not be repeated here.

[0108] The present application also provides a computer program product, including a computer program, which implements the steps of the data communication method for multi-device switching as described above when the computer program is executed by a processor.

[0109] The computer program product provided by the present application can solve the technical problem of how to reduce the delay when a capacitive stylus is switched between multiple devices. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the data communication method for switching multiple devices provided by the above embodiment, and will not be elaborated here.

[0110] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A data communication method for multi-device switching, characterized in that: Applied to a capacitive stylus, the method comprises: Obtaining a device identification code wirelessly sent between the capacitive stylus and the external device currently communicating, and storing the code as a connection identification code; When the capacitive pen writes on an external device, obtaining a device identification code received from a writing portion of the capacitive pen; When the device identification code received from the writing part of the capacitive pen is inconsistent with the connection identification code, the communication connection with the external device currently connected is disconnected, and the communication connection with the external device in writing is established, and the device identification code received from the writing part of the capacitive pen is updated to the connection identification code.

2. The method according to claim 1, characterized in that Before the step of obtaining the device identification code wirelessly transmitted between the capacitive stylus and the external device currently communicating and storing it as the connection identification code, the method further includes: When multiple external devices are detected, the last connection time and connection frequency between each external device and the capacitive stylus are respectively obtained; The device is communicatively connected to the external device whose last connection time is the most recent among the multiple external devices, or is communicatively connected to the external device with the highest connection frequency among the multiple external devices.

3. The method according to claim 1, characterized in that After the step of obtaining the device identification code wirelessly sent by the capacitive stylus and the external device currently communicating and storing it as the connection identification code, the method further includes: When the external device currently in communication connection is in sleep or shut down, obtain the last connection time and connection frequency of other external devices; Re-establishing a communication connection with an external device that was last connected to the device most recently among the multiple external devices, or re-establishing a communication connection with an external device that was connected to the device most frequently among the multiple external devices; The device identification code of the external device for reestablishing the communication connection is obtained and stored as the connection identification code.

4. The method according to claim 1, characterized in that After the step of obtaining the device identification code wirelessly sent by the capacitive stylus and the external device currently communicating and storing it as the connection identification code, the method further includes: When the capacitive pen does not write within a preset time, the communication connection with the external device is disconnected.

5. The method according to any one of claims 1 to 4, characterized in that After the step of acquiring the device identification code received from the writing part of the capacitive pen when the capacitive pen is writing on the external device, the method further includes: When the device identification code received from the writing part of the capacitive stylus is consistent with the connection identification code, the communication connection is maintained with the external device currently in communication connection.

6. The method according to any one of claims 1 to 4, characterized in that Before the step of obtaining the device identification code wirelessly transmitted between the capacitive stylus and the external device currently communicating and storing it as the connection identification code, the method further includes: A corresponding device identification code is sent to the external device with which the communication connection is established for the first time, so that when the capacitive stylus pen and the external device establish a communication connection again, the external device is identified by the device identification code.

7. A capacitive stylus pen, characterized in that: The capacitive stylus comprises: a communication chip and a processing chip, The communication chip is communicatively connected with the processing chip; The communication chip is used to execute the steps of the data communication method for multi-device switching according to any one of claims 1 to 6.

8. A data communication device for multi-device switching, characterized in that: The data communication device for multi-device switching comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data communication method for multi-device switching according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data communication method for multi-device switching according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the data communication method for multi-device switching according to any one of claims 1 to 6 are implemented.