Device connection method, related apparatuses and communication system

CN122028222BActive Publication Date: 2026-10-13HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511441089.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2026-10-13
Estimated Expiration
2045-09-30

AI Technical Summary

Technical Problem

用户可能会在网络信号不好的环境中(例如户外场景)使用电子设备

Benefits of technology

[0026]可以理解地,上述第二方面提供的电子设备、第三方面提供的计算机可读存储介质、第四方面提供的计算机程序产品、第五方面提供的芯片均用于执行本申请实施例所提供的方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122028222B_ABST
    Figure CN122028222B_ABST
Patent Text Reader

Abstract

The application provides a device connection method, related apparatuses and a communication system. A first device includes a first short-range communication channel and a second short-range communication channel capable of conducting network-free communication. The first device can connect different electronic devices through the first short-range communication channel and the second short-range communication channel respectively, and simultaneously conduct two different short-range communication services. This can better improve the communication experience of a user and avoid interrupting one short-range communication service when another short-range communication service is started.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to device connection methods, related devices and communication systems. Background Technology

[0002] With the development of electronic devices, mobile phones, tablets, and other electronic devices are playing an increasingly important role in people's lives. Users may use these devices in environments with poor network signals (such as outdoors). Electronic devices can provide offline communication capabilities, making it convenient for users to contact other users in environments with poor network signals. How to improve the offline communication experience is a problem that urgently needs to be solved. Summary of the Invention

[0003] This application provides a device connection method, related apparatus, and communication system. A first device can connect to different electronic devices via two short-range communication connections, allowing for simultaneous operation of two different short-range communication services. This enhances the user's communication experience and avoids interrupting one short-range communication service while another is being activated.

[0004] In a first aspect, this application provides a device connection method. This method can be applied to a first device including a first short-range communication channel and a second short-range communication channel. The first device communicates with a second device through the first short-range communication channel to perform a first short-range communication service; in response to activating the second short-range communication service, the first device switches the communication channel with the second device to the second short-range communication channel; while maintaining the first short-range communication service through the second short-range communication channel, the first device also communicates with a third device through the first short-range communication channel to perform a second short-range communication service.

[0005] In some embodiments, the performance of the first short-range communication channel is superior to that of the second short-range communication channel. Superior performance of the first short-range communication channel can mean that the first device is able to communicate with electronic devices located further away from the first device via the first short-range communication channel.

[0006] As can be seen, the first device can connect to different devices through the first and second short-range communication channels, simultaneously performing two different short-range communication services. Furthermore, when the first short-range communication service occupies the first short-range communication channel, the first device can switch the channel used for the first short-range communication service when it needs to activate the second short-range communication service, using the higher-performance first short-range communication channel for the second short-range communication service. This avoids interrupting one short-range communication service while activating another, and ensures the smooth operation of different short-range communication services, improving the user's communication experience.

[0007] In conjunction with the first aspect, in some embodiments, the second short-range communication service has a higher transmission distance requirement than the first short-range communication service. This allows the first device to use the superior-performing first short-range communication channel for the second short-range communication service, ensuring the smooth operation of services with higher transmission distance requirements.

[0008] In conjunction with the first aspect, in some embodiments, the second short-range communication service has a higher priority than the first short-range communication service. The priority of the short-range communication service can be preset.

[0009] As can be seen, if a higher-priority second short-range communication service is needed, and the higher-performance first short-range communication channel is occupied by a lower-priority first short-range communication service, the first device can switch the channel connected to the second device associated with the first short-range communication service to the second short-range communication channel. Then, the first short-range communication channel can be used for the higher-priority second short-range communication service. This improves the user experience of high-priority short-range communication services and more effectively utilizes the short-range communication channels in the first device, ensuring the smooth operation of different short-range communication services.

[0010] In conjunction with the first aspect, in some embodiments, the second short-range communication service is a network-free communication service. The network-free communication service includes one or more of the following: voice call service based on network-free communication, message sending and receiving service based on network-free communication, and intercom service based on network-free communication.

[0011] In conjunction with the first aspect, in some embodiments, when switching the communication channel with the second device to the second short-range communication channel, the first device determines a first parameter for communicating with the second device through the first short-range communication channel. The first parameter includes one or more of the following: the power of the signal transmitted to the second device, the heartbeat interval for maintaining the communication link with the second device, the physical layer type used for communicating with the second device, and the start time of the next data packet transmitted with the second device; the first device communicates with the second device on the second short-range communication channel according to the first parameter.

[0012] As can be seen, when switching channels for the first short-range communication service, the first device can move the parameters connected to the second device from the first short-range communication channel to the second short-range communication channel. This parameter relocation ensures that after switching short-range communication channels, data transmitted between the first and second devices via the first short-range communication channel can continue to be transmitted on the second short-range communication channel, avoiding interruptions to the first short-range communication service caused by the channel switch. In other words, the short-range communication channel switching process is imperceptible to the user and does not affect the user experience.

[0013] In conjunction with the first aspect, in some embodiments, when the second short-range communication service ends, the first device switches the communication channel with the second device to the first short-range communication channel, and performs the first short-range communication service with the second device through the first short-range communication channel.

[0014] As can be seen, after the second short-range communication service ends, the first device can switch back to the first short-range communication channel used for the first short-range communication service. In this way, when only the first short-range communication service is needed, the first device can use the higher-performance first short-range communication channel, improving the user experience of the first short-range communication service.

[0015] In conjunction with the first aspect, in some embodiments, the second device is an earphone, and the first short-range communication service includes a service that instructs the earphone to play audio and / or capture audio.

[0016] As can be seen, when the second short-range communication service is a network-free communication service, users can use the first device to contact other users via network-free communication while simultaneously using headphones to access audio services on the first device, such as listening to audio files on the first device. This improves the user's network-free communication experience, as users do not need to remove their headphones when the first device is engaged in network-free communication.

[0017] In conjunction with the first aspect, in some embodiments, the second short-range communication service is a call service based on network-free communication or an intercom service based on network-free communication. The first device receives the first audio from the third device through the first short-range communication channel and sends the first audio to the headset through the second short-range communication channel. The first audio is call audio or intercom audio. The first device receives the second audio collected by the headset through the second short-range communication channel and sends the second audio to the third device through the first short-range communication channel.

[0018] As can be seen, when a user has headphones connected to the first device, they can use the device's offline communication function to make calls or talk to other users. This enhances the user's offline communication experience, allowing them to listen to other users' call / talkie audio transmitted via offline communication without having to remove their headphones while making calls / talking to other users offline.

[0019] In conjunction with the first aspect, in some embodiments, the communication methods supported by the first short-range communication channel are the same as those supported by the second short-range communication channel. For example, both support Bluetooth communication, or both support StarSpeed ​​communication, or both support both Bluetooth communication and StarSpeed ​​communication.

[0020] In some embodiments, the communication methods supported by the first short-range communication channel are different from those supported by the second short-range communication channel. For example, the first short-range communication channel supports Bluetooth communication, and the second short-range communication channel supports StarSpeed ​​communication. Alternatively, the first short-range communication channel supports both Bluetooth and StarSpeed ​​communication, and the second short-range communication channel supports Bluetooth communication, or the second short-range communication channel supports StarSpeed ​​communication.

[0021] In conjunction with the first aspect, in some embodiments, the first short-range communication channel and the second short-range communication channel are disposed on the same chip, for example, both can be disposed on the short-range communication chip of the first device.

[0022] Secondly, this application provides an electronic device. The electronic device may include a first short-range communication channel, a second short-range communication channel, a memory, and a processor. The first and second short-range communication channels can be used for short-range communication. The memory can be used to store a computer program. The processor can be used to invoke the computer program to execute any of the possible implementation methods described in the first aspect.

[0023] Thirdly, this application provides a computer-readable storage medium storing instructions that, when executed by a processor, can implement any of the possible implementations described in the first aspect.

[0024] Fourthly, this application provides a computer program product that may contain computer instructions that, when executed on a processor, can implement any of the possible implementation methods described in the first aspect.

[0025] Fifthly, this application provides a chip for use in an electronic device, the chip including one or more processors for invoking computer instructions to cause the electronic device to perform any of the possible implementation methods in the first aspect.

[0026] It is understood that the electronic device provided in the second aspect, the computer-readable storage medium provided in the third aspect, the computer program product provided in the fourth aspect, and the chip provided in the fifth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of a communication system provided in an embodiment of this application;

[0028] Figures 2A to 2C These are schematic diagrams illustrating some offline communication scenarios provided in the embodiments of this application;

[0029] Figure 3 This is a schematic diagram of a device structure provided in an embodiment of this application;

[0030] Figure 4 and Figure 5 This is a schematic diagram of some device connections provided in the embodiments of this application;

[0031] Figure 6 This is a flowchart of a device connection method provided in an embodiment of this application;

[0032] Figure 7 This is a schematic diagram of another device connection provided in an embodiment of this application;

[0033] Figure 8 This is a flowchart of a device connection method provided in an embodiment of this application;

[0034] Figure 9 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;

[0035] Figure 10 This is a schematic diagram of the software structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0036] The technical solutions of the embodiments of this application are described below with reference to the accompanying drawings. In the description of the embodiments of this application, the terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to limit the application. As used in the specification and appended claims of this application, the singular expressions "a," "the," "the," "the," and "this" are intended to also include expressions such as "one or more," unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, "at least one" and "one or more" refer to one or more (including two). The term "and / or" is used to describe the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.

[0037] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.

[0038] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

[0039] Figure 1 A schematic diagram of a communication system provided in an embodiment of this application is shown as an example.

[0040] like Figure 1 As shown, the communication system 10 may include electronic device 100, electronic device 200, and headset 300. Electronic device 100 and electronic device 200 may be mobile phones, tablets, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, in-vehicle devices, smart home devices, etc. This application embodiment does not limit the type of electronic device 100 and electronic device 200.

[0041] Electronic device 100 and electronic device 200 can communicate with each other without a network and / or with a network.

[0042] Networkless communication refers to a communication method that allows users to communicate with other devices without relying on any third-party network infrastructure, such as making calls, sending and receiving messages, or intercom. The aforementioned third-party network infrastructure can be, for example, network providers such as base stations and routers that provide network access services. Networkless communication methods can include, but are not limited to, Bluetooth (BT) communication, Starlink communication, device-to-device (D2D) communication, and near-field communication (NFC). Networkless communication can meet the needs of users communicating with other users in scenarios with poor network signals or no network (e.g., underground parking garages, outdoor adventures, natural disasters, etc.). In other words, during networkless communication, both electronic devices 100 and 200 can be in a state of being offline.

[0043] Network communication can refer to device communication methods achieved with the help of third-party network infrastructure, such as communication based on cellular networks, communication based on wireless fidelity (Wi-Fi) networks, etc. When electronic devices 100 and 200 communicate via network, electronic device 100 can send the messages it needs to send to the network providing device, which then sends them to electronic device 200. Network communication requires that electronic devices 100, 200, etc., be connected to the internet. Network communication scenarios can include, but are not limited to, making calls, sending and receiving messages, sending and receiving emails, browsing web pages, etc., based on cellular networks / Wi-Fi networks.

[0044] Headphone 300 is a wireless headset that can establish a wireless communication connection with electronic device 100, such as Bluetooth communication connection, Starlight communication connection, etc.

[0045] It can be seen that both network-free communication and communication between electronic device 100 and headset 300 are short-range communication. When electronic device 100 conducts network-free communication services such as calls / sending and receiving messages / intercoms with electronic device 200, it needs to transmit data for network-free communication services through a short-range communication connection. Similarly, when connected to headset 300, it also needs to transmit audio and other data through a short-range communication connection.

[0046] Communication system 10 may also include more than Figure 1 The embodiments of this application do not limit the scope of the electronic devices shown.

[0047] In some embodiments, when the electronic device 100 is connected to the headset 300 (e.g., the electronic device 100 is connected to the headset 300 to play music), in response to triggering an operation for offline communication service (e.g., making a call via offline communication), the electronic device 100 disconnects from the headset 300 and establishes an offline communication connection with the target device using the short-range communication module in the electronic device 100 to conduct the offline communication service. That is, the electronic device 100 only supports establishing an offline communication connection with one device at a time. This affects the user's experience of offline communication. For example, in a scenario of making a call via offline communication, the user cannot use the headset 300 to answer the call. As another example, when sending messages to other users based on offline communication, the user cannot listen to music through the headset while sending messages.

[0048] This application provides a device connection method applicable to a first device comprising a first short-range communication channel and a second short-range communication channel. Both the first and second short-range communication channels can be used for short-range communication. Based on the first and second short-range communication channels, the first device can establish a network-free communication connection with other electronic devices to perform network-free communication services, while simultaneously connecting to a wireless headset to play / collect audio. When a user contacts other users through the network-free communication function of the first device, they can also use the wireless headset connected to the first device to listen to audio from the first device. This enhances the user's network-free communication experience.

[0049] Figures 2A to 2C The following are exemplary schematic diagrams illustrating some network-free communication scenarios provided in the embodiments of this application.

[0050] Wireless communication services refer to services that enable communication between users based on wireless communication. Wireless communication services can include, but are not limited to: wireless voice calls, wireless messaging, wireless intercom services, etc. The following describes some scenarios for wireless communication services.

[0051] like Figure 2A As shown, the electronic device 100 can display a user interface 210. The user interface 210 can be a voice call interface for a calling application. The user interface 210 may include a call recipient identifier 211, a prompt message 212, a microphone control 213, a hang-up control 214, and a speaker control 215.

[0052] The caller identifier 211 can be used to indicate information about the user being called by the electronic device 100, such as the name of the user being called by the electronic device 100, "Li Si". The prompt message 212 can be used to prompt the user to wait for the other party to accept the voice call invitation, and that the current call is based on offline communication. The microphone control 213 can be used to turn the microphone of the electronic device 100 on or off. The hang-up control 214 can be used to hang up the voice call. The speaker control 215 can be used to turn the speaker of the electronic device 100 on or off.

[0053] Not limited to voice calls, electronic device 100 can also make video calls with other electronic devices based on offline communication.

[0054] It can be seen that when electronic device 100 is not connected to the internet, users can make calls to other users through offline communication. Alternatively, when electronic device 100 is connected to the internet, users can also use the offline calling function of electronic device 100 to make calls to other users through offline communication.

[0055] like Figure 2B As shown, the electronic device 100 can display a user interface 220. The user interface 220 can be a chat interface in an instant messaging application, such as the chat interface corresponding to a chat group named "Family Group". The user interface 220 may include a voice control 221, an input box 222, an emoticon control 223, a photo control 224, a camera control 225, a location control 226, a call control 227, a walkie-talkie control 228, an envelope message control 229, and a file control 230.

[0056] The voice control 221 can be used to record and send voice messages.

[0057] Input box 222 can be used to enter the text message to be sent.

[0058] The emoticon control 223 can be used to call up one or more emoticons for the user to select and send.

[0059] The photo control 224 can be used to send pictures or videos.

[0060] The shooting control 225 can be used to activate the shooting function and capture pictures or videos.

[0061] The location control 226 can be used to send location information of the electronic device 100 or to enable real-time location sharing.

[0062] Call control 227 can be used to initiate voice or video calls.

[0063] The intercom control 228 can be used to initiate real-time intercom.

[0064] The envelope message control 229 can be used to send envelope messages. The content of the envelope message is not directly displayed in the dialog box; it can only be viewed after clicking. Envelope messages can preserve the user's communication privacy.

[0065] File control 230 can be used to send various types of files such as pictures, videos, audio, and documents.

[0066] In addition to the above-mentioned functional controls, the electronic device 100 may also provide more or fewer functional controls.

[0067] It can be seen that electronic device 100 can send voice messages, text messages, picture messages, location messages, files and other messages to other devices based on network-free communication.

[0068] In response to an operation on the intercom control 228, the electronic device 100 can initiate a real-time intercom in the chat group corresponding to the user interface 220 and display... Figure 2C The user interface 240 shown.

[0069] like Figure 2C As shown, the user interface 240 may include a return control 241, an intercom user information display area 242, an end control 243, a map display area 244, and a voice control 245.

[0070] The return control 241 can be used to return to the previous user interface, for example, Figure 2B The user interface 220 shown.

[0071] The intercom user information display area 242 can be used to display user information such as the avatars of the contacts who created the intercom group, the avatars of contacts within the intercom group, and the total number of contacts. For example, if the intercom user information display area 242 shows "4 people are currently talking," it can indicate that there are currently 4 users in the intercom group. Among these, due to the electronic device 100... Figure 2B The chat group "Family Group" shown has initiated a real-time intercom, so all users in the intercom group can be users of the chat group "Family Group".

[0072] The end control 243 can be used to end the intercom.

[0073] Map display area 244 can be used to display a map and the locations of users in the intercom group. For example, map display area 244 includes user identifiers 244A, 244B, 244C, and 244D. Different user identifiers can represent different users in the intercom group. Specifically, user identifier 244A can be used to indicate the location of a user on electronic device 100. User identifier 244B can be used to indicate the location of a user named "Ben". User identifier 244C can be used to indicate the location of a user named "Jhon". User identifier 244D can be used to indicate the location of a user named "Lily". Through the content in map display area 244, users can clearly see which users are in the intercom group and the real-time locations of all users in the intercom group.

[0074] The voice control 245 can be used for voice input. For example, a user can record intercom voice by long-pressing the voice control 245. The electronic device 100 can send the recorded intercom voice to the electronic devices of other users in the intercom group via offline communication. The electronic device 100 can also receive and play intercom voice from users in the intercom group. In this way, the user of the electronic device 100 can communicate with other users in the intercom group in real time via the intercom function.

[0075] Not limited to the aforementioned wireless communication services, the electronic device 100 can also perform many other types of wireless communication services. This application embodiment does not limit the implementation method of the aforementioned wireless communication services. In some embodiments, when performing wireless communication services, the electronic device 100 can broadcast data to be sent based on wireless communication. The broadcast message may carry the device identifier of the electronic device 100 and the device identifier of the target receiving device. Furthermore, the electronic device 100 can receive messages sent to it by other devices based on wireless communication, thereby realizing data exchange between devices when performing wireless communication services.

[0076] It should be noted that short-range communication services can refer to services implemented based on short-range communication. Besides network-free communication services, short-range communication services can also include services for device control based on short-range communication. For example, services for device control based on short-range communication may include, but are not limited to: services that connect to headphones and instruct the headphones to play audio and / or collect audio; services that connect to smart bracelets and instruct the smart bracelets to collect and report health data such as heart rate; services that connect to smart glasses and instruct the smart glasses to capture images and perform image recognition; services that connect to speakers and instruct the speakers to play audio, etc.

[0077] Figure 3 An exemplary schematic diagram of a device structure provided in an embodiment of this application is shown.

[0078] like Figure 3 As shown, the electronic device 100 may include a main chip, a short-range communication chip, a network communication chip, an antenna 311, and an antenna 312.

[0079] The main chip can also be called the main processor. The main chip may include a central processing unit (CPU). The main chip can be used to run applications in the electronic device 100. Applications in the electronic device 100 may include applications that carry offline communication services. These applications carrying offline communication services can provide one or more offline communication services. For example, applications carrying offline communication services may include voice call applications, instant messaging applications, intercom applications, etc.

[0080] The main chip may include a short-range communication protocol stack. This stack can be a set of protocols used for short-range wireless communication between devices, including but not limited to Bluetooth and Starlink protocols. The main chip can communicate with the short-range communication chip via this protocol stack.

[0081] The network communication chip can be used by the electronic device 100 to access the network and is responsible for sending and receiving data in the communication network (e.g., cellular communication network, Wi-Fi network, etc.) to realize network communication between the electronic device 100 and other devices. In some embodiments, the network communication chip may include a cellular communication chip and / or a Wi-Fi communication chip, etc.

[0082] The short-range communication chip may include a first short-range communication module, a first radio frequency (RF) module, a second short-range communication module, and a second RF module. The first short-range communication module can be connected to the first RF module, and the second short-range communication module can be connected to the second RF module. The electronic device 100 may include a first short-range communication channel and a second short-range communication channel. The first short-range communication channel may include a first short-range communication module, a first RF module, and an antenna 311. The second short-range communication channel may include a second short-range communication module, a second RF module, and an antenna 312.

[0083] In some embodiments, the first short-range communication module may be a module supporting one or more short-range communication methods. For example, the first short-range communication module may support Bluetooth communication and / or satellite communication. The first short-range communication module may be a baseband module. The baseband module may include one or more devices such as a digital signal processor, a modem, and a codec, and can be used to encode, decode, modulate, demodulate, and process digital signals. The baseband module can convert application layer data into baseband signals suitable for transmission to the radio frequency module, and recover the original data from the received signals.

[0084] The first radio frequency (RF) module may include one or more devices such as an RF amplifier, mixer, filter, and frequency synthesizer, and can be used to convert baseband signals into RF signals (i.e., electromagnetic wave signals), which are then transmitted via antenna 311. The first RF module can also convert electromagnetic wave signals received by antenna 311 back into baseband signals. The first short-range communication module can encode and encapsulate the information to be transmitted to obtain a baseband signal and send it to the first RF module. The first RF module can convert baseband signals from the first short-range communication module into electromagnetic wave signals and transmit them via antenna 311. The first RF module can convert electromagnetic wave signals received by antenna 311 into baseband signals and send them to the first short-range communication module. The first short-range communication module can decode baseband signals from the first RF module.

[0085] The second short-range communication module can also be a module that supports one or more short-range communication methods. The second short-range communication module can be the same as or different from the first short-range communication module. For example, the short-range communication methods supported by the first and second short-range communication modules can be partially different. The second short-range communication module is also a baseband module; please refer to the above description of baseband modules for details. The second radio frequency module and antenna 312 can be referenced in the above description of the first radio frequency module and antenna 311.

[0086] In some embodiments, the first radio frequency module and the second radio frequency module can be 2.4GHz radio frequency modules, capable of converting information into 2.4GHz electromagnetic wave signals. That is to say, both the first short-range communication channel and the second short-range communication channel can be 2.4GHz channels. This application does not limit the communication frequency of the first short-range communication channel and the second short-range communication channel. The first short-range communication channel and the second short-range communication channel can also be communication channels of other frequencies.

[0087] In network communication scenarios, the main chip can send messages to the network communication chip. The network communication chip can then send the messages to the target receiving device via networks such as cellular networks / Wi-Fi networks. The network communication chip can also receive messages sent to the electronic device 100 by other devices and send the received messages back to the main chip. The main chip can then process the received messages, such as displaying the message content or playing audio from the message.

[0088] In short-range communication scenarios, the main chip can send messages to the short-range communication chip. The short-range communication chip can then send the messages via either a first or a second short-range communication channel. The short-range communication chip can also send messages received via the first or second short-range communication channel back to the main chip. The main chip can then process the received messages.

[0089] In some embodiments, the performance of the first short-range communication channel and the second short-range communication channel differs due to factors such as differences in device layout and wiring within the electronic device 100. For example, the performance of the first short-range communication channel is superior to that of the second short-range communication channel. The electronic device 100 can use the first short-range communication channel to communicate with devices at greater distances. In other embodiments, the performance of the first short-range communication channel and the second short-range communication channel is substantially the same.

[0090] As can be seen, based on the first short-range communication channel and the second short-range communication channel, the electronic device 100 can simultaneously establish short-range communication connections with two devices and perform two different short-range communication services at the same time.

[0091] Figure 4 and Figure 5 The illustration shows a schematic diagram of some device connections provided in the embodiments of this application.

[0092] like Figure 4 As shown, electronic device 100 can communicate with electronic device 200 via network provider 400. Simultaneously, electronic device 100 can also communicate with headset 300 for audio transmission.

[0093] In some embodiments, electronic devices 100 and 200 can conduct voice / video calls based on network communication. Electronic device 100 can transmit call data with electronic device 200 via a network communication chip. The call data may include call audio and / or video images. The call data between electronic devices 100 and 200 is transmitted via network providing device 400.

[0094] When the electronic device 100 is connected to the headset 300, the electronic device 100 can capture call audio through the headset 300. The electronic device 100 can receive the audio captured by the headset 300 through a first short-range communication channel, and then send the audio to the other end of the call through a network communication chip. When the electronic device 100 receives the call audio from the other end of the call, it can send the call audio to the headset 300 through the first short-range communication channel. The headset 300 can play the call audio.

[0095] Optionally, the electronic device 100 can also use an audio acquisition device (such as a microphone) in the electronic device 100 to acquire audio, and then fuse the acquired audio with the audio acquired by the headset 300. The electronic device 100 can then send the fused audio as the local call audio to the other end of the call.

[0096] When the electronic device 100 is not connected to the headset 300, the electronic device 100 can use its own audio acquisition device to acquire audio and send the acquired audio to the other end of the call. Upon receiving the call audio from the other end, the electronic device 100 can play the call audio from the other end through its own audio playback device (e.g., speaker, earpiece). In other words, when the electronic device 100 is talking to another device and is not connected to the headset 300, the electronic device 100 uses its own audio acquisition device to acquire its own call audio and uses its own audio playback device to play the call audio from the other end.

[0097] In some embodiments, the headset 300 is a Bluetooth headset, that is, a headset that uses Bluetooth communication. The headset 300 can use the Bluetooth hands-free profile (HFP) to control calls on the electronic device 100, such as answering, hanging up, and rejecting calls. Thus, when the headset 300 is connected to the electronic device 100, the user can operate it directly from the headset 300 to conveniently control calls on the electronic device 100. The headset 300 can also use the Bluetooth advanced audio distribution profile (A2DP) to transmit high-quality audio content with the electronic device 100.

[0098] In some embodiments, the headset 300 is a StarSignal headset, that is, a headset using StarSignal communication. The headset 300 can use StarSignal communication protocols for calls and multimedia (e.g., audio and video) transmission to play and capture audio.

[0099] like Figure 5 As shown, when it is necessary to communicate with electronic device 200 without a network, electronic device 100 can switch the channel used for data transmission with headset 300 from the first short-range communication channel to the second short-range communication channel, and use the first short-range communication channel to communicate with electronic device 200 without a network.

[0100] During the process of switching the data transmission channel between electronic device 100 and headset 300 to a second short-range communication channel, electronic device 100 can transfer the parameters connected to headset 300 to the second short-range communication channel. These parameters may include one or more of the following: the transmission power of the signal sent to headset 300, the heartbeat interval for maintaining the communication link with headset 300, the physical layer (PHY) type used for communication with headset 300, the start time of the next data packet transmitted with headset 300, etc. This parameter transfer ensures that after switching short-range communication channels, data transmitted between electronic device 100 and headset 300 via the first short-range communication channel can continue to be transmitted via the second short-range communication channel, avoiding interruptions in audio playback from headset 300 caused by the short-range communication channel switch. In other words, the short-range communication channel switching process is imperceptible to the user and does not affect the user experience.

[0101] The first short-range communication channel outperforms the second short-range communication channel. When electronic device 100 does not require offline communication, it can use the superior first short-range communication channel to transmit data with headset 300. This ensures smooth audio data transmission between electronic device 100 and headset 300, and even when the user is slightly away from electronic device 100 while wearing headset 300, audio services on electronic device 100 can still be accessed through headset 300. When electronic device 100 still needs offline communication, since the distance between electronic device 100 and headset 300 is usually closer than the distance between devices communicating offline, electronic device 100 can... Figure 5 The short-range communication channel switching shown assigns the higher-performance first short-range communication channel to offline communication. This facilitates the smooth operation of the electronic device 100 for corresponding offline communication services, thereby ensuring the communication quality when the user contacts other users via offline communication.

[0102] If the electronic device 100 is not connected to the headset 300 before engaging in offline communication with the electronic device 200, the electronic device 100 can directly use the first short-range communication channel to engage in offline communication with the electronic device 200 without switching to the short-range communication channel with the headset 300.

[0103] In some embodiments, electronic devices 100 and 200 can communicate via wireless communication. Specifically, electronic device 100 can transmit call / intercom audio to electronic device 200 through a first short-range communication channel.

[0104] When the electronic device 100 is connected to the headset 300, the electronic device 100 can capture audio (such as call audio / intercom audio) through the headset 300. The electronic device 100 can receive the audio captured by the headset 300 through a second short-range communication channel, and then send the audio to the electronic device 200 through a first short-range communication channel. The electronic device 100 can also receive audio (such as call audio / intercom audio) from the electronic device 200 through the first short-range communication channel, and then send the audio from the electronic device 200 to the headset 300 through the second short-range communication channel. The headset 300 can play the audio from the electronic device 200.

[0105] Optionally, electronic device 100 can also use an audio acquisition device (e.g., a microphone) in electronic device 100 to acquire audio, and then fuse the acquired audio with the audio acquired by headset 300. Electronic device 100 can then send the fused audio to electronic device 200 as local call audio / local intercom audio.

[0106] As can be seen, when the electronic device 100 is connected to the headset 300, the user can use the offline communication function of the electronic device 100 to make calls or talk to other users. This can improve the user's offline communication experience, as the user can wear the headset 300 to listen to the audio of other users' calls / talkies transmitted via offline communication, without having to remove the headset 300 when making calls / talking to other users offline.

[0107] When the electronic device 100 is not connected to the headphone 300, the electronic device 100 can use its audio acquisition device to acquire audio and send the acquired audio to the electronic device 200 through the first short-range communication channel. When the electronic device 100 receives the audio from the electronic device 200 through the first short-range communication channel, the electronic device 100 can use its audio playback device to play the audio from the electronic device 200.

[0108] In some embodiments, electronic devices 100 and 200 can send and receive messages (e.g., text messages, photo messages, etc.) based on network-free communication. Specifically, electronic device 100 can transmit message content to electronic device 200 via a first short-range communication channel.

[0109] When the electronic device 100 is connected to the headset 300, the electronic device 100 can send audio (e.g., music) to be played from the electronic device 100 to the headset 300 via a second short-range communication channel. The headset 300 can then play the audio from the electronic device 100. Simultaneously, in response to an operation to send a message to the electronic device 200, the electronic device 100 can send a message to be sent to the electronic device 200 via a first short-range communication channel. The electronic device 100 can also receive messages from the electronic device 200 via the first short-range communication channel.

[0110] As can be seen, during the process of sending text / photo messages to other users based on offline communication, users can listen to music or other audio from electronic devices 100 through headphones 300 while sending messages. This enhances the user's offline communication experience, ensuring that the audio from electronic devices 100 listened to through headphones 300 is not interrupted while the user is sending and receiving messages via offline communication.

[0111] Reference Figure 1 The communication system 10 shown, Figure 6 A flowchart of a device connection method provided in an embodiment of this application is illustrated.

[0112] S611, the electronic device 100 is connected to the headset 300 through a first short-range communication channel.

[0113] The electronic device 100 can transmit audio to be played to the headset 300 via the first short-range communication channel. The electronic device 100 can also receive audio collected by the headset 300 via the first short-range communication channel.

[0114] For example, in a scenario where electronic device 100 is playing music / video, electronic device 100 can send the audio from the music / video to headphones 300 via a first short-range communication channel. In this way, the user can wear headphones 300 to listen to the audio of the music / video playing on electronic device 100.

[0115] For example, in a scenario where electronic device 100 makes a call with other electronic devices via network communication, electronic device 100 can send the audio of the other end of the call to headset 300 through a first short-range communication channel, and receive the audio collected by headset 300 through the same first short-range communication channel. In this way, the user can answer the call on electronic device 100 through headset 300.

[0116] S612. In response to the operation of triggering short-range communication service 1, electronic device 100 moves the parameters connected to headset 300 from the first short-range communication channel to the second short-range communication channel, switches the channel connected to headset 300 to the second short-range communication channel, and connects to electronic device 200 through the first short-range communication channel to perform short-range communication service 1.

[0117] For example, short-range communication service 1 can be a network-free communication service, such as a voice call / message sending and receiving service / intercom service based on network-free communication, etc. The operation that triggers short-range communication service 1 could be, for example, dialing the aforementioned number to a target contact. Figure 2A The operation of making a call without internet access shown is, or the aforementioned Figure 2B The operation shown involves changing the message sending and receiving method in the chat interface to offline communication mode, or enabling the aforementioned... Figure 2C The diagram illustrates the operation of a walkie-talkie based on network-free communication. This application does not limit the operation for triggering short-range communication service 1.

[0118] In some embodiments, the performance of the first short-range communication channel is superior to that of the second short-range communication channel. To ensure the smooth operation of the short-range communication service 1, the electronic device 100 can use the first short-range communication channel to perform the short-range communication service 1. Since the first short-range communication channel is currently occupied by the headset 300, the electronic device 100 can move the parameters connected to the headset 300 from the first short-range communication channel to the second short-range communication channel, thus switching the channel connected to the headset 300 to the second short-range communication channel.

[0119] In this device, after the main chip of the electronic device 100 detects the operation that triggers the short-range communication service 1, it can instruct the short-range communication chip to perform a short-range communication channel switching operation. The short-range communication channel switching can be referred to the aforementioned... Figure 5 Introduction.

[0120] After switching the channel connected to the headset 300 to the second short-range communication channel, the electronic device 100 can connect to the electronic device 200 through the first short-range communication channel and perform short-range communication service 1.

[0121] In a scenario where electronic device 100 uses a first short-range communication channel to conduct short-range communication service 1 with electronic device 200, and simultaneously connects to headset 300 via a second short-range communication channel, the data transmission between electronic device 100, electronic device 200, and headset 300 can refer to the aforementioned... Figure 5 The introduction is omitted here.

[0122] S613. When the short-range communication service 1 ends, the electronic device 100 moves the parameters connected to the headset 300 from the second short-range communication channel to the first short-range communication channel, and switches the channel connected to the headset 300 to the first short-range communication channel.

[0123] For example, the termination of short-range communication service 1 may include the termination of a call based on offline communication, which will... Figure 2B The message sending and receiving method in the chat interface shown has been changed to network communication, ending the previous discussion. Figure 2C The example shown is a walkie-talkie based on network-free communication, etc.

[0124] Because the first short-range communication channel has superior performance, after the short-range communication service 1 ends, the electronic device 100 can switch the channel connected to the headset 300 back to the first short-range communication channel. This extends the communication distance between the headset 300 and the electronic device 100. Even when the user wears the headset 300 slightly away from the electronic device 100, the headset 300 can still perform audio services on the electronic device 100.

[0125] Specifically, the electronic device 100 can transfer parameters connected to the headset 300 from the second short-range communication channel to the first short-range communication channel. This ensures that after switching short-range communication channels, the data transmitted between the electronic device 100 and the headset 300 via the second short-range communication channel can continue to be transmitted on the first short-range communication channel, avoiding interruptions in audio playback from the headset 300 caused by the aforementioned switching of short-range communication channels.

[0126] Step S613 is optional. In some embodiments, after the short-range communication service 1 ends, the electronic device 100 can continue to be connected to the headset 300 through the second short-range communication channel, that is, it does not switch the channel connected to the headset 300 back to the first short-range communication channel.

[0127] As can be seen from the above method, when a user contacts other users through the offline communication function of electronic device 100, they can also listen to the audio from the first device using the headset 300 connected to electronic device 100. This can improve the user's offline communication experience.

[0128] Figure 7 An exemplary schematic diagram of another device connection provided by an embodiment of this application is shown.

[0129] like Figure 7 As shown, electronic device 100 can communicate with electronic device 200 via network provider 400. Simultaneously, electronic device 100 can also communicate with headset 300 for audio transmission.

[0130] In some embodiments, the short-range communication channel in the electronic device 100 used for connection with the headset 300 can be fixed, for example, always the second short-range communication channel. The electronic device 100 can reserve a fixed short-range communication channel (e.g., the first short-range communication channel) for offline communication. When offline communication with the electronic device 200 is required, the electronic device 100 can directly use the first short-range communication channel to connect with the electronic device 200, thus eliminating the need to switch the short-range communication channel connected to the headset 300.

[0131] The method by which electronic device 100 transmits audio to earphone 300 via a second short-range communication channel can be referred to the aforementioned method. Figure 4 The method shown describes how the electronic device 100 transmits audio to the headset 300 via a first short-range communication channel.

[0132] Figure 8 A flowchart of a device connection method provided in an embodiment of this application is illustrated.

[0133] S811, electronic device 100 is connected to headset 300 via a second short-range communication channel.

[0134] Step S811 can be referred to the above. Figure 6 Step S611 is shown.

[0135] S812, in response to the operation of triggering short-range communication service 2, electronic device 100 connects to electronic device 200 through a first short-range communication channel to perform short-range communication service 2, and maintains connection with headset 300 through a second short-range communication channel.

[0136] The operation of triggering short-range communication service 2 can be referred to the operation of triggering short-range communication service 1 in step S612 above.

[0137] The processes by which electronic device 100 communicates with electronic device 200 via the first short-range communication channel and with earphone 300 via the second short-range communication channel can be referred to the foregoing. Figure 5 The introduction is omitted here.

[0138] As can be seen, when a user contacts other users through the offline communication function of electronic device 100, they can also listen to audio from the first device using the headset 300 connected to electronic device 100. This enhances the user's offline communication experience.

[0139] It should be noted that the above-described headset 300 is merely an illustrative example. Besides the headset 300, the electronic device 100 can also connect to wearable devices such as smart glasses and smart bracelets, or devices such as speakers and televisions, via a first short-range communication channel or a second short-range communication channel. In this way, while using the electronic device 100 to contact other users via offline communication (e.g., making calls / sending / receiving messages / intercoms with other users), users can also use devices such as smart glasses, smart bracelets, speakers, and televisions connected to the electronic device 100. The smart glasses, smart bracelets, speakers, and televisions will not disconnect from the electronic device 100 because the electronic device 100 is conducting offline communication services such as making calls / sending / receiving messages / intercoms with other devices.

[0140] In some embodiments, the electronic device 100 can connect to different electronic devices through a first short-range communication channel and a second short-range communication channel, respectively, and perform two different short-range communication services simultaneously. This can better enhance the user's communication experience.

[0141] For example, electronic device 100 can connect to device A via a first short-range communication channel to conduct voice / intercom services with device A based on network-free communication; simultaneously, electronic device 100 can also connect to device B via a second short-range communication channel to conduct message sending and receiving services with device B based on network-free communication. Thus, even when electronic device 100 is not connected to the network, a user can still use electronic device 100 to make a call or conduct group intercom while simultaneously sending messages to other users.

[0142] For example, an electronic device 100 can connect to device A via a first short-range communication channel to conduct calls, send and receive messages, and engage in intercom services based on offline communication. Simultaneously, the electronic device 100 can also connect to devices such as headphones, smart glasses, smart bracelets, speakers, and televisions via a second short-range communication channel and control these devices. Thus, even when the electronic device 100 is offline, the user can still use it to contact other users while simultaneously controlling the headphones, smart glasses, smart bracelets, speakers, and televisions to complete desired tasks (e.g., playing audio, capturing audio, taking pictures, screen mirroring, etc.).

[0143] Optionally, if the performance of the first short-range communication channel is superior to that of the second short-range communication channel, the electronic device 100 may allocate short-range communication channels for short-range communication services according to a preset strategy. For example, the preset strategy may include allocating short-range communication channels according to the priority of the short-range communication services. If the priority of short-range communication service 1 is higher than that of short-range communication service 2, the electronic device 100 may use the first short-range communication channel to connect with the device associated with short-range communication service 1 to perform short-range communication service 1, and use the second short-range communication channel to connect with the device associated with short-range communication service 2 to perform short-range communication service 2. If short-range communication service 2 occupies the first short-range communication channel when short-range communication service 1 is needed, the electronic device 100 may switch the channel connected to the device associated with short-range communication service 2 to the second short-range communication channel, and then use the first short-range communication channel to connect with the device associated with short-range communication service 1 to perform short-range communication service 1. The process of switching short-range communication channels described above can be referred to the foregoing. Figure 5 Introduction.

[0144] For example, in the foregoing embodiments, the priority of call services based on network-free communication is higher than the priority of audio playback / audio capture services controlled by audio devices (e.g., headphones, speakers, etc.). The above-described priorities for short-range communication services are merely illustrative examples and should not be construed as limiting the scope of this application.

[0145] In some embodiments, the aforementioned preset strategy may further include allocating short-range communication channels according to the transmission distance requirements of short-range communication services. If the transmission distance requirement of short-range communication service 1 is higher than that of short-range communication service 2, the electronic device 100 can use the first short-range communication channel to connect with the device associated with short-range communication service 1 to perform short-range communication service 1, and use the second short-range communication channel to connect with the device associated with short-range communication service 2 to perform short-range communication service 2. For example, the transmission distance requirement of a call service based on network-free communication is higher than the transmission distance requirement of an audio playback / audio acquisition service controlled by an audio device (e.g., headphones, speakers, etc.). This application embodiment does not limit the level of transmission distance requirements for short-range communication services.

[0146] The embodiments of this application do not limit the above-mentioned preset strategies.

[0147] The above embodiments can more effectively utilize the short-range communication channel in the electronic device 100 to ensure the smooth operation of different short-range communication services.

[0148] Figure 9 An exemplary schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application is shown.

[0149] like Figure 9 As shown, the electronic device 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, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0150] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0151] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0152] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0153] The processor 110 may also include a memory for storing instructions and data. In some examples, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or is recurring. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0154] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback.

[0155] The charging management module 140 receives charging input from a charger, which can be a wireless charger or a wired charger. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.

[0156] 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 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.

[0157] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0158] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0159] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.

[0160] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including WLAN (such as Wi-Fi networks), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and satellite strobe. 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 antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0161] The wireless communication module 160 can be used to realize short-range communication between the electronic device 100 and other devices in this embodiment of the application, such as wireless communication when the electronic device 100 and the electronic device 200 perform wireless communication services, and communication when the electronic device 100 and the headset 300 perform audio transmission, etc.

[0162] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering.

[0163] The display screen 194 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0164] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0165] The ISP is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye.

[0166] Camera 193 is used to capture still images or videos. In some embodiments, electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0167] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.

[0168] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.

[0169] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0170] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0171] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0172] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, audio module 170 may be located in processor 110, or some functional modules of audio module 170 may be located in processor 110. Speaker 170A, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. Receiver 170B, also called a "handset," is used to convert audio electrical signals into sound signals. Microphone 170C, also called a "microphone" or "microphone," is used to convert sound signals into electrical signals. Headphone jack 170D is used to connect wired headphones.

[0173] The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, gravity sensors, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, angle sensors, etc.

[0174] Buttons 190 include a power button, volume buttons, etc. Motor 191 can generate vibration feedback. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, and also to indicate messages, missed calls, notifications, etc.

[0175] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and detach from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The electronic device 100 interacts with the network through the SIM card to achieve functions such as calls and data communication. In some examples, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be removed from it.

[0176] The electronic device provided in this application embodiment can run an operating system (OS). This operating system can be various operating systems currently used in the industry, such as HarmonyOS, an operating system developed based on OpenHarmony; or other operating systems, for example... The iOS mobile operating system; it can also be various open-source operating systems or their derivatives, such as Linux OS, and other embedded operating systems; it can also be a future new operating system, such as an AI operating system based on artificial intelligence. An operating system is a set of interconnected system software programs that manage and control the operation of electronic devices, utilize and run hardware and software resources, and provide public services to organize user interaction. The operating system occupies a pivotal position in electronic devices, connecting the physical hardware layer downwards and providing a runtime environment for application software upwards. To more clearly illustrate the implementation of the embodiments of this application under a specific operating system, the architecture of HarmonyOS is shown below. Those skilled in the art can deduce the implementation of the embodiments of this application under other specific operating systems, such as... Implementation under the operating system.

[0177] Figure 10 An exemplary schematic diagram of the software structure of an electronic device provided in an embodiment of this application is shown.

[0178] like Figure 10 As shown, the software architecture of an electronic device can be divided into several layers. In some embodiments, from bottom to top, these layers are: kernel layer, system service layer, framework layer, and application layer. The layers communicate with each other through software interfaces. System functions can be tailored, added, or combined at the subsystem granularity in different device deployment scenarios, and each subsystem can also be tailored, added, or combined at the functional granularity.

[0179] The Kernel Abstraction Layer (KAL) provides basic kernel capabilities to upper layers by shielding the differences between multiple kernels, including but not limited to process / thread management, memory management, file system, network management, and peripheral device management.

[0180] Kernel Subsystem: Supports the selection of a suitable OS kernel for different resource-constrained devices, including but not limited to Linux kernel, HarmonyOS kernel, LiteOS, etc.

[0181] Driver Subsystem: The driver framework is the foundation for the open system hardware ecosystem, providing unified peripheral access capabilities and a framework for driver development and management. The driver framework includes: display drivers, camera drivers, audio drivers, Bluetooth drivers, sensor drivers, etc.

[0182] The system service layer comprises the core capabilities of the system, providing services to applications through the framework layer. This layer includes, but is not limited to, the following subsystems:

[0183] The system's basic capability subsystems provide fundamental capabilities for the operation, scheduling, and migration of distributed applications across multiple devices. For example, they may include distributed soft bus, distributed data management, distributed task scheduling, and compiler / runner; they may also include multi-modal input subsystem, graphics subsystem, security subsystem, and AI subsystem.

[0184] Basic software service subsystems: provide common and general software services; for example, event notification subsystem, telephone service subsystem, multimedia subsystem, etc.

[0185] Enhanced software service subsystem suite: Provides differentiated capability-enhancing software services for different devices; for example, it may include proprietary business subsystems for smart screens, wearable devices, and IoT devices.

[0186] Hardware service subsystem set: provides hardware services; for example, it may include location service subsystem, user IAM (Identity and Access Management) subsystem, wearable proprietary hardware service subsystem, biometric identification, IoT proprietary hardware service subsystem, etc.

[0187] Distributed task scheduling enables distributed service management (discovery, synchronization, registration, and invocation), supporting remote startup, remote invocation, remote connection, and migration of applications across devices.

[0188] Distributed data management enables data synchronization, data storage, data sharing, and data access across all scenarios and devices.

[0189] The distributed soft bus provides communication-related capabilities for seamless interconnection between multiple devices, including: WLAN service capabilities, Bluetooth service capabilities, soft bus, inter-process communication RPC (Remote Procedure Call) and other communication capabilities.

[0190] A compiler / runner is a unified compilation and runtime platform designed to support the joint compilation and execution of multiple programming languages ​​and multiple chip platforms. For example, a compiler / runner could be the ArkCompiler.

[0191] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. Examples include the UI framework module (which provides a complete infrastructure for UI development, including UI functionalities such as components, layouts, animations, and interactive events, as well as real-time interface preview tools), the user application framework, and the Ability framework (an Ability is a lightweight application; the Ability framework schedules and manages the operation and lifecycle of Abilities). Different devices may run different operating systems, and therefore support different APIs.

[0192] The HarmonyOS API is a series of open capabilities provided to support HarmonyOS application development. The HarmonyOS API can be set at the framework layer or independently of the framework layer. Examples include: Audio API (audio service), Push API (push service), and Account API (account service).

[0193] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps in the above-described method embodiments.

[0194] This application also provides a computer program product, including a computer program that, when run on a processor, can implement the steps in the various method embodiments described above.

[0195] This application also provides a chip system, which includes a processing circuit and an interface circuit. The interface circuit receives code instructions and transmits them to the processing circuit. The processing circuit executes the code instructions to enable the chip system to implement the steps of any method embodiment of this application. The chip system can be a single chip or a chip module composed of multiple chips.

[0196] It is understood that the user interfaces described in the embodiments of this application are merely example interfaces and do not constitute a limitation on the solution of this application. In other embodiments, the user interface may adopt different interface layouts, may include more or fewer controls, and may add or remove other functional options, as long as they are based on the same idea provided in this application, they are all within the protection scope of this application.

[0197] It should be noted that, without causing contradictions or conflicts, any feature in any embodiment of this application, or any part of any feature, can be combined, and the combined technical solution is also within the scope of the embodiments of this application.

[0198] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A device connection method, characterized in that, The method is applied to a first device including a first short-range communication channel and a second short-range communication channel, and the method includes: The first device communicates with the second device through the first short-range communication channel to perform the first short-range communication service; In response to the operation of activating the second short-range communication service, the first device switches the communication channel with the second device to the second short-range communication channel; While maintaining the first short-range communication service through the second short-range communication channel, the first device communicates with the third device through the first short-range communication channel to perform the second short-range communication service.

2. The method according to claim 1, characterized in that, The performance of the first short-range communication channel is better than that of the second short-range communication channel.

3. The method according to claim 1 or 2, characterized in that, The second short-range communication service has higher requirements for transmission distance than the first short-range communication service.

4. The method according to any one of claims 1-3, characterized in that, The second short-range communication service is a network-free communication service.

5. The method according to claim 4, characterized in that, The wireless communication services include one or more of the following: wireless voice call services, wireless message sending and receiving services, and wireless intercom services.

6. The method according to any one of claims 1-5, characterized in that, The first device switches the communication channel with the second device to the second short-range communication channel, including: The first device determines a first parameter for communicating with the second device through the first short-range communication channel. The first parameter includes one or more of the following: the power of the signal transmitted to the second device, the heartbeat interval for maintaining the communication link with the second device, the physical layer type used for communicating with the second device, and the start time of the next data packet transmitted with the second device. The first device communicates with the second device on the second short-range communication channel according to the first parameters.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: When the second short-range communication service ends, the first device will switch the communication channel with the second device to the first short-range communication channel, and perform the first short-range communication service with the second device through the first short-range communication channel.

8. The method according to any one of claims 1-7, characterized in that, The second device is an earphone, and the first short-range communication service includes services that instruct the earphone to play audio and / or capture audio.

9. The method according to claim 8, characterized in that, The second short-range communication service is a voice call service or an intercom service based on network-free communication. During the process of maintaining the first short-range communication service through the second short-range communication channel, the first device communicates with the third device through the first short-range communication channel, including: The first device receives the first audio from the third device through the first short-range communication channel, and sends the first audio to the headset through the second short-range communication channel. The first audio is call audio or intercom audio. The first device receives the second audio collected by the earphone through the second short-range communication channel, and sends the second audio to the third device through the first short-range communication channel.

10. The method according to any one of claims 1-9, characterized in that, The communication methods supported by the first short-range communication channel may be the same as or different from those supported by the second short-range communication channel.

11. The method according to any one of claims 1-10, characterized in that, The first short-range communication channel and the second short-range communication channel are located on the same chip.

12. An electronic device, characterized in that, The electronic device includes a first short-range communication channel, a second short-range communication channel, a memory, and a processor, wherein the first short-range communication channel and the second short-range communication channel are used for short-range communication; the memory is used to store a computer program; and the processor executes the computer program to implement the method of any one of claims 1-11.

13. A computer-readable storage medium storing instructions, characterized in that, When the instructions are executed by the processor, they implement the method of any one of claims 1-11.

14. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a processor, implement the method of any one of claims 1-11.

15. A chip system, characterized in that, It includes a processing circuit and an interface circuit, the interface circuit being used to receive code instructions and transmit them to the processing circuit, the processing circuit being used to execute the code instructions to perform the method as described in any one of claims 1-11.

Citation Information

Patent Citations

  • Method, device and system for transmitting data in near field

    CN114697934A

  • Audio service processing system, electronic equipment and Bluetooth earphone

    CN115002934A