Communication method and device, electronic equipment and storage medium
By utilizing link-layer connection and forwarding technology in the Internet of Things, the problem of insufficient encryption of communication information in the prior art is solved, higher communication security and lower cost are achieved, and the application scenarios of relay technology are expanded.
Patent Information
- Application Number
- CN202311061901.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-22
- Publication Date
- 2025-02-25
AI Technical Summary
The existing relay technology based on the GATT layer in the Internet of Things has shortcomings in the encryption of communication information, resulting in poor communication security, high relay cost, high latency and poor stability.
By establishing a link layer connection between the first relay device and the first short-range wireless communication device, receiving and forwarding link layer information, the link layer connection between the first short-range wireless communication device and the second short-range wireless communication device is realized, and data encryption is performed.
It improves the security of communication information, expands the application scenarios of relay technology, reduces the transmission delay of the communication system, improves the reliability of the communication system, and reduces the cost of the communication system.
Smart Images

Figure CN119521454A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of wireless communication technology for the Internet of Things, and in particular to a communication method, device, electronic device and storage medium. Background Art
[0002] With the continuous expansion of IoT application scenarios and the rapid development of IoT technology, the number of electronic devices in the IoT continues to increase, the interconnection capabilities and stability requirements of electronic devices continue to increase, and the stability requirements for wireless communication technologies used in IoT applications are also increasing. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a communication method, device, electronic device and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided a communication method, which is applied to a first relay device, and the method includes:
[0005] Establishing a link layer connection with a first short-range wireless communication device;
[0006] Receive first link layer information sent by the first short-range wireless communication device, where the first link layer information includes a first protocol data unit (PDU), and a destination device of the first PDU is a second short-range wireless communication device;
[0007] The first PDU is sent to a second relay device, where the second relay device is located within a communication range of the second short-range wireless communication device.
[0008] In an exemplary embodiment, establishing a link layer connection with the first short-range wireless communication device includes:
[0009] Receiving a link layer connection request sent by the first short-range wireless communication device;
[0010] Sending a link layer connection response to the first short-range wireless communication device;
[0011] Establishing a link layer connection with the first short-range wireless communication device.
[0012] In an exemplary embodiment, the method further comprises:
[0013] receiving a second PDU sent by the second relay device, where the second PDU is response information of the first PDU;
[0014] Second link layer information is sent to the first short-range wireless communication device, where the second link layer information includes the second PDU.
[0015] In an exemplary embodiment, the method further comprises:
[0016] Receive a third PDU sent by a third relay device, where the destination device of the third PDU is the first short-range wireless communication device, and the source device of the third PDU is the third short-range wireless communication device;
[0017] Send third link layer information to the first short-range wireless communication device, where the third link layer information includes a third PDU.
[0018] In an exemplary embodiment, the method further comprises:
[0019] receiving fourth link layer information sent by the first short-range wireless communication device, where the fourth link layer information includes a fourth PDU, where the fourth PDU is response information of the third PDU, and where the destination device of the fourth PDU is the third short-range wireless communication device;
[0020] The fourth PDU is sent to the third relay device.
[0021] In an exemplary embodiment, the link layer information includes a PDU and an information type, and the information type is one of connection request information, key request information, and communication information.
[0022] In an exemplary embodiment, the PDU is a data encrypted PDU.
[0023] According to a second aspect of an embodiment of the present disclosure, a communication method is provided, which is applied to a first short-range wireless communication device, and the method includes:
[0024] Establishing a link layer connection with the first relay device;
[0025] First link layer information is sent to the first relay device, where the first link layer information includes a first protocol data unit (PDU), and a destination device of the first PDU is a second short-range wireless communication device.
[0026] In an exemplary embodiment, establishing a link layer connection with the first relay device includes:
[0027] Sending a link layer connection request to the first relay device;
[0028] Receiving a link layer connection response sent by the first relay device;
[0029] Establish a link layer connection with the first relay device.
[0030] In an exemplary embodiment, the method further comprises:
[0031] Receive second link layer information sent by the first relay device, where the second link layer information includes a second PDU, and the second PDU is response information of the first PDU.
[0032] In an exemplary embodiment, the method further comprises:
[0033] Receive third link layer information sent by the first relay device, where the third link layer information includes a third PDU, a destination device of the third PDU is the first short-range wireless communication device, and a source device of the third PDU is a third short-range wireless communication device.
[0034] In an exemplary embodiment, the method further comprises:
[0035] Send fourth link layer information to the first relay device, where the fourth link layer information includes a fourth PDU, and the fourth PDU is response information of the third PDU.
[0036] In an exemplary embodiment, the link layer information includes a PDU and an information type, and the information type is one of connection request information, key request information, and communication information.
[0037] In an exemplary embodiment, the PDU data is an encrypted PDU.
[0038] According to a third aspect of an embodiment of the present disclosure, a communication device is provided, which is applied to a first relay device, and the device includes:
[0039] A connection module, configured to establish a link layer connection with a first short-range wireless communication device;
[0040] The transceiver module is configured to receive first link layer information sent by the first short-range wireless communication device, the first link layer information includes a first protocol data unit PDU, and the destination device of the first PDU is a second short-range wireless communication device; send the first PDU to a second relay device, and the second relay device is located within the communication range of the second short-range wireless communication device.
[0041] According to a fourth aspect of an embodiment of the present disclosure, a communication device is provided, which is applied to a first short-range wireless communication device, and the device includes:
[0042] A connection module, configured to establish a link layer connection with the first relay device;
[0043] The transceiver module is configured to send first link layer information to the first relay device, where the first link layer information includes a first protocol data unit PDU, and the destination device of the first PDU is a second short-range wireless communication device.
[0044] According to a fifth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0045] processor;
[0046] a memory for storing processor-executable instructions;
[0047] The processor is configured to execute the communication method as described in the first aspect or the second aspect of the embodiment of the present disclosure.
[0048] According to the sixth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the communication method as described in the first aspect or the second aspect of the embodiment of the present disclosure.
[0049] The above method disclosed in the present invention has the following beneficial effects: the first relay device and the second relay device forward link layer information to realize the link layer connection between the first short-range wireless communication device and the second short-range wireless communication device, which can achieve the technical effect of encrypting the communication information at the link layer, thereby improving the security of the communication information while expanding the application scenarios of the relay technology, and can also reduce the transmission delay of the communication system, improve the reliability of the communication system, and reduce the cost of the communication system.
[0050] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0052] Figure 1 is a flowchart of a method for processing executable code according to an exemplary embodiment;
[0053] Figure 2 is a flow chart of a communication method according to an exemplary embodiment;
[0054] Figure 3 is a flow chart of a communication method according to an exemplary embodiment;
[0055] Figure 4 is a flow chart of a communication method according to an exemplary embodiment;
[0056] Figure 5 is an interactive flow chart of a communication method according to an exemplary embodiment;
[0057] Figure 6is a flow chart of a communication method according to an exemplary embodiment;
[0058] Figure 7 is a flow chart of a communication method according to an exemplary embodiment;
[0059] Figure 8 is an interactive flow chart of a communication method according to an exemplary embodiment;
[0060] Fig. 9 is a block diagram of a communication device according to an exemplary embodiment;
[0061] Fig.10 is a block diagram of a communication device according to an exemplary embodiment;
[0062] Fig.11 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0063] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0064] Bluetooth Low Energy (BLE) technology is one of the wireless communication technologies widely used in IoT applications. The BLE protocol stack adopts a hierarchical model, including GATT layer (Generic Attribute Profile Layer), ATT layer (Attribute Protocol Layer), L2CAP layer (Logical Link Control and Adaptation Protocol Layer), HCI layer (Host Controller Interface Layer), and LL layer (Linker Layer).
[0065] In some embodiments, in IoT applications, BLE technology is a relay technology based on the GATT layer, and the terminal device uses GATT layer information to communicate with the smart device: the relay device establishes GATT layer connections with the smart device and the terminal device respectively, the smart device sends a connection request to the relay device, the relay device forwards the connection request to the terminal device, and the terminal device responds to the connection request. However, in the relay technology based on the GATT layer, since the relay device has limited ability to parse GATT layer information into lower-level information, for example, the relay device cannot parse GATT layer information into HCI layer information, therefore, it is impossible to encrypt communication information at a lower level, and encrypting data at a lower level can make data more secure. Therefore, the communication security of the relay technology based on the GATT layer is poor, and the relay cost is high, the delay is high, and the stability is poor.
[0066] In an exemplary embodiment of the present disclosure, in order to overcome the problems existing in the related art, a communication method is provided, which is applied to a first relay device, including: establishing a link layer connection with a first short-range wireless communication device; receiving first link layer information sent by the first short-range wireless communication device, the first link layer information includes a first protocol data unit PDU, and the destination device of the first PDU is a second short-range wireless communication device; sending the first PDU to a second relay device, and the second relay device is located within the communication range of the second short-range wireless communication device. This communication method can achieve the technical effect of encrypting communication information at the link layer, thereby expanding the application scenarios of relay technology while improving the security of communication information, and can reduce the transmission delay of the communication system, improve the reliability of the communication system, and reduce the cost of the communication system.
[0067] In an exemplary embodiment of the present disclosure, a communication system is provided, which includes a first relay device, a second relay device, a first short-range wireless communication device, and a second short-range wireless communication device.
[0068] The first short-range wireless communication device and the second short-range wireless communication device can be electronic devices with short-range wireless communication functions such as Bluetooth devices, Zigbee devices, and LoRa devices. The first relay device and the first short-range wireless communication device, as well as the second relay devices and the second short-range wireless communication device are all connected through short-range wireless communication, such as through Bluetooth, Zigbee, LoRa, etc., and the first relay device and the second relay device are connected through wireless communication, such as through Bluetooth, WiFi, local area network, mobile communication, etc. For example, the first relay device and the first short-range wireless communication device, as well as the second relay device and the second short-range wireless communication device are all connected through Bluetooth, and the distance between the devices is 15 meters. The first relay device and the second relay device are connected through a local area network, and the distance between the devices is 25 meters. The first short-range wireless communication device and the second short-range wireless communication device can be terminal devices with short-range wireless communication functions such as smart phones and tablets, or one of smart devices with short-range wireless communication functions such as smart watches, smart door locks, and smart home appliances.
[0069] In one example, Figure 1 is a schematic diagram of a communication system according to an exemplary embodiment. Figure 1 As shown, the communication system 100 includes a short-range wireless communication connection 101, a wireless communication connection 102, a relay device 103, a cloud service 104, a terminal device 105, and a smart device 106, wherein the terminal device 105 and the smart device 106 are both short-range wireless communication devices, and the relay device 103 performs wireless communication through the cloud service 104. Users can use the application on the terminal device to remotely control smart locks, smart lights and other smart devices at home, and can also obtain the status information of the smart devices in real time. When a new smart device joins the system, the relay device can automatically identify and register it without manual configuration by the user, providing users with a more convenient and efficient way to manage smart devices.
[0070] In an exemplary embodiment of the present disclosure, a communication method is provided, which is applied to a first relay device. Figure 2 is a flow chart of a communication method according to an exemplary embodiment. Figure 2 As shown, the following steps are included:
[0071] Step S201: Establish a link layer connection with a first short-range wireless communication device.
[0072] The protocol stack of the near-field wireless communication technology adopts a hierarchical model, in which the lowest layer is the link layer. The information transmitted in different layers is also different. For example, in the Bluetooth protocol stack, the information transmitted in the link layer is link layer information, and the information transmitted in the GATT layer is GATT layer information. The link layer information is different from the GATT layer information. The relay device cannot parse the high-level information downward into the low-level information, and data encryption of the low-level information can improve the communication security. Therefore, the first relay device establishes a link layer connection with the first near-field wireless communication device, and the first relay device and the first near-field wireless communication device interact through the link layer information, which can provide communication security.
[0073] In some possible implementations, after the first relay device receives the link layer connection request sent by the first short-range wireless communication device, it sends a link layer connection response to the first short-range wireless communication device. After the first short-range wireless communication device receives the link layer connection response, the first relay device establishes a link layer connection with the first short-range wireless communication device.
[0074] Step S202: Receive first link layer information sent by a first short-range wireless communication device, where the first link layer information includes a first protocol data unit (PDU), and a destination device of the first PDU is a second short-range wireless communication device.
[0075] The first link layer information is a link layer message, which includes a protocol data unit (PDU), a message type, and a network address of a destination device. The information in the protocol data unit PDU is the information to be transmitted. The message type is also called an information type, which indicates the type of information in the PDU, including connection request information, key request information, and communication information. The network address of the destination device indicates the address of the electronic device to which the information in the PDU is to be transmitted. The destination device of the first PDU is the second short-range wireless communication device, which indicates that the first short-range wireless communication device wants to communicate with the second short-range wireless communication device. Among them, the connection request information indicates a communication connection request between the first short-range wireless communication device and the second short-range wireless communication device, and the key request information indicates the key information used for link layer encryption of the communication information.
[0076] Step S203: Send a first PDU to a second relay device, where the second relay device is located within a communication range of a second short-range wireless communication device.
[0077] After the first short-range wireless communication device establishes a link layer communication connection with the second short-range wireless communication device and determines the key information, the first PDU in the first link layer information is a PDU encrypted using the key information. After the first relay device receives the first link layer information, it needs to parse the first PDU from the message.
[0078] A wireless communication connection is established between the first relay device and the second relay device through network layer information exchange. After the first relay device parses the first PDU, it encapsulates the first PDU into a first network layer message, i.e., network layer information, and sends the first network layer message to the second relay device. The second relay device is located within the communication range of the second short-range wireless communication device. After the second relay device receives the first network layer message, it parses the first PDU and learns that the destination device of the first PDU is the second short-range wireless communication device. It then establishes a link layer connection with the second short-range wireless communication device, and then encapsulates the first PDU into the first link layer information. Through the link layer connection with the second short-range wireless communication device, the first PDU is sent to the second short-range wireless communication device. In this way, link layer information transmission between the first short-range wireless communication device and the second short-range wireless communication device is realized.
[0079] In an exemplary embodiment of the present disclosure, a first relay device and a second relay device forward link layer information to achieve a link layer connection between a first short-range wireless communication device and a second short-range wireless communication device, which can achieve the technical effect of encrypting communication information at the link layer, thereby improving the security of communication information while expanding the application scenarios of relay technology. In addition, when the relay device parses the communication information, the time required to parse the link layer information is shorter and the cost is lower. Therefore, establishing a link layer connection can reduce the transmission delay of the communication system, improve the reliability of the communication system, and reduce the cost of the communication system.
[0080] In an exemplary embodiment of the present disclosure, a communication method is provided, which is applied to a first relay device. Figure 3 is a flow chart of a communication method according to an exemplary embodiment. Figure 3 As shown, the following steps are included:
[0081] Step S301: Establish a link layer connection with a first short-range wireless communication device.
[0082] The specific implementation of step S301 refers to step S201 and will not be described in detail here.
[0083] Step S302: Receive first link layer information sent by a first short-range wireless communication device, where the first link layer information includes a first protocol data unit (PDU), and a destination device of the first PDU is a second short-range wireless communication device.
[0084] The specific implementation of step S302 refers to step S202 and will not be described in detail here.
[0085] Step S303: Send a first PDU to a second relay device, where the second relay device is located within a communication range of a second short-range wireless communication device.
[0086] The specific implementation of step S303 refers to step S203 and will not be described in detail here.
[0087] Step S304: Receive a second PDU sent by the second relay device, where the second PDU is response information of the first PDU.
[0088] The information type in the second PDU is the same as the information type in the first PDU. For example, when the first PDU is connection request information, the second PDU is response information for the connection request. After receiving the first link layer information, the second short-range wireless communication device sends the second link layer information to the second relay device, and the second link layer information includes the second PDU. After receiving the second link layer information, the second relay device parses the second PDU, and then encapsulates the second PDU into the second network layer information and sends it to the first relay device. After receiving the second network layer information, the first relay device parses the second PDU from the second network layer information.
[0089] Step S305: Send second link layer information to the first short-range wireless communication device, where the second link layer information includes a second PDU.
[0090] After obtaining the second PDU, the first relay device encapsulates the second PDU into second link layer information and sends the second link layer information to the first short-range wireless communication device, thereby realizing the transmission of link layer information between the second short-range wireless communication device and the first short-range wireless communication device.
[0091] In an exemplary embodiment of the present disclosure, a communication method is provided, which is applied to a first short-range wireless communication device. Figure 4 is a flow chart of a communication method according to an exemplary embodiment. Figure 4 As shown, the following steps are included:
[0092] Step S401: Establish a link layer connection with a first relay device.
[0093] In some possible implementations, the first short-range wireless communication device sends a link layer connection request to the first relay device, receives a link layer connection response sent by the first relay device, and establishes a link layer connection with the first relay device.
[0094] Step S402: Send first link layer information to the first relay device, where the first link layer information includes a first protocol data unit (PDU), and the destination device of the first PDU is the second short-range wireless communication device.
[0095] Step S403: Receive second link layer information sent by the first relay device, where the second link layer information includes a second PDU, and the second PDU is response information of the first PDU.
[0096] In the exemplary embodiment of the present disclosure, the first short-range wireless communication device and the first relay device can achieve the technical effect of encrypting communication information at the link layer through link layer information communication, thereby improving the security of communication information while expanding the application scenarios of relay technology.
[0097] In an exemplary embodiment of the present disclosure, a communication method is provided, which is applied to a communication system. Figure 5 is an interactive flow chart of a communication method according to an exemplary embodiment. Figure 5 As shown, the following steps are included:
[0098] Step S501: The first short-range wireless communication device sends a link layer connection request to the first relay device;
[0099] Step S502: The first relay device sends a link layer connection response to the first short-range wireless communication device;
[0100] Step S503: The first relay device establishes a link layer connection with the first short-range wireless communication device;
[0101] Step S504: The first short-range wireless communication device sends first link layer information to the first relay device, where the first link layer information includes a first protocol data unit (PDU), and the destination device of the first PDU is the second short-range wireless communication device.
[0102] Step S505: The first relay device sends a first PDU to a second relay device, where the second relay device is within a communication range of a second short-range wireless communication device.
[0103] Step S506: The second relay device sends a link layer connection request to the second short-range wireless communication device;
[0104] Step S507: The second short-range wireless communication device sends a link layer connection response to the second relay device;
[0105] Step S508, the second relay device establishes a link layer connection with the second short-range wireless communication device;
[0106] Step S509: the second relay device sends the first link layer information to the second short-range wireless communication device;
[0107] Step S510: The second short-range wireless communication device sends second link layer information to the second relay device, where the second link layer information includes a second PDU, and the second PDU is response information of the first PDU;
[0108] Step S511, the second relay device sends a second PDU to the first relay device;
[0109] Step S512: The first relay device sends second link layer information to the first short-range wireless communication device, where the second link layer information includes a second PDU.
[0110] In an exemplary embodiment of the present disclosure, a communication system is provided, which includes a first relay device, a third relay device, a first short-range wireless communication device, and a third short-range wireless communication device.
[0111] The first short-range wireless communication device and the third short-range wireless communication device can be electronic devices with short-range wireless communication functions such as Bluetooth devices, Zigbee devices, and LoRa devices. The first relay device and the first short-range wireless communication device, as well as the third relay devices and the third short-range wireless communication devices are connected via short-range wireless communication, such as Bluetooth, Zigbee, LoRa, etc., and the first relay device and the third relay device are connected via wireless communication, such as Bluetooth, WiFi, local area network, mobile communication, etc. The first short-range wireless communication device and the third short-range wireless communication device can be terminal devices with short-range wireless communication functions such as smart phones and tablets, or one of smart devices with short-range wireless communication functions such as smart watches, smart door locks, and smart home appliances.
[0112] In an exemplary embodiment of the present disclosure, a communication method is provided, which is applied to a first relay device. Figure 6 is a flow chart of a communication method according to an exemplary embodiment. Figure 6 As shown, the following steps are included:
[0113] Step S601, receiving a third PDU sent by a third relay device, where the destination device of the third PDU is the first short-range wireless communication device, and the source device of the third PDU is the third short-range wireless communication device;
[0114] Step S602: Send third link layer information to the first short-range wireless communication device, where the third link layer information includes a third PDU.
[0115] Step S603: receiving fourth link layer information sent by the first short-range wireless communication device, where the fourth link layer information includes a fourth PDU, and the fourth PDU is response information of the third PDU;
[0116] Step S604: Send a fourth PDU to the third relay device, where the destination device of the fourth PDU is the third short-range wireless communication device.
[0117] In an exemplary embodiment of the present disclosure, a communication method is provided, which is applied to a first short-range wireless communication device. Figure 7 is a flow chart of a communication method according to an exemplary embodiment. Figure 7 As shown, the following steps are included:
[0118] Step S701: receiving third link layer information sent by a first relay device, where the third link layer information includes a third PDU, where the destination device of the third PDU is the first short-range wireless communication device, and the source device of the third PDU is the third short-range wireless communication device;
[0119] Step S702: Send fourth link layer information to the first relay device, where the fourth link layer information includes a fourth PDU, and the fourth PDU is response information of the third PDU.
[0120] In an exemplary embodiment of the present disclosure, a communication method is provided, which is applied to a communication system. Figure 8 is an interactive flow chart of a communication method according to an exemplary embodiment. Figure 8 As shown, the following steps are included:
[0121] Step S801: The third short-range wireless communication device sends third link layer information to the third relay device, where the third link layer information includes a third PDU, and the destination device of the third PDU is the first short-range wireless communication device.
[0122] Step S802: The third relay device sends a third PDU to the first relay device;
[0123] Step S803: The first relay device sends third link layer information to the first short-range wireless communication device;
[0124] Step S804: The first short-range wireless communication device sends fourth link layer information to the first relay device, where the fourth link layer information includes a fourth PDU, the fourth PDU is response information of the third PDU, and the destination device of the fourth PDU is the third short-range wireless communication device;
[0125] Step S805, the first relay device sends a fourth PDU to the third relay device;
[0126] Step S806: The third relay device sends fourth link layer information to the third short-range wireless communication device.
[0127] In an exemplary embodiment of the present disclosure, a communication apparatus is provided, which is applied to a first relay device. Fig. 9 is a block diagram of a communication device according to an exemplary embodiment. Fig. 9 As shown, including:
[0128] The connection module 901 is configured to establish a link layer connection with a first short-range wireless communication device;
[0129] The transceiver module 902 is configured to receive first link layer information sent by the first short-range wireless communication device, the first link layer information including a first protocol data unit PDU, and the destination device of the first PDU is a second short-range wireless communication device; send the first PDU to a second relay device, and the second relay device is located within the communication range of the second short-range wireless communication device.
[0130] In an exemplary embodiment, the connection module 901 is further configured to:
[0131] Receiving a link layer connection request sent by the first short-range wireless communication device;
[0132] Sending a link layer connection response to the first short-range wireless communication device;
[0133] Establish a link layer connection with the first short-range wireless communication device.
[0134] In an exemplary embodiment, the transceiver module 902 is further configured to:
[0135] receiving a second PDU sent by the second relay device, where the second PDU is response information of the first PDU;
[0136] Second link layer information is sent to the first short-range wireless communication device, where the second link layer information includes the second PDU.
[0137] In an exemplary embodiment, the transceiver module 902 is further configured to:
[0138] Receive a third PDU sent by a third relay device, where the destination device of the third PDU is the first short-range wireless communication device, and the source device of the third PDU is the third short-range wireless communication device;
[0139] Send third link layer information to the first short-range wireless communication device, where the third link layer information includes a third PDU.
[0140] In an exemplary embodiment, the transceiver module 902 is further configured to:
[0141] receiving fourth link layer information sent by the first short-range wireless communication device, where the fourth link layer information includes a fourth PDU, where the fourth PDU is response information of the third PDU, and where the destination device of the fourth PDU is the third short-range wireless communication device;
[0142] The fourth PDU is sent to the third relay device.
[0143] In an exemplary embodiment, the link layer information includes a PDU and an information type, and the information type is one of connection request information, key request information, and communication information.
[0144] In an exemplary embodiment, the PDU is a data encrypted PDU.
[0145] In an exemplary embodiment of the present disclosure, a communication apparatus is provided, which is applied to a first short-range wireless communication device. Fig.10 is a block diagram of a communication device according to an exemplary embodiment. Fig.10 As shown, including:
[0146] The connection module 1001 is configured to establish a link layer connection with the first relay device;
[0147] The transceiver module 1002 is configured to send first link layer information to the first relay device, where the first link layer information includes a first protocol data unit PDU, and a destination device of the first PDU is a second short-range wireless communication device.
[0148] In an exemplary embodiment, the connection module 1001 is further configured to:
[0149] Sending a link layer connection request to the first relay device;
[0150] Receiving a link layer connection response sent by the first relay device;
[0151] Establish a link layer connection with the first relay device.
[0152] In an exemplary embodiment, the transceiver module 1002 is further configured to:
[0153] Receive second link layer information sent by the first relay device, where the second link layer information includes a second PDU, and the second PDU is response information of the first PDU.
[0154] In an exemplary embodiment, the transceiver module 1002 is further configured to:
[0155] Receive third link layer information sent by the first relay device, where the third link layer information includes a third PDU, a destination device of the third PDU is the first short-range wireless communication device, and a source device of the third PDU is the third short-range wireless communication device.
[0156] In an exemplary embodiment, the transceiver module 1002 is further configured to:
[0157] Send fourth link layer information to the first relay device, where the fourth link layer information includes a fourth PDU, and the fourth PDU is response information of the third PDU.
[0158] In an exemplary embodiment, the link layer information includes a PDU and an information type, and the information type is one of connection request information, key request information, and communication information.
[0159] In an exemplary embodiment, the PDU data is an encrypted PDU.
[0160] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0161] Fig.11 is a block diagram of an electronic device 1100 according to an exemplary embodiment.
[0162] Reference Fig.11 , the electronic device 1100 may include one or more of the following components: a processing component 1102 , a memory 1104 , a power component 1106 , a multimedia component 1108 , an audio component 1110 , an input / output (I / O) interface 1112 , a sensor component 1114 , and a communication component 1116 .
[0163] The processing component 1102 generally controls the overall operation of the electronic device 1100, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1102 may include one or more processors 1120 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1102 may include one or more modules to facilitate the interaction between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate the interaction between the multimedia component 1108 and the processing component 1102.
[0164] The memory 1104 is configured to store various types of data to support operations on the electronic device 1100. Examples of such data include instructions for any application or method operating on the electronic device 1100, contact data, phone book data, messages, pictures, videos, etc. The memory 1104 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0165] The power supply component 1106 provides power to various components of the electronic device 1100. The power supply component 1106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1100.
[0166] The multimedia component 1108 includes a screen that provides an output interface between the electronic device 1100 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1108 includes a front camera and / or a rear camera. When the electronic device 1100 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0167] The audio component 1110 is configured to output and / or input audio signals. For example, the audio component 1110 includes a microphone (MIC), and when the electronic device 1100 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1104 or sent via the communication component 1116. In some embodiments, the audio component 1110 also includes a speaker for outputting audio signals.
[0168] I / O interface 1112 provides an interface between processing component 1102 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0169] The sensor assembly 1114 includes one or more sensors for providing various aspects of status assessment for the electronic device 1100. For example, the sensor assembly 1114 can detect the open / closed state of the electronic device 1100, the relative positioning of components, such as the display and keypad of the electronic device 1100, and the sensor assembly 1114 can also detect the position change of the electronic device 1100 or a component of the electronic device 1100, the presence or absence of user contact with the electronic device 1100, the orientation or acceleration / deceleration of the electronic device 1100, and the temperature change of the electronic device 1100. The sensor assembly 1114 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1114 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1114 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0170] The communication component 1116 is configured to facilitate wired or wireless communication between the electronic device 1100 and other devices. The electronic device 1100 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1116 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1116 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0171] In an exemplary embodiment, the electronic device 1100 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0172] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1104 including instructions, and the instructions can be executed by a processor 1120 of the electronic device 1100 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0173] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform a communication method, the method including any of the above methods.
[0174] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0175] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A communication method, characterized in that: Applied to a first relay device, the method includes: Establishing a link layer connection with a first short-range wireless communication device; Receive first link layer information sent by the first short-range wireless communication device, where the first link layer information includes a first protocol data unit (PDU), and a destination device of the first PDU is a second short-range wireless communication device; The first PDU is sent to a second relay device, where the second relay device is located within a communication range of the second short-range wireless communication device.
2. The communication method according to claim 1, characterized in that: The establishing a link layer connection with the first short-range wireless communication device comprises: Receiving a link layer connection request sent by the first short-range wireless communication device; Sending a link layer connection response to the first short-range wireless communication device; Establishing a link layer connection with the first short-range wireless communication device.
3. The communication method according to claim 1, characterized in that: The method further comprises: receiving a second PDU sent by the second relay device, where the second PDU is response information of the first PDU; Second link layer information is sent to the first short-range wireless communication device, where the second link layer information includes the second PDU.
4. The communication method according to claim 1, characterized in that: The method further comprises: Receive a third PDU sent by a third relay device, where the destination device of the third PDU is the first short-range wireless communication device, and the source device of the third PDU is the third short-range wireless communication device; Send third link layer information to the first short-range wireless communication device, where the third link layer information includes a third PDU.
5. The communication method according to claim 4, characterized in that: The method further comprises: receiving fourth link layer information sent by the first short-range wireless communication device, where the fourth link layer information includes a fourth PDU, where the fourth PDU is response information of the third PDU, and where the destination device of the fourth PDU is the third short-range wireless communication device; The fourth PDU is sent to the third relay device.
6. The communication method according to any one of claims 1 to 5, characterized in that: The link layer information includes PDU and information type, and the information type is one of connection request information, key request information, and communication information.
7. The communication method according to claim 6, characterized in that: The PDU is a PDU after data encryption.
8. A communication method, characterized in that: Applied to a first short-range wireless communication device, the method comprises: Establishing a link layer connection with the first relay device; First link layer information is sent to the first relay device, where the first link layer information includes a first protocol data unit (PDU), and a destination device of the first PDU is a second short-range wireless communication device.
9. The communication method according to claim 8, characterized in that: The establishing a link layer connection with the first relay device includes: Sending a link layer connection request to the first relay device; Receiving a link layer connection response sent by the first relay device; Establish a link layer connection with the first relay device.
10. The communication method according to claim 8, characterized in that: The method further comprises: Receive second link layer information sent by the first relay device, where the second link layer information includes a second PDU, and the second PDU is response information of the first PDU.
11. The communication method according to claim 8, characterized in that: The method further comprises: Receive third link layer information sent by the first relay device, where the third link layer information includes a third PDU, a destination device of the third PDU is the first short-range wireless communication device, and a source device of the third PDU is a third short-range wireless communication device.
12. The communication method according to claim 11, characterized in that: The method further comprises: Send fourth link layer information to the first relay device, where the fourth link layer information includes a fourth PDU, and the fourth PDU is response information of the third PDU.
13. The communication method according to any one of claims 8 to 12, characterized in that: The link layer information includes PDU and information type, and the information type is one of connection request information, key request information, and communication information.
14. The communication method according to claim 13, characterized in that: The PDU is the PDU after the PDU data is encrypted.
15. A communication device, characterized in that: Applied to a first relay device, the apparatus comprises: A connection module, configured to establish a link layer connection with a first short-range wireless communication device; The transceiver module is configured to receive first link layer information sent by the first short-range wireless communication device, the first link layer information includes a first protocol data unit PDU, and the destination device of the first PDU is a second short-range wireless communication device; send the first PDU to a second relay device, and the second relay device is located within the communication range of the second short-range wireless communication device.
16. A communication device, characterized in that: Applied to a first short-range wireless communication device, the apparatus comprises: A connection module, configured to establish a link layer connection with the first relay device; The transceiver module is configured to send first link layer information to the first relay device, where the first link layer information includes a first protocol data unit PDU, and the destination device of the first PDU is a second short-range wireless communication device.
17. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the communication method according to any one of claims 1 to 7 or claims 8 to 14.
18. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the communication method as claimed in any one of claims 1 to 7 or claims 8 to 14.