Device connection method and electronic device
The short-distance communication technology it supports is identified by the broadcast message of the receiving device and selecting the connection method according to the scene, the problem of difficult to quickly identify and select the most suitable connection method in the prior art is solved, and the effect of reducing power consumption and improving user experience is achieved.
Patent Information
- Application Number
- PCT/CN2024/098759
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-07
- Filing Date
- 2024-06-12
- Publication Date
- 2025-03-06
AI Technical Summary
In the context of the development of IoT technology, it is difficult for the prior art to quickly identify the short-distance communication technology supported by multiple electronic devices and choose the most suitable connection method, resulting in increased power consumption and reduced user experience.
By receiving the broadcast message from the device, it recognizes the short-range communication technology it supports, and selects the most suitable connection method based on the current scene information to pair and connect, reducing power consumption.
The short-distance communication technology supported by the fast identification device is realized, reducing the power consumption of electronic devices and improving the user experience.
Smart Images

Figure CN2024098759_06032025_PF_FP_ABST
Abstract
Description
Device connection method and electronic device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of the People's Republic of China on August 29, 2023, with application number 202311103355.9, and invention name "A device connection method and electronic device", the entire contents of which are incorporated by reference into this application; this application claims priority to the Chinese patent application filed with the State Intellectual Property Office of the People's Republic of China on September 7, 2023, with application number 202311155905.1, and invention name "A device connection method and electronic device", the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of terminal technology, and in particular to a device connection method and an electronic device. Background Art
[0004] In recent years, with the continuous development of the Internet of Things (IoT), traditional short-range communication technologies such as Bluetooth (BT) have been unable to meet the needs of a wider range of application scenarios. This has led to the emergence of Star Flash's new short-range communication technology, which aims to improve the performance of short-range communication systems. However, when multiple electronic devices support multiple short-range communication technologies simultaneously, there is no solution for quickly identifying the connection methods supported by other electronic devices and selecting the most appropriate connection method for the current scenario.
[0005] Summary of the Invention
[0006] The present application provides a device connection method and an electronic device for quickly identifying the short-range communication technology supported by the device while reducing the power consumption of the electronic device.
[0007] In the first aspect, the present application provides a device connection method, the method comprising: a first device receives a first broadcast message from a second device, the first broadcast message being a broadcast message corresponding to a first short-range communication technology supported by the second device, the first broadcast message carrying first indication information, the first indication information being used to indicate whether the second device supports the second short-range communication technology; when the first indication information indicates that the second device supports the second short-range communication technology, and the first device itself supports the second short-range technology, the first device is paired and connected with the second device through a connection method corresponding to the second short-range communication technology.
[0008] Through the above technical solution, the first device can identify other short-range communication technologies supported by the second device based on the broadcast message of a short-range communication technology supported by the second device. In this way, the short-range communication technology supported by the second device can be quickly identified without turning on the switches of multiple short-range communication technologies, which can reduce the power consumption of electronic devices.
[0009] In a possible implementation, this application uses two short-range communication technologies as examples to divide the application into two cases:
[0010] Case 1: The first short-distance communication technology is Bluetooth technology, and the second short-distance communication technology is Star Flash technology
[0011] When the first indication information indicates that the second device does not support StarFlash technology, pairing and connecting with the second device is performed through the connection method corresponding to Bluetooth technology; or when the first indication information indicates that the second device supports StarFlash technology, and the first device itself does not support StarFlash technology, pairing and connecting with the second device is performed through the connection method corresponding to Bluetooth technology.
[0012] That is to say, when at least one of the first device and the second device does not support the Star Flash technology, pairing and connection can be performed via Bluetooth.
[0013] The second case: the first short-distance communication technology is Star Flash technology, and the second short-distance communication technology is Bluetooth technology
[0014] When the first indication information indicates that the second device does not support Bluetooth technology, pairing and connecting with the second device is performed through the connection method corresponding to Star Flash technology; or when the first indication information indicates that the second device supports the Bluetooth technology and the first device itself does not support Bluetooth technology, pairing and connecting with the second device is performed through the connection method corresponding to Star Flash technology.
[0015] That is to say, when at least one of the first device and the second device does not support Bluetooth technology, pairing and connection can be performed through Star Flash.
[0016] In one possible implementation, when the first indication information indicates that the second device supports the second short-range communication technology, and the first device itself supports the second short-range technology, a connection method corresponding to a communication technology is selected from the first short-range communication technology and the second short-range communication technology as the target connection method according to the current scene information; then, the first device is paired and connected with the second device through the target connection method.
[0017] Through the above technical solution, when the first device and the second device both support Bluetooth and StarFlash technology, they can further select a connection method corresponding to the Bluetooth technology and StarFlash technology based on the current scene information for pairing and connection. This can make the selected connection method more suitable for the current scene and improve the user experience.
[0018] In one possible implementation, the method further includes:
[0019] The first device displays a first interface, which includes identification information of the second device; in response to a user's triggering operation on the identification information of the second device, a second interface is displayed, which includes first prompt information, and the first prompt information is used to prompt the user that the second device supports the second short-range communication technology.
[0020] In one possible implementation, the second interface further includes a confirmation button; in response to a user triggering the confirmation button, the first device turns on the second short-range communication technology. With this technical solution, the user can learn whether the second device supports the second short-range communication technology based on the prompt information on the interface, and can trigger the button on the interface to turn on the second short-range communication technology, thereby pairing the first device with the second device.
[0021] In a second aspect, the present application further provides a device connection method, the method comprising:
[0022] After the first device establishes a physical connection with the second device, the first device receives a first message sent by the second device, where the first message carries second indication information, and the second indication information is used to indicate at least one short-range communication technology supported by the second device; when the at least one short-range communication technology supported by the second device indicated by the second indication information and the at least one short-range communication technology supported by the first device both include the first short-range communication technology and the second short-range communication technology, the first device is paired and connected with the second device through the connection method corresponding to the second short-range communication technology.
[0023] Through the above technical solution, the first device and the second device can interact with each other through hardware connection using the short-range communication technology supported by their own devices, so that the short-range communication technology supported by the devices can be identified without turning on Bluetooth and / or Star Flash switches, thereby reducing power consumption.
[0024] In a possible implementation, the first short-range communication technology is Bluetooth technology, and the second short-range communication technology is Star Flash technology.
[0025] When the second indication information indicates that the second device supports Starflash technology and Bluetooth technology, and the first device supports Starflash technology but does not support Bluetooth technology, the first device is paired and connected with the second device through the connection method corresponding to Starflash technology; or when the second indication information indicates that the second device supports Starflash technology and the Bluetooth technology, and the first device supports Bluetooth technology but does not support Starflash technology, the first device is paired and connected with the second device through the connection method corresponding to Bluetooth technology; or when the second indication information indicates that the second device supports Starflash technology and the first device supports Bluetooth technology and Starflash technology, the first device is paired and connected with the second device through the connection method corresponding to Starflash technology; or when the second indication information indicates that the second device supports Bluetooth technology and the first device supports Bluetooth technology and Starflash technology, the first device is paired and connected with the second device through the connection method corresponding to Bluetooth technology.
[0026] Through the above technical solution, when at least one of the two devices does not support Bluetooth technology, they are connected through Star Flash pairing; when at least one of the two devices does not support Star Flash technology, they are connected through Bluetooth pairing.
[0027] In one possible implementation, the method further includes:
[0028] The first device sends a second message to the second device, where the second message carries third indication information, and the third indication information is used to indicate at least one short-range communication technology supported by the first device.
[0029] In one possible implementation, the method further includes:
[0030] When the second indication information indicates that at least one short-range communication technology supported by the second device includes the second short-range communication technology, and the first device itself supports the second short-range technology, a connection method corresponding to one communication technology is selected as the target connection method from the at least one short-range communication technology according to the current scenario information; and paired connection is performed with the second device through the target connection method.
[0031] Through the above technical solution, when the first device and the second device both support Bluetooth and StarFlash technology, they can further select a connection method corresponding to the Bluetooth technology and StarFlash technology based on the current scene information for pairing and connection. This can make the selected connection method more suitable for the current scene and improve the user experience.
[0032] In one possible implementation, the method further includes:
[0033] The first device displays a third interface, which includes a second prompt message and a connection button. The second prompt message is used to prompt the user that the connection will turn on the switch of the second short-range communication technology; in response to the user triggering the connection button, the switch of the second short-range communication technology is turned on.
[0034] Through the above technical solution, the user can choose to turn on the switch of the second short-range communication technology according to the prompt information, so that the first device and the second device can be paired and connected.
[0035] In a third aspect, the present application provides an electronic device, comprising a processor; a memory; and one or more computer programs; wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when called and executed by the processor, enable the electronic device to execute the above-mentioned first aspect and any possible design method of the first aspect; or the second aspect and any possible design method of the second aspect.
[0036] In a fourth aspect, the present application also provides an electronic device, which includes modules / units for executing the first aspect or any possible design of the first aspect; or the second aspect and any possible design of the second aspect; these modules / units can be implemented by hardware, or the corresponding software can be implemented by hardware.
[0037] In a fifth aspect, the present application also provides a computer-readable storage medium, which stores instructions. When the instructions are executed on an electronic device, the electronic device executes the first aspect and any possible design method of the first aspect; or the second aspect and any possible design method of the second aspect.
[0038] In a sixth aspect, the present application also provides a computer program product, which, when running on an electronic device, enables the electronic device to execute the first aspect of the embodiment of the present application and any possible design method of the first aspect; or the second aspect and any possible design method of the second aspect.
[0039] For each of the above-mentioned aspects from the third to the sixth aspect and the technical effects that may be achieved by each of the aspects, please refer to the above-mentioned description of the technical effects that can be achieved by various possible solutions in the first and second aspects, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] FIG1A is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0041] FIG1B is a schematic diagram of another application scenario provided by an embodiment of the present application;
[0042] FIG2 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0043] FIG3 is a flow chart of a device connection method provided in an embodiment of the present application;
[0044] FIG4 is a schematic diagram of the structure of a Bluetooth broadcast provided in an embodiment of the present application;
[0045] FIG5A is a schematic diagram of a user interface provided in an embodiment of the present application;
[0046] FIG5B is a schematic diagram of a user interface provided in an embodiment of the present application;
[0047] FIG6 is a flow chart of a device connection method provided in an embodiment of the present application;
[0048] FIG7 is a schematic diagram of the structure of a star flash broadcast provided in an embodiment of the present application;
[0049] FIG8A is a schematic diagram of a user interface provided in an embodiment of the present application;
[0050] FIG8B is a schematic diagram of a user interface provided in an embodiment of the present application;
[0051] FIG9 is a flow chart of a device connection method provided in an embodiment of the present application;
[0052] FIG10 is a schematic diagram of device connections provided in an embodiment of the present application;
[0053] FIG11 is a schematic diagram of a user interface provided in an embodiment of the present application;
[0054] FIG12 is a schematic structural diagram of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the following embodiments of the present application.
[0056] For example, as shown in FIG1A, a schematic diagram of an application scenario provided in an embodiment of the present application is provided. Referring to FIG1A, the application scenario may include an electronic device 10 and an electronic device 20. Among them, both the electronic device 10 and the electronic device 20 support at least one short-range communication technology. It should be understood that in the embodiments of the present application, the electronic device supporting Bluetooth and / or Star Flash technology is used as an example for description.
[0057] As a possible implementation method, the sending electronic device, such as electronic device 10, can carry a field in the Bluetooth broadcast indicating whether the electronic device supports Star Flash technology, so that the electronic device receiving the Bluetooth broadcast, such as electronic device 20, can determine whether the electronic device 10 supports Star Flash technology based on the Bluetooth broadcast.
[0058] As another possible implementation method, the sending electronic device, such as electronic device 10, can carry a field in the Star Flash broadcast to determine whether the electronic device supports Bluetooth technology. In this way, the electronic device receiving the Star Flash broadcast, such as electronic device 20, can determine whether the electronic device 10 supports Bluetooth technology based on the Star Flash broadcast.
[0059] In some embodiments, assuming that both the electronic device 10 and the electronic device 20 have their Bluetooth switches turned on, the electronic device 10 may turn on Bluetooth low energy (BLE) to scan for surrounding devices with Bluetooth turned on, such as receiving Bluetooth broadcast 1 broadcast by the electronic device 20. Then, the electronic device 10 may determine whether the electronic device 20 supports SparkLink technology based on Bluetooth broadcast 1. When the electronic device 20 supports SparkLink technology, if the electronic device 10 also supports SparkLink technology, the electronic device 10 and the electronic device 20 may be paired and connected via SparkLink. Specifically, the pairing connection may be performed via SparkLink low energy (SLE) in SparkLink technology. If the electronic device 20 supports SparkLink technology and the electronic device 10 does not support SparkLink technology, the electronic device 10 and the electronic device 20 may be paired and connected via Bluetooth. When the electronic device 20 does not support SparkLink technology, the electronic device 10 and the electronic device 20 may be paired and connected via Bluetooth.
[0060] In other embodiments, it is assumed that both electronic device 10 and electronic device 20 turn on the Star Flash switch, for example, electronic device 10 turns on SLE to scan surrounding devices. When electronic device 10 receives Star Flash Broadcast 1 from electronic device 20, it can determine whether electronic device 20 supports Bluetooth technology based on Star Flash Broadcast 1. When electronic device 20 supports Bluetooth technology, if electronic device 10 also supports Bluetooth technology, electronic device 10 and electronic device 20 can choose Star Flash for pairing and connection. If electronic device 20 supports Bluetooth technology and electronic device 10 does not support Bluetooth technology, electronic device 10 and electronic device 20 are paired and connected through Star Flash. When electronic device 20 does not support Bluetooth technology, electronic device 10 and electronic device 20 can be paired and connected through Star Flash.
[0061] It should be understood that the electronic device 10 and / or the electronic device 20 shown in FIG1A may be a mobile phone, a tablet computer, a wearable device (for example, a watch, a bracelet, a smart helmet, smart glasses, etc.), a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc., and the embodiments of the present application are not limited thereto. The electronic device 10 and / or the electronic device 20 involved in the embodiments of the present application may be a foldable electronic device, such as a foldable mobile phone, a foldable tablet computer, etc., and the present application does not limit this. Furthermore, exemplary embodiments of the electronic device 10 and / or the electronic device 20 include but are not limited to devices equipped with Or other electronic devices with operating systems.
[0062] Another example, as shown in FIG1B , is a schematic diagram of another application scenario provided by an embodiment of the present application. Referring to FIG1B , the application scenario may include an electronic device 30 and an external device 40. Among them, the electronic device 30 may be a mobile phone, a tablet computer, a wearable device (for example, a watch, a bracelet, a smart helmet, smart glasses, etc.), a vehicle-mounted device, an AR / VR device, a laptop computer, a UMPC, a netbook, a PDA, etc., and the embodiment of the present application is not limited thereto. The external device 40 may be a stylus, a leather case keyboard, etc. It should be understood that FIG1B only takes a tablet computer and a stylus as an example, and the present application is not limited to the above-mentioned devices.
[0063] In some embodiments, an external device 40, such as a stylus, can exchange information for pairing and connection with an electronic device 30, such as a tablet computer, through wireless charging. Assuming that when the stylus is adsorbed on the tablet computer, the stylus can send at least one short-range communication technology supported by the stylus to the tablet computer, so that the tablet computer can understand at least one short-range communication technology supported by the stylus. When at least one short-range communication technology supported by the stylus includes Star Flash technology, and the tablet computer itself also supports Star Flash technology, the tablet computer can pair and connect with the stylus through the connection method corresponding to the Star Flash technology. When at least one of the tablet device and the stylus does not support Star Flash technology, they can be paired and connected via Bluetooth. Optionally, the tablet computer can also send the short-range communication technology supported by itself to the stylus, so that the stylus and the tablet computer can know each other's short-range communication technologies supported by each other.
[0064] It should be understood that the way of exchanging information between the electronic device 20 and the external device 40 is not limited to the charging method, and can also be carried out through other methods such as near field communication technology (NFC) or universal serial bus (USB) connection. This application does not limit this.
[0065] It should be understood that the pairing and connection methods in the two application scenarios of Figures 1A and 1B can be used separately or in combination. For example, the electronic device 10 and the electronic device 20 in Figure 1A can also be paired and connected in the manner described in Figure 1B, etc. This application does not limit this.
[0066] The following describes the structure of an electronic device applicable to the embodiments of the present application, taking a mobile phone as an example. It should be understood that the electronic device can be the electronic device 10 or the electronic device 20 in FIG. 1A , or the electronic device 30 in FIG. 1B .
[0067] As shown in Figure 2, the mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0068] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors. The controller may serve as the nerve center and command center of the mobile phone 100. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. The processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. This memory may store instructions or data that have just been used or are being recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces the processor 110's waiting time, and thus improves system efficiency.
[0069] The USB interface 130 is an interface that complies with USB standards and specifications, and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the mobile phone 100, and can also be used to transfer data between the mobile phone 100 and peripheral devices. The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160.
[0070] The wireless communication functions of mobile phone 100 are implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, a modem processor, and a baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0071] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied on the mobile phone 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0072] The wireless communication module 160 can provide wireless communication solutions applied to the mobile phone 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), Star Flash technology, global navigation satellite system (GNSS), frequency modulation (FM), NFC, infrared technology (IR), etc. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0073] In some embodiments, the antenna 1 of the mobile phone 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the mobile phone 100 can communicate with the network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), the fifth generation (5G) mobile communication system, future communication systems such as the sixth generation (6G) system, BT, GNSS, WLAN, NFC, FM and / or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0074] The display screen 194 is used to display the display interface of the application, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light-emitting diode or an active matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the mobile phone 100 may include 1 or N display screens 194, where N is a positive integer greater than 1. In an embodiment of the present application, the display screen 194 can be used to display prompt information, which can be used to prompt the user whether to turn on the star flash function or the Bluetooth function, etc.
[0075] The camera 193 is used to capture still images or videos. The camera 193 may include a front camera and a rear camera.
[0076] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, and software code of at least one application (such as iQiyi application, WeChat application, etc.). The data storage area can store data (such as images, videos, etc.) generated during the use of the mobile phone 100. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0077] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement data storage functions. For example, files such as pictures and videos can be saved in the external memory card.
[0078] The mobile phone 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0079] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be provided on display screen 194. Gyroscope sensor 180B can be used to determine the motion posture of mobile phone 100. In some embodiments, gyroscope sensor 180B can be used to determine the angular velocity of mobile phone 100 around three axes (i.e., x, y, and z axes).
[0080] The gyroscope sensor 180B can be used to determine the motion posture of the mobile phone 100. In some embodiments, the angular velocity of the mobile phone 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the mobile phone 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the mobile phone 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
[0081] The pressure sensor 180C is used to measure air pressure. In some embodiments, the mobile phone 100 calculates the altitude through the air pressure value measured by the pressure sensor 180C to assist in positioning and navigation. The magnetic sensor 180D includes a Hall sensor. The mobile phone 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the mobile phone 100 is a flip phone, the mobile phone 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip, features such as automatic unlocking of the flip can be set. The acceleration sensor 180E can detect the magnitude of the acceleration of the mobile phone 100 in various directions (generally three axes). When the mobile phone 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0082] The distance sensor 180F is used to measure distance. The mobile phone 100 can measure distance through infrared or laser. In some embodiments, when shooting a scene, the mobile phone 100 can use the distance sensor 180F to measure distance to achieve fast focusing. The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode can be an infrared light emitting diode. The mobile phone 100 emits infrared light outward through the light emitting diode. The mobile phone 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the mobile phone 100. When insufficient reflected light is detected, the mobile phone 100 can determine that there is no object near the mobile phone 100. The mobile phone 100 can use the proximity light sensor 180G to detect when the user holds the mobile phone 100 close to the ear to make a call, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used for automatic unlocking and locking of the screen in leather case mode and pocket mode.
[0083] The ambient light sensor 180L senses ambient light levels. The phone 100 can adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L also automatically adjusts the white balance when taking photos. The ambient light sensor 180L can also work in conjunction with the proximity sensor 180G to detect whether the phone 100 is in a pocket to prevent accidental touches. The fingerprint sensor 180H collects fingerprints. The phone 100 can use these fingerprints to unlock the phone, access app locks, take photos, answer calls, and more.
[0084] Temperature sensor 180J is used to detect temperature. In some embodiments, mobile phone 100 uses the temperature detected by temperature sensor 180J to implement a temperature handling strategy. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, mobile phone 100 reduces the performance of a processor located near temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is below another threshold, mobile phone 100 heats battery 142 to prevent abnormal shutdown of mobile phone 100 due to low temperature. In other embodiments, when the temperature is below yet another threshold, mobile phone 100 boosts the output voltage of battery 142 to prevent abnormal shutdown due to low temperature.
[0085] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the mobile phone 100, which is different from the position of the display screen 194. In an embodiment of the present application, the touch sensor 180K can detect the user's touch operation on the display screen, such as detecting the user's confirmation operation on the display interface to turn on the star flash switch, and then the mobile phone 100 can respond to the operation and turn on the star flash function of the mobile phone 100.
[0086] Bone conduction sensor 180M can acquire vibration signals. In some embodiments, bone conduction sensor 180M can acquire vibration signals from vibrating bones in the human body. Bone conduction sensor 180M can also contact the human pulse to receive blood pressure signals.
[0087] The buttons 190 include a power button, a volume button, etc. The button 190 can be a mechanical button. It can also be a touch button. The mobile phone 100 can receive button input and generate key signal input related to the user settings and function control of the mobile phone 100. The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the mobile phone 100.
[0088] It is understandable that the components shown in FIG2 do not constitute a specific limitation on the mobile phone. The mobile phone may also include more or fewer components than shown in the figure, or combine or split some components, or arrange the components differently.
[0089] In addition, the at least one of the following embodiments includes one or more, wherein more means greater than or equal to two. In addition, it should be understood that in the description of this application, the terms "first", "second", etc. are only used for the purpose of distinguishing the description.
[0090] FIG3 is a flow chart of a device connection method provided in an embodiment of the present application. Referring to FIG3 , the method may include the following steps:
[0091] It should be understood that the embodiment shown in FIG. 3 is introduced by taking the example of two electronic devices only turning on the Bluetooth function before pairing and connecting.
[0092] Step 301: The first device receives the Bluetooth broadcast of the second device.
[0093] For ease of description, in the embodiments of the present application, two electronic devices may be referred to as "first device" and "second device," respectively. The first device may be the electronic device 10 in the scenario shown in FIG. 1A , and the second device may be the electronic device 20 in the scenario shown in FIG. 1A ; or the first device may be the electronic device 20 in the scenario shown in FIG. 1A , and the second device may be the electronic device 10 in the scenario shown in FIG. 1A ; or the first device may be the electronic device 30 in the scenario shown in FIG. 1B , and the second device may be the external device 40 in the scenario shown in FIG. 1B ; or the first device may be the external device 40 in the scenario shown in FIG. 1B , and the second device may be the external device 40 in the scenario shown in FIG. 1B .
[0094] In some embodiments, when the second device turns on the Bluetooth switch, Bluetooth broadcasting can be performed, and then the first device can receive the Bluetooth broadcast of the second device. Among them, the Bluetooth broadcast of the second device can carry first indication information, and the first indication information is used to indicate whether the second device supports the Star Flash function. As an example, the first indication information can be a field in the Bluetooth broadcast. Exemplarily, as shown in Figure 4, a structural diagram of a Bluetooth broadcast provided in an embodiment of the present application is shown. For example, a private universally unique identifier (UUID) identifier can be added on the basis of the existing Bluetooth broadcast, and the UUID identifier can be used to characterize whether the device supports Star Flash technology. Specifically, a UUID can be added to the AD data shown in Figure 4, and the payload corresponding to the UUID can represent the Star Flash address of the second device.
[0095] Step 302: The first device determines whether the second device supports StarFlash technology based on the Bluetooth broadcast of the second device. If the second device supports StarFlash technology, the process proceeds to step 303; if the second device does not support StarFlash technology, the process proceeds to step 305.
[0096] When the first device receives the Bluetooth broadcast of the second device, it can determine whether the second device supports Star Flash technology based on the fields in the Bluetooth broadcast. In this way, it can identify whether the opposite device supports Star Flash technology through Bluetooth broadcast.
[0097] Step 303: The first device determines whether it supports the Star Flash technology. If the first device supports the Star Flash technology, the process proceeds to step 304; if the first device does not support the Star Flash technology, the process proceeds to step 305.
[0098] In some embodiments, if the first device determines that the second device supports StarFlash technology based on Bluetooth broadcasting, it can then further determine whether its own device supports StarFlash technology, thereby determining the pairing connection method between the first device and the second device.
[0099] It should be understood that the execution order of step 302 and step 303 is not limited in the embodiments of the present application. For example, step 303 may be executed first and then step 302. In other words, the first device may first determine whether its own device supports Star Flash technology, and then determine whether the second device supports Star Flash technology. This is not specifically limited.
[0100] Step 304: The first device and the second device are connected via Star Flash pairing.
[0101] In some embodiments, when both the first device and the second device support Bluetooth technology and StarFlash technology, StarFlash technology may be preferentially selected for pairing and connection.
[0102] In other embodiments, when both the first device and the second device support Bluetooth technology and Starflash technology, the connection mode can be further selected based on the current scene information. The current scene information may include device type, service type, channel status (own service status), etc. For example, assuming that the current first device and / or the second device has more than 7 links connected via Bluetooth, the Starflash connection mode can be selected to pair the first device with the second device; assuming that there is a large amount of data service on the Starflash connection link, the Bluetooth connection mode can be selected to pair the first device with the second device; assuming that the amount of service data to be transmitted after the devices are connected is large and a larger service bandwidth is required, the Starflash connection mode can be selected to pair the first device with the second device.
[0103] The pairing and connection process will be described using the user interface as an example. For example, as shown in FIG5A , assuming the first device's device identifier is "HUAWEI Mate 50 pro," the device may display interface 500 shown in FIG5A . Interface 500 is a Bluetooth search interface. Interface 500 may include an available device list 501, which lists the identifiers of devices with Bluetooth enabled that the first device has searched for. The user may select a second device from device identifier list 501 , for example, the user may select device identifier "HUAWEI Mate 50" 502 . The first device may then respond to the user's operation by displaying interface 510 , which may include a prompt message 511 , an "Confirm" button 512 , and a "Cancel" button 513 . Prompt message 511 may include information about whether the second device supports Star Flash. For example, the prompt message may read: "HUAWEI Mate 50 supports Star Flash technology, and Star Flash will be enabled by default upon connection." The user may select "Confirm" button 512 , and the first device may respond to the user's operation by enabling the Star Flash feature on its own device. If the user selects the “Cancel” button 513 , the first device does not activate the star flash function of its own device.
[0104] It should be understood that the interface shown in FIG5A is only an example. In actual applications, after the user selects the device identifier to be connected, if the opposite device supports Star Flash technology, the user can also jump to the Star Flash interface. The user can click the device identifier again on the Star Flash interface to connect to Star Flash, etc. This application does not make specific restrictions on this. Alternatively, in an embodiment of the present application, a prompt message indicating whether the device supports Star Flash technology can also be displayed on the Bluetooth search interface. For example, a text description "Supports Star Flash technology" can be added after the device identifier, or an icon description can be added to enable the user to intuitively see whether the searched device supports Star Flash technology, etc. This application does not make specific restrictions on this.
[0105] Correspondingly, when the first device turns on the Star Flash function, it can be considered that the first device has determined to pair and connect with the second device through Star Flash, and then the second device can receive the pairing connection request message sent by the first device. For example, referring to Figure 5B, an interface 520 can be displayed on the second device, and the interface 520 may include prompt information 521, an "Agree" button 522, and a "Reject" button 523. Among them, the prompt information 521 can be: HUAWEI Mate 50pro requests to pair and connect through Star Flash. If agreed, Star Flash will be turned on by default. When the user selects the "Agree" button 522, the second device can turn on the Star Flash function and pair and connect with the first device through Star Flash. When the user selects the "Reject" button 523, the second device can refuse to pair and connect with the first device through Star Flash. It should be understood that when the peer device does not have a display screen, the prompt information shown in Figure 5B may not be displayed, and this application is not limited to this.
[0106] Step 305: The first device and the second device are paired and connected via Bluetooth.
[0107] If at least one of the first device and the second device does not support Star Flash technology, the first device and the second device are connected via Bluetooth pairing. For example, referring to Figure 5A, assuming that the first device supports Star Flash technology and the second device does not support Star Flash technology, when the user selects the device identifier "HUAWEI Mate 50" 502, a prompt message may be displayed on the first device, for example, the prompt message may be: HUAWEI Mate 50 does not support Star Flash technology.
[0108] Through the above embodiment, the first device only needs to turn on the Bluetooth function and can identify whether the second device has Star Flash capability through Bluetooth broadcast. There is no need for the user to search and confirm whether the second device supports Star Flash capability. This can improve the efficiency of identifying device capabilities and enhance user experience.
[0109] FIG6 is a flow chart of a device connection method provided in an embodiment of the present application. Referring to FIG6 , the method may include the following steps:
[0110] It should be understood that the embodiment shown in FIG6 is introduced by taking the example of only turning on the star flash function before two electronic devices are paired and connected.
[0111] Step 601: The first device receives the star flash broadcast of the second device.
[0112] In some embodiments, when the second device turns on the star flash switch, star flash broadcasting can be performed, and then the first device can receive the star flash broadcast of the second device. The star flash broadcast of the second device may carry second indication information, and the second indication information is used to indicate whether the second device supports the Bluetooth function. As an example, the second indication information can be a field in the star flash broadcast. Exemplarily, as shown in Figure 7, a structural diagram of a star flash broadcast provided in an embodiment of the present application is shown. For example, a private UUID identifier can be added on the basis of the existing star flash broadcast, and the UUID identifier can be used to characterize whether the device supports Bluetooth technology. Specifically, a UUID can be added to the data content part shown in Figure 7. For example, the payload corresponding to the UUID can represent the Bluetooth address of the second device.
[0113] Step 602: The first device determines whether the second device supports Bluetooth technology based on the star flash broadcast of the second device. If the second device supports Bluetooth technology, the process proceeds to step 603; if the second device does not support Bluetooth technology, the process proceeds to step 605.
[0114] When the first device receives the Star Flash broadcast from the second device, it can determine whether the second device supports Bluetooth technology based on the fields in the Star Flash broadcast. In this way, whether the opposite device supports Bluetooth technology can be identified through the Star Flash broadcast.
[0115] For example, referring to FIG8A , assuming the first device is a HUAWEI Mate 50 Pro, the first device's Star Flash search interface can be seen as interface 800 in FIG8A . Interface 800 may include an available device list 801, which lists the device identifiers of devices with the Star Flash function enabled that the first device has searched for. A user may select a second device from device identifier list 801, for example, the user may select device identifier "HUAWEI Mate 50" 802. In response to this user operation, the first device may display interface 810. Interface 810 may include a prompt 811, an "Confirm" button 812, and a "Cancel" button 813. Prompt 811 may include information indicating whether the second device supports Bluetooth. For example, the prompt may read: "HUAWEI Mate 50 supports Bluetooth technology, and Bluetooth will be enabled by default upon connection." The user may select the "Confirm" button 812, and the first device may respond by enabling Bluetooth on its own device. If the user selects the "Cancel" button 813, the first device does not enable Bluetooth on its own device.
[0116] It should be understood that the interface shown in FIG8A is only an example. In actual applications, after the user selects the device identifier to be connected, if the peer device supports Bluetooth technology, the user can also jump to the Bluetooth interface. The user can click the device identifier again in the Bluetooth interface to connect via Bluetooth, etc. This application does not make specific restrictions on this. Alternatively, in an embodiment of the present application, a prompt message indicating whether the device supports Bluetooth technology can also be displayed on the Star Flash search interface. For example, a text description "Supports Bluetooth technology" can be added after the device identifier, or an icon description can be added to enable the user to intuitively see whether the searched device supports Bluetooth technology, etc. This application does not make specific restrictions on this.
[0117] Correspondingly, when the first device turns on the Bluetooth function, it can be considered that the first device determines to pair and connect with the second device via Bluetooth, and then the second device can receive the pairing connection request message sent by the first device. For example, referring to Figure 8B, an interface 820 can be displayed on the second device, and the interface 820 may include a prompt message 821, an "Agree" button 822, and a "Reject" button 823. Among them, the prompt message 821 can be: HUAWEI Mate 50pro requests to pair and connect via Bluetooth. If agreed, Bluetooth will be turned on by default. When the user selects the "Agree" button 822, the second device can turn on the Bluetooth function and pair with the first device via Bluetooth. When the user selects the "Reject" button 823, the second device can refuse to pair and connect with the first device via Bluetooth.
[0118] Step 603: The first device determines whether the device supports Bluetooth technology. If the first device supports Bluetooth technology, the process proceeds to step 604. If the first device does not support Bluetooth technology, the process proceeds to step 605.
[0119] It should be understood that the order of executing step 602 and step 603 is not limited in the embodiments of the present application. For example, step 603 may be executed first and then step 602. In other words, the first device may first determine whether its own device supports Bluetooth technology and then determine whether the second device supports Bluetooth technology. This is not specifically limited.
[0120] Step 604: The first device and the second device are connected via Bluetooth pairing.
[0121] In some embodiments, when the first device determines that the second device supports Bluetooth technology based on the Star Flash broadcast, and the first device itself also supports Bluetooth technology, Bluetooth can be selected for pairing and connection.
[0122] In other embodiments, when the first device and the second device support both StarFlash and Bluetooth technologies, a connection mode can be further selected from StarFlash connection and Bluetooth connection for pairing and connection based on the current scene information. The current scene information may include device type, service type, channel status (own service status), etc. For example, if there is currently a large amount of data service on the StarFlash connection link, the Bluetooth connection mode can be selected to pair and connect the first device with the second device; for another example, if the amount of service data to be transmitted is large and a larger service bandwidth is required, the StarFlash connection mode can be selected to pair and connect the first device with the second device.
[0123] Step 605: The first device and the second device are connected via Star Flash pairing.
[0124] When at least one of the first device and the second device does not support Bluetooth technology (for example, the first device supports Bluetooth technology, but the second device does not; or the first device does not support Bluetooth technology, but the second device does; or neither the first device nor the second device supports Bluetooth technology), you can select Star Flash for pairing and connection.
[0125] Through the above embodiment, the first device only needs to turn on the Star Flash function and can identify whether the second device has Bluetooth capability through Star Flash broadcast. There is no need for the user to search and confirm whether the second device supports Bluetooth capability. This can improve the efficiency of identifying device capabilities and enhance user experience.
[0126] FIG9 is a flow chart of a device connection method provided in an embodiment of the present application. Referring to FIG9 , the method may include the following steps:
[0127] Step 901: A first device establishes a physical connection with a second device.
[0128] In some embodiments, the first device and the second device can be connected by magnetic wireless charging, or can be connected by NFC, or can be connected by USB / PogoPin (precision connector) wired connection. For example, as shown in Figure 10, which is a schematic diagram of device connection provided in an embodiment of the present application, in the schematic diagram shown in (a) of Figure 10, the stylus pen and the tablet computer can be connected by magnetic attraction, in the schematic diagram shown in (b) of Figure 10, the stylus pen and the tablet computer can be connected by NFC, and in the schematic diagram shown in (c) of Figure 10, the stylus pen and the tablet computer can be connected by wire via a USB charging base.
[0129] Step 902: The first device and the second device exchange information for pairing and connection.
[0130] Among them, the information used for pairing connection includes the media access layer identifier of the short-range communication technology supported by each device (for example, it may include the media access layer identifier of Star Flash and the media access layer identifier of Bluetooth), product number, version number, etc.
[0131] In some embodiments, the first device and the second device may exchange information via a dedicated communication channel, such as a MAC ID, a Product ID, or other channels.
[0132] Specifically, the first device may first send relevant information about itself to the second device. After the second device receives the information, it may feedback the corresponding information to the first device. This ensures that the first device and the second device can mutually identify and trust each other. Alternatively, the second device may first send relevant information about itself to the first device. After the first device receives the information, it may feedback the corresponding information to the second device. This application is not limited to this.
[0133] Step 903: The first device sends a first message to the second device.
[0134] The first message carries third indication information, which is used to indicate at least one short-range communication technology supported by the first device itself. For example, if the first device supports Bluetooth technology and Starflash technology, the third indication information may be the Bluetooth address and Starflash address of the first device. For another example, when the first device only supports Bluetooth technology, the third indication information may be the Bluetooth address of the first device; when the first device only supports Starflash technology, the third indication information may be the Starflash address of the first device.
[0135] Step 904: The second device sends a second message to the first device.
[0136] Among them, the second message carries fourth indication information, and the fourth indication information is used to indicate at least one short-range communication technology supported by the second device itself. For example, if the second device supports Bluetooth technology and StarFlash technology, the fourth indication information may be the Bluetooth address and StarFlash address of the second device. For another example, when the second device only supports Bluetooth technology, the fourth indication information may be the Bluetooth address of the second device; when the second device only supports StarFlash technology, the fourth indication information may be the StarFlash address of the second device.
[0137] In a possible implementation, only one of step 903 and step 904 may be performed. For example, when the first device is a stylus and the second device is a tablet computer, only step 903 may be performed without performing step 904.
[0138] It should be understood that the execution order of step 903 and step 904 is not limited in the embodiment of the present application. For example, step 904 may be executed first and then step 903. The present application does not make any specific limitation on this.
[0139] Step 905: If both the first device and the second device support the StarFlash technology and the Bluetooth technology, pairing and connection are performed through StarFlash.
[0140] In some embodiments, when both the first device and the second device support StarFlash technology and Bluetooth technology, StarFlash may be selected for pairing and connection.
[0141] In other embodiments, when both the first device and the second device support StarFlash technology and Bluetooth technology, it can be further determined whether to select StarFlash or Bluetooth for connection based on current scene information.
[0142] Exemplarily, as shown in Figure 11, assuming that the stylus supports Star Flash technology and the tablet also supports Star Flash technology, after the stylus and the tablet interact with each other, an interface 1100 may be displayed on the tablet, and the interface 1100 may include a prompt box 1101. The prompt box 1101 may include identification information 1102 of the stylus, such as HUAWEI M-Pencil 3, prompt information 1103, a "Connect" button 1104, and a "Cancel" button 1105. Among them, the prompt information 1103 may be: The connection will turn on Star Flash by default. When the user clicks the "Connect" button 1104, the tablet can respond to the operation, turn on the Star Flash switch, and establish a pairing connection with the stylus through Star Flash.
[0143] In one possible implementation, if the Star Flash switch is already turned on on the tablet, a prompt message may be displayed on the tablet, prompting the user to connect via Star Flash. For example, prompt message 1103 may read: "Please confirm whether to pair and connect via Star Flash." When the user clicks the "Connect" button 1104, the tablet may respond to this action and establish a pairing connection with the stylus via Star Flash.
[0144] Step 906: If at least one of the first device and the second device does not support the Star Flash technology, the first device and the second device are connected via Bluetooth pairing.
[0145] Step 907: If at least one of the first device and the second device does not support Bluetooth technology, the first device and the second device are connected through Star Flash pairing.
[0146] Through the above embodiments, information interaction of short-range communication technologies supported by the device can be completed based on hardware connection, so that the short-range communication technologies supported by the device can be identified without turning on Bluetooth and / or Star Flash switches, which can reduce power consumption.
[0147] It should be noted that all or part of the above embodiments provided in this application can be freely and arbitrarily combined with each other, and the combined technical solutions are also within the scope of protection of this application.
[0148] In the embodiments provided in the present application above, the methods provided in the embodiments of the present application are introduced from the perspective of an electronic device as an execution subject. In order to implement the various functions in the methods provided in the embodiments of the present application above, the electronic device may include a hardware structure and / or a software module, and implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether a function of the above functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
[0149] As shown in Figure 12 , some other embodiments of the present application disclose an electronic device. Referring to Figure 12 , the electronic device 1200 includes: a transceiver 1201; a processor 1202; a memory 1203; and one or more computer programs 1204 (not shown). Optionally, a display screen 1205 may also be included. Optionally, the aforementioned components may be connected via one or more communication buses 1206.
[0150] The display screen 1205 is used to display prompt information. The memory 1203 stores one or more computer programs, and when the instructions are called and executed by the one or more processors 1202, the electronic device 1200 executes the method steps in the above embodiment.
[0151] In the embodiment of the present application, the processor 1202 can be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiment of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in the memory 1203, and the processor 1202 reads the program instructions in the memory 1203 and completes the steps of the above method in combination with its hardware.
[0152] In the embodiment of the present application, the memory 1203 may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), or a volatile memory, such as RAM. The memory may also be any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory in the embodiment of the present application may also be a circuit or any other device that can implement a storage function, for storing instructions and / or data.
[0153] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0154] Based on the above embodiments, the present application further provides a computer storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer executes the method provided in the above embodiments.
[0155] An embodiment of the present application also provides a computer program product, including instructions, which, when executed on a computer, enables the computer to execute the method provided in the above embodiment.
[0156] The present application embodiment is described with reference to the flow chart and / or block diagram according to the method, device (system) and computer program product of the embodiment of the present application.It should be understood that each flow process and / or box in the flow chart and / or block diagram and the flow chart and / or block diagram can be realized by instruction and / or the combination of box.These instructions can be provided to the processor of general-purpose computer, special-purpose computer, embedded processing machine or other programmable data processing equipment to produce a machine, so that the instruction executed by the processor of computer or other programmable data processing equipment produces the device for realizing the function specified in one flow chart flow chart or multiple flow charts and / or one box or multiple boxes of block diagram.
[0157] 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 operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0158] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
Claims
1. A device connection method, characterized in that: include: A first device receives a first broadcast message from a second device, where the first broadcast message is a broadcast message corresponding to a first short-range communication technology supported by the second device, and the first broadcast message carries first indication information, where the first indication information is used to indicate whether the second device supports the second short-range communication technology; When the first indication information indicates that the second device supports the second short-range communication technology, and the first device itself supports the second short-range communication technology, the first device is paired and connected with the second device through a connection method corresponding to the second short-range communication technology.
2. The method according to claim 1, characterized in that The first short-distance communication technology is Bluetooth technology, and the second short-distance communication technology is Star Flash technology.
3. The method according to claim 2, characterized in that The method further comprises: When the first indication information indicates that the second device does not support the Star Flash technology, pairing and connecting with the second device through a connection method corresponding to the Bluetooth technology; or When the first indication information indicates that the second device supports the Star Flash technology, and the first device itself does not support the Star Flash technology, pairing and connection with the second device are performed through a connection method corresponding to the Bluetooth technology.
4. The method according to claim 1, characterized in that The first short-distance communication technology is Star Flash technology, and the second short-distance communication technology is Bluetooth technology.
5. The method according to claim 4, characterized in that The method further comprises: When the first indication information indicates that the second device does not support the Bluetooth technology, pairing and connecting with the second device through a connection method corresponding to the Star Flash technology; or When the first indication information indicates that the second device supports the Bluetooth technology, and the first device itself does not support the Bluetooth technology, pairing and connection with the second device are performed through the connection method corresponding to the Star Flash technology.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: When the first indication information indicates that the second device supports the second short-range communication technology, and the first device itself supports the second short-range communication technology, selecting a connection mode corresponding to a communication technology from the first short-range communication technology and the second short-range communication technology as the target connection mode according to the current scenario information; The first device is paired and connected with the second device through the target connection mode.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: The first device displays a first interface, where the first interface includes identification information of the second device; In response to a user triggering operation on the identification information of the second device, a second interface is displayed, where the second interface includes first prompt information, where the first prompt information is used to prompt the user that the second device supports the second short-range communication technology.
8. The method according to claim 7, characterized in that The second interface also includes a confirmation button; In response to the user triggering operation on the confirmation button, the first device turns on a switch for the second short-range communication technology.
9. A device connection method, characterized in that: include: After the first device establishes a physical connection with the second device, the first device receives a first message sent by the second device, where the first message carries second indication information, and the second indication information is used to indicate at least one short-range communication technology supported by the second device; When the at least one short-range communication technology supported by the second device indicated by the second indication information and the at least one short-range communication technology supported by the first device both include the first short-range communication technology and the second short-range communication technology, the first device is paired and connected with the second device through the connection method corresponding to the second short-range communication technology.
10. The method according to claim 9, characterized in that The first short-distance communication technology is Bluetooth technology, and the second short-distance communication technology is Star Flash technology; The method further comprises: When the second indication information indicates that the second device supports the StarFlash technology and the Bluetooth technology, and the first device supports the StarFlash technology but does not support the Bluetooth technology, the first device is paired and connected with the second device through the connection method corresponding to the StarFlash technology; or When the second indication information indicates that the second device supports the StarFlash technology and the Bluetooth technology, and the first device supports the Bluetooth technology but does not support the StarFlash technology, the first device is paired with the second device through the connection method corresponding to the Bluetooth technology. connect; or When the second indication information indicates that the second device supports the Starflash technology, and the first device supports the Bluetooth technology and the Starflash technology, the first device is paired and connected with the second device through the connection method corresponding to the Starflash technology; or When the second indication information indicates that the second device supports the Bluetooth technology, and the first device supports the Bluetooth technology and the Star Flash technology, the first device is paired and connected with the second device through a connection method corresponding to the Bluetooth technology.
11. The method according to claim 9 or 10, characterized in that The method further comprises: The first device sends a second message to the second device, where the second message carries third indication information, and the third indication information is used to indicate at least one short-range communication technology supported by the first device.
12. The method according to any one of claims 9 to 11, characterized in that: The method further comprises: When the at least one short-range communication technology supported by the second device indicated by the second indication information includes the second short-range communication technology, and the first device itself supports the second short-range technology, selecting a connection mode corresponding to a communication technology in the at least one short-range communication technology as the target connection mode according to the current scenario information; The first device is paired and connected with the second device through the target connection mode.
13. The method according to any one of claims 9 to 12, characterized in that: The method further comprises: The first device displays a third interface, the third interface including second prompt information and a connection button, the second prompt information is used to prompt the user that the connection will turn on the switch of the second short-range communication technology; In response to a user triggering operation on the connection button, a switch for the second short-range communication technology is turned on.
14. An electronic device, characterized in that: The electronic device comprises a processor; a memory; and one or more computer programs; Wherein, the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when called and executed by the processor, enable the electronic device to execute the method as described in any one of claims 1 to 8 or any one of claims 9 to 13.
15. A computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, characterized in that: When the instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 8 or any one of claims 9 to 13.
Citation Information
Patent Citations
Communication method and device
CN105191172A
Bluetooth communication method, and dual-mode bluetooth terminal
CN111602344A
Data transmission method and electronic equipment
CN114356172A
Method for discovering and connecting electronic equipment and electronic equipment
CN115150789A
Apparatus and method for bluetooth communication
KR1020170119098A
Cited By
Intelligent terminal non-inductive connection method and system supporting multi-device priority decision
CN121262672A