Interaction method, electronic equipment and computer readable storage medium
By shortening the data transmission cycle between the stylus and the electronic device and optimizing the handwriting display, the problem of the pen tip disappearing is solved and the writing experience is improved.
Patent Information
- Application Number
- CN202410774193.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-15
- Publication Date
- 2025-09-23
AI Technical Summary
When a user uses a stylus to write on an electronic device, the end line of the handwriting displayed on the display screen is thicker when the pen tip is quickly lifted, and the pen tip disappears, which reduces the writing experience.
The stylus sends a message to the electronic device requesting to shorten the data transmission cycle. The electronic device determines that the concurrent communication service set only includes services corresponding to frequency bands other than 2.4GHz, shortens the data transmission cycle to optimize handwriting display and reduce the disappearance of pen tips.
By shortening the data transmission cycle, the interaction between the stylus and the electronic device is faster, the information corresponding to the pen tip is transmitted in a timely manner, the handwriting on the display screen is optimized, and the disappearance of the pen tip is reduced.
Smart Images

Figure CN120692539A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with application number 202410295238.5 submitted to the China Patent Office, application date March 15, 2024, and invention name “Interactive method, electronic device and computer-readable storage medium”. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0002] The present application relates to the technical field of electronic devices, and in particular to an interaction method, an electronic device, and a computer-readable storage medium. Background Art
[0003] A stylus is an input device for electronic devices like tablets and smartphones. It connects to these devices via Bluetooth. It can be used to write and draw on the display of an electronic device. The thickness of the handwriting displayed on the display varies depending on the touch pressure.
[0004] Currently, when a user writes with a stylus and quickly lifts the pen tip, the end line of the handwriting displayed on the display screen is thicker and there appears to be no pen tip, which reduces the user's writing experience. Summary of the Invention
[0005] The present application provides an interactive method, an electronic device, and a computer-readable storage medium, which can optimize handwriting and reduce the disappearance of pen tips.
[0006] In a first aspect, the present application provides an interaction method, which is applied to a first electronic device that communicates with a stylus via Bluetooth, the method comprising: obtaining a first request; the first request is a message sent by the stylus to the first electronic device when the stylus switches to a writing state, requesting to shorten the period of data transmission between the first electronic device and the first electronic device; in response to the first request, determining a set of services other than the stylus writing that communicate with the first electronic device in real time and concurrently; when the service set only includes services corresponding to frequency bands other than 2.4 GHz, in response to the first request, transmitting data with the stylus at a shortened period. The transmitted data includes pressure-sensitive data, and the thickness of the handwriting displayed on the first electronic device is proportional to the pressure-sensitive data received from the stylus.
[0007] In this embodiment, when the stylus is in a writing state, the stylus sends a message to a first electronic device requesting a shortened data transmission period between the stylus and the first electronic device. The first electronic device determines a set of services other than stylus writing services for real-time concurrent communication with the first electronic device, and if the service set only includes services corresponding to frequency bands other than 2.4 GHz, the first electronic device responds to the first request and transmits data with the stylus at the shortened period. By shortening the data transmission period, the first electronic device can interact with the stylus more quickly, facilitating timely transmission of information corresponding to the pen tip to the first electronic device, optimizing the handwriting displayed on the first electronic device's display screen, and reducing the disappearance of the pen tip.
[0008] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: when the service set includes services corresponding to the 2.4 GHz frequency band and only includes low-bit rate services, in response to the first request, data is transmitted with the stylus at a shortened period; the low-bit rate service is: a service in which the period of data transmission with the first electronic device via the 2.4 GHz frequency band is greater than a first preset value.
[0009] When this embodiment is used, when the service set includes services corresponding to the 2.4GHz frequency band and only includes low-bitrate services, data is transmitted with the stylus in a shortened period; this operation has no obvious impact on the low-bitrate services, and the first electronic device can interact with the stylus more quickly, which is conducive to timely transmission of information corresponding to the pen tip to the first electronic device, and is conducive to optimizing the handwriting displayed on the display screen of the first electronic device and reducing the disappearance of the pen tip.
[0010] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: when the service set includes services corresponding to the 2.4 GHz frequency band, and the services corresponding to the 2.4 GHz frequency band include a first high code rate service, in response to the first request, sending a message to the stylus indicating that the period of data transmission between the first electronic device and the stylus is not agreed to be adjusted; the first high code rate service is: a service in which the period of data transmission with the first electronic device via the 2.4 GHz frequency band is less than a second preset value, and the period of data transmission with the first electronic device via the 2.4 GHz frequency band is not adjustable.
[0011] Using this embodiment, when the service set includes services corresponding to the 2.4GHz frequency band and the services corresponding to the 2.4GHz frequency band include the first high-rate service, in order not to affect the performance of the first high-rate service, this scenario responds to the first request and does not adjust the period of data transmission between the first electronic device and the stylus.
[0012] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: when the service set includes services corresponding to the 2.4 GHz frequency band, the services corresponding to the 2.4 GHz frequency band do not include the first high code rate service, the services corresponding to the 2.4 GHz frequency band include a second high code rate service, and the period of data transmission between the second electronic device corresponding to the current second high code rate service and the first electronic device is not the maximum value of the adjustable data transmission period, sending a second request to the second electronic device, the second request being used to request an increase in the period of data transmission between the second electronic device and the first electronic device; the second high code rate service is: a service in which the period of data transmission with the first electronic device via the 2.4 GHz frequency band is less than a third preset value, and the period of data transmission with the first electronic device via the 2.4 GHz frequency band is an adjustable service.
[0013] Using this embodiment, when the service set includes services corresponding to the 2.4GHz frequency band, the services corresponding to the 2.4GHz frequency band do not include the first high code rate service, the services corresponding to the 2.4GHz frequency band include the second high code rate service, and the period of data transmission between the second electronic device corresponding to the current second high code rate service and the first electronic device is not the maximum value of the adjustable data transmission period, a second request is sent to the second electronic device, requesting to increase the period of data transmission between the second electronic device and the first electronic device; by sending the request to increase the data transmission period, negotiation is conducted with the second electronic device, and increasing the transmission period of the second electronic device is conducive to reducing the conflict between the second electronic device and the stylus when using the 2.4GHz frequency band, and is conducive to optimizing the interaction performance between the stylus and the first electronic device.
[0014] In combination with the first aspect, in certain implementations of the first aspect, the method may further include: upon receiving a feedback message from the second electronic device in response to the second request, wherein the feedback message indicates that the second electronic device agrees to increase the period for data transmission between the second electronic device and the first electronic device, responding to the first request, transmitting data with the stylus at the shortened period.
[0015] By adopting this embodiment, when the service set includes services corresponding to the 2.4GHz frequency band, the services corresponding to the 2.4GHz frequency band do not include the first high code rate service, the services corresponding to the 2.4GHz frequency band include the second high code rate service, and the data transmission period between the second electronic device corresponding to the current second high code rate service and the first electronic device is not the maximum value of the adjustable data transmission period, a second request is sent to the second electronic device, and the second electronic device agrees to increase the communication period with the first electronic device, which is beneficial to reducing the resources of the 2.4GHz frequency band occupied by the second electronic device and is beneficial to optimizing the interaction performance between the stylus and the first electronic device.
[0016] In combination with the first aspect, in certain implementations of the first aspect, the method may further include: upon receiving a feedback message sent by the second electronic device in response to the second request, wherein the feedback message indicates that the second electronic device does not agree to increase the period of data transmission between the second electronic device and the first electronic device, in response to the first request, sending a message to the stylus indicating that the second electronic device does not agree to adjust the period of data transmission between the first electronic device and the stylus.
[0017] Using this embodiment, when the service set includes services corresponding to the 2.4GHz frequency band, the services corresponding to the 2.4GHz frequency band do not include the first high code rate service, the services corresponding to the 2.4GHz frequency band include the second high code rate service, and the period of data transmission between the second electronic device corresponding to the current second high code rate service and the first electronic device is not the maximum value of the adjustable data transmission period, a second request is sent to the second electronic device. When a message is received from the second electronic device that it does not agree to increase the period of communication between the second electronic device and the first electronic device, a message is sent to the stylus that it does not agree to adjust the period of data transmission between the first electronic device and the stylus, which is conducive to reducing the impact on the transmission performance of the second electronic device.
[0018] In combination with the first aspect, in certain implementations of the first aspect, the second high bit rate service includes: a call service, a music playback service, or a file transfer service, etc.
[0019] The second high bit rate service can communicate with the first electronic device with multiple communication cycles. Normally, the second electronic device automatically adjusts according to the network conditions. In the embodiment of the present application, the second electronic device can determine whether to adjust according to the request of the first electronic device. For example, in the related art, when the network conditions are good, the music playback service can use a high bit rate to communicate with the first electronic device. When the network conditions are poor, the music playback service can use a medium bit rate or a low bit rate to communicate with the first electronic device. Using the technical solution provided by the present application, a request can be sent to the second electronic device related to the music playback service, requesting the second electronic device to increase the communication cycle between the second electronic device and the first electronic device. In response to the request to increase the communication cycle, the second electronic device can agree or disagree.
[0020] In conjunction with the first aspect, in certain implementations of the first aspect, the shortened period is shorter than the period during which the pressure-sensing signal is generated. In this manner, pressure-sensing data generated by the stylus can be promptly transmitted to the first electronic device, reducing pen tip loss. For example, transmitting data with the stylus at the shortened period includes transmitting data with the stylus at a period of 3.75 milliseconds.
[0021] In a second aspect, the present application provides an electronic device, comprising: one or more processors, and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code comprising computer instructions, the one or more processors calling the computer instructions to enable the electronic device to execute any one of the methods in the technical solution described in the first aspect.
[0022] In a third aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes instructions. When the instructions are executed on an electronic device, the electronic device executes any one of the methods in the technical solution described in the first aspect.
[0023] It should be understood that the technical solutions provided in the second and third aspects above have technical features that can correspond to the interactive methods provided in the first aspect and its possible implementation methods, so the beneficial effects that can be achieved are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1A It is a schematic diagram of lifting the stylus pen when writing on the display screen of an electronic device;
[0025] Figure 1B This is a schematic diagram of handwriting displayed on a display screen when a stylus is writing in the related art;
[0026] Figure 1C is a schematic diagram of handwriting displayed on a display screen when the interactive method provided by the present application is used;
[0027] Figure 2 This is a flowchart of an interactive method provided by an embodiment of the present application;
[0028] Figure 3 This is a schematic diagram of the interaction process between a tablet computer and a stylus pen in one embodiment of the present application;
[0029] Figure 4 This is a schematic diagram of the interaction process between a tablet computer and a stylus pen in one embodiment of the present application;
[0030] Figure 5 This is a schematic diagram of the interaction process between a tablet computer and a stylus pen in one embodiment of the present application;
[0031] Figure 6 This is a schematic diagram of the interaction process between a tablet computer, a stylus pen, and a second electronic device in one embodiment of the present application;
[0032] Figure 7 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0034] In the following, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the technical features indicated. Therefore, a feature specified as "first," "second," or "third" may explicitly or implicitly include one or more of the features.
[0035] Figure 1A This is a schematic diagram of an application scenario to which the interactive method provided in an embodiment of the present application is applicable. When writing with a stylus, the stylus moves on the display screen of an electronic device, and the stylus is lifted up after writing is completed. Figure 1B It is the handwriting displayed on the display screen after the stylus interacts with the electronic device (such as a tablet computer, smart phone, etc.) in the existing technology and writes multiple horizontal lines on the surface of the electronic device. Figure 1B It can be seen that when the relevant technology is used, the pen tip at the end of the handwriting sometimes disappears, and sometimes is not obvious, which is different from the actual writing target.
[0036] Through testing and analysis, R&D personnel found that Figure 1B The problem shown in the figure is caused by a mismatch between the data transmission cycle and the cycle of the pressure data generated when writing with the stylus. Styluses and electronic devices typically communicate via Bluetooth, using the 2.4GHz frequency band. The default cycle for data transmission between the stylus and electronic devices is approximately 11 milliseconds. The cycle of the pressure data generated by the stylus on the display is approximately 4 milliseconds. As can be seen from the mismatch between the two cycles, the data that was not transmitted in time is lost after the stylus is lifted. This is especially noticeable when the pen is lifted quickly, as the loss of the pen tip is more obvious.
[0037] The idea of this application includes: limiting the usage scenarios, shortening the data transmission cycle between the stylus and the electronic device while having little impact on other existing services, so that the pressure data generated by the stylus can be transmitted to the electronic device in a timely manner, and the electronic device's display screen displays lines that match the data transmitted by the stylus. This is conducive to optimizing the handwriting displayed on the electronic device's display screen and reducing the disappearance of the pen tip. In some embodiments, after adopting the technical solution provided by this application, the handwriting is Figure 1CAs shown. For example, the period of stylus transmission can be set to be less than the period of pressure data generation. The period of pressure data generation of the stylus is usually around 4ms. When the technical solution provided by this application is adopted, when certain conditions are met, the period of data transmission from the stylus to the electronic device (such as the parameter Connection_Interval) can be changed to 3.75ms. This application solves the problem of pen tip disappearing by making privatized modifications to the current BLE protocol (the value range of Connection_Interval in the traditional BLE protocol is 7.5ms to 4s) without increasing hardware costs separately.
[0038] The interaction method provided in the embodiments of the present application can be applied to electronic devices that can interact with a stylus, such as mobile phones, tablet computers, personal digital assistants (PDAs), laptop computers, ultra-mobile personal computers (UMPCs), and netbooks. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
[0039] like Figure 2 As shown, in one embodiment of the present application, the interaction method is applied to a first electronic device that communicates with a stylus via Bluetooth, and the interaction method includes the following steps: 201 to 203.
[0040] 201. Obtain a first request; the first request is a message sent by the stylus to the first electronic device when the stylus is switched to a writing state, for requesting to shorten a data transmission period with the first electronic device.
[0041] The data transmitted by the stylus to the first electronic device includes pressure data. The thickness of the handwriting displayed on the first electronic device is proportional to the pressure data received from the stylus. The greater the pressure, the thicker the handwriting, and the smaller the pressure, the thinner the handwriting.
[0042] 202. In response to the first request, determine a service set other than stylus writing that is communicated with the first electronic device in real time and concurrently.
[0043] 203. When the service set only includes services corresponding to frequency bands other than 2.4 GHz, in response to the first request, perform data transmission with the stylus at a shortened period.
[0044] It should be noted that the service set mentioned here is a set of services other than stylus writing, such as Wi-Fi communication, audio playback, etc. Wi-Fi can operate in both the 2.4 GHz and 5 GHz frequency bands.
[0045] For example, if the service set does not include services using the 2.4GHz frequency band other than the stylus, such as when the service set only includes WiFi working in the 5GHz frequency band, the preset condition is met: only services corresponding to frequency bands other than 2.4GHz are included in the service set. Then, in response to the first request, data is transmitted with the stylus at a shortened period. If a pressure sensor is provided on the stylus, the stylus can obtain pressure data of the stylus pressing the display screen of the first electronic device through the pressure sensor. Usually, the pressure data generation period is 4ms. In the related art, the period for the stylus to transmit data to the first electronic device is 11.225ms. In the embodiment of the present application, when the preset conditions are met, the first electronic device transmits data with the stylus at a shortened period.
[0046] In this embodiment, when the stylus is in a writing state, the stylus sends a message to a first electronic device requesting a shortened data transmission period between the stylus and the first electronic device. The first electronic device determines a set of services other than stylus writing services for real-time concurrent communication with the first electronic device, and if the service set only includes services corresponding to frequency bands other than 2.4 GHz, the first electronic device responds to the first request and transmits data with the stylus at the shortened period. By shortening the data transmission period, the first electronic device can interact with the stylus more quickly, facilitating timely transmission of information corresponding to the pen tip to the first electronic device, optimizing the handwriting displayed on the first electronic device's display screen, and reducing the disappearance of the pen tip.
[0047] like Figure 3 As shown, in one embodiment of the present application, the interaction method is applied to a first electronic device that communicates with a stylus via Bluetooth. For the convenience of description, in this embodiment, the first electronic device is described using a tablet computer as an example. It can be understood that the first electronic device can also be other electronic devices. In this embodiment, the interaction method includes the following steps: 301 to 305.
[0048] 301. The stylus determines whether the current state is a writing state.
[0049] If the judgment result is yes, execute step 302; if the judgment result is no, execute step 301.
[0050] 302. The stylus sends a first request to the tablet computer, requesting to shorten a data transmission period between the stylus and the tablet computer.
[0051] The first request is a message sent by the stylus to the tablet computer when the stylus is switched to the writing state, and is used to request to shorten the data transmission period between the stylus and the tablet computer.
[0052] The data transmitted by the stylus to the tablet computer includes pressure data. The thickness of the handwriting displayed on the tablet computer is proportional to the pressure data received from the stylus. The greater the pressure, the thicker the handwriting, and the smaller the pressure, the thinner the handwriting.
[0053] 303. The tablet computer determines a set of services other than stylus writing that communicate with the tablet computer in real time and concurrently.
[0054] 304. When the service set only includes services corresponding to frequency bands other than 2.4 GHz, in response to the first request, the tablet computer shortens the period of data transmission between the tablet computer and the stylus pen, and transmits data with the stylus pen at the shortened period.
[0055] It should be noted that the service set mentioned here is a set of services other than stylus writing, such as Wi-Fi communication, audio playback, etc. Wi-Fi can operate in both the 2.4 GHz and 5 GHz frequency bands.
[0056] For example, if the service set does not include services using the 2.4GHz frequency band other than the stylus, such as when the service set only includes WiFi operating in the 5GHz frequency band, the preset condition is met: only services corresponding to frequency bands other than 2.4GHz are included in the service set. Then, in response to the first request, data is transmitted with the stylus at a shortened period. If a pressure sensor is provided on the stylus, the stylus can obtain pressure data of the stylus pressing the tablet display through the pressure sensor. Usually, the pressure data generation period is 4ms. In the related art, the period for the stylus to transmit data to the tablet is 11.225ms. In the embodiment of the present application, when the preset conditions are met, the tablet computer transmits data with the stylus at a shortened period.
[0057] 305. The stylus pen transmits data to the tablet computer in a shortened cycle.
[0058] In this embodiment, when the stylus is in the writing state, the stylus sends a message to the tablet computer requesting a shortened data transmission cycle between the stylus and the tablet computer. The tablet computer then determines a set of services other than stylus writing services that communicate concurrently with the tablet computer in real time, and if the service set only includes services corresponding to frequency bands other than 2.4 GHz, the tablet computer responds to the first request and transmits data with the stylus at the shortened cycle. This shortened data transmission cycle allows the tablet computer to interact with the stylus more quickly, facilitates timely transmission of information corresponding to pen strokes to the tablet computer, optimizes the display of handwriting on the tablet computer's screen, and reduces the disappearance of pen strokes.
[0059] like Figure 4As shown, in one embodiment of the present application, the interaction method is applied to a first electronic device that communicates with a stylus via Bluetooth. For the convenience of description, in this embodiment, the first electronic device is described using a tablet computer as an example. It can be understood that the first electronic device can also be other electronic devices. In this embodiment, the interaction method includes the following steps: 401 to 405.
[0060] 401. The stylus determines whether the current state is a writing state.
[0061] If the judgment result is yes, execute step 402; if the judgment result is no, execute step 401.
[0062] 402. The stylus sends a first request to the tablet computer, requesting to shorten the data transmission period between the stylus and the tablet computer.
[0063] The first request is a message sent by the stylus to the tablet computer when the stylus is switched to the writing state, and is used to request to shorten the data transmission period between the stylus and the tablet computer.
[0064] The data transmitted by the stylus to the tablet computer includes pressure data. The thickness of the handwriting displayed on the tablet computer is proportional to the pressure data received from the stylus. The greater the pressure, the thicker the handwriting, and the smaller the pressure, the thinner the handwriting.
[0065] 403. The tablet computer determines a set of services other than stylus writing that communicate with the tablet computer in real time and concurrently.
[0066] 404. When the service set includes services corresponding to the 2.4 GHz frequency band and only includes low bit rate services, in response to the first request, the tablet computer shortens the period of data transmission between the tablet computer and the stylus pen, and transmits data with the stylus pen at the shortened period.
[0067] The low-bitrate service corresponding to the 2.4 GHz frequency band is a service whose data transmission period with the tablet computer via the 2.4 GHz frequency band is greater than a first preset value. The first preset value can be set as needed. For example, the first preset value can be slightly less than the period during which the wristband transmits acquired heart pulse information to the tablet computer via the 2.4 GHz frequency band.
[0068] It should be noted that the service set mentioned here is a set of services other than stylus writing, for example, it may include a wristband transmitting the user's heart pulse information obtained through a sensor to a tablet computer.
[0069] For example, if the service set includes transmitting acquired heart pulse information to a tablet computer via a 2.4 GHz frequency band, data transmission is performed with the stylus at a shortened cycle in response to the first request.
[0070] 405. The stylus pen transmits data to the tablet computer in a shortened cycle.
[0071] In this embodiment, when the stylus is in the writing state, the stylus sends a message to the tablet computer requesting a shortened data transmission cycle between the stylus and the tablet computer. The tablet computer then determines a set of services, excluding stylus writing services, that are communicating concurrently with the tablet computer in real time. If the service set includes services corresponding to the 2.4 GHz frequency band and only includes low-bitrate services, the tablet computer responds to the first request and transmits data with the stylus at the shortened cycle. This shortened data transmission cycle allows the tablet computer to interact with the stylus more quickly, facilitates timely transmission of information corresponding to pen strokes to the tablet computer, optimizes the display of handwriting on the tablet computer's screen, and reduces the disappearance of pen strokes.
[0072] like Figure 5 As shown, in one embodiment of the present application, the interaction method is applied to a first electronic device that communicates with a stylus via Bluetooth. For the convenience of description, in this embodiment, the first electronic device is described using a tablet computer as an example. It can be understood that the first electronic device can also be other electronic devices. In this embodiment, the interaction method includes the following steps: 501 to 505.
[0073] 501. The stylus determines whether the current state is a writing state.
[0074] If the judgment result is yes, execute step 502; if the judgment result is no, execute step 501.
[0075] 502. The stylus sends a first request to the tablet computer, requesting to shorten a data transmission period between the stylus and the tablet computer.
[0076] The first request is a message sent by the stylus to the tablet computer when the stylus is switched to the writing state, and is used to request to shorten the data transmission period between the stylus and the tablet computer.
[0077] The data transmitted by the stylus to the tablet computer includes pressure data. The thickness of the handwriting displayed on the tablet computer is proportional to the pressure data received from the stylus. The greater the pressure, the thicker the handwriting, and the smaller the pressure, the thinner the handwriting.
[0078] 503. The tablet computer determines a set of services other than stylus writing that communicate with the tablet computer in real time and concurrently.
[0079] 504. When the service set includes services corresponding to the 2.4 GHz frequency band, and the services corresponding to the 2.4 GHz frequency band include a first high-code-rate service, in response to a first request, the tablet computer does not adjust the period of data transmission between the tablet computer and the stylus, and sends a message to the stylus indicating that it does not agree to adjust the period of data transmission between the tablet computer and the stylus; the first high-code-rate service is: a service in which the period of data transmission with the tablet computer via the 2.4 GHz frequency band is less than a second preset value, and the period of data transmission with the tablet computer via the 2.4 GHz frequency band is not adjustable.
[0080] The second preset value may be set as needed. For example, the second preset value may be slightly smaller than the period for the Bluetooth headset to transmit audio data to the tablet computer.
[0081] It should be noted that the service set mentioned here is a set of services other than stylus writing.
[0082] 505. When the stylus pen transmits data to the tablet computer, the data transmission cycle is not changed.
[0083] For example, if the default transmission period between the stylus and the tablet computer is 11.25 ms, then in this embodiment, the handwriting continues to transmit data to the tablet computer at a period of 11.25 ms.
[0084] With this embodiment, when the stylus is in a writing state, the stylus sends a message to the tablet computer requesting to shorten the period of data transmission between the stylus and the tablet computer. The tablet computer determines a set of services other than stylus writing that communicate with the tablet computer in real time and concurrently. When the service set includes services corresponding to the 2.4 GHz frequency band, the service set includes services corresponding to the 2.4 GHz frequency band, and the services corresponding to the 2.4 GHz frequency band include the first high code rate service, in response to the first request, the tablet computer sends a message to the stylus indicating that it does not agree to adjust the period of data transmission between the tablet computer and the stylus. In this embodiment, in order to reduce the impact on the performance of the first high code rate service, the stylus does not change the period of data transmission.
[0085] like Figure 6 As shown, in one embodiment of the present application, the interaction method is applied to a first electronic device that communicates with a stylus via Bluetooth. For the convenience of description, in this embodiment, the first electronic device is described using a tablet computer as an example. It can be understood that the first electronic device can also be other electronic devices. In this embodiment, the interaction method includes the following steps: 601 to 609.
[0086] 601. The stylus determines whether the current state is a writing state.
[0087] If the judgment result is yes, execute step 602; if the judgment result is no, execute step 601.
[0088] 602. The stylus sends a first request to the tablet computer, requesting to shorten a data transmission period between the stylus and the tablet computer.
[0089] The first request is a message sent by the stylus to the tablet computer when the stylus is switched to the writing state, and is used to request to shorten the data transmission period between the stylus and the tablet computer.
[0090] The data transmitted from the stylus to the tablet includes pressure data and data related to the requested shortened data transmission period. The thickness of the handwriting displayed on the tablet is proportional to the pressure data received from the stylus: greater pressure results in thicker handwriting, while less pressure results in thinner handwriting.
[0091] 603. The tablet computer determines a set of services other than stylus writing that communicate with the tablet computer in real time and concurrently.
[0092] 604. When the service set includes services corresponding to the 2.4 GHz frequency band, the services corresponding to the 2.4 GHz frequency band do not include the first high bit rate service, the services corresponding to the 2.4 GHz frequency band include the second high bit rate service, and the data transmission period between the second electronic device corresponding to the current second high bit rate service and the tablet computer is not the maximum value of the adjustable data transmission period, a second request is sent to the second electronic device.
[0093] The second request is used to request an increase in the period for data transmission between the second electronic device and the tablet computer. The second high-bitrate service is a service in which the period for data transmission with the tablet computer via the 2.4 GHz frequency band is less than a third preset value, and the period for data transmission with the tablet computer via the 2.4 GHz frequency band is adjustable. The second high-bitrate service may include a call service, a music playback service, or a file transfer service.
[0094] 605. The tablet computer obtains a feedback message sent by the second electronic device in response to the second request.
[0095] 606. The tablet computer determines, based on the feedback message, whether the second electronic device agrees to increase the cycle of data transmission between the tablet computer and the second electronic device.
[0096] If the judgment result is yes, execute step 608; if the judgment result is no, execute step 607.
[0097] 607. In response to the first request, send a message to the stylus indicating that the adjustment of the data transmission cycle between the tablet computer and the stylus is not agreed.
[0098] 608. In response to the feedback message, the tablet computer transmits data with the second electronic device using the increased data transmission cycle.
[0099] 609. In response to the first request, the tablet computer transmits data to the stylus at a shortened period.
[0100] In this embodiment, when the stylus is in a writing state, the stylus sends a message to the tablet computer requesting a shortened data transmission cycle between the stylus and the tablet computer. The tablet computer determines a set of services, excluding stylus writing services, that are concurrently communicating with the tablet computer in real time. If the service set includes services corresponding to the 2.4 GHz frequency band, does not include the first high-rate service, and includes the second high-rate service, and the data transmission cycle between the second electronic device and the first electronic device corresponding to the second high-rate service is not the maximum adjustable data transmission cycle, the tablet computer sends a second request to the second electronic device. The tablet computer receives a feedback message sent by the second electronic device in response to the second request. If the feedback message determines that the second electronic device agrees to increase the data transmission cycle between the tablet computer and the first electronic device, the tablet computer transmits data to the stylus at the shortened cycle in response to the first request. If the feedback message determines that the second electronic device disagrees with increasing the data transmission cycle between the tablet computer and the stylus, the tablet computer transmits a message to the stylus computer indicating that the tablet computer disagrees with adjusting the data transmission cycle between the tablet computer and the stylus. This embodiment reduces the data transmission period between the stylus and the electronic device and improves the problem of the pen tip disappearing by limiting the usage scenarios while having little impact on other existing services.
[0101] Combined with the above Figures 1A to 6 , introduces an embodiment of the interaction method applicable to the present application. The present application also provides an electronic device, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the various interaction methods of the aforementioned embodiments of the present application.
[0102] Specifically, the interaction method in which the electronic device as the first electronic device communicates with the stylus via Bluetooth includes the following steps:
[0103] Obtain a first request; the first request is a message sent by the stylus to the first electronic device when the stylus is switched to a writing state, for requesting to shorten a data transmission period with the first electronic device.
[0104] In response to the first request, a service set other than stylus writing that is communicated with the first electronic device in real time and concurrently is determined.
[0105] When the service set includes only services corresponding to frequency bands other than 2.4 GHz, data transmission is performed with the stylus at a shortened period in response to the first request.
[0106] In some possible implementations, the interaction method for the first electronic device and the stylus to communicate via Bluetooth further includes:
[0107] When the service set includes services corresponding to the 2.4GHz frequency band and only includes low-bit-rate services, data is transmitted with the stylus at a shortened period in response to the first request; the low-bit-rate service is a service in which the period for transmitting data with the first electronic device via the 2.4GHz frequency band is greater than a first preset value.
[0108] In some possible implementations, the interaction method for the first electronic device and the stylus to communicate via Bluetooth further includes:
[0109] When the service set includes services corresponding to the 2.4GHz frequency band and the services corresponding to the 2.4GHz frequency band include a first high-code-rate service, in response to a first request, a message is sent to the stylus indicating that the period of data transmission between the first electronic device and the stylus is not agreed to be adjusted; the first high-code-rate service is: a service in which the period of data transmission with the first electronic device through the 2.4GHz frequency band is less than a second preset value, and the period of data transmission with the first electronic device through the 2.4GHz frequency band is not adjustable.
[0110] In some possible embodiments, the interaction method for the first electronic device to communicate with the stylus via Bluetooth further includes: when the service set includes services corresponding to the 2.4 GHz frequency band, the services corresponding to the 2.4 GHz frequency band do not include the first high code rate service, the services corresponding to the 2.4 GHz frequency band include the second high code rate service, and the period of data transmission between the second electronic device corresponding to the current second high code rate service and the first electronic device is not the maximum value of the adjustable data transmission period, sending a second request to the second electronic device, the second request being used to request an increase in the period of data transmission between the second electronic device and the first electronic device; the second high code rate service is: the period of data transmission with the first electronic device via the 2.4 GHz frequency band is less than a third preset value, and the period of data transmission with the first electronic device via the 2.4 GHz frequency band is an adjustable service.
[0111] In some possible implementations, the interaction method for the first electronic device and the stylus to communicate via Bluetooth further includes: upon receiving a feedback message from the second electronic device in response to the second request, the feedback message indicating that the second electronic device agrees to increase the period for data transmission between the first electronic device and the first electronic device, responding to the first request, transmitting data with the stylus at the shortened period.
[0112] In some possible implementations, the interaction method for the first electronic device and the stylus to communicate via Bluetooth further includes: upon receiving a feedback message sent by the second electronic device in response to the second request, the feedback message indicating that the second electronic device does not agree to increase the period of data transmission between the first electronic device and the first electronic device, sending a message to the stylus in response to the first request indicating that the second electronic device does not agree to increase the period of data transmission between the first electronic device and the stylus.
[0113] The second high bit rate service may include: a call service, a music playing service, or a file transfer service.
[0114] In some possible implementations, the shortened period is less than the period of pressure-sensing signal generation. If the period of pressure-sensing data generated by the stylus is approximately 4 ms, the technical solution provided in this application can be used to adjust the period of data transmission from the stylus to the electronic device to 3.75 ms if certain conditions are met.
[0115] In this embodiment, when the stylus is in a writing state, the stylus sends a message to a first electronic device requesting a shortened data transmission period between the stylus and the first electronic device. The first electronic device determines a set of services other than stylus writing services for real-time concurrent communication with the first electronic device, and if the service set only includes services corresponding to frequency bands other than 2.4 GHz, the first electronic device responds to the first request and transmits data with the stylus at the shortened period. By shortening the data transmission period, the first electronic device can interact with the stylus more quickly, facilitating timely transmission of information corresponding to the pen tip to the first electronic device, optimizing the handwriting displayed on the first electronic device's display screen, and reducing the disappearance of the pen tip.
[0116] The present application also provides a computer program product, which, when executed by a processor, implements the interactive method of any method embodiment in the present application.
[0117] This application also provides a computer-readable storage medium comprising instructions that, when executed on an electronic device, cause the electronic device to perform an interaction method as described in any of the preceding method embodiments. The specific steps of the interaction method are described in the preceding method embodiments and are not repeated here.
[0118] As an example, see Figure 7, is a structural diagram of an electronic device 700 provided in an embodiment of the present application. Figure 7 As shown, the electronic device 700 may include: a stylus (not shown), a processor 701, a communication module 702, and a display screen 703, etc.
[0119] The processor 701 may include one or more processing units. Different processing units may be independent devices or integrated into one or more processors 701. The controller may serve as the nerve center and command center of the electronic device 700. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. The processor 701 may also include a memory for storing instructions and data.
[0120] In some embodiments, the processor 701 may include one or more interfaces. The interfaces may include an integrated circuit interface, an integrated circuit internal audio interface, a pulse code modulation interface, a universal asynchronous receiver and transmitter interface, a mobile industry processor interface, a general purpose input and output interface, a subscriber identity module interface, and / or a universal serial bus interface 711.
[0121] The electronic device 700 implements a display function through a GPU, a display screen 703, and an application processor 701. The GPU is a microprocessor for image processing, which connects the display screen 703 and the application processor 701. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 701 may include one or more GPUs, which execute program instructions to generate or change display information. The display screen 703 is used to display images, video streams, etc. The communication module 702 may include an antenna x, an antenna y, a mobile communication module 702A, and / or a wireless communication module 702B. Take the example of the communication module 702 including an antenna x, an antenna y, a mobile communication module 702A and a wireless communication module 702B at the same time. In addition, the receiving module provided in the embodiment of the present application can also be arranged in the communication module 702.
[0122] The wireless communication function of the electronic device 700 can be implemented through antenna x, antenna y, mobile communication module 702A, wireless communication module 702B, a modem processor, and a baseband processor.
[0123] The mobile communication module 702A can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 700. The mobile communication module 702A may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 702A can receive electromagnetic waves from the antenna x, filter, amplify, and process the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 702A can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation through the antenna x. In some embodiments, at least some of the functional modules of the mobile communication module 702A can be set in the processor 701. In some embodiments, at least some of the functional modules of the mobile communication module 702A can be set in the same device as at least some of the modules of the processor 701.
[0124] The application processor outputs audio signals through an audio device (not limited to speaker 706A, receiver 706B, etc.) or displays images or video streams through display screen 703. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of processor 701 and be provided in the same device as mobile communication module 702A or other functional modules.
[0125] Wireless communication module 702B can provide a wireless communication solution for electronic device 700. Wireless communication module 702B can be one or more devices integrating at least one communication processing module. Wireless communication module 702B receives electromagnetic waves via antenna y, frequency-modulates and filters the electromagnetic wave signals, and transmits the processed signals to processor 701. Wireless communication module 702B can also receive signals to be transmitted from processor 701, frequency-modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna y.
[0126] The antenna x of the electronic device 700 is coupled to the mobile communication module 702A, and the antenna y is coupled to the wireless communication module 702B, so that the electronic device 700 can communicate with the network and other devices through wireless communication technology.
[0127] The electronic device 700 may also include an external memory interface 710, an internal memory 704, a universal serial bus (USB) interface 711, a charging management module 712, a power management module 713, a battery 714, an audio module 706, a speaker 706A, a receiver 706B, a microphone 706C, an earphone jack 706D, a sensor module 705, a button 709, a motor, an indicator 708, a camera 707, and a subscriber identification module (SIM) card interface. The electronic device 700 may implement audio functions such as music playback and recording through the audio module 706, the speaker 706A, the receiver 706B, the microphone 706C, the earphone jack 706D, and the application processor 701. The sensor module 705 in the electronic device 700 may implement the functions of sensing and / or acquiring various signals.
[0128] The electronic device provided in the embodiments of the present application is described above. It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 700. In other embodiments, the electronic device 700 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0129] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0130] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, the replaced units may or may not be physically separated, and the components displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed in multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0131] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0132] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0133] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. An interactive method, characterized in that: Applied to a first electronic device, the first electronic device communicating with a stylus via Bluetooth, the method comprising: receiving a first request sent by the stylus, where the first request is used to request shortening a data transmission period between the stylus and the first electronic device; In response to the first request, when the service set only includes services corresponding to frequency bands other than the first frequency band, data is transmitted with the stylus in a shortened period, the service set is a set of services other than the writing service of the stylus that communicate with the first electronic device in real time and concurrently, and the first frequency band is the Bluetooth communication frequency band used by the first electronic device and the stylus to transmit data of the writing service.
2. The method according to claim 1, characterized in that The method further comprises: In response to the first request, when the service set includes the service corresponding to the first frequency band and only includes low-bit rate services, data is transmitted with the stylus at a shortened period; the low-bit rate service is: a service in which the period of data transmission with the first electronic device through the first frequency band is greater than a first preset value.
3. The method according to claim 1 or 2, characterized in that The method further comprises: In response to the first request, when the service set includes the service corresponding to the first frequency band and the service corresponding to the first frequency band includes the first high code rate service, a message is sent to the stylus indicating that the period of data transmission between the first electronic device and the stylus is not agreed to be adjusted; the first high code rate service is: a service in which the period of data transmission with the first electronic device through the first frequency band is less than a second preset value, and the period of data transmission with the first electronic device through the first frequency band is not adjustable.
4. The method according to claim 3, characterized in that The method further comprises: In response to the first request, when the service set includes the service corresponding to the first frequency band, the service corresponding to the first frequency band does not include the first high code rate service, the service corresponding to the first frequency band includes the second high code rate service, and the current period of data transmission between the second electronic device and the first electronic device through the first frequency band is less than the maximum value of a preset range, a second request is sent to the second electronic device, and the second request is used to request to increase the period of data transmission between the second electronic device and the first electronic device; the second high code rate service is: a service whose period of data transmission with the first electronic device through the first frequency band is less than a third preset value, and the period of data transmission with the first electronic device through the first frequency band is adjustable within the preset range, and the second electronic device is a device corresponding to the second high code rate service.
5. The method according to claim 4, characterized in that The method further comprises: In response to the first request, upon receiving the first feedback message sent by the second electronic device, data is transmitted with the stylus at a shortened period, wherein the first feedback message indicates that the second electronic device agrees to increase the period of data transmission between the second electronic device and the first electronic device.
6. The method according to claim 4, characterized in that The method further comprises: In response to the first request, upon receiving a second feedback message sent by the second electronic device, a message is sent to the stylus indicating that the second electronic device does not agree to adjust the period of data transmission between the first electronic device and the stylus, wherein the second feedback message indicates that the second electronic device does not agree to increase the period of data transmission between the first electronic device and the stylus.
7. The method according to any one of claims 4 to 6, characterized in that The second high bit rate service includes: a call service, a music playing service or a file transfer service.
8. The method according to any one of claims 1 to 7, characterized in that The shortened period is smaller than a period for generating a pressure-sensing signal of the stylus.
9. The method according to any one of claims 1 to 8, characterized in that The first frequency band is 2.4 GHz for Bluetooth communication.
10. The method according to any one of claims 1 to 9, characterized in that The data transmission with the stylus at the shortened period includes: Sending a message to the stylus agreeing to adjust the data transmission period between the first electronic device and the stylus; Shortening the data transmission cycle between the stylus and the stylus; Data is transmitted with the stylus pen in a shortened cycle.
11. An interactive method, characterized in that: Applied to a stylus pen, the stylus pen communicates with a first electronic device via Bluetooth, the method comprising: When the stylus pen is in a writing state, sending a first request to the first electronic device, wherein the first request is used to request to shorten a data transmission period between the first electronic device and the first electronic device; When receiving a message from the first electronic device indicating that the adjustment of the period of data transmission between the first electronic device and the stylus is agreed, data transmission is performed with the first electronic device at the shortened period.
12. The method according to claim 11, characterized in that The method further comprises: In the case of receiving a message from the first electronic device indicating disagreement with adjusting the data transmission cycle between the first electronic device and the stylus, communicating with the first electronic device using the current data transmission cycle.
13. The method according to claim 11 or 12, characterized in that The shortened period is smaller than a period for generating a pressure-sensing signal of the stylus.
14. An interactive method, characterized in that: A stylus pen applied to a first electronic device and communicating with the first electronic device via Bluetooth, the method comprising: When the stylus is in a writing state, the stylus sends a first request to the first electronic device, where the first request is used to request shortening a data transmission period between the stylus and the first electronic device; In response to the first request, the first electronic device transmits data with the stylus at a shortened period, if a service set includes only services corresponding to frequency bands other than a first frequency band, the service set being a set of services other than the writing service of the stylus that communicate with the first electronic device in real time and concurrently, and the first frequency band being a Bluetooth communication frequency band used by the first electronic device and the stylus to transmit data of the writing service; The stylus performs data transmission with the first electronic device in a shortened cycle.
15. The method according to claim 14, characterized in that The method further comprises: In response to the first request, the first electronic device performs data transmission with the stylus at a shortened period when the service set includes the service corresponding to the first frequency band and only includes low-bit-rate services; the low-bit-rate service is a service whose data transmission period with the first electronic device via the first frequency band is greater than a first preset value; The stylus performs data transmission with the first electronic device in a shortened cycle.
16. The method according to claim 14 or 15, characterized in that The method further comprises: In response to the first request, the first electronic device sends a message to the stylus indicating that it does not agree to adjust the period of data transmission between the first electronic device and the stylus, if the service set includes the service corresponding to the first frequency band and the service corresponding to the first frequency band includes a first high-bitrate service; the first high-bitrate service is a service whose period of data transmission with the first electronic device via the first frequency band is less than a second preset value and whose period of data transmission with the first electronic device via the first frequency band is not adjustable; In response to the message of disagreement with adjusting the data transmission cycle between the first electronic device and the stylus, the stylus communicates with the first electronic device using the current data transmission cycle.
17. The method according to claim 16, characterized in that The method further comprises: The first electronic device, in response to the first request, sends a second request to the second electronic device, where the service set includes the service corresponding to the first frequency band, the service corresponding to the first frequency band does not include the first high code rate service, the service corresponding to the first frequency band includes the second high code rate service, and the current period of data transmission between the second electronic device and the first electronic device via the first frequency band is less than the maximum value of a preset range. The second request is used to request an increase in the period of data transmission between the second electronic device and the first electronic device; the second high code rate service is a service where the period of data transmission between the second electronic device and the first electronic device via the first frequency band is less than a third preset value, and the period of data transmission between the first frequency band and the first electronic device is adjustable within the preset range, and the second electronic device is a device corresponding to the second high code rate service.
18. The method according to claim 17, characterized in that The method further comprises: In response to the first request, the first electronic device performs data transmission with the stylus at a shortened period upon receiving a first feedback message sent by the second electronic device, wherein the first feedback message indicates that the second electronic device agrees to increase the data transmission period between the second electronic device and the first electronic device; The stylus performs data transmission with the first electronic device in a shortened cycle.
19. The method according to claim 17, wherein The method further comprises: In response to the first request, upon receiving a second feedback message sent by the second electronic device, the first electronic device sends a message to the stylus indicating that the second electronic device does not agree to increase the data transmission period between the first electronic device and the stylus, wherein the second feedback message indicates that the second electronic device does not agree to increase the data transmission period between the first electronic device and the stylus; In response to the message of disagreement with adjusting the data transmission cycle between the first electronic device and the stylus, the stylus communicates with the first electronic device using the current data transmission cycle.
20. The method according to any one of claims 17 to 19, characterized in that The second high bit rate service includes: a call service, a music playing service or a file transfer service.
21. The method according to claim 14, 15 or 18, characterized in that The data transmission with the stylus at the shortened period includes: The first electronic device sends a message to the stylus pen indicating that the first electronic device agrees to adjust a data transmission period between the first electronic device and the stylus pen; The first electronic device shortens the data transmission period between the first electronic device and the stylus; The first electronic device performs data transmission with the stylus at a shortened period; The stylus pen transmits data with the first electronic device at a shortened period, including: In response to the message of agreeing to adjust the period of data transmission between the first electronic device and the stylus, the stylus performs data transmission with the first electronic device using the shortened period.
22. The method according to any one of claims 14 to 21, characterized in that The shortened period is smaller than a period for generating a pressure-sensing signal of the stylus.
23. The method according to any one of claims 14 to 22, characterized in that The first frequency band is 2.4 GHz for Bluetooth communication.
24. An electronic device, characterized in that: The electronic device includes: one or more processors, and a memory; The memory is coupled to the one or more processors, and the memory is used to store computer program code, where the computer program code includes computer instructions. The one or more processors call the computer instructions to enable the electronic device to execute the interaction method according to any one of claims 1 to 10.
25. A stylus pen, characterized in that: The stylus includes: one or more processors, and a memory; The memory is coupled to the one or more processors, and the memory is used to store computer program code, where the computer program code includes computer instructions. The one or more processors call the computer instructions to enable the electronic device to execute the interaction method according to any one of claims 11 to 13.
26. An interactive system, characterized in that The interactive system includes a first electronic device and a stylus pen, the first electronic device is used to execute the interactive method according to any one of claims 1 to 10, and the stylus pen is used to execute the interactive method according to any one of claims 11 to 13.
27. The interactive system according to claim 26, characterized in that The interactive system also includes a second electronic device, which is used to execute a second high-bitrate service. The second high-bitrate service is a service in which a period of data transmission with the first electronic device via a first frequency band is less than a third preset value, and a period of data transmission with the first electronic device via the first frequency band is adjustable within a preset range. The first frequency band is a Bluetooth communication frequency band used by the first electronic device and the stylus to transmit data of the stylus' writing service.
28. A computer-readable storage medium, characterized in that The computer-readable storage medium includes instructions, which, when executed on an electronic device, cause the electronic device to execute the interaction method described in any one of claims 1 to 10; or, when executed on a stylus, cause the stylus to execute the interaction method described in any one of claims 11 to 13.