Device connection method, terminal device and storage medium

Through the exchange of broadcast information between terminal devices and comparison of connection levels, the connection process is automatically controlled, and the problem of low connection efficiency of multiple terminal devices is solved, fast and convenient device connection is achieved, and user experience is improved.

WO2024244599A1PCT designated stage expired Publication Date: 2024-12-05ZTE CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/081033
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-01
Filing Date
2024-03-11
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

In the prior art, the connection efficiency between multiple terminal devices is low, and users need to manually operate to initiate connection requests, which is not efficient and has poor user experience.

Method used

By obtaining operation instructions, the terminal device is triggered to initiate the device connection and send broadcast information, including the connection level, obtain the connection level of the other party's device, determine the connection status based on the level of itself and the other party, and automatically control the connection process.

Benefits of technology

It realizes fast and convenient connection between multiple terminal devices, improves the efficiency and security of device connections, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024081033_05122024_PF_FP_ABST
    Figure CN2024081033_05122024_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to the technical field of communications, and provide a device connection method, a terminal device and a storage medium. The method comprises: obtaining an operation instruction, the operation instruction being used for triggering a first terminal device and at least one second terminal device to start device connection and send broadcast information, and the broadcast information comprising a connection level; obtaining broadcast information of the second terminal device, and obtaining a connection level of the second terminal device from the broadcast information; obtaining a connection level of the first terminal device, and determining a connection state of the first terminal device according to the connection level of the first terminal device and the connection level of the second terminal device; and according to the connection state of the first terminal device, controlling the first terminal device to be connected to the second terminal device.
Need to check novelty before this filing date? Find Prior Art

Description

Device connection method, terminal device and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This disclosure is based on Chinese patent application CN202310645790.8, filed on June 1, 2023, entitled “Device connection method, terminal device and storage medium”, and claims the priority of the patent application, and all the contents disclosed therein are incorporated into this disclosure by reference. Technical Field

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

[0004] With the rapid development of terminal devices, the connection between multiple terminal devices is the basis for realizing distributed capability sharing. How to achieve fast connection between multiple terminal devices has a high market value and can significantly improve user experience.

[0005] In some cases, after one device discovers another, the user must manually initiate a connection request on one of them. Only after the request is accepted can the connection between the two devices begin. For multiple devices, the user must manually initiate a connection request on each device, and only after the other devices agree can the connection be established. This is inefficient and provides a poor user experience.

[0006] Summary of the Invention

[0007] The main purpose of the embodiments of the present disclosure is to provide a device connection method, terminal device and storage medium, aiming to quickly and conveniently achieve connection between devices, improve the efficiency and security of device connection, and enhance the user experience.

[0008] In a first aspect, an embodiment of the present disclosure provides a device connection method, which is applied to a first terminal device, and the method includes: obtaining an operation instruction, wherein the operation instruction is used to trigger the first terminal device and at least one second terminal device to start a device connection and send broadcast information, wherein the broadcast information includes a connection level; obtaining the broadcast information of the second terminal device, and obtaining the connection level of the second terminal device from the broadcast information; obtaining the connection level of the first terminal device, and determining the connection status of the first terminal device according to the connection levels of the first terminal device and the second terminal device; and controlling the first terminal device to connect with the second terminal device according to the connection status of the first terminal device.

[0009] In a second aspect, an embodiment of the present disclosure provides a terminal device, comprising a processor, a memory, a computer program stored on the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the device connection method as described in any one of the items provided in the specification of this disclosure are realized.

[0010] In a third aspect, an embodiment of the present disclosure further provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the device connection method as described in any one of the items provided in the specification of this disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0012] FIG1 is a schematic diagram of an application scenario of a device connection method provided by an embodiment of the present disclosure;

[0013] FIG2 is a schematic diagram of a flow chart of a device connection method provided by an embodiment of the present disclosure;

[0014] FIG3 is a schematic block diagram of the overall process of a data detection device provided by an embodiment of the present disclosure;

[0015] FIG4 is a schematic diagram of the overall process of another data detection device provided by an embodiment of the present disclosure;

[0016] FIG5 is a schematic block diagram of the structure of a device connection apparatus provided by an embodiment of the present disclosure;

[0017] FIG6 is a schematic block diagram of the structure of a terminal device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present disclosure in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0019] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0020] It should be understood that the terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0021] The present disclosure provides a device connection method, a terminal device, and a storage medium. The method can be applied to a terminal device, which may be, but is not limited to, a smartphone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smartwatch, and the like.

[0022] As shown in Figure 1, the device connection method provided by the embodiment of the present disclosure can be applied to the application environment shown in Figure 1. The application environment includes a first terminal device 110 and a second terminal device 120, wherein the first terminal device 110 can communicate with the second terminal device 120 through a network. In an exemplary embodiment, the first terminal device 110 obtains an operation instruction; obtains the broadcast information of the second terminal device, and obtains the connection level of the second terminal device from the broadcast information; obtains the connection level of the first terminal device, and determines the connection status of the first terminal device according to the connection level of the first terminal device and the second terminal device; and controls the first terminal device to connect with the second terminal device according to the connection status of the first terminal device. Among them, the first terminal device 110 and the second terminal device 120 can be smart phones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, etc., but are not limited to these. The first terminal device 110 and the second terminal device 120 can be directly or indirectly connected through wired or wireless communication, and the embodiment of the present disclosure does not limit this.

[0023] Please refer to Figure 2, which is a flow chart of a device connection method provided by an embodiment of the present disclosure. This device connection method can quickly and conveniently connect multiple terminal devices through operation instructions, without requiring the user to perform unnecessary operations, thereby improving the efficiency and security of device connection and enhancing the user experience.

[0024] As shown in Figure 2, the device connection method may include S101 to S104, which is applied to the first terminal device. The first terminal device may be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, projection device, etc.

[0025] S101. Obtain an operation instruction, where the operation instruction is used to trigger a first terminal device and at least one second terminal device to initiate a device connection and send broadcast information, where the broadcast information includes a connection level.

[0026] The operation instruction may be a voice instruction, action instruction, or near-field communication instruction received by the first terminal device. The operation instruction may be issued by a user or another terminal device. The operation instruction is used to trigger the first terminal device and at least one second terminal device to initiate a device connection and send a broadcast message, which includes the connection level corresponding to the terminal device.

[0027] In an exemplary embodiment, the first terminal device and the second terminal device are both devices capable of responding to operation instructions, so that the first terminal device and the second terminal device initiate device connection and send broadcast information in response to the operation instructions.

[0028] In some embodiments, the operation instruction includes a voice instruction. After obtaining the voice instruction, keyword extraction processing is performed on the voice information in the voice instruction to obtain keyword information; based on a preset conversion rule, the keyword information is converted to obtain string information; if the string information is the same as the preset string information, broadcast information of the second terminal device is obtained, and the connection level of the second terminal device is obtained from the broadcast information. In this way, whether the first terminal device needs to establish a device connection can be accurately determined based on the operation instruction.

[0029] The keyword information may be key information in the voice information. The conversion rule may be a preset rule for converting words into character strings, and the keyword may be converted into a corresponding character string using the conversion rule. The character string information may be information composed of characters such as numbers and letters. The preset character string information may be pre-set character string information, specifically character string information obtained by converting a preset keyword using the conversion rule.

[0030] It should be noted that the user can be guided to enter preset keywords through the function setting interface of the terminal device, or the preset keywords can be directly preset, such as: "screen projection" and "connection".

[0031] The following description will first be made by taking the case where the operation instruction is a voice instruction as an example.

[0032] In an exemplary embodiment, voice information in a voice command is first obtained and converted to text to obtain text information corresponding to the voice information. Keyword extraction is then performed on the text to obtain keyword information. Character conversion is then performed on the keyword information based on preset conversion rules to obtain string information. A determination is made as to whether the string information is identical to preset string information. If so, a determination is made that a device connection is required for the first terminal device, broadcast information about the second terminal device is obtained, and the connection level of the second terminal device is obtained from the broadcast information. If the string information is different from the preset string information, a determination is made that a device connection is not required for the first terminal device, and the first terminal device does not initiate the connection process.

[0033] For example, the voice information in the voice command is first obtained and converted to text to obtain text information corresponding to the voice information. Keyword extraction is then performed on the text information to obtain keyword information, such as "cast screen." The information "cast screen" is converted to characters to obtain a string of information, such as "asd123." If the preset string information also includes "asd123," it is determined that the string information is the same as the preset string information. In this case, the first terminal device needs to establish a device connection and obtain the broadcast information of the second terminal device, and obtain the connection level of the second terminal device from the broadcast information.

[0034] For example, the voice information in the voice command is first obtained and converted to text to obtain text information corresponding to the voice information. Keyword extraction is then performed on the text to obtain keyword information, such as "device." Character conversion is performed on "device" to obtain a character string, such as "fgh456." If the preset character string does not include "fgh456," it is determined that the character string is different from the preset character string. Therefore, it is determined that the first terminal device does not need to establish a device connection, and the first terminal device does not initiate the connection process.

[0035] In other embodiments, the operation instructions may also include short-range communication instructions, such as instructions including Bluetooth, NFC, etc. The disclosed embodiments can achieve rapid connections between multiple terminal devices by triggering a connection through a single short-range communication, eliminating the need to manually place multiple devices in close proximity or operate multiple devices one by one, thereby improving the user experience.

[0036] However, for long-distance connection scenarios, such as a mobile phone wanting to connect to a rooftop camera, conventional short-range communication commands are no longer applicable to this connection scenario. However, the operation commands can be set as voice commands, so that connections between terminal devices at long distances can be achieved through voice information. Similarly, long-distance connection of devices can be achieved without the user performing any unnecessary operations, thereby improving the efficiency and security of device connections and enhancing the user experience.

[0037] It should be noted that the first terminal device can choose to connect via Bluetooth or LAN according to the device's own connection status. After the user issues a voice command, multiple terminal devices can receive the voice command almost simultaneously and complete the above process.

[0038] For example, taking Bluetooth as an example, if it is determined that the string information is the same as the preset string information, the first terminal device needs to connect the device, and the first terminal device starts the connection process. If the Bluetooth of the first terminal device is not turned on, the Bluetooth of the first terminal device will be turned on.

[0039] S102: Obtain broadcast information of the second terminal device, and obtain the connection level of the second terminal device from the broadcast information.

[0040] The broadcast information may include device information, such as the connection modes supported by the terminal device and the connection level of the terminal device, etc. The connection modes may include Bluetooth or LAN.

[0041] In an exemplary embodiment, if it is determined that device connection is required, the first terminal device and at least one second terminal device simultaneously generate and send broadcast information containing their own device information. At the same time, the first terminal device and at least one second terminal device can receive broadcast information sent by other devices.

[0042] In some embodiments, the broadcast information is parsed to obtain coded information corresponding to the second terminal device; the coded information is byte-extracted to obtain first byte information; and the connection level of the second terminal device is determined based on the first byte information. Thus, the connection level of the second terminal device can be accurately parsed and obtained.

[0043] The encoded information may consist of binary byte information to facilitate parsing the connection level. The first byte information may be the byte information corresponding to the first preset position in the encoded information of the second terminal device, which is used to store the byte information corresponding to the connection level. The connection level may represent the device connection priority of the terminal device, which is used to ensure that the terminal device tacitly enters the initiating connection or waiting for connection state during the connection process.

[0044] Exemplarily, the connection level is mainly divided into three levels: connection level 1, connection level 2 and connection level 3. Connection level 1 means that the device has the lowest connection level, and it mainly acts as a data receiver. During the process of initiating the connection, it must be in a waiting state for connection. For example, the connection level of terminal devices such as audio and projectors is generally connection level 1. Connection level 2 means that among the device connection levels, it can act as a data sender or a data receiver. During the process of initiating the connection, it may be in a connection initiating state or a connection waiting state. For example, the connection level of terminal devices such as TVs and tablets is generally connection level 2. Connection level 3 means that the device has the highest connection level, and it mainly acts as a data sender. During the process of initiating the connection, it must be in a connection initiating state most of the time. For example, the connection level of terminal devices such as mobile phones is generally connection level 3.

[0045] In an exemplary embodiment, the broadcast information sent by the second terminal device is parsed to obtain the encoding information corresponding to the second terminal device; the encoding information is byte-extracted and filtered to determine the first byte information from the encoding information; the first byte information is parsed to obtain a corresponding numerical value, and the connection level of the second terminal device is determined based on the numerical value. Exemplarily, the broadcast information sent by the second terminal device is parsed to obtain the encoding information corresponding to the second terminal device as 111682596030000. If the first preset position is the first 2 bits of the byte, the encoding information is byte-extracted and filtered to determine that the first byte information is the first 2 bits of the byte in the encoding information. The first 2 bits of the byte in the encoding information are used to store the connection level. Therefore, if the corresponding numerical value obtained by parsing the first byte information is a binary value of 11, it can be determined that the connection level of the second terminal device is connection level 3.

[0046] Exemplarily, the broadcast information sent by the second terminal device is parsed, and the coding information corresponding to the second terminal device is 101682596030123. The coded information is byte extracted and filtered to determine that the first byte information is the first 2 bits of the byte in the coded information, and the first 2 bits of the byte in the coded information are used to store the connection level. Therefore, the first byte information is parsed to obtain the corresponding numerical value of binary value 10, and it can be determined that the connection level of the second terminal device is connection level 2.

[0047] For example, taking Bluetooth as an example, if it is determined that device connection is required, the first terminal device and at least one second terminal device simultaneously generate and send broadcast information containing their own device information based on the Bluetooth protocol. At the same time, the first terminal device and at least one second terminal device start scanning for broadcasts and receive broadcast information sent by other devices.

[0048] It should be noted that the broadcasting and scanning processes of the first terminal device and the at least one second terminal device can be performed synchronously.

[0049] S103: Acquire a connection level of the first terminal device, and determine a connection state of the first terminal device according to the connection levels of the first terminal device and the second terminal device.

[0050] Since the first terminal device also generates broadcast information corresponding to its device, the connection level of the first terminal device can be obtained by parsing the broadcast information generated by itself, or it can be pre-set. The connection status of the first terminal device can include a connection initiating state and a connection waiting state. The connection initiating state is used to indicate that the first terminal device actively initiates a device connection with the second terminal device; the connection waiting state is used to indicate that the first terminal device passively waits for the second terminal device to initiate a device connection with itself.

[0051] In some embodiments, it is determined whether the connection level of the first terminal device is higher than the connection level of the second terminal device; if the connection level of the first terminal device is higher than the connection level of the second terminal device, the connection state of the first terminal device is determined to be a connection initiating state. In this way, the connection state of the first terminal device can be accurately determined.

[0052] For example, if the connection level of the first terminal device is determined to be connection level 3, and the connection level of the second terminal device is determined to be connection level 2, it can be determined that the connection level of the first terminal device is higher than the connection level of the second terminal device, and the connection state of the first terminal device can be determined to be the connection initiating state.

[0053] In some embodiments, it is determined whether the connection level of the first terminal device is higher than the connection level of the second terminal device; if the connection level of the first terminal device is lower than the connection level of the second terminal device, the connection state of the first terminal device is determined to be a waiting state. In this way, the connection state of the first terminal device can be accurately determined.

[0054] For example, if the connection level of the first terminal device is determined to be connection level 2, and the connection level of the first terminal device is determined to be connection level 3, it can be determined that the connection level of the first terminal device is higher than the connection level of the second terminal device, and the connection state of the first terminal device can be determined to be waiting for connection state.

[0055] In some embodiments, a determination is made as to whether the connection level of a first terminal device is higher than the connection level of a second terminal device. If the connection level of the first terminal device is equal to the connection level of the second terminal device, the broadcast information is parsed to obtain the timestamp information corresponding to the second terminal device. The timestamp information corresponding to the first terminal device is obtained, and the connection status of the first terminal device is determined based on the timestamp information corresponding to the first and second terminal devices. This allows the connection status of the first terminal device to be accurately determined when the connection level of the first terminal device is the same as the connection level of the second terminal device, thereby preventing the terminal device from stopping the device connection.

[0056] The timestamp information can be obtained by parsing the corresponding byte information in the encoding information.

[0057] In an exemplary embodiment, if the connection level of the first terminal device is equal to the connection level of the second terminal device, the broadcast information of the second terminal device is parsed to obtain the timestamp information corresponding to the second terminal device; the timestamp information corresponding to the first terminal device is obtained, and the timestamp information corresponding to the first terminal device and the timestamp information corresponding to the second terminal device are compared to determine the priority of the first terminal device and the second terminal device, thereby determining the connection status of the first terminal device.

[0058] In some embodiments, byte extraction processing is performed on the timestamp information corresponding to the first terminal device to obtain second byte information; byte extraction processing is performed on the timestamp information corresponding to the second terminal device to obtain third byte information; a byte comparison result is generated based on the second byte information and the third byte information, and the connection status of the first terminal device is determined based on the byte comparison result. In this way, the corresponding bytes can be accurately extracted, thereby accurately determining the connection status of the first terminal device.

[0059] The second byte information may be the byte information corresponding to the second preset position in the timestamp information of the first terminal device, and is used to store the byte information corresponding to the recorded timestamp information. The third byte information may be the byte information corresponding to the third preset position in the timestamp information of the second terminal device, and is used to store the byte information corresponding to the recorded timestamp information. The byte comparison result may be a byte size comparison result of the second byte information and the third byte information.

[0060] In an exemplary embodiment, byte extraction processing is performed on the timestamp information corresponding to the first terminal device and filtered to obtain second byte information; byte extraction processing is performed on the timestamp information corresponding to the second terminal device and filtered to obtain third byte information, a byte comparison result is generated based on the second byte information and the third byte information, and based on preset rules, the connection status of the first terminal device is determined according to the byte comparison result.

[0061] Exemplarily, at this time, the broadcast information sent by the first terminal device is parsed, and the timestamp information corresponding to the first terminal device is 1682596030000. If the second preset position is bytes 9-12 bits, the second byte information can be 3000. The second byte information can be converted into binary 10101111000100 and stored in the 14 bits 3-16 of the encoded information. Similarly, the broadcast information sent by the second terminal device is parsed, and the timestamp information corresponding to the second terminal device is 1682596030123. If the third preset position is bytes 9-12 bits, the third byte information can be 3012. The third byte information can be converted into binary 101111000100 and stored in the 14 bits 3-16 of the encoded information. Finally, the sizes of the second byte information and the third byte information are compared. At this time, the second byte information is smaller than the third byte information. If the preset rule is that the earlier the terminal device, the higher the priority, then the connection state of the first terminal device is determined to be the waiting connection state; if the preset rule is that the later the terminal device, the higher the priority, then the connection state of the first terminal device is determined to be the initiating connection state.

[0062] It should be noted that to avoid encountering the same connection level, the 9th to 12th bits of the timestamp at the time of the broadcast can be used as auxiliary information and stored in the 14 bits 3-16. The 9th to 12th bits of the timestamp are used here because the timestamp with millisecond accuracy has 13 bits, and 12 bits of accuracy is sufficient to fully represent the time difference. The preset rules can be determined by the user to determine the connection status of the first terminal device when the connection level of the first terminal device and the second terminal device are the same.

[0063] It should also be noted that the timestamp information of the terminal device can be directly written into the broadcast information, or the 9th to 12th bits of the timestamp information of the terminal device can be converted into binary numbers and written into the broadcast information, which is not specifically limited here.

[0064] S104: Control the first terminal device to connect to the second terminal device according to the connection status of the first terminal device.

[0065] In an exemplary embodiment, the first terminal device may be controlled to connect to the second terminal device according to whether the connection state of the first terminal device is in a connection initiating state or a connection waiting state.

[0066] In some embodiments, if the connection state of the first terminal device is initiating a connection, a device connection instruction is sent to the second terminal device based on the address information corresponding to the second terminal device, thereby connecting the first terminal device to the second terminal device. If the connection state of the first terminal device is waiting for a connection, the first terminal device is controlled to be in a signal receiving state to receive the device connection instruction sent by the second terminal device, thereby connecting the first terminal device to the second terminal device. In this way, it can be determined that one of the terminal devices is the active side of the device connection, and the device connection instruction is sent to the other terminal device to connect the first terminal device to the second terminal device.

[0067] The address information may include the Bluetooth address or local area network address of the second terminal device. The address information may be stored in a broadcast message or sent to the first terminal device via other means, without specific limitation. The device connection instruction is used to establish a device connection with the corresponding terminal device. The signal reception state may be the device being inactive.

[0068] In an exemplary embodiment, if the connection state of the first terminal device is a connection initiating state, the address information corresponding to the second terminal device can be parsed from the broadcast information, and a device connection instruction can be sent to the second terminal device based on the address information to connect the first terminal device to the second terminal device.

[0069] In an exemplary embodiment, if the connection state of the first terminal device is the waiting state, the first terminal device is controlled to be in a signal receiving state to receive a device connection instruction sent by the second terminal device, so that the first terminal device is connected to the second terminal device.

[0070] In some embodiments, as shown in FIG3 , the device connection method proposed in one embodiment of the present disclosure is described from the overall process of device connection, including S201 to S213 . For example, the first terminal device is a mobile phone, the second terminal device is a tablet computer, and the communication method is Bluetooth.

[0071] At this time, the mobile phone and tablet computer receive the voice connection information at the same time and match it with the built-in keywords of the device. After the match is successful, the following process will be entered.

[0072] S201. The default connection level of the mobile phone is connection level 3. The first two bits of the byte used to store the connection level are recorded as 11. The timestamp at that time is obtained as 1682596030000. Bits 9-12 are taken as 3000, converted to binary 101110111000 and stored in 14 bits. These two bytes are then stored in the request broadcast of the mobile phone.

[0073] S202. The default connection level of the tablet is 2. The first two bits of the byte used to store the connection level are recorded as 10. The timestamp at that time is obtained as 1682596030123. 9-12 are taken as 3012, converted to binary 101111000100 and stored in 14 bits. These two bytes are then stored in the request broadcast of the tablet.

[0074] S203: The mobile phone sends a request broadcast based on the Bluetooth protocol.

[0075] S204: The tablet computer sends a request broadcast based on the Bluetooth protocol.

[0076] S205. The mobile phone starts scanning for broadcasts.

[0077] S206: The tablet computer starts scanning for broadcasts.

[0078] S207: The mobile phone or tablet computer receives the request broadcast.

[0079] S208. After receiving the first request broadcast, the mobile phone or tablet computer will continue to scan for 5 seconds to confirm whether there is a third device.

[0080] S209: The mobile phone or tablet computer parses the received request broadcast to obtain connection level information and information required for device connection, such as address information.

[0081] S210. The mobile phone or tablet computer compares the parsed connection level with the device's own connection level.

[0082] S211. The device with the highest connection level (mobile phone) initiates a connection, and other devices (tablets) enter a waiting state for connection.

[0083] S212. The mobile phone sends a device connection request according to the Bluetooth address of the tablet computer.

[0084] S213. The tablet computer enters a waiting state, waiting for the mobile phone to connect.

[0085] In some embodiments, as shown in FIG4 , the following supplement is made for the case of more than two devices: The following figure shows a connection scenario of three devices: a mobile phone, a TV, and a stereo. The main difference from connecting two devices is receiving broadcasts. The device connection method proposed in an embodiment of the present disclosure is introduced from the overall process of device connection, including S301-S311. Take the first terminal device as a mobile phone, the second terminal device A as a TV, the second terminal device B as a stereo, and the communication method as Bluetooth as an example. The connection process will be described below starting from receiving broadcasts.

[0086] S301. Each device (mobile phone, TV, and audio) sends a request broadcast.

[0087] S302: The mobile phone receives the broadcast from the TV and parses the connection level information in the request broadcast sent by the TV.

[0088] S303. After receiving the first broadcast, the mobile phone will continue to scan for 5 seconds.

[0089] S304: The mobile phone receives a request broadcast from the speaker.

[0090] S305: The mobile phone scan broadcast ends, the mobile phone connection level is the highest, and the mobile phone initiates a connection to other devices.

[0091] S306. The TV broadcasts the mobile phone.

[0092] S307. After receiving the first broadcast, the TV will continue scanning for 5 seconds.

[0093] S308: The TV receives the request broadcast from the audio system.

[0094] S309: The TV scan broadcast ends, the mobile phone connection level is the highest, and the TV enters the waiting state, waiting for connection.

[0095] S310, the audio and TV processes are basically the same, entering the waiting state for connection.

[0096] S311. Finally, the mobile phone completes the connection with the TV and speakers.

[0097] The disclosed embodiments provide a device connection method that obtains an operation instruction and broadcast information from a second terminal device, obtains the connection level of the second terminal device from the broadcast information, obtains the connection level of a first terminal device, determines the connection status of the first terminal device based on the connection levels of the first and second terminal devices, and controls the connection between the first and second terminal devices based on the connection status of the first terminal device. This method allows for quick and convenient connection between multiple terminal devices through operation instructions, eliminating the need for unnecessary user operations, improving the efficiency and security of device connections, and enhancing the user experience.

[0098] Please refer to FIG. 5 , which is a schematic block diagram of a device connection apparatus provided in an embodiment of the present disclosure. The device connection apparatus may be configured in a server to execute the aforementioned device connection method.

[0099] As shown in FIG5 , the device connection apparatus 400 includes: a voice acquisition module 401 , a connection level determination module 402 , a connection state determination module 403 and a device connection module 404 .

[0100] The voice acquisition module 401 is configured to acquire an operation instruction, where the operation instruction is used to trigger the first terminal device and at least one second terminal device to initiate a device connection and send broadcast information, where the broadcast information includes a connection level.

[0101] The connection level determination module 402 is configured to obtain broadcast information of the second terminal device and obtain the connection level of the second terminal device from the broadcast information.

[0102] The connection status determination module 403 is configured to obtain a connection level of the first terminal device and determine a connection status of the first terminal device according to the connection levels of the first terminal device and the second terminal device.

[0103] The device connection module 404 is configured to control the first terminal device to connect to the second terminal device according to the connection status of the first terminal device.

[0104] The connection level determination module 402 is further configured to parse the broadcast information to obtain the coding information corresponding to the second terminal device; perform byte extraction processing on the coding information to obtain first byte information; and determine the connection level of the second terminal device based on the first byte information.

[0105] The connection status determination module 403 is also configured to determine whether the connection level of the first terminal device is higher than the connection level of the second terminal device; if the connection level of the first terminal device is higher than the connection level of the second terminal device, the connection status of the first terminal device is determined to be a connection initiating state.

[0106] The connection status determining module 403 is further configured to determine that the connection status of the first terminal device is a waiting connection status if the connection level of the first terminal device is lower than the connection level of the second terminal device.

[0107] The connection status determination module 403 is also configured to parse the broadcast information to obtain the timestamp information corresponding to the second terminal device if the connection level of the first terminal device is equal to the connection level of the second terminal device; obtain the timestamp information corresponding to the first terminal device, and determine the connection status of the first terminal device based on the timestamp information corresponding to the first terminal device and the second terminal device.

[0108] The connection status determination module 403 is further configured to perform byte extraction processing on the timestamp information corresponding to the first terminal device to obtain second byte information; perform byte extraction processing on the timestamp information corresponding to the second terminal device to obtain third byte information; generate a byte comparison result based on the second byte information and the third byte information, and determine the connection status of the first terminal device based on the byte comparison result.

[0109] The device connection module 404 is further configured to, if the connection state of the first terminal device is the initiating connection state, send a device connection instruction to the second terminal device according to the address information corresponding to the second terminal device, so that the first terminal device is connected to the second terminal device; if the connection state of the first terminal device is the waiting connection state, control the first terminal device to be in a signal receiving state to receive the device connection instruction sent by the second terminal device, so that the first terminal device is connected to the second terminal device.

[0110] The voice verification module 405 is configured to perform keyword extraction processing on the voice information in the voice command to obtain keyword information; based on a preset conversion rule, perform conversion processing according to the keyword information to obtain character string information; if the character string information is the same as the preset character string information, obtain the broadcast information of the second terminal device, and obtain the connection level of the second terminal device from the broadcast information.

[0111] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0112] The methods and apparatus of the present disclosure can be used in a wide variety of general-purpose or specialized computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer devices, network PCs, minicomputers, mainframe computers, and distributed computing environments that include any of the above.

[0113] Please refer to FIG6 , which is a schematic block diagram of the structure of a terminal device provided in an embodiment of the present disclosure.

[0114] As shown in FIG6 , a terminal device 500 may include a processor 501 and a memory 502 , and the processor 501 and the memory 502 are connected via a bus 503 , such as an I 2 C (Inter-integrated Circuit) bus.

[0115] In an exemplary embodiment, the processor 501 can be used to provide computing and control capabilities to support the operation of the entire terminal device. The processor 501 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0116] In an exemplary embodiment, the memory 502 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.

[0117] Those skilled in the art will understand that the structure shown in FIG6 is merely a block diagram of a partial structure related to the embodiment of the present disclosure, and does not constitute a limitation on the terminal device to which the embodiment of the present disclosure is applied. The specific server may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0118] The processor 501 is configured to run a computer program stored in the memory and implement any one of the device connection methods provided in the embodiments of the present disclosure when executing the computer program.

[0119] In one embodiment, the processor 501 is used to run a computer program stored in a memory, and implement the following steps when executing the computer program: obtaining an operation instruction, wherein the operation instruction is used to trigger the first terminal device and at least one second terminal device to start a device connection and send broadcast information, wherein the broadcast information includes a connection level; obtaining the broadcast information of the second terminal device, and obtaining the connection level of the second terminal device from the broadcast information; obtaining the connection level of the first terminal device, and determining the connection status of the first terminal device based on the connection levels of the first terminal device and the second terminal device; and controlling the first terminal device to connect to the second terminal device based on the connection status of the first terminal device.

[0120] In one embodiment, when the processor 501 obtains the connection level of the second terminal device from the broadcast information, it is used to implement: parsing the broadcast information to obtain the coding information corresponding to the second terminal device; performing byte extraction processing on the coding information to obtain first byte information; and determining the connection level of the second terminal device based on the first byte information.

[0121] In one embodiment, when the processor 501 is implementing determining the connection status of the first terminal device based on the connection levels of the first terminal device and the second terminal device, it is used to implement: determining whether the connection level of the first terminal device is higher than the connection level of the second terminal device; if the connection level of the first terminal device is higher than the connection level of the second terminal device, determining that the connection status of the first terminal device is a connection initiating status.

[0122] In one embodiment, after determining whether the connection level of the first terminal device is higher than the connection level of the second terminal device, the processor 501 is used to implement: if the connection level of the first terminal device is lower than the connection level of the second terminal device, determining that the connection state of the first terminal device is a waiting connection state.

[0123] In one embodiment, after determining whether the connection level of the first terminal device is higher than the connection level of the second terminal device, the processor 501 is used to implement: if the connection level of the first terminal device is equal to the connection level of the second terminal device, parsing the broadcast information to obtain the timestamp information corresponding to the second terminal device; obtaining the timestamp information corresponding to the first terminal device, and determining the connection status of the first terminal device based on the timestamp information corresponding to the first terminal device and the second terminal device.

[0124] In one embodiment, when determining the connection status of the first terminal device based on the timestamp information corresponding to the first terminal device and the second terminal device, the processor 501 is used to implement: performing byte extraction processing on the timestamp information corresponding to the first terminal device to obtain second byte information; performing byte extraction processing on the timestamp information corresponding to the second terminal device to obtain third byte information; generating a byte comparison result based on the second byte information and the third byte information, and determining the connection status of the first terminal device based on the byte comparison result.

[0125] In one embodiment, when the processor 501 controls the first terminal device to connect to the second terminal device according to the connection status of the first terminal device, it is used to implement: if the connection status of the first terminal device is a connection initiating status, sending a device connection instruction to the second terminal device according to the address information corresponding to the second terminal device, so that the first terminal device is connected to the second terminal device; if the connection status of the first terminal device is a connection waiting status, controlling the first terminal device to be in a signal receiving state to receive the device connection instruction sent by the second terminal device, so that the first terminal device is connected to the second terminal device.

[0126] In one embodiment, the operation instruction includes a voice instruction, and the processor 501 is further used to implement: performing keyword extraction processing on the voice information in the voice instruction to obtain keyword information; based on a preset conversion rule, performing conversion processing according to the keyword information to obtain character string information; if the character string information is the same as the preset character string information, obtaining the broadcast information of the second terminal device, and obtaining the connection level of the second terminal device from the broadcast information.

[0127] It should be noted that those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the terminal device described above can refer to the corresponding process in the aforementioned terminal capability reporting method embodiment, and will not be repeated here.

[0128] The embodiments of the present disclosure also provide a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any device connection method provided in the description of the embodiments of the present disclosure.

[0129] The storage medium may be an internal storage unit of the terminal device described in the aforementioned embodiment, such as a hard disk or memory of the terminal device. The storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device.

[0130] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable, and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media generally embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0131] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0132] The serial numbers of the embodiments of the present disclosure are for description only and do not represent the advantages or disadvantages of the embodiments. The above description is only a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.

Claims

1. A device connection method, applied to a first terminal device, the method comprising: Acquire an operation instruction, where the operation instruction is used to trigger the first terminal device and at least one second terminal device to start a device connection and send broadcast information, where the broadcast information includes a connection level; Acquire broadcast information of the second terminal device, and acquire a connection level of the second terminal device from the broadcast information; Acquire a connection level of the first terminal device, and determine a connection state of the first terminal device according to the connection levels of the first terminal device and the second terminal device; According to the connection state of the first terminal device, the first terminal device is controlled to connect to the second terminal device.

2. The method according to claim 1, wherein: The acquiring the connection level of the second terminal device from the broadcast information includes: Parsing the broadcast information to obtain coding information corresponding to the second terminal device; Performing byte extraction processing on the encoded information to obtain first byte information; The connection level of the second terminal device is determined according to the first byte information.

3. The method according to claim 1, wherein: The determining the connection state of the first terminal device according to the connection level of the first terminal device and the second terminal device includes: determining whether a connection level of the first terminal device is higher than a connection level of the second terminal device; If the connection level of the first terminal device is higher than the connection level of the second terminal device, it is determined that the connection state of the first terminal device is a connection initiating state.

4. The method according to claim 3, wherein: After determining whether the connection level of the first terminal device is higher than the connection level of the second terminal device, the method further includes: If the connection level of the first terminal device is lower than the connection level of the second terminal device, it is determined that the connection state of the first terminal device is a waiting state.

5. The method according to claim 3, wherein: After determining whether the connection level of the first terminal device is higher than the connection level of the second terminal device, the method further includes: If the connection level of the first terminal device is equal to the connection level of the second terminal device, parsing the broadcast information to obtain timestamp information corresponding to the second terminal device; Acquire timestamp information corresponding to the first terminal device, and determine the connection status of the first terminal device according to the timestamp information corresponding to the first terminal device and the second terminal device.

6. The method according to claim 5, wherein: The determining, according to timestamp information corresponding to the first terminal device and the second terminal device, a connection state of the first terminal device includes: Performing byte extraction processing on the timestamp information corresponding to the first terminal device to obtain second byte information; Performing byte extraction processing on the timestamp information corresponding to the second terminal device to obtain third byte information; A byte comparison result is generated according to the second byte information and the third byte information, and a connection state of the first terminal device is determined according to the byte comparison result.

7. The method according to claim 1, wherein: The controlling the first terminal device to connect to the second terminal device according to the connection state of the first terminal device includes: If the connection state of the first terminal device is the connection initiation state, sending a device connection instruction to the second terminal device according to the address information corresponding to the second terminal device, so that the first terminal device is connected to the second terminal device; If the connection state of the first terminal device is the waiting connection state, the first terminal device is controlled to be in a signal receiving state to receive a device connection instruction sent by the second terminal device, so that the first terminal device is connected to the second terminal device.

8. The method according to claim 1, wherein: The operation instruction includes a voice instruction, and the method further includes: Performing keyword extraction processing on the voice information in the voice command to obtain keyword information; Based on a preset conversion rule, the keyword information is converted to obtain character string information; If the character string information is the same as the preset character string information, the broadcast information of the second terminal device is obtained, and the connection level of the second terminal device is obtained from the broadcast information.

9. A terminal device, comprising: A processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the device connection method according to any one of claims 1 to 8 are realized.

10. A storage medium for computer-readable storage, wherein: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the device connection method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Device connection method and apparatus

    CN109274563A

  • Communication method and related device

    CN113366869A

  • Distributed system decentralization method and decentralized distributed system

    CN115665165A

  • Equipment connection method, terminal equipment and storage medium

    CN116634527A

  • Communication terminal device, information communication system, recording medium, and information communication method

    US20180323998A1