Protocol switching method and device, electronic equipment and storage medium
Through automatic communication and address packet exchange between the pen end and the screen end, automatic switching of the stylus protocol is achieved, solving the compatibility problem between the stylus and equipment of different brands or models, and improving the convenience of use.
Patent Information
- Application Number
- CN202411485696.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-01-17
AI Technical Summary
The stylus is difficult to compatible with smart terminal devices of different brands or models, which makes it impossible for users to continue using when replacing the device, affecting the user experience.
By sending and receiving address packets between the pen end and the target screen end, a wireless communication connection is automatically established, and whether the current protocol and the target protocol are the same. If different, the protocol is switched, so as to realize the stylus between different screen devices. Automatically compatible.
No need for user manual settings or adjustment of equipment, simplifying the operation process and improving the convenience and compatibility of the stylus between different screen devices.
Smart Images

Figure CN119322570A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of terminal equipment, and in particular to a protocol switching method, device, electronic equipment and storage medium. Background Art
[0002] In the current digital learning, office and entertainment scenarios, stylus has become a standard feature of many smart terminals, including learning machines, tablets, business notebooks and even smart phones. However, although these devices are equipped with stylus, major manufacturers still tend to develop their own private coding protocols, making it difficult for stylus to be compatible with smart terminals of different brands or models.
[0003] At present, styluses usually only support one specific coding protocol. When users replace tablets or other screen devices, the original stylus may no longer be usable. In addition, as screen device manufacturers continue to upgrade their products, screen coding protocols may also be upgraded and changed, resulting in the inability to use styluses that were previously compatible with the product, further exacerbating the compatibility issues between styluses and screen devices, thus affecting the user experience. Summary of the invention
[0004] The present invention provides a protocol switching method, device, electronic device and storage medium, which are used to solve the defect in the related art that a stylus pen is incompatible with different screen devices, thus affecting the user experience.
[0005] The present invention provides a protocol switching method, which is applied to a pen end and comprises: When the pen is placed in place, a pen end address data packet is sent to the target screen end, wherein the pen end address data packet includes the pen end wireless communication address; Receive a target screen end address data packet returned by the target screen end and a pairing connection request initiated by the target screen end, wherein the target screen end address data packet includes a target screen end wireless communication address and a target protocol; In response to the pairing connection request, pairing and connecting with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address; Determine whether the current protocol is the same as the target protocol, and if not, switch the current protocol to the target protocol.
[0006] According to a protocol switching method provided by the present invention, pairing and connecting with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address includes: Check whether there is a currently connected first screen address; If not, pairing and connecting with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address; If it exists, the first screen end address is compared with the wireless communication address of the target screen end, and based on the comparison result, a pairing connection is performed with the target screen end.
[0007] According to a protocol switching method provided by the present invention, the pairing connection with the target screen end based on the comparison result includes: When the comparison result is the same, maintaining the paired connection with the first screen end address; When the comparison result is not the same, the pairing connection with the first screen end address is disconnected, and a pairing connection is established with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address.
[0008] According to a protocol switching method provided by the present invention, the switching of the current protocol to the target protocol further includes: receiving configuration information sent by the target screen end, wherein the configuration information is sent by the target screen end when detecting that the pen end has left; Based on the configuration information, the timing is synchronized with the target screen, and when the synchronization is completed, the target protocol is applied to send a writing signal to the target screen.
[0009] According to a protocol switching method provided by the present invention, when the pen end supports at least two types of wireless communication, the pen end address data packet includes at least a first address packet and a second address packet, and the first address packet and the second address packet respectively include pen end wireless communication addresses corresponding to different wireless communication types; The target screen address data packet includes at least a first data packet and a second data packet, wherein the first data packet corresponds to the first address packet, and the second data packet corresponds to the second address packet.
[0010] According to a protocol switching method provided by the present invention, the pen end address data packet also includes the pen end battery power, and the pen end leaves the target screen end when charging is completed.
[0011] The present invention also provides a protocol switching method, which is applied to a target screen end and comprises: receiving a pen tip address data packet sent by the pen tip, wherein the pen tip address data packet is sent when the pen tip is placed in place on the target screen, and the pen tip address data packet includes a pen tip wireless communication address; In response to the pen end address data packet, returning a target screen end address data packet to the pen end, and initiating a pairing connection request to the pen end, wherein the target screen end address data packet includes a target screen end wireless communication address and a target protocol; The pen end is used to perform pairing connection based on the pen end wireless communication address and the target screen end wireless communication address when receiving the pairing connection request, and to determine whether the current protocol is the same as the target protocol. If not, the current protocol is switched to the target protocol.
[0012] According to a protocol switching method provided by the present invention, the initiating a pairing connection request to the pen end includes: Based on the communication type identifier in the target protocol, the target communication type is determined, and the target communication type is applied to initiate a pairing connection request to the pen end.
[0013] The present invention also provides a protocol switching device, which is applied to a pen end and comprises: A sending unit, used to send a pen end address data packet to a target screen end when the pen end is in place, wherein the pen end address data packet includes a pen end wireless communication address; A receiving unit, configured to receive a target screen end address data packet returned by the target screen end and a pairing connection request initiated by the target screen end, wherein the target screen end address data packet includes a target screen end wireless communication address and a target protocol; A connection unit, configured to perform a pairing connection with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address in response to the pairing connection request; The switching unit is used to determine whether the current protocol is the same as the target protocol, and if not, switch the current protocol to the target protocol.
[0014] The present invention also provides a protocol switching device, which is applied to a target screen end and comprises: A data receiving unit, used for receiving a pen tip address data packet sent by a pen tip, wherein the pen tip address data packet is sent when the pen tip is placed in place on the target screen, and the pen tip address data packet includes a pen tip wireless communication address; A data returning unit, configured to return a target screen end address data packet to the pen end in response to the pen end address data packet, and initiate a pairing connection request to the pen end, wherein the target screen end address data packet includes a target screen end wireless communication address and a target protocol; The pen end is used to perform pairing connection based on the pen end wireless communication address and the target screen end wireless communication address when receiving the pairing connection request, and to determine whether the current protocol is the same as the target protocol. If not, the current protocol is switched to the target protocol.
[0015] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-mentioned protocol switching methods when executing the computer program.
[0016] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the protocol switching method described in any one of the above is implemented.
[0017] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the protocol switching method described above is implemented.
[0018] The protocol switching method, device, electronic device and storage medium provided by the present invention can receive a target screen address data packet returned by the target screen when the pen tip is placed in place, wherein the data packet includes the target screen wireless communication address and the target protocol used by the target screen. Thus, when the pen tip receives a pairing connection request from the target screen, it can automatically establish a wireless communication connection with the target screen according to the pen tip wireless communication address and the target screen wireless communication address. At the same time, the pen tip can determine whether the current protocol is the same as the target protocol used by the target screen. If they are not the same, the current protocol can be switched to the target protocol. The present invention realizes automatic switching of protocols through automatic communication and address data packet exchange between the pen tip and the target screen, so that the pen tip can be freely switched between different screens, and the user does not need to manually set or adjust the device, which greatly simplifies the operation process and improves the convenience of use. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the present invention or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 This is one of the flow charts of the protocol switching method provided by the present invention; Figure 2 This is the second flow chart of the protocol switching method provided by the present invention; Figure 3 It is a schematic diagram of the communication process of the pen provided by the present invention sucking into the first tablet; Figure 4 It is a schematic diagram of the communication process of the pen provided by the present invention sucking into the second tablet; Figure 5 It is one of the structural schematic diagrams of the protocol switching device provided by the present invention; Figure 6 This is the second structural diagram of the protocol switching device provided by the present invention; Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] With the continuous development of technology, existing electronic devices such as learning machines, tablets, business notebooks and smart phones are equipped with stylus pens to provide users with a more convenient and intelligent writing experience. A stylus usually refers to a device used for handwriting input, which can capture the user's writing movements on a handwriting board, touch screen or other handwriting interface through various technologies (such as electromagnetic induction, pressure sensing, ultrasound, etc.) and convert them into digital signals. However, although these devices are equipped with stylus pens, major equipment manufacturers still tend to develop their own private coding protocols, which makes it difficult for stylus pens to be compatible with screen devices of different brands or models.
[0023] In terms of communication connection, the stylus generally needs to make an initial connection with the screen-end device through wireless communication (such as Bluetooth or Star Flash) to obtain the coding protocol and coding configuration information sent by the screen. Once the connection is successful, the stylus can be paired with the screen-end screen according to the coding configuration information to realize the writing function. During actual writing, the electrode signal of the stylus tip acts on the screen of the screen, and the screen can directly obtain the corresponding writing position, but the information such as the pressure and angle of the writing is collected at the pen end. The stylus can transmit the collected information to the screen end through the coding protocol, or it can transmit this information through wireless communication.
[0024] However, since the stylus and the screen device need to rely on wireless communication connection to transmit coding configuration information, as well as data such as pressure sensitivity and writing angle, if the stylus is already connected to a screen device, when it needs to switch to another new screen device, it usually cannot automatically respond to the wireless connection request initiated by the new screen. Instead, the user needs to manually disconnect the connection with the previous screen device and then manually pair with the new screen device. This not only increases the complexity of the user's operation, but also reduces the ease of use of the device. In addition, if the new screen uses a different screen coding protocol than the old screen, the stylus may not be able to recognize and adapt to this change. Because the stylus usually only supports one coding protocol and cannot switch between protocols, this leads to incompatibility issues between the stylus and the old products.
[0025] To solve this problem, the present invention provides a protocol switching method to overcome the above-mentioned defects. Figure 1 It is one of the flowcharts of the protocol switching method provided by the present invention, such as Figure 1 As shown, the method is applied to the pen tip, and the method includes: Step 110, when the pen is in place, sending a pen end address data packet to the target screen end, wherein the pen end address data packet includes the pen end wireless communication address; It should be noted that the method provided in the embodiment of the present invention can be applied to a pen tip. Here, the pen tip refers to an input device with a wireless communication function. For example, the pen tip can be a stylus that can write, draw, or input data on a screen (i.e., a target screen tip). The target screen tip refers to a display device that interacts with the pen tip. It can be a device that the pen tip is about to connect to, or a device that the pen tip has previously connected to. The embodiment of the present invention does not specifically limit this. For example, the target screen tip can be an electronic screen, a tablet computer, or a touch screen, etc. The target screen tip has the ability to receive and process input data from the pen tip.
[0026] Specifically, after the pen tip is placed in place on the target screen, a pen tip address data packet can be sent to the target screen. Here, placement means that the pen tip is correctly placed in a specified position or area on the target screen so that the two can perform effective wireless communication and data transmission. The pen tip address data packet refers to a data structure containing the pen tip wireless communication address, which may include information such as the pen tip wireless communication address and the pen tip battery level. Among them, the pen tip wireless communication address is the address information used to uniquely identify the pen tip in the wireless communication network, which may be the wireless communication MAC address (Media Access Control Address) of the pen tip.
[0027] For example, many tablets or learning machines are currently equipped with styluses, and most styluses are designed with magnetic suction, which is convenient for close fitting with tablets or learning machines, and wireless charging is achieved through the standard Qi protocol. Taking the pen end as a stylus and the target screen end as a tablet or learning machine as an example, when the stylus is sucked into the tablet for wireless charging, it will communicate and handshake according to the Qi standard protocol to complete the basic charging negotiation. In addition to completing the standard charging process negotiation, the Qi protocol can also add a private package protocol. For example, after completing the standard protocol packet sending, the stylus can send the pen end address data packet (that is, the pen end MAC address packet) to the tablet.
[0028] Step 120, receiving a target screen address data packet returned by the target screen and a pairing connection request initiated by the target screen, wherein the target screen address data packet includes a target screen wireless communication address and a target protocol; Specifically, when the target screen receives the pen end address data packet sent by the pen end, it first obtains the wireless communication address of the target screen end, and then encapsulates the target screen end wireless communication address and the target protocol into a target screen end address data packet and returns it to the pen end as a response. Here, the target screen end address data packet is a data structure containing the target screen end wireless communication address and other related information (such as the target protocol, etc.). The data packet is sent when the target screen end communicates with the pen end so that the pen end can identify the target screen end and obtain the necessary information to establish a wireless communication connection and conduct subsequent communications. It should be understood that the target screen end wireless communication address refers to the address information used to uniquely identify the target screen end in the wireless communication network, which can be the wireless communication MAC address of the target screen end. The target protocol refers to the coding protocol used by the screen of the target screen end. The coding protocol is a set of rules and standards for precise input and data transmission on the touch screen. For example, the coding protocol can be USI2, FPP, HPP, etc. In an embodiment of the present invention, the target screen end informs the pen end which coding protocol needs to be used for communication by sending a target screen end address data packet containing the target protocol.
[0029] For example, when the tablet receives a MAC address packet from the stylus, it first obtains the MAC address of the tablet's wireless communication module, and then replies to the stylus with the MAC address and the screen's handwriting coding protocol through a private packet of the wireless charging Qi protocol.
[0030] Furthermore, after receiving the pen end address data packet sent by the pen end, the target screen end will initiate a pairing connection request to the pen end according to the wireless communication type supported by the wireless communication module, so as to pair and connect with the pen end and interact with it, thereby obtaining basic information of the pen end, such as the manufacturer, software version, etc. Here, the pairing connection request is a data structure for establishing a connection request between two devices. In an embodiment of the present invention, the pairing connection request is sent by the target screen end to the pen end, and is used to request to establish a wireless communication connection with the pen end.
[0031] Step 130, in response to the pairing connection request, pairing and connecting with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address; Specifically, the pen end can pair and connect with the target screen end according to the screen end wireless communication address in the received target screen end address data packet and its own pen end wireless communication address. Specifically, the pen end will first verify whether the received target screen end wireless communication address is valid and meets expectations (for example, this can be achieved by checking the format or range of the address); once the address verification is passed, the pen end will generate a connection confirmation message and send it to the target screen end. After the target screen end receives the connection confirmation message, it can confirm that the connection with the pen end has been established. At this point, the wireless communication link between the two has been stable, and subsequent data transmission can be carried out.
[0032] Furthermore, considering that the pen end will switch between different screen devices, when the pen end has been paired with a screen end and wants to switch to another screen end, the pen end can determine whether the wireless communication address of the previously connected screen end is the same based on the target screen end wireless communication address in the received target screen end address data packet. If they are the same, the connection can be maintained; if they are not the same, the wireless connection with the previous screen end can be automatically disconnected, and the pairing connection can be re-performed based on the pairing connection request initiated by the new screen end. This eliminates the need for the user to manually disconnect the wireless connection with the previous screen end, which improves ease of use.
[0033] Step 140, determining whether the current protocol is the same as the target protocol, and if not, switching the current protocol to the target protocol.
[0034] Specifically, when the pen end receives the target protocol in the target screen end address data packet, it can also determine whether the protocol currently used by the pen end is the same as the target protocol used by the target screen end. If they are not the same, they can be switched according to the target protocol. It should be understood that the current protocol is the coding protocol currently being used by the pen end, which refers to a set of rules and standards that the pen end is currently using to communicate with the screen end. The protocol may be determined by the pen end when it is connected to the previous screen end, or it may be the default protocol set when the pen end is initialized.
[0035] It is understandable that the memory capacity of the pen end is sufficient to support the integration of multiple coding protocols. When the pen end receives the target protocol of the target screen end, it can determine whether the two are the same by comparing the current protocol stored in itself with the received target protocol. This process can be achieved by comparing the protocol name, version number or specific parameters. If the current protocol is the same as the target protocol, the pen end does not need to perform any switching operation and can directly use the current protocol to communicate with the target screen end. If the current protocol is different from the target protocol, the pen end needs to switch to the target protocol. After the switch is completed, the pen end will use the new coding protocol to switch with the target screen end.
[0036] The method provided by the embodiment of the present invention can receive a target screen address data packet returned by the target screen by sending an address data packet to the target screen when the pen tip is placed in place. The data packet includes the target screen wireless communication address and the target protocol used by the target screen. Therefore, when the pen tip receives a pairing connection request from the target screen, it can automatically establish a wireless communication connection with the target screen according to the pen tip wireless communication address and the target screen wireless communication address. At the same time, the pen tip can determine whether the current protocol is the same as the target protocol used by the target screen. If they are not the same, the current protocol can be switched to the target protocol. The present invention realizes automatic switching of protocols through automatic communication and address data packet exchange between the pen tip and the target screen, so that the pen tip can be freely switched between different screens. The user does not need to manually set or adjust the device, which greatly simplifies the operation process and improves the convenience of use.
[0037] Based on any of the above embodiments, the pen tip may support one type of wireless communication connection, or may support multiple types of wireless communication connections. For example, the pen tip may only support Bluetooth connection, or only support StarFlash connection, or may support both Bluetooth connection and StarFlash connection. The embodiments of the present invention do not specifically limit this.
[0038] Specifically, taking the pen end as a stylus and the target screen end as a tablet or a learning machine as an example, when the pen end only supports one type of wireless communication connection, when the stylus is sucked into the tablet for wireless charging, it will follow the Qi protocol communication handshake, complete the basic charging negotiation, and send its MAC address packet to the tablet. When the tablet receives the MAC address packet from the stylus, it first obtains the MAC address of the tablet's wireless communication module, and then combines it into a code_prot byte based on the type of wireless communication module and the screen's handwriting coding protocol, and then replies the byte and the MAC address to the stylus through a private packet of the wireless charging Qi protocol. In this process, the format of the address data packet between the stylus and the tablet is shown in Table 1 below: Table 1 Qi protocol sends private address data packets
[0039] In Table 1 above, the header byte of the address data packet sent by the stylus pen to the tablet is 0x78, the first byte is the battery power of the pen end, and the remaining 6 bytes are the wireless communication MAC address of the pen end; the header byte of the address data packet replied by the tablet to the pen is 0x7F, followed by a byte of the target coding protocol code_prot, followed by 6 bytes of the tablet end wireless communication MAC address.
[0040] Among them, the code_prot bit definition of a byte (a byte consists of 8 bits, that is, 1Byte = 8Bit) is shown in Table 2 below: Table 2 Coding protocol code_prot bit definition
[0041] Based on any of the above embodiments, when the pen end supports at least two types of wireless communication, the pen end address data packet includes at least a first address packet and a second address packet, and the first address packet and the second address packet respectively include pen end wireless communication addresses corresponding to different wireless communication types; The target screen address data packet includes at least a first data packet and a second data packet, wherein the first data packet corresponds to the first address packet, and the second data packet corresponds to the second address packet.
[0042] It should be noted that when the pen tip supports at least two types of wireless communication (such as Bluetooth and Star Flash), it will be divided into at least two address packets for reporting, that is, the pen tip address data packet includes at least the first address packet and the second address packet. Here, the wireless communication type refers to the communication technology used to transmit data, sound, image and other information without physical connection. These technologies use electromagnetic waves (such as radio waves, microwaves, infrared rays, etc.) to propagate information in space, thereby realizing communication between devices. For example, the wireless communication type may include Bluetooth, Star Flash, etc.
[0043] Specifically, taking the pen end supporting two types of wireless communication, such as Bluetooth and Star Flash, as an example, the first address packet can be a Bluetooth MAC address packet, the format of which is shown in Table 1, and the target screen end also replies in the format of Table 1. The second address packet can be a Star Flash MAC address packet, the format of which is shown in Table 3 below: Table 3 Qi protocol sends private extended address data packet
[0044] Among them, the header byte of the second address packet sent by the pen to the tablet is 0x79, the first byte is the wireless communication type of the extended MAC address, such as 0x01 can represent Star Flash, and the remaining 6 bytes are the extended MAC address. There are two cases for the private data packet returned by the tablet to the pen end. The first is to support this wireless communication, and then reply in the format of the 0x7F header; the other is to not support this wireless communication, and then reply in the format of the 0x19 header, and only need to reply a byte of checksum, which is the CRC checksum of the last private packet (i.e. the second address packet) sent by the pen end.
[0045] In the embodiment of the present invention, the pen end supports at least two types of wireless communication, and uses different address packets to store the pen end wireless communication addresses corresponding to these communication types, which allows the pen end to communicate with different types of devices or systems and provides greater flexibility and compatibility. At the same time, the target screen end address data packet is also correspondingly divided into data packets corresponding to the pen end address packet to support this multi-communication type interaction.
[0046] Based on the above embodiment, in step 130, pairing and connecting with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address includes: Step 131, checking whether there is a first screen terminal address that is currently connected; Step 132, if it does not exist, pairing and connecting with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address; Step 133: If it exists, compare the first screen end address with the target screen end wireless communication address, and based on the comparison result, pair and connect with the target screen end.
[0047] It should be noted that, considering that the pen end can be switched between different screen ends, in order to ensure the accuracy and stability of the pairing connection between the pen end and the target screen end, when the pen end in the embodiment of the present invention receives the pairing connection request from the target screen end, it will first check whether there is a first screen end address that is currently connected. If the pen end is already connected to a screen end, then when a new screen end pairing connection request is received, it is necessary to decide whether to maintain the current connection or re-establish a connection with the new screen end. This inspection and judgment helps to achieve automatic communication connection between the pen end and the target screen end and maintain the stability of the connection. It should be understood that the target screen end here refers to the screen end device to which the pen end is to be connected, and the first screen end refers to the screen end device to which the pen end is already connected. The target screen end and the first screen end can be the same screen end device or different screen end devices.
[0048] Specifically, the pen end can maintain a list of currently connected screen end addresses in its internal storage or cache. When the pen end receives a pairing connection request initiated by the target screen end, the pen end will first query the address list to determine whether there is a currently connected first screen end address. Here, the currently connected first screen end address refers to the wireless communication MAC address of the screen end with which the pen end is currently connected and can communicate and transmit data wirelessly. If the pen end currently does not have a connected first screen end address, this indicates that the pen end has not currently established a connection with any screen end. In this case, the pen end can pair and connect with the target screen end based on the received target screen end wireless communication address and its own wireless communication address.
[0049] If the pen end currently has a connected first screen end address, it indicates that the pen end has established a pairing connection with a screen end. In this case, the pen end needs to further decide whether to continue to connect with the current screen end, or to disconnect the current connection and establish a connection with the new screen end (i.e., the target screen end). This needs to be determined based on the comparison result of the currently connected first screen end address and the received target screen end wireless communication address. Specifically, the pen end will compare the received target screen end wireless communication address with the stored currently connected first screen end address one by one to obtain a comparison result. Here, the comparison result refers to the conclusion drawn by the pen end after comparing the received target screen end wireless communication address with the currently connected first screen end address. The conclusion may be an address match (i.e., the received target screen end wireless communication address is the same as the connected first screen end address), or an address mismatch (i.e., the received target screen end wireless communication address is different from the connected first screen end address).
[0050] Based on any of the above embodiments, in step 133, the pairing connection with the target screen end based on the comparison result includes: When the comparison result is the same, maintaining the paired connection with the first screen end address; When the comparison result is not the same, the pairing connection with the first screen end address is disconnected, and a pairing connection is established with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address.
[0051] Specifically, if the comparison result is the same, it indicates that the first screen end address to which the pen end is currently connected matches the received target screen end wireless communication address, that is, they point to the same screen end device. In this case, the pen end can continue to maintain the paired connection with the screen end without disconnecting or reconnecting. If the comparison result is different, it indicates that the first screen end address to which the pen end is currently connected does not match the received target screen end wireless communication address, that is, they point to different screen end devices. In this case, the pen end will automatically disconnect the paired connection with the current screen end (i.e., the first screen end) and pair with the new screen end based on the received new screen end wireless communication address. In other words, the pen end will switch to a wireless communication connection with another screen end.
[0052] In an embodiment of the present invention, the pen end decides whether to maintain the current connection or disconnect and re-establish the connection with the new screen end by comparing the address of the currently connected first screen end and the received target screen end wireless communication address. This mechanism ensures that the pen end can communicate with the correct screen end and provides a flexible pairing connection strategy without the need for manual operation or adjustment by the user.
[0053] Based on any of the above embodiments, after step 140, the method further includes: receiving configuration information sent by the target screen end, wherein the configuration information is sent by the target screen end when detecting that the pen end has left; Based on the configuration information, the timing is synchronized with the target screen, and when the synchronization is completed, the target protocol is applied to send a writing signal to the target screen.
[0054] Specifically, the pen end can receive the configuration information sent by the target screen end through wireless communication. After the pen end establishes a connection with the target screen end, the target screen end can send configuration information to the pen end through wireless communication (such as Bluetooth, Star Flash or other dedicated communication protocols) when it detects that the pen end has left (for example, when the pen is picked up from the charging or standby state and is ready to write). The configuration information here is the coding configuration information, which refers to a series of parameters and instructions sent by the target screen end in order to communicate and synchronize with the pen end. These configuration information may include downlink frequency, downlink time slot, information that should be transmitted in the time slot, etc., which are used to guide the pen end how to communicate and transmit data with the target screen end. It should be understood that the detection of the pen end leaving the target screen end indicates that the pen end has left the charging or standby state and is ready to write. This is one of the triggering conditions for the target screen end to send the coding configuration information to ensure that the pen end can effectively communicate and transmit data with the target screen end when preparing for writing interaction.
[0055] After receiving the coding configuration information, the pen end will adjust its communication and data processing methods through the parameters and instructions in these configuration information to synchronize the timing with the target screen end. This usually involves adjusting the communication frequency, time slot and other parameters of the pen end to ensure that the pen end can accurately send and receive data at the right time. Synchronizing the timing with the target screen end is a key step to ensure effective communication and data transmission between the pen end and the target screen end. The purpose of synchronization timing is to ensure that the operation of the pen end (such as sending electrode pulse signals) matches the receiving and processing capabilities of the target screen end, thereby avoiding problems such as data loss or transmission errors.
[0056] After completing the synchronization timing, the pen tip can write according to the target coding protocol. When writing, the pen tip will send a writing signal to the target screen end through the coding protocol. The writing signal here can be realized by an electrode pulse signal. These signals act on the touch screen, and the touch IC can directly obtain the position coordinates of the pen tip and report them to the main control chip of the target screen end. At the same time, the pen tip can also use the integrated sensor to obtain information such as the writing force and angle of the pen, and transmit this information to the touch IC of the screen through the coding protocol or transmit it to the target screen end through wireless communication (such as Star Flash). It should be understood that the above-mentioned touch IC refers to a special integrated circuit used to control touch signals in touch screen technology. Its main function is to convert the capacitance changes on the touch screen into digital signals to achieve precise control of the touch screen.
[0057] It is understood that the writing signal is a series of signals sent by the pen tip to the target screen end during the writing process, which is used to indicate the writing action and position of the pen tip. These signals can be realized through electrode pulse signals, which can be recognized by the touch IC and converted into corresponding position coordinates and writing parameters and other information.
[0058] In an embodiment of the present invention, the pen end receives configuration information sent by the target screen end, and synchronizes timing with the target screen end based on the configuration information, thereby ensuring that the pen end can communicate and synchronize well with the target screen end before writing, thereby ensuring the accuracy and fluency of writing.
[0059] Based on any of the above embodiments, the pen end address data packet also includes the pen end battery power, and the pen end leaves the target screen end when charging is completed.
[0060] Specifically, when the pen tip is placed in place on the target screen, a pen tip address data packet will be sent to the target screen. In addition to the pen tip wireless communication address, the data packet may also include the pen tip battery power. By reporting the pen tip battery power to the target screen, the target screen can understand the power status of the pen tip, so that the pen tip can be charged in time to avoid the use being affected by insufficient power during the writing process. When the pen tip is finished charging, it can leave the target screen to prepare for writing. The end of charging means that the pen tip battery is full or nearly full. Leaving the target screen at this time can ensure that the pen tip has enough power for subsequent writing operations.
[0061] Based on any of the above embodiments, Figure 2 This is a second flow chart of the protocol switching method provided by the present invention, such as Figure 2 As shown, the method is applied to the target screen end, and the method includes: Step 210, receiving a pen tip address data packet sent by the pen tip, wherein the pen tip address data packet is sent when the pen tip is placed in place on the target screen, and the pen tip address data packet includes a pen tip wireless communication address; Step 220, in response to the pen end address data packet, returning a target screen end address data packet to the pen end, and initiating a pairing connection request to the pen end, wherein the target screen end address data packet includes a target screen end wireless communication address and a target protocol; The pen end is used to perform pairing connection based on the pen end wireless communication address and the target screen end wireless communication address when receiving the pairing connection request, and to determine whether the current protocol is the same as the target protocol. If not, the current protocol is switched to the target protocol.
[0062] It should be noted that the method provided in the embodiment of the present invention can be applied to a target screen end, which refers to a display device that interacts with a pen end, for example, the target screen end may be an electronic screen, a tablet computer or a touch display screen, etc. A pen end refers to an input device with a wireless communication function, for example, a stylus pen that can write, draw or input data on the screen (i.e., the target screen end).
[0063] Specifically, after the pen tip is placed in place on the target screen, it can send a pen tip address data packet to the target screen, which may include information such as the pen tip wireless communication address and the pen tip battery level. When the target screen receives the pen tip address data packet sent by the pen tip, it first obtains the wireless communication address of the target screen, and then encapsulates the target screen wireless communication address and the target protocol into a target screen address data packet and returns it to the pen as a response. In addition, after receiving the pen tip address data packet sent by the pen tip, the target screen will also initiate a pairing connection request to the pen tip in order to pair and connect and interact with the pen tip.
[0064] After receiving the pairing connection request initiated by the target screen, the pen end will establish a pairing connection with the target screen according to the wireless communication address of the target screen and its own wireless communication address. At the same time, when the pen end receives the target protocol in the target screen address data packet, it will determine whether the protocol currently used by the pen end is the same as the target protocol used by the target screen. If they are not the same, it can be switched according to the target protocol, so that the pen end can be flexibly switched between different screens.
[0065] The method provided by the embodiment of the present invention can receive a target screen address data packet returned by the target screen by sending an address data packet to the target screen when the pen tip is placed in place. The data packet includes the target screen wireless communication address and the target protocol used by the target screen. Therefore, when the pen tip receives a pairing connection request from the target screen, it can automatically establish a wireless communication connection with the target screen according to the pen tip wireless communication address and the target screen wireless communication address. At the same time, the pen tip can determine whether the current protocol is the same as the target protocol used by the target screen. If they are not the same, the current protocol can be switched to the target protocol. The present invention realizes automatic switching of protocols through automatic communication and address data packet exchange between the pen tip and the target screen, so that the pen tip can be freely switched between different screens. The user does not need to manually set or adjust the device, which greatly simplifies the operation process and improves the convenience of use.
[0066] Based on any of the above embodiments, in step 220, initiating a pairing connection request to the pen end includes: Based on the communication type identifier in the target protocol, the target communication type is determined, and the target communication type is applied to initiate a pairing connection request to the pen end.
[0067] Specifically, after receiving the pen end address data packet sent by the pen end, the target screen end will determine the target communication type according to the communication type identifier in the target protocol, and then initiate a pairing connection request according to the target communication type. Specifically, as shown in Table 2 above, the lower 2 bits of the target coding protocol code_prot define the wireless communication type, that is, Bit1 and Bit0 in code_prot represent the communication type identifier, and the target communication type can be determined based on these two bits. Subsequently, the target screen end can initiate a pairing connection request to the pen end according to the determined target communication type.
[0068] Based on any of the above embodiments, an embodiment of the present invention provides a method for switching the coding protocol of a stylus pen. The method utilizes the private package of the wireless charging Qi protocol. When the pen end sends its MAC address to the tablet end, the tablet adds a reply data packet, which contains the MAC address of the tablet end and the coding protocol used by the tablet screen. Moreover, the storage capacity of the pen end is sufficient to support the integration of multiple coding protocols. In this way, when the pen end receives the reply data packet from the tablet end, it first determines whether they are two different tablets based on the MAC address. If so, it automatically disconnects and the new tablet initiates a new wireless connection. Secondly, it determines whether the coding protocol is the same as the coding protocol used by the previous tablet based on the coding protocol, and whether automatic switching is required.
[0069] Figure 3 FIG. 1 is a schematic diagram of the communication process of the pen provided by the present invention sucking into the first tablet, such as Figure 3 As shown, first, when the pen is sucked into the first tablet, it reports its power and pen end MAC address to the tablet, and then the tablet replies its screen coding protocol and its wireless communication MAC address to the pen end. Secondly, after receiving the MAC address of the pen end, the tablet initiates a pairing connection request to the pen end according to the wireless communication type defined by the lower 2 bits of the coding protocol, and interacts with the pen to obtain basic information about the pen end, such as manufacturer, software version, protocol type, etc. Thirdly, when the pen finishes charging and leaves the tablet, it means that it is ready to write. At this time, the tablet sends coding configuration information through wireless communication, including downlink frequency, downlink time slot, information that should be transmitted in the time slot, etc. Next, the pen end synchronizes the timing with the tablet according to the received coding configuration information, adjusts the pen action, and prepares for coding. Finally, when the pen is writing, electrode pulse signals are sent through the coding protocol. These signals act on the touch screen, and the touch IC can directly obtain its position coordinates and report them to the main control chip of the tablet. At the same time, the pen tip can use the integrated sensor to obtain the writing force and angle of the pen. This information can be transmitted to the touch IC of the screen through the coding protocol, or it can be transmitted through wireless communication (such as Star Flash), depending on the specific coding protocol definition.
[0070] Figure 4 FIG. 1 is a schematic diagram of the communication process of the pen provided by the present invention sucking into the second tablet, such as Figure 4As shown, when the pen is sucked into the second tablet, it will also report its power and its own MAC address, and then the tablet will reply with its screen coding protocol and its wireless communication MAC address. After the pen end receives the wireless communication MAC address of the tablet, it determines whether it is the same as the MAC address of the previously connected tablet. If it is the same, it will maintain the connection; if it is not the same, it will disconnect the previous wireless connection. After the pen end receives the coding protocol of the tablet, it determines whether it is the same as the coding protocol used by the previously connected tablet. If it is different, it will switch. After the tablet receives the MAC address of the pen end, it initiates a pairing connection request to the pen end according to the wireless communication type defined by the lower 2 bits of the coding protocol. Because the pen end has released the previous connection, it can respond normally to the new connection request. After the connection is successful, interact with the pen to obtain basic information about the pen end, such as manufacturer, software version, protocol type, etc.
[0071] When the pen leaves the tablet, it means it is ready to write. At this time, the tablet can send coding configuration information through wireless communication, including downlink frequency, downlink time slot, and information that should be transmitted in the time slot. Then, the pen end receives the coding configuration information of the new tablet, synchronizes the timing with the new tablet through the configuration information, adjusts the pen action, and prepares for coding. When the pen writes, it sends electrode pulse signals through the new coding protocol. This part of the process can refer to the writing interaction process between the pen and the first tablet.
[0072] Based on any of the above embodiments, Figure 5 is one of the structural diagrams of the protocol switching device provided by the present invention, such as Figure 5 As shown, the device is applied to the pen tip, and the device includes: A sending unit 510 is used to send a pen end address data packet to a target screen end when the pen end is in place, wherein the pen end address data packet includes a pen end wireless communication address; The receiving unit 520 is used to receive a target screen end address data packet returned by the target screen end and a pairing connection request initiated by the target screen end, wherein the target screen end address data packet includes a target screen end wireless communication address and a target protocol; A connection unit 530, configured to perform a pairing connection with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address in response to the pairing connection request; The switching unit 540 is used to determine whether the current protocol is the same as the target protocol, and if not, switch the current protocol to the target protocol.
[0073] The device provided by the embodiment of the present invention can receive a target screen address data packet returned by the target screen by sending an address data packet to the target screen when the pen tip is placed in place. The data packet includes the target screen wireless communication address and the target protocol used by the target screen. Therefore, when the pen tip receives a pairing connection request from the target screen, it can automatically establish a wireless communication connection with the target screen according to the pen tip wireless communication address and the target screen wireless communication address. At the same time, the pen tip can determine whether the current protocol is the same as the target protocol used by the target screen. If they are not the same, the current protocol can be switched to the target protocol. The present invention realizes automatic switching of protocols through automatic communication and address data packet exchange between the pen tip and the target screen, so that the pen tip can be freely switched between different screens. The user does not need to manually set or adjust the device, which greatly simplifies the operation process and improves the convenience of use.
[0074] Based on any of the above embodiments, the connecting unit 530 is specifically used for: Check whether there is a currently connected first screen address; If not, pairing and connecting with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address; If it exists, the first screen end address is compared with the wireless communication address of the target screen end, and based on the comparison result, a pairing connection is performed with the target screen end.
[0075] Based on any of the above embodiments, the connecting unit 530 is further configured to: When the comparison result is the same, maintaining the paired connection with the first screen end address; When the comparison result is not the same, the pairing connection with the first screen end address is disconnected, and a pairing connection is established with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address.
[0076] Based on any of the above embodiments, the device further includes a writing unit, and the writing unit is used for: receiving configuration information sent by the target screen end, wherein the configuration information is sent by the target screen end when detecting that the pen end has left; Based on the configuration information, the timing is synchronized with the target screen, and when the synchronization is completed, the target protocol is applied to send a writing signal to the target screen.
[0077] Based on any of the above embodiments, when the pen end supports at least two types of wireless communication, the pen end address data packet includes at least a first address packet and a second address packet, and the first address packet and the second address packet respectively include pen end wireless communication addresses corresponding to different wireless communication types; The target screen address data packet includes at least a first data packet and a second data packet, wherein the first data packet corresponds to the first address packet, and the second data packet corresponds to the second address packet.
[0078] Based on any of the above embodiments, the pen end address data packet also includes the pen end battery power, and the pen end leaves the target screen end when charging is completed.
[0079] Based on any of the above embodiments, Figure 6 This is a second structural diagram of the protocol switching device provided by the present invention, such as Figure 6 As shown, the device is applied to a target screen end, and the device includes: The data receiving unit 610 is used to receive a pen end address data packet sent by the pen end, wherein the pen end address data packet is sent when the pen end is placed in place on the target screen end, and the pen end address data packet includes a pen end wireless communication address; A data return unit 620 is used to return a target screen end address data packet to the pen end in response to the pen end address data packet, and initiate a pairing connection request to the pen end, wherein the target screen end address data packet includes a target screen end wireless communication address and a target protocol; The pen end is used to perform pairing connection based on the pen end wireless communication address and the target screen end wireless communication address when receiving the pairing connection request, and to determine whether the current protocol is the same as the target protocol. If not, the current protocol is switched to the target protocol.
[0080] The device provided by the embodiment of the present invention can receive a target screen address data packet returned by the target screen by sending an address data packet to the target screen when the pen tip is placed in place. The data packet includes the target screen wireless communication address and the target protocol used by the target screen. Therefore, when the pen tip receives a pairing connection request from the target screen, it can automatically establish a wireless communication connection with the target screen according to the pen tip wireless communication address and the target screen wireless communication address. At the same time, the pen tip can determine whether the current protocol is the same as the target protocol used by the target screen. If they are not the same, the current protocol can be switched to the target protocol. The present invention realizes automatic switching of protocols through automatic communication and address data packet exchange between the pen tip and the target screen, so that the pen tip can be freely switched between different screens. The user does not need to manually set or adjust the device, which greatly simplifies the operation process and improves the convenience of use.
[0081] Based on any of the above embodiments, the data returning unit 620 is specifically used for: Based on the communication type identifier in the target protocol, the target communication type is determined, and the target communication type is applied to initiate a pairing connection request to the pen end.
[0082] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the protocol switching method, which is applied to the pen end, and the method includes: when the pen end is placed in place, sending a pen end address data packet to the target screen end, wherein the pen end address data packet includes the pen end wireless communication address; receiving a target screen end address data packet returned by the target screen end and a pairing connection request initiated by the target screen end, wherein the target screen end address data packet includes the target screen end wireless communication address and the target protocol; in response to the pairing connection request, pairing and connecting with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address; judging whether the current protocol is the same as the target protocol, and if not, switching the current protocol to the target protocol.
[0083] The processor 710 can call the logic instructions in the memory 730 to execute the protocol switching method, which is applied to the target screen end, and the method includes: receiving a pen end address data packet sent by the pen end, the pen end address data packet is sent when the pen end is placed in place on the target screen end, and the pen end address data packet includes the pen end wireless communication address; in response to the pen end address data packet, returning the target screen end address data packet to the pen end, and initiating a pairing connection request to the pen end, the target screen end address data packet includes the target screen end wireless communication address and the target protocol; the pen end is used to perform a pairing connection based on the pen end wireless communication address and the target screen end wireless communication address when receiving the pairing connection request, and determine whether the current protocol is the same as the target protocol. If not, switching the current protocol to the target protocol.
[0084] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the relevant technology 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 a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0085] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the protocol switching method provided by the above-mentioned methods. The method is applied to the pen end, and the method includes: when placed in place, sending a pen end address data packet to the target screen end, the pen end address data packet includes the pen end wireless communication address; receiving a target screen end address data packet returned by the target screen end and a pairing connection request initiated by the target screen end, the target screen end address data packet includes the target screen end wireless communication address and the target protocol; in response to the pairing connection request, pairing and connecting with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address; judging whether the current protocol is the same as the target protocol, if not, switching the current protocol to the target protocol.
[0086] In addition, when the computer program is executed by the processor, the computer can also execute the protocol switching method provided by the above-mentioned methods, which is applied to the target screen end, and the method includes: receiving a pen end address data packet sent by the pen end, the pen end address data packet is sent when the pen end is placed in place on the target screen end, and the pen end address data packet includes the pen end wireless communication address; in response to the pen end address data packet, returning the target screen end address data packet to the pen end, and initiating a pairing connection request to the pen end, the target screen end address data packet includes the target screen end wireless communication address and the target protocol; the pen end is used to perform a pairing connection based on the pen end wireless communication address and the target screen end wireless communication address when receiving the pairing connection request, and determine whether the current protocol is the same as the target protocol. If not, switching the current protocol to the target protocol.
[0087] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the protocol switching method provided by the above-mentioned methods, and the method is applied to a pen end, and the method includes: when placed in place, sending a pen end address data packet to a target screen end, the pen end address data packet including a pen end wireless communication address; receiving a target screen end address data packet returned by the target screen end and a pairing connection request initiated by the target screen end, the target screen end address data packet including a target screen end wireless communication address and a target protocol; in response to the pairing connection request, pairing and connecting with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address; determining whether the current protocol is the same as the target protocol, and if not, switching the current protocol to the target protocol.
[0088] In addition, when the computer program is executed by the processor, it is implemented to execute the protocol switching method provided by the above-mentioned methods, and the method is applied to the target screen end, and the method includes: receiving a pen end address data packet sent by the pen end, the pen end address data packet is sent when the pen end is placed in place on the target screen end, and the pen end address data packet includes the pen end wireless communication address; in response to the pen end address data packet, returning the target screen end address data packet to the pen end, and initiating a pairing connection request to the pen end, the target screen end address data packet includes the target screen end wireless communication address and the target protocol; the pen end is used to perform a pairing connection based on the pen end wireless communication address and the target screen end wireless communication address when receiving the pairing connection request, and determine whether the current protocol is the same as the target protocol. If not, switching the current protocol to the target protocol.
[0089] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.
[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A protocol switching method, characterized in that: The method is applied to the pen tip, and the method comprises: When the pen is placed in place, a pen end address data packet is sent to the target screen end, wherein the pen end address data packet includes the pen end wireless communication address; Receive a target screen end address data packet returned by the target screen end and a pairing connection request initiated by the target screen end, wherein the target screen end address data packet includes a target screen end wireless communication address and a target protocol; In response to the pairing connection request, pairing and connecting with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address; Determine whether the current protocol is the same as the target protocol, and if not, switch the current protocol to the target protocol.
2. The protocol switching method according to claim 1, characterized in that: The pairing and connecting with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address includes: Check whether there is a currently connected first screen address; If not, pairing and connecting with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address; If it exists, the connected first screen end address is compared with the target screen end wireless communication address, and based on the comparison result, a pairing connection is performed with the target screen end.
3. The protocol switching method according to claim 2, characterized in that: The pairing and connecting with the target screen end based on the comparison result includes: When the comparison result is the same, maintaining the paired connection with the first screen end address; When the comparison result is not the same, the pairing connection with the first screen end address is disconnected, and a pairing connection is established with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address.
4. The protocol switching method according to claim 1, characterized in that: The step of switching the current protocol to the target protocol further includes: receiving configuration information sent by the target screen end, wherein the configuration information is sent by the target screen end when detecting that the pen end has left; Based on the configuration information, the timing is synchronized with the target screen, and when the synchronization is completed, the target protocol is applied to send a writing signal to the target screen.
5. The protocol switching method according to claim 1, characterized in that: In the case where the pen end supports at least two types of wireless communication, the pen end address data packet includes at least a first address packet and a second address packet, and the first address packet and the second address packet respectively include pen end wireless communication addresses corresponding to different wireless communication types; The target screen address data packet includes at least a first data packet and a second data packet, wherein the first data packet corresponds to the first address packet, and the second data packet corresponds to the second address packet.
6. The protocol switching method according to any one of claims 1 to 5, characterized in that: The pen end address data packet also includes the pen end battery power, and the pen end leaves the target screen end when charging is completed.
7. A protocol switching method, characterized in that: The method is applied to a target screen, and the method comprises: receiving a pen tip address data packet sent by the pen tip, wherein the pen tip address data packet is sent when the pen tip is placed in place on the target screen, and the pen tip address data packet includes a pen tip wireless communication address; In response to the pen end address data packet, returning a target screen end address data packet to the pen end, and initiating a pairing connection request to the pen end, wherein the target screen end address data packet includes a target screen end wireless communication address and a target protocol; The pen end is used to perform pairing connection based on the pen end wireless communication address and the target screen end wireless communication address when receiving the pairing connection request, and to determine whether the current protocol is the same as the target protocol. If not, the current protocol is switched to the target protocol.
8. The protocol switching method according to claim 7, characterized in that: The initiating a pairing connection request to the pen end includes: Based on the communication type identifier in the target protocol, the target communication type is determined, and the target communication type is applied to initiate a pairing connection request to the pen end.
9. A protocol switching device, characterized in that: The device is applied to the pen tip, and the device comprises: A sending unit, used to send a pen end address data packet to a target screen end when the pen end is in place, wherein the pen end address data packet includes a pen end wireless communication address; A receiving unit, configured to receive a target screen end address data packet returned by the target screen end and a pairing connection request initiated by the target screen end, wherein the target screen end address data packet includes a target screen end wireless communication address and a target protocol; A connection unit, configured to perform a pairing connection with the target screen end based on the pen end wireless communication address and the target screen end wireless communication address in response to the pairing connection request; The switching unit is used to determine whether the current protocol is the same as the target protocol, and if not, switch the current protocol to the target protocol.
10. A protocol switching device, characterized in that: The device is applied to a target screen end, and the device comprises: A data receiving unit, used for receiving a pen tip address data packet sent by a pen tip, wherein the pen tip address data packet is sent when the pen tip is placed in place on the target screen, and the pen tip address data packet includes a pen tip wireless communication address; A data returning unit, configured to return a target screen end address data packet to the pen end in response to the pen end address data packet, and initiate a pairing connection request to the pen end, wherein the target screen end address data packet includes a target screen end wireless communication address and a target protocol; The pen end is used to perform pairing connection based on the pen end wireless communication address and the target screen end wireless communication address when receiving the pairing connection request, and to determine whether the current protocol is the same as the target protocol. If not, the current protocol is switched to the target protocol.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the protocol switching method according to any one of claims 1 to 8 is implemented.
12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the protocol switching method according to any one of claims 1 to 8 is implemented.