Method for detecting misalignment, adsorption device, terminal device, medium and program product

By integrating motion detection modules and wireless communication signal parameters into the adsorption device, the charging problem caused by misalignment of accessories such as styluses is solved, achieving efficient and low-cost misalignment detection, and improving user experience and charging success rate.

CN122284843APending Publication Date: 2026-06-26BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411931252.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In existing technologies, accessories such as styluses are prone to misalignment and adsorption onto devices such as tablets when the battery is low, preventing them from charging properly and causing inconvenience. Furthermore, existing misalignment detection methods increase hardware costs and have limited detection accuracy.

Method used

By integrating a motion detection module into the adsorption device, and using it to detect motion changes and combine it with wireless communication signal parameters, it can determine whether the adsorption device has experienced misaligned adsorption, thereby reducing the hardware cost of the terminal device and improving the detection accuracy.

Benefits of technology

It enables flexible detection of misaligned adsorption in adsorption devices without increasing hardware costs, improving the accuracy of misalignment detection and the flexibility of terminal device layout, thereby enhancing user experience and charging success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122284843A_ABST
    Figure CN122284843A_ABST
Patent Text Reader

Abstract

This disclosure relates to a displacement detection method, an adsorption device, a terminal device, a medium, and a program product. The method includes: acquiring a motion detection result of the adsorption device when the terminal device and the adsorption device have a communication connection; the motion detection result is obtained by a motion detection module installed on the adsorption device detecting changes in the motion of the adsorption device; based on the motion detection result, determining whether the adsorption device has undergone displacement adsorption relative to the terminal device; wherein, displacement adsorption indicates that the location of the adsorption device is different from a specified adsorption location on the terminal device. The displacement detection method proposed in this disclosure, by detecting the motion of the adsorption device, can effectively achieve displacement adsorption detection of the adsorption device while reducing the hardware cost of the terminal device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of electronic products and their accessories, and more particularly to a method for detecting misalignment, an adsorption device, a terminal device, a medium, and a program product. Background Technology

[0002] With the continuous development of science and technology, many electronic products have gradually become necessities in people's lives and work. In order to meet the needs of work and entertainment, many terminal devices such as tablet computers have developed different types of accessories such as styluses and touch keyboards.

[0003] Currently, styluses and other accessories can be magnetically attached to tablets and other devices when their batteries are low, allowing the tablet to wirelessly charge the stylus. However, because tablets may have multiple magnets or magnetic wireless coils, misalignment can easily occur during routine handling of the magnetic device. Furthermore, due to the limited area of ​​the wireless coil, if the stylus is misaligned, it may fail to charge properly, thus affecting its subsequent use. Summary of the Invention

[0004] To overcome the problems existing in related technologies, this disclosure provides a displacement detection method, an adsorption device, a terminal device, a medium, and a program product. The displacement detection method proposed in this disclosure, by detecting the movement of the adsorption device, can effectively achieve displacement adsorption detection of the adsorption device while reducing the hardware cost of the terminal device.

[0005] According to a first aspect of the present disclosure, a misalignment detection method is provided, comprising:

[0006] When the terminal device and the adsorption device have a communication connection, the motion detection result of the adsorption device is obtained; the motion detection result is obtained by the motion detection module installed on the adsorption device detecting the motion changes of the adsorption device.

[0007] Based on the motion detection results, it is determined whether the adsorption device has undergone misaligned adsorption compared to the terminal device; wherein, the occurrence of misaligned adsorption indicates that the location of the adsorption device is different from the designated adsorption location on the terminal device.

[0008] In some embodiments, determining whether the adsorption device has undergone offset adsorption relative to the terminal device based on the motion detection result includes:

[0009] When the motion detection result indicates that the adsorption device has performed a preset adsorption action, the signal parameters of the wireless communication signal of the adsorption device are acquired.

[0010] Based on the signal parameters of the wireless communication signal, it is determined whether the adsorption device has undergone misaligned adsorption.

[0011] In some embodiments, obtaining the motion detection result of the adsorption device includes:

[0012] When the motion parameters detected by the motion detection module of the adsorption device meet the preset motion conditions, the first detection result of the adsorption device is obtained.

[0013] When the motion parameters detected by the motion detection module of the adsorption device do not meet the preset motion conditions, a second detection result of the adsorption device is obtained;

[0014] The first detection result is used to indicate that the adsorption device has performed the preset adsorption action; the second detection result is used to indicate that the adsorption device has not performed the preset adsorption action.

[0015] The preset motion conditions include at least the following: the duration of the motion parameter being greater than a first preset parameter threshold is within a first preset duration range, and the motion parameter changes from being greater than the first preset parameter threshold to being less than the second preset parameter threshold within a second preset duration range.

[0016] In some embodiments, the signal parameters include signal strength; determining whether the adsorption device has undergone misaligned adsorption based on the signal parameters of the wireless communication signal includes:

[0017] When the signal strength of the wireless communication signal is greater than a first preset strength threshold, the first wireless coil of the terminal device is driven to transmit a charging connection signal to the second wireless coil of the adsorption device, and the charging connection parameters of the charging connection signal received by the second wireless coil are obtained.

[0018] When the target signal value of the charging connection parameter is greater than the preset signal threshold, it is determined that the adsorption device has not undergone misaligned adsorption.

[0019] When the target signal value is less than or equal to the preset signal threshold, it is determined that the adsorption device has undergone misaligned adsorption.

[0020] In some embodiments, obtaining the motion detection result of the adsorption device includes:

[0021] In response to the offset detection command, the motion detection result of the adsorption device is obtained;

[0022] The offset detection command is generated under preset detection conditions, which include: the terminal device establishes a communication connection with the adsorption device, the motion detection result indicates that the adsorption device has not performed the preset adsorption action, or the signal strength of the wireless communication signal is less than or equal to the first preset strength threshold.

[0023] In some embodiments, acquiring the wireless communication signal of the adsorption device when the motion detection result indicates that the adsorption device has performed a preset adsorption action includes:

[0024] When the motion detection result indicates that the adsorption device performs the preset adsorption action, the magnetic field strength of the electromagnetic field detected by the magnetic force detection module on the adsorption device is obtained; wherein, the electromagnetic field is formed by the adsorption magnet on the adsorption device and the adsorption magnet on the terminal device;

[0025] When the magnetic field strength is greater than a second preset strength threshold, the signal parameters of the wireless communication signal of the adsorption device are obtained.

[0026] In some embodiments, the method further includes:

[0027] If it is determined that the adsorption device has experienced misaligned adsorption, a prompt message is output; wherein, the prompt message is used to indicate that the adsorption device has failed to adsorb compared to the terminal device, and to identify the specified adsorption location.

[0028] According to a second aspect of the present disclosure, a misalignment detection method is provided, comprising:

[0029] The motion parameters are obtained by the motion detection module of the adsorption device from the motion changes of the adsorption device; wherein, the motion parameters are used to generate motion detection results;

[0030] Obtain the magnetic field strength of the electromagnetic field detected by the magnetic detection module of the adsorption device;

[0031] When the adsorption device and the terminal device have a communication connection, the motion parameters or the motion detection results are sent to the terminal device, and the magnetic field strength is also sent to the terminal device.

[0032] According to a third aspect of the present disclosure, an adsorption device is provided, comprising:

[0033] A motion detection module is used to detect the motion changes of the adsorption device and obtain motion parameters, wherein the motion parameters are used to generate motion detection results;

[0034] A magnetic force detection module is provided at an interval from the motion detection module and is used to detect the magnetic field strength of the electromagnetic field formed by the adsorption magnet of the adsorption device and the adsorption magnet of the terminal device.

[0035] The communication module is electrically connected to the motion detection module and the magnetic force detection module respectively, and is used to send the motion parameters or the motion detection results to the terminal device, and to send the magnetic field strength to the terminal device.

[0036] According to a fourth aspect of the present disclosure, a terminal device is provided, comprising:

[0037] The acquisition module is configured to acquire the motion detection result of the adsorption device when the terminal device and the adsorption device have a communication connection; the motion detection result is obtained by the motion detection module installed on the adsorption device detecting the motion changes of the adsorption device;

[0038] The judgment module is configured to determine, based on the motion detection result, whether the adsorption device has undergone offset adsorption relative to the terminal device; wherein, the occurrence of offset adsorption indicates that the location of the adsorption device is different from the specified adsorption location on the terminal device.

[0039] In some embodiments, the determination module is further configured to, when the motion detection result indicates that the adsorption device has performed a preset adsorption action, acquire the signal parameters of the wireless communication signal of the adsorption device; and determine whether the adsorption device has performed offset adsorption based on the signal parameters of the wireless communication signal.

[0040] In some embodiments, the acquisition module is further configured to acquire a first detection result of the adsorption device when the motion parameters detected by the adsorption device based on the motion detection module meet the preset motion conditions; and to acquire a second detection result of the adsorption device when the motion parameters detected by the adsorption device based on the motion detection module do not meet the preset motion conditions; wherein the first detection result is used to indicate that the adsorption device has performed the preset adsorption action; the second detection result is used to indicate that the adsorption device has not performed the preset adsorption action; the preset motion conditions include at least: the duration of the motion parameter being greater than a first preset parameter threshold is within a first preset duration range, and the motion parameter changes from being greater than the first preset parameter threshold to being less than the second preset parameter threshold within a second preset duration range.

[0041] In some embodiments, the signal parameters include signal strength; the determination module is further configured to, when the signal strength of the wireless communication signal is greater than a first preset strength threshold, drive the first wireless coil of the terminal device to transmit a charging connection signal to the second wireless coil of the adsorption device, and obtain the charging connection parameters of the charging connection signal received by the second wireless coil; when the target signal value of the charging connection parameters is greater than a preset signal threshold, determine that the adsorption device has not undergone misaligned adsorption; when the target signal value is less than or equal to the preset signal threshold, determine that the adsorption device has undergone misaligned adsorption.

[0042] In some embodiments, the acquisition module is further configured to acquire the motion detection result of the adsorption device in response to the offset detection command; wherein the offset detection command is generated under preset detection conditions, the preset detection conditions include: the terminal device establishes a communication connection with the adsorption device, the motion detection result indicates that the adsorption device has not performed the preset adsorption action, or the signal strength of the wireless communication signal is less than or equal to the first preset strength threshold.

[0043] In some embodiments, the judgment module is further configured to, when the motion detection result indicates that the adsorption device has performed the preset adsorption action, acquire the magnetic field strength of the electromagnetic field detected by the magnetic force detection module on the adsorption device; wherein the electromagnetic field is formed by the adsorption magnet on the adsorption device and the adsorption magnet on the terminal device; and acquire the signal parameters of the wireless communication signal of the adsorption device when the magnetic field strength is greater than a second preset strength threshold.

[0044] In some embodiments, the terminal device further includes:

[0045] The output module is configured to output a prompt message when it is determined that the adsorption device has experienced misaligned adsorption; wherein the prompt message is used to indicate that the adsorption device has failed to adsorb compared to the terminal device, and to identify the specified adsorption position.

[0046] According to a fifth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, the storage medium storing a computer program or instructions, wherein when the computer program or instructions in the storage medium are executed by a processor, the steps of the method in the first or second aspect described above are implemented.

[0047] According to a sixth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions, wherein when the computer program or instructions are executed by a processor, they implement the steps of the method in the first or second aspect described above.

[0048] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0049] In the displacement detection method proposed in this disclosure, the motion detection module of the adsorption device itself can be used to detect motion changes. Based on the motion detection results, it can be determined whether the adsorption device has shifted its position relative to the terminal device. Thus, on the one hand, this disclosure utilizes the existing motion detection module of the adsorption device to achieve displacement detection, improving the utilization rate of the motion detection module and expanding the functional diversity of the adsorption device and the terminal device in coordinated use. On the other hand, displacement adsorption detection also allows the terminal device to promptly detect displacement adsorption problems and take timely countermeasures, improving the problem of unsuccessful charging of the adsorption device due to displacement adsorption, ensuring the success rate of reusing the adsorption device, and enhancing the user experience. Furthermore, compared to solutions that use Hall effect detectors or special wireless chips in the terminal device for displacement adsorption detection, this disclosure not only reduces the number and cost of hardware structures in the terminal device but also improves the flexibility of the terminal device's structural layout.

[0050] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

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

[0052] Figure 1 This is a structural diagram of a tablet computer and stylus proposed in related technologies.

[0053] Figure 2 This is a flowchart illustrating an offset detection method according to an exemplary embodiment. Figure 1 .

[0054] Figure 3a This is a schematic diagram illustrating an adsorption device adsorbing at a designated adsorption location according to an exemplary embodiment.

[0055] Figure 3b This is a schematic diagram illustrating the position of offset adsorption in an adsorption device according to an exemplary embodiment.

[0056] Figure 4a This is a waveform diagram of a motion parameter according to an exemplary embodiment. Figure 1 .

[0057] Figure 4b This is a waveform diagram of a motion parameter according to an exemplary embodiment. Figure 2 .

[0058] Figure 4c This is a waveform diagram of a motion parameter according to an exemplary embodiment.

[0059] Figure 5 This is a schematic diagram illustrating the signal strength variation of a wireless communication signal according to an exemplary embodiment.

[0060] Figure 6 This is a schematic diagram of a magnetic field distribution according to an exemplary embodiment.

[0061] Figure 7 This is a schematic diagram illustrating the structure of a terminal device and an adsorption device according to an exemplary embodiment.

[0062] Figure 8 This is a schematic diagram of the structure of an adsorption device according to an exemplary embodiment.

[0063] Figure 9 This is a flowchart illustrating an offset detection method according to an exemplary embodiment. Figure 2 .

[0064] Figure 10 This is a structural block diagram of an offset detection device according to an exemplary embodiment.

[0065] Figure 11 This is a structural block diagram of a terminal device according to an exemplary embodiment. Detailed Implementation

[0066] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0067] Regarding the technology of wireless charging by attaching accessories such as styluses to terminal devices, testing during product application revealed that the stylus is prone to fail to charge when placed off-center on the terminal device. Therefore, this issue urgently needs optimization and improvement.

[0068] The related technologies propose two main methods for detecting misalignment: The first involves placing multiple Hall effect detectors (HALLs) in charging devices such as tablets. These HALLs are positioned near multiple magnets on the tablet to detect whether the magnetic field strength of the trigger magnet at the stylus tip exceeds a specified threshold, thus determining whether the stylus is misaligned. For example, see [link to relevant documentation]. Figure 1 , Figure 1 This is a schematic diagram of a tablet computer and stylus proposed in related technologies; wherein, HALL is used to detect the trigger magnet (i.e., ...) at the position directly opposite the stylus tip. Figure 1 The first method involves the magnetic field strength generated by the square portion of the stylus located above the hall. The second method involves installing a wireless chip with Q-value detection in the tablet computer; when the stylus approaches the tablet computer, the relationship between the Q-value detected by the wireless chip and a preset Q-value threshold is used to determine whether the stylus is misaligned.

[0069] Both of the above solutions suffer from high manufacturing costs. Firstly, regarding the first method, the need to mount multiple HALLs on a circuit board such as a flexible printed circuit (FPC) increases the structural space requirements of the tablet, thus raising the overall manufacturing cost. Secondly, for the second method, wireless chips supporting Q-value detection are more expensive than ordinary wireless chips, increasing the hardware cost of the wireless charging solution. Furthermore, both solutions are limited to detecting only small-scale misalignments, requiring improvements in detection accuracy and flexibility.

[0070] In view of this, the present disclosure proposes a displacement detection method that uses the motion detection module of the adsorption device to detect motion changes and obtain motion detection results, thereby achieving more flexible displacement detection without increasing hardware costs.

[0071] See Figure 2 , Figure 2 This is a flowchart illustrating an offset detection method according to an exemplary embodiment. Figure 1 The offset detection method, used in terminal devices, mainly includes the following steps:

[0072] Step 201: When the terminal device and the adsorption device have a communication connection, obtain the motion detection result of the adsorption device; the motion detection result is obtained by the motion detection module installed on the adsorption device detecting the motion changes of the adsorption device.

[0073] Step 202: Based on the motion detection results, determine whether the adsorption device has undergone offset adsorption compared to the terminal device; wherein, offset adsorption indicates that the location of the adsorption device is different from the specified adsorption location on the terminal device.

[0074] Here, the misalignment detection method proposed in this embodiment is applied in a terminal device. This terminal device provides an adsorption magnet for attaching and placing the adsorption device, and also provides a wireless charging structure (including a wireless chip and a wireless coil) to wirelessly charge the adsorption device. Thus, if the adsorption device is detected to be properly positioned, the terminal device can wirelessly charge it via the wireless charging structure to ensure normal use of the adsorption device next time.

[0075] The terminal devices proposed in this disclosure include fixed terminals and mobile terminals; fixed terminals include, but are not limited to, vehicle-mounted terminals; mobile terminals include, but are not limited to, mobile phones, tablets, etc. Here, the adsorption device, as an accessory to the terminal device, can work with the terminal device to complete various application functions. In some examples, the charging device is a vehicle-mounted terminal, in which case the adsorption device includes, but is not limited to, mobile phones, watches, etc., through which the watch and mobile phone can work with the vehicle-mounted terminal to complete navigation functions, and the vehicle-mounted terminal can also provide wireless charging functions for the watch and mobile phone; in other examples, the charging device is a tablet computer, and the adsorption device includes, but is not limited to, styluses, touch keyboards, etc., in which case the stylus or touch keyboard can work with the tablet computer to complete information input and processing functions, and the tablet computer can also provide wireless charging functions for the stylus or touch keyboard; in still other examples, the charging device is a mobile phone, in which case the adsorption device can be a watch or headphones, etc., and this disclosure does not limit this.

[0076] In step 201, the terminal device acquires the motion detection results of the adsorption device when it has a communication connection with the adsorption device and has a displacement detection requirement.

[0077] Here, the communication connection between the terminal device and the adsorption device can be a Near Field Communication (NFC) connection, a Wireless Fidelity (Wi-Fi) communication connection, a Bluetooth communication connection, etc., and this disclosure does not limit this.

[0078] Taking Bluetooth communication as an example, the terminal device and the adsorption device establish a pairing relationship during the initial Bluetooth search and pairing, and Bluetooth needs to be enabled during subsequent use and charging. Therefore, if the terminal device and the adsorption device are in a Bluetooth communication connection, the terminal device can respond to the offset detection command to obtain motion detection results from the adsorption device.

[0079] The offset detection command can be triggered when the terminal device does not detect the action of the adsorption device within a preset waiting period when the adsorption device and the terminal device are used together. For example, if the stylus and the tablet are used together and no writing trajectory of the stylus is detected on the tablet within the preset waiting period, it is assumed that the user may need to place the stylus on the tablet for adsorption and charging. Of course, the offset detection command can also be triggered when the terminal device detects that the stylus battery is too low, etc., and this embodiment does not limit this.

[0080] It should be noted that common adsorption devices are usually equipped with motion detection modules, which include, but are not limited to, accelerometers, gyroscopes, geomagnetic sensors, and GPS sensors. Because adsorption devices are equipped with at least one of these motion detection modules, they can perform multiple functions such as step counting, exercise consumption statistics, posture sensing, and laser pointer functionality. For example, taking an adsorption device as a stylus, and the stylus equipped with an accelerometer and gyroscope, the stylus can detect the direction of movement relative to its starting position through the motion detection module. After filtering and relevant algorithm calculations, the movement distance and / or trajectory parameters are obtained. The terminal device can then generate a corresponding light spot on the display screen based on the received movement distance and / or trajectory parameters, thus achieving laser pointer functionality through motion detection.

[0081] In this embodiment, the motion detection capability of the motion detection module can also be used to provide an auxiliary terminal device for determining whether misalignment adsorption has occurred. Specifically, the terminal device can acquire motion detection results obtained from detecting changes in the motion of the adsorption device based on misalignment detection commands. Since different motion changes have different motion characteristics, different motion detection results will be generated. Therefore, this embodiment can use the motion detection results to reflect whether the adsorption device has a motion change toward a specified adsorption position.

[0082] In step 202, the embodiments of this disclosure can analyze the motion detection results and determine whether the adsorption device has adsorbed relative to the terminal device based on the analysis results, and determine whether offset adsorption has occurred.

[0083] It should be noted that when the adsorption device is adsorbed at the designated adsorption position of the terminal device, the first adsorption magnet of the adsorption device and the second adsorption magnet of the terminal device are directly opposite each other, and the second wireless coil of the adsorption device and the first wireless coil of the terminal device are directly opposite each other.

[0084] See Figure 3a and Figure 3b , Figure 3a This is a schematic diagram illustrating an adsorption device adsorbing at a designated adsorption location according to an exemplary embodiment; Figure 3b This is a schematic diagram illustrating the position of offset adsorption in an adsorption device according to an exemplary embodiment; as shown below. Figure 3a As shown, each of the first adsorption magnets 31 of the adsorption device is positioned opposite a second adsorption magnet 32 ​​of the terminal device, and the second wireless coil 33 of the adsorption device is positioned opposite a first wireless coil 34 of the terminal device. At this time, the adsorption device is located at the designated adsorption position of the terminal device. Figure 3b As shown, if at least one adsorption magnet 31 of the adsorption device is not directly adsorbed by the adsorption magnet 32 ​​of the terminal device, and the second wireless coil 33 of the adsorption device is misaligned with the first wireless coil 34 of the terminal device, then it is considered that the adsorption device has undergone misaligned adsorption.

[0085] In some examples of this disclosure, the motion detection module can obtain motion data by detecting motion changes of the adsorption device. By extracting features from the motion data, motion features can be obtained, which can reflect motion changes in multiple dimensions such as motion angle, direction, duration, and amplitude. Thus, this disclosure can collect and capture motion features obtained by adsorbing similar adsorption devices onto a designated adsorption position of the terminal device in advance, and then analyze and summarize the parameters of each dimension of the motion features to obtain a preset motion characterization of the adsorption device adsorbing at the designated adsorption position. Each dimension in the preset motion characterization corresponds to a preset dimension range.

[0086] Thus, in practical implementation, this embodiment can acquire the actual motion representation corresponding to the motion change of the adsorption device during offset detection, and match the actual motion representation with the preset motion representation. When there are more than a first preset number of dimension parameters in each dimension of the actual motion representation that fall into the corresponding preset dimension range of the preset motion representation, it is considered that the adsorption device has correctly adsorbed to the designated adsorption position. If there are more than a second preset number but less than a first preset number of dimension parameters that fall into the corresponding preset dimension range of the preset motion representation, it is considered that the adsorption device has adsorbed, but offset adsorption has occurred. If there are less than a second preset number of dimension parameters that fall into the corresponding preset dimension range of the preset motion representation, it is considered that the adsorption device has not adsorbed.

[0087] In some embodiments, after step 202, the above-described offset detection method further includes:

[0088] If it is determined that the adsorption device has failed to adsorb at an off-center position, a prompt message is output. The prompt message indicates that the adsorption device has failed to adsorb compared to the terminal device and identifies the specified adsorption location.

[0089] Here, in this embodiment of the disclosure, when it is confirmed that the adsorption device is misaligned with the terminal device, the terminal device can be controlled to output a prompt message. This prompt message may include a pop-up window in the form of text or images, or audio; the pop-up content is displayed on the terminal device's screen, and the audio is output through the terminal device's speaker. Thus, the prompt message, through the pop-up window or audio, indicates that the adsorption device has failed to adsorb compared to the terminal device.

[0090] Since the adsorption device fails to successfully adsorb the terminal device at the designated adsorption location, it cannot reliably charge the adsorption device. Therefore, this disclosure provides a pop-up window or audio notification indicating adsorption failure, allowing the user to readjust the adsorption device to the designated adsorption location. In this example, the pop-up window output by this embodiment also includes arrows, bounding boxes, and other markers that point to or select the designated adsorption location, thereby improving the success rate and efficiency of the user adjusting the adsorption device to the designated adsorption location.

[0091] Thus, this embodiment of the present disclosure can output a prompt message to remind the user to adjust the position of the adsorption device as soon as possible when a misalignment of the adsorption device is detected, thereby improving the charging failure problem caused by the misalignment of the adsorption device and enhancing the product and user experience.

[0092] In this embodiment of the disclosure, if no adsorption is detected, the terminal device can stop continuing the offset detection and wait for the next offset detection instruction; if the adsorption device is detected to be correctly adsorbed to the designated adsorption position, the terminal device can compare the acquired power of the adsorption device with the current power of the terminal device, and start wireless charging to the adsorption device when the current power of the terminal device meets the power supply requirements.

[0093] In the displacement detection method proposed in this disclosure, the motion detection module of the adsorption device itself can be used to detect motion changes. Based on the motion detection results, it can be determined whether the adsorption device has shifted its position relative to the terminal device. Thus, on the one hand, this disclosure utilizes the existing motion detection module of the adsorption device to achieve displacement detection, improving the utilization rate of the motion detection module and expanding the functional diversity of the adsorption device and the terminal device in coordinated use. On the other hand, displacement adsorption detection also allows the terminal device to promptly detect displacement adsorption problems and take timely countermeasures, improving the problem of unsuccessful charging of the adsorption device due to displacement adsorption, ensuring the success rate of reusing the adsorption device, and enhancing the user experience. Furthermore, compared to solutions that use Hall effect detectors or special wireless chips in the terminal device for displacement adsorption detection, this disclosure not only reduces the number and cost of hardware structures in the terminal device but also improves the flexibility of the terminal device's structural layout.

[0094] In some embodiments, determining whether the adsorption device has undergone offset adsorption relative to the terminal device based on motion detection results includes:

[0095] When the motion detection result indicates that the adsorption device has performed a preset adsorption action, the signal parameters of the wireless communication signal of the adsorption device are acquired.

[0096] Based on the signal parameters of the wireless communication signal, it is determined whether the adsorption device has undergone misaligned adsorption.

[0097] Here, the correct adsorption process of the adsorption device to the terminal device is as follows: the adsorption device moves to the designated adsorption position and adsorbs at the designated adsorption position in one go; thus, the above-mentioned preset adsorption action is the adsorption device moving from rapid movement to stillness; thus, the embodiments of this disclosure can determine whether the preset adsorption action has occurred through motion detection results.

[0098] It should be noted that the motion detection module can detect the motion parameters of the adsorption device. The adsorption device can then analyze these motion parameters using software algorithms, generate motion detection results, and send these results to the terminal device. In this embodiment, to save power consumption of the adsorption device, the adsorption device can transmit the motion parameters detected by the motion detection module to the terminal device, which can then analyze these parameters to obtain the motion detection results.

[0099] In this embodiment of the disclosure, since the motion detection results may be affected by the user's holding state and the usage environment, such as the user shaking it vigorously or placing it on the magnetic magnet of other devices, the detected motion changes may be identified as preset adsorption actions, but in reality, it is not adsorbed to the terminal device or is not adsorbed to the designated adsorption position.

[0100] Thus, in the present embodiment, when the adsorption device is assumed to have performed a preset adsorption action, the signal parameters of the wireless communication signal of the adsorption device can be obtained, and the adsorption device can be further judged to have performed offset adsorption based on the signal parameters of the wireless communication signal.

[0101] Here, wireless communication signals include, but are not limited to, NFC signals, Wi-Fi signals, and / or Bluetooth signals. Signal parameters of wireless communication signals include, but are not limited to, signal strength, signal transmission and reception timestamps, and signal frequency.

[0102] For example, in the embodiments of this disclosure, when the motion detection result indicates the presence of a preset adsorption action, the signal frequency, transmission timestamp, and reception timestamp of the wireless communication signal are obtained, and the communication distance between the adsorption device and the terminal device is calculated based on the above three signal parameters; based on the comparison result between the actual obtained communication distance and the preset distance, it is further determined whether offset adsorption has occurred.

[0103] Here, the communication distance refers to the actual distance between the antenna in the adsorption device that emits wireless communication signals and the antenna in the terminal device that receives wireless communication signals. The preset distance refers to the distance between the two antennas when the adsorption device is adsorbed at a specified adsorption position. The preset distance can be adaptively adjusted for different projects.

[0104] In some examples of this disclosure, if the communication distance is the same as the preset distance, it can be determined that the adsorption device has successfully adsorbed to the designated adsorption position. At this time, the terminal device can obtain and display the battery level of the adsorption device and determine whether to wirelessly charge the adsorption device. Alternatively, if the communication distance is the same as the preset distance, this disclosure can also use other detection methods to further determine whether there is misalignment adsorption. However, if the communication distance is different from the preset distance, it is obvious that the adsorption device has not adsorbed or has misaligned adsorption. In some examples, when the communication distance is different from the preset distance, it is determined that no adsorption has occurred. At this time, the misalignment adsorption detection can be performed again after a preset time interval. In other examples, if the communication distance is different from the preset distance, it can be considered that misalignment adsorption has occurred. At this time, the terminal device can output a prompt message to prompt the user to place the stylus to the designated adsorption position.

[0105] This embodiment of the invention can, when the motion detection result indicates the presence of a preset adsorption action, further combine the signal parameters of the wireless communication signal to determine whether the adsorption device has undergone misaligned adsorption, thereby improving the problem of misjudgment caused by the user's holding state and the influence of the usage environment, and increasing the success rate of misaligned adsorption judgment.

[0106] In some embodiments, obtaining the motion detection result of the adsorption device includes:

[0107] When the motion parameters detected by the motion detection module of the adsorption device meet the preset motion conditions, the first detection result of the adsorption device is obtained;

[0108] When the motion parameters detected by the motion detection module of the adsorption device do not meet the preset motion conditions, the second detection result of the adsorption device is obtained;

[0109] The first detection result is used to indicate that the adsorption device has performed a preset adsorption action; the second detection result is used to indicate that the adsorption device has not performed a preset adsorption action.

[0110] The preset motion conditions include at least the following: the duration of the motion parameter being greater than the first preset parameter threshold is within the first preset duration range, and the motion parameter changes from being greater than the first preset parameter threshold to being less than the second preset parameter threshold within the second preset duration range.

[0111] Here, the motion parameters can be used as the motion characterization mentioned above. When the motion parameters meet the preset motion conditions, it can be considered that the motion performed by the adsorption device is the same as the preset adsorption motion, that is, the adsorption device is most likely to move towards the designated adsorption position of the terminal device and adsorb. Thus, the embodiments of this disclosure can generate a first detection result or a second detection result based on whether the motion parameters meet the preset motion conditions; the first detection result or the second detection result is used to indicate whether the preset adsorption action has occurred.

[0112] It should be noted that since the aforementioned preset adsorption action is the adsorption device moving from rapid motion to stillness, this embodiment of the present disclosure sets preset motion conditions. Specifically, if a motion parameter value exceeds a first preset parameter threshold, and the duration of this value exceeds the first preset parameter threshold is within a first preset duration range, it indicates that the adsorption device has undergone a short-term rapid motion. If, within a second preset duration range after exceeding the first preset parameter threshold, the motion parameter decreases to below the second preset parameter threshold, it indicates that the adsorption device has undergone a short-term rapid motion followed by an instantaneous stillness. Thus, by setting these two motion conditions, the preset adsorption action can be quantified, enabling effective judgment of the preset adsorption action.

[0113] When the motion detection module includes an accelerometer, the motion parameter can be the acceleration parameter of the adsorption device on the XYZ axes; when the motion detection module includes a gyroscope, the motion parameter can be the angular velocity parameter; when the motion detection module includes both an accelerometer and a gyroscope, the motion parameter can also be the fitting parameter formed by the acceleration parameter and the angular velocity parameter on the XYZ axes.

[0114] For example, see Figure 4a , Figure 4b and Figure 4c , Figure 4a This is a waveform diagram of a motion parameter according to an exemplary embodiment. Figure 1 ; Figure 4b This is a waveform diagram of a motion parameter according to an exemplary embodiment. Figure 2 ; Figure 4c This is a waveform diagram of a motion parameter according to an exemplary embodiment; wherein, Figures 4a to 4c Waveform 41 represents the fitted data of the acceleration and angular velocity parameters detected on the X-axis, waveform 42 represents the fitted data detected on the Y-axis, and waveform 43 represents the fitted data detected on the Z-axis. The horizontal axis represents time, and the vertical axis represents the magnitude of the fitted data.

[0115] in, Figure 4aThe area highlighted in the middle illustrates the waveform of the fitted parameters collected when the user normally holds and places the stylus; at this time, the fitted parameters on the XYZ axes will fluctuate within a small range; Figure 4b The part highlighted in the middle illustrates the waveform of the fitted parameters collected when the user places the stylus in a fixed position so that the stylus is stationary; at this time, the fitted data on the XYZ axes are all close to 0. Figure 4c The portion highlighted in the middle illustrates the waveform of the fitted parameters on the XYZ axes when the stylus is adsorbed to the designated adsorption position. At this moment, due to the instantaneous adsorption between the magnets, the stylus undergoes a rapid, momentary movement, which is reflected in the waveform of the fitted parameters as a momentary spike. Thus, this embodiment can set a first preset parameter threshold, and this momentary spike is represented by the fitted parameters exceeding the first preset parameter threshold. Furthermore, because of the adsorption effect, the duration of the momentary spike is very short; therefore, this embodiment can represent this by the duration of the fitted parameters above the first preset parameter threshold being within a first preset duration range. Additionally, since the adsorption device remains stationary after successful adsorption, this embodiment can also represent the stationary state by the fitted parameters decreasing to the second preset parameter threshold within a second preset duration range.

[0116] For example, if this embodiment of the present disclosure identifies that the absolute value of the fitting parameter of any one of the XYZ triaxial fitting parameters exceeds 80 for a continuous period of 10ms and then rapidly decreases to below 5 within 4ms, a first detection result of a preset adsorption action can be obtained; if the above conditions are not met, a second detection result of no preset adsorption action can be obtained.

[0117] Thus, the embodiments of this disclosure can determine whether the adsorption device has performed a preset adsorption action based on the analysis of the detected motion parameters, thereby increasing the accuracy of the judgment on the off-center adsorption.

[0118] In some embodiments, the signal parameters include signal strength; the above-mentioned signal parameters based on wireless communication signals are used to determine whether the adsorption device has undergone misaligned adsorption, including:

[0119] If the signal strength of the wireless communication signal is greater than the first preset strength threshold, it is determined that the adsorption device may have misaligned adsorption.

[0120] If the signal strength of the wireless communication signal is less than or equal to a first preset strength threshold, it is determined that the adsorption device has failed to adsorb.

[0121] Here, when the adsorption device completes adsorption at the designated adsorption location, the antenna emitting the wireless communication signal in the adsorption device is very close to the antenna receiving the wireless communication signal in the terminal device, resulting in a very strong signal strength of the acquired wireless communication signal. Thus, this embodiment of the present disclosure can determine whether adsorption has occurred or whether adsorption has reached the designated adsorption location by comparing the signal strength of the wireless communication signal with a first preset strength threshold. The first preset strength threshold is determined based on the signal strength of the wireless communication signal acquired by the terminal device when the adsorption device approaches the designated adsorption location.

[0122] For example, taking the adsorption device as the stylus and the wireless communication signal as the Bluetooth signal, see [link to example]. Figure 5 , Figure 5 This is a schematic diagram illustrating the signal strength variation of a wireless communication signal according to an exemplary embodiment; where the horizontal axis represents the distance between the stylus and the terminal device, and the vertical axis represents the signal strength (RSSI, negative value) of the received Bluetooth signal. Thus, in this embodiment, the first preset signal strength threshold can be set to -25dBm (as shown by the marked line in the figure). Therefore, when the Bluetooth signal strength is greater than -25dBm, the stylus is determined to be close to the second magnetic magnet of the terminal device, indicating a high probability of correct magnetic attraction; when the Bluetooth signal strength is less than or equal to -25dBm, the stylus is determined to be far from the terminal device, indicating that magnetic attraction has not occurred, and after waiting for a preset interval, the next offset detection command is generated.

[0123] It should be noted that if the terminal device determines that the Bluetooth signal strength is greater than -25dBm, in some examples, the terminal device can assume that the adsorption device has been adsorbed to the designated adsorption position, and the subsequent wireless charging process can be started; in other examples, other detection methods can be combined to further determine whether misalignment adsorption has occurred.

[0124] In other embodiments, since the aforementioned wireless communication signal can be one or more of NFC, Wi-Fi, and / or Bluetooth signals, embodiments of this disclosure may further set a first preset intensity threshold corresponding to each of the three signal types. During actual implementation, the three wireless communication signals are acquired, and if the signal strength of at least two of the three wireless communication signals is greater than the corresponding first preset intensity threshold, it is determined that the adsorption device has not undergone misaligned adsorption. If the above conditions are not met, it is considered that the adsorption device has not adsorbed or has undergone misaligned adsorption.

[0125] In some embodiments, the signal parameters include signal strength; the above-mentioned signal parameters based on wireless communication signals are used to determine whether the adsorption device has undergone misaligned adsorption, including:

[0126] When the signal strength of the wireless communication signal is greater than the first preset strength threshold, the first wireless coil of the driving terminal device transmits a charging connection signal to the second wireless coil of the adsorption device, and obtains the charging connection parameters of the charging connection signal received by the second wireless coil.

[0127] When the target signal value of the charging connection parameter is greater than the preset signal threshold, it is determined that the adsorption device has not undergone misaligned adsorption.

[0128] When the target signal value is less than or equal to the preset signal threshold, it is determined that the adsorption device has undergone misaligned adsorption.

[0129] It should be noted that in actual implementation, it was found that high-intensity communication signals could be detected within a preset range based on the communication antenna of the terminal device. Therefore, even if the adsorption device is placed on the screen or side of the terminal device, or adsorbed to other positions, high-intensity communication signals may still be detected. Thus, in order to improve the success rate of offset detection, this embodiment of the present disclosure can further determine whether the adsorption device has undergone offset adsorption by utilizing the wireless charging connection results between the wireless coils of the two devices when the signal strength of the wireless communication signal is greater than the first preset strength threshold.

[0130] The first wireless coil is the wireless charging transmitting coil (TX coil) of the terminal device; the second wireless coil is the wireless charging receiving coil (RX coil) of the adsorption device. Thus, in response to a wireless communication signal strength exceeding a first preset strength threshold, the terminal device powers on the TX coil, activates it via a pin electrically connected to it, and controls the wireless chip electrically connected to the TX coil to trigger it to transmit a charging connection signal. At this time, the RX coil of the adsorption device, which is close to the terminal device, receives the charging connection signal through electromagnetic induction.

[0131] Here, the target signal value of the above charging connection parameters is expressed as the signal strength (SS) value of the charging connection signal received by the RX coil. The wireless charging Qi protocol transmission standard specifies that the SS value of the RX coil is determined by the following formula (1):

[0132] SS=(U / U max )*256 (1);

[0133] Among them, U max U is the maximum voltage value of the charging connection signal that the RX coil can theoretically receive; U is the voltage value of the charging connection signal that the RX coil actually receives.

[0134] Here, the SS value is at its maximum when the TX coil and RX coil are directly opposite each other; when the TX coil and RX coil are offset, the reactive power of wireless charging increases, resulting in a lower received U value, and the SS value decreases.

[0135] Thus, in this embodiment of the present disclosure, a preset signal threshold can be set in advance so that when the SS value of the RX coil is greater than the preset signal threshold, it is determined that the adsorption device is adsorbing correctly; and when the SS value of the RX coil is less than or equal to the preset signal threshold, it is considered that the TX coil and the RX coil are misaligned, that is, it is determined that the adsorption device has performed misaligned adsorption.

[0136] For example, taking a stylus and a tablet computer as examples, when the stylus is attached to a designated attachment position, the SS value is usually between 177 and 200. Thus, the preset signal threshold that can be set in this embodiment can be between 150 and 180.

[0137] In this embodiment, wireless charging connection is used to further determine whether there is misalignment adsorption, which improves the success rate of misalignment adsorption determination. Furthermore, by activating the wireless transmission function of the first wireless coil, subsequent wireless charging can be quickly and conveniently achieved if misalignment adsorption is determined not to have occurred.

[0138] In addition, since continuously keeping the TX coil powered on and maintaining the pin activation action would cause power and energy waste, this embodiment of the present disclosure only makes a judgment on wireless charging connection when the motion detection result indicates the presence of a preset adsorption action and the signal strength of the wireless communication signal exceeds a first preset strength threshold. This reduces unnecessary waste of power and energy consumption of the terminal device and ensures the battery life of the terminal device itself.

[0139] In some embodiments, obtaining the motion detection results of the adsorption device includes:

[0140] In response to the offset detection command, the motion detection results of the adsorption equipment are obtained;

[0141] The offset detection command is generated under preset detection conditions, which include: the terminal device establishes a communication connection with the adsorption device, the motion detection result indicates that the adsorption device has not performed a preset adsorption action, or the signal strength of the wireless communication signal is less than or equal to a first preset strength threshold.

[0142] In some examples, the terminal device can successfully establish a communication connection with the adsorption device when the distance between the terminal device and the adsorption device reaches the communication distance. Thus, embodiments of this disclosure can trigger a deviation detection command when establishing a communication connection to check whether adsorption occurs when the adsorption device is close to the terminal device and whether deviation adsorption occurs.

[0143] In other examples, if the motion detection results obtained above indicate that the adsorption device has not performed the preset adsorption action, it can be determined that the adsorption device does not have the action of adsorbing the terminal device at this time. It is considered that the action detection is wrong, or the adsorption device has not yet adsorbed to the terminal device. In this case, after waiting for a preset time interval, the offset detection command can be regenerated for subsequent offset adsorption judgment.

[0144] In some other examples, if the signal strength of the aforementioned wireless communication signal is less than or equal to the first preset strength threshold, it can be considered that the adsorption device of this embodiment is not placed at the adsorption position. In this case, no processing is required, and the offset detection command is regenerated after a preset time interval to perform subsequent offset adsorption judgment.

[0145] Thus, the embodiments of this disclosure can trigger the offset detection of the adsorption device under different circumstances, enabling more flexible and comprehensive monitoring of the cooperation status between the adsorption device and the terminal device, and improving the functional cooperation and user experience between the main device and the accessory settings.

[0146] In some embodiments, when the motion detection result indicates that the adsorption device has performed a preset adsorption action, acquiring the wireless communication signal of the adsorption device includes:

[0147] When the motion detection result indicates that the adsorption device has performed a preset adsorption action, the magnetic field strength of the electromagnetic field detected by the magnetic force detection module on the adsorption device is obtained; wherein, the electromagnetic field is formed by the adsorption magnet on the adsorption device and the adsorption magnet on the terminal device.

[0148] When the magnetic field strength is greater than the second preset strength threshold, the signal parameters of the wireless communication signal of the adsorption device are acquired.

[0149] In this embodiment of the disclosure, considering that there may be errors in determining whether a pre-set adsorption action has occurred based on whether the motion detection result indicates that a misalignment adsorption has occurred, this embodiment of the disclosure may also set a magnetic force detection module in the adsorption device; such as a Hall element or a magnetometer, etc. In this way, the terminal device can obtain the magnetic field strength of the electromagnetic field detected by the magnetic force detection module, and further determine the adsorption status of the adsorption device based on the relationship between the magnetic field strength and the second pre-set strength threshold.

[0150] For example, see Figure 6 and Figure 7 , Figure 6 This is a schematic diagram of a magnetic field distribution according to an exemplary embodiment.

[0151] Figure 7 This is a schematic diagram illustrating the structure of a terminal device and an adsorption device according to an exemplary embodiment; here, Figure 6In the diagram, the horizontal axis represents the horizontal coordinate position of the terminal device, such as a tablet computer, and the vertical axis represents the magnetic field strength (positive vertical axis values ​​represent the S pole magnetic field strength, and negative vertical axis values ​​represent the N pole magnetic field strength).

[0152] Combination Figure 6 and Figure 7 When the adsorption device (such as a stylus) is adsorbed onto a designated adsorption position on a terminal device (such as a tablet computer), the two first adsorption magnets 31 on the stylus and the two second adsorption magnets 32 on the tablet computer are positioned opposite each other, and the magnetic field distribution of the magnets is the same. At this time, the four S poles and N poles at the positions where the magnets are facing each other are in a magnetic superposition position. At this time, the magnetic field strength of the N pole and the magnetic field strength of the S pole detected by the magnetometer are both at their peak values. However, when the stylus is in other positions on the tablet computer, due to the different magnetic field distribution between the stylus and the tablet computer, the magnetic fields on the N pole and S pole will cancel each other out, and the magnetic field strength will be weakened. At this time, the magnetic field strength of the N pole and the magnetic field strength of the S pole detected by the magnetometer are both less than the peak value.

[0153] Thus, in this embodiment, a second preset intensity threshold can be set for the N-pole magnetic field strength and the S-pole magnetic field strength. If both the collected N-pole magnetic field strength and the S-pole magnetic field strength are greater than their respective second preset intensity thresholds, it can be considered that the adsorption device is more likely to be set at the specified adsorption position. At this time, the signal parameters of the wireless communication signal can be further obtained for auxiliary judgment. If the collected N-pole magnetic field strength and the S-pole magnetic field strength are not greater than their respective second preset intensity thresholds, it can be understood that the preset adsorption action indicated by the motion detection result has been performed in a similar manner but no adsorption has actually occurred. In this case, this embodiment can also wait for a preset time interval and regenerate the above-mentioned offset detection command; or it can directly consider that offset adsorption has occurred, stop the detection and output a prompt message.

[0154] This embodiment of the invention uses a magnetometer in the adsorption pen to detect the magnetic field strength, which can improve the accuracy of the bias adsorption detection, save hardware costs and structural space of the terminal device, and ensure the normal use of other functions of the terminal device.

[0155] This disclosure also provides a method for detecting misalignment, applied in an adsorption device, wherein the method includes:

[0156] The motion parameters obtained by the motion detection module of the adsorption equipment are detected by the motion changes of the adsorption equipment; the motion parameters are used to generate motion detection results.

[0157] The magnetic field strength of the electromagnetic field detected by the magnetic detection module of the adsorption device is obtained;

[0158] When the adsorption device and the terminal device have a communication connection, the motion parameters or motion detection results are sent to the terminal device, and the magnetic field strength is also sent to the terminal device.

[0159] The motion detection modules installed in the adsorption device include, but are not limited to, accelerometers, gyroscopes, geomagnetic sensors, and GPS sensors. For example, the motion parameters obtained by detecting changes in the motion of the adsorption device can be fitted parameters formed by the acceleration parameters detected by the accelerometer and the angular velocity parameters detected by the gyroscope.

[0160] Here, in this embodiment of the disclosure, if a peak is found in the fitting parameters of any one of the XYZ axes (the fitting parameter is greater than a first threshold parameter, and the duration of the peak is within a first preset duration range, and the peak value decreases rapidly afterward (the fitting parameter changes from greater than the first preset threshold to less than the second preset threshold within a second preset duration range), a first detection result is determined, indicating that the adsorption device has performed a preset adsorption action; conversely, if the fitting parameters do not meet the above conditions, a second detection result is determined, indicating that the adsorption device has not performed a preset adsorption action.

[0161] It should be noted that the adsorption device can analyze the detected motion parameters to obtain the first or second detection result mentioned above, and send the first or second detection result to the terminal device; the adsorption device can also send the motion parameters to the terminal device through a communication connection so that the terminal device can analyze the motion parameters.

[0162] In this embodiment, the adsorption device is further equipped with a magnetic detection module, such as a magnetometer. The magnetometer is positioned between at least two first adsorption magnets in the adsorption device. This allows the magnetometer to detect the magnetic field strength of the electromagnetic field formed by the at least two first adsorption magnets and at least two second adsorption magnets of the terminal device. Thus, this embodiment can transmit the acquired magnetic field strength to the terminal device via a communication connection, allowing the terminal device to further determine the adsorption status of the adsorption device based on the magnetic field strength and motion detection results.

[0163] In some examples, when the adsorption device and the terminal device have a communication connection, the adsorption device can also send wireless communication signals and target signal values ​​of charging connection parameters to the terminal device, so that the terminal device can jointly determine whether the adsorption device has misaligned adsorption based on magnetic field strength, motion parameters (or motion detection results), signal strength of wireless communication signals, and target signal values.

[0164] The displacement detection method proposed in this disclosure utilizes the motion detection module inherent in the adsorption device to detect motion changes, thereby improving the utilization rate of the motion detection module and helping the terminal device to promptly identify displacement adsorption problems. Furthermore, this disclosure also incorporates a magnetic detection module within the adsorption device, enabling the terminal device to further analyze the displacement adsorption situation based on the detected magnetic field strength, thus improving the accuracy of displacement detection. Additionally, compared to integrating the magnetic detection module into the terminal device, this method saves on hardware costs and structural space.

[0165] This disclosure also provides an adsorption device, which includes:

[0166] The motion detection module is used to detect changes in the motion of the adsorption device and obtain motion parameters, which are used to generate motion detection results.

[0167] A magnetic force detection module, spaced apart from the motion detection module, is used to detect the magnetic field strength of the electromagnetic field formed by the adsorption magnets of the adsorption device and the adsorption magnets of the terminal device.

[0168] The communication module is electrically connected to the motion detection module and the magnetic force detection module, respectively, and is used to send motion parameters or motion detection results to the terminal device, and to send magnetic field strength to the terminal device.

[0169] See Figure 8 , Figure 8 This is a schematic diagram of an adsorption device according to an exemplary embodiment; wherein the adsorption device 8 includes a motion detection module 81, a magnetic force detection module 82, a communication module 83, a battery module 84, a control module 85 (including a wireless chip), a second wireless coil 33, and a first adsorption magnet 31, arranged at intervals. The terminal device includes a second adsorption magnet 32, a first wireless coil 34, and a wireless communication component 35.

[0170] Here, the motion detection module can be an accelerometer and a gyroscope, the magnetic force detection module can be a magnetometer, and the communication module can be a Bluetooth module. The Bluetooth module is electrically connected to the accelerometer, gyroscope, and magnetometer for wireless communication with the terminal device's wireless communication components. The control module is electrically connected to the motion detection module, magnetic force detection module, communication module, battery module, second wireless coil, and first magnetic magnet, and can control the activation of each functional module and acquire data from their operation.

[0171] exist Figure 8In this example, there are two first magnetic magnets 31, spaced apart within the stylus. A magnetic detection module 82 is positioned between the two first magnetic magnets 31 to detect the magnetic field strength of the electromagnetic field formed between the two first magnetic magnets and the two second magnetic magnets 32 of the terminal device. The magnetic field strength is then transmitted to the terminal device via a Bluetooth signal from the communication module 83. In this example, the motion detection module can detect the aforementioned fitting parameters and transmit them to the terminal device via Bluetooth, or it can transmit the motion detection results obtained from analyzing the fitting parameters to the terminal device via Bluetooth.

[0172] Thus, this embodiment of the invention can utilize the motion detection module inherent in the adsorption device to detect motion changes, thereby enabling displacement detection based on the motion detection results. This improves the utilization rate of the motion detection module and helps the terminal device promptly identify displacement adsorption problems. Furthermore, this embodiment of the invention also incorporates a magnetic force detection module within the adsorption device, allowing the terminal device to further analyze the displacement adsorption situation based on the detected magnetic field strength, thus improving the accuracy of displacement detection. In addition, compared to integrating the magnetic force detection module into the terminal device, this also saves on the hardware cost and structural space of the terminal device.

[0173] The following describes the offset detection method and adsorption device proposed in the embodiments of this disclosure, using a tablet computer as the terminal device, a stylus as the adsorption device, an accelerometer and a gyroscope as the motion detection module, a magnetometer as the magnetic detection module, and a Bluetooth module as the communication module.

[0174] Here, when a user first pairs the stylus and tablet, the tablet can guide the user to place the stylus on the designated magnetic attachment point via a UI animation on the display screen, and establish a Bluetooth pairing relationship beforehand. During subsequent use, when the stylus is magnetically attached to the designated magnetic attachment point, the tablet's first wireless coil wirelessly charges the stylus's second wireless coil.

[0175] In this embodiment, when the stylus is attached to the designated attachment position, the first wireless coil and the second wireless coil are facing each other, and the first and second adsorption magnets are facing each other. Since the adsorption is instantaneous, this embodiment can first detect whether the stylus is attached, and then further determine whether misaligned adsorption has occurred by detecting the wireless charging connection between the wireless coils.

[0176] See Figure 9 , Figure 9 This is a flowchart illustrating an offset detection method according to an exemplary embodiment. Figure 2 This offset detection method is applied in the scenario of magnetic attraction between a tablet computer and a stylus, specifically implemented by the tablet computer; the offset detection method includes the following steps:

[0177] Step 901: Obtain motion detection results;

[0178] Here, the tablet computer, via Bluetooth communication with the stylus, receives an offset detection command and acquires the fitting parameters detected by the accelerometer and gyroscope (A+G sensor) on the stylus. The tablet computer can then analyze these fitting parameters to obtain motion detection results; the specific method is described in the embodiments above and will not be repeated here.

[0179] It should be noted that the A+G sensor on the stylus can also enable stylus functionality through motion parameter detection and analysis.

[0180] Step 902: Based on the motion detection results, determine whether a preset adsorption action exists;

[0181] If yes, proceed to step 903; otherwise, wait for a preset time interval, regenerate the offset detection instruction, and return to step 901.

[0182] Step 903: Obtain the magnetic field strength;

[0183] Here, the communication connection between the tablet and the stylus is used to obtain the magnetic field strength detected by the magnetometer set on the stylus. Step 904: Determine whether the magnetic field strength is greater than a second preset strength threshold;

[0184] If yes, proceed to step 905; otherwise, it is assumed that the stylus's action is a shaking action similar to an adsorption action, and the stylus has not been adsorbed. In this case, the tablet computer can regenerate the offset detection command after waiting for a preset time interval and return to step 901.

[0185] Step 905: Obtain the signal strength of the Bluetooth signal;

[0186] Here, the tablet computer detects the signal strength (RSSI) of the received Bluetooth signal through a Bluetooth communication connection with the stylus.

[0187] Step 906: Determine whether the signal strength is greater than the first preset strength threshold;

[0188] If so, it indicates that the stylus has a preset adsorption action, the Bluetooth communication signal strength is high, and the magnetic field strength of the electromagnetic field between the stylus and the terminal device is high. In this case, the tablet computer can assume that the stylus has been adsorbed onto the tablet computer, and the probability of correct adsorption is high. However, in order to improve the accuracy of offset adsorption, this disclosure can continue to perform step 907.

[0189] Of course, if step 906 is not the case, it is assumed that the stylus is placed near the tablet but does not adhere to the tablet, or the adsorption position is too far off from the adsorption position. In this case, it can be assumed that the stylus does not need to be adsorbed or wirelessly charged. At this time, the tablet can regenerate the offset detection command after waiting for a preset time interval and return to step 901.

[0190] Step 907: Transmit a charging connection signal based on the first wireless coil, and obtain the target signal value of the charging connection signal received by the second wireless coil;

[0191] Here, the target signal value is represented by the SS value of the charging connection signal received by the RX coil.

[0192] Step 908: Determine whether the target signal value is greater than a preset signal threshold;

[0193] If yes, proceed to step 909; otherwise, proceed to step 810.

[0194] Step 909: Display the current battery level of the stylus and determine the wireless charging strategy;

[0195] Step 910: The first wireless coil is powered off and a prompt message is output.

[0196] Here, when the target signal value is less than or equal to the preset signal threshold, it can be determined that the stylus has been misaligned and attracted. At this time, the tablet computer will power down the first wireless coil and then output a text prompt on the tablet computer's display interface, indicating the specified attraction position, to guide the user to reposition the stylus.

[0197] The offset detection proposed in this disclosure can achieve offset adsorption detection of the stylus relative to the terminal device. Thus, on the one hand, this disclosure can effectively reduce hardware costs. Considering that the proportion of tablet computers equipped with styluses is not high, adding multiple HALL devices to the tablet computer to achieve offset detection would increase costs. This disclosure does not include additional detection circuits such as HALLs on the tablet computer, nor does it use high-cost TX chips that support Q-value detection; therefore, it can effectively reduce the hardware cost of the tablet computer, save structural space, and reduce stacking difficulty. Furthermore, since some styluses currently have motion detection modules, this disclosure achieves the reuse of motion detection module structures, improving structural utilization and saving costs.

[0198] On the other hand, this disclosure, through methods such as motion detection of the stylus, magnetic field strength detection around the stylus, and Bluetooth signal strength detection of the stylus via a tablet computer, can overcome the constraints imposed by the physical detection range of the device in traditional multi-halt and Q-value detection schemes, achieve a wider range of offset detection, and improve the user experience of the product.

[0199] Figure 10 This is a structural block diagram illustrating an offset detection device according to an exemplary embodiment. Figure 10 As shown, the device mainly includes:

[0200] The acquisition module 1001 is configured to acquire the motion detection results of the adsorption device when the terminal device and the adsorption device have a communication connection; the motion detection results are obtained by the motion detection module set on the adsorption device detecting the motion changes of the adsorption device.

[0201] The judgment module 1002 is configured to determine, based on the motion detection results, whether the adsorption device has undergone offset adsorption relative to the terminal device; wherein, offset adsorption indicates that the location of the adsorption device is different from the specified adsorption location on the terminal device.

[0202] In some embodiments, the judgment module 1002 is further configured to acquire signal parameters of the wireless communication signal of the adsorption device when the motion detection result indicates that the adsorption device has performed a preset adsorption action; and to determine whether the adsorption device has performed offset adsorption based on the signal parameters of the wireless communication signal.

[0203] In some embodiments, the acquisition module 1001 is further configured to acquire a first detection result of the adsorption device when the motion parameters detected by the adsorption device based on the motion detection module meet the preset motion conditions; and to acquire a second detection result of the adsorption device when the motion parameters detected by the adsorption device based on the motion detection module do not meet the preset motion conditions; wherein the first detection result is used to indicate that the adsorption device has performed a preset adsorption action; the second detection result is used to indicate that the adsorption device has not performed a preset adsorption action; the preset motion conditions include at least: the duration of the motion parameters being greater than a first preset parameter threshold is within a first preset duration range, and the motion parameters changing from greater than the first preset parameter threshold to less than the second preset parameter threshold within a second preset duration range.

[0204] In some embodiments, the signal parameters include signal strength; the judgment module 1002 is further configured to, when the signal strength of the wireless communication signal is greater than a first preset strength threshold, drive the first wireless coil of the terminal device to transmit a charging connection signal to the second wireless coil of the adsorption device, and obtain the charging connection parameters of the charging connection signal received by the second wireless coil; when the target signal value of the charging connection parameters is greater than a preset signal threshold, determine that the adsorption device has not undergone misaligned adsorption; when the target signal value is less than or equal to the preset signal threshold, determine that the adsorption device has undergone misaligned adsorption.

[0205] In some embodiments, the acquisition module 1001 is further configured to acquire the motion detection result of the adsorption device in response to the offset detection command; wherein the offset detection command is generated under preset detection conditions, the preset detection conditions include: the terminal device establishes a communication connection with the adsorption device, the motion detection result indicates that the adsorption device has not performed a preset adsorption action, or the signal strength of the wireless communication signal is less than or equal to a first preset strength threshold.

[0206] In some embodiments, the judgment module 1002 is further configured to, when the motion detection result indicates that the adsorption device has performed a preset adsorption action, acquire the magnetic field strength of the electromagnetic field detected by the magnetic force detection module on the adsorption device; wherein the electromagnetic field is formed by the adsorption magnet on the adsorption device and the adsorption magnet on the terminal device; and acquire the signal parameters of the wireless communication signal of the adsorption device when the magnetic field strength is greater than a second preset strength threshold.

[0207] In some embodiments, the terminal device further includes:

[0208] Output module ( Figure 10 (Not shown), configured to output a prompt message when it is determined that the adsorption device has experienced misaligned adsorption; wherein the prompt message is used to indicate that the adsorption device has failed to adsorb compared to the terminal device, and to identify the specified adsorption location.

[0209] The specific methods by which the various modules of the terminal device perform operations in the above embodiments have been described in detail in the embodiments of the offset detection method applied to the terminal device, and therefore will not be elaborated here.

[0210] Figure 11 This is a structural block diagram illustrating a terminal device according to an exemplary embodiment. For example, the terminal device 1100 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0211] Reference Figure 11The terminal device 1100 may include one or more of the following components: processing component 1102, memory 1104, power supply component 1106, multimedia component 1108, audio component 1110, input / output interface 1112, sensor component 1114, and communication component 1116.

[0212] Processing component 1102 typically controls the overall operation of terminal device 1100, such as operations associated with at least one of display, telephone call, data communication, camera operation, and recording operation. Processing component 1102 may include one or more processors 1120 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 1102 may include one or more modules to facilitate interaction between processing component 1102 and other components. For example, processing component 1102 may include a multimedia module to facilitate interaction between multimedia component 1108 and processing component 1102.

[0213] Memory 1104 is configured to store various types of data to support operation on terminal device 1100. Examples of such data include at least one of the following: instructions for any application or method operating on terminal device 1100, contact data, phonebook data, messages, pictures, and videos. Memory 1104 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0214] Power supply component 1106 provides power to various components of terminal device 1100. Power supply component 1106 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to terminal device 1100.

[0215] Multimedia component 1108 includes a screen that provides an output interface between terminal device 1100 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen may be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 1108 includes a front-facing camera and / or a rear-facing camera. When terminal device 1100 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0216] Audio component 1110 is configured to output and / or input audio signals. For example, audio component 1110 includes a microphone (MIC) configured to receive external audio signals when terminal device 1100 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 1104 or transmitted via communication component 1116. In some embodiments, audio component 1110 also includes a speaker for outputting audio signals.

[0217] Input / output interface 1112 provides an interface between processing component 1102 and peripheral interface modules, such as keyboards, click wheels, and buttons. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0218] Sensor assembly 1114 includes one or more sensors for providing status assessments of various aspects of terminal device 1100. For example, sensor assembly 1114 may detect the on / off state of terminal device 1100, the relative positioning of components such as the display and keypad of terminal device 1100, changes in position of terminal device 1100 or one of its components, the presence or absence of user contact with terminal device 1100, orientation or acceleration / deceleration of terminal device 1100, and temperature changes of terminal device 1100. Sensor assembly 1114 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1114 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 1114 may also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetometer, a pressure sensor, and a temperature sensor.

[0219] Communication component 1116 is configured to facilitate wired or wireless communication between terminal device 1100 and other devices. Terminal device 1100 can access wireless networks based on communication standards, such as Wi-Fi, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 1116 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 1116 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.

[0220] In an exemplary embodiment, the terminal device 1100 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.

[0221] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1104 including executable instructions or a computer program, which can be executed by the processor 1120 of the terminal device 1100 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.

[0222] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the terminal device, enables the terminal device to perform any of the offset detection methods described in the embodiments of this disclosure applied to the terminal device.

[0223] Of course, when the instructions in the aforementioned storage medium are executed by the processor of the adsorption device, the adsorption device can perform the offset detection method for adsorption devices proposed in the above embodiments of this disclosure.

[0224] This disclosure provides a computer program product comprising a computer program or executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, causing the computer device to perform any of the offset detection methods described in this disclosure. The computer device can be either the terminal device or the adsorption device described above; this disclosure does not limit the choice between the two.

[0225] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0226] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for detecting misalignment, characterized in that, include: When the terminal device and the adsorption device have a communication connection, the motion detection result of the adsorption device is obtained; the motion detection result is obtained by the motion detection module installed on the adsorption device detecting the motion changes of the adsorption device. Based on the motion detection results, it is determined whether the adsorption device has undergone misaligned adsorption compared to the terminal device; wherein, the occurrence of misaligned adsorption indicates that the location of the adsorption device is different from the designated adsorption location on the terminal device.

2. The method according to claim 1, characterized in that, The step of determining whether the adsorption device has undergone displacement adsorption relative to the terminal device based on the motion detection result includes: When the motion detection result indicates that the adsorption device has performed a preset adsorption action, the signal parameters of the wireless communication signal of the adsorption device are acquired. Based on the signal parameters of the wireless communication signal, it is determined whether the adsorption device has undergone misaligned adsorption.

3. The method according to claim 2, characterized in that, The process of obtaining the motion detection results of the adsorption device includes: When the motion parameters detected by the motion detection module of the adsorption device meet the preset motion conditions, the first detection result of the adsorption device is obtained. When the motion parameters detected by the motion detection module of the adsorption device do not meet the preset motion conditions, a second detection result of the adsorption device is obtained; The first detection result is used to indicate that the adsorption device has performed the preset adsorption action; the second detection result is used to indicate that the adsorption device has not performed the preset adsorption action. The preset motion conditions include at least the following: the duration of the motion parameter being greater than a first preset parameter threshold is within a first preset duration range, and the motion parameter changes from being greater than the first preset parameter threshold to being less than the second preset parameter threshold within a second preset duration range.

4. The method according to claim 2, characterized in that, The signal parameters include signal strength; determining whether the adsorption device has undergone misaligned adsorption based on the signal parameters of the wireless communication signal includes: When the signal strength of the wireless communication signal is greater than a first preset strength threshold, the first wireless coil of the terminal device is driven to transmit a charging connection signal to the second wireless coil of the adsorption device, and the charging connection parameters of the charging connection signal received by the second wireless coil are obtained. When the target signal value of the charging connection parameter is greater than the preset signal threshold, it is determined that the adsorption device has not undergone misaligned adsorption. When the target signal value is less than or equal to the preset signal threshold, it is determined that the adsorption device has undergone misaligned adsorption.

5. The method according to claim 4, characterized in that, The process of obtaining the motion detection results of the adsorption device includes: In response to the offset detection command, the motion detection result of the adsorption device is obtained; The offset detection command is generated under preset detection conditions, which include: the terminal device establishes a communication connection with the adsorption device, the motion detection result indicates that the adsorption device has not performed the preset adsorption action, or the signal strength of the wireless communication signal is less than or equal to the first preset strength threshold.

6. The method according to any one of claims 2 to 5, characterized in that, When the motion detection result indicates that the adsorption device has performed a preset adsorption action, acquiring the wireless communication signal of the adsorption device includes: When the motion detection result indicates that the adsorption device performs the preset adsorption action, the magnetic field strength of the electromagnetic field detected by the magnetic force detection module on the adsorption device is obtained; wherein, the electromagnetic field is formed by the adsorption magnet on the adsorption device and the adsorption magnet on the terminal device; When the magnetic field strength is greater than a second preset strength threshold, the signal parameters of the wireless communication signal of the adsorption device are obtained.

7. The method according to any one of claims 1 to 5, characterized in that, The method further includes: If it is determined that the adsorption device has experienced misaligned adsorption, a prompt message is output; wherein, the prompt message is used to indicate that the adsorption device has failed to adsorb compared to the terminal device, and to identify the specified adsorption location.

8. A method for detecting misalignment, characterized in that, include: The motion parameters are obtained by the motion detection module of the adsorption device from the motion changes of the adsorption device; wherein, the motion parameters are used to generate motion detection results; Obtain the magnetic field strength of the electromagnetic field detected by the magnetic detection module of the adsorption device; When the adsorption device and the terminal device have a communication connection, the motion parameters or the motion detection results are sent to the terminal device, and the magnetic field strength is also sent to the terminal device.

9. An adsorption device, characterized in that, include: A motion detection module is used to detect the motion changes of the adsorption device and obtain motion parameters, wherein the motion parameters are used to generate motion detection results; A magnetic force detection module is provided at an interval from the motion detection module and is used to detect the magnetic field strength of the electromagnetic field formed by the adsorption magnet of the adsorption device and the adsorption magnet of the terminal device. The communication module is electrically connected to the motion detection module and the magnetic force detection module respectively, and is used to send the motion parameters or the motion detection results to the terminal device, and to send the magnetic field strength to the terminal device.

10. A terminal device, characterized in that, include: The acquisition module is configured to acquire the motion detection result of the adsorption device when the terminal device and the adsorption device have a communication connection; the motion detection result is obtained by the motion detection module installed on the adsorption device detecting the motion changes of the adsorption device; The judgment module is configured to determine, based on the motion detection result, whether the adsorption device has undergone offset adsorption relative to the terminal device; wherein, the occurrence of offset adsorption indicates that the location of the adsorption device is different from the specified adsorption location on the terminal device.

11. A non-transitory computer-readable storage medium storing a computer program or instructions, characterized in that, When the computer program or instructions in the storage medium are executed by a processor, they implement the steps of the method of any one of claims 1 to 7, or the steps of the method of claim 8.

12. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7, or the steps of the method according to claim 8.