Method for connecting devices and electronic device
By introducing relay functionality into the management node device, the problem of direct communication between terminal node devices in the StarFlash Alliance access technology is solved, enabling more efficient device and service discovery and improving communication flexibility.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2021-09-07
- Publication Date
- 2026-06-12
AI Technical Summary
In the StarFlash Alliance access technology, multiple terminal node devices under the management node device cannot communicate directly, resulting in reduced communication flexibility between electronic devices.
The management node device has a relay function, which can relay data interaction between terminal node devices, realize device and service discovery, and improve communication flexibility.
By using relay functionality, direct communication between terminal node devices is achieved, improving the communication flexibility between electronic devices and saving signaling overhead.
Smart Images

Figure CN115776656B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and more specifically, to a method of device connection and an electronic device. Background Technology
[0002] Short-range communication enables communication between electronic devices that are relatively close to each other. With the development of the Internet of Things (IoT), new application scenarios have emerged, such as smart cars, smart homes, smart terminals, and smart manufacturing. This has led to the development of next-generation short-range access technologies (e.g., Sparklink Alliance access technologies). Taking Sparklink Alliance access technologies as an example, these include, but are not limited to: Sparklink Basic (SLB) access technology and Sparklink Low Energy (SLE) access technology.
[0003] In SLB, during communication between two electronic devices, one can act as a grant (G) node device and the other as a terminal (T) node device.
[0004] A G-node device can connect to and communicate with multiple T-node devices, but T-node devices connected to the same G-node device cannot communicate with each other, which reduces the flexibility of communication between electronic devices. Summary of the Invention
[0005] This application provides a method for connecting devices and an electronic device that can improve the flexibility of communication between electronic devices.
[0006] A first aspect provides a device connection method applied to a first electronic device, the first electronic device acting as a management node device. The method includes: the first electronic device receiving a first service query request sent by a second electronic device, wherein the second electronic device is connected to the first electronic device and acts as a terminal node device, and the first service query request is used to request a query for services of other terminal node devices connected to the first electronic device; the first electronic device determining a target electronic device based on the first service query request, the target electronic device being connected to the first electronic device and acting as a terminal node device; the first electronic device sending a second service query request to the target electronic device, the second service query request being used to request a query for services of the target electronic device; the first electronic device receiving a second service query response sent by the target electronic device, the second service query response being used to indicate service information of the target electronic device; and the first electronic device sending a first service query response to the second electronic device based on the second service query response, the first service query response being used to indicate the service information of the target electronic device.
[0007] In this embodiment, the management node device has a relay function, which can relay the data that needs to be exchanged between two terminal node devices under the management node device, realize device and service discovery between terminal node devices, thereby enabling communication between two terminal node devices and improving the flexibility of communication between electronic devices.
[0008] In conjunction with the first aspect, in one possible implementation, the first service query request includes first destination node indication information and first query service indication information; wherein, the first destination node indication information is used to indicate the terminal node device of the queried service; and the first query service indication information is used to indicate the queried service.
[0009] The second electronic device indicates the terminal node device for the queried service to the first electronic device, without needing to indicate the terminal node device that initiated the service query (i.e., the second electronic device itself), thus saving signaling overhead.
[0010] In conjunction with the first aspect, in one possible implementation, the second service query request includes first source node indication information and first query service indication information; wherein, the first source node indication information is used to indicate the terminal node device that initiates the service query; and the first query service indication information is used to indicate the service being queried.
[0011] The first electronic device instructs the target electronic device to send a service query to the terminal node device that initiated the query, without needing to instruct the terminal node device being queried (i.e., the target electronic device itself), thus saving signaling overhead.
[0012] Optionally, the first service query request may further include first source node indication information, used to indicate the terminal node device that initiated the service query.
[0013] Optionally, the second service query request may further include first destination node indication information, used to indicate the terminal node device of the queried service.
[0014] When the information included in the first service query request and the second service query request is the same, the corresponding data packet format can be designed to be the same, which can simplify the processing of data packets by the first electronic device.
[0015] In conjunction with the first aspect, in one possible implementation, the first source node indication information includes the identifier of the second electronic device and / or the address of the second electronic device.
[0016] In conjunction with the first aspect, in one possible implementation, when the first service query request includes the first destination node indication information, the first destination node indication information includes the identifier of the target electronic device and / or the address of the target electronic device; or, the first destination node indication information includes a general identifier and / or a broadcast address.
[0017] It should be noted that "general identifier" can be understood as an identifier that does not specify a device. This general identifier or broadcast address is used to indicate that the terminal node device being queried is any terminal node device other than the second electronic device connected to the first electronic device.
[0018] Optionally, the identifier of the second electronic device and the address of the second electronic device have a corresponding relationship.
[0019] Optionally, there is a correspondence between the identifier of the target electronic device and the address of the target electronic device.
[0020] Optionally, there is a correspondence between the general identifier and the broadcast address.
[0021] In conjunction with the first aspect, in one possible implementation, when the first service query request includes the first destination node indication information, and the first destination node indication information includes a general identifier and / or a broadcast address, the first electronic device determines the target electronic device according to the first service query request, including: the first electronic device determines, according to the general identifier and / or broadcast address, that the terminal node devices for the queried service are all terminal node devices connected to the first electronic device except the second electronic device, wherein the target electronic device is one of the terminal node devices for the queried service.
[0022] In conjunction with the first aspect, in one possible implementation, when the second service query request includes the first destination node indication information, the first destination node indication information includes the identifier of the target electronic device and / or the address of the target electronic device.
[0023] In conjunction with the first aspect, in one possible implementation, the second service query response includes second destination node indication information and second query service indication information; wherein, the second destination node indication information is used to indicate the terminal node device initiating the query service; and the second query service indication information is used to indicate the service of the terminal node device being queried.
[0024] The target electronic device instructs the terminal node device that initiated the query service to the first electronic device, without needing to instruct the terminal node device (i.e., the target electronic device itself) that responds to the service query, thus saving signaling overhead.
[0025] In conjunction with the first aspect, in one possible implementation, the first service query response includes second source node indication information and second query service indication information; wherein the second source node indication information is used to indicate the terminal node device responding to the service query; and the second query service indication information is used to indicate the service of the terminal node device being queried.
[0026] The first electronic device can instruct the terminal node device that responds to the service query to the second electronic device without instructing the terminal node device that initiated the query service (i.e., the second electronic device itself), thus saving signaling overhead.
[0027] Optionally, the second service query response may also include second source node indication information, used to indicate the terminal node device responding to the service query.
[0028] Optionally, the first service query response may also include second destination node indication information, used to indicate the terminal node device that initiated the query service.
[0029] When the information included in the first service query response and the second service query response is the same, the corresponding data packet format can be designed to be the same, which can simplify the processing of data packets by the first electronic device.
[0030] In conjunction with the first aspect, in one possible implementation, the second source node indication information includes the identifier of the target electronic device and / or the address of the target electronic device.
[0031] In conjunction with the first aspect, in one possible implementation, the second destination node indication information includes the identifier of the second electronic device and / or the address of the second electronic device.
[0032] In conjunction with the first aspect, in one possible implementation, the first service query request, the second service query request, the second service query response, and the first service query response are transmitted in a relay service management channel, wherein the relay service management channel is used to transmit service management data between two terminal node devices.
[0033] In this embodiment of the application, the relay service management channel is established by default after the underlying default logical link is successfully established.
[0034] In conjunction with the first aspect, in one possible implementation, the first electronic device, the second electronic device, and the target electronic device all include a basic service layer, wherein the first service query request is received by the basic service layer of the first electronic device from the basic service layer of the second electronic device; the second service query request is sent by the basic service layer of the first electronic device to the basic service layer of the target electronic device; the second service query response is received by the basic service layer of the first electronic device from the basic service layer of the target electronic device; and the first service query response is sent by the basic service layer of the first electronic device to the basic service layer of the second electronic device.
[0035] In conjunction with the first aspect, in one possible implementation, the first electronic device, the second electronic device, and the target electronic device all support StarFlash-based SLB access technology.
[0036] Secondly, a device connection method is provided, applied to a second electronic device, the second electronic device acting as a terminal node device. The method includes: the second electronic device sending a first service query request to a first electronic device, wherein the second electronic device is connected to the first electronic device, and the first electronic device acts as a management node device, the first service query request being used to request a query for services from other terminal node devices connected to the first electronic device; the second electronic device receiving a first service query response sent by the first electronic device, the first service query response being used to indicate service information of a target electronic device, wherein the target electronic device is connected to the first electronic device, and the target electronic device acts as a terminal node device.
[0037] In this embodiment, the management node device has a relay function, which can relay data between two terminal node devices under the management node device, realize device and service discovery between terminal node devices, thereby enabling communication between the two terminal node devices and improving the flexibility of communication between electronic devices.
[0038] In conjunction with the second aspect, in one possible implementation, the second electronic device includes a basic application layer and a basic service layer. Before the second electronic device sends a first service query request to the first electronic device, the implementation further includes: the basic service layer of the second electronic device receiving a third service query request sent by the basic application layer of the second electronic device, the third service query request indicating a query for services from other terminal node devices; after the second electronic device receives the first service query response sent by the first electronic device, the implementation further includes: the basic service layer of the second electronic device sending a third service query response to the basic application layer of the second electronic device, the third service query response indicating service information of the target electronic device.
[0039] In conjunction with the second aspect, in one possible implementation, the first service query request includes first destination node indication information and first query service indication information; wherein, the first destination node indication information is used to indicate the terminal node device of the queried service; and the first query service indication information is used to indicate the queried service.
[0040] Optionally, the first service query request may further include first source node indication information, used to indicate the terminal node device that initiated the service query.
[0041] In conjunction with the second aspect, in one possible implementation, the third service query request includes first query service indication information; wherein the first query service indication information is used to indicate the service being queried.
[0042] The first query service instruction information included in the first service query request is issued by the basic application layer of the second electronic device.
[0043] Optionally, the third service query request may further include at least one of a first source node indication information and a first destination node indication information; wherein, the first source node indication information is used to indicate the terminal node device that initiates the service query; and the first destination node indication information is used to indicate the terminal node device of the queried service.
[0044] The first source node indication information included in the first service query request can be added by the basic application layer or basic service layer of the second electronic device. The first destination node indication information included in the first service query request can be added by the basic application layer or basic service layer of the second electronic device.
[0045] In conjunction with the second aspect, in one possible implementation, the first source node indication information includes the identifier of the second electronic device and / or the address of the second electronic device.
[0046] In conjunction with the second aspect, in one possible implementation, the first destination node indication information includes the identifier of the target electronic device and / or the address of the target electronic device; or, the first destination node indication information includes a general identifier and / or a broadcast address, wherein the general identifier and / or broadcast address is used to indicate that the terminal node devices being queried are all terminal node devices connected to the first electronic device except for the second electronic device.
[0047] In conjunction with the second aspect, in one possible implementation, the first service query response includes second source node indication information, used to indicate the terminal node device responding to the service query; and second query service indication information, used to indicate the service of the terminal node device of the queried service.
[0048] In conjunction with the second aspect, in one possible implementation, the third service query response includes second source node indication information for indicating the terminal node device responding to the service query; and second query service indication information for indicating the service of the terminal node device being queried.
[0049] Optionally, the first service query response may further include second destination node indication information, used to indicate the terminal node device that initiated the query service.
[0050] Optionally, the third service query response may also include second destination node indication information, used to indicate the terminal node device that initiated the query service.
[0051] In conjunction with the second aspect, in one possible implementation, the second source node indication information includes the identifier of the target electronic device and / or the address of the target electronic device.
[0052] In conjunction with the second aspect, in one possible implementation, the second destination node indication information includes the identifier of the second electronic device and / or the address of the second electronic device.
[0053] In conjunction with the second aspect, in one possible implementation, the first service query request and the first service query response are transmitted in a relay service management channel between the first electronic device and the second electronic device, wherein the relay service management channel is used to transmit service management data between the two terminal node devices.
[0054] In conjunction with the second aspect, in one possible implementation, both the first electronic device and the second electronic device include a basic service layer, wherein the first service query request is sent by the basic service layer of the second electronic device to the basic service layer of the first electronic device; and the first service query response is received by the basic service layer of the second electronic device from the basic service layer of the first electronic device.
[0055] In conjunction with the second aspect, in one possible implementation, the first electronic device, the second electronic device, and the target electronic device all support StarFlash SLB access technology.
[0056] Thirdly, a device connection method is provided, applied to a target electronic device, wherein the target electronic device acts as a terminal node device. The method includes: the target electronic device receiving a second service query request sent by a first electronic device, wherein the target electronic device is connected to the first electronic device and the first electronic device acts as a management node device, and the second service query request is used to request a query for the services of the target electronic device; the target electronic device sending a second service query response to the first electronic device, wherein the second service query response is used by the first electronic device to notify a second electronic device of the service information of the target electronic device, wherein the second electronic device is connected to the first electronic device and the second electronic device acts as a terminal node device.
[0057] In this embodiment, the management node device has a relay function, which can relay data between two terminal node devices under the management node device, realize device and service discovery between terminal node devices, thereby enabling communication between the two terminal node devices and improving the flexibility of communication between electronic devices.
[0058] In conjunction with the third aspect, in one possible implementation, the target electronic device includes a basic application layer and a basic service layer. Before the target electronic device sends a second service query response to the first electronic device, the implementation further includes: the basic service layer of the target electronic device sending a fourth service query request to the basic application layer of the target electronic device, the fourth service query request being used to request a query for the services of the target electronic device; and the basic service layer of the target electronic device receiving the fourth service query response sent by the basic application layer of the target electronic device, the fourth service query response being used to indicate the service information of the target electronic device.
[0059] In conjunction with the third aspect, in one possible implementation, the second service query request includes first source node indication information, used to indicate the terminal node device initiating the service query; and first query service indication information, used to indicate the service being queried.
[0060] In conjunction with the third aspect, in one possible implementation, the fourth service query request includes first source node indication information, used to indicate the terminal node device initiating the service query; and first query service indication information, used to indicate the service being queried.
[0061] Optionally, the second service query request may further include first destination node indication information, used to indicate the terminal node device of the queried service.
[0062] Optionally, the fourth service query request may also include first destination node indication information, used to indicate the terminal node device of the queried service.
[0063] In conjunction with the third aspect, in one possible implementation, the first source node indication information includes the identifier of the second electronic device and / or the address of the second electronic device.
[0064] In conjunction with the third aspect, in one possible implementation, the first destination node indication information includes the identifier of the target electronic device and / or the address of the target electronic device.
[0065] In conjunction with the third aspect, in one possible implementation, the second service query response includes second destination node indication information and second query service indication information; wherein, the second destination node indication information is used to indicate the terminal node device initiating the query service; and the second query service indication information is used to indicate the service of the terminal node device being queried.
[0066] Optionally, the second service query response may also include the second source node indication information, used to indicate the terminal node device responding to the service query.
[0067] In conjunction with the third aspect, in one possible implementation, the fourth service query response includes second query service indication information; wherein the second query service indication information is used to indicate the service of the terminal node device of the queried service.
[0068] Optionally, the fourth service query response may further include at least one of a second source node indication information and a second destination node indication information; wherein the second source node indication information is used to indicate the terminal node device responding to the service query; and the second destination node indication information is used to indicate the terminal node device initiating the query service.
[0069] The basic service layer of the target electronic device can process the information included in the fourth service query response issued by the basic application layer and then form a second service query response to send to the first electronic device.
[0070] In conjunction with the third aspect, in one possible implementation, the second source node indication information includes the identifier of the target electronic device and / or the address of the target electronic device.
[0071] In conjunction with the third aspect, in one possible implementation, the second destination node indication information includes the identifier of the second electronic device and / or the address of the second electronic device.
[0072] In conjunction with the third aspect, in one possible implementation, the second service query request and the second service query response are transmitted in a relay service management channel between the target electronic device and the first electronic device, wherein the relay service management channel is used to transmit service management data between two terminal node devices.
[0073] In this embodiment of the application, for data in the relay service management channel, the management node forwards the data according to the destination node, and adds the source node information into the data packet before forwarding.
[0074] In conjunction with the third aspect, in one possible implementation, both the first electronic device and the target electronic device include a basic service layer, wherein the second service query request is received by the basic service layer of the target electronic device from the basic service layer of the first electronic device; and the second service query response is sent by the basic service layer of the target electronic device to the basic service layer of the first electronic device.
[0075] In conjunction with the third aspect, in one possible implementation, the first electronic device, the second electronic device, and the target electronic device all support StarFlash-based SLB access technology.
[0076] Fourthly, a device connection method is provided, applied to a first electronic device, the first electronic device acting as a management node device. The method includes: the first electronic device receiving a channel establishment request sent by a second electronic device, the channel establishment request being used to request the first electronic device to establish a channel between the second electronic device and a target electronic device, wherein the second electronic device and the target electronic device are respectively connected to the first electronic device, and both the second electronic device and the target electronic device act as terminal node devices; the first electronic device establishing a channel with the second electronic device; the first electronic device establishing a channel with the target electronic device; wherein the channel between the first electronic device and the second electronic device and the channel between the first electronic device and the target electronic device are used to transmit information between the second electronic device and the target electronic device.
[0077] In this embodiment, the management node device has a relay function, which can relay the data of two terminal node devices under the management node device, realize data transmission between terminal node devices, and improve the flexibility of communication between electronic devices.
[0078] In conjunction with the fourth aspect, in one possible implementation, the first electronic device includes a first basic service layer and a first access layer. The establishment of a channel between the first electronic device and the second electronic device includes: the first basic service layer generating an identifier for a first transmission channel, the identifier being used to identify the first transmission channel; the first basic service layer sending first information to the first access layer, the first information being used to request a logical channel for the first transmission channel; the first basic service layer receiving second information sent by the first access layer, the second information being used to indicate that the first transmission channel and the first logical channel establish a mapping relationship; the first basic service layer sending third information to the second electronic device, the third information being used to indicate that the second electronic device establishes a third transmission channel; the first basic service layer receiving fourth information sent by the second electronic device, the fourth information being used to indicate that the third transmission channel and the first logical channel establish a mapping relationship, and that the third transmission channel and the first transmission channel establish a mapping relationship, wherein the third transmission channel has a mapping relationship with a first port of the second electronic device; and the first basic service layer determining, based on the fourth information, that the channel between the first electronic device and the second electronic device is established, wherein the channel between the first electronic device and the second electronic device includes the first transmission channel, the first logical channel, and the third transmission channel.
[0079] The establishment of a channel between the first electronic device and the target electronic device includes: the first basic service layer generating an identifier for a second transmission channel, the identifier of which is used to identify the second transmission channel; the first basic service layer sending fifth information to the first access layer, the fifth information being used to request a logical channel for the second transmission channel; the first basic service layer receiving sixth information sent by the first access layer, the sixth information being used to instruct the second transmission channel to establish a mapping relationship with the second logical channel; the first basic service layer sending seventh information to the target electronic device, the seventh information being used to instruct the target electronic device to establish a fourth transmission channel; the first basic service layer receiving eighth information sent by the target electronic device, the eighth information being used to instruct the fourth transmission channel to establish a mapping relationship with the second logical channel and the fourth transmission channel to establish a mapping relationship with the second transmission channel, wherein the fourth transmission channel has a mapping relationship with a second port of the target electronic device; the first basic service layer determining, based on the eighth information, that the channel between the first electronic device and the target electronic device is established, wherein the channel between the first electronic device and the target electronic device includes the second transmission channel, the second logical channel, and the fourth transmission channel; wherein the channel between the first electronic device and the second electronic device, and the channel between the first electronic device and the target electronic device, are used to transmit service data exchanged between the target electronic device and the second electronic device.
[0080] The first electronic device completes the mapping relationship between various inter-layer channels with the second electronic device and the target electronic device, thereby establishing a channel for transmitting service data between the second electronic device and the target electronic device.
[0081] In this embodiment, since the upper-layer third transmission channel can only be used after the mapping relationship is established between the lower-layer first logical channel and the upper-layer third transmission channel, the fourth information is also used to indicate that the establishment of the third transmission channel is complete. The understanding of the eighth information is similar and will not be repeated.
[0082] In this embodiment, the third transmission channel established by the second electronic device and the first transmission channel established by the first electronic device are both mapped to the first logical channel, but the identifiers of the third transmission channel and the first transmission channel may be different. Similarly, the fourth transmission channel established by the target electronic device and the second transmission channel established by the first electronic device are both mapped to the second logical channel, but the identifiers of the fourth transmission channel and the second transmission channel may be different.
[0083] In conjunction with the fourth aspect, in one possible implementation, the first basic service layer includes a channel management module and a relay module. The channel management module is used to manage the transmission channels in the first basic service layer, and the relay module is used to relay and manage the data transmitted between the second electronic device and the target electronic device. The method further includes: the channel management module sending a channel mapping table to the relay module, the channel mapping table including the mapping relationship between the first transmission channel and the third transmission channel, the mapping relationship between the second transmission channel and the fourth transmission channel, and the mapping relationship between the first transmission channel and the second transmission channel.
[0084] In this embodiment, the first electronic device maintains a channel mapping table, which can relay data transmitted between two terminal node devices.
[0085] In conjunction with the fourth aspect, one possible implementation further includes: the first electronic device sending a channel establishment response to the second electronic device, the channel establishment response indicating that the channel between the second electronic device and the target electronic device has been established.
[0086] In conjunction with the fourth aspect, one possible implementation further includes: the first electronic device receiving a first data packet sent by the second electronic device, the first data packet being transmitted through a channel between the first electronic device and the second electronic device, the first data packet carrying an identifier of the first transmission channel; the first electronic device replacing the identifier of the first transmission channel in the first data packet with the identifier of the fourth transmission channel according to a channel relationship mapping table to generate a second data packet; the first electronic device sending the second data packet to the target electronic device; wherein the channel relationship mapping table includes a mapping relationship between the first transmission channel and the third transmission channel, a mapping relationship between the second transmission channel and the fourth transmission channel, and a mapping relationship between the first transmission channel and the second transmission channel.
[0087] In conjunction with the fourth aspect, in one possible implementation, the first electronic device includes a first basic service layer and a first access layer. The establishment of a channel between the first electronic device and the second electronic device includes: the first basic service layer generating an identifier for a first tunnel channel, the identifier of which identifies the first tunnel channel; the first basic service layer sending first information to the first access layer, the first information being used to request a logical channel for the first tunnel channel; the first basic service layer receiving second information sent by the first access layer, the second information indicating that a mapping relationship is established between the first tunnel channel and the first logical channel; the first basic service layer sending third information to the second electronic device, the third information indicating that the second electronic device establishes a third tunnel channel, wherein the identifier of the third tunnel channel is the same as the identifier of the first tunnel channel; the first basic service layer receiving fourth information sent by the second electronic device, the fourth information indicating that the second electronic device establishes a mapping relationship between the third tunnel channel and the first logical channel, and that the third tunnel channel and the first tunnel channel establish a mapping relationship; and the first basic service layer determining, based on the fourth information, that the channel between the first electronic device and the second electronic device is established successfully, wherein the channel between the first electronic device and the second electronic device includes the third tunnel channel, the first logical channel, and the first tunnel channel.
[0088] The establishment of a channel between the first electronic device and the target electronic device includes: the first basic service layer generating an identifier for a second tunnel channel, the identifier of which is used to identify the second tunnel channel; the first basic service layer sending fifth information to the first access layer, the fifth information being used to request a logical channel for the second tunnel channel; the first basic service layer receiving sixth information sent by the first access layer, the sixth information being used to instruct the second tunnel channel to establish a mapping relationship with the second logical channel; the first basic service layer sending seventh information to the target electronic device, the seventh information being used to instruct the target electronic device to establish a fourth tunnel channel, wherein the identifier of the fourth tunnel channel is the same as the identifier of the second tunnel channel; the first basic service layer receiving... The target electronic device sends an eighth message, which instructs the target electronic device to establish a mapping relationship between the fourth tunnel channel and the second logical channel, and the fourth tunnel channel and the second tunnel channel are also established in a mapping relationship. Based on the eighth message, the first basic service layer determines that the channel between the first electronic device and the target electronic device is established. The channel between the first electronic device and the target electronic device includes the fourth tunnel channel, the second logical channel, and the second tunnel channel. The channel between the first electronic device and the second electronic device, and the channel between the first electronic device and the target electronic device, are used to transmit service data and signaling data exchanged between the first electronic device and the second electronic device.
[0089] The first electronic device completes the mapping relationship between various inter-layer channels with the second electronic device and the target electronic device, thereby establishing a channel for transmitting signaling data and service data between the second electronic device and the target electronic device.
[0090] In this embodiment, since the upper-layer third tunnel channel can only be used after the mapping relationship between the lower-layer first logical channel and the upper-layer third tunnel channel is established, the fourth information is also used to indicate that the establishment of the third tunnel channel is complete. The understanding of the eighth information is similar and will not be repeated.
[0091] In conjunction with the fourth aspect, one possible implementation further includes: the first basic service layer establishing a channel mapping table, wherein the channel mapping table includes the mapping relationship between the first tunnel channel and the second tunnel channel.
[0092] In this embodiment of the application, after the first electronic device establishes a channel mapping table, it can relay the data transmitted between two terminal node devices according to the channel mapping table.
[0093] In conjunction with the fourth aspect, in one possible implementation, the method further includes: the first electronic device receiving a first request sent by the second electronic device, the first request being used to request the establishment of a transmission channel for transmitting services with the target electronic device, the first request including an identifier of a first transmission channel, the first transmission channel being a channel above the third tunnel channel, wherein the first request is transmitted through a first relay control channel, the third tunnel channel, the first logical channel, and the first tunnel channel, the first relay control channel being established by default after the channel between the first electronic device and the second electronic device is established; the first electronic device forwarding the first request to the target electronic device; the first electronic device receiving a first response sent by the target electronic device, the first response being used to indicate that the transmission channel for transmitting services has been established, the first response including an identifier of a second transmission channel and an identifier of the first transmission channel, the second transmission channel being a channel above the fourth tunnel channel, wherein the second command is transmitted through a second relay control channel, the fourth tunnel channel, the second logical channel, and the second tunnel channel, the second relay control channel being established by default after the channel between the first electronic device and the target electronic device is established; the first electronic device forwarding the first response to the second electronic device.
[0094] In conjunction with the fourth aspect, in one possible implementation, the first transmission channel is mapped to the third tunnel channel, and the second transmission channel is mapped to the fourth tunnel channel.
[0095] In this embodiment of the application, the first tunnel passage and the third tunnel passage have the same identifier, and the second tunnel passage and the fourth tunnel passage have the same identifier.
[0096] In conjunction with the fourth aspect, in one possible implementation, the first transmission channel is mapped to the first port of the second electronic device, and the second transmission channel is mapped to the second port of the target electronic device.
[0097] In conjunction with the fourth aspect, one possible implementation further includes: the first electronic device receiving a first data packet sent by the second electronic device, the first data packet being transmitted through a channel between the first electronic device and the second electronic device, the first data packet carrying an identifier of the second transmission channel and an identifier of the second tunnel channel; the first electronic device forwarding the first data packet to the target electronic device through a channel relationship mapping table according to a channel relationship mapping table; wherein the channel relationship mapping table includes a mapping relationship between the first tunnel channel and the second tunnel channel.
[0098] In other words, the first data packet is sent to the target electronic device through the first transmission channel, the third tunnel channel, the first logical channel, the first tunnel channel, the second tunnel channel, the second logical channel, the fourth tunnel channel, and the second transmission channel.
[0099] In conjunction with the fourth aspect, in one possible implementation, the channel establishment request includes first indication information, which indicates the channel establishment mode between the second electronic device and the target electronic device.
[0100] In conjunction with the fourth aspect, in one possible implementation, the channel establishment request includes the identifier of the target electronic device and / or the address of the target electronic device.
[0101] In conjunction with the fourth aspect, in one possible implementation, the channel establishment request includes port information of the second electronic device and the target electronic device, the port information being negotiated between the second electronic device and the target electronic device.
[0102] In conjunction with the fourth aspect, in one possible implementation, after the first electronic device receives the channel establishment request sent by the second electronic device, the method further includes: the first electronic device negotiating channel parameters with the second electronic device and the target electronic device respectively.
[0103] In conjunction with the fourth aspect, in one possible implementation, the first electronic device, the second electronic device, and the target electronic device all support StarFlash SLB access technology.
[0104] Fifthly, a method for device connection is provided, applied to a second electronic device, the second electronic device acting as a terminal node device. The method includes: the second electronic device sending a channel establishment request to a first electronic device, the channel establishment request being used to request the first electronic device to establish a channel between the second electronic device and a target electronic device, wherein the second electronic device and the target electronic device are respectively connected to the first electronic device, the first electronic device acting as a management node device, and the target electronic device acting as a terminal node device; the second electronic device receiving a channel establishment response sent by the first electronic device, the channel establishment response being used to indicate that the channel between the second electronic device and the target electronic device has been established; wherein the channel between the second electronic device and the target electronic device includes a channel between the first electronic device and the second electronic device and a channel between the first electronic device and the target electronic device.
[0105] A sixth aspect provides an electronic device comprising a module or unit for performing the method described in the first aspect or any possible implementation thereof. The module or unit may be hardware circuitry, software, or a combination of hardware circuitry and software implementation.
[0106] A seventh aspect provides an electronic device including a module or unit for performing the method of the second aspect or any possible implementation thereof. The module or unit may be hardware circuitry, software, or a combination of hardware circuitry and software implementation.
[0107] Eighthly, an electronic device is provided, comprising a module or unit for performing the method of the third aspect or any possible implementation thereof. The module or unit may be hardware circuitry, software, or a combination of hardware circuitry and software implementation.
[0108] A ninth aspect provides an electronic device including a module or unit for performing the method of the fourth aspect or any possible implementation thereof. The module or unit may be hardware circuitry, software, or a combination of hardware circuitry and software implementation.
[0109] In a tenth aspect, an electronic device is provided, comprising a module or unit for performing the method of the fifth aspect or any possible implementation thereof. The module or unit may be hardware circuitry, software, or a combination of hardware circuitry and software implementation.
[0110] Eleventhly, an apparatus is provided, comprising: a memory for storing a computer program; and a processor for executing the computer program stored in the memory, such that the apparatus performs the method of any one of the first to fifth aspects or any possible implementation thereof.
[0111] Optionally, the device may also include a transceiver.
[0112] In a twelfth aspect, an apparatus is provided, comprising: at least one processor and a communication interface, the communication interface being configured to provide input or output of instructions and / or data to the at least one processor, the at least one processor executing code instructions such that the apparatus performs a method of any one of the first to fifth aspects or any possible implementation thereof.
[0113] In a thirteenth aspect, a chip system is provided, including at least one processor, wherein when program instructions are executed in the at least one processor, the at least one processor causes the at least one processor to perform any of the first to fifth aspects or any possible implementation thereof.
[0114] In one possible design, the chip system also includes a memory for storing program instructions and / or data. The chip system can be composed of chips or may include chips and other discrete components.
[0115] In one possible design, the chip system further includes a transceiver for providing input or output of instructions and / or data to the at least one processor.
[0116] In a fourteenth aspect, a computer program product is provided, the computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform any of the first to fifth aspects or any possible implementation thereof.
[0117] It should be noted that the above-mentioned computer program code can be stored in whole or in part on the first storage medium, wherein the first storage medium can be packaged together with the processor or packaged separately from the processor. This application embodiment does not specifically limit this.
[0118] In a fifteenth aspect, a computer-readable medium is provided storing computer-executable instructions that, when executed on a computer, cause the computer to perform any of the first to fifth aspects or any possible implementation thereof.
[0119] In a sixteenth aspect, a communication system is provided, comprising the electronic devices of the sixth aspect, the seventh aspect, and the eighth aspect.
[0120] In other words, the communication system includes a first electronic device for performing the method in the first aspect or any possible implementation of the first aspect; a second electronic device for performing the method in the second aspect or any possible implementation of the second aspect; and a target electronic device for performing the method in the third aspect or any possible implementation of the third aspect.
[0121] In a seventeenth aspect, a communication system is provided, including the electronic device of the ninth aspect and two terminal node devices connected to the electronic device.
[0122] In other words, the communication system includes: a first electronic device, which is a management node device for executing the method in the fourth aspect or any possible implementation of the fourth aspect; a second electronic device and a target electronic device, which are respectively connected to the first electronic device, and both the second electronic device and the target electronic device are terminal node devices. Attached Figure Description
[0123] Figure 1 This is a schematic diagram of a communication system to which embodiments of this application are applicable.
[0124] Figure 2 This is a schematic diagram of the protocol architecture provided in the embodiments of this application.
[0125] Figure 3 This is a schematic flowchart of the service discovery method between T nodes provided in the embodiments of this application.
[0126] Figure 4 This is a schematic flowchart illustrating the method for establishing a relay service channel provided in the embodiments of this application.
[0127] Figure 5 This is a schematic flowchart of a method for establishing a relay tunnel provided in an embodiment of this application.
[0128] Figure 6 yes Figure 4 and Figure 5 A schematic diagram of the scenario for the method shown.
[0129] Figure 7-8 This is a schematic flowchart of a device connection method provided in an embodiment of this application.
[0130] Figure 9 This is a schematic flowchart illustrating another device connection method provided in an embodiment of this application.
[0131] Figure 10-11 This is a schematic flowchart of a device connection method provided in an embodiment of this application.
[0132] Figure 12 This is a schematic structural diagram of a device provided in an embodiment of this application.
[0133] Figure 13 This is a schematic structural diagram of another device provided in the embodiments of this application. Detailed Implementation
[0134] The technical solutions in this application will now be described with reference to the accompanying drawings.
[0135] Short-range communication enables communication between electronic devices located close to each other. Current mainstream short-range communication access technologies include Wi-Fi, Bluetooth, and ZigBee. With the development of the Internet of Things (IoT), new application scenarios such as smart cars, smart homes, smart terminals, and smart manufacturing have emerged, giving rise to next-generation short-range access technologies (e.g., Sparklink Alliance access technologies). Taking Sparklink Alliance access technologies as an example, they include, but are not limited to, Sparklink Basic (SLB) access technology and Sparklink Low Energy (SLE) access technology. SLB access technology can support high-bandwidth services such as screen projection, virtual reality (VR), and vehicular communication, while SLE access technology can support low-bandwidth, low-data-rate, and low-power services such as audio playback, keyboard, mouse, and electronic pen communication. For ease of description, in the following embodiments, SLB access technology will be referred to as SLB, and SLE access technology as SLE. Unless otherwise specified, the access technology mentioned in the following description refers to short-range access technology.
[0136] Figure 1 A schematic diagram of a communication system provided in an embodiment of this application is shown.
[0137] like Figure 1 As shown, the communication system 100 includes a first electronic device (e.g., first electronic device 110) and at least one second electronic device (e.g., second electronic devices 121, 122). The first electronic device and each of the second electronic devices can establish a connection for communication via short-range access technology. It should be understood that... Figure 1 The communication system shown is for illustrative purposes only. The communication system 100 may also include other devices, such as base stations, but this application does not limit this.
[0138] In this application embodiment, the first electronic device or the second electronic device can be any device with wireless transceiver function, including but not limited to cellular phones, cordless phones, session initiation protocol (SIP) phones, smartphones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication functions, computing devices, in-vehicle devices, wearable devices, drone devices, electronic devices in the Internet of Things or the Internet of Vehicles, and other devices connected to a wireless modem.
[0139] The first or second electronic device can also be an electronic device in virtual reality (VR), augmented reality (AR), industrial control (e.g., smart manufacturing), self-driving, remote medical care, smart grid, smart city, smart home, etc.
[0140] The first or second electronic device can also be a personal portable electronic device, computer peripherals, and various household or industrial electrical devices, including but not limited to smartphones, smart screens, smart air conditioners, smart alarm clocks, robot vacuum cleaners, smart speakers (such as artificial intelligence (AI) speakers and high fidelity (HiFi) speakers), smart sensors, televisions, wireless headphones, VR headsets, tablet computers, monitors, cameras, laptop computers, in-vehicle computers, in-vehicle terminals (such as microphones and speakers), projectors, printers, keyboards, mice, e-books, smart wristbands, smart watches, smart glasses, smart cars, smart lathes, smart monitoring equipment, etc.
[0141] As an example, not a limitation. Figure 1The diagram illustrates a communication system 100 including a first electronic device 110, a second electronic device 121, and a second electronic device 122, wherein the first electronic device 110 is a router, the second electronic device 121 is a mobile phone, and the second electronic device 122 is a printer. However, it should be understood that the communication system 100 may include any number of first and second electronic devices, and the first and second electronic devices may be any of the aforementioned types of electronic devices. This application does not limit the number or type of first and second electronic devices included in the communication system 100.
[0142] In this embodiment of the application, the first electronic device and the second electronic device may support at least one short-range access technology.
[0143] In some embodiments, both the first electronic device and the second electronic device support SLB access technology. Furthermore, the first electronic device and / or the second electronic device may also support SLE access technology. For example, mobile phones, tablets, wearable devices, and other devices can simultaneously support both SLE and SLB. As another example, VR glasses, in-vehicle control panels, and cameras can support SLB. Supporting only SLE access technology is not the focus of this application and will not be described further.
[0144] In this embodiment of the application, during communication between the first electronic device and the second electronic device, one of the electronic devices can act as a management (grant, G) node device or master control node device (referred to as G node), and the other electronic device can act as a terminal (T) node device (referred to as T node). For example, as shown... Figure 1 As shown, the first electronic device 110 can be used as a G node device, while the second electronic devices 121 and 122 can be used as T node devices.
[0145] Whether an electronic device acts as a G-node device or a T-node device can be referred to as whether its role is a G-node device or a T-node device. For example, the first electronic device 110 acts as a G-node device, meaning its role is a G-node device; the second electronic device 121 acts as a T-node device, meaning its role is a T-node device. Generally, an electronic device acting as a G-node device can perform unified scheduling and management of resources.
[0146] In SLB, a G node can connect to and communicate with multiple T nodes, but T nodes connected to the same G node cannot communicate with each other. Figure 1For example, if a first electronic device communicates with at least one second electronic device based on SLB access technology, the first electronic device can be a G-node device, and the at least one second electronic device can be a T-node device. Since the two T-node devices (e.g., second electronic device 121 and second electronic device 122) are unaware of each other's existence and cannot connect, they also cannot communicate directly with each other. This scenario reduces the flexibility of communication between electronic devices.
[0147] To enable communication between T-node devices and improve the flexibility of communication between electronic devices based on SLB access technology, this application provides a device connection method that enables device discovery, service discovery, and data transmission between T-node devices. Specifically, the G-node device in this application embodiment has a relay function, capable of transmitting signaling and data sent and received between two T-node devices, thereby enabling SLB access technology to support communication between T-node devices. A detailed description will follow with reference to the accompanying drawings.
[0148] To support the next generation of wireless short-range communication technology and realize the complete process of short-range services, a completely new protocol framework needs to be established. Figure 2 A schematic diagram of the protocol architecture for short-range wireless communication provided in an embodiment of this application is shown. This protocol architecture can be applied to any electronic device capable of short-range communication, for example, it can be applied to... Figure 1 The first electronic device and the second electronic device in the communication system 100 shown.
[0149] like Figure 2 As shown, this protocol architecture includes, but is not limited to, a host and a controller. The host is a higher-layer protocol than the controller, and includes a basic application layer and a basic service layer. The controller, also known as the access layer, is the lowest layer of the protocol architecture.
[0150] refer to Figure 2 In other words, the protocol architecture 200 can include, from bottom to top, an access layer 210, a basic service layer 220, and a basic application layer 230. The access layer, basic service layer, and basic application layer will be described in detail below.
[0151] Access layer 210 is primarily responsible for processing the underlying logical links, such as establishing, reconfiguring, and deleting them, to meet the service requirements of basic service layer 220 (such as reliable data, real-time data, etc.). These logical links are used to transmit services between two electronic devices. Access layer 210 may further include a data link layer and a physical layer. In some embodiments, the data link layer may include a link control layer and a media access layer. Each layer implements its respective function to support access layer 210.
[0152] A logical channel (LC) is established in the access layer 210. This logical channel is the basis for establishing the transmission channel (TC) in the upper-layer basic service layer. Only after the logical channel is successfully established can the transmission channel of the basic service layer be used. To distinguish logical channels, a logical channel identification (LCID) is defined to uniquely identify the logical channel.
[0153] Access layer 210 can support various access technologies, including but not limited to SLB access technology, SLE access technology, and other access technologies such as Bluetooth Low Energy (BLE) technology and other future Starlight Alliance access technologies. This application embodiment uses SLB access technology as an example to introduce the architecture of access layer 210. It is understood that the name SLB access technology is merely exemplary and should not be construed as limiting the embodiments of this application. In other embodiments or future architectures, SLB may use other names.
[0154] The Basic Service Layer 220, located between the Access Layer 210 and the Basic Application Layer 230, is a protocol layer containing multiple functional units. It is decoupled from business logic to implement common functional flows. Specifically, the Basic Service Layer is primarily responsible for the creation, addition, deletion, and release of transmission channels, as well as the control of logical links (e.g., the selection of access technologies), to meet the business requirements of the Basic Application Layer 230 (e.g., traffic, rate, audio quality, resolution). The design goal of the Basic Service Layer 220 is to be compatible with multiple access layer technologies, such as the SLB and SLE access technologies mentioned above, and to retain the ability to be compatible with more access technologies in the future.
[0155] The basic service layer 220 may include multiple modules or functional units that achieve the above design goals, including but not limited to: device discovery module, service management module, channel management module, quality of service (QoS) management module, security management module, measurement management module, multi-domain coordination module, 5G convergence module, and transmission and control adaptation module.
[0156] The device discovery module is used to discover devices when there is no connection to them. Specifically, the device discovery module broadcasts its own device capabilities and scans for peer devices that meet the business requirements.
[0157] The service management module is used to discover and operate services on the device. Specifically, the service management module defines a data structure that provides control commands and small data transmission for the business function set of the basic application layer.
[0158] The channel management module is used to manage transmission channels, including creating, adding, deleting, and releasing transmission channels. Specifically, the channel management module is used by the basic application layer to apply for transmission channels for data flow transmission based on the business identifier (BID) and the business's QoS capabilities. It manages the establishment and release of transmission channels for businesses and maintains the mapping relationship between transmission channels and logical links.
[0159] The QoS management module is used to manage and negotiate the QoS of transmission. Specifically, the QoS management module is used for managing the static table of QoS requests for services, and negotiating QoS with peer devices.
[0160] The security management module is responsible for secure connections at the basic service layer.
[0161] The measurement management module is used to configure the underlying measurement and scheduling for power control and other purposes.
[0162] In scenarios with multiple domains (subnets), the multi-domain coordination module enables information exchange between domains, avoids interference between multiple domains, and balances the load.
[0163] The 5G convergence module is used to establish a channel with cellular 5G remote management capabilities, and through authentication and authorization mechanisms, enables devices with cellular 5G remote control functions.
[0164] The transmission and control adapter module is used for data transmission and enables functions such as segmentation and reassembly, flow control, and data splitting and aggregation on the transmission channel.
[0165] In this embodiment of the application, the transmission and control adaptation module includes a sub-module: a relay module, used for transmitting relay data.
[0166] Here, relay data can be understood as data transmitted between two T nodes that needs to be relayed through a G node. Relay data includes relay service management data and relay business data, where relay service management data is data related to service management, and relay business data is data related to business operations.
[0167] Since the SLB access layer protocol does not support direct communication between T nodes, and the physical layer, media access layer, and link control layer of access layer 210 also do not support direct communication between T nodes, in this embodiment, the host side of the G node performs the relay function for service management data and business data between the two T nodes. To minimize the data latency between T nodes, the relay module of the G node is located at the lowest level on the host side and can be used as a submodule of the transmission and control adaptation module.
[0168] A transmission channel (TC) is established in the basic service layer 220. To distinguish transmission channels, a transmission channel identification (TCID) is defined to uniquely identify the transmission channel.
[0169] On the one hand, the transmission of the basic service layer 220 can be divided into control plane transmission and service plane transmission. Accordingly, the transmission channels in the basic service layer 220 may include control channels and service channels, wherein the control channel is used to transmit control plane data and the service channel is used to transmit service plane data.
[0170] On the other hand, depending on whether the transmission channel is established by default, the transmission channels in the basic service layer 220 can include default transmission channels and non-default transmission channels. The default transmission channel is generally established automatically after the underlying default logical link is established. Non-default transmission channels are established based on business needs.
[0171] In this embodiment, the service channel may include a relay service channel and a non-relay service channel. The relay service channel is used to transmit service data between T nodes, and the non-relay service channel is used to transmit service data between T nodes and G nodes. It should be noted that the "service data between T nodes" refers to service data relayed between T nodes via G nodes, where the source device of the service data is T node, and the destination device is T node. Although the service data is forwarded by G nodes, G nodes only act as relays; G nodes are not the destination device of the service data. In this embodiment, G nodes can be referred to as relay devices or intermediate node devices. "Service data between T nodes and G nodes" refers to service data directly communicated between T nodes and G nodes, where one of G nodes and T nodes is the source device of the service data, and the other is the destination device.
[0172] In other words, if the source node device and the destination node device are a G node device and a T node device respectively, then they transmit services through a non-relay service channel, and the transmitted services can be called non-relay services. If both the source node device and the destination node device are T node devices, and a G node device is needed for relaying, then they transmit services through a relay service channel, and the transmitted services can be called relay services.
[0173] In the following embodiments, similar descriptions are understood in the same way and will not be explained one by one. In the embodiments of this application, the service channel is a non-default transmission channel, which is established according to the needs when there are service requirements.
[0174] In this embodiment, the control channel is used to transmit signaling between node T and node G. Here, "signaling between node T and node G" refers to signaling for direct communication between node T and node G, where one of node G and node T is the source device of the signaling, and the other is the target device. In this embodiment, the control channel is the default transmission channel.
[0175] In this embodiment of the application, the default transmission channel may include a control channel, a service management channel, a relay service management channel, etc.
[0176] Specifically, the control channel is a channel designed within the basic service layer. The corresponding control channel can only be used after the logical channel is established. The establishment of the control channel is fundamental to establishing service channels between electronic devices. In this embodiment, the control channel is used to transmit signaling between the T node and the G node.
[0177] The service management channel is automatically established when the default logical channel is established. In this embodiment, the service management channel is used to transmit service management data between node T and node G.
[0178] The relay service management channel is also a pre-designed channel in the basic service layer. The corresponding relay service management channel can only be used after the default logical channel is established. The relay service management channel is used to transmit service management data between T nodes (i.e., service management data between T nodes that needs to be relayed through a G node). For example, when a T node queries whether other T nodes have a specific service (such as audio service, video service, photo service, etc.), or when a T node queries which services other T nodes possess (such as which primary and / or secondary services they possess), the data exchanged between the two T nodes is transmitted through the relay service management channel. Here, a primary service can be understood as a service that can exist independently, and a secondary service can be understood as a service that depends on a primary service and cannot exist independently.
[0179] In some embodiments, the default transmission channel may further include a relay control channel. The relay control channel is a channel in the basic service layer used to transmit signaling between T nodes. The relay control channel is used only in tunnel relay mode. It is automatically established when a tunnel channel is established and deleted when a tunnel channel is deleted. The tunnel channel referred to here is the channel between the basic service layer and the access layer; that is, it is the channel between the transmission channel and the logical channel. In other words, the tunnel channel can receive data or signaling from the transmission channel (e.g., a service channel or control channel) upwards and transmit data or signaling to the logical channel downwards. The relevant descriptions of relay control channels, tunnel channels, and tunnel relay modes will be introduced in conjunction with specific embodiments and will not be detailed here.
[0180] The basic application layer 230 is primarily responsible for handling the different business requirements of upper-layer applications (APPs) and routing data to the basic service layer 220. Depending on the different business categories, the basic application layer 230 can include multiple sets of business functions (also known as business modules or business frameworks), such as audio / video frameworks, data frameworks, etc. Each set of business functions includes the categorized data processing for the business.
[0181] For example, such as Figure 2 As shown, the application layer 230 may include a general perception framework, a general device management framework, a general audio / video framework, and a general data framework. The general perception framework includes the processing of perception data; the general device management framework includes the processing of device management data; the general audio / video framework includes the processing of audio / video data, such as encoding / decoding; and the general data framework includes the processing of file data, such as encryption and compression. Different sets of business functions can be distinguished by business identification (BID).
[0182] In the basic application layer 230, the channel is a port, and multiple ports can be mapped to the same transmission channel.
[0183] In this embodiment, the basic service layer 220 and the basic application layer 230 can be collectively referred to as the upper-layer protocol or the Host protocol. The Host protocol can adapt to the underlying access layer 210 and support the needs of different services. Regardless of the access technology supported by the access layer, the upper layer can adopt a unified Host protocol. Specifically, the Host protocol can provide the service module with the ability to initiate service requests and to transmit and control service data.
[0184] To achieve complete service transmission, channels in different layers of the protocol architecture 200 are mapped. Specifically, ports in the basic application layer 230 are mapped to transmission channels in the basic service layer 220, where multiple ports can be mapped to the same transmission channel. Transmission channels in the basic service layer 220 are mapped to logical channels in the access layer 210, where multiple transmission channels can be mapped to the same logical channel. Each logical channel corresponds to one access technology. When service data needs to be transmitted, the basic application layer 230 transmits the data from the ports to the basic service layer 220 via a data flow. The basic service layer 220 then selects one or more transmission channels for transmission. Because transmission channels and logical channels are mapped, the access layer 210, upon receiving data, uses the corresponding logical channel to continue transmission.
[0185] In this application embodiment, communication between T nodes mainly involves the following scenarios: device and service discovery between T nodes; and data transmission between T nodes. Device and service discovery between T nodes is the foundation for business data transmission between two T nodes. The following will use... Figure 1 Taking the example of the first electronic device 110 being a G node device (hereinafter referred to as G node), the second electronic device 121 being a first T node device (hereinafter referred to as first T node, denoted as T1), and the second electronic device 122 being a second T node device (hereinafter referred to as second T node, denoted as T2), the process of device and service discovery and data transmission between the two T nodes will be described in detail.
[0186] Figure 3 A schematic flowchart illustrating a service discovery method between T nodes according to an embodiment of this application is shown. The implementation of this process involves a first T node, a G node, and a second T node, each node having the following characteristics: Figure 2 The protocol architecture 200 is shown. In this embodiment, "T-node device and service discovery" includes device and service discovery between two T-nodes, where both T-nodes are connected to the same G-node. The T-node initiating the discovery process can be called the discoverer, and the T-node that can be discovered by the discoverer can be called the discoverer. Figure 3 The method 300 shown includes steps S301 to S311, which describe the process by which the first T node discovers other T nodes. The following section combines... Figure 3 Each step is described in detail.
[0187] S301, the basic application layer of the first T node sends a service query request #A to the relay module in the basic service layer.
[0188] The service query request #A is used to request a query for the services of other T nodes. For example, the service query request #A is used to request a query for other T nodes that have the first service (i.e., a specified service query), or to request a query for which services other T nodes have.
[0189] Here, the first service includes, but is not limited to: audio service, video service, photo service, printing service, navigation service, alarm clock service, etc. In this embodiment, the type of the first service is not specifically limited; it can be any service supported by the first T node.
[0190] It should be noted that the first T node and the other T nodes being queried (or discovered) should be connected to the same G node.
[0191] In some embodiments, the service query request #A may include information for querying the service. Optionally, the service query request #A may also include at least one of information indicating the source node and information indicating the target node. The content of each piece of information is described in detail below.
[0192] In one example, the information used to indicate the source node may include the source node's identifier and / or the source node's address.
[0193] The identifier of the source node can be an identifier obtained at the factory, such as a device identifier (Device ID), a unique device identifier (UDID), a universally unique identifier (UUID), or an international mobile equipment identity (IMEI). Alternatively, the identifier of the source node can be an identifier assigned by the G node it connects to; for example, a G node can assign an identifier to its connected T nodes to distinguish them from other T nodes. In this implementation, the sender of the service query request #A is the first T node; therefore, the identifier of the source node is specifically the identifier of the first T node.
[0194] The address of the source node can be a device address obtained at the factory, such as a media access control (MAC) address or a physical address. Alternatively, the address of the source node can be an address assigned by the network after connection. In this embodiment, the sender of the service query request #A is the first T node; therefore, the address of the source node is specifically the address of the first T node.
[0195] In this embodiment, the source node's identifier and the source node's address can have a corresponding relationship. Based on one of these pieces of information and their corresponding relationship, the other piece of information can be obtained. For example, based on the source node's identifier and its corresponding relationship, the source node's address can be obtained.
[0196] In this embodiment of the application, the information used to indicate the source node can be stored in the basic application layer and / or basic service layer of the first T node.
[0197] In one example, the information used to indicate the target node may include the target node's identifier and / or the target node's address.
[0198] The identifier of the target node can be an identifier obtained at the factory, such as Device ID, UDID, UUID, IMEI, etc. Alternatively, the identifier of the target node can be an identifier assigned by the G node connected to it. It is understood that the G node should be a node connected to both the source node and the target node.
[0199] In some embodiments, if the source node specifies that it is querying the service of a certain T node, the identifier of the target node may include the identifier of the T node whose service is to be queried, such as the identifier of the second T node in the embodiments of this application.
[0200] In some embodiments, if the source node does not specify a T node, the identifier of the target node may include a general identifier. Accordingly, the G node can query the services of all T nodes under the G node except the first T node based on the general identifier. That is, the general identifier does not specify a specific device, but refers to the T nodes connected to the G node in general.
[0201] In some embodiments, if the source node specifies that it is querying the service of a certain T node, the address of the target node may include the address of the T node whose service is to be queried, such as the address of the second T node in this embodiment. The address of the target node may be the device address obtained by the target node at the factory, such as a MAC address, physical address, etc. The address of the target node may also be an address assigned by the network after connecting to the network.
[0202] In some embodiments, if the source node does not specify a T node, the address of the target node may include a broadcast address. Accordingly, the G node can query the services of all T nodes under that G node except the first T node based on the broadcast address.
[0203] In this embodiment of the application, if the source node specifies a query for the service of a certain T node, the identifier and / or address of the target node can be obtained by the basic application layer of the first T node. For example, after the first service query, the first T node can obtain the identifier and / or address returned by the T node of the queried service. The first T node can save the identifier and / or address of the T node of the queried service. When performing a subsequent query, the first T node can specify to query the T node whose identifier and / or address have been saved.
[0204] Optionally, after obtaining the identifier and / or address of the target node, the basic application layer of the first T node can also send it to the basic service layer so that the basic service layer of the first T node can save the information.
[0205] In this embodiment of the application, if the source node does not specify a T node, the identifier and / or address of the target node (e.g., the general identifier and / or broadcast address of the target node) can be stored in the basic application layer and / or basic service layer of the first T node.
[0206] The information used to query the service can indicate the service being queried.
[0207] In one example, the information used for querying the service can be carried within the basic application layer data of the first T node. In other words, the information used for querying the service can be distributed through the basic application layer data of the first T node, so that the information used for querying the service can be obtained based on the basic application layer data of the first T node.
[0208] S302, the relay module of the first T node sends a service query request #B to the relay module of the G node through the relay service management channel.
[0209] The service query request #B is used to request node G to query the services of other nodes T. For example, it can request to query other nodes that have the first service, or it can request node G to query which services other nodes have. It should be understood that the other nodes mentioned here refer to other nodes connected to node G besides the first node T.
[0210] Here, the relay service management channel is the default transmission channel, which is generally established automatically after the underlying default logical link is established. The relay service management channel is used to transmit service data related to relay services. In this embodiment, the relay service management channel can be identified by the transmission channel identifier TCID, which can be called the relay service management channel identifier.
[0211] In some embodiments, the service query request #B may include information indicating the target node and information for querying the service. Optionally, the service query request #B may also include information indicating the source node. The content of each piece of information is described in detail below.
[0212] In one example, the information used to indicate the source node may include the source node's identifier and / or address, specifically, the identifier and / or address of the first T node. Thus, the G node determines the node initiating the query service based on the first T node's identifier and / or address. When the information used to indicate the source node includes the first T node's identifier, the G node can determine the address of the first T node based on the correspondence between the first T node's identifier and its address.
[0213] The information used to indicate the source node may be received by the relay module of the first T node from the basic application layer of the first T node, for example, through a service query request #A; or, the information used to indicate the source node may be pre-stored by the relay module of the first T node, and this application embodiment does not limit this.
[0214] In one example, the information used to indicate the target node may include the target node's identifier and / or address. Specifically, if the first T node specifies a query for a certain T node, the information used to indicate the target node may include the identifier and / or address of the specified T node; if the first T node does not specify a T node, the information used to indicate the target node may include a general identifier and / or a broadcast address. The content included in the information used to indicate the target node varies slightly depending on the specific circumstances, as illustrated below.
[0215] Scenario 1: The first T node performs its first query.
[0216] In this case, the information used to indicate the target node may include a general identifier and / or a broadcast address. Thus, upon receiving a service query request #B, node G can determine, based on the general identifier and / or broadcast address, that it needs to perform service queries on other T nodes connected to it, excluding the first T node, for example, querying a specific service on another T node.
[0217] Alternatively, the information used to indicate the target node may not include specific details about the T node, but may include indicative information to instruct the G node to perform service queries on other T nodes connected to the G node, such as querying the primary services of other T nodes.
[0218] Scenario 2: The first T node specifies the T node for the query service.
[0219] In this case, the information used to indicate the target node may include the identifier and / or address of the specified T node, such as the identifier and / or address of the second T node. Thus, the G node can determine the node being queried based on the identifier and / or address of the second T node. When the information used to indicate the target node includes the identifier of the second T node, the G node can determine the address of the second T node based on the correspondence between the identifier and the address of the second T node.
[0220] The information used to indicate the target node may be received by the relay module of the first T node from the basic application layer, for example, through a service query request #A; or, the information used to indicate the target node may be pre-stored by the relay module of the first T node, which is not limited in this embodiment.
[0221] In this embodiment of the application, the information used to query the service can indicate the service being queried.
[0222] In one example, the information used for querying services can be carried in the basic application layer data of the first T node. Of course, when the first T node wants to query which services other T nodes have, the information used for querying services may not include information about specific services, but may include an indication of which services other T nodes have.
[0223] The information used for querying the service can be received by the relay module of the first T node from the basic application layer, for example, through a service query request #A.
[0224] In some other embodiments, the G node may also determine that the service query request #B comes from the first T node based on other information (such as the identifier of the relay service management channel), so the service query request #B may not include information indicating the source node.
[0225] In this embodiment, the information included in the service query request #B is transmitted in the form of a data packet. For example, in S302, the first T node sends a first data packet to the G node, which includes the information carried in the service query request #B. The format of the first data packet will be described in more detail in the following embodiments, and will not be elaborated here.
[0226] S303, the relay module of the G node parses the first data packet and determines the destination address.
[0227] The destination address here refers to the address of the T node of the service being queried, which will be described in different cases below.
[0228] Scenario 1: The first T node performs a service query for the first time.
[0229] In this case, if the first data packet carries a general identifier and / or a broadcast address, the relay module of node G determines the destination address as the broadcast address. In step S304, the relay module of node G distributes the service query request #C to each node T.
[0230] For example, the first data packet may carry a broadcast address. In step S303, the broadcast address is obtained by parsing the first data packet by node G. In step S304, the relay module of node G can replace the broadcast address with the address of another T node connected to node G, and distribute the service query request #C to the other T nodes. For ease of understanding, the following embodiment will describe the following process using one of the nodes, such as the second T node, as an example.
[0231] Scenario 2: The first T node specifies the T node to perform the service query.
[0232] In this case, if the first data packet carries the identifier and / or address of the specified T node, the relay module of the G node determines the destination address to be the address of the specified T node. In step S304, the relay module of the G node sends the service query request #C to the specified T node.
[0233] For example, the first data packet may carry the identifier and / or address of the second T node. In step S303, by parsing the first data packet, the G node can obtain the address of the second T node. In step S304, the relay module of the G node sends a service query request #C to the second T node.
[0234] S304, The relay module of node G sends a service query request #C to the relay module of node T through the relay service management channel.
[0235] The service query request #C is used to query the services of the second node T, such as whether the second node T has the first service, or which services the second node T has.
[0236] In some embodiments, the service query request #C may include information indicating the source node and information for querying the service. Optionally, the service query request #C may also include information indicating the target node. The content of each piece of information is described in detail below.
[0237] In one example, the information used to indicate the source node may include the identifier of the first T node and / or the address of the first T node.
[0238] In one example, the information used to indicate the target node may include the identifier and / or address of the second T node. Of course, since the G node has already learned the address of the T node (i.e., the second T node) of the queried service in step S303, in step S304, it is not necessary to notify the second T node of the T node information of the queried service, that is, the information used to indicate the target node does not need to be included in the service query request #C.
[0239] In one example, the information used for querying the service can be carried in the basic application layer data of the first T node.
[0240] For example, when the first T node wants to query the services of the second T node, there are two methods. Method one: The first T node can query all the primary services and characteristics of the second T node. Method two: The first T node can query a specific service and characteristic of the second T node. The package formats corresponding to these two methods can be found in the StarFlash service management package format definition, and will not be detailed here.
[0241] In this embodiment of the application, the information included in the service query request #C is transmitted in the form of a data packet. For example, in S304, node G sends a second data packet to node T, which includes the information carried in the service query request #C.
[0242] In some embodiments, the second data packet may have the same format and / or carry the same information as the first data packet. For example, the G node may directly forward the first data packet to the second T node in step S304.
[0243] In other embodiments, the second data packet may have a different format and / or carry different information than the first data packet. For example, after receiving the first data packet, the G node processes the information in the first data packet and repackages it into a second data packet for forwarding to the second T node.
[0244] The format of the second data packet will be described in more detail in the following embodiments, and will not be elaborated here.
[0245] S305, the relay module of the second T node sends a service query request #D to the basic application layer of the second T node.
[0246] The service query request #D is used to request a query about the services of the second T node, such as whether it has the first service, or which services the second T node has.
[0247] Specifically, the relay module of the second T node can parse the second data packet received in step S304 and send the parsed result to the basic application layer through a service query request #D.
[0248] S306, the basic application layer of the second T node determines whether there is a corresponding service.
[0249] The second T node's basic application layer manages information about all services of this device. In this step, the second T node determines whether it has the first service, or which services it has.
[0250] If not, the second T node will not respond, and the process will end.
[0251] If so, the second T node continues to execute S307.
[0252] In this approach, T nodes that meet the conditions respond, while T nodes that do not meet the conditions do not respond. When there are many T nodes connected to a G node, signaling overhead can be reduced and resource utilization can be improved.
[0253] In some embodiments, a timer can be set on the G node or the first T node side. After the timer's duration is exceeded, the T node that does not respond can be assumed to not have the corresponding service.
[0254] In some embodiments, the second T node responds regardless of whether it has the corresponding service. For example, if it has the corresponding service, it responds with a message indicating a successful query; if it does not have the corresponding service, it responds with a message indicating a failed query.
[0255] In this method, feedback is sent regardless of whether other T nodes meet the conditions, which ensures the reliability of transmission.
[0256] In this embodiment, it is assumed that the second node T has the service queried by the first node T and needs to respond to the query from the first node T. The following process is described.
[0257] S307, the basic application layer of the second T node sends a service query response #E to the relay module in the basic service layer.
[0258] The service query response #E is used to indicate the services that the second T node has, such as indicating that the second T node has the first service being queried, or indicating which services the second T node has (e.g., what its primary services are).
[0259] In some embodiments, the service query response #E may include information for responding to the service query. Optionally, the service query response #E may also include at least one of information indicating the source node and information indicating the target node. The content of each piece of information is described in detail below.
[0260] It should be noted that during steps S301-S305, node G forwards the service query request from node 1T to node 2T; therefore, node 1T is the source node and node 2T is the target node. During steps S307-S311, node G forwards the service query response from node 2T to node 1T; therefore, node 2T is the source node and node 1T is the target node. In other words, determining the source and target nodes primarily depends on who sent the request (or response) and who ultimately received it. In this embodiment, the initial sender is the source node, and the final receiver is the target node.
[0261] In one example, the information used to indicate the source node may include the identifier of the second T node and / or the address of the second T node.
[0262] In one example, the information used to indicate the target node may include the identifier of the first T node and / or the address of the first T node.
[0263] In one example, the information used to respond to a service query could be carried within the underlying application layer data of the second T node. Alternatively, the information used to respond to a service query could include an indication that the second T node has a first service or which services it has.
[0264] S308, the relay module of the second T node sends a service query response #F to the relay module of the G node through the relay service management channel.
[0265] The service query response #F is used to indicate the services that the second T node has, such as indicating that the second T node has the first service being queried, or indicating which services the second T node has (e.g., what its primary services are).
[0266] In some embodiments, the service query response #F may include information indicating the target node and information for responding to the service query. Optionally, the service query response #F may also include information indicating the source node. The content of each piece of information is described in detail below.
[0267] In one example, the information used to indicate the source node may include the identifier and / or address of the second T node. Thus, the G node determines the node being queried based on the identifier and / or address of the second T node. When the information used to indicate the source node includes the identifier of the second T node, the G node can determine the address of the second T node based on the correspondence between the identifier and the address of the second T node.
[0268] The information used to indicate the source node may be received by the relay module of the second T node from the basic application layer of the second T node, for example, through the service query response #E; or, the information used to indicate the source node may be pre-stored by the relay module of the second T node, which is not limited in this embodiment.
[0269] In one example, the information used to indicate the target node may include the identifier and / or address of the first T node. Thus, the G node can determine the node initiating the query service based on the identifier and / or address of the first T node. When the information used to indicate the target node includes the identifier of the first T node, the G node can determine the address of the first T node based on the correspondence between the identifier and the address of the first T node.
[0270] The information used to indicate the target node may be received by the relay module of the second T node from the basic application layer of the second T node, for example, through the service query response #E; or, the information used to indicate the target node may be pre-stored by the relay module of the second T node, which is not limited in this embodiment.
[0271] In one example, the information used to respond to a service query may be carried within the underlying application layer data of the second T node. Alternatively, the information used to respond to a service query may include an indication that the second T node has a first service or which services it has.
[0272] The information used to respond to a service query can be received by the relay module of the second T node from the basic application layer of the second T node, for example, via a service query response #E.
[0273] In this embodiment, the information included in the service query response #F is transmitted in the form of a data packet. For example, in S308, the second T node sends a third data packet to the G node, which includes the information carried in the service query response #F. The format of the third data packet will be described in more detail in the following embodiments, and will not be elaborated here.
[0274] S309, the relay module of node G parses the third data packet to determine the destination address.
[0275] The destination address here refers to the address of the T node that initiated the service query, i.e., the address of the first T node.
[0276] S310, the relay module of node G sends a service query response #G to the relay module of the first node T through the relay service management channel.
[0277] The service query response #G is used to indicate the services that the second T node has, such as indicating that the second T node has the first service being queried, or indicating which services the second T node has (e.g., what its primary services are).
[0278] In some embodiments, the service query response #G may include information indicating the source node and information for responding to the service query. Optionally, the service query response #G may also include information indicating the target node. The content of each piece of information is described in detail below.
[0279] In one example, the information used to indicate the source node may include the identifier of the second T node and / or the address of the second T node.
[0280] In one example, the information used to indicate the target node may include the identifier of the first T node and / or the address of the first T node. Of course, since the service query response #G is received by the first T node, in some embodiments, the service query response #G may not include the information used to indicate the target node (i.e., the information of the first T node).
[0281] In one example, the information used to respond to a service query could be carried within the underlying application layer data of the second T node. Alternatively, the information used to respond to a service query could include an indication that the second T node has a first service or which services it has.
[0282] In this embodiment of the application, the information included in the service query response #G is transmitted in the form of a data packet. For example, in S310, node G sends a fourth data packet to node T, which includes the information carried in the service query response #G.
[0283] In some embodiments, the fourth data packet may have the same format and / or carry the same information as the third data packet. For example, the G node may directly forward the third data packet to the first T node in step S310.
[0284] In some embodiments, the fourth data packet may have a different format and / or carry different information than the third data packet. For example, after receiving the third data packet, the G node processes the information in the third data packet and repackages it into a fourth data packet for forwarding to the first T node.
[0285] The format of the fourth data packet will be described in more detail in the following embodiments, and will not be elaborated here.
[0286] S311, the relay module of the first T node sends a service query response #H to the basic application layer of the first T node.
[0287] The service query response #H is used to indicate the services that the second T node has, such as indicating that the second T node has the first service being queried, or indicating which services the second T node has (e.g., what its primary services are).
[0288] Specifically, the relay module of the first T node can parse the fourth data packet received in step S310 and send the parsed result to the basic application layer through the service query response #H.
[0289] Steps S301-S311 described above constitute the device and service discovery process between the first T node and the second T node. After step S311, the first T node and the second T node complete the discovery process. In some embodiments, a timer can be set on the device side of the first T node. If no service query response is received from other T nodes after the timer expires, the first T node can assume that there are no T nodes under the G node that meet the conditions.
[0290] The format of the data packets mentioned above is illustrated below. In steps S302, S304, S308, and S310, the data packets involved are all transmitted in the relay service management channel. Since this process is a service discovery process, the first data packet, second data packet, third data packet, fourth data packet, etc. mentioned above can also be called service discovery data packets.
[0291] In some embodiments, the data packets received by the G node (e.g., the first data packet, the third data packet) can have the same format as the data packets sent (e.g., the second data packet, the fourth data packet). This allows the G node device to directly forward the received service discovery data packets.
[0292] For example, the format of the service discovery data packet (i.e., the packet format transmitted in the relay service management channel) is shown in Table 1 below:
[0293] Table 1
[0294]
[0295] The service discovery packet includes a transport channel identifier field, a length field, a destination address field, a source address field, and a message payload field. Among these:
[0296] The transmission channel identifier field is used to carry the relay service management channel identifier;
[0297] The Length field indicates the total length of the data packet following the Length field.
[0298] The Destination Address (DestAddr) field is used to carry the address of the node device (such as the T node) that needs to receive the data packet;
[0299] The source address (SrcAddr) field is used to carry the address of the node device (such as node T) that sent the data packet;
[0300] The information payload field is used to carry basic application layer data or business-related instruction information.
[0301] In some other embodiments, the destination address field and the source address field may also be used to carry the identifier of the node device that needs to receive the data packet and the identifier of the node device that sends the data packet, respectively.
[0302] In some embodiments, the data packets received by the G node (e.g., the first data packet, the third data packet) may have a different format than the data packets sent (e.g., the second data packet, the fourth data packet). This allows the G node device to process the received service discovery data packets before repackaging and forwarding them.
[0303] For example, the format of the service discovery data packets received by the G node is shown in Table 2 below:
[0304] Table 2
[0305]
[0306] The format of the service discovery data packets sent by node G is shown in Table 3 below:
[0307] Table 3
[0308]
[0309] Unlike the data packet formats shown in Table 1, the data packets shown in Table 2 may not include the source address field, and the data packets shown in Table 3 may not include the destination address field. The meanings of the remaining fields are the same as in Table 1, and can be found in the relevant descriptions above. For the sake of brevity, they will not be repeated here.
[0310] In other words, the data packets received by the G node do not necessarily include source address information. The G node can determine which source node device sent the data packet, for example, by using the transmission channel identifier. Similarly, the data packets sent by the G node do not necessarily include destination address information, because the target device knows its own address and does not need notification from the G node. This reduces signaling overhead and improves resource utilization.
[0311] To make it easier to understand, the following will be combined with Figure 3 To illustrate, let's take the example of the first T node querying the services of other T nodes connected to the same G node for the first time, where the second T node contains the first service that the first T node wants to query.
[0312] In S302, the G node receives the first data packet sent by the first T node. The packet format and the information it carries are shown in Table 4 below:
[0313] Table 4
[0314]
[0315] In S303, after the G node parses the first data packet, the content of the obtained information payload may include the information included in the service query request #B.
[0316] In S304, node G sends a second data packet to node T. The packet format and the information it carries are shown in Table 5 below.
[0317] Table 5
[0318]
[0319] After S304, the content of the information payload obtained by the second T node after parsing the second data packet may include the information included in the service query request #C.
[0320] In S308, the G node receives the third data packet sent by the second T node. The packet format and the information it carries are shown in Table 6 below:
[0321] Table 6
[0322]
[0323] In S309, after the G node parses the third data packet, the content of the obtained information payload may include the information included in the service query response #F.
[0324] In S310, the G node sends the fourth data packet to the first T node. The packet format and the information it carries are shown in Table 7 below:
[0325] Table 7
[0326]
[0327] After S310, the content of the information payload obtained by the first T node after parsing the fourth data packet may include the information included in the service query response #G.
[0328] It should be noted that the "device query request corresponding to the first service" mentioned above is a specific example of "information used to query the service" in the above embodiments; the "device query response corresponding to the first service" mentioned above is a specific example of "information used to respond to the service query" in the above embodiments.
[0329] In some embodiments, the aforementioned "device query request corresponding to the first service" and "device query response corresponding to the first service" are a type of information payload, and the specific information included therein can be designed according to requirements. This application embodiment does not limit this.
[0330] As an example, and not a limitation, the "device query request corresponding to the first service" can include message type (e.g., request message, response message, notification message), unique identifier (UUID) corresponding to the first service, UUID type (e.g., service, attribute, method, event, etc.), start index (e.g., 0x00000000), and end index (e.g., 0xffffffff). The start index (i.e., the start handle number) and end index (i.e., the end handle number) are used to indicate the service that the first T node wants to query, or the event or operation that needs to be performed, within a database containing all services and service characteristic information of the second T node.
[0331] In this embodiment, when a G node forwards a service query request to multiple second T nodes—for example, when a first T node queries the services of other T nodes for the first time, or when a first T node specifies to query the services of multiple second T nodes—the G node can forward the service query responses sent by each second T node sequentially to the first T node, or it can forward the service query responses sent by multiple second T nodes to the first T node all at once, or it can process the service query responses sent by multiple second T nodes and combine them into a single service query response before sending it to the first T node. This embodiment does not limit the scope of this application.
[0332] When a first T node specifies a query for the services of multiple second T nodes, the service query request #B sent by the first T node to the G node may carry the identifiers and / or addresses of the multiple second T nodes. Accordingly, the data packet format corresponding to the service query request #B may be designed with fields indicating the identifiers and / or addresses of the multiple T nodes. This application embodiment does not limit this.
[0333] The above text combined Figure 3 This paper introduces the process of device and service discovery between T-nodes. Based on this, two T-nodes connected to the same G-node can establish a channel for business data transmission through the relay function of the G-node, thereby enabling data transmission. The following section combines... Figure 4 and Figure 5 Provide a detailed description.
[0334] Figure 4 A schematic flowchart illustrating a method for establishing a relay service channel according to an embodiment of this application is shown. The implementation of this process involves a first T node (represented as T1 in the figure for convenience), a G node, and a second T node (represented as T2 in the figure for convenience), each node having the following characteristics: Figure 2 The protocol architecture shown is 200. Figure 4 The method 400 shown includes steps S401 to S417, describing the process of establishing a relay service channel between the first T node and the second T node through the G node. The following section combines... Figure 4 Each step is described in detail.
[0335] S401, the basic application layer of the first T node and the basic application layer of the second T node negotiate ports.
[0336] In this step, the data involved in the negotiation process can be transmitted through the default relay service management channel. Specifically, the transmission path of the negotiation data can be: the basic application layer of the first T node <=> the relay module of the first T node <=> the relay module of the G node <=> the relay module of the second T node <=> the basic application layer of the second T node.
[0337] In this embodiment, the negotiation data is transmitted in the form of data packets, which in some embodiments may be referred to as negotiation data packets. Since the negotiation data packets are also transmitted in the relay service management channel, the format of the negotiation data packets can be similar to the service discovery data packet format described above, the difference being the information carried by the "information payload" field. For details, please refer to the above description of the service discovery data packet format; for brevity, it will not be repeated here.
[0338] In some embodiments, during step S401, the basic application layer of the first T node and the basic application layer of the second T node can also perform service negotiation and quality of service (QoS) negotiation. This application primarily focuses on the results of port negotiation between the first T node and the second T node; therefore, other negotiation processes, such as service negotiation and QoS negotiation, are not described in detail here.
[0339] For example, the negotiation result between the first T node and the second T node could be that the first T node uses the first port (port1) and the second T node uses the second port (port2). Accordingly, the first port (port1) and the second port (port2) have a mapping relationship, and the basic application layers of the first T node and the second T node need to maintain the mapping relationship between the first port and the second port.
[0340] S402, the basic application layer of the first T node requests a transmission channel from the channel management module of the first T node.
[0341] Specifically, the basic application layer of the first T node requests the establishment of a transmission channel for the first port and the second port. Here, the transmission channel refers to a service channel, and more specifically, a trunk service channel.
[0342] In this embodiment, the parameters carried in step S402 may include the address and / or identifier of the target device, which here refers to the address and / or identifier of the second T node. The address and / or identifier of the second T node are used by the G node to determine another T node that establishes a relay service channel with the first T node.
[0343] In some embodiments, the parameters carried in step S402 may also include channel type information, port information, quality of service identifier (QI), etc.
[0344] Channel type information is used to indicate the type of transmission channel applied for. For example, the channel type may include unicast service channel, multicast service channel and broadcast service channel, and may include relay service channel and non-relay service channel, etc.
[0345] The port information is used to indicate the port mapped to the transmission channel, i.e., the port negotiated in step S401. In this embodiment, the port information includes a first port and a second port, wherein the first port is used to map (or bind) to the transmission channel of the first T node, and the second port is used to map (or bind) to the transmission channel of the second T node.
[0346] QI is used to indicate the service's requirements for the transmission channel, such as transmission rate, latency, packet loss rate, communication cycle, maximum packet size, etc.
[0347] S403, the channel management module of the first T node determines whether to create a business channel.
[0348] The service channels involved here can be understood as non-default service channels, that is, transmission channels established according to business needs. Specifically, the channel management module of the first T node can determine whether to create a service channel based on the overall status of the transmission channels.
[0349] If no service channel needs to be created, the channel management module of the first T node can directly return TCID information to the basic application layer of the first T node, that is, map the first port to an existing transmission channel and return the TCID corresponding to the first port. Simultaneously, the channel management module of the first T node notifies the second T node of the mapping relationship between the first port and the transmission channel TCID on the first T node side through a channel reconfiguration message. Of course, the second port information and the port information that has already established a mapping relationship with the transmission channel TCID on the first T node side can also be sent to the second T node through a channel reconfiguration message. Here, the channel reconfiguration message is transmitted through the control channel.
[0350] If you need to create a business channel, continue with the following steps.
[0351] S404, after the channel management module of the first T node determines that the address of the target device sent by the basic application layer is not the address of the G node, and / or determines that the identifier of the target device sent by the basic application layer is not the identifier of the G node, it sends a relay service channel establishment request to the channel management module of the G node.
[0352] This relay service channel establishment request is used to request the establishment of a relay service channel between the first T node and the second T node.
[0353] In some embodiments, the parameters carried in the trunk service channel establishment request may include: port information, the identifier and / or address of the target node. Here, the port information includes port parameters for a first port and a second port. The identifier and / or address of the target node are used by the G node to determine another T node with which to establish a trunk service channel with the first T node.
[0354] In this embodiment, the information included in the trunk service channel establishment request is transmitted in the form of data packets. Since these data packets are used to establish the trunk service channel, for ease of description, they are referred to as service establishment data packets in the following embodiments. The format of the service establishment data packets will be described in more detail in the following embodiments, and will not be elaborated upon here.
[0355] In this step, the parameters carried in the relay service channel establishment request can be transmitted through the control channel between the first T node and the G node.
[0356] S405a, the channel management module of node G negotiates channel parameters with the channel management module of the first node T.
[0357] Specifically, in this step, the channel management module of node G can send a channel parameter negotiation request to the channel management module of node T. Correspondingly, the channel management module of node T can send a channel parameter negotiation response to the channel management module of node G. This interaction process enables the negotiation of channel parameters.
[0358] In S405b, the channel management module of the G node negotiates channel parameters with the channel management module of the second T node.
[0359] Specifically, in this step, the channel management module of node G can send a channel parameter negotiation request to the channel management module of node T. Correspondingly, the channel management module of node T can send a channel parameter negotiation response to the channel management module of node G. This interaction process enables the negotiation of channel parameters.
[0360] In some embodiments, the channel parameters negotiated between the G node and the first T node and the second T node may include the transmission window size, refresh timer, maximum number of transmissions, retransmission timer, etc. During the negotiation process, information that the G node and the first T node need to exchange can be transmitted through the control channel between the G node and the first T node. Information that the G node and the second T node need to exchange can also be transmitted through the control channel between the G node and the second T node.
[0361] In this embodiment, the execution order of steps S405a and S405b is not limited; the two steps can be executed sequentially or simultaneously. Here, steps S405a and S405b are optional. In other embodiments, method 400 may not include steps S405a and S405b, that is, the G node and the first T node and the second T node may not negotiate channel parameters, and the channel parameters may be set by the channel management module of the G node itself, or according to preset rules. This will not be described in detail here.
[0362] S406, the channel management module of the G node generates transmission channel identifiers TCID-g1 and TCID-g2.
[0363] Here, TCID-g1 is the identifier of the transmission channel generated by the G node corresponding to the first T node, used to identify the transmission channel in the G node that transmits services with the first T node. TCID-g2 is the identifier of the transmission channel generated by the G node corresponding to the second T node, used to identify the transmission channel in the G node that transmits services with the second T node.
[0364] It is understood that the embodiments of this application do not limit the order in which the channel management module of the G node generates TCID-g1 and TCID-g2.
[0365] S407a, the channel management module of the G node requests a logical channel from the access layer of the G node via TCID-g1. For ease of description, this will be referred to as the first LC request.
[0366] In this step, the first LC request is used to request the mapping of the transmission channel TCID-g1 to the logical channel. The logical channel referred to here is the logical channel between the G node and the first T node.
[0367] S407b, the channel management module of the G node requests a logical channel from the access layer of the G node for TCID-g2. For ease of description, this will be referred to as the second LC request.
[0368] In this step, the second LC request is used to request the mapping of the transport channel TCID-g2 to the logical channel. The logical channel referred to here is the logical channel between the G node and the second T node.
[0369] This application embodiment does not specifically limit the execution order of steps S407a and S407b; these two steps can be executed sequentially or simultaneously. This description uses the example of the G node requesting logical channels for TCID-g1 and TCID-g2 respectively. In other embodiments, the channel management module of the G node can also request logical channels for TCID-g1 and TCID-g2 simultaneously through a single request message.
[0370] S408, the access layer of the G node maps the transmission channel to the logical channel.
[0371] Specifically, the access layer of the G node maps TCID-g1 to LCID-t1 and TCID-g2 to LCID-t2. Here, LCID-t1 is the logical channel corresponding to the first T node, used to transmit data exchanged between the G node and the first T node. LCID-t2 is the logical channel corresponding to the second T node, used to transmit data exchanged between the G node and the second T node.
[0372] It should be noted that the process of mapping TCID-g1 and TCID-g2 to logical channels by the G node can be implemented in one step or in two steps, and the embodiments of this application are not limited in this regard.
[0373] S409a, the logical channel is established between the access layer of the G node and the access layer of the first T node.
[0374] S409b, the logical channel is established between the access layer of the G node and the access layer of the second T node.
[0375] In other words, in these two steps, the G node establishes underlying logical links with the access layers of the first T node and the second T node respectively, that is, it applies for logical channels for the transmission channels between the G node and the first T node and between the G node and the second T node respectively.
[0376] The embodiments of this application do not specifically limit the execution order of steps S409a and S409b. These two steps can be executed sequentially or simultaneously.
[0377] S410a, the access layer of the G node notifies the channel management module of the G node that TCID-g1 has been successfully created.
[0378] Here, the successful creation of TCID-g1 can be understood as the logical channel between node G and the first node T being successfully applied for, the underlying logical link being established, and the upper-layer transmission channel TCID-g1 being available. Therefore, this step is equivalent to the access layer of node G notifying the channel management module of node G that the logical channel application for TCID-g1 has been successful, or in other words, notifying that the transmission channel TCID-g1 and the logical channel LCID-t1 have established a mapping relationship.
[0379] In this step, the parameters carried may include TCID-g1 and LCID-t1.
[0380] S410b, the access layer of the G node notifies the channel management module of the G node that TCID-g2 has been successfully created.
[0381] Here, the successful creation of TCID-g2 can be understood as the logical channel between node G and the second node T being successfully applied for, the underlying logical link being established, and the upper-layer transmission channel TCID-g2 being available. Therefore, this step is equivalent to the access layer of node G notifying the channel management module of node G that the logical channel application for TCID-g2 has been successful, or in other words, notifying that the transmission channel TCID-g2 and the logical channel LCID-t2 have established a mapping relationship.
[0382] In this step, the parameters carried may include TCID-g2 and LCID-t2.
[0383] The embodiments of this application do not specifically limit the execution order of steps S410a and S410b. These two steps can be executed sequentially or simultaneously.
[0384] S411a, the channel management module of node G sends a request to the channel management module of the first node T to create a transmission channel.
[0385] The Create Transmission Channel Request is used to request the first T node to establish the transmission channel corresponding to the first T node.
[0386] In this step, the parameters carried in the request to create a transport channel may include TCID-g1 and LCID-t1.
[0387] In some embodiments, the parameters carried in the request to create a transport channel may further include: a first port.
[0388] S411b, the channel management module of the G node sends a request to the channel management module of the second T node to create a transmission channel.
[0389] The Create Transmission Channel request is used to request the second T node to establish the transmission channel corresponding to the second T node.
[0390] In this step, the parameters carried in the request to create a transport channel may include TCID-g2 and LCID-t2.
[0391] In some embodiments, the parameters carried in the request to create a transport channel also include: a second port.
[0392] The embodiments of this application do not specifically limit the execution order of steps S411a and S411b. These two steps can be executed sequentially or simultaneously.
[0393] S412a, the channel management module of the first T node generates the transmission channel TCID-t1 corresponding to the first T node.
[0394] Here, TCID-t1 is the transmission channel identifier generated on the first T node side, used to identify the transmission channel on the first T node side. In this embodiment, the identifier of the transmission channel generated by the first T node is different from the transmission channel identifier in the G node corresponding to the first T node.
[0395] In this step, the channel management module of the first T node can establish the mapping relationship between TCID-g1 and LCID-t1, as well as the mapping relationship between TCID-t1 and LCID-t1.
[0396] S412b, the channel management module of the second T node generates the transmission channel TCID-t2 corresponding to the second T node.
[0397] Here, TCID-t2 is the transmission channel identifier generated on the second T node side, used to identify the transmission channel on the second T node side.
[0398] In this step, the channel management module of the second T node can establish the mapping relationship between TCID-g2 and LCID-t2, as well as the mapping relationship between TCID-t2 and LCID-t2.
[0399] S413a, the channel management module of the first T node and the basic application layer of the first T node complete the binding of TCID-t1 with the first port.
[0400] In other words, this step establishes a mapping relationship between TCID-t1 and the first port.
[0401] S413b, the channel management module of the second T node completes the binding of TCID-t2 with the second port with the basic application layer of the second T node.
[0402] In other words, this step establishes a mapping relationship between TCID-t2 and the second port.
[0403] The embodiments of this application do not specifically limit the execution order of steps S413a and S413b. These two steps can be executed sequentially or simultaneously.
[0404] S414a, the channel management module of the first T node sends a channel creation response to the channel management module of the G node.
[0405] The Create Transmission Channel response indicates that the first T node has established a mapping relationship between the transmission channel and the logical channel, as well as a mapping relationship between the first port and the transmission channel.
[0406] In some embodiments, the Create Transmission Channel response may include parameters: TCID-t1, TCID-g1, and LCID-t1.
[0407] S414b, the channel management module of the second T node sends a channel creation response to the channel management module of the G node.
[0408] The Create Transmission Channel response indicates that the second T node has established a mapping relationship between the transmission channel and the logical channel, as well as a mapping relationship between the second port and the transmission channel.
[0409] In some embodiments, the Create Transmission Channel response may include parameters: TCID-t2, TCID-g2, and LCID-t2.
[0410] The embodiments of this application do not specifically limit the execution order of steps S414a and S414b. These two steps can be executed sequentially or simultaneously.
[0411] Thus, through steps S405a-S414b, the G node establishes transmission channels (specifically service channels, more specifically non-default service channels) with the first T node and the second T node, respectively. The transmission channel between the G node and the first T node corresponds to the first port, and the transmission channel between the G node and the second T node corresponds to the second port. When the first T node sends service data to the second T node, the G node performs relay, and the established service channels are used to transmit relayed service data. Therefore, these service channels are the aforementioned relay service channels.
[0412] The above description synchronously describes similar steps in the interaction process between node G and the first node T and the second node T. However, it is understood that the process of establishing a transmission channel between node G and the first node T and the process of establishing a transmission channel between node G and the second node T are independent of each other. That is, when node G establishes a transmission channel with the first node T, steps S405a, S406, S407a, S408, S409a, S410a, S411a, S412a, S413a, and S414a can be executed sequentially after step S404. When node G establishes a transmission channel with the second node T, steps S405b, S406, S407b, S408, S409b, S410b, S411b, S412b, S413b, and S414b can be executed sequentially after step S404. This application embodiment does not specifically limit the order of execution of steps between the two processes.
[0413] Continue to refer to Figure 4 .
[0414] S415, the channel management module of the G node sends a relay service channel establishment response to the channel management module of the first T node.
[0415] This relay service channel establishment response indicates that a relay service channel has been established between the first T node and the second T node. It should be noted that the relay service channel here refers to the transmission channel used to transmit service data between the first T node and the second T node, where the transmission path of the service data is: first port, TCID-t1, LCID-t1, TCID-g1, TCID-g2, LCID-t2, TCID-t2, second port.
[0416] In some embodiments, the parameters carried in the relay service channel establishment response may include TCID-t1 and TCID-g1.
[0417] S416, the channel management module of the G node sends the routing configuration tables of the first T node and the second T node to the relay module of the G node.
[0418] Specifically, the routing configuration table (i.e., the channel mapping table) may include the mapping relationship between TCID-t1 and TCID-t2, the mapping relationship between TCID-g1 and TCID-g2, the mapping relationship between TCID-t1 and TCID-g1, and the mapping relationship between TCID-t2 and TCID-g2.
[0419] Correspondingly, the relay module of the G node can store the transmission channel routing table (i.e., the channel mapping table) between the first T node and the second T node based on the first port and the second port services.
[0420] S417, the channel management module of the first T node notifies the first T node that the application layer transmission channel application has been successfully applied for.
[0421] If you want to continue establishing a business channel between the first T node and the second T node in the subsequent process, you can repeat steps S402-S417.
[0422] The service establishment data packet is mentioned in step S404. The format of the service establishment data packet is described below as an example.
[0423] The service establishment data packet is a data packet encapsulated by the basic service layer of the first T node and transmitted within the control channel. For example, the format of the service establishment data packet (i.e., the packet format transmitted within the control channel) can be shown in Table 8 below:
[0424] Table 8
[0425]
[0426] The format of the data packet used to establish the service includes a transmission channel identifier field, a length field, and a message payload field. Among these:
[0427] The transmission channel identifier field is used to carry the identifier of the control channel. For example, in SLB, the identifier of the control channel can be 0x0009.
[0428] The Length field is used to indicate the total length of the data packet following the Length field.
[0429] The information payload field is used to carry the content of the signaling frame.
[0430] Specifically, the signaling frame content in this information payload can have a uniform format, as shown in Table 9 below:
[0431] Table 9
[0432]
[0433] The format of the signaling frame content may include a code field, an identifier field, a length field, and a data field.
[0434] The code field is used to carry the identifier of the signaling. In some embodiments, the code field may occupy one byte in length. In this application embodiment, the correspondence between code values and signaling types can be shown in Table 10 below:
[0435] Table 10
[0436]
[0437] The identifier field is used to carry identification bits. For example, if the signaling is sent as a request, then the response should be sent with the same identifier. This allocation continues in a circular fashion. In some embodiments, the code field may occupy one byte.
[0438] The length field is used to indicate the length of the data portion. In some embodiments, the length field may occupy two bytes.
[0439] The data field is used to carry data. In some embodiments, the number of bytes occupied by the data field can be designed according to actual needs. Generally, different code values correspond to different numbers of data bytes. In the embodiments of this application, the signaling frame data (i.e., signaling frame content) in the information payload of the service establishment data packet can adopt the basic frame format, wherein the payload of the signaling frame does not exceed the maximum transmission unit (MTU) size. Here, MTU refers to the size of the packet transmitted between the basic application layer and the basic service layer.
[0440] In this embodiment of the application, the data field in Table 9 may include transmission mode (Tcid_mode) indication information, where the transmission mode may include basic mode, normal mode, and relay mode. The transmission mode indication information indicates one of the aforementioned modes. Among them, the relay mode can provide a relay service channel for communication between T nodes.
[0441] For example, when the transmission mode is relay mode, the data fields in Table 9 may specifically include: MTU, maximum protocol data unit payload size (MPS), and peer address. Here, MPS is the size of the packet transmitted between the basic service layer and the access layer. In this embodiment, the MTU size can be consistent with the MPS size, thereby simplifying the processing flow. The peer address is a byte string type, which is convenient for unified maintenance by the host.
[0442] The method 400 provided in this application embodiment can establish a relay service channel, enabling the first T node and the second T node to transmit services. For ease of description, the data packets transmitted in the relay service channel will be referred to as service transmission data packets in the following embodiments. The format of the service transmission data packets (i.e., the packet format transmitted in the relay service channel) is described below by example.
[0443] For example, the format of the service transmission data packet is shown in Table 11 below:
[0444] Table 11
[0445]
[0446] The format of the data packets transmitted by this service may include: a transmission channel identifier field, a length field, and a basic application layer data field. Among these:
[0447] The transmission channel identifier field is used to carry the identifier of the transmission channel (specifically, the relay service channel) of the other end, where the other end refers to the device that directly receives data packets;
[0448] The length field is used to indicate the total length of the data packet following the length field;
[0449] The basic application layer data field is used to carry basic application layer data, specifically service data units (SDUs). In some embodiments, SDUs can also be referred to as business data units.
[0450] In some embodiments, the transmission channel identifier field in the service transmission data packet may also carry the local transmission channel (specifically, a relay service channel) identifier, where "local" refers to the device sending the data packet.
[0451] For ease of understanding, an example is given below. Assume that the first T node and the second T node establish a relay service channel, and the service transmission channel mapping table for the G node is shown in Table 12 below:
[0452] Table 12
[0453]
[0454] That is, the transmission channel TCIDy (or TCID-g1) of node G is mapped to the transmission channel TCIDx (or TCID-t1) of the first node T, and the transmission channel TCIDi (or TCID-g2) of node G is mapped to the transmission channel TCIDj (or TCID-t2) of the second node T. The transmission channels TCIDy (or TCID-g1) and TCIDi (or TCID-g2) of node G are also mapped.
[0455] When the first T node sends service data to the second T node through the G node, the format of the data packets transmitted between the first T node, the G node, and the second T node changes as follows:
[0456] 1) The format and information carried in the service transmission data packets sent by the first T node can be:
[0457] Transmission Channel Identifier length Basic Application Layer SDU TCIDy length SDU of the first T node
[0458] In the example, the data packet sent by the first T node carries the transmission channel identifier of the peer (i.e., the G node) in the transmission channel identifier field (i.e., the transmission channel identifier TCIDy in the G node that corresponds to the first T node).
[0459] 2) After receiving the data packet from 1), the G node strips and replaces the transmission channel identifier (i.e., the TCID header). The format and information carried by the service transmission data packet sent by the G node can be:
[0460] Transmission Channel Identifier length Basic Application Layer SDU TCIDj length SDU of the first T node
[0461] In the example, node G parses the received data packets, strips off the transmission channel identifier, determines that the transmission channel is a relay service channel, and then determines that the received data packets need to be forwarded to other nodes T. Specifically, node G determines that data packets from the first node T need to be sent to the second node T based on the transmission channel identifier TCIDy in the data packet and the service transmission channel mapping table shown in Table 12. Therefore, the data packets sent out by node G carry the identifier of the transmission channel of the peer (i.e., the second node T) (i.e., the transmission channel identifier TCIDj on the second node T side).
[0462] 3) After receiving the data packet from 2), the second T node strips the transmission channel identifier (i.e., the TCID header), and the resulting data packet format and the information it carries are as follows:
[0463] Transmission Channel Identifier length Basic Application Layer SDU TCIDj length SDU of the first T node
[0464] Figure 5 A schematic flowchart illustrating a method for establishing a relay service channel according to another embodiment of this application is shown. In the implementation of this process, a first T node (represented as T1 in the figure for convenience), a G node, and a second T node (represented as T2 in the figure for convenience) are involved, each node having the following characteristics: Figure 2 The protocol architecture shown is 200. Figure 5 The method 500 shown includes steps S501 to S523, which describe the process of establishing a relay service channel between the first T node and the second T node through the G node. The following section combines... Figure 5 Each step is described in detail.
[0465] S501, the basic application layer of the first T node and the basic application layer of the second T node negotiate ports.
[0466] In this step, the data involved in the negotiation process can be transmitted through the default relay service management channel. Specifically, the transmission path of the negotiation data can be: the basic application layer of the first T node <=> the relay module of the first T node <=> the relay module of the G node <=> the relay module of the second T node <=> the basic application layer of the second T node.
[0467] Here, the negotiation data is transmitted in the form of data packets (i.e., negotiation data packets). The format of the negotiation data packets is similar to that of the service discovery data packets described above, the difference being the information carried by the "Information Payload" field. For details, please refer to the explanation of the service discovery data packet format above; for brevity, it will not be repeated here.
[0468] In some embodiments, in step S501, the basic application layer of the first T node and the basic application layer of the second T node can also perform service negotiation and application service quality (QoS) negotiation, etc., which will not be described in detail here.
[0469] For example, the negotiation result between the first T node and the second T node could be that the first T node uses the first port (port1) and the second T node uses the second port (port2). Accordingly, the first port (port1) and the second port (port2) have a mapping relationship.
[0470] S502, the basic application layer of the first T node requests a transmission channel from the channel management module of the first T node.
[0471] Specifically, the basic application layer of the first T node requests the establishment of a transmission channel for the first port and the second port. Here, the transmission channel refers to a service channel, and more specifically, a trunk service channel.
[0472] In some embodiments, the parameters carried in step S502 may include the address and / or identifier of the target device, which here refers to the address and / or identifier of the second T node. The address and / or identifier of the second T node is used by the G node to determine another T node that establishes a relay service channel with the first T node.
[0473] In some embodiments, the parameters carried in step S502 may also include channel type information, port information, quality of service identifier (QI), etc. The channel type information, port information, QI, etc. are similar to the corresponding contents in step S402 of method 400, and can be referred to the relevant description above for details. For the sake of brevity, they will not be repeated here.
[0474] S503, the channel management module of the first T node determines whether to create a business channel.
[0475] The service channels involved here can be understood as non-default service channels, that is, transmission channels established according to business needs. Specifically, the channel management module of the first T node can determine whether to create a service channel based on the overall status of the transmission channels.
[0476] If no service channel needs to be created, the channel management module of the first T node can directly return TCID information to the basic application layer of the first T node, that is, map the first port to an existing transmission channel and return the TCID corresponding to the first port. Simultaneously, the channel management module of the first T node notifies the second T node of the mapping relationship between the first port and the transmission channel TCID on the first T node side through a channel reconfiguration message. Of course, the second port information and the port information that has already established a mapping relationship with the transmission channel TCID on the first T node side can also be sent to the second T node through a channel reconfiguration message. Here, the channel reconfiguration message is transmitted through the control channel.
[0477] If you need to create a business channel, continue with the following steps.
[0478] S504, the channel management module of the first T node determines whether the relay control channel and / or tunnel channel exist.
[0479] In this embodiment, the tunnel channel is a channel located between the transmission channel and the logical channel. For the transmission channel in the basic service layer, the tunnel channel is what it perceives downwards; for the logical channel in the access layer, the tunnel channel is what it perceives upwards. Therefore, both control plane data and service plane data can be transmitted through the tunnel channel.
[0480] In this embodiment, the relay control channel is a transmission channel in the basic service layer, used to transmit signaling between T nodes, and its function is similar to that of the control channel used to transmit signaling between G nodes and T nodes. The relay control channel is mainly responsible for the establishment, release, and reconfiguration of non-default service channels between two T nodes. This relay control channel exists by default after the tunnel channel is established and is deleted simultaneously with the deletion of the tunnel channel; the relay control channel and the tunnel channel share a common lifecycle. Therefore, in S504, it is possible to determine only whether the relay control channel or the tunnel channel exists; if one exists, the other also exists.
[0481] A tunnel channel is used to transmit data between two T nodes. Each T node can establish its own tunnel channel. For ease of description, in this embodiment, the channel established between two T nodes, including the tunnel channel, is referred to as a relay tunnel. It should be understood that a relay tunnel is only used to represent the path for data transmission between T nodes.
[0482] If it exists, then proceed directly to step S518, which establishes a service channel directly through the trunk control channel. Step S518 will be described in detail below and will not be elaborated on here.
[0483] If it does not exist, continue with the next steps.
[0484] S505, the channel management module of the first T node sends a tunnel channel establishment request to the channel management module of the G node.
[0485] This tunnel establishment request is used to request the establishment of a relay tunnel between the first T node and the second T node. Alternatively, this tunnel establishment request is used to request the G node to establish a tunnel.
[0486] In some embodiments, the parameters carried in the tunnel establishment request may include relay-related parameters, such as the Quality of Service (QoS) of the relay tunnel.
[0487] In this step, the parameters carried in the tunnel establishment request can be transmitted through the control channel between the first T node and the G node.
[0488] In this embodiment, the information included in the tunnel establishment request is transmitted in the form of data packets. Since these data packets are used to establish the tunnel, for ease of description, they will be referred to as tunnel establishment data packets in the following embodiments. The format of the tunnel establishment data packets will be described in more detail in the following embodiments, and will not be elaborated upon here.
[0489] S506a, the channel management module of node G negotiates channel parameters with the channel management module of the first node T.
[0490] Specifically, in this step, the channel management module of node G can send a channel parameter negotiation request to the channel management module of node T. Correspondingly, the channel management module of node T can send a channel parameter negotiation response to the channel management module of node G. This interaction process enables the negotiation of tunnel channel parameters.
[0491] In S506b, the channel management module of the G node negotiates channel parameters with the channel management module of the second T node.
[0492] Specifically, in this step, the channel management module of node G can send a channel parameter negotiation request to the channel management module of node T. Correspondingly, the channel management module of node T can send a channel parameter negotiation response to the channel management module of node G. This interaction process enables the negotiation of tunnel channel parameters.
[0493] In some embodiments, the channel parameters negotiated between the G node and the first T node and the second T node may include: MTU, MPS, QoS, etc.
[0494] During the negotiation process, the information that G node needs to exchange with the first T node can be transmitted through the control channel between G node and the first T node. The information that G node needs to exchange with the second T node can also be transmitted through the control channel between G node and the second T node.
[0495] The execution order of steps S506a and S506b is not limited in this embodiment; the two steps can be executed sequentially or simultaneously. Steps S405a and S405b are optional. In other embodiments, method 400 may not include steps S506a and S506b, that is, the G node and the first T node and the second T node may not negotiate tunnel channel parameters, and the tunnel channel parameters may be set by the channel management module of the G node itself, or according to preset rules. This will not be described in detail here.
[0496] S507, the channel management module of the G node generates tunnel channel identifiers Tun-ID1 and Tun-ID2.
[0497] Here, Tun-ID1 is the identifier of the tunnel channel generated by the G node corresponding to the first T node, used to identify the tunnel channel in the G node that transmits data with the first T node. Tun-ID2 is the identifier of the tunnel channel generated by the G node corresponding to the second T node, used to identify the tunnel channel in the G node that transmits data with the second T node.
[0498] It is understood that the embodiments of this application do not limit the order in which the channel management module of the G node generates Tun-ID1 and Tun-ID2.
[0499] S508a, the channel management module of the G node requests a logical channel from the access layer of the G node for Tun-ID1. For ease of description, this will be referred to as the first LC request.
[0500] In this step, the first LC request is used to map the tunnel channel Tun-ID1 to a logical channel. The logical channel referred to here is the logical channel between the G node and the first T node.
[0501] In S508b, the channel management module of the G node requests a logical channel from the access layer of the G node for Tun-ID2. For ease of description, this will be referred to as the second LC request.
[0502] In this step, the second LC request is used to map the tunnel channel Tun-ID2 to the logical channel. The logical channel referred to here is the logical channel between the G node and the second T node.
[0503] This application embodiment does not specifically limit the execution order of steps S508a and S508b; these two steps can be executed sequentially or simultaneously. This description uses the example of the G node requesting logical channels for Tun-ID1 and Tun-ID2 respectively. In other embodiments, the channel management module of the G node can also request logical channels for Tun-ID1 and Tun-ID2 simultaneously through a single request message.
[0504] S509, the access layer of the G node maps the tunnel channel to the logical channel.
[0505] Specifically, the access layer of the G node maps Tun-ID1 to LCID-t1 and Tun-ID2 to LCID-t2. Here, LCID-t1 is the logical channel corresponding to the first T node, used to transmit data exchanged between the G node and the first T node. LCID-t2 is the logical channel corresponding to the second T node, used to transmit data exchanged between the G node and the second T node.
[0506] It should be noted that the process of mapping Tun-ID1 and Tun-ID2 to logical channels by the G node can be implemented in one step or in two steps, and the embodiments of this application are not limited in this regard.
[0507] S510a, the logical channel is established between the access layer of the G node and the access layer of the first T node.
[0508] In S510b, a logical channel is established between the access layer of the G node and the access layer of the second T node.
[0509] In other words, in these two steps, the G node establishes underlying logical links with the access layers of the first T node and the second T node respectively, that is, it applies for logical channels for the tunnel channel between the G node and the first T node and the tunnel channel between the G node and the second T node respectively.
[0510] The embodiments of this application do not specifically limit the execution order of steps S510a and S510b. These two steps can be executed sequentially or simultaneously.
[0511] S511a, the access layer of the G node notifies the channel management module of the G node that Tun-ID1 has been successfully created.
[0512] Here, the successful creation of Tun-ID1 can be understood as the logical channel between node G and the first node T being successfully applied for, the underlying logical link being established, and the upper-layer tunnel channel Tun-ID1 being available. Therefore, this step is equivalent to the access layer of node G notifying the channel management module of node G that the logical channel application for Tun-ID1 has been successful, or in other words, notifying that the tunnel channel Tun-ID1 and the logical channel LCID-t1 have established a mapping relationship.
[0513] In this step, the parameters carried may include Tun-ID1 and LCID-t1.
[0514] S511b, the access layer of the G node notifies the channel management module of the G node that Tun-ID2 has been successfully created.
[0515] Here, the successful creation of Tun-ID2 can be understood as the logical channel between node G and the second node T being successfully applied for, the underlying logical link being established, and the upper-layer tunnel channel Tun-ID2 being available. Therefore, this step is equivalent to the access layer of node G notifying the channel management module of node G that the logical channel application for Tun-ID2 has been successful, or in other words, notifying that a mapping relationship has been established between tunnel channel Tun-ID2 and logical channel LCID-t2.
[0516] In this step, the parameters carried may include Tun-ID2 and LCID-t2.
[0517] The embodiments of this application do not specifically limit the execution order of steps S511a and S511b. These two steps can be executed sequentially or simultaneously.
[0518] S512a, the channel management module of the G node sends a request to the channel management module of the first T node to create a tunnel channel.
[0519] The "Create Tunnel" request is used to request the first T node to establish a tunnel corresponding to the first T node.
[0520] In this step, the parameters carried in the tunnel creation request may include: Tun-ID1 and LCID-t1.
[0521] In S512b, the channel management module of the G node sends a request to the channel management module of the second T node to create a tunnel channel.
[0522] The "Create Tunnel" request is used to request the second T node to establish a tunnel corresponding to the second T node.
[0523] In this step, the parameters carried in the tunnel creation request may include: Tun-ID2 and LCID-t2.
[0524] The execution order of steps S512a and S512b is not specifically limited in this embodiment. These two steps can be executed sequentially or simultaneously.
[0525] S513a, the channel management module of the first T node generates the tunnel channel Tun-ID1 corresponding to the first T node.
[0526] In this embodiment, the identifier of the tunnel channel generated by the first T node is the same as the identifier of the tunnel channel corresponding to the first T node in the G node, which is Tun-ID1.
[0527] Correspondingly, the channel management module of the first T node can establish a mapping relationship between Tun-ID1 and LCID-t1.
[0528] S513b, the channel management module of the second T node generates the tunnel channel Tun-ID2 corresponding to the second T node.
[0529] In this embodiment, the identifier of the tunnel channel generated by the second T node is the same as the identifier of the tunnel channel corresponding to the second T node in the G node, which is Tun-ID2.
[0530] Correspondingly, the channel management module of the second T node can establish a mapping relationship between Tun-ID2 and LCID-t2.
[0531] S514a, the channel management module of the first T node sends a tunnel channel creation response to the channel management module of the G node.
[0532] The tunnel creation response indicates that the first T node has established a mapping relationship between the tunnel and the logical channel.
[0533] Optionally, the tunnel creation response may include the parameter Tun-ID1. Optionally, the tunnel creation response may also include LCID-t1.
[0534] S514b, the channel management module of the second T node sends a tunnel channel creation response to the channel management module of the G node.
[0535] The tunnel creation response indicates that the second T node has established a mapping relationship between the tunnel and the logical channel.
[0536] Optionally, the tunnel creation response may include the parameter Tun-ID2. Optionally, the tunnel creation response may also include LCID-t2.
[0537] The embodiments of this application do not specifically limit the execution order of steps S514a and S514b. These two steps can be executed sequentially or simultaneously.
[0538] S515a, the channel management module of node G notifies the channel management module of the first node T that the tunnel channel with T2 has been successfully established.
[0539] In this step, the parameters carried may include the tunnel identifier Tun-ID2 of the second T node.
[0540] S515b, the channel management module of node G notifies the channel management module of node T that the tunnel channel with T1 has been successfully established.
[0541] In this step, the parameters carried may include the tunnel identifier Tun-ID1 of the first T node.
[0542] The embodiments of this application do not specifically limit the execution order of steps S515a and S515b. These two steps can be executed sequentially or simultaneously.
[0543] S516a, the channel management module of the first T node completes the default establishment of the relay control channel.
[0544] In this step, the first T node establishes a mapping relationship between the relay control channel and the tunnel channel Tun-ID1 of the first T node.
[0545] S516b, the channel management module of the second T node completes the default establishment of the relay control channel.
[0546] In this step, the second T node establishes the mapping relationship between the relay control channel and the tunnel channel Tun-ID2 of the second T node.
[0547] In these two steps, since the tunnel channel is established, the relay control channel is automatically established. The first T node and the second T node respectively establish a mapping relationship between their respective relay control channels and the tunnel channel.
[0548] The embodiments of this application do not specifically limit the execution order of steps S516a and S516b. These two steps can be executed sequentially or simultaneously.
[0549] S517, the channel management module of the G node stores the tunnel tables of the first T node and the second node.
[0550] Specifically, the tunnel table may include the mapping relationship between Tun-ID1 and Tun-ID2.
[0551] At this point, the tunnel channels for the first T node and the second T node have been established, and the relay tunnel between the first T node and the second T node is now available.
[0552] The above description synchronously describes similar steps in the interaction process between node G and the first T node and the second T node. However, it is understood that the process of establishing a tunnel between node G and the first T node and the process of establishing a tunnel between node G and the second T node are independent of each other. That is, when node G establishes a tunnel with the first T node, steps S506a, S507, S508a, S509, S510a, S511a, S512a, S513a, S514a, S515a, and S516a are executed sequentially after step S505. When node G establishes a tunnel with the second T node, steps S506b, S507, S508b, S509, S510b, S511b, S512b, S513b, S514b, S515b, and S516b are executed sequentially after step S505. The embodiments of this application do not specifically limit the order in which the steps are executed between the two processes.
[0553] Continue to refer to Figure 5 .
[0554] S518, the channel management module of the first T node creates the transmission channel TCID1 corresponding to the first T node.
[0555] In this step, the channel management module of the first T node generates the transmission channel identifier TCID1.
[0556] Then, the channel management module of the first T node sends a first request to the G node, and the G node forwards this first request to the second T node. This first request is used to request the second T node to establish a transmission channel (specifically a service channel) corresponding to the second T node. This first request is similar to... Figure 4 The request to create a transport channel is a first request, but this first request is ultimately sent to the second T node. The specific process is as follows: S519a-S519c.
[0557] S519a, the channel management module of the first T node sends a first request to the tunnel channel of the first T node through the relay control channel, and sends the first request to the access layer of the first T node through the tunnel channel of the first T node.
[0558] The first request is used to request the establishment of a business channel with the second node T2.
[0559] S519b, the access layer of the first T node forwards the first request to the access layer of the second T node through the tunnel channel Tun-ID1 in the G node corresponding to the first T node and the tunnel channel Tun-ID2 in the G node corresponding to the second T node.
[0560] S519c, the access layer of the second T node transmits the first request to the relay control channel of the second T node through the tunnel channel of the second T node, and then forwards the first request to the channel management module of the second T node through the relay control channel of the second T node.
[0561] In some embodiments, the parameters that the first request may carry include: port information, TCID1, and Tun-ID1, wherein the port information includes a first port and a second port.
[0562] S520, the channel management module of the second T node creates the transmission channel TCID2 corresponding to the second T node.
[0563] In this step, the channel management module of the second T node generates the transmission channel identifier TCID2.
[0564] S521, the channel management module of the second T node completes the binding relationship between TCID2 and the second port with the basic application layer of the second T node.
[0565] Then, the channel management module of the second T node sends a first response to the G node, and the G node forwards this first response to the first T node. This first response indicates that the second T node has established a transmission channel. This first response is similar to... Figure 4 The creation of the transmission channel response is just that this first response must ultimately be sent to the first T node. The specific process is as follows: S522a-S522c.
[0566] S522a, the channel management module of the second T node sends a first response to the tunnel channel of the second T node through the relay control channel, and sends the first response to the access layer of the second T node through the tunnel channel of the second T node.
[0567] The first response is used to indicate that the second T node has established a transmission channel, which can also be understood as indicating that a service channel has been established with the first T node T1.
[0568] S522b, the access layer of the second T node forwards the first response to the access layer of the first T node through the tunnel channel Tun-ID1 in the G node corresponding to the first T node and the tunnel channel Tun-ID2 in the G node corresponding to the second T node.
[0569] S522c, the access layer of the first T node transmits the first response to the relay control channel of the first T node through the tunnel channel of the first T node, and then forwards the first response to the channel management module of the first T node through the relay control channel of the first T node.
[0570] In fact, the first response is used to indicate that the business channel based on TCID1 and TCID2 has been established.
[0571] In some embodiments, the parameters that the first response may carry include: port information, TCID1, TCID2, and Tun-ID2, wherein the port information includes a first port and a second port.
[0572] In simple terms, the transmission path of the first request is as follows: the basic service layer (specifically the channel management module) of the first T node - the relay control channel of the first T node - the tunnel channel of the first T node - the access layer of the first T node - the tunnel channel in the G node corresponding to the first T node - the tunnel channel in the G node corresponding to the second T node - the access layer of the second T node - the tunnel channel of the second T node - the relay control channel of the second T node - the basic service layer (specifically the channel management module) of the second T node. The transmission path of the first response is the opposite.
[0573] In this embodiment, after the relay tunnel between the first T node and the second T node is established, the first T node and the second T node can discover and see each other. The data transmitted between the first T node and the second T node also passes through the G node and is directly forwarded by the G node.
[0574] S523, the channel management module of the first T node notifies the first T node that the application layer transmission channel application has been successfully applied for.
[0575] In the subsequent process, if it is necessary to continue to establish a service channel between the first T node and the second T node, signaling and data can be transmitted directly in the already established relay tunnel, that is, S502-S504 and S518-S523 can be executed repeatedly.
[0576] The tunnel establishment data packet is mentioned in step S505. The format of the tunnel establishment data packet is described below as an example.
[0577] The tunnel establishment packet is a data packet encapsulated by the basic service layer of the first T node and transmitted within the control channel. For example, the format of the tunnel establishment packet (i.e., the packet format transmitted within the control channel) can be shown in Table 13 below:
[0578] Table 13
[0579]
[0580] The format of the tunnel establishment data packet includes a transmission channel identifier field, a length field, and a message payload field. Among these:
[0581] The transmission channel identifier field is used to carry the identifier of the control channel. For example, in SLB, the identifier of the control channel can be 0x0009.
[0582] The Length field is used to indicate the total length of the data packet following the Length field.
[0583] The information payload field is used to carry the content of the signaling frame.
[0584] Specifically, the signaling frame content in this information payload can have a uniform format, as shown in Table 14 below:
[0585] Table 14
[0586]
[0587] The format of the signaling frame content may include a code field, an identifier field, a length field, and a data field.
[0588] The code field is used to carry the identifier of the signaling. In some embodiments, the code field may occupy one byte. In this application embodiment, the correspondence between code values and signaling types can be referred to Table 10, which will not be repeated for the sake of simplicity.
[0589] The identifier field is used to carry identification bits. For example, if the signaling is sent as a request, then the response should be sent with the same identifier. This allocation continues in a circular fashion. In some embodiments, the code field may occupy one byte.
[0590] The length field is used to indicate the length of the data portion. In some embodiments, the length field may occupy two bytes.
[0591] Data fields are used to carry data. In some embodiments, the number of bytes occupied by a data field can be designed according to actual needs. Generally, different code values correspond to different numbers of data bytes.
[0592] In this embodiment of the application, the signaling frame data (i.e., signaling frame content) in the information payload of the tunnel establishment data packet can adopt the basic frame format, wherein the effective payload of the signaling frame does not exceed the MTU size.
[0593] In this embodiment, the data field in Table 14 may include transmission mode (Tcid_mode) indication information, where the transmission mode may include basic mode, normal mode, and tunnel mode. The transmission mode indication information indicates one of the aforementioned modes. In tunnel mode, a tunnel channel can be provided for communication between T nodes.
[0594] For example, when the transmission mode is tunnel mode, the data fields in Table 14 may specifically include: MTU, MPS, and peer address. The MTU size can be consistent with the MPS size to simplify the processing flow. The peer address is a byte string type, which is convenient for unified maintenance by the host.
[0595] The method 500 provided in this application embodiment can establish a relay tunnel, enabling the first T node and the second T node to transmit signaling and services. For ease of description, the data packets transmitted in the tunnel channel will be referred to as service transmission data packets in the following embodiments. The format of the service transmission data packets (i.e., the packet format transmitted in the tunnel channel) is described below by example.
[0596] For example, the format of the service transmission data packet is shown in Table 15 below:
[0597] Table 15
[0598]
[0599] The format of the data packets transmitted by this service may include: a tunnel channel identifier field, a transmission channel identifier field, a length field, and a basic application layer data field. Among these:
[0600] The tunnel identifier field is used to carry the tunnel identifier of the peer node T;
[0601] The transmission channel identifier field is used to carry the transmission channel identifier of the peer T node;
[0602] The length field is used to indicate the total length of the data packet following the length field;
[0603] The basic application layer data field is used to carry basic application layer data, specifically SDU.
[0604] In some embodiments, the tunnel channel identifier field in the service transmission data packet may also carry the local tunnel channel identifier. In other embodiments, the transmission channel identifier field may also carry the local transmission channel (specifically, the service channel) identifier.
[0605] To facilitate understanding, an example is given below. Assume that a relay tunnel is established between the first T node and the second T node, and the tunnel channel mapping relationship of the G node includes the mapping relationship between the tunnel channel Tun-ID1 of the first T node and the tunnel channel Tun-ID2 of the second T node.
[0606] When the first T node sends service data to the second T node, the format of the data packets transmitted between the first T node and the second T node changes as follows:
[0607] 1) The format and information carried in the service transmission data packets sent by the first T node can be:
[0608]
[0609] In the example, the transmission channel identifier field of the first T node carries the transmission channel identifier TCID2 of the peer (i.e., the second T node), and the tunnel channel identifier field carries the tunnel channel identifier Tun-ID2 of the peer (i.e., the second T node).
[0610] Here, the tunnel channel identifier Tun-ID2 is added by the relay module of the first T node. The transmission channel identifier TCID2 is added by the transmission and control module of the first T node.
[0611] 2) After receiving the data packet from 1), node G forwards it to the second node T according to the tunnel channel identifier Tun-ID2. The format and information carried by the service transmission data packet sent by node G are as follows:
[0612]
[0613] In 2), the G node directly forwards the data packets received from the first T node.
[0614] 3) After receiving the data packet from 2), the second T node strips the tunnel channel identifier and the transmission channel identifier, resulting in the following data packet format and information:
[0615]
[0616] Here, the tunnel channel identifier Tun-ID2 is stripped from the relay module of the second T node. The transmission channel identifier TCID2 is stripped from the transmission and control module of the second T node.
[0617] The above Figure 4 The method 400 shown establishes a trunk service channel based on the routing table (this mode can be called trunk mode). Figure 5 Method 500 shown establishes a service channel based on a tunnel (this mode can be called tunnel mode). To further understand methods 400 and 500, see the appendix below. Figure 6 The two methods are explained in detail.
[0618] Figure 6(a) shows the relay mode based on the routing table. The first T node and the second T node are connected to the same G node. If a relay service channel is established between the first T node and the second T node, then the number of service channel requests will determine the number of service channels established between the first T node, the G node, and the second T node. The data routing between the first T node and the second T node is maintained by the G node.
[0619] For example, such as Figure 6 As shown in (a), assume that three relay service channels need to be established between the first T node and the second T node. Then, three transmission channels TCID1a, TCID2a, and TCID3a are established on the first T node side, and three transmission channels TCID1b, TCID2b, and TCID3b are established on the second T node side. On the G node side, three transmission channels TCID1c, TCID2c, and TCID3c, which are mapped to the transmission channels of the first T node, and three transmission channels TCID1d, TCID2d, and TCID3d, which are mapped to the transmission channels of the second T node, are established. Here, adjacent pairs of transmission channels in TCID1a, TCID1c, TCID1d, and TCID1b are mapped. Adjacent pairs of transmission channels in TCID2a, TCID2c, TCID2d, and TCID2b are mapped. Adjacent pairs of transmission channels in TCID3a, TCID3c, TCID3d, and TCID3b are mapped.
[0620] The channel mapping relationship table maintained by the G node can be shown in Table 16.
[0621] Table 16
[0622]
[0623] When a G node receives data from a first T node or a second T node, it can forward it to the peer node according to the maintained transmission channel mapping relationship.
[0624] In the routing table-based relay mode, the QoS of each service channel can be different, thus adapting to different service requirements.
[0625] Figure 6(b) illustrates a tunnel-based relay mode. The first T node and the second T node are connected to the same G node. If a service channel is to be established between the first T node and the second T node, a tunnel channel is first established between them. After the tunnel channel is established, the relay control channel is established by default. Service channels can be established based on the relay control channel and the tunnel channel. When establishing a service channel between the first T node and the second T node, signaling can be transmitted through the relay control channel and the tunnel channel, thereby completing the establishment of the service channel between the first T node and the second T node. The G node maintains the mapping relationship between the tunnel channels established between the first T node and the second T node. Subsequently, the service channel and control channel between the first T node and the second T node are forwarded through the tunnel channel of the G node.
[0626] For example, such as Figure 6 As shown in (b), assuming a relay tunnel needs to be established between the first T node and the second T node, a tunnel channel Tun-ID1 is established between the G node and the first T node, and a tunnel channel Tun-ID2 is established between the G node and the second T node. The G node maintains the mapping relationship between Tun-ID1 and Tun-ID2. When the first T node and the second T node send signaling or data, both data packets and signaling are transmitted to the other end through Tun-ID1 and Tun-ID2. The specific data transmission path is: the transmission channel of the first T node - the tunnel channel Tun-ID1 of the first T node - the access layer of the first T node - the access layer of the G node - the tunnel channel Tun-ID1 corresponding to the first T node in the G node - the tunnel channel Tun-ID2 corresponding to the second T node in the G node - the access layer of the G node - the access layer of the second T node - the tunnel channel Tun-ID2 of the second T node - the transmission channel of the second T node. As can be seen from the figure, regardless of how many transmission channels there are on the first T node or the second T node side, their data is transmitted through the same tunnel channel.
[0627] In the tunnel-based relay mode, only one relay tunnel needs to be established between the two T nodes. Signaling and data between the two T nodes are transmitted through the relay tunnel, making the process simple.
[0628] Referring to the above embodiments and accompanying drawings, this application provides a method for device connection, mainly involving the connection between two terminal node devices, enabling device and service discovery and data transmission. This method can... Figure 1 Implemented in the communication system 100 shown, more specifically, in a system having such Figure 2 The protocol architecture shown is implemented in electronic devices.
[0629] Figure 7 A schematic flowchart illustrating a device connection method provided in an embodiment of this application is shown. Figure 7As shown, the method 700 may include steps S710 to S750.
[0630] S710, the second electronic device sends a first service query request to the first electronic device.
[0631] The first electronic device acts as a management node device, and the second electronic device acts as a terminal node device. The first electronic device and the second electronic device are connected to each other.
[0632] The first service query request is used to request services from other terminal node devices connected to the first electronic device.
[0633] In this embodiment, the other terminal node devices connected to the first electronic device can be one or more terminal node devices specified by the second electronic device, or they can be all the terminal node devices connected to the first electronic device except for the second electronic device. This embodiment does not limit this. In summary, the first service query request is used to request services from terminal node devices other than the second electronic device.
[0634] For example, when the second electronic device makes its first query, the first service query request can be used to request services from all terminal node devices connected to the first electronic device, excluding the second electronic device.
[0635] In this embodiment, the first service query request can be used to query whether other terminal node devices possess one or more services specified by the second electronic device, or to query which services other terminal node devices have. For example, the first service query request can be used to query whether other terminal node devices have video services, photo services, etc. As another example, the first service query request can be used to query the primary services (i.e., services that can exist independently) of other terminal node devices. In short, the first service query request is used to query information related to the services of terminal node devices other than the second electronic device.
[0636] For example, when the second electronic device makes its first query, the first service query request can be used to request whether other terminal node devices connected to the first electronic device have the service specified by the second electronic device.
[0637] As an example and not a limitation, the first service query request can be service query request #B in the above embodiments. For a description of service query request #B, please refer to the relevant description above; for brevity, it will not be repeated here.
[0638] In some embodiments, the first service query request may include:
[0639] The first destination node indication information is used to indicate the terminal node device of the queried service;
[0640] The first query service instruction information is used to indicate the service being queried.
[0641] Optionally, the first service query request may also include first source node indication information, used to indicate the terminal node device that initiated the service query.
[0642] In this embodiment of the application, the terminal node device that initiates the service query is the second electronic device, so the first source node indication information is used to indicate the second electronic device.
[0643] In one embodiment, the first source node indication information may include the identifier of the second electronic device and / or the address of the second electronic device. The identifier of the second electronic device may be its device ID, UDID, UUID, IMEI, or an identifier assigned to it by the first electronic device. The address of the second electronic device may be its MAC address, physical address, or an address assigned to it by the first electronic device.
[0644] If the first service query request includes first source node indication information, the first electronic device can determine that the terminal node device initiating the service query is the second electronic device based on the first source node indication information.
[0645] If the first service query request does not include the first source node indication information, the first electronic device can determine the source of the first service query request based on other information, such as the channel identifier used to transmit the first service query request, thereby determining that the terminal node device initiating the service query is the second electronic device.
[0646] In this embodiment of the application, the terminal node device being queried is another terminal node device connected to the first electronic device.
[0647] In one example, if the second electronic device specifies the terminal node device to be queried, the first destination node indication information is used to indicate the specified electronic device. Taking the second electronic device specifying a target electronic device as an example, the first destination node indication information may include the identifier and / or the address of the target electronic device. Here, the identifier of the target electronic device may be the device ID, UDID, UUID, IMEI, or an identifier assigned to the target electronic device by the first electronic device, etc. The address of the target electronic device may be the MAC address, physical address, or an address assigned to the target electronic device by the first electronic device, etc. This application embodiment does not limit this.
[0648] In another example, if the second electronic device does not specify the terminal node device for the queried service, the first destination node indication information can indicate all terminal node devices connected to the first electronic device other than the second electronic device. For example, the first destination node indication information may include a general identifier and / or a broadcast address. This general identifier and / or broadcast address is used to indicate that the terminal node devices for the queried service are all terminal node devices connected to the first electronic device other than the second electronic device.
[0649] The first query service instruction information is used to indicate the service being queried.
[0650] When the first service query request includes first destination node indication information and first query service indication information, the second electronic device indicates the terminal node device of the queried service to the first electronic device, without needing to indicate the terminal node device that initiated the service query (i.e., the second electronic device itself), which can save signaling overhead.
[0651] S720, the first electronic device determines the target electronic device based on the first service query request.
[0652] The target electronic device is connected to the first electronic device, and the target electronic device acts as a terminal node device.
[0653] Here, the target electronic device is the terminal node device being queried. The target electronic device can be a terminal node device specified by the second electronic device, or it can be any of the other terminal node devices connected to the first electronic device.
[0654] As an example and not a limitation, the first electronic device can be Figure 3 In the G node, the second electronic device can be Figure 3 In the T1 node, the target electronic device can be Figure 3 The T2 node in the middle.
[0655] In this step, the first electronic device determines the target electronic device in different ways depending on the information carried in the first service query request.
[0656] In one example, if the first service query request includes the identifier and / or address of the specified terminal node device, the first electronic device determines that the specified terminal node device is the target electronic device.
[0657] In one example, if the first service query request includes a general identifier and / or a broadcast address, the first electronic device determines, based on the general identifier and / or broadcast address, that the terminal node devices for the queried service are all terminal node devices connected to the first electronic device except for the second electronic device, wherein the target electronic device is any one of the terminal node devices for the queried service.
[0658] S730, the first electronic device sends a second service query request to the target electronic device.
[0659] The second service query request is used to request a query about the services offered by the target electronic device. For example, the second service query request may be used to query whether the target node device possesses one or more services specified by the second electronic device, or to query which services the target node device has (e.g., primary services). The content of the service queried by the second service query request is determined based on the content indicated in the first service query request.
[0660] As an example and not a limitation, the second service query request can be the service query request #C in the above embodiments. For a description of service query request #C, please refer to the relevant description above; for brevity, it will not be repeated here.
[0661] In some embodiments, the second service query request may include:
[0662] The first source node indication information is used to indicate the terminal node device that initiated the service query;
[0663] The first query service instruction information is used to indicate the service being queried.
[0664] Optionally, the second service query request may also include first destination node indication information, used to indicate the terminal node device of the queried service.
[0665] In one embodiment, the first source node indication information may include the identifier of the second electronic device and / or the address of the second electronic device.
[0666] In one embodiment, the first destination node indication information may include the identifier and / or address of the target electronic device. Of course, since the target electronic device is aware of its own identifier and / or address information, the second service query request may not include the first destination node indication information.
[0667] In one embodiment, the first query service indication information can be used to indicate whether the target electronic device has the service specified by the second electronic device, or to indicate which services the target electronic device has.
[0668] When the second service query request includes the first source node indication information and the first query service indication information, the first electronic device indicates the terminal node device that initiated the service query to the target electronic device, without needing to indicate the terminal node device of the queried service (i.e., the target electronic device itself), which can save signaling overhead.
[0669] In some embodiments, both the first service query request and the second service query request include first source node indication information, first destination node indication information, and first query service indication information. Thus, when the information included in the first service query request and the second service query request is the same, the corresponding data packet format can be designed to be identical, which simplifies the processing of data packets by the first electronic device.
[0670] S740, the target electronic device sends a second service query response to the first electronic device.
[0671] The second service query response is used to indicate the service information of the target electronic device. For example, the second service query response is used to indicate whether the target electronic device has the service specified by the second electronic device, or to indicate the services that the target electronic device has.
[0672] In some embodiments, if the target electronic device does not have the service specified by the second electronic device, the target electronic device may not send relevant service information back to the first electronic device.
[0673] As an example and not a limitation, the second service query response can be the service query response #F in the above embodiments. For an explanation of the service query response #F, please refer to the relevant description above; for brevity, it will not be repeated here.
[0674] In some embodiments, the second service query response may include:
[0675] The second destination node indication information is used to indicate the terminal node device that initiated the query service;
[0676] The second query service indication information is used to indicate the service of the terminal node device being queried.
[0677] Optionally, the second service query response may also include second source node indication information, used to indicate the terminal node device responding to the service query.
[0678] In one example, the terminal node device responding to the service query is the target electronic device, and the second source node indication information may include the identifier and / or address of the target electronic device.
[0679] If the second service query response includes second source node indication information, the first electronic device can determine that the terminal node device responding to the service query is the target electronic device based on the second source node indication information.
[0680] If the second service query response does not include the second source node indication information, the first electronic device can determine the source of the second service query response based on other information, such as the channel identifier used to transmit the second service query response, thereby determining that the terminal node device responding to the service query is the target electronic device.
[0681] In one example, the second destination node indication information may include the identifier and / or address of the second electronic device. The first electronic device can determine the terminal node device initiating the query service based on the second destination node indication information.
[0682] The second query service indication information is used to indicate the services provided by the terminal node device for the queried service. Specifically, the second query service indication information may indicate that the target electronic device has the service queried by the second electronic device, or it may indicate which services the target electronic device has.
[0683] When the second service query response includes the second destination node indication information and the second query service indication information, the target electronic device indicates the terminal node device that initiated the query service to the first electronic device, without needing to indicate the terminal node device that responded to the service query (i.e., the target electronic device itself), which can save signaling overhead.
[0684] S750, the first electronic device sends a first service query response to the second electronic device.
[0685] The first service query response is used to indicate the service information of the target electronic device. The first service query response is determined based on the second service query response.
[0686] As an example and not a limitation, the first service query response can be the service query response #G in the above embodiments. For an explanation of the service query response #G, please refer to the relevant description above; for brevity, it will not be repeated here.
[0687] In some embodiments, the first service query response may include:
[0688] The second source node indication information is used to indicate the terminal node device responding to the service query;
[0689] The second query service indication information is used to indicate the service of the terminal node device being queried.
[0690] Optionally, the first service query response may also include second destination node indication information, used to indicate the terminal node device that initiated the query service.
[0691] In one embodiment, the second source node indication information may include the identifier of the target electronic device and / or the address of the target electronic device.
[0692] In one embodiment, the second destination node indication information may include the identifier and / or address of the second electronic device. Since the second electronic device knows its own identifier and / or address, in some embodiments, the first service query response may not include the second destination node indication information.
[0693] The second query service indication information is used to indicate the services provided by the terminal node device for the queried service. Specifically, the second query service indication information may indicate that the target electronic device has the service queried by the second electronic device, or it may indicate which services the target electronic device has.
[0694] When the first service query response includes the second source node indication information and the second query service indication information, the first electronic device indicates the terminal node device that responded to the service query to the second electronic device, without needing to indicate the terminal node device that initiated the query service (i.e., the second electronic device itself), which can save signaling overhead.
[0695] Optionally, both the first service query response and the second service query response may include second source node indication information, second destination node indication information, and second query service indication information. When the information included in the first service query response and the second service query response is the same, the corresponding data packet format can be designed to be the same, which can simplify the processing of data packets by the first electronic device.
[0696] In some embodiments, the first service query request includes a first destination node indication information and a first query service indication information, and the second service query request includes a first source node indication information and a first query service indication information.
[0697] In some embodiments, the second service query response includes second destination node indication information and second query service indication information, and the first service query response includes second source node indication information and second query service indication information.
[0698] In some embodiments, the first service query request, the second service query request, the second service query response, and the first service query response are transmitted in a relay service management channel, which is used to transmit service management data between two terminal node devices. In this embodiment, for data in the relay service management channel, the management node forwards the data according to the destination node, adding source node information to the data packet before forwarding.
[0699] It should be noted that the "service management data between two terminal node devices" mentioned here refers to service management data transmitted between two terminal node devices that needs to be relayed by a management node device. In this embodiment, the relay service management channel is established by default after the underlying default logical link is successfully established.
[0700] In some embodiments, such as Figure 8 As shown, the first electronic device, the second electronic device, and the target electronic device all include a basic service layer. The first service query request is received by the basic service layer of the first electronic device from the basic service layer of the second electronic device; the second service query request is sent by the basic service layer of the first electronic device to the basic service layer of the target electronic device; the second service query response is received by the basic service layer of the first electronic device from the basic service layer of the target electronic device; and the first service query response is sent by the basic service layer of the first electronic device to the basic service layer of the second electronic device.
[0701] In some embodiments, such as Figure 8 As shown, the second electronic device includes a basic application layer and a basic service layer.
[0702] Before step S710, method 700 further includes:
[0703] S760, the basic service layer of the second electronic device receives a third service query request sent by the basic application layer of the second electronic device. This third service query request is used to instruct the user to query services from other terminal node devices.
[0704] After step S750, method 700 further includes:
[0705] S770, the basic service layer of the second electronic device sends a third service query response to the basic application layer of the second electronic device. This third service query response is used to indicate the service information of the target electronic device.
[0706] As an example and not a limitation, the third service query request can be service query request #A in the above embodiments, and the third service query response can be service query response #H in the above embodiments. For explanations of service query request #A and service query response #H, please refer to the relevant descriptions above; for brevity, they will not be repeated here.
[0707] In one embodiment, a third-service query request may include:
[0708] The first query service instruction information is used to indicate the service being queried.
[0709] Optionally, a third-party service query request may also include at least one of the following:
[0710] The first source node indication information is used to indicate the terminal node device that initiated the service query;
[0711] The first destination node indication information is used to indicate the terminal node device of the queried service.
[0712] For details regarding the specific information included in the third service query request, please refer to the relevant description of the first service query request. Here, the first source node indication information and the first destination node indication information can be determined by the basic application layer or the basic service layer. When determined by the basic service layer, the third service query request may not include the first source node indication information or the first destination node indication information. The first query service indication information is determined by the basic application layer.
[0713] In one embodiment, a third-party service query response may include:
[0714] The second source node indication information is used to indicate the terminal node device responding to the service query;
[0715] The second query service indication information is used to indicate the service of the terminal node device being queried.
[0716] Optionally, the third service query response may also include second destination node indication information, used to indicate the terminal node device that initiated the query service.
[0717] For details regarding the content included in the third-party service query response, please refer to the relevant description of the first-party service query response. For the sake of brevity, it will not be elaborated upon here.
[0718] In some embodiments, such as Figure 8 As shown, the target electronic device includes a basic application layer and a basic service layer.
[0719] Before step S740, method 700 further includes:
[0720] S780, the basic service layer of the target electronic device sends a fourth service query request to the basic application layer of the target electronic device. This fourth service query request is used to request the basic application layer to query the services of the target electronic device.
[0721] S790, the base service layer of the target electronic device receives a fourth service query response sent by the base service layer of the target electronic device. This fourth service query response is used to indicate the service information of the target electronic device.
[0722] As an example and not a limitation, the fourth service query request can be service query request #D in the above embodiments, and the fourth service query response can be service query response #E in the above embodiments. For explanations of service query request #D and service query response #E, please refer to the relevant descriptions above; for brevity, they will not be repeated here.
[0723] In one embodiment, the fourth service query request may include:
[0724] The first source node indication information is used to indicate the terminal node device that initiated the service query;
[0725] The first query service instruction information is used to indicate the service being queried.
[0726] Optionally, the fourth service query request may also include first destination node indication information, used to indicate the terminal node device of the queried service.
[0727] In one embodiment, the fourth service query response may include:
[0728] The second query service indication information is used to indicate the service of the terminal node device being queried.
[0729] Optionally, the fourth service query response may also include at least one of the following:
[0730] The second source node indication information is used to indicate the terminal node device responding to the service query;
[0731] The second destination node indication information is used to indicate the terminal node device that initiated the query service.
[0732] For details regarding the content included in the fourth service query request, please refer to the relevant description of the second service query request; for details regarding the content included in the fourth service query response, please refer to the relevant description of the second service query response. For the sake of brevity, these details will not be elaborated upon here.
[0733] In some embodiments, the fourth service query response may include second destination node indication information and second query service indication information.
[0734] In this embodiment of the application, the first electronic device, the second electronic device, and the target electronic device all support StarSpark basic SLB access technology.
[0735] In the above technical solution, the relay function of the first electronic device (i.e., the management node device) enables the discovery of devices and services between two terminal node devices, namely the first electronic device and the target electronic device, thereby realizing the connection and communication between the first electronic device and the target electronic device.
[0736] Figure 9 A schematic flowchart illustrating another device connection method provided in an embodiment of this application is shown. Figure 9 As shown, the method 800 may include steps S810 to S830.
[0737] S810, the first electronic device receives a channel establishment request sent by the second electronic device.
[0738] This channel establishment request is used to request the first electronic device to establish a channel between the second electronic device and the target electronic device. It should be understood that the channel between the second electronic device and the target electronic device refers to a channel established between the second electronic device and the target electronic device via a relay from the first electronic device.
[0739] The first electronic device acts as a management node device, and the second electronic device and the target electronic device are connected to the first electronic device respectively. Both the second electronic device and the target electronic device act as terminal node devices.
[0740] As an example, and not a limitation, a channel establishment request can be... Figure 4 The trunk service channel establishment request involved in S404, or Figure 5 The tunnel establishment request involved in S505. For detailed explanation, please refer to the relevant description above; for brevity, it will not be repeated here.
[0741] S820, the first electronic device establishes a channel between the first electronic device and the second electronic device.
[0742] S830, the first electronic device establishes a channel between the first electronic device and the target electronic device.
[0743] In this embodiment of the application, the channel between the first electronic device and the second electronic device, and the channel between the first electronic device and the target electronic device, are used to transmit information between the second electronic device and the target electronic device.
[0744] In steps S820 and S830, there are multiple ways for the first electronic device to establish a channel between the second electronic device and the target electronic device. These are detailed below. Figure 10 and 11 A detailed introduction will be provided.
[0745] Figure 10 This illustration shows a flowchart of a method for establishing a channel between a second electronic device and a target electronic device according to an embodiment of this application. Here, the first electronic device includes a first basic service layer and a first access layer. The second electronic device includes a second basic service layer and a second basic application layer. The target electronic device includes a third basic service layer and a third basic application layer.
[0746] like Figure 10 As shown, the process S820 of establishing a channel between the first electronic device and the second electronic device may specifically include steps S821 to S828.
[0747] S821, the first basic service layer generates the identifier of the first transmission channel.
[0748] The identifier for the first transmission channel is used to identify the first transmission channel. The first transmission channel is a transmission channel in the first basic service layer.
[0749] S822, the first basic service layer sends the first information to the first access layer.
[0750] This first information is used to request a logical channel for the first transmission channel.
[0751] S823, the first access layer sends the second information to the first basic service layer.
[0752] The second information is used to instruct the first transmission channel to establish a mapping relationship with the first logical channel.
[0753] Accordingly, prior to S823, the first access layer maps the first transmission channel to the first logical channel.
[0754] S824, the first basic service layer sends third information to the second electronic device.
[0755] The third message is used to instruct the second electronic device to establish a third transmission channel.
[0756] In this step, the first basic service layer sends the third information to the second basic service layer.
[0757] S825, the second electronic device generates the identifier for the third transmission channel.
[0758] The identifier for the third transmission channel is used to identify the third transmission channel. The third transmission channel is a channel in the second basic service layer. In this step, the identifier for the third transmission channel is specifically generated by the second basic service layer of the second electronic device.
[0759] Accordingly, the second electronic device establishes a mapping relationship between the third transmission channel and the first logical channel, as well as a mapping relationship between the third transmission channel and the first transmission channel.
[0760] In this embodiment, the identifiers of the first transmission channel and the third transmission channel, which have a mapping relationship with the first logical channel, are different.
[0761] S826, within the second electronic device, a third transmission channel is bound to the first port between the second basic service layer and the second basic application layer.
[0762] The first port is the port used by the second electronic device. This step is used to establish the mapping relationship between the third transmission channel and the first port.
[0763] S827, the second electronic device sends the fourth information to the first basic service layer.
[0764] The fourth piece of information is used to indicate the establishment of a mapping relationship between the third transmission channel and the first logical channel, as well as the establishment of a mapping relationship between the third transmission channel and the first transmission channel.
[0765] In this embodiment, the third transmission channel has a mapping relationship with the first port of the second electronic device.
[0766] S828, the first basic service layer determines, based on the fourth information, that the channel between the first electronic device and the second electronic device has been established.
[0767] Here, the channel between the first electronic device and the second electronic device includes a first transmission channel, a first logical channel, and a third transmission channel. The first transmission channel and the first logical channel have a mapping relationship, and the third transmission channel and the first logical channel also have a mapping relationship.
[0768] As an example rather than a limitation, the first piece of information could be... Figure 4 The information carried in step S407a, the second information may be Figure 4 The information carried in step S410a, the third information may be Figure 4 The information carried in step S411a, the fourth piece of information may be Figure 4 The information carried in step S414a. For detailed explanation, please refer to the relevant description above; for brevity, it will not be repeated here.
[0769] After steps S821 to S828, the first electronic device completes the mapping relationship between the various layers of the second electronic device, thereby establishing a channel between the first electronic device and the second electronic device.
[0770] The process S830 of establishing a channel between the first electronic device and the target electronic device may specifically include steps S831 to S838.
[0771] S831, the first basic service layer generates the identifier for the second transmission channel.
[0772] The identifier for the second transmission channel is used to identify the second transmission channel. The second transmission channel is a transmission channel within the first basic service layer.
[0773] S832, the first basic service layer sends the fifth information to the first access layer.
[0774] This fifth piece of information is used to request a logical channel for the second transmission channel.
[0775] S833, the first access layer sends the sixth information to the first basic service layer.
[0776] This sixth piece of information is used to instruct the second transmission channel to establish a mapping relationship with the second logical channel.
[0777] Accordingly, prior to S833, the first access layer maps the second transmission channel onto the second logical channel.
[0778] S834, the first basic service layer sends the seventh message to the target electronic device.
[0779] The seventh piece of information is used to instruct the target electronic device to establish a fourth transmission channel.
[0780] In this step, the first basic service layer sends the seventh information to the third basic service layer.
[0781] S835, the target electronic device generates an identifier for the fourth transmission channel.
[0782] The identifier for the fourth transmission channel is used to identify the fourth transmission channel. The fourth transmission channel is a channel in the third basic service layer. In this step, the identifier for the fourth transmission channel is specifically generated by the third basic service layer of the target electronic device.
[0783] Accordingly, the target electronic device establishes a mapping relationship between the fourth transmission channel and the second logical channel, as well as a mapping relationship between the fourth transmission channel and the second transmission channel.
[0784] In this embodiment, the identifiers of the second transmission channel and the fourth transmission channel, which have a mapping relationship with the second logical channel, are different.
[0785] S836, within the target electronic device, the fourth transmission channel and the second port are bound between the third basic service layer and the third basic application layer.
[0786] The second port is the port used by the target electronic device. This step is used to establish the mapping relationship between the fourth transmission channel and the second port.
[0787] S837, the target electronic device sends the eighth message to the first basic service layer.
[0788] The eighth message is used to indicate the establishment of a mapping relationship between the fourth transmission channel and the second logical channel, as well as the establishment of a mapping relationship between the fourth transmission channel and the second transmission channel.
[0789] In this embodiment, the fourth transmission channel has a mapping relationship with the second port of the target electronic device.
[0790] S838, the first basic service layer determines, based on the eighth information, that the channel between the first electronic device and the target electronic device has been established.
[0791] Here, the channels between the first electronic device and the target electronic device include a second transmission channel, a second logical channel, and a fourth transmission channel. The second transmission channel and the second logical channel have a mapping relationship, and the fourth transmission channel and the second logical channel also have a mapping relationship.
[0792] As an example rather than a limitation, the fifth piece of information could be... Figure 4 The information carried in step S407b, the sixth piece of information may be... Figure 4 The information carried in step S410b, the seventh piece of information, may be... Figure 4 The information carried in step S411b, the eighth information may be... Figure 4 The information carried in step S414b. For detailed explanation, please refer to the relevant description above; for brevity, it will not be repeated here.
[0793] After steps S831 to S838, the first electronic device completes the mapping relationship between the channels of various layers between the first electronic device and the target electronic device, thereby establishing a channel between the first electronic device and the target electronic device.
[0794] The specific steps in step S820 and the specific steps in step S830 can be executed independently, or some steps can be combined and executed. For example, the first basic service layer can execute S821 and S831 at the same time. This application embodiment does not limit this.
[0795] Through steps S820 and S830, channels are established between the first electronic device and the second electronic device, and between the first electronic device and the target electronic device. The channels between the first electronic device and the second electronic device, and between the first electronic device and the target electronic device, are used to transmit business data that is exchanged between the first electronic device and the second electronic device.
[0796] In some embodiments, method 800 further includes, for example, Figure 10 In step S840, the first electronic device sends a channel establishment response to the second electronic device. This channel establishment response indicates that the channel establishment between the second electronic device and the target electronic device is complete.
[0797] In this embodiment of the application, the first electronic device maintains a channel mapping table to relay the service data exchanged between the second electronic device and the target electronic device.
[0798] In some embodiments, the first basic service layer may include a channel management module and a relay module. The channel management module manages the transmission channels in the first basic service layer, and the relay module manages the relay of data transmitted between the second electronic device and the target electronic device. Method 800 further includes:
[0799] The channel management module sends a channel mapping table to the relay module. This channel mapping table includes the mapping relationships between the first and third transmission channels, the second and fourth transmission channels, and the first and second transmission channels.
[0800] When the second electronic device interacts with the target electronic device for business data, the first electronic device relays the data according to the channel mapping table.
[0801] Once the channel between the second electronic device and the target electronic device is established, the two electronic devices can transmit business data through the channel between them.
[0802] Continue to refer to Figure 9 Once the channel between the second electronic device and the target electronic device is established, they can transmit business data. For example... Figure 9 As shown, method 800 also includes:
[0803] S801, the first electronic device receives the first data packet sent by the second electronic device.
[0804] The first data packet is transmitted through the channel between the first electronic device and the second electronic device, and the first data packet carries the identifier of the first transmission channel.
[0805] S802, the first electronic device generates a second data packet based on the channel relationship mapping table and the first data packet.
[0806] Specifically, the first electronic device replaces the identifier of the first transmission channel in the first data packet with the identifier of the fourth transmission channel according to the channel relationship mapping table to generate the second data packet.
[0807] S803, the first electronic device sends the second data packet to the target electronic device.
[0808] Figure 11 This illustration shows a flowchart of another method for establishing a channel between a second electronic device and a target electronic device, provided by an embodiment of this application. Here, the first electronic device includes a first basic service layer and a first access layer.
[0809] like Figure 11 As shown, the process S820 of the first electronic device establishing a channel between the first electronic device and the second electronic device may specifically include steps S841 to S847.
[0810] S841, the first basic service layer generates the identifier of the first tunnel channel.
[0811] The identifier for the first tunnel passage is used to identify the first tunnel passage. The first tunnel passage is the passage between the first basic service layer and the first access layer.
[0812] S842, the first basic service layer sends the first information to the first access layer.
[0813] This first information is used to apply for a logical channel for the first tunnel passage.
[0814] S843, the first access layer sends the second information to the first basic service layer.
[0815] The second piece of information is used to instruct the first tunnel channel to establish a mapping relationship with the first logical channel.
[0816] Accordingly, prior to S843, the first access layer maps the first tunnel channel to the first logical channel.
[0817] S844, the first basic service layer sends third information to the second electronic device.
[0818] The third information is used to instruct the second electronic device to establish a third tunnel channel. The identifier of the third tunnel channel is the same as that of the first tunnel channel.
[0819] In this step, the first basic service layer specifically sends third information to the basic service layer of the second electronic device.
[0820] S845, the second electronic device generates the identifier for the third tunnel channel.
[0821] The identifier for the third tunnel channel is used to identify the third tunnel channel. The third tunnel channel is the channel between the basic service layer and the access layer of the second electronic device.
[0822] Accordingly, the second electronic device establishes a mapping relationship between the third tunnel channel and the first logic channel, as well as a mapping relationship between the third tunnel channel and the first tunnel channel.
[0823] In this embodiment of the application, the identifiers of the third tunnel channel, which has a mapping relationship with the first logical channel, are the same as those of the first tunnel channel.
[0824] S846, the second electronic device sends the fourth information to the first basic service layer.
[0825] The fourth piece of information is used to indicate the establishment of a mapping relationship between the third tunnel channel and the first logical channel, as well as the establishment of a mapping relationship between the third tunnel channel and the first tunnel channel.
[0826] S847, the first basic service layer determines, based on the fourth information, that the channel between the first electronic device and the second electronic device has been established.
[0827] Here, the channel between the first electronic device and the second electronic device includes a third tunnel channel, a first logical channel, and a first tunnel channel. The first tunnel channel and the first logical channel have a mapping relationship, as do the third tunnel channel and the first logical channel, and the third tunnel channel and the first tunnel channel.
[0828] As an example rather than a limitation, the first piece of information could be... Figure 5The information carried in step S508a. The second information could be... Figure 5 The information carried in step S511a, the third information may be Figure 5 The information carried in step S512a, the fourth piece of information may be Figure 5 The information carried in step S514a. For details, please refer to the relevant description above; for brevity, it will not be repeated here.
[0829] After steps S841 to S847, the first electronic device completes the mapping relationship between the tunnel channel and the logical channel between the first electronic device and the second electronic device, thereby establishing a channel between the first electronic device and the second electronic device.
[0830] The process S830 of establishing a channel between the first electronic device and the target electronic device may specifically include steps S851 to S857.
[0831] S851, the first basic service layer generates the identifier for the second tunnel channel.
[0832] The identifier for the second tunnel is used to identify the second tunnel. The second tunnel is the passage between the first basic service layer and the first access layer.
[0833] S852, the first basic service layer sends the fifth information to the first access layer.
[0834] This fifth piece of information is used to apply for a logical channel for the second tunnel passage.
[0835] S853, the first access layer sends the sixth information to the first basic service layer.
[0836] This sixth piece of information is used to instruct the second tunnel channel to establish a mapping relationship with the second logical channel.
[0837] Accordingly, prior to S853, the first access layer maps the second tunnel channel onto the second logical channel.
[0838] S854, the first basic service layer sends the seventh message to the target electronic device.
[0839] The seventh piece of information is used to instruct the target electronic device to establish a fourth tunnel channel. The identifier for the fourth tunnel channel is the same as that for the second tunnel channel.
[0840] In this step, the first basic service layer specifically sends the seventh information to the basic service layer of the target electronic device.
[0841] S855, the target electronic device generates an identifier for the fourth tunnel channel.
[0842] The identifier for the fourth tunnel channel is used to identify the fourth tunnel channel. The fourth tunnel channel is the channel between the basic service layer and the access layer of the target electronic device.
[0843] Accordingly, the target electronic device establishes a mapping relationship between the fourth tunnel channel and the second logic channel, as well as a mapping relationship between the fourth tunnel channel and the second tunnel channel.
[0844] In this embodiment of the application, the identifiers of the fourth tunnel channel and the second tunnel channel, which have a mapping relationship with the second logical channel, are the same.
[0845] S856, the target electronic device sends the eighth message to the first basic service layer.
[0846] The eighth message is used to indicate the establishment of a mapping relationship between the fourth tunnel channel and the second logical channel, as well as the establishment of a mapping relationship between the fourth tunnel channel and the second tunnel channel.
[0847] S857, the first basic service layer determines, based on the eighth information, that the channel between the first electronic device and the target electronic device has been established.
[0848] Here, the channels between the first electronic device and the target electronic device include a fourth tunnel channel, a second logic channel, and a second tunnel channel. The second tunnel channel and the second logic channel have a mapping relationship, and the fourth tunnel channel and the second logic channel also have a mapping relationship.
[0849] As an example rather than a limitation, the fifth piece of information could be... Figure 5 The information carried in step S508b. The sixth piece of information may be... Figure 5 The information carried in step S511b, the seventh piece of information may be... Figure 5 The information carried in step S512b, the eighth piece of information may be... Figure 5 The information carried in step S514b. For details, please refer to the relevant description above; for brevity, it will not be repeated here.
[0850] After steps S851 to S857, the first electronic device completes the mapping relationship between the tunnel channel and the logical channel between the first electronic device and the target electronic device, thereby establishing a channel between the first electronic device and the target electronic device.
[0851] The specific steps in step S820 and the specific steps in step S830 can be executed independently, or some steps can be combined for execution. For example, the first basic service layer can execute S841 and S851 at the same time. This application embodiment does not limit this.
[0852] Through steps S820 and S830, channels are established between the first electronic device and the second electronic device, and between the first electronic device and the target electronic device. These channels are used to transmit service data and signaling data exchanged between the first and second electronic devices. Because a tunnel is established between the basic service layer and the access layer, signaling data and service data issued by the basic service layer can be transmitted through the tunnel channel.
[0853] In some embodiments, such as Figure 11 As shown, method 800 also includes S861 and S862.
[0854] S861, the first basic service layer sends a channel establishment response to the second electronic device.
[0855] S862, the first basic service layer sends a channel establishment response to the target electronic device.
[0856] The channel establishment response is used to indicate that the channel establishment between the second electronic device and the target electronic device is complete.
[0857] In this embodiment of the application, the first electronic device maintains a channel mapping table to relay the service data exchanged between the second electronic device and the target electronic device.
[0858] In some embodiments, method 800 further includes: a first basic service layer establishing a channel mapping table. The channel mapping table includes the mapping relationship between a first tunnel channel and a second tunnel channel.
[0859] When the second electronic device needs to establish a service channel or transmit data with the target electronic device, the first electronic device relays the data according to the channel mapping table.
[0860] In some embodiments, method 800 further includes S870, whereby the second electronic device establishes a transmission channel with the target electronic device. For example... Figure 11 As shown, step S870 includes:
[0861] S871, the second electronic device generates an identifier for the first transmission channel.
[0862] The identifier for the first transmission channel is used to identify the first transmission channel. The first transmission channel is a channel in the basic service layer of the second electronic device, located above the established third tunnel channel.
[0863] S872, the first electronic device receives the first request sent by the second electronic device and forwards the first request to the target electronic device.
[0864] The first request is used to request the establishment of a transmission channel with the target electronic device for transmitting services.
[0865] The first request may include an identifier of a first transmission channel and port information, wherein the port information includes a first port and a second port. The first transmission channel is a channel above the third tunnel channel. The first request is transmitted through a first relay control channel, a third tunnel channel, a first logical channel, and a first tunnel channel. The first relay control channel is established by default after the channel between the first electronic device and the second electronic device is established. In this embodiment, the first port is the port used by the second electronic device, and the second port is the port used by the target electronic device.
[0866] S873, the target electronic device generates an identifier for the second transmission channel.
[0867] The identifier for the second transmission channel is used to identify the second transmission channel. The second transmission channel is a channel in the basic service layer of the target electronic device, located above the established fourth tunnel channel.
[0868] Following S873, within the target electronic device, a second transmission channel and a second port are bound between the basic service layer and the basic application of the target electronic device; that is, a mapping relationship is established between the second transmission channel and the second port, where the second port is the port used by the target electronic device. This process can correspond to... Figure 5 Step S521 in the process.
[0869] S874, the first electronic device receives the first response sent by the target electronic device and forwards the first response to the second electronic device.
[0870] The first response is used to indicate that the transmission channel for transmitting services has been established. The first response may include the identifier of the second transmission channel and the identifier of the first transmission channel. The second transmission channel is a channel above the fourth tunnel channel. The first response is transmitted through the second trunk control channel, the fourth tunnel channel, the second logical channel, and the second tunnel channel. The second trunk control channel is established by default after the channel between the first electronic device and the target electronic device is established.
[0871] Following S874, within the second electronic device, the basic service layer of the second electronic device sends a notification message to the basic application layer to indicate that the target electronic device has established a mapping relationship between the second transmission channel and the second port. This notification message also instructs the basic application layer of the second electronic device to establish a mapping relationship between the first transmission channel and the first port, where the first port is the port used by the second electronic device. This process can correspond to... Figure 5 In step S523, the notification message is used to indicate that the application layer transmission channel application of the second electronic device has been successfully requested.
[0872] Once the second electronic device and the target electronic device have established a service channel, the first electronic device relays the service data exchanged between the second electronic device and the target electronic device according to the channel mapping table.
[0873] In this embodiment of the application, the first transmission channel is mapped to the first port of the second electronic device, and the second transmission channel is mapped to the second port of the target electronic device.
[0874] In some embodiments, reference Figure 9 Method 800 also includes:
[0875] The first electronic device receives a first data packet sent by the second electronic device. The first data packet is transmitted through the channel between the first electronic device and the second electronic device. The first data packet carries the identifier of the second transmission channel and the identifier of the second tunnel channel.
[0876] According to the channel relationship mapping table, the first electronic device forwards the first data packet to the target electronic device through the channel between the first electronic device and the target electronic device;
[0877] The channel relationship mapping table includes the mapping relationship between the first tunnel channel and the second tunnel channel.
[0878] In other words, the first data packet is sent to the target electronic device through the first transmission channel, the third tunnel channel, the first logical channel, the first tunnel channel, the second tunnel channel, the second logical channel, the fourth tunnel channel, and the second transmission channel.
[0879] In some embodiments, the channel establishment request involved in S810 may include first indication information, which indicates the channel establishment mode between the second electronic device and the target electronic device. The establishment mode includes a relay service channel mode and a relay tunnel mode. The relay service channel mode can be understood as being in accordance with... Figure 10 The channel establishment process shown, in relay tunnel mode, can be understood as following... Figure 11 The channel establishment mode shown.
[0880] In some embodiments, the channel establishment request involved in S810 may include the identifier of the target electronic device and / or the address of the target electronic device.
[0881] In some embodiments, the channel establishment request may include port information of the second electronic device and the target electronic device, wherein the port information is obtained through negotiation between the second electronic device and the target electronic device.
[0882] In some embodiments, after step S810, method 800 further includes: the first electronic device negotiating channel parameters with the second electronic device and the target electronic device respectively.
[0883] The above Figures 7 to 11 In the method shown, the basic service layer or the first basic service layer can be Figure 2 The basic service layer 220 shown above performs operations that can be specifically performed by, for example... Figure 2 The channel management module or relay module in the basic service layer 230 shown will execute this, depending on the actual solution. The access layer or first access layer can be... Figure 2 The access layer 210 shown above performs operations that can be specifically performed by, for example... Figure 2 The access module in the access layer 210 shown is executed.
[0884] The above text combined Figures 1 to 11 The method embodiments of this application are described in detail below, in conjunction with... Figures 12 to 13 This application provides a detailed description of the apparatus embodiments. It should be understood that the descriptions of the method embodiments correspond to the descriptions of the apparatus embodiments; therefore, any parts not described in detail can be found in the preceding method embodiments.
[0885] Figure 12 This is a schematic structural diagram of the device provided in the embodiments of this application. Figure 12 The device 1100 in the middle can be Figure 1 or Figure 2 A specific example of electronic devices in [the context]. Figure 12 The device 1100 shown can be used to perform Figures 7 to 11 The method, and can be specifically implemented. Figures 3 to 5 The embodiments shown are not described again to avoid redundancy.
[0886] Device 1100 may include relay module 1110. The relay module 1110 can perform... Figure 7 The steps in method 700 are shown.
[0887] When device 1100 is a management node device, its included relay module 1110 can execute steps S710 to S750 in method 700. Or execute... Figure 3 The operation performed by the relay module of node G in method 300 shown.
[0888] When device 1100 is a terminal node device, its included relay module 1110 can execute steps S710 and S750, or execute steps S730 and S740. Specifically, relay module 1110 can execute... Figure 3The operation performed by the relay module of the first T node or the second T node in the method 300 shown.
[0889] Optionally, the device 1100 may further include a channel management module 1120. This channel management module 1120 can perform... Figure 9 Each step in method 800 shown, or execution Figure 10 or Figure 11 The steps performed by the first basic service layer, and / or other processes used in the methods described herein, such as those performed by the channel management module in the basic service layer of the electronic device.
[0890] For example, when device 1100 is a management node device, its included channel management module 1120 can perform... Figure 4 The operations performed by the channel management module of the G node in method 400 shown, or the operations performed by... Figure 10 or Figure 11 The operations performed by the first basic service layer of the first electronic device.
[0891] For example, when device 1100 is a terminal node device, its included channel management module 1120 can perform... Figure 4 The operation performed by the channel management module of the first T node or the second T node in method 400 shown, or the execution of... Figure 10 or Figure 11 The operation performed by the first electronic device or the second electronic device.
[0892] Optionally, the device 1100 may further include an access module 1130. The access module 1130 can perform... Figure 10 or Figure 11 The steps performed by the first access layer, and / or other processes used in the methods described herein, such as those performed by the access layer of an electronic device.
[0893] For example, when device 1100 is a management node device, its included access module 1130 can perform... Figure 4 or Figure 5 The operations performed by the access layer of the G node.
[0894] It should be noted that all relevant content of each step involved in the above solution embodiments can be referenced from the description of the corresponding functional module.
[0895] Figure 13 This is a schematic structural diagram of an apparatus provided in another embodiment of this application. Figure 13 The device 1200 shown may correspond to the device described above, such as a first electronic device, a second electronic device, a target electronic device, etc. Specifically, device 1200 may be... Figure 1 or Figure 2 A specific example of electronic devices in [the context].
[0896] The device 1200 includes a processor 1220. In embodiments of this application, the processor 1220 is used to implement corresponding control and management operations; for example, the processor 1220 is used to support the device in executing the aforementioned embodiments. Figures 7 to 11 The methods, operations, or functions shown, and Figures 3 to 6 The methods, operations, or functions of the embodiments shown.
[0897] Optionally, the device 1200 may further include a memory 1210 and a communication interface 1230. The processor 1220, communication interface 1230, and memory 1210 can be interconnected or interconnected via a bus 1240. The communication interface 1230 supports communication within the device, and the memory 1210 stores the device's program code and data. The processor 1220 calls the code or data stored in the memory 1210 to perform corresponding operations. The memory 1210 may or may not be coupled to the processor. The coupling in this embodiment is an indirect coupling or communication connection between devices, units, or modules, which can be electrical, mechanical, or other forms, used for information exchange between devices, units, or modules.
[0898] The processor 1220 can be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, etc. The communication interface 1230 can be a transceiver, circuit, bus, module, or other type of communication interface. The bus 1240 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 12 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0899] This application also provides a communication system, including the first electronic device, the second electronic device, and the target electronic device described above.
[0900] This application also provides a computer-readable storage medium having program instructions that, when executed by a processor, cause the processor to perform the device connection method described above.
[0901] This application also provides a chip system including at least one processor, wherein when program instructions are executed in the at least one processor, the at least one processor performs the device connection method described above.
[0902] Those skilled in the art will recognize that the units and algorithm steps of the various examples 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 implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art 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 application.
[0903] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0904] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0905] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0906] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0907] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0908] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for connecting devices, characterized in that, Applied to a first electronic device, which acts as a management node device, the method includes: The first electronic device receives a first service query request sent by the second electronic device, wherein the second electronic device is connected to the first electronic device and the role of the second electronic device is a terminal node device, and the first service query request is used to request the query of services of other terminal node devices connected to the first electronic device; The first electronic device determines the target electronic device based on the first service query request. The target electronic device is connected to the first electronic device, and the target electronic device acts as a terminal node device. The first electronic device sends a second service query request to the target electronic device, the second service query request being used to request a query for the services of the target electronic device; The first electronic device receives a second service query response sent by the target electronic device. The second service query response is used to indicate the service information of the target electronic device. The second service query response includes second destination node indication information and second query service indication information. The second destination node indication information is used to indicate the terminal node device that initiates the query service. The second query service indication information is used to indicate the service of the terminal node device whose service is being queried. The first electronic device sends a first service query response to the second electronic device according to the second service query response. The first service query response is used to indicate the service information of the target electronic device. The first service query response includes second source node indication information and second query service indication information. The second source node indication information is used to indicate the terminal node device responding to the service query. Wherein, the first electronic device sends a first service query response to the second electronic device based on the second service query response, including: The first electronic device adds the second source node indication information to the first service query response.
2. The method according to claim 1, characterized in that, The first service query request includes a first destination node indication information and a first query service indication information; and / or The second service query request includes first source node indication information and first query service indication information; wherein, The first source node indication information is used to indicate the terminal node device that initiated the service query; The first destination node indication information is used to indicate the terminal node device of the queried service; The first query service indication information is used to indicate the service being queried.
3. The method according to claim 2, characterized in that, The first source node indication information includes the identifier of the second electronic device and / or the address of the second electronic device.
4. The method according to claim 2 or 3, characterized in that, The first destination node indication information includes the identifier of the target electronic device and / or the address of the target electronic device; or, The first destination node indication information includes a general identifier and / or a broadcast address.
5. The method according to claim 4, characterized in that, When the first service query request includes the first destination node indication information, and the first destination node indication information includes a general identifier and / or a broadcast address, The first electronic device determines the target electronic device based on the first service query request, including: The first electronic device determines, based on the general identifier and / or broadcast address, that the terminal node devices for which the service is queried are all terminal node devices connected to the first electronic device except for the second electronic device, wherein the target electronic device is one of the terminal node devices for which the service is queried.
6. The method according to claim 1, characterized in that, The second source node indication information includes the identifier of the target electronic device and / or the address of the target electronic device.
7. The method according to claim 1, characterized in that, The second destination node indication information includes the identifier of the second electronic device and / or the address of the second electronic device.
8. The method according to any one of claims 1 to 3, characterized in that, The first service query request, the second service query request, the second service query response, and the first service query response are transmitted in a relay service management channel, wherein the relay service management channel is used to transmit service management data between two terminal node devices.
9. The method according to any one of claims 1 to 3, characterized in that, The first electronic device, the second electronic device, and the target electronic device all include a basic service layer, wherein, The first service query request is received by the basic service layer of the first electronic device from the basic service layer of the second electronic device; The second service query request is sent from the basic service layer of the first electronic device to the basic service layer of the target electronic device; The second service query response is received by the basic service layer of the first electronic device from the basic service layer of the target electronic device; The first service query response is sent from the basic service layer of the first electronic device to the basic service layer of the second electronic device.
10. The method according to any one of claims 1 to 3, characterized in that, The first electronic device, the second electronic device, and the target electronic device all support StarFlash basic SLB access technology.
11. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The first electronic device receives a channel establishment request sent by the second electronic device, the channel establishment request being used to request the first electronic device to establish a channel between the second electronic device and the target electronic device; The first electronic device establishes a channel with the second electronic device; The first electronic device establishes a channel with the target electronic device; The channels between the first electronic device and the second electronic device, and between the first electronic device and the target electronic device, are used to transmit information between the second electronic device and the target electronic device.
12. The method according to claim 11, characterized in that, The first electronic device includes a first basic service layer and a first access layer. The first electronic device establishes a channel with the second electronic device, including: The first basic service layer generates an identifier for the first transmission channel, which is used to identify the first transmission channel; The first basic service layer sends first information to the first access layer, the first information being used to apply for a logical channel for the first transmission channel; The first basic service layer receives second information sent by the first access layer, the second information being used to instruct the first transmission channel to establish a mapping relationship with the first logical channel; The first basic service layer sends third information to the second electronic device, the third information being used to instruct the second electronic device to establish a third transmission channel; The first basic service layer receives fourth information sent by the second electronic device. The fourth information is used to instruct the third transmission channel to establish a mapping relationship with the first logical channel and the third transmission channel to establish a mapping relationship with the first transmission channel. The third transmission channel has a mapping relationship with the first port of the second electronic device. The first basic service layer determines, based on the fourth information, that the channel between the first electronic device and the second electronic device has been established, wherein the channel between the first electronic device and the second electronic device includes the first transmission channel, the first logical channel, and the third transmission channel; The first electronic device establishes a channel with the target electronic device, including: The first basic service layer generates an identifier for the second transmission channel, which is used to identify the second transmission channel; The first basic service layer sends fifth information to the first access layer, the fifth information being used to apply for a logical channel for the second transmission channel; The first basic service layer receives the sixth information sent by the first access layer, the sixth information being used to instruct the second transmission channel to establish a mapping relationship with the second logical channel; The first basic service layer sends a seventh message to the target electronic device, the seventh message being used to instruct the target electronic device to establish a fourth transmission channel; The first basic service layer receives the eighth information sent by the target electronic device. The eighth information is used to instruct the fourth transmission channel to establish a mapping relationship with the second logical channel and the fourth transmission channel to establish a mapping relationship with the second transmission channel, wherein the fourth transmission channel has a mapping relationship with the second port of the target electronic device. The first basic service layer determines, based on the eighth information, that the channel between the first electronic device and the target electronic device has been established, wherein the channel between the first electronic device and the target electronic device includes the second transmission channel, the second logical channel, and the fourth transmission channel; The channels between the first electronic device and the second electronic device, and between the first electronic device and the target electronic device, are used to transmit service data exchanged between the target electronic device and the second electronic device.
13. The method according to claim 12, characterized in that, The first basic service layer includes a channel management module and a relay module. The channel management module is used to manage the transmission channels in the first basic service layer, and the relay module is used to manage the relay of data transmitted between the second electronic device and the target electronic device. The method further includes: The channel management module sends a channel mapping table to the relay module. The channel mapping table includes the mapping relationship between the first transmission channel and the third transmission channel, the mapping relationship between the second transmission channel and the fourth transmission channel, and the mapping relationship between the first transmission channel and the second transmission channel.
14. The method according to claim 12, characterized in that, Also includes: The first electronic device sends a channel establishment response to the second electronic device, the channel establishment response indicating that the channel between the second electronic device and the target electronic device has been established.
15. The method according to claim 12, characterized in that, Also includes: The first electronic device receives a first data packet sent by the second electronic device. The first data packet is transmitted through the channel between the first electronic device and the second electronic device, and the first data packet carries the identifier of the first transmission channel. The first electronic device replaces the identifier of the first transmission channel in the first data packet with the identifier of the fourth transmission channel according to the channel relationship mapping table to generate the second data packet; The first electronic device sends the second data packet to the target electronic device; The channel relationship mapping table includes the mapping relationship between the first transmission channel and the third transmission channel, the mapping relationship between the second transmission channel and the fourth transmission channel, and the mapping relationship between the first transmission channel and the second transmission channel.
16. The method according to claim 11, characterized in that, The channel establishment request includes first indication information, which indicates the channel establishment mode between the second electronic device and the target electronic device.
17. The method according to claim 11, characterized in that, The channel establishment request includes the identifier of the target electronic device and / or the address of the target electronic device.
18. The method according to claim 11, characterized in that, The channel establishment request includes port information of the second electronic device and the target electronic device, which is obtained through negotiation between the second electronic device and the target electronic device.
19. The method according to claim 11, characterized in that, After the first electronic device receives the channel establishment request sent by the second electronic device, the process further includes: The first electronic device negotiates channel parameters with the second electronic device and the target electronic device, respectively.
20. A method for connecting devices, characterized in that, Applied to a second electronic device, which acts as a terminal node device, the method includes: The second electronic device sends a first service query request to the first electronic device, wherein the second electronic device is connected to the first electronic device, and the first electronic device acts as a management node device. The first service query request is used to request services from other terminal node devices connected to the first electronic device. The second electronic device receives a first service query response sent by the first electronic device based on a second service query response. The first service query response is used to indicate the service information of the target electronic device. The first service query response includes second source node indication information and second query service indication information. The second source node indication information is used to indicate the terminal node device responding to the service query. The second query service indication information is used to indicate the service of the terminal node device whose service is being queried. The target electronic device is connected to the first electronic device, and the target electronic device is a terminal node device. The second service query response is sent by the target electronic device, and the second service query response includes second destination node indication information, which is used to indicate the terminal node device that initiated the query service. The second electronic device receives a first service query response sent by the first electronic device based on the second service query response, including: The first electronic device adds the second source node indication information to the first service query response.
21. The method according to claim 20, characterized in that, The second electronic device includes a basic application layer and a basic service layer, wherein, Before the second electronic device sends the first service query request to the first electronic device, the process also includes: The basic service layer of the second electronic device receives a third service query request sent by the basic application layer of the second electronic device. The third service query request is used to indicate the query of services of other terminal node devices. After the second electronic device receives the first service query response sent by the first electronic device, the process further includes: The basic service layer of the second electronic device sends a third service query response to the basic application layer of the second electronic device. The third service query response is used to indicate the service information of the target electronic device.
22. The method according to claim 21, characterized in that, The first service query request includes a first destination node indication information and a first query service indication information; and / or The third service query request includes the first query service instruction information; wherein... The first destination node indication information is used to indicate the terminal node device of the queried service; The first query service indication information is used to indicate the service being queried.
23. The method according to claim 22, characterized in that, The third service query request also includes at least one of the first source node indication information and the first destination node indication information; The first source node indication information is used to indicate the terminal node device that initiates the service query.
24. The method according to claim 22 or 23, characterized in that, The first destination node indication information includes the identifier of the target electronic device and / or the address of the target electronic device; or, The first destination node indication information includes a general identifier and / or a broadcast address, wherein the general identifier and / or broadcast address is used to indicate that the terminal node device being queried is all terminal node devices other than the second electronic device connected to the first electronic device.
25. The method according to any one of claims 21 to 23, characterized in that, The third service query response includes: The second source node indication information is used to indicate the terminal node device responding to the service query; The second query service indication information is used to indicate the service of the terminal node device being queried.
26. The method according to claim 25, characterized in that, The second source node indication information includes the identifier of the target electronic device and / or the address of the target electronic device.
27. The method according to any one of claims 20 to 23, characterized in that, The first service query request and the first service query response are transmitted in a relay service management channel between the first electronic device and the second electronic device, wherein the relay service management channel is used to transmit service management data between the two terminal node devices.
28. The method according to any one of claims 20 to 23, characterized in that, Both the first electronic device and the second electronic device include a basic service layer, wherein, The first service query request is sent from the basic service layer of the second electronic device to the basic service layer of the first electronic device; The first service query response is received by the base service layer of the second electronic device from the base service layer of the first electronic device.
29. The method according to any one of claims 20 to 23, characterized in that, The first electronic device, the second electronic device, and the target electronic device all support StarFlash basic SLB access technology.
30. A method for connecting devices, characterized in that, Applied to a target electronic device, wherein the target electronic device functions as a terminal node device, the method includes: The target electronic device receives a second service query request sent by the first electronic device. The target electronic device is connected to the first electronic device, and the first electronic device acts as a management node device. The second service query request is used to request a query for the services of the target electronic device. The target electronic device sends a second service query response to the first electronic device. The second service query response is used by the first electronic device to notify the second electronic device of the service information of the target electronic device. The second electronic device is connected to the first electronic device and acts as a terminal node device.
31. The method according to claim 30, characterized in that, The target electronic device includes a basic application layer and a basic service layer, wherein... Before the target electronic device sends a second service query response to the first electronic device, the method further includes: The basic service layer of the target electronic device sends a fourth service query request to the basic application layer of the target electronic device. The fourth service query request is used to request a query for the services of the target electronic device. The basic service layer of the target electronic device receives a fourth service query response sent by the basic application layer of the target electronic device. The fourth service query response is used to indicate the service information of the target electronic device.
32. The method according to claim 31, characterized in that, The second service query request and / or the fourth service query request include: The first source node indication information is used to indicate the terminal node device that initiated the service query; The first query service instruction information is used to indicate the service being queried.
33. The method according to claim 32, characterized in that, The first source node indication information includes the identifier of the second electronic device and / or the address of the second electronic device.
34. The method according to any one of claims 31 to 33, characterized in that, The second service query response includes a second destination node indication information and a second query service indication information; and / or The fourth service query response includes the second query service indication information; wherein... The second destination node indication information is used to indicate the terminal node device that initiated the query service; The second query service indication information is used to indicate the service of the terminal node device being queried.
35. The method according to claim 34, characterized in that, The fourth service query response also includes at least one of the second source node indication information and the second destination node indication information; The second source node indication information is used to indicate the terminal node device responding to the service query.
36. The method according to claim 34, characterized in that, The second destination node indication information includes the identifier of the second electronic device and / or the address of the second electronic device.
37. The method according to any one of claims 30 to 33, characterized in that, The second service query request and the second service query response are transmitted in the relay service management channel between the target electronic device and the first electronic device, wherein the relay service management channel is used to transmit service management data between two terminal node devices.
38. The method according to any one of claims 30 to 33, characterized in that, Both the first electronic device and the target electronic device include a basic service layer, wherein, The second service query request is received by the base service layer of the target electronic device from the base service layer of the first electronic device; The second service query response is sent from the base service layer of the target electronic device to the base service layer of the first electronic device.
39. The method according to any one of claims 30 to 33, characterized in that, The first electronic device, the second electronic device, and the target electronic device all support StarFlash basic SLB access technology.
40. An electronic device, characterized in that, include: Memory, used to store computer instructions; A processor is configured to execute computer instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1 to 19, or to perform the method as described in any one of claims 20 to 29, or to perform the method as described in any one of claims 30 to 39.
41. A communication system, characterized in that, include: A first electronic device is configured to perform the method as described in any one of claims 1 to 19; A second electronic device is configured to perform the method as described in any one of claims 20 to 29; A target electronic device for performing the method as described in any one of claims 30 to 39.
42. A communication system, characterized in that, include: A first electronic device, which is a management node device, is used to perform the method as described in any one of claims 1 to 20; The second electronic device and the target electronic device are respectively connected to the first electronic device, and both the second electronic device and the target electronic device are terminal node devices.
43. A computer-readable storage medium, characterized in that, The computer contains computer instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 39.
44. A chip system, characterized in that, It includes at least one processor, which, when program instructions are executed in the at least one processor, causes the at least one processor to perform the method as described in any one of claims 1 to 39.