Method and device for connecting a somatosensory device to a terminal, and computer-readable storage medium
Through passive scanning of somatosensory devices and fast terminal authentication, the problem of cumbersome connection between somatosensory devices and terminals is solved, convenient and secure Bluetooth connection is achieved, and user experience and device battery life is improved.
Patent Information
- Application Number
- CN202210697246.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-20
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-06-20
AI Technical Summary
In the prior art, the Bluetooth connection between somatosensory devices and terminals is complicated, especially in a multi-device environment, which makes it difficult to distinguish the target device, resulting in poor user experience and prominent device battery life problems.
The somatosensory device passively scans the surrounding Bluetooth broadcast data in the preset wake-up state, generates identity information and broadcasts. The terminal directly establishes a Bluetooth connection after verifying that the identity information is legal within the preset time period, reducing user confirmation operations, using encryption algorithms to improve security, and automatically reconnection attempts when the connection is interrupted.
It realizes silent connection between somatosensory devices and terminals, improves user experience, extends device battery life, and enhances connection security and reliability.
Smart Images

Figure CN115002780B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless connection technology, and in particular to a method for connecting a somatosensory device and a terminal, a device, and a computer-readable storage medium. Background Art
[0002] Bluetooth BLE (Bluetooth Low Energy) technology is an open global specification for wireless data and voice communications. It is a highly popular, low-cost, short-range wireless connection protocol solution. At present, the wireless connection solution between somatosensory devices (such as smart watches, sports bracelets, etc.) and terminals usually uses Bluetooth connection. In the conventional Bluetooth connection method, the user is required to manually select the device to be paired and connected. Not only is the operation complicated, but when there are multiple Bluetooth devices around, it is often difficult to distinguish the device that actually needs to be paired and connected. This results in a poor user experience. Summary of the Invention
[0003] The embodiments of the present application provide a method for connecting a somatosensory device to a terminal, aiming to improve the convenience of connecting the somatosensory device to the terminal.
[0004] To achieve the above objectives, an embodiment of the present application provides a method for connecting a somatosensory device to a terminal, comprising:
[0005] The terminal broadcasts a Bluetooth connection request;
[0006] If the somatosensory device enters the preset wake-up state, it starts to passively scan the surrounding Bluetooth broadcast data;
[0007] If the somatosensory device scans the Bluetooth connection request, it generates identity information based on the Bluetooth connection request and broadcasts the identity information externally;
[0008] If the terminal scans only one broadcast containing identity information within a preset time period, it will directly establish a Bluetooth connection with the somatosensory device after verifying that the identity information is legitimate.
[0009] In one embodiment, the somatosensory device is bound to a preset somatosensory game, the preset somatosensory game can be run on the terminal, and the identity information includes a unique identification code of the somatosensory device;
[0010] The terminal verifies whether the identity information of the somatosensory device is legal, including:
[0011] The terminal calls the device list of the preset somatosensory game to verify the unique identification code of the somatosensory device. If the unique identification code of the somatosensory device is recorded in the device list, it is determined that the unique identification code of the somatosensory device is legal.
[0012] In one embodiment, the Bluetooth connection request further includes a connection request random code;
[0013] The identity information also includes a response code;
[0014] After determining that the unique identification code of the somatosensory device is legal, verifying whether the identity information of the somatosensory device is legal further includes:
[0015] The terminal verifies whether the response code matches the connection request random code;
[0016] If they match, it is determined that the identity information of the somatosensory device is legal.
[0017] In one embodiment, before verifying whether the identity information of the somatosensory device is legitimate, the method further includes:
[0018] The terminal determines whether the somatosensory device is a paired somatosensory device according to the unique identification code;
[0019] If so, the terminal directly establishes a Bluetooth connection with the somatosensory device.
[0020] In one embodiment, the identity information further includes historical connection information of the somatosensory device;
[0021] Before verifying whether the identity information of the somatosensory device is legal, the method further includes:
[0022] The terminal determines whether the somatosensory device is connected for the first time according to the historical connection information;
[0023] If not, the terminal inserts the connection confirmation information into the next broadcast data;
[0024] After scanning the connection confirmation information, the somatosensory device sends a connection confirmation request to request the user to confirm the connection;
[0025] After receiving confirmation feedback from the user based on the connection confirmation request, the somatosensory device broadcasts the confirmation message;
[0026] After scanning the confirmation message, the terminal establishes a Bluetooth connection with the somatosensory device.
[0027] In one embodiment, the method further comprises:
[0028] If the terminal scans at least two broadcasts containing identity information within a preset time period, the terminal inserts connection confirmation information into the next broadcast data;
[0029] After scanning the connection confirmation information, the motion sensing device sends a connection confirmation request to request the user to confirm the connection; the terminal establishes a Bluetooth connection with the motion sensing device that broadcasts the confirmation message.
[0030] In one embodiment, the somatosensory device encrypts the identity information based on a preset encryption algorithm when broadcasting the identity information.
[0031] In one embodiment, after the somatosensory device establishes a Bluetooth connection with the terminal, the method further includes:
[0032] When the connection between the terminal and the somatosensory device is accidentally disconnected, the terminal initiates a connection request every preset interval within the preset timeout period to try to connect to the somatosensory device until reconnection or a preset critical value is reached, wherein the preset timeout period and the preset interval period increase in a step-by-step manner.
[0033] To achieve the above-mentioned purpose, an embodiment of the present application also proposes a connection device between a somatosensory device and a terminal, comprising a memory, a processor, and a connection program between the somatosensory device and the terminal stored in the memory and runnable on the processor. When the processor executes the connection program between the somatosensory device and the terminal, a connection method between the somatosensory device and the terminal as described in any one of the above items is implemented.
[0034] To achieve the above-mentioned purpose, an embodiment of the present application also proposes a computer-readable storage medium, on which a connection program between a somatosensory device and a terminal is stored. When the connection program between the somatosensory device and the terminal is executed by a processor, a connection method between the somatosensory device and the terminal as described in any one of the above items is implemented.
[0035] In the technical solution of the present application, after the somatosensory device enters the preset wake-up state, it can passively scan the surrounding Bluetooth broadcasts. The somatosensory device can also broadcast identity information based on the Bluetooth connection request after broadcasting the Bluetooth connection request to the terminal; for the terminal, when the terminal only scans one copy of the identity information broadcast from the somatosensory device within the preset time period, it can verify the legitimacy of the identity information, and after verifying the legitimacy of the identity information, directly establish a Bluetooth connection with the somatosensory device. In this way, during the process of establishing a Bluetooth connection between the somatosensory device and the terminal, there is no need for the user to perform a confirmation operation to achieve a silent connection between the somatosensory device and the terminal; in addition, since the somatosensory device only broadcasts after scanning the Bluetooth connection request of the terminal, it also helps to improve the battery life performance of the somatosensory device. It can be seen that compared with the traditional Bluetooth connection method, the connection method of the present application has the advantages of good user connection experience and good battery life of the somatosensory device. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0037] Figure 1 This is a module structure diagram of an embodiment of a device for connecting a somatosensory device and a terminal according to the present invention;
[0038] Figure 2 A schematic flow chart of an embodiment of a method for connecting a somatosensory device and a terminal according to the present invention;
[0039] Figure 3 This is a flow chart of another embodiment of a method for connecting a somatosensory device to a terminal according to the present invention;
[0040] Figure 4 The figure is a flow chart of another embodiment of the method for connecting a somatosensory device and a terminal according to the present invention.
[0041] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0042] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0043] To better understand the above technical solutions, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. Instead, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0044] It should be noted that in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The presence of "comprising" in the text does not exclude the presence of components or steps not listed in the claims. The quantifier "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The present invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim that lists several means, several of these means may be embodied by the same hardware item. The use of "first", "second", and "third" etc. does not indicate any order and these words may be interpreted as names.
[0045] like Figure 1 As shown, Figure 1 It is a structural diagram of a server 1 (also called a connection device between a somatosensory device and a terminal) in a hardware operating environment according to an embodiment of the present invention.
[0046] The server of the embodiment of the present invention is a device with display function such as "Internet of Things devices", smart air conditioners, smart lights, smart power supplies with networking functions, AR / VR devices with networking functions, smart speakers, self-driving cars, PCs, smart phones, tablet computers, e-book readers, portable computers, etc.
[0047] like Figure 1 As shown, the server 1 includes: a memory 11 , a processor 12 and a network interface 13 .
[0048] The memory 11 includes at least one type of readable storage medium, including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the server 1, such as a hard disk of the server 1. In other embodiments, the memory 11 may also be an external storage device of the server 1, such as a plug-in hard disk equipped on the server 1, a smart media card (SMC), a secure digital (SD) card, a flash card, etc.
[0049] Furthermore, the memory 11 may include both an internal storage unit of the server 1 and an external storage device. The memory 11 may be used not only to store application software installed on the server 1 and various data, such as the code of the program 10 for connecting the somatosensory device to the terminal, but also to temporarily store data that has been output or is about to be output.
[0050] In some embodiments, the processor 12 can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip, used to run the program code stored in the memory 11 or process data, such as executing the connection program 10 between the somatosensory device and the terminal.
[0051] The network interface 13 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface), and is generally used to establish a communication connection between the server 1 and other electronic devices.
[0052] The network may be the Internet, a cloud network, a wireless fidelity (Wi-Fi) network, a personal area network (PAN), a local area network (LAN), and / or a metropolitan area network (MAN). Various devices in the network environment may be configured to connect to the communication network according to various wired and wireless communication protocols. Examples of such wired and wireless communication protocols may include, but are not limited to, at least one of the following: Transmission Control Protocol and Internet Protocol (TCP / IP), User Datagram Protocol (UDP), Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), ZigBee, EDGE, IEEE 802.11, Light Fidelity (Li-Fi), 802.16, IEEE 802.11s, IEEE802.11g, multi-hop communication, wireless access point (AP), device-to-device communication, cellular communication protocol, and / or Bluetooth communication protocol, or a combination thereof.
[0053] Optionally, the server may further include a user interface, which may include a display and an input unit such as a keyboard. The optional user interface may also include a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display, which may also be referred to as a display screen or display unit, is used to display information processed in the server 1 and to display a visual user interface.
[0054] Figure 1 Only the server 1 having components 11-13 and the connection program 10 of the somatosensory device and the terminal is shown. It can be understood by those skilled in the art that Figure 1 The structure shown does not constitute a limitation on the server 1 , and the server 1 may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0055] In this embodiment, the processor 12 may be configured to call a connection program between the somatosensory device and the terminal stored in the memory 11 and perform the following operations:
[0056] The terminal broadcasts a Bluetooth connection request;
[0057] If the somatosensory device enters the preset wake-up state, it starts to passively scan the surrounding Bluetooth broadcast data;
[0058] If the somatosensory device scans the Bluetooth connection request, it generates identity information based on the Bluetooth connection request and broadcasts the identity information externally;
[0059] If the terminal scans only one broadcast containing identity information within a preset time period, it will directly establish a Bluetooth connection with the somatosensory device after verifying that the identity information is legitimate.
[0060] In one embodiment, the processor 12 may be configured to call a connection program between the somatosensory device and the terminal stored in the memory 11 and perform the following operations:
[0061] The terminal calls the device list of the preset somatosensory game to verify the unique identification code of the somatosensory device. If the unique identification code of the somatosensory device is recorded in the device list, it is determined that the unique identification code of the somatosensory device is legal.
[0062] In one embodiment, the processor 12 may be configured to call a connection program between the somatosensory device and the terminal stored in the memory 11 and perform the following operations:
[0063] The terminal verifies whether the response code matches the connection request random code;
[0064] If they match, it is determined that the identity information of the somatosensory device is legal.
[0065] In one embodiment, the processor 12 may be configured to call a connection program between the somatosensory device and the terminal stored in the memory 11 and perform the following operations:
[0066] The terminal determines whether the somatosensory device is a paired somatosensory device according to the unique identification code;
[0067] If so, the terminal directly establishes a Bluetooth connection with the somatosensory device.
[0068] In one embodiment, the processor 12 may be configured to call a connection program between the somatosensory device and the terminal stored in the memory 11 and perform the following operations:
[0069] The terminal determines whether the somatosensory device is connected for the first time according to the historical connection information;
[0070] If not, the terminal inserts the connection confirmation information into the next broadcast data;
[0071] After scanning the connection confirmation information, the somatosensory device sends a connection confirmation request to request the user to confirm the connection;
[0072] After receiving confirmation feedback from the user based on the connection confirmation request, the somatosensory device broadcasts the confirmation message;
[0073] After scanning the confirmation message, the terminal establishes a Bluetooth connection with the somatosensory device.
[0074] In one embodiment, the processor 12 may be configured to call a connection program between the somatosensory device and the terminal stored in the memory 11 and perform the following operations:
[0075] If the terminal scans at least two broadcasts containing identity information within a preset time period, the terminal inserts connection confirmation information into the next broadcast data;
[0076] After scanning the connection confirmation information, the motion sensing device sends a connection confirmation request to request the user to confirm the connection; the terminal establishes a Bluetooth connection with the motion sensing device that broadcasts the confirmation message.
[0077] In one embodiment, the processor 12 may be configured to call a connection program between the somatosensory device and the terminal stored in the memory 11 and perform the following operations:
[0078] When broadcasting the identity information, the somatosensory device encrypts the identity information based on a preset encryption algorithm.
[0079] In one embodiment, the processor 12 may be configured to call a connection program between the somatosensory device and the terminal stored in the memory 11 and perform the following operations:
[0080] When the connection between the terminal and the somatosensory device is accidentally disconnected, the terminal initiates a connection request every preset interval within the preset timeout period to try to connect to the somatosensory device until reconnection or a preset critical value is reached, wherein the preset timeout period and the preset interval period increase in a step-by-step manner.
[0081] Based on the hardware architecture of the above-mentioned somatosensory device and terminal connection device, an embodiment of the somatosensory device and terminal connection method of the present invention is proposed. The somatosensory device and terminal connection method of the present invention aims to improve the connection convenience between the somatosensory device and the terminal.
[0082] Reference Figure 2 , Figure 2 This is an embodiment of a method for connecting a somatosensory device to a terminal according to the present invention, and the method for connecting the somatosensory device to the terminal comprises the following steps:
[0083] S10. The terminal broadcasts a Bluetooth connection request.
[0084] Among them, the terminals can be AR / VR devices with Internet connectivity, smart speakers, self-driving cars, PCs, smartphones, tablets, e-book readers, portable computers and other devices with Bluetooth connectivity.
[0085] Specifically, when establishing a Bluetooth connection with a somatosensory device, the terminal broadcasts a Bluetooth connection request to the surrounding area. It is worth mentioning that while broadcasting its own Bluetooth connection request, the terminal also listens to the Bluetooth broadcasts of other devices around it to discover other devices in a timely manner. It is worth noting that since terminals usually do not have battery life anxiety, the terminal actively broadcasts Bluetooth connection requests, which helps reduce the energy consumption of the somatosensory device and extend the battery life of the somatosensory device.
[0086] S20: If the somatosensory device enters the preset wake-up state, it starts to passively scan the surrounding Bluetooth broadcast data.
[0087] The somatosensory device includes an IMU sensor that can detect the user's motion posture data. For example, the somatosensory device can be a wristband, glove watch, headscarf, hat, vest, fitness ring, game controller, or other device. In addition to motion detection, the somatosensory device defined in the technical solution of this application must also have a Bluetooth connection function to establish a Bluetooth connection with the terminal.
[0088] Furthermore, in some embodiments, the preset wake-up state is set so that the screen of the somatosensory device is woken up based on the activation of the Bluetooth function of the somatosensory device.
[0089] Specifically, after the motion sensing device enters the preset wake-up state, it begins passively scanning for Bluetooth broadcast data. At this point, the motion sensing device only scans for Bluetooth broadcasts without broadcasting them. This setting can reduce the power consumption of the motion sensing device during the Bluetooth connection process with the terminal, extending the battery life of the motion sensing device.
[0090] It is understandable that by setting the somatosensory device to enter a passive scanning state after the screen is awakened and scanning the surrounding Bluetooth broadcasts in a passive scanning manner, the frequency of the somatosensory device scanning the surrounding broadcast data can be reduced, which in turn helps to improve the battery life performance of the somatosensory device.
[0091] It is worth noting that, in other embodiments, the preset wake-up state can be set so that only the Bluetooth function of the somatosensory device is activated.
[0092] It is also worth noting that during the Bluetooth connection process, the device has two states: broadcasting and scanning. Broadcasting can send Bluetooth connection requests to the outside, while scanning can monitor the surrounding Bluetooth broadcasts. Furthermore, scanning includes passive scanning and active scanning. Passive scanning means that while the device monitors the surrounding broadcasts, it will not be discovered by other Bluetooth devices in the surrounding area; while active scanning means that while the device monitors the surrounding broadcasts, it will be discovered by other Bluetooth devices in the surrounding area. Compared with active scanning, passive scanning saves more power for motion sensing devices.
[0093] S30: If the somatosensory device scans the Bluetooth connection request, it generates identity information based on the Bluetooth connection request and broadcasts the identity information externally.
[0094] Specifically, when the motion sensing device scans the Bluetooth connection request broadcast by the terminal, the motion sensing device ends the passive scan and generates identity information based on the terminal's Bluetooth connection request. After generating the corresponding identity information, the motion sensing device will broadcast the identity information so that it can be discovered by the terminal. Among them, identity information refers to information used by the terminal to confirm whether the motion sensing device is a legitimate device. A legitimate device is a device that can directly establish a Bluetooth connection with the terminal without user confirmation.
[0095] S40: If the terminal scans only one broadcast containing identity information within the preset time period, the terminal directly establishes a Bluetooth connection with the somatosensory device after verifying that the identity information is legitimate.
[0096] The preset duration is used to limit the duration of a direct Bluetooth connection between the terminal and the motion sensing device. Specifically, the terminal starts counting the preset duration after scanning the first broadcast containing identity information to determine whether it has scanned only one motion sensing device broadcast containing identity information.
[0097] Specifically, after scanning the identity information broadcast by the motion sensing device, the terminal verifies the legitimacy of the identity information. If the identity information passes the legitimacy verification of the terminal, the terminal directly establishes a connection with the motion sensing device without user verification.
[0098] It's worth noting that with traditional Bluetooth connection methods, when establishing a Bluetooth connection between a terminal and a motion sensing device, the user often needs to confirm the connection on the motion sensing device. Only after the user enters confirmation information on the motion sensing device can the motion sensing device establish a Bluetooth connection with the terminal. In other words, in traditional Bluetooth connection methods, user confirmation is required. Furthermore, because Bluetooth connections are susceptible to interference from signals from other Bluetooth devices within range, this can result in users needing to repeatedly confirm the connection, impacting the user experience.
[0099] In the technical solution of the present application, after the somatosensory device enters the preset wake-up state, it can passively scan the surrounding Bluetooth broadcasts. The somatosensory device can also broadcast identity information based on the Bluetooth connection request after broadcasting the Bluetooth connection request to the terminal; for the terminal, when the terminal only scans one copy of the identity information broadcast from the somatosensory device within the preset time period, it can verify the legitimacy of the identity information, and directly establish a Bluetooth connection with the somatosensory device after verifying the legitimacy of the identity information. In this way, in the process of establishing a Bluetooth connection between the somatosensory device and the terminal, there is no need for the user to perform a confirmation operation to achieve a silent connection between the somatosensory device and the terminal; in addition, since the somatosensory device only broadcasts after scanning the Bluetooth connection request of the terminal, it also helps to improve the battery life performance of the somatosensory device. It can be seen that compared with the traditional Bluetooth connection method, the connection method of the present application has the advantages of good user connection experience and good battery life of the somatosensory device.
[0100] In some embodiments, when broadcasting identity information, the somatosensory device encrypts the identity information based on a preset encryption algorithm.
[0101] For example, the preset encryption algorithm refers to an algorithm used to encrypt data, which can be at least one of a symmetric encryption algorithm, an asymmetric encryption algorithm, an MD5 algorithm, a SHA1 algorithm, an HMAC algorithm, a DES algorithm, a 3DES algorithm, and an AES algorithm.
[0102] It can be understood that by encrypting the identity information based on the preset encryption, the risk of leakage of the identity information of the somatosensory device can be reduced, thereby improving the security of the connection between the somatosensory device and the terminal.
[0103] In some embodiments, the somatosensory device is bound to a preset somatosensory game, and the preset somatosensory game can be run on the terminal. In other words, the somatosensory device is a hardware device developed for the somatosensory game.
[0104] In some embodiments, the identity information includes a unique identification code of the motion sensing device. Specifically, the unique identification code can be a combination of one or more of the MAC address, ID, and other information of the motion sensing device.
[0105] In some embodiments, the terminal verifies whether the identity information of the somatosensory device is legal, including:
[0106] The terminal calls the device list of the preset somatosensory game to verify the unique identification code of the somatosensory device. If the unique identification code of the somatosensory device is recorded in the device list, it is determined that the unique identification code of the somatosensory device is legal.
[0107] Among them, the preset motion sensing game device list records the unique identification codes of all legally produced motion sensing devices. Legally produced motion sensing devices refer to those produced by the manufacturer itself or authorized by the OEM. Specifically, after each legal motion sensing device is produced, its unique identification code will be recorded in the device list. Alternatively, the device list may pre-store several unused unique identification codes, and each newly produced motion sensing device will be assigned an unused unique identification code. After the assigned unique identification code is assigned, its status will change to "assigned".
[0108] Specifically, after scanning the preset broadcast information, the terminal can call the preset motion sensing game device list to query whether the received unique identification code is recorded in the motion sensing game device list. If so, it can be determined that the unique identification code of the motion sensing device is legal.
[0109] It is worth noting that in order to obtain the latest device list, the terminal can be set to: each time the device list of the preset motion sensing game is called, check whether the device list is the latest status; if not, connect to the preset server to update the device list; or, set the terminal to: obtain the device list from the server of the preset motion sensing game.
[0110] It can be understood that through the above method, the terminal can determine whether the identity information of the somatosensory device is legal based on the device list of the preset somatosensory game, and then enable specific Bluetooth connection optimization for the matching somatosensory games and somatosensory devices. In this way, on the basis of improving the Bluetooth connection experience between the somatosensory device and the terminal, it can avoid interference with the connection between the terminal and other Bluetooth devices.
[0111] In some embodiments, the terminal's Bluetooth connection request also includes a connection request random code. Specifically, the request random code refers to the verification requirement that the terminal requires the Bluetooth device to provide when connecting to the Bluetooth device. Typically, the Bluetooth device requires the user to manually enter a response message before establishing a Bluetooth connection with the terminal.
[0112] Correspondingly, the identity information also includes a response code, which is a response information obtained by the motion sensing device based on a preset algorithm and the connection request random code and is calculated in response to the connection request random code. It is worth noting that the preset algorithm can be embedded in the processor of the motion sensing device in an embedded manner.
[0113] In some embodiments, after determining that the unique identification code of the somatosensory device is legitimate, verifying whether the identity information of the somatosensory device is legitimate further includes:
[0114] The terminal verifies whether the response code matches the connection request random code;
[0115] If they match, it is determined that the identity information of the somatosensory device is legal.
[0116] Specifically, after verifying the legitimacy of the sensor device's identity information, the terminal must also verify whether the response code returned by the sensor device matches the broadcast connection request random code. If they match, it means that the sensor device has responded to the terminal's connection request. In other words, when making a Bluetooth connection, if the sensor device with legitimate identity information responds to the terminal's Bluetooth connection request, then the terminal can directly establish a Bluetooth connection with the sensor device.
[0117] In some embodiments, before verifying whether the identity information of the somatosensory device is legitimate, the method further includes:
[0118] The terminal determines whether the somatosensory device is a paired somatosensory device according to the unique identification code;
[0119] If so, the terminal directly establishes a Bluetooth connection with the somatosensory device.
[0120] Specifically, after the terminal establishes a Bluetooth connection with a motion-sensing device for the first time, the terminal will record the unique identification code of the motion-sensing device in the trusted device list. When the terminal scans the identity information broadcast by the motion-sensing device and finds that the unique identification code of the motion-sensing device is in the trusted device list, the terminal directly establishes a Bluetooth connection with the motion-sensing device without the need for subsequent legitimacy verification. This can greatly improve the connection speed between the motion-sensing device and the terminal, thereby enhancing the user experience.
[0121] In some embodiments, the identity information of the somatosensory device also includes historical connection information of the somatosensory device. Specifically, the historical connection information refers to the number of Bluetooth connections of the somatosensory device, which is used to indicate whether the somatosensory device is connecting to the terminal for the first time. The number of Bluetooth connections of the somatosensory device is 0 when it leaves the factory and when it is restored to factory settings. When the number of Bluetooth connections of the somatosensory device is 0, it can be determined that the somatosensory device is connecting for the first time.
[0122] like Figure 3 As shown, in some embodiments, before verifying whether the identity information of the somatosensory device is legitimate, the method further includes:
[0123] S110. The terminal determines whether the somatosensory device is connected for the first time based on the historical connection information.
[0124] S120: If not, the terminal inserts connection confirmation information into the next broadcast data;
[0125] S130. After scanning the connection confirmation information, the somatosensory device sends a connection confirmation request to request the user to confirm the connection.
[0126] S140. After receiving confirmation feedback from the user based on the connection confirmation request, the somatosensory device broadcasts the confirmation message;
[0127] S150: After scanning the confirmation message, the terminal establishes a Bluetooth connection with the somatosensory device.
[0128] Specifically, the terminal can determine whether the somatosensory device is connected for the first time based on the number of connections recorded in the historical connection information. If the somatosensory device is not connected for the first time, the terminal will insert the connection confirmation information in the next broadcast data to require the somatosensory device to confirm the connection. Then, when the somatosensory device scans the connection confirmation information, it will issue a connection confirmation prompt. The connection confirmation prompt is presented in the form of a pop-up window, and the options of "Confirm" and "Reject" are somatosensory. If the user selects the confirmation option, it is considered that the user has confirmed the feedback based on the connection confirmation prompt. At this time, the somatosensory device can broadcast this confirmation message, and after scanning the confirmation message, the terminal can establish a Bluetooth connection with the somatosensory device.
[0129] Specifically, when the somatosensory device is not connected for the first time, it means that the somatosensory device may have established a Bluetooth connection with other terminals. At this time, if the terminal is directly connected to the somatosensory device, it may not be consistent with the user's actual intention, affecting the user's privacy. For example, when the somatosensory device is disconnected from the first terminal, the somatosensory device will still scan the surrounding broadcasts after being awakened. At this time, if the second terminal enters the Bluetooth range of the somatosensory device, if the connection is not confirmed, the second terminal will be directly connected to the somatosensory device. However, the relationship between the user of the somatosensory device and the user of the second terminal is unknown. In order to avoid accidental connection, we need the somatosensory device to make a connection confirmation request to allow the user to decide whether to connect the somatosensory device to the second terminal.
[0130] It can be understood that the above method can avoid the somatosensory device from being mistakenly connected to the terminal, thereby protecting the user's privacy.
[0131] like Figure 4 As shown, in some embodiments, the method further includes:
[0132] S210: If the terminal scans at least two broadcasts containing identity information within a preset time period, the terminal inserts connection confirmation information into the next broadcast data.
[0133] Specifically, if the terminal scans at least two broadcasts containing identity information within a preset time period, it means that there are at least two somatosensory devices to be connected around the terminal at the same time. At this time, in order to confirm the somatosensory device that is finally connected to the terminal, the terminal can insert connection confirmation information in the next broadcast data to require the somatosensory device to confirm the connection.
[0134] S220: After scanning the connection confirmation information, the somatosensory device sends a connection confirmation request to request the user to confirm the connection.
[0135] Specifically, when the motion sensing device scans the connection confirmation information, it will issue a connection confirmation prompt. This connection confirmation prompt will be presented in the form of a pop-up window, with the options of "Confirm" and "Reject". If the user selects the "Confirm" option, it is considered that the user has confirmed the connection confirmation prompt. At this time, the motion sensing device can broadcast this confirmation message.
[0136] S230: The terminal establishes a Bluetooth connection with the somatosensory device that broadcasts the confirmation message.
[0137] Specifically, after the terminal scans the confirmation message, it can establish a Bluetooth connection with the motion sensing device that broadcast the user confirmation information. If only one motion sensing device broadcasts the user confirmation information, the terminal establishes a Bluetooth connection with the motion sensing device; if multiple motion sensing devices broadcast the user confirmation information at the same time, the terminal establishes Bluetooth connections with multiple motion sensing devices at the same time.
[0138] It can be understood that the above method enables the terminal to selectively perform Bluetooth connection among multiple somatosensory devices, thereby avoiding user privacy issues caused by direct connection with multiple somatosensory devices at the same time.
[0139] In some embodiments, after the somatosensory device establishes a Bluetooth connection with the terminal, the method further includes:
[0140] When the connection between the terminal and the somatosensory device is accidentally disconnected, the terminal initiates a connection request every preset interval within the preset timeout period to try to connect to the somatosensory device until reconnection or a preset critical value is reached, wherein the preset timeout period and the preset interval period increase in a step-by-step manner.
[0141] An unexpected disconnection between the terminal and the motion sensing device occurs when the disconnection is not caused by a user action. For example, if the terminal is out of battery, the connection between the device and the terminal may be unexpectedly disconnected. Another example is when the distance between the terminal and the motion sensing device exceeds the Bluetooth range.
[0142] Furthermore, the preset timeout duration and the preset interval duration increase in a step-like manner, gradually increasing in value each time until a critical threshold is reached. After the critical threshold is reached, the motion sensing device no longer attempts to connect to the terminal to ensure the battery life of the motion sensing device.
[0143] For example:
[0144] 1. When the connection between the motion sensing device and the terminal is unexpectedly disconnected for the first time, you can set the preset timeout period to 2 minutes and the preset interval period to 10 seconds. In this way, within 2 minutes, the motion sensing device will initiate a connection attempt every 10 seconds until the connection is successfully completed or the timeout period expires and the second reconnection begins.
[0145] 2. When the first reconnection times out, it can be assumed that the motion sensing device is unlikely to connect to the terminal in a short period of time. You can increase the preset timeout period and the preset interval period. For example, set the preset interval period to 30 seconds and the preset timeout period to 10 minutes. In this way, the motion sensing device will initiate a connection attempt every 30 seconds until the connection is successfully completed or the timeout period times out and the third reconnection is initiated.
[0146] 3. Similarly, the longer the time after an accidental disconnection, and the previous reconnection attempts fail to work, the greater the probability that the somatosensory device will be unable to reconnect in a short period of time. Therefore, the preset timeout duration and preset interval duration can be increased accordingly.
[0147] 4. When the preset critical value is reached, such as when the motion sensing device is disconnected from the terminal for more than 30 minutes, the motion sensing device will no longer attempt to connect to the terminal.
[0148] It can be understood that the above solution can enable the somatosensory device to actively reconnect to the terminal after the somatosensory device is disconnected from the terminal, thereby improving the disconnection problem between the somatosensory device and the terminal and enhancing the user experience.
[0149] In addition, an embodiment of the present invention further provides a computer-readable storage medium. The computer-readable storage medium can be any one of, or any combination of, a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disc read-only memory (CD-ROM), a USB memory, etc. The computer-readable storage medium includes a connection program 10 for a somatosensory device and a terminal. The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the above-mentioned method for connecting a somatosensory device and a terminal and the specific implementation of the server 1, and will not be further described here.
[0150] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0151] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0152] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0153] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0154] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0155] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A method for connecting a somatosensory device to a terminal, characterized in that: include: The terminal broadcasts a Bluetooth connection request; If the somatosensory device enters the preset wake-up state, it starts to passively scan the surrounding Bluetooth broadcast data; If the somatosensory device scans the Bluetooth connection request, it generates identity information based on the Bluetooth connection request and broadcasts the identity information externally. The somatosensory device is bound to the preset somatosensory game. The identity information includes a unique identification code of the somatosensory device and historical connection information; If the terminal scans only one broadcast containing identity information within the preset time, the terminal determines whether the somatosensory device is connected for the first time based on the historical connection information: If not, the terminal inserts connection confirmation information into the next broadcast data, and the somatosensory device sends a connection confirmation request after scanning the connection confirmation information to request the user to confirm the connection. After receiving the user's confirmation feedback based on the connection confirmation request, the somatosensory device broadcasts a confirmation message, and the terminal establishes a Bluetooth connection with the somatosensory device after scanning the confirmation message; If so, the terminal calls the device list of the preset somatosensory game to verify the unique identification code of the somatosensory device. If the unique identification code of the somatosensory device is recorded in the device list, the terminal determines that the unique identification code of the somatosensory device is legal, and directly establishes a Bluetooth connection with the somatosensory device; If the terminal scans at least two broadcasts containing identity information within a preset time period, the terminal inserts connection confirmation information into the next broadcast data. After scanning the connection confirmation information, the somatosensory device sends a connection confirmation request to request the user to confirm the connection. The terminal establishes a Bluetooth connection with the somatosensory device that broadcast the confirmation message. After the somatosensory device establishes a Bluetooth connection with the terminal, the method further includes: When the connection between the terminal and the somatosensory device is accidentally disconnected, the terminal initiates a connection request every preset interval within a preset timeout period to try to connect to the somatosensory device until reconnection or a preset critical value is reached, wherein the preset timeout period and the preset interval period increase in a step-by-step manner.
2. The method for connecting a somatosensory device to a terminal according to claim 1, wherein: The Bluetooth connection request also includes a connection request random code; The identity information also includes a response code; After determining that the unique identification code of the somatosensory device is legal, verifying whether the identity information of the somatosensory device is legal further includes: The terminal verifies whether the response code matches the connection request random code; If they match, it is determined that the identity information of the somatosensory device is legal.
3. The method for connecting a somatosensory device to a terminal according to claim 1, wherein: Before verifying whether the identity information of the somatosensory device is legal, the method further includes: The terminal determines whether the somatosensory device is a paired somatosensory device according to the unique identification code; If so, the terminal directly establishes a Bluetooth connection with the somatosensory device.
4. The method for connecting a somatosensory device to a terminal according to claim 1, wherein: When broadcasting the identity information, the somatosensory device encrypts the identity information based on a preset encryption algorithm.
5. A device for connecting a somatosensory device to a terminal, characterized in that: The method comprises a memory, a processor and a connection program between a somatosensory device and a terminal stored in the memory and runnable on the processor. When the processor executes the connection program between the somatosensory device and the terminal, the method for connecting the somatosensory device and the terminal as described in any one of claims 1 to 4 is implemented.
6. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a connection program between a somatosensory device and a terminal. When the connection program between the somatosensory device and the terminal is executed by a processor, the method for connecting a somatosensory device and a terminal according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Bluetooth connection method, Bluetooth device and Bluetooth connection system
CN107197424A
Bluetooth connection method, device and system
CN109769240A
Automatic pairing method for building up a connection between a Bluetooth-enabled headset and a master unit
EP1887770A1