Communication connection method and apparatus, device, and storage medium
Patent Information
- Application Number
- PCT/CN2023/090451
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-04-24
- Publication Date
- 2025-10-02
AI Technical Summary
The existing Bluetooth connection and NFC connection processes require users to operate manually, which results in poor convenience and affects the user experience. In addition, the just work pairing method has security risks.
By receiving the pairing code information broadcast by the second device, establishing a communication connection based on the code request, and using the first key to encrypt and decrypt the pairing code, the pairing code is prevented from being exposed to the communication environment and a senseless connection is achieved.
It improves the efficiency and convenience of senseless connections between devices, while also improving the security of communication connections and avoiding the risk of malicious interception of pairing codes.
Smart Images

Figure CN2023090451_02102025_PF_FP_ABST
Abstract
Description
Communication connection method, device, equipment and storage medium Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a communication connection method, apparatus, device, and storage medium. Background Art
[0002] In communication systems, devices often need to establish a communication connection (such as a Bluetooth connection or Near Field Communication (NFC) connection) to conduct low-cost, low-power, private communication. However, establishing a Bluetooth or NFC connection between devices often requires the user to perform some operations, such as comparing the connection pairing code or manually clicking a "Confirm Connection" button. This makes the Bluetooth or NFC connection process less convenient and affects the user experience.
[0003] Summary of the Invention
[0004] The present disclosure provides a communication connection method, apparatus, device, and storage medium.
[0005] In a first aspect, an embodiment of the present disclosure provides a communication connection method, including:
[0006] receiving first information broadcast by a second device, where the second device is a device to be communicated with by the first device, and the first information includes a pairing code, where the pairing code is used for the first device to connect to the second device;
[0007] A request is made to the second device to establish a communication connection based on the pairing code.
[0008] In a second aspect, an embodiment of the present disclosure provides a communication connection method, including:
[0009] Broadcasting first information, wherein the first information includes a pairing code; the pairing code is used to connect to the second device;
[0010] In response to determining that the first device requests to connect to the second device, the first device is authenticated.
[0011] In a third aspect, an embodiment of the present disclosure provides a communication device, including:
[0012] a transceiver module, configured to receive first information broadcast by a second device, the second device being the device to be communicated with by the first device, the first information including a pairing code used to connect the first device to the second device;
[0013] A processing module is configured to request the second device to establish a communication connection based on the pairing code.
[0014] In a fourth aspect, an embodiment of the present disclosure provides a communication device, including:
[0015] a transceiver module, configured to broadcast first information, wherein the first information includes a pairing code; the pairing code is used to connect to the second device;
[0016] The processing module is configured to verify the first device in response to determining that the first device requests to connect to the second device.
[0017] In a fifth aspect, an embodiment of the present disclosure provides a communication device, which includes a processor. When the processor calls a computer program in a memory, the method described in any one of the first to second aspects above is executed.
[0018] In a sixth aspect, an embodiment of the present disclosure provides a communication device, which includes a processor and a memory, in which a computer program is stored; the processor executes the computer program stored in the memory so that the communication device executes the method described in any one of the first to second aspects above.
[0019] In the seventh aspect, an embodiment of the present disclosure provides a communication device, which includes a processor and an interface circuit, wherein the interface circuit is used to receive code instructions and transmit them to the processor, and the processor is used to run the code instructions to enable the device to execute the method described in any one of the first to second aspects above.
[0020] In an eighth aspect, an embodiment of the present disclosure provides a communication system, which includes the communication device described in the third aspect or the fourth aspect, or the system includes the communication device described in the fifth aspect, or the system includes the communication device described in the sixth aspect, or the system includes the communication device described in the seventh aspect.
[0021] In a ninth aspect, an embodiment of the present disclosure provides a computer-readable storage medium for storing instructions for the above-mentioned network device, and when the instructions are executed, the terminal executes the method described in any one of the above-mentioned first to second aspects.
[0022] In a tenth aspect, the present disclosure further provides a computer program product comprising a computer program, which, when executed on a computer, enables the computer to execute the method described in any one of the first to second aspects above.
[0023] In an eleventh aspect, the present disclosure provides a chip system comprising at least one processor and an interface for supporting a network device in implementing the functions described in any one of the methods described in aspects one to two, such as determining or processing at least one of the data and information involved in the method. In one possible design, the chip system further comprises a memory for storing computer programs and data necessary for the source slave node. The chip system may be composed of a chip or may include a chip and other discrete components.
[0024] In a twelfth aspect, the present disclosure provides a computer program, which, when executed on a computer, enables the computer to execute the method described in any one of the first to second aspects above. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The above and / or additional aspects and advantages of the present disclosure will become apparent and readily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0026] FIG1 is a schematic diagram of the architecture of some communication systems provided by embodiments of the present disclosure;
[0027] FIG2a is a schematic flow chart of a communication connection method provided by another embodiment of the present disclosure;
[0028] FIG2 b is a schematic flow chart of a communication connection method provided by another embodiment of the present disclosure;
[0029] FIG3 is a flow chart of a communication connection method provided in yet another embodiment of the present disclosure;
[0030] FIG4a is a schematic flow chart of a communication connection method provided in yet another embodiment of the present disclosure;
[0031] FIG4 b is a flow chart of a communication connection method provided in yet another embodiment of the present disclosure;
[0032] FIG5 is a flow chart of a communication connection method provided in yet another embodiment of the present disclosure;
[0033] FIG6 is a flow chart of a communication connection method provided in yet another embodiment of the present disclosure;
[0034] FIG7 is a flow chart of a communication connection method provided in yet another embodiment of the present disclosure;
[0035] FIG8 is a flow chart of a communication connection method provided in yet another embodiment of the present disclosure;
[0036] FIG9 is a schematic structural diagram of a communication device provided by an embodiment of the present disclosure;
[0037] FIG10 is a schematic structural diagram of a communication device provided by an embodiment of the present disclosure;
[0038] FIG11 is a block diagram of a communication device provided by an embodiment of the present disclosure;
[0039] FIG12 is a schematic structural diagram of a chip provided in accordance with an embodiment of the present disclosure. DETAILED DESCRIPTION
[0040] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0041] The terms used in the embodiments of the present disclosure are for the purpose of describing specific embodiments only and are not intended to limit the embodiments of the present disclosure. The singular forms "a," "an," and "the" used in the embodiments of the present disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0042] It should be understood that although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present disclosure, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of the embodiments of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0043] The 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. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be understood as limiting the present disclosure.
[0044] To ensure seamless device connection without user intervention, the related art proposes a "just work" pairing method. This method, defined by the Bluetooth protocol, requires no user intervention and does not require a pairing code. However, the "just work" pairing method is susceptible to man-in-the-middle attacks and poses significant security risks.
[0045] To this end, the present disclosure provides a non-sensing communication connection method with higher security.
[0046] In order to better understand a communication connection method disclosed in an embodiment of the present disclosure, the communication system to which the embodiment of the present disclosure is applicable is first described below.
[0047] Please refer to Figure 1, which is a schematic diagram of the architecture of a communication system provided by an embodiment of the present disclosure. The communication system may include but is not limited to at least one first device, at least one server and at least one second device, wherein the first device may be a terminal device, a wearable device or a vehicle, and the second device may be a device to which the first device is to communicate. Optionally, the second device may be a terminal device, a wearable device or a vehicle. In addition, the number and form of devices shown in Figure 1 are only for example and do not constitute a limitation on the embodiment of the present disclosure. The application may include one or more first devices, or one or more second devices. The communication system shown in Figure 1 takes an example including a first device, which is a terminal device, a second device, and a vehicle.
[0048] It should be noted that the technical solutions of the embodiments of the present disclosure can be applied to various communication systems, such as long-term evolution (LTE) systems, fifth-generation (5G) mobile communication systems, 5G new radio (NR) systems, or other future new mobile communication systems.
[0049] The terminal device in the embodiments of the present disclosure can be an entity on the user side for receiving or transmitting signals, such as a mobile phone. The terminal device can also be called a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The terminal device can be a car with communication function, a smart car, a mobile phone, a wearable device, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal, an augmented reality (AR) terminal, a wireless terminal in industrial control (industrial control), a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid (smart grid), a wireless terminal in transportation safety (transportation safety), a wireless terminal in smart city (smart city), a wireless terminal in smart home (smart home), etc. The embodiments of the present disclosure do not limit the specific technology and specific device form adopted by the terminal device.
[0050] It can be understood that the communication system described in the embodiment of the present disclosure is for the purpose of more clearly illustrating the technical solution of the embodiment of the present disclosure, and does not constitute a limitation on the technical solution provided by the embodiment of the present disclosure. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solution provided by the embodiment of the present disclosure is also applicable to similar technical problems.
[0051] In addition, in order to facilitate understanding of the embodiments of the present disclosure, the following points are explained.
[0052] First, in the present disclosure, unless there is any contradiction, each step in any embodiment or example can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a certain embodiment or example can also be implemented as an independent embodiment, and the order of the steps in a certain embodiment or example can be arbitrarily exchanged. In addition, the optional methods or optional examples in a certain embodiment or example can be arbitrarily combined; in addition, the various embodiments or examples can be arbitrarily combined. For example, some or all steps of different embodiments or examples can be arbitrarily combined, and a certain embodiment or example can be arbitrarily combined with the optional methods or optional examples of other embodiments or examples.
[0053] Second, regarding the description methods of the present disclosure such as "A or B", "A and / or B", "at least one of A and B", "A in one case, B in another case", "in response to one case A, in response to another case B", etc., at least one of the following schemes may be included according to the situation: executing A independently of B, that is, A in some embodiments; executing B independently of A, that is, B in some embodiments; selectively executing A and B, that is, selecting to execute from A and B in some embodiments; executing both A and B, that is, A and B in some embodiments.
[0054] Third, each element, each row, or each column in the table involved in the present disclosure can be implemented as an independent embodiment, and the combination of any elements, any rows, and any columns can also be implemented as an independent embodiment.
[0055] Fourth, in some implementation modes or examples, “including A”, “comprising A”, “used to indicate A” and “carrying A” in this disclosure can be interpreted as directly carrying A or indirectly indicating A.
[0056] Fifth, in some implementation modes or examples, "in response to...", "in the case of...", "at the time of...", "when...", "if...", "if...", etc. in the present disclosure can be replaced with each other.
[0057] FIG2a is a flow chart of a communication connection method provided by an embodiment of the present disclosure. The method is executed by a first device. As shown in FIG2a , the communication connection method may include the following steps:
[0058] Step 201a: Receive first information broadcast by a second device, where the first information includes a pairing code.
[0059] Optionally, in some embodiments, the second device may be a device to which the first device is to be connected for communication. For example, the second device may be a device to which the first device is to be connected via Bluetooth and / or NFC.
[0060] Optionally, in some embodiments, the first information may include a pairing code. Optionally, the pairing code may be a pairing code corresponding to the second device, and the pairing code is used to connect the first device to the second device.
[0061] Step 202a: Request the second device to establish a communication connection based on the pairing code.
[0062] Optionally, in some embodiments, the method in which a first device requests a second device to establish a communication connection based on a pairing code may include the following steps: transmitting the pairing code in a connection establishment request to the second device to request the second device to establish a communication connection. Optionally, after receiving the connection establishment request from the first device, the second device may first verify the first device based on the pairing code in the connection establishment request, and upon successful verification, establish a communication connection with the first device. A detailed description of the second device verifying the first device will be provided in subsequent embodiments related to the second device.
[0063] Referring to the contents of steps 201a-202a above, it can be seen that in the communication connection method of the embodiment of the present disclosure, when the first device wants to connect to the second device, the first device can obtain the first information broadcast by the second device, which includes a pairing code. The first device can then directly achieve communication connection with the second device based on the pairing code. Therefore, it can be seen that the communication connection method of the embodiment of the present disclosure is achieved by the interaction between the first device and the second device, without the need for user intervention. Therefore, the present disclosure provides a method for seamless connection between devices, which is highly efficient, convenient to operate, and can also improve the user experience.
[0064] In summary, in the communication connection method provided in the embodiment of the present disclosure, a first device receives a first message broadcast by a second device, wherein the second device includes a pairing code; the pairing code is used to connect the first device to the second device; and the first device requests the second device to establish a communication connection based on the pairing code. It can be seen that the communication connection method in the embodiment of the present disclosure is implemented by the interaction between the first device and the second device, without the need for user intervention. Therefore, the present disclosure provides a method for seamless connection between devices, which is highly efficient, convenient to operate, and can also enhance the user experience.
[0065] FIG2 b is a flow chart of a communication connection method provided by an embodiment of the present disclosure. The method is executed by a first device. As shown in FIG2 , the communication connection method may include the following steps:
[0066] Step 201b: Receive the first information broadcast by the second device, where the first information is information obtained by encrypting the pairing code using the first key.
[0067] Optionally, in some embodiments, the second device may be a device to which the first device is to be connected for communication. For example, the second device may be a device to which the first device is to be connected via Bluetooth and / or NFC.
[0068] Optionally, in some embodiments, the first information may be information obtained by encrypting the pairing code using the first key. Optionally, the first key may be pre-configured in the first device and the second device. For example, the first key may be generated by a server and then sent to the first device and the second device; or, the first key may be pre-written to the first device or the second device through factory preset or other trusted means. Optionally, the pairing code may be the pairing code corresponding to the second device, which is used to connect the first device to the second device.
[0069] Optionally, in some embodiments, the method for the second device to encrypt the pairing code using the first key may include the following steps:
[0070] Step 1: The second device randomly generates a decimal pairing code (000000-999999) and converts the decimal pairing code into a hexadecimal (0x000000-0x0f423f) 4-byte Big-Endian plaintext pairing code plainPairingCode;
[0071] Step 2: The second device randomly generates a 4-byte random number IV or agrees on a fixed 4-byte IV with the first device in advance, and uses the SHA256 algorithm to obtain a nonce based on the IV;
[0072] Step 3: Use the first key (secret) to encrypt the plaintext pairing code plainPairingCode and nonce using the AES-128-CTR algorithm to obtain a 4-byte ciphertext pairing code cipherPairingCode; where cipherPairingCode = AES_128_CTR (secret, plainPairingCode, nonce). This cipherPairingCode can be understood as the first information mentioned above.
[0073] Step 4: If the IV is a random number, the IV and the cipherPairingCode may be concatenated to generate an 8-byte ciphertext, which is then broadcast as part of the broadcast data (e.g., broadcast in an agreed manner);
[0074] Step 5: If IV is agreed data, directly broadcast the cipherPairingCode as part of the broadcast data (eg, broadcast in an agreed manner).
[0075] Therefore, the second device can encrypt the pairing code with the first key by executing steps 1 to 5 above to generate the first information and broadcast it.
[0076] Step 202b: Determine the first key.
[0077] Optionally, in some embodiments, the method for the first device to determine the first key may include at least one of the following:
[0078] receiving the first key sent by the server;
[0079] A first key pre-configured (eg, factory configured or written in other trusted ways) in the first device is determined.
[0080] Step 203b: Request the second device to establish a communication connection based on the pairing code.
[0081] Optionally, in some embodiments, the method in step 203b whereby the first device requests the second device to establish a communication connection based on the pairing code may include the following steps:
[0082] Step a: Decrypt the first information using the first key to obtain a pairing code.
[0083] Optionally, the method for the first device to decrypt the first information using the first key to obtain the pairing code can be: first extract the IV from the broadcast data of the second device or determine the IV as agreed, and then use the first key to decrypt the first information. Referring to the encryption process of the second device in steps 1-5 above, it can be seen that the first information includes a plainPairingCode and a nonce. Based on this, after decrypting the first information, the first device can first use the SHA256 algorithm to obtain the nonce based on the IV. The information excluding the nonce in the decrypted first information is the above-mentioned plainPairingCode, and the pairing code can be obtained based on the plainPairingCode.
[0084] Step b: sending the pairing code in a connection establishment request to the second device to request the second device to establish a communication connection.
[0085] Optionally, after receiving the connection establishment request from the first device, the second device may first verify the first device based on the pairing code in the connection establishment request, and if the verification is successful, establish a communication connection with the first device. The details of the second device verifying the first device will be described in detail in the subsequent embodiments corresponding to the second device side.
[0086] With reference to the contents of steps 201b-203b above, it can be seen that in the communication connection method of the embodiment of the present disclosure, when the first device wants to connect to the second device, the first device can obtain the first information broadcast by the second device, the first information includes a pairing code, and the first information is encrypted by the first key. In addition, the first device will also determine the first key, and will decrypt the first information by the first key to obtain the pairing code, and then realize the communication connection with the second device based on the pairing code. It can be seen that the communication connection method of the embodiment of the present disclosure is realized by the interaction between the first device and the second device, without the need for user intervention. The present disclosure provides a method for seamless connection between devices, which is highly efficient, convenient to operate, and can also enhance user experience.
[0087] Furthermore, in the communication connection method of the embodiment of the present disclosure, the first device encrypts the pairing code to obtain the first information and then broadcasts the first information. This can avoid the pairing code from being directly exposed to the communication environment, thereby preventing the pairing code from being maliciously intercepted by other devices and improving the security of the communication connection.
[0088] In summary, in the communication connection method provided by the embodiment of the present disclosure, the first device will receive the first information broadcast by the second device, wherein the second device is the device to which the first device wants to communicate and connect, and the first information is: information obtained after encrypting the pairing code using the first key; the pairing code is used for the first device to connect to the second device; and the first device will also determine the first key, and will request the second device to establish a communication connection based on the pairing code. It can be seen that the communication connection method of the embodiment of the present disclosure is implemented by the interaction between the first device and the second device, without the need for user intervention. The present disclosure provides a method for seamless connection between devices, which is highly efficient, convenient to operate, and can also improve user experience. In addition, in the communication connection method of the embodiment of the present disclosure, the first device encrypts the pairing code to obtain the first information and then broadcasts the first information, thereby avoiding the pairing code from being directly exposed to the communication environment, thereby preventing the pairing code from being maliciously intercepted by other devices, and improving the security of the communication connection.
[0089] FIG3 is a flow chart of a communication connection method provided by an embodiment of the present disclosure. The method is executed by a first device. As shown in FIG3 , the communication connection method may include the following steps:
[0090] Step 301: Determine the identity resolving key (IRK).
[0091] Optionally, in one embodiment of the present disclosure, when broadcasting the first information, the second device may use a resolvable private address (RPA) to broadcast the first information, and the IRK determined in step 301 may be the IRK corresponding to the RPA when the second device broadcasts the first information, and the IRK may be used to resolve the RPA. Optionally, in some embodiments, the above-mentioned IRK may be pre-written to the first device in a trusted manner, for example, it may be sent to the first device by a server, or it may be written to the first device through factory preset or other trusted methods.
[0092] The following is a detailed introduction to the reasons for introducing RPA and IRK, and the relationship between RPA and IRK.
[0093] Among them, the reason why the second device uses RPA to broadcast the first information in the embodiment of the present disclosure is mainly so that the first device can successfully identify (or discover) the second device. Specifically, for the first device, it will scan the information broadcast by multiple devices. Therefore, the first device usually needs to first determine the information broadcast by the first device (that is, the aforementioned first information) from all the information it scans, and then further use the first key to decrypt the first information broadcast by the first device to obtain the pairing code. Based on this, RPA and IRK are introduced, and the second device uses RPA to broadcast the first information. After the first device scans the information, the first device can use the IRK it determines to parse the RPA of the information it scanned. When the parsing is successful, it is confirmed that the information is the first information sent by the second device.
[0094] Furthermore, in some embodiments, the "relationship between RPA and IRK" may be: RPA is an address generated using random numbers Prand and IRK. Specifically, an RPA may include a 24-bit Prand and a 24-bit HASH, and the HASH is a function of IRK and Prand, HASH=ah(IRK, Prand). Based on this, the above-mentioned method of "the first device using IRK to parse RPA" may include: after the first device receives the broadcast information, it may first parse the RPA corresponding to the information, and extract HASH and Prand from the RPA. Afterwards, the first device will use the IRK determined in step 301 in combination with the extracted Prand to generate a local HASH value, and compare the local HASH value with the HASH value extracted from the RPA to see if they are consistent. When they are consistent, the parsing is determined to be successful, indicating that the information was sent by the first device. When they are inconsistent, the parsing is determined to have failed, indicating that the information was not sent by the first device.
[0095] It can be seen from this that in the embodiment of the present disclosure, by introducing RPA and IRK, the first device can confirm which information is the first information broadcast by the second device, thereby realizing the discovery of the second device by the first device and ensuring that the first device can successfully establish a connection with the second device. At the same time, after the introduction of RPA and IRK, for devices that do not know the IRK of the second device, it is impossible to parse the first information broadcast by the second device, and thus it is impossible to know the pairing code included in the first information. Under the dual protection of IRK and the aforementioned first key, the pairing code in the first information broadcast by the first device can be prevented from being leaked, thereby ensuring the security of the communication connection.
[0096] Optionally, in some embodiments, the method for the first device to determine the IRK may include at least one of the following:
[0097] Receive the IRK sent by the server;
[0098] An IRK pre-configured (eg, factory configured or written in other trusted ways) in the first device is determined.
[0099] Step 302: Receive first information broadcasted by the second device using the RPA based on the IRK.
[0100] Optionally, in some embodiments, the first device may receive the first information broadcast by the second device using RPA based on the IRK determined in the above step 301, and for a detailed introduction to this part, please refer to the description of the above embodiment.
[0101] In summary, in the communication connection method provided by the embodiment of the present disclosure, the second device will use RPA to broadcast the first information, and the first device will determine the IPK of the second device. At the same time, the first device will use the IPK of the second device to receive the first information broadcast by the second device using RPA. Thus, by introducing RPA and IRK, the first device can discover the second device, ensuring that the first device can successfully establish a connection with the second device. At the same time, after the introduction of RPA and IRK, for devices that do not know the IRK of the second device, it is impossible to parse the first information broadcast by the second device, and thus it is impossible to know the pairing code included in the first information. Under the dual protection of IRK and the first key, the pairing code in the first information broadcast by the first device can be prevented from being leaked, thereby ensuring the security of the communication connection.
[0102] FIG4a is a flow chart of a communication connection method provided by an embodiment of the present disclosure. The method is executed by a second device. As shown in FIG4a , the communication connection method may include the following steps:
[0103] Step 401a: broadcast a first message, where the first message includes a pairing code.
[0104] Optionally, the pairing code is used to connect to the second device. For example, the pairing code is used to connect to the second device via Bluetooth and / or NFC.
[0105] For a detailed description of step 401a, please refer to the above embodiment description.
[0106] Step 402a: In response to determining that the first device requests to connect to the second device, verify the first device.
[0107] Optionally, in some embodiments, when the second device receives the connection establishment request including the pairing code sent by the first device, it is determined that the first device requests to connect to the second device.
[0108] Optionally, in some embodiments, the method for the second device to verify the first device may include:
[0109] Verify whether the pairing code in the connection establishment request is consistent with the pairing code stored in the second device (such as the pairing code locally stored in the second device); when the pairing code in the connection establishment request is consistent with the pairing code stored in the second device, determine that the verification is successful, and establish a communication connection with the first device to achieve communication between devices; when the pairing code in the connection establishment request is inconsistent with the pairing code stored in the second device, determine that the verification is unsuccessful, and do not establish a communication connection with the first device.
[0110] In summary, in the communication connection method provided by the embodiment of the present disclosure, the second device will broadcast the first information, which is: information obtained by encrypting the pairing code using the first key; the pairing code is used to connect to the second device; and, in response to the second device determining that the first device requests to connect to the second device, the second device will verify the first device, and when the verification is successful, it will establish a communication connection with the first device. It can be seen that the communication connection method of the embodiment of the present disclosure is achieved by the interaction between the first device and the second device, without the need for user intervention. Therefore, the present disclosure provides a method for seamless connection between devices, which is more efficient, more convenient to operate, and can also improve user experience.
[0111] FIG4 b is a flow chart of a communication connection method provided by an embodiment of the present disclosure. The method is executed by the second device. As shown in FIG4 b , the communication connection method may include the following steps:
[0112] Step 401b: broadcast first information, where the first information is information obtained by encrypting the pairing code using the first key.
[0113] Optionally, the pairing code is used to connect to the second device. For example, the pairing code is used to connect to the second device via Bluetooth and / or NFC.
[0114] Step 402b: In response to determining that the first device requests to connect to the second device, verify the first device.
[0115] For a detailed description of steps 401b-402b, please refer to the above embodiment description.
[0116] In summary, in the communication connection method provided by the embodiment of the present disclosure, the second device will broadcast the first information, and the first information includes a pairing code; the pairing code is used to connect to the second device; and, in response to the second device determining that the first device requests to connect to the second device, the second device will verify the first device, and when the verification is passed, it will establish a communication connection with the first device. It can be seen that the communication connection method of the embodiment of the present disclosure is implemented by the interaction between the first device and the second device, without the need for user intervention. The present disclosure provides a method for seamless connection between devices, which is highly efficient, convenient to operate, and can also improve user experience. In addition, in the communication connection method of the embodiment of the present disclosure, the first device encrypts the pairing code to obtain the first information and then broadcasts the first information, thereby avoiding the pairing code from being directly exposed to the communication environment, preventing the pairing code from being maliciously intercepted by other devices, and improving the security of the communication connection.
[0117] FIG5 is a flow chart of a communication connection method provided by an embodiment of the present disclosure. The method is executed by a second device. As shown in FIG5 , the communication connection method may include the following steps:
[0118] Step 501: Use RPA to broadcast first information.
[0119] For a detailed description of step 501 , please refer to the above embodiment description.
[0120] In summary, in the communication connection method provided by the embodiment of the present disclosure, the second device will use RPA to broadcast the first information, and the first device will determine the IPK of the second device. At the same time, the first device will use the IPK of the second device to receive the first information broadcast by the second device using RPA. Thus, by introducing RPA and IRK, the first device can discover the second device, ensuring that the first device can successfully establish a connection with the second device. At the same time, after the introduction of RPA and IRK, for devices that do not know the IRK of the second device, it is impossible to parse the first information broadcast by the second device, and thus it is impossible to know the pairing code included in the first information. Under the dual protection of IRK and the first key, the pairing code in the first information broadcast by the first device can be prevented from being leaked, thereby ensuring the security of the communication connection.
[0121] FIG6 is a flow chart of a communication connection method provided by an embodiment of the present disclosure. The method is executed by a second device. As shown in FIG6 , the communication connection method may include the following steps:
[0122] Step 601: Update the pairing code stored in the second device.
[0123] Since the pairing code stored by the second device may be leaked, this could affect the security of the communication connection. Therefore, in some embodiments, the second device may update its stored pairing code in real time or periodically (e.g., every 30 seconds). Furthermore, the first information broadcast by the second device may be information obtained by encrypting the latest pairing code stored by the second device using the first key.
[0124] It can be seen from this that in the embodiment of the present disclosure, the second device will update the pairing code, and the second device will encrypt the latest pairing code and broadcast it so that other devices (such as the first device) can know the latest pairing code and use the latest pairing code to request to establish a communication connection with the second device. In other words, in the embodiment of the present disclosure, the first device always uses the latest pairing code to establish a communication connection with the second device. The pairing code that has been updated in the past is invalid and cannot be used to establish a communication connection with the second device. Therefore, even if the pairing code stored by the second device is leaked at a certain point in time, as the pairing code stored by the second device is updated, the leaked pairing code will not affect the security of the communication connection.
[0125] To summarize, in the communication connection method provided by the embodiments of the present disclosure, the second device will update its stored pairing code and always use the latest pairing code to establish a communication connection with the first device. The pairing code that has been updated historically is invalid and cannot be used to establish a communication connection with the first device. Therefore, even if the pairing code stored by the second device is leaked at a certain point in time, as the pairing code stored by the second device is updated, the leaked pairing code will not affect the security of the communication connection, thereby solving the technical problem of "the security of the communication connection is affected due to the leakage of the pairing code".
[0126] FIG7 is a flow chart of a communication connection method provided by an embodiment of the present disclosure. The method is executed by the second device. As shown in FIG7 , the communication connection method may include the following steps:
[0127] Step 701: Verify whether the pairing code in the connection establishment request is consistent with the pairing code obtained by each update of the second device within a first preset time period before the current moment.
[0128] Step 702: When the pairing code in the connection establishment request is consistent with the pairing code obtained by any update of the second device within the first preset time period before the current moment, it is determined that the verification is successful, and a communication connection is established with the first device.
[0129] Optionally, in some embodiments, because the pairing code stored by the second device may be updated, the following situation may occur: for example, the second device broadcasts a first message encrypted by a first key at a first time point, where the most recent pairing code stored by the second device at the first time point is the first pairing code. The pairing code included in the first message broadcast at the first time point is the first pairing code. Furthermore, after receiving the first message, the second device decrypts the first message using the first key to obtain the first pairing code, and the first device sends a connection establishment request to the second device, where the connection establishment request includes the first pairing code. However, before receiving the connection establishment request from the first device, the second device updates its pairing code. In this case, the most recent pairing code is the second pairing code, no longer the first pairing code. When the second device receives the connection establishment request from the first device, the communication connection may fail to be established because the first pairing code included in the connection establishment request is inconsistent with the second device's most recent second pairing code.
[0130] Based on this, in some embodiments, to prevent the above situation from occurring, the second device may verify the first device by verifying whether the pairing code in the connection establishment request is consistent with the pairing code obtained by the second device at each update within a first preset time period before the current moment. If the pairing code in the connection establishment request is consistent with the pairing code obtained by the second device at any update within the first preset time period before the current moment, the verification is determined to be successful, and a communication connection is established with the first device. Optionally, in some embodiments, the first preset time period is at least greater than the update period of the pairing code by the second device.
[0131] For example, assuming that the update cycle of the pairing code of the second device is: 30s, and the first preset time period is 70s, the method for the second device to verify the first device can, for example, be: verify whether the pairing code in the connection establishment request is consistent with the pairing code obtained by each update of the second device within 70s before the current moment, such as verifying whether the pairing code in the connection establishment request is consistent with the pairing code obtained by the second device in the most recent update, the pairing code obtained in the last update, and the pairing code obtained in the previous update. If the pairing code in the connection establishment request is consistent with any one of the pairing code obtained by the second device in the most recent update, the pairing code obtained in the last update, and the pairing code obtained in the previous update, the verification is determined to be successful.
[0132] In summary, in the communication connection method provided by the embodiments of the present disclosure, the second device verifies whether the pairing code in the connection establishment request sent by the first device is consistent with the pairing code obtained by each update of the second device within a first preset time period before the current moment. When the pairing code in the connection establishment request is consistent with the pairing code obtained by any update of the second device within the first preset time period before the current moment, the verification is determined to be successful, and a communication connection is established with the first device. This avoids the situation where, after the first device receives the first information broadcast by the second device, the second device updates its stored pairing code, resulting in the pairing code included in the connection establishment request sent by the first device being inconsistent with the latest pairing code stored by the second device, causing the communication connection to fail. This ensures that the first device and the second device can successfully establish a communication connection.
[0133] FIG8 is a flow chart of a communication connection method provided by an embodiment of the present disclosure. The method is executed by the second device. As shown in FIG8 , the communication connection method may include the following steps:
[0134] Step 801: In response to receiving a connection establishment request sent by a first device, stop updating the pairing code stored in the second device within a second preset time period after the current moment.
[0135] Optionally, in some embodiments, after receiving a connection establishment request from the first device, the second device may need a period of time to parse the connection establishment request to obtain the pairing code included in the connection establishment request. During this period of time, the second device may likely update its stored pairing code, causing the pairing code included in the connection establishment request to be inconsistent with the second device's current latest pairing code, thereby causing the first device and the second device to fail to establish a communication connection. Therefore, in some embodiments, after receiving a connection establishment request from the first device, the second device may stop updating its stored pairing code for a second preset period of time after the current moment. This second preset period of time may be at least longer than the time it takes the second device to parse the connection establishment request. This avoids the situation where, during the period of time the second device parses the connection establishment request, the pairing code included in the connection establishment request is inconsistent with the second device's current latest pairing code due to an update to its stored pairing code, thereby causing the first device and the second device to fail to establish a communication connection. This ensures that the first device and the second device can successfully establish a communication connection.
[0136] In summary, in the communication connection method provided in the embodiments of the present disclosure, in response to a second device receiving a connection establishment request sent by a first device, the second device stops updating the pairing code stored on the second device within a second preset time period after the current moment. This avoids the situation where, during the time period when the second device is parsing the connection establishment request, the pairing code stored on the second device is updated, resulting in an inconsistency between the pairing code included in the connection establishment request and the second device's latest pairing code at the current moment, thereby causing the communication connection between the first and second devices to fail. This ensures that the first and second devices can successfully establish a communication connection.
[0137] FIG9 is a schematic structural diagram of a communication device provided by an embodiment of the present disclosure. As shown in FIG9 , the device may include:
[0138] a transceiver module, configured to receive first information broadcast by a second device, the second device being the device to be communicated with by the first device, the first information including a pairing code used to connect the first device to the second device;
[0139] A processing module is configured to request the second device to establish a communication connection based on the pairing code.
[0140] In summary, in the communication apparatus provided in the embodiments of the present disclosure, a first device receives a first message broadcast by a second device, wherein the second device includes a pairing code; the pairing code is used to connect the first device to the second device; and the first device requests the second device to establish a communication connection based on the pairing code. It can be seen that the communication connection method in the embodiments of the present disclosure is implemented by the interaction between the first device and the second device, without the need for user intervention. The present disclosure provides a method for seamless connection between devices, which is highly efficient, convenient to operate, and can also enhance the user experience.
[0141] Optionally, in one embodiment of the present disclosure, the processing module is further configured to:
[0142] Send a connection establishment request to the second device, where the connection establishment request includes the pairing code.
[0143] Optionally, in an embodiment of the present disclosure, the first information is: information obtained by encrypting the pairing code using the first key;
[0144] The device is also used for:
[0145] Determine the first key.
[0146] Optionally, in one embodiment of the present disclosure, the device is further used for at least one of the following:
[0147] receiving the first key sent by the server;
[0148] The first key pre-configured in the first device is determined.
[0149] Optionally, in one embodiment of the present disclosure, the processing module is further configured to:
[0150] decrypting the first information based on the first key to obtain the pairing code;
[0151] Send a connection establishment request to the second device, where the connection establishment request includes the pairing code.
[0152] Optionally, in one embodiment of the present disclosure, the device is further used for at least one of the following:
[0153] Receive the identity resolution key IRK sent by the server;
[0154] determining an IRK pre-configured in the first device;
[0155] The IRK is used to parse the second device.
[0156] Optionally, in one embodiment of the present disclosure, the transceiver module is further configured to:
[0157] The first information broadcasted by the second device using a resolvable private address (RPA) is received based on the IRK.
[0158] FIG10 is a schematic structural diagram of a communication device provided by an embodiment of the present disclosure. As shown in FIG10 , the device may include:
[0159] a transceiver module, configured to broadcast first information, wherein the first information includes a pairing code; the pairing code is used to connect to the second device;
[0160] The processing module is configured to verify the first device in response to determining that the first device requests to connect to the second device.
[0161] In summary, in the communication device provided in the embodiment of the present disclosure, the second device broadcasts the first information, which includes a pairing code; the pairing code is used to connect to the second device; and, in response to the second device determining that the first device requests to connect to the second device, the second device verifies the first device, and when the verification is successful, establishes a communication connection with the first device. It can be seen that the communication connection method in the embodiment of the present disclosure is achieved by the interaction between the first device and the second device, without the need for user intervention. Therefore, the present disclosure provides a method for seamless connection between devices, which is highly efficient, convenient to operate, and can also improve user experience.
[0162] Optionally, in an embodiment of the present disclosure, the first information is information obtained by encrypting the pairing code using a first key.
[0163] Optionally, in one embodiment of the present disclosure, the apparatus is further configured to:
[0164] The first information is broadcast using RPA.
[0165] Optionally, in one embodiment of the present disclosure, the apparatus is further configured to:
[0166] In response to receiving a connection establishment request sent by the first device, it is determined that the first device requests to be connected to the second device, wherein the connection establishment request includes a pairing code.
[0167] Optionally, in one embodiment of the present disclosure, the processing module is further configured to:
[0168] Verifying whether the pairing code in the connection establishment request is consistent with the pairing code stored in the second device;
[0169] When the pairing code in the connection establishment request is consistent with the pairing code stored in the second device, it is determined that the verification is successful, and a communication connection is established with the first device.
[0170] Optionally, in one embodiment of the present disclosure, the apparatus is further configured to:
[0171] Updating the pairing code stored in the second device;
[0172] The first information is information obtained by encrypting the latest pairing code stored in the second device using the first key.
[0173] Optionally, in one embodiment of the present disclosure, the processing module is further configured to:
[0174] Verifying whether the pairing code in the connection establishment request is consistent with the pairing code obtained by each update of the second device within a first preset time period before the current moment;
[0175] When the pairing code in the connection establishment request is consistent with the pairing code obtained by any update of the second device within a first preset time period before the current moment, it is determined that the verification is successful and a communication connection is established with the first device.
[0176] Optionally, in one embodiment of the present disclosure, the apparatus is further configured to:
[0177] In response to receiving the connection establishment request sent by the first device, stopping updating the pairing code stored in the second device within a second preset time period after the current moment.
[0178] Please refer to Figure 11, which is a schematic diagram of the structure of a communication device 1100 provided in an embodiment of the present disclosure. Communication device 1100 can be a base station or a terminal, or a chip, chip system, or processor that supports a base station in implementing the above-mentioned method. It can also be a chip, chip system, or processor that supports a terminal in implementing the above-mentioned method. This device can be used to implement the method described in the above-mentioned method embodiment. For details, please refer to the description of the above-mentioned method embodiment.
[0179] The communication device 1100 may include one or more processors 1101. The processor 1101 may be a general-purpose processor or a dedicated processor. For example, it may be a baseband processor or a central processing unit. The baseband processor may be used to process communication protocols and communication data, and the central processing unit may be used to control the communication device (e.g., a base station, a baseband chip, a terminal, a terminal chip, a DU or a CU, etc.), execute computer programs, and process computer program data.
[0180] Optionally, the communication device 1100 may further include one or more memories 1102, on which a computer program 1104 may be stored. The processor 1101 executes the computer program 1104 to cause the communication device 1100 to perform the method described in the above method embodiment. Optionally, the memory 1102 may also store data. The communication device 1100 and the memory 1102 may be provided separately or integrated together.
[0181] Optionally, the communication device 1100 may further include a transceiver 1105 and an antenna 1106. The transceiver 1105 may be referred to as a transceiver unit, a transceiver, or a transceiver circuit, and is configured to implement transceiver functions. The transceiver 1105 may include a receiver and a transmitter. The receiver may be referred to as a receiver or a receiving circuit, and is configured to implement a receiving function; the transmitter may be referred to as a transmitter or a transmitting circuit, and is configured to implement a transmitting function.
[0182] Optionally, the communication device 1100 may further include one or more interface circuits 1107. The interface circuit 1107 is configured to receive code instructions and transmit the code instructions to the processor 1101. The processor 1101 executes the code instructions to enable the communication device 1100 to perform the method described in the above method embodiment.
[0183] In one implementation, processor 1101 may include a transceiver for implementing receiving and transmitting functions. For example, the transceiver may be a transceiver circuit, an interface, or an interface circuit. The transceiver circuit, interface, or interface circuit for implementing the receiving and transmitting functions may be separate or integrated. The transceiver circuit, interface, or interface circuit may be used for reading and writing code / data, or may be used for transmitting or delivering signals.
[0184] In one implementation, processor 1101 may store a computer program 1103. Computer program 1103, when executed on processor 1101, enables communication device 1100 to perform the method described in the above method embodiment. Computer program 1103 may be embedded in processor 1101, in which case processor 1101 may be implemented by hardware.
[0185] In one implementation, the communication device 1100 may include a circuit that can implement the functions of sending, receiving, or communicating in the aforementioned method embodiments. The processor and transceiver described in the present disclosure can be implemented on an integrated circuit (IC), an analog IC, a radio frequency integrated circuit RFIC, a mixed signal IC, an application specific integrated circuit (ASIC), a printed circuit board (PCB), an electronic device, etc. The processor and transceiver can also be manufactured using various IC process technologies, such as complementary metal oxide semiconductor (CMOS), N-type metal oxide semiconductor (nMetal-oxide-semiconductor, NMOS), P-type metal oxide semiconductor (positive channel metal oxide semiconductor, PMOS), bipolar junction transistor (bipolar junction transistor, BJT), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.
[0186] The communication device described in the above embodiments may be a base station or a terminal, but the scope of the communication device described in this disclosure is not limited thereto, and the structure of the communication device may not be limited to FIG11. The communication device may be an independent device or may be part of a larger device. For example, the communication device may be:
[0187] (1) An independent integrated circuit (IC), or chip, or chip system or subsystem;
[0188] (2) a collection of one or more ICs, optionally including a storage component for storing data and computer programs;
[0189] (3) ASIC, such as modem;
[0190] (4) Modules that can be embedded in other devices;
[0191] (5) Receivers, terminals, smart terminals, cellular phones, wireless devices, handheld devices, mobile units, vehicle-mounted devices, base stations, cloud devices, artificial intelligence devices, etc.;
[0192] (6)Others, etc.
[0193] If the communication device can be a chip or a chip system, please refer to the schematic diagram of the chip structure shown in Figure 12. The chip shown in Figure 12 includes a processor 1201 and an interface 1202. The number of processors 1201 can be one or more, and the number of interfaces 1202 can be multiple.
[0194] Optionally, the chip further includes a memory 1203, which is used to store necessary computer programs and data.
[0195] Those skilled in the art will also appreciate that the various illustrative logical blocks and steps listed in the embodiments of the present disclosure may be implemented by electronic hardware, computer software, or a combination of both. Whether such functionality is implemented by hardware or software depends on the specific application and the design requirements of the entire system. Those skilled in the art may use various methods to implement the described functionality for each specific application, but such implementation should not be construed as exceeding the scope of protection of the embodiments of the present disclosure.
[0196] The present disclosure also provides a readable storage medium having instructions stored thereon, which implement the functions of any of the above method embodiments when executed by a computer.
[0197] The present disclosure also provides a computer program product, which implements the functions of any of the above method embodiments when executed by a computer.
[0198] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer programs. When the computer program is loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present disclosure are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer program can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0199] Those skilled in the art will understand that the various numerical numbers such as first and second involved in the present disclosure are only for the convenience of description and are not used to limit the scope of the embodiments of the present disclosure, and also indicate the order of precedence.
[0200] The at least one in the present disclosure can also be described as one or more, and the multiple can be two, three, four or more, which is not limited in the present disclosure. In the embodiments of the present disclosure, for a technical feature, the technical features in the technical feature are distinguished by "first", "second", "third", "A", "B", "C" and "D", and there is no order of precedence or size between the technical features described by "first", "second", "third", "A", "B", "C" and "D".
[0201] The correspondences shown in the tables of the present disclosure can be configured or predefined. The values of the information in each table are merely examples and can be configured to other values, which are not limited by the present disclosure. When configuring the correspondences between information and parameters, it is not necessarily required to configure all the correspondences shown in each table. For example, in the tables of the present disclosure, the correspondences shown in certain rows may not be configured. For another example, appropriate deformation adjustments can be made based on the above tables, such as splitting, merging, etc. The names of the parameters shown in the titles of the above tables may also adopt other names that can be understood by the communication device, and the values or representations of the parameters may also adopt other values or representations that can be understood by the communication device. When implementing the above tables, other data structures may also be used, such as arrays, queues, containers, stacks, linear lists, pointers, linked lists, trees, graphs, structures, classes, heaps, hash tables or hash tables, etc.
[0202] The predefined in the present disclosure may be understood as defined, predefined, stored, pre-stored, pre-negotiated, pre-configured, solidified, or pre-burned.
[0203] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0204] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0205] The above description is merely a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this disclosure 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 communication connection method, characterized in that: The method is performed by a first device, and includes: receiving first information broadcast by a second device, where the second device is a device to be connected to the first device for communication, and the first information includes a pairing code, where the pairing code is used for the first device to connect to the second device; A request is made to the second device to establish a communication connection based on the pairing code.
2. The method according to claim 1, characterized in that The requesting the second device to establish a communication connection based on the pairing code includes: Send a connection establishment request to the second device, where the connection establishment request includes the pairing code.
3. The method according to claim 1, characterized in that The first information is: information obtained by encrypting the pairing code using the first key; The method further comprises: Determine the first key.
4. The method according to claim 3, characterized in that Determining the first key includes at least one of the following: Receiving the first key sent by the server; The first key preconfigured in the first device is determined.
5. The method according to claim 3, characterized in that The requesting the second device to establish a communication connection based on the pairing code includes: decrypting the first information based on the first key to obtain the pairing code; Send a connection establishment request to the second device, where the connection establishment request includes the pairing code.
6. The method according to claim 1, characterized in that The method further comprises at least one of the following: Receive the identity resolution key IRK sent by the server; determining an IRK preconfigured in the first device; The IRK is used to parse the second device.
7. The method according to claim 6, characterized in that The receiving the first information broadcast by the second device includes: The first information broadcasted by the second device using a resolvable private address RPA is received based on the IRK.
8. A communication connection method, characterized in that: The method is performed by a second device, and the method includes: Broadcasting first information, wherein the first information includes a pairing code; the pairing code is used to connect to the second device; In response to determining that the first device requests to connect to the second device, the first device is authenticated.
9. The method according to claim 8, characterized in that The first information is information obtained by encrypting the pairing code using the first key.
10. The method according to claim 8, characterized in that The method further comprises: The first information is broadcasted using RPA.
11. The method according to claim 8, characterized in that The method further comprises: In response to receiving a connection establishment request sent by the first device, it is determined that the first device requests to be connected to the second device, wherein the connection establishment request includes a pairing code.
12. The method according to claim 11, characterized in that The verifying the first device includes: Verifying whether the pairing code in the connection establishment request is consistent with the pairing code stored in the second device; When the pairing code in the connection establishment request is consistent with the pairing code stored in the second device, it is determined that the verification is successful, and a communication connection is established with the first device.
13. The method according to claim 12, characterized in that The method further comprises: Updating the pairing code stored in the second device; The first information is information obtained by encrypting the latest pairing code stored in the second device using the first key.
14. The method according to claim 13, characterized in that The verifying the first device includes: Verify that the pairing code in the connection establishment request is consistent with the pairing code updated by the second device each time within a first preset time period before the current moment. Whether the obtained pairing codes are consistent; When the pairing code in the connection establishment request is consistent with the pairing code obtained by any update of the second device within a first preset time period before the current moment, it is determined that the verification is successful, and a communication connection is established with the first device.
15. The method according to claim 13, characterized in that The method further comprises: In response to receiving the connection establishment request sent by the first device, stopping updating the pairing code stored in the second device within a second preset time period after the current moment.
16. A communication device, comprising: a transceiver module, configured to receive first information broadcast by a second device, the second device being a device to be connected to the first device for communication, the first information including a pairing code, the pairing code being used for the first device to connect to the second device; A processing module is used to request the second device to establish a communication connection based on the pairing code.
17. A communication device, comprising: A transceiver module, configured to broadcast first information, wherein the first information includes a pairing code; The pairing code is used to connect to the second device; A processing module is configured to verify the first device in response to determining that the first device requests to connect to the second device.
18. A communication device, characterized in that: The device includes a processor and a memory, wherein a computer program is stored in the memory, and the processor executes the computer program stored in the memory so that the device performs the method as described in any one of claims 1 to 7, or the processor executes the computer program stored in the memory so that the device performs the method as described in any one of claims 8 to 15.
19. A communication device, characterized in that: include: processor and interface circuitry, wherein The interface circuit is used to receive code instructions and transmit them to the processor; The processor is configured to execute the code instructions to perform the method according to any one of claims 1 to 7, or execute the code instructions to perform the method according to any one of claims 8 to 15.
20. A computer-readable storage medium storing instructions, which, when executed, enable the method according to any one of claims 1 to 7 to be implemented, or, when executed, enable the method according to any one of claims 8 to 15 to be implemented.