Equipment connection method and device, terminal and storage medium

The first terminal establishes a communication connection with the audio processing device and sends a disconnect message to the second terminal, which solves the problem of the time spent on connecting and switching of the audio processing device and improves the user experience.

CN119893743APending Publication Date: 2025-04-25BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311397406.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-25
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The prior art takes a long time to switch between the audio processing device and multiple terminals, affecting the user experience.

Method used

The first terminal receives operation instructions, establishes a communication connection with the audio processing device, and sends a message to the second terminal to disconnect it from the audio processing device, so as to realize fast switching.

Benefits of technology

It effectively reduces the time-consuming process during connection switching and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119893743A_ABST
    Figure CN119893743A_ABST
Patent Text Reader

Abstract

The invention provides an equipment connection method and device, a terminal and a storage medium, and the method comprises the steps that a first terminal receives a first operation instruction, the first operation instruction is used for instructing the first terminal to establish communication connection with audio processing equipment, and a first message is sent to a second terminal, a communication connection is established between the second terminal and the audio processing device, and the first message is used for indicating the second terminal to disconnect the communication connection with the audio processing device. Through the method and the device, the time consumption in the connection switching process can be effectively reduced, so that the user experience is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of terminal technology, and in particular to a device connection method, apparatus, terminal and storage medium. Background Art

[0002] With the expansion of user usage scenarios, the interconnection between audio processing devices and multiple terminals has gradually become common. Audio processing devices (for example, Bluetooth headsets) have a large number of users. In some usage scenarios, users may need to switch the terminal connected to the audio processing device. For example, the audio processing device switches from connecting terminal A to connecting terminal B. In the related art, the connection switching process takes a long time, which affects the user experience. Summary of the invention

[0003] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.

[0004] To this end, the present disclosure proposes a device connection method, apparatus, terminal, non-transitory computer-readable storage medium storing computer instructions, and computer program product, which can effectively reduce the time consumed in the connection switching process, thereby effectively improving the user experience.

[0005] The device connection method proposed in the embodiment of the first aspect of the present disclosure is executed by a first terminal, including: receiving a first operation instruction, wherein the first operation instruction is used to instruct the first terminal to establish a communication connection with an audio processing device; sending a first message to a second terminal, wherein a communication connection is established between the second terminal and the audio processing device, and the first message is used to instruct the second terminal to disconnect the communication connection with the audio processing device.

[0006] In some embodiments of the present disclosure, the method further includes:

[0007] Obtaining identification information of an audio processing device;

[0008] A first message is generated according to the identification information of the audio processing device.

[0009] In some embodiments of the present disclosure, generating a first message according to identification information of an audio processing device includes:

[0010] A first message is generated according to a media access control MAC address and / or an account key of the audio processing device.

[0011] In some embodiments of the present disclosure, generating a first message according to a media access control MAC address and / or an account key of an audio processing device includes:

[0012] Acquire message processing information, wherein the message processing information is used to generate a first message;

[0013] The MAC address and / or the account key are processed according to the message processing information to obtain a first message.

[0014] In some embodiments of the present disclosure, processing the MAC address and / or the account key according to the message processing information to obtain the first message includes:

[0015] Encrypt the MAC address according to the message processing information and the account key to obtain first encrypted data;

[0016] A first message is generated according to the message processing information, the MAC address, and the first encrypted data.

[0017] In some embodiments of the present disclosure, the method further includes:

[0018] A second message sent by the second terminal is received, wherein the second message is used to indicate that the second terminal has disconnected the communication connection with the audio processing device.

[0019] The device connection method proposed in the second aspect embodiment of the present disclosure is executed by the second terminal, and a communication connection is established between the second terminal and the audio processing device, including: receiving a first message sent by the first terminal, wherein the first terminal establishes a communication connection with the audio processing device based on the received first operation instruction; and disconnecting the communication connection with the audio processing device according to the first message.

[0020] In some embodiments of the present disclosure, disconnecting the communication connection with the audio processing device according to the first message includes:

[0021] Obtaining identification information of an audio processing device;

[0022] Determining, according to the identification information, that the first message satisfies a condition;

[0023] Disconnects the communication connection with the audio processing device.

[0024] In some embodiments of the present disclosure, the identification information includes: an account key;

[0025] Wherein, determining, according to the identification information, that the first message meets the condition includes:

[0026] Parsing the first message to obtain message processing information, a MAC address of the audio processing device, and first encrypted data, wherein the first encrypted data is obtained by encrypting the MAC address by the first terminal;

[0027] Encrypt the MAC address according to the account key and the message processing information to obtain second encrypted data;

[0028] In a case where the first encrypted data and the second encrypted data are identical, it is determined that the first message satisfies the condition.

[0029] In some embodiments of the present disclosure, the method further includes:

[0030] A second message is sent to the first terminal, wherein the second message is used to indicate that the second terminal has disconnected the communication connection with the audio processing device.

[0031] The device connection device proposed in the third aspect embodiment of the present disclosure includes: a first receiving module, used to receive a first operation instruction, wherein the first operation instruction is used to instruct a first terminal to establish a communication connection with an audio processing device; a sending module, used to send a first message to a second terminal, wherein a communication connection is established between the second terminal and the audio processing device, and the first message is used to instruct the second terminal to disconnect the communication connection with the audio processing device.

[0032] In some embodiments of the present disclosure, the apparatus further comprises:

[0033] An acquisition module, used to acquire identification information of an audio processing device;

[0034] The generating module is used to generate a first message according to the identification information of the audio processing device.

[0035] In some embodiments of the present disclosure, the generating module is further used to:

[0036] A first message is generated according to a media access control MAC address and / or an account key of the audio processing device.

[0037] In some embodiments of the present disclosure, the generating module is further used to:

[0038] Acquire message processing information, wherein the message processing information is used to generate a first message;

[0039] The MAC address and / or the account key are processed according to the message processing information to obtain a first message.

[0040] In some embodiments of the present disclosure, the generating module is further used to:

[0041] Encrypt the MAC address according to the message processing information and the account key to obtain first encrypted data;

[0042] A first message is generated according to the message processing information, the MAC address, and the first encrypted data.

[0043] In some embodiments of the present disclosure, the method further includes:

[0044] The third receiving module is used to receive a second message sent by the second terminal, wherein the second message is used to indicate that the second terminal has disconnected the communication connection with the audio processing device.

[0045] The device connection device proposed in the fourth aspect embodiment of the present disclosure includes: a second receiving module, used to receive a first message sent by a first terminal, wherein the first terminal establishes a communication connection with an audio processing device based on the received first operation instruction; and a processing module, used to disconnect the communication connection with the audio processing device according to the first message.

[0046] In some embodiments of the present disclosure, the processing module is specifically configured to:

[0047] Obtaining identification information of an audio processing device;

[0048] Determining, according to the identification information, that the first message satisfies a condition;

[0049] Disconnects the communication connection with the audio processing device.

[0050] In some embodiments of the present disclosure, the identification information includes: an account key;

[0051] The processing module is also used for:

[0052] Parsing the first message to obtain message processing information, a MAC address of the audio processing device, and first encrypted data, wherein the first encrypted data is obtained by encrypting the MAC address by the first terminal;

[0053] Encrypt the MAC address according to the account key and the message processing information to obtain second encrypted data;

[0054] In a case where the first encrypted data and the second encrypted data are identical, it is determined that the first message satisfies the condition.

[0055] In some embodiments of the present disclosure, the method further includes:

[0056] The indication module is used to send a second message to the first terminal, wherein the second message is used to indicate that the second terminal has disconnected the communication connection with the audio processing device.

[0057] The terminal proposed in the fifth embodiment of the present disclosure includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method proposed in the above embodiment of the present disclosure is implemented.

[0058] The sixth aspect embodiment of the present disclosure proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method proposed in the above embodiment of the present disclosure is implemented.

[0059] The seventh aspect embodiment of the present disclosure proposes a computer program product. When the instructions in the computer program product are executed by a processor, the method proposed in the above embodiment of the present disclosure is executed.

[0060] The device connection method, apparatus, terminal, non-transitory computer-readable storage medium storing computer instructions, and computer program product provided by the present disclosure, wherein a first terminal receives a first operation instruction, wherein the first operation instruction is used to instruct the first terminal to establish a communication connection with an audio processing device, and sends a first message to a second terminal, wherein a communication connection is established between the second terminal and the audio processing device, and the first message is used to instruct the second terminal to disconnect the communication connection with the audio processing device. The first terminal can interact with the second terminal to directly instruct the second terminal to disconnect the communication connection with the audio processing device, which can effectively improve the efficiency of disconnection of the communication connection, thereby effectively reducing the time consumption in the connection switching process and effectively improving the user experience.

[0061] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0063] Figure 1 is a flowchart of a device connection method proposed in an embodiment of the present disclosure;

[0064] Figure 2 is a flow chart of a device connection method proposed in another embodiment of the present disclosure;

[0065] Figure 3 is a flowchart of a device connection method proposed in another embodiment of the present disclosure;

[0066] Figure 4 is a flowchart of a device connection method proposed in another embodiment of the present disclosure;

[0067] Figure 5 is a flowchart of a device connection method proposed in another embodiment of the present disclosure;

[0068] Figure 6 is a schematic diagram of device connection in an embodiment of the present disclosure;

[0069] Figure 7 is a schematic diagram of device connection interaction in an embodiment of the present disclosure;

[0070] Figure 8is a structural schematic diagram of a device connection device proposed in an embodiment of the present disclosure;

[0071] Fig. 9 is a structural schematic diagram of a device connection device proposed in another embodiment of the present disclosure;

[0072] Fig.10 A block diagram of an exemplary terminal suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0073] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present disclosure, and should not be construed as limitations on the present disclosure. On the contrary, the embodiments of the present disclosure include all changes, modifications and equivalents that fall within the spirit and connotation of the appended claims.

[0074] Figure 1 It is a flowchart of a device connection method proposed in an embodiment of the present disclosure.

[0075] In this embodiment, the device connection method is configured as a device connection device. In this embodiment, the device connection method can be configured in the device connection device, and the device connection device can be set in a terminal. The terminal includes, for example, a mobile phone, a wearable device, an Internet of Things device, a car with a communication function, a smart car, a tablet computer, a computer with a wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal device in industrial control, a wireless terminal device in self-driving, a wireless terminal device in remote medical surgery, a wireless terminal device in a smart grid, a wireless terminal device in transportation safety, a wireless terminal device in a smart city, and a wireless terminal device in a smart home, but is not limited thereto.

[0076] It should be noted that the execution subject of the embodiment of the present disclosure may be, for example, a central processing unit (CPU) of a terminal in terms of hardware, or may be, for example, a related background service of a terminal in terms of software, without limitation. The present embodiment may be specifically applied in a first terminal, where the first terminal refers to a terminal that needs to establish a communication connection with an audio processing device. An audio processing device refers to an electronic device that has the function of processing audio signals. The audio processing device may be, for example, a Bluetooth headset. Of course, it may also be any other possible device.

[0077] like Figure 1 As shown, the device connection method includes:

[0078] S101: Receive a first operation instruction, where the first operation instruction is used to instruct a first terminal to establish a communication connection with an audio processing device.

[0079] In some embodiments, the first operation instruction may be generated when a user triggers a connection function on the first terminal interface, and the connection function may establish a communication connection between the first terminal and the audio processing device. Alternatively, the first operation instruction may be generated when the first terminal actively detects and determines that a communication connection needs to be established with the audio processing device, and there is no limitation on this.

[0080] In some embodiments, when the first terminal receives the first operation instruction, it can be clear that the terminal has a need to establish a communication connection with the audio processing device, and then the communication connection between the first terminal and the audio processing device can be triggered. The communication connection mode can be, for example, a Bluetooth connection.

[0081] In some embodiments, a connection establishment operation interface can be provided on the first terminal, and a first operation instruction can be monitored based on the connection establishment operation interface. If the first operation instruction is received through monitoring, the first terminal can search for a nearby audio processing device with which a connection can be established, and trigger the establishment of a communication connection between the first terminal and the audio processing device.

[0082] In some embodiments, it is also possible to detect whether the audio processing device needs to switch connection to the first terminal, and the audio processing device is already connected to the second terminal. If the detection determines that the audio processing device needs to switch connection to the first terminal, it triggers the establishment of a communication connection between the first terminal and the audio processing device.

[0083] In some embodiments, the first terminal may also receive the first operation instruction, and determine that the distance between the first terminal and the audio processing device meets the condition, triggering the establishment of a communication connection between the first terminal and the audio processing device. This can effectively avoid the failure of establishing a communication connection between the first terminal and the audio processing device, and improve the success rate of establishing a communication connection.

[0084] In some embodiments, a connection establishment operation interface may be provided on the first terminal, and the connection establishment operation interface may be used to monitor user operations. The first terminal may generate a first operation instruction in response to the user operation, and trigger the establishment of a communication connection with the audio processing device based on the first operation instruction. In other embodiments, the first operation instruction may also be sent by the audio processing device, indicating that the audio processing device needs to establish a communication connection with the first terminal, and the first terminal may receive the first operation instruction sent by the audio processing device, and trigger the establishment of a communication connection with the audio processing device.

[0085] In some embodiments, the first terminal may determine whether the distance between the terminal and the audio processing device satisfies a condition, and establish a communication connection between the first terminal and the audio processing device if the condition is satisfied. In some embodiments, the condition may be, for example, that the distance between the first terminal and the audio processing device is less than a distance threshold, which is a threshold value of the distance that ensures that a communication connection can be successfully established. If the distance between the first terminal and the audio processing device is less than a distance threshold, a communication connection between the first terminal and the audio processing device is established. If the distance between the first terminal and the audio processing device is greater than a distance threshold, a reminder message may be generated on the first terminal to remind the user to place the first terminal relatively close to the audio processing device so as to successfully establish a communication connection.

[0086] S102: Send a first message to a second terminal, wherein a communication connection is established between the second terminal and the audio processing device, and the first message is used to instruct the second terminal to disconnect the communication connection with the audio processing device.

[0087] In some embodiments, the first terminal may send the first message to the second terminal. The first terminal may send the first message based on a broadcast mode so that the second terminal can receive the first message in a timely manner. The second terminal may disconnect the communication connection with the audio processing device based on the first message.

[0088] That is to say, in the embodiment of the present disclosure, if the audio processing device switches from connecting to the second terminal to connecting to the first terminal, the first terminal can send a first message to the second terminal after successfully establishing a communication connection with the audio processing device to notify the second terminal to disconnect the communication connection with the audio processing device.

[0089] In this embodiment, the first terminal receives a first operation instruction, wherein the first operation instruction is used to instruct the first terminal to establish a communication connection with the audio processing device, and sends a first message to the second terminal, wherein a communication connection is established between the second terminal and the audio processing device, and the first message is used to instruct the second terminal to disconnect the communication connection with the audio processing device. The first terminal can interact with the second terminal to directly instruct the second terminal to disconnect the communication connection with the audio processing device, which can effectively improve the efficiency of disconnecting the communication connection, thereby effectively reducing the time consumption in the connection switching process and effectively improving the user experience.

[0090] Figure 2 It is a flowchart of a device connection method proposed in another embodiment of the present disclosure.

[0091] like Figure 2 As shown, the device connection method includes:

[0092] S201: Receive a first operation instruction, where the first operation instruction is used to instruct a first terminal to establish a communication connection with an audio processing device.

[0093] For the description of S201, please refer to the above embodiment, which will not be repeated here.

[0094] S202: Acquire identification information of an audio processing device.

[0095] After establishing the communication connection between the first terminal and the audio processing device, the first terminal can obtain the identification information of the audio processing device, and the identification information can be used to uniquely identify the audio processing device. For example, the first terminal can obtain the identification information of the audio processing device from a local cache, or the first terminal can also receive the identification information sent by the audio processing device, which is not limited.

[0096] S203: Generate a first message according to the identification information of the audio processing device, wherein the first message is used to instruct the second terminal to disconnect the communication connection with the audio processing device, and a communication connection is established between the second terminal and the audio processing device.

[0097] After acquiring the identification information, the identification information may be processed to generate a first message. The first message is used for the second terminal to disconnect the communication connection with the audio processing device, and the second terminal has established a communication connection with the audio processing device. In some embodiments, the first message may be a broadcast message.

[0098] In some embodiments, the identification information can be included in the broadcast message, and the broadcast message carrying the identification information can be used as the first message; or the identification information can be processed using a network programming interface to generate a broadcast message, for example, a socket is created, the socket is set to broadcast mode, and the socket is used to send a message carrying the identification information to a broadcast address or a specific broadcast port to generate a first message; or the identification information can be processed using a network management tool to generate a first message, without limitation.

[0099] S204: Send a first message to the second terminal.

[0100] For the description of S204, please refer to the above embodiment, which will not be repeated here.

[0101] In this embodiment, the first terminal receives a first operation instruction, wherein the first operation instruction is used to instruct the first terminal to establish a communication connection with the audio processing device, and obtain the identification information of the audio processing device, and generate a first message according to the identification information of the audio processing device, wherein the first message is used for the second terminal to disconnect the communication connection with the audio processing device, the second terminal has established a communication connection with the audio processing device, and sends the first message to the second terminal. The first terminal can interact with the second terminal to directly instruct the second terminal to disconnect the communication connection with the audio processing device, which can effectively improve the efficiency of disconnection of the communication connection, thereby effectively reducing the time consumption in the connection switching process and effectively improving the user experience. And by obtaining the identification information of the audio processing device, the first message is generated according to the identification information of the audio processing device, so that the second terminal can perform corresponding verification on the audio processing device based on the first message, so that the second terminal can determine whether it is connected to the same audio processing device as the first terminal, and disconnect the communication connection with the audio processing device when it is determined that it is connected to the same audio processing device as the first terminal.

[0102] In some embodiments of the present disclosure, when performing the step of obtaining the identification information of the audio processing device, a media access control (MAC) address and / or an account key sent by the audio processing device may be received, and the MAC address and / or the account key may be used as the identification information. Thus, the identification information of the audio processing device can be obtained conveniently and quickly.

[0103] The account key may be expressed as Acount Key, which can represent a unique identifier of the audio processing device.

[0104] In some embodiments, the MAC address of the audio processing device may be used as identification information; or the account key of the audio processing device may be used as identification information; or the MAC address and the account key of the audio processing device may be used as identification information.

[0105] In some embodiments of the present disclosure, when performing the step of generating the first message according to the identification information, the first message may be generated according to the MAC address and / or the account key. For example, the first message may be generated according to the MAC address; or the first message may be generated according to the account key; or the first message may be generated according to the MAC address and the account key.

[0106] Figure 3 It is a flowchart of a device connection method proposed in another embodiment of the present disclosure.

[0107] like Figure 3 As shown, the device connection method includes:

[0108] S301: Receive a first operation instruction, where the first operation instruction is used to instruct a first terminal to establish a communication connection with an audio processing device.

[0109] S302: Receive a media access control MAC address and / or an account key sent by an audio processing device.

[0110] For the description of S301 - S302 , please refer to the above embodiment, which will not be repeated here.

[0111] S303: Acquire message processing information, where the message processing information is used to generate a first message, and the first message is used to instruct the second terminal to disconnect the communication connection with the audio processing device, and a communication connection is established between the second terminal and the audio processing device.

[0112] In some embodiments, the message processing information can be used to encapsulate, encrypt, and so on the identification information.

[0113] In some embodiments, the message processing information is, for example, a random number Random. A random number (Random) refers to a value that cannot be predicted or determined according to certain rules within a certain range. In the disclosed embodiment, the identification information of the audio processing device can be encrypted based on the random number Random to improve the transmission security of the identification information of the audio processing device.

[0114] In some embodiments, the first terminal may randomly generate a random number Random. For example, a random number generation function of a computer programming language may be called to generate the random number Random.

[0115] S304: Process the MAC address and / or the account key according to the message processing information to obtain a first message.

[0116] In some embodiments, after acquiring the message processing information, the first terminal may use the message processing information to process the MAC address and / or the account key to obtain the first message.

[0117] In some embodiments, the first terminal may encrypt the MAC address according to the message processing information and the account key to obtain the first encrypted data, and generate the first message according to the message processing information, the MAC address, and the first encrypted data, thereby effectively improving the security of the first message broadcast transmission.

[0118] The encrypted data obtained by encrypting the MAC address by the first terminal may be referred to as the first encrypted data. When generating the first message according to the message processing information, the MAC address, and the first encrypted data, the message processing information, the MAC address, and the first encrypted data may be concatenated, and the first message may be generated according to the concatenated content.

[0119] S305: Send a first message to the second terminal.

[0120] For the description of S305 , please refer to the above embodiment, which will not be repeated here.

[0121] S306: Receive a second message sent by the second terminal, where the second message is used to indicate that the second terminal has disconnected the communication connection with the audio processing device.

[0122] In some embodiments, the second terminal may parse the first message to obtain identification information, and perform corresponding verification on the audio processing device based on the identification information, so that the second terminal can determine whether it is connected to the same audio processing device as the first terminal. If it is determined that it is connected to the same audio processing device as the first terminal, the second terminal can directly disconnect the communication connection with the audio processing device.

[0123] In some embodiments, the second terminal may also notify the first terminal that the communication connection has been disconnected. The second terminal may send a second message to the first terminal to indicate to the first terminal based on the second message that the second terminal has disconnected the communication connection with the audio processing device. After receiving the second message, the first terminal may clearly know that the second terminal has disconnected the communication connection with the audio processing device.

[0124] In this embodiment, the first terminal receives a first operation instruction, wherein the first operation instruction is used to instruct the first terminal to establish a communication connection with the audio processing device, and sends a first message to the second terminal, wherein a communication connection is established between the second terminal and the audio processing device, and the first message is used to instruct the second terminal to disconnect the communication connection with the audio processing device. The first terminal can interact with the second terminal to directly instruct the second terminal to disconnect the communication connection with the audio processing device, which can effectively improve the efficiency of disconnecting the communication connection, thereby effectively reducing the time consumed in the connection switching process and effectively improving the user experience. The first terminal can also receive the media access control MAC address and / or account key sent by the audio processing device, and obtain message processing information, process the MAC address and / or account key according to the message processing information, and obtain the first message, which can effectively improve the security of the broadcast transmission of the first message.

[0125] Figure 4 It is a flowchart of a device connection method proposed in yet another embodiment of the present disclosure.

[0126] This embodiment is illustrated by the example that the device connection method is configured as a device connection device. In this embodiment, the device connection method can be configured in the device connection device, and the device connection device can be set in the terminal. It should be noted that the execution subject of the embodiment of the present disclosure can be, for example, the central processing unit (CPU) of the terminal in hardware, and can be, for example, the related background service of the terminal in software, without limitation. This embodiment can be specifically applied in the second terminal, which refers to the terminal that has established a communication connection with the audio processing device.

[0127] like Figure 4 As shown, the device connection method includes:

[0128] S401: receiving a first message sent by a first terminal, wherein the first terminal establishes a communication connection with an audio processing device based on the received first operation instruction.

[0129] In some embodiments, the second terminal may be a terminal that has established a communication connection with the audio processing device. In the process of establishing a communication connection with the audio processing device, the second terminal may adopt the same or corresponding establishment method as the first terminal, which is not limited.

[0130] In some embodiments, after establishing a communication connection with the audio processing device, the second terminal may monitor the first message broadcast by the first terminal, and may receive the first message if the first terminal is monitored to send the first message.

[0131] In some embodiments, the second terminal may parse the first message to obtain identification information, and perform corresponding verification on the audio processing device based on the identification information, so that the second terminal can determine whether it is connected to the same audio processing device as the first terminal. If it is determined that it is connected to the same audio processing device as the first terminal, the second terminal can directly disconnect the communication connection with the audio processing device.

[0132] S402: Disconnect the communication connection with the audio processing device according to the first message.

[0133] In this embodiment, the second terminal receives the first message sent by the first terminal, and disconnects the communication connection with the audio processing device according to the first message. The first terminal can interact with the second terminal to directly instruct the second terminal to disconnect the communication connection with the audio processing device, which can effectively improve the efficiency of disconnecting the communication connection, thereby effectively reducing the time consumption in the connection switching process and effectively improving the user experience.

[0134] In some embodiments of the present disclosure, when the second terminal performs the step of disconnecting the communication connection with the audio processing device according to the first message, it may obtain the identification information of the audio processing device, and determine that the first message meets the condition according to the identification information, and disconnect the communication connection with the audio processing device. This realizes pre-verification of the audio processing device and improves the accuracy of the communication connection disconnection processing.

[0135] In the process of establishing a communication connection with the audio processing device, the second terminal will obtain the identification information of the audio processing device in advance and cache it locally. Then, when the first broadcast message is received, the identification information of the audio processing device can be parsed from the first message, and the parsed identification information can be compared with the locally cached identification information to determine whether they are the same audio processing device.

[0136] Figure 5 It is a flowchart of a device connection method proposed in yet another embodiment of the present disclosure.

[0137] This embodiment may be specifically applied in a second terminal, where the second terminal refers to a terminal that has established a communication connection with an audio processing device.

[0138] like Figure 5 As shown, the device connection method includes:

[0139] S501: receiving a first message sent by a first terminal, wherein the first terminal establishes a communication connection with an audio processing device based on the received first operation instruction.

[0140] S502: Obtain an account key of the audio processing device.

[0141] S503: Parse the first message to obtain message processing information, a MAC address of the audio processing device, and first encrypted data, wherein the first encrypted data is obtained by encrypting the MAC address by the first terminal.

[0142] S504: Encrypt the MAC address according to the account key and the message processing information to obtain second encrypted data.

[0143] The encrypted data obtained by the second terminal encrypting the MAC address according to the account key and the message processing information may be referred to as second encrypted data.

[0144] S505: When the first encrypted data and the second encrypted data are the same, determine that the first message meets the condition.

[0145] After obtaining the second encrypted data, the second terminal may compare the first encrypted data with the second encrypted data. If the first encrypted data and the second encrypted data are the same, it is determined that the first message meets the condition; if the first encrypted data and the second encrypted data are different, it is determined that the first message does not meet the condition. If the first message does not meet the condition, it means that the audio processing device connected to the first terminal may be a different audio processing device from the audio processing device connected to the second terminal. In this case, the disconnection of the communication connection between the second terminal and the audio processing device may not be triggered.

[0146] S506: Disconnect the communication connection with the audio processing device.

[0147] S507: Send a second message to the first terminal, where the second message is used to indicate that the second terminal has disconnected the communication connection with the audio processing device.

[0148] In this embodiment, the second terminal receives the first message sent by the first terminal, and disconnects the communication connection with the audio processing device according to the first message. The first terminal can interact with the second terminal to directly instruct the second terminal to disconnect the communication connection with the audio processing device, which can effectively improve the efficiency of disconnection of the communication connection, thereby effectively reducing the time consumption in the connection switching process and effectively improving the user experience. The second terminal obtains the account key of the audio processing device, and parses the message processing information, the MAC address of the audio processing device, and the first encrypted data from the first message, wherein the first encrypted data is obtained by encrypting the MAC address by the first terminal, and the MAC address is encrypted according to the account key and the message processing information to obtain the second encrypted data. When the first encrypted data and the second encrypted data are the same, it is determined that the first message meets the conditions, triggering the disconnection of the communication connection with the audio processing device, thereby realizing the pre-verification of the audio processing device and improving the accuracy of the communication connection disconnection processing.

[0149] like Figure 6 As shown, Figure 6 1 is a schematic diagram of device connection in the embodiment of the present disclosure. For example, the first terminal is mobile phone B, the second terminal is mobile phone A, and the audio processing device is earphone C. First, mobile phone A is connected to earphone C, and then mobile phone B is connected to earphone C. At this time, mobile phone A is still connected to earphone C (the connection is not disconnected). Further, after mobile phone B establishes a connection with earphone C, it can send a broadcast to mobile phone A to trigger mobile phone A to actively disconnect from earphone C.

[0150] like Figure 7 As shown, Figure 7 This is a schematic diagram of device connection interaction in the embodiment of the present disclosure, with the first terminal being mobile phone B, the second terminal being mobile phone A, and the audio processing device being earphone C as an example. The explanation is as follows: After mobile phone A is successfully connected to earphone C, the audio streaming function of the earphone is turned on by default, and the MAC address and Acount Key of the earphone are cached. Mobile phone B is connected to earphone C, and after the connection is successful, mobile phone B reads the Acount Key of earphone C. Mobile phone B generates a set of random numbers Random, and uses it together with the Acount Key of the earphone as a key to encrypt the MAC address of the earphone. Mobile phone B forms a broadcast data with <earphone MAC address><encrypted message><random number Random>, and broadcasts it. After receiving the broadcast from mobile phone B, mobile phone A parses the message and obtains three sets of data: <earphone MAC address><encrypted data><random number Random>. Mobile phone A encrypts <earphone MAC address> with the earphone Acount Key cached locally in combination with the <random number Random> in the message. The encrypted ciphertext is compared with the <encrypted data> in the message. When the two are the same, mobile phone A will actively disconnect earphone C. The account key (Acount Key) represents a unique identifier of the headset.

[0151] Figure 8 It is a structural schematic diagram of a device connection device proposed in an embodiment of the present disclosure.

[0152] like Figure 8 As shown, the device connection device 80 includes:

[0153] The first receiving module 801 is used to receive a first operation instruction, wherein the first operation instruction is used to instruct the first terminal to establish a communication connection with the audio processing device.

[0154] The sending module 802 is used to send a first message to the second terminal, wherein a communication connection is established between the second terminal and the audio processing device, and the first message is used to instruct the second terminal to disconnect the communication connection with the audio processing device.

[0155] It should be noted that the aforementioned explanation of the device connection method is also applicable to the device connection device of this embodiment and will not be repeated here.

[0156] In this embodiment, the first terminal receives a first operation instruction, wherein the first operation instruction is used to instruct the first terminal to establish a communication connection with the audio processing device, and sends a first message to the second terminal, wherein a communication connection is established between the second terminal and the audio processing device, and the first message is used to instruct the second terminal to disconnect the communication connection with the audio processing device. The first terminal can interact with the second terminal to directly instruct the second terminal to disconnect the communication connection with the audio processing device, which can effectively improve the efficiency of disconnecting the communication connection, thereby effectively reducing the time consumption in the connection switching process and effectively improving the user experience.

[0157] Fig. 9 It is a structural schematic diagram of a device connection device proposed in another embodiment of the present disclosure.

[0158] like Fig. 9 As shown, the device connection device 90 includes:

[0159] The second receiving module 901 is configured to receive a first message sent by a first terminal, wherein the first terminal establishes a communication connection with the audio processing device based on the received first operation instruction.

[0160] The processing module 902 is used to disconnect the communication connection with the audio processing device according to the first message.

[0161] It should be noted that the aforementioned explanation of the device connection method is also applicable to the device connection device of this embodiment and will not be repeated here.

[0162] In this embodiment, the second terminal receives the first message sent by the first terminal, and disconnects the communication connection with the audio processing device according to the first message. The first terminal can interact with the second terminal to directly instruct the second terminal to disconnect the communication connection with the audio processing device, which can effectively improve the efficiency of disconnecting the communication connection, thereby effectively reducing the time consumption in the connection switching process and effectively improving the user experience.

[0163] Fig.10 A block diagram of an exemplary terminal suitable for implementing the embodiments of the present disclosure is shown. Fig.10 The terminal 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0164] like Fig.10As shown, the terminal 12 is in the form of a general purpose computing device. The components of the terminal 12 may include, but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 connecting various system components (including the memory 28 and the processing unit 16).

[0165] The bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnection (PCI) bus.

[0166] Terminal 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by terminal 12, including volatile and non-volatile media, removable and non-removable media.

[0167] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache 32. The terminal 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Fig.10 Not shown, often called a "hard drive").

[0168] although Fig.10Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (hereinafter referred to as: CD-ROM), a digital versatile disc read only memory (hereinafter referred to as: DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.

[0169] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described in the present disclosure.

[0170] The terminal 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a human body to interact with the terminal 12, and / or any device that enables the terminal 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the terminal 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the terminal 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the terminal 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0171] The processing unit 16 executes various functional applications and data processing by running the programs stored in the memory 28, such as implementing the methods mentioned in the above embodiments.

[0172] In order to implement the above embodiments, the present disclosure further proposes a non-transitory computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method proposed in the above embodiments of the present disclosure is implemented.

[0173] In order to implement the above embodiments, the present disclosure further proposes a computer program product. When instructions in the computer program product are executed by a processor, the method proposed in the above embodiments of the present disclosure is executed.

[0174] It should be noted that, in the description of the present disclosure, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present disclosure, unless otherwise specified, the meaning of "plurality" is two or more.

[0175] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present disclosure belong.

[0176] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0177] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0178] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0179] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0180] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0181] Although the embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present disclosure. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present disclosure.

Claims

1. A device connection method, characterized in that: The method is performed by a first terminal and includes: receiving a first operation instruction, wherein the first operation instruction is used to instruct the first terminal to establish a communication connection with an audio processing device; A first message is sent to a second terminal, wherein a communication connection is established between the second terminal and the audio processing device, and the first message is used to instruct the second terminal to disconnect the communication connection with the audio processing device.

2. The method according to claim 1, characterized in that The method further comprises: Acquire identification information of the audio processing device; The first message is generated according to the identification information of the audio processing device.

3. The method according to claim 2, characterized in that The generating the first message according to the identification information of the audio processing device includes: The first message is generated according to a media access control MAC address and / or an account key of the audio processing device.

4. The method according to claim 3, characterized in that The generating the first message according to the media access control MAC address and / or the account key of the audio processing device includes: Acquire message processing information, wherein the message processing information is used to generate the first message; The MAC address and / or account key is processed according to the message processing information to obtain the first message.

5. The method according to claim 4, characterized in that The processing of the MAC address and / or the account key according to the message processing information to obtain the first message includes: Encrypting the MAC address according to the message processing information and the account key to obtain first encrypted data; The first message is generated according to the message processing information, the MAC address, and the first encrypted data.

6. The method according to claim 1, characterized in that The method further comprises: A second message sent by the second terminal is received, wherein the second message is used to indicate that the second terminal has disconnected the communication connection with the audio processing device.

7. A device connection method, characterized in that: The method is performed by a second terminal, a communication connection is established between the second terminal and the audio processing device, and the method includes: Receiving a first message sent by a first terminal, wherein the first terminal establishes a communication connection with the audio processing device based on the received first operation instruction; According to the first message, the communication connection with the audio processing device is disconnected.

8. The method according to claim 7, characterized in that The step of disconnecting the communication connection with the audio processing device according to the first message includes: Acquire identification information of the audio processing device; Determining, according to the identification information, that the first message satisfies a condition; The communication connection with the audio processing device is disconnected.

9. The method according to claim 8, characterized in that The identification information includes: an account key; The determining, according to the identification information, that the first message meets a condition includes: Parsing the first message to obtain message processing information, a MAC address of the audio processing device, and first encrypted data, wherein the first encrypted data is obtained by encrypting the MAC address by the first terminal; Encrypting the MAC address according to the account key and the message processing information to obtain second encrypted data; In a case where the first encrypted data and the second encrypted data are identical, it is determined that the first message satisfies a condition.

10. The method according to any one of claims 7 to 9, characterized in that: The method further comprises: A second message is sent to the first terminal, wherein the second message is used to indicate that the second terminal has disconnected the communication connection with the audio processing device.

11. A device connection device, characterized in that: The device comprises: A first receiving module, configured to receive a first operation instruction, wherein the first operation instruction is used to instruct the first terminal to establish a communication connection with the audio processing device; The sending module is used to send a first message to a second terminal, wherein a communication connection is established between the second terminal and the audio processing device, and the first message is used to instruct the second terminal to disconnect the communication connection with the audio processing device.

12. A device connection device, characterized in that: The device comprises: A second receiving module, configured to receive a first message sent by a first terminal, wherein the first terminal establishes a communication connection with the audio processing device based on the received first operation instruction; A processing module is used to disconnect the communication connection with the audio processing device according to the first message.

13. A terminal, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 10.

14. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: in, The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 10.

15. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 10.