Command transmission method, device, chip, storage medium and computer program

CN119790624APending Publication Date: 2025-04-08GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280099757.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-09-09
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

When the client device leaves the communication network where the server device is located, how to accurately control the server device through the relay device is an urgent problem that needs to be solved.

Method used

Receive commands sent by the client device through the relay device and forward them to the server device. The node identification of the server device can be recorded in the virtual device in the relay device, or in the encoding information of the command path information block. , thereby achieving accurate control of server devices.

Benefits of technology

It improves the control accuracy and efficiency of the client device on the server device and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119790624A_ABST
    Figure CN119790624A_ABST
Patent Text Reader

Abstract

Provided are a command transmission method, device, chip, storage medium and computer program. The method includes: a relay device receives a first command sent by a client device; the relay device forwards the first command to a server device; wherein the node identifier of the server device is recorded in one or more of the following information: device information of a first virtual device, the first virtual device being a virtual device in the relay device that has a mapping relationship with the server device; and encoding information of a command path information block corresponding to the first command. In an embodiment of the present application, the node identifier of the server device can be recorded in the first virtual device of the relay device or in the encoding information of the command path information block corresponding to the first command, so that the client device can use the relay device to achieve accurate control of the server device and improve customer experience.
Need to check novelty before this filing date? Find Prior Art

Description

Command transmission method, device, chip, storage medium and computer program Technical Field

[0001] The present application relates to the field of Internet of Things technology, and more specifically, to a command transmission method, device, chip, storage medium and computer program. Background Art

[0002] In certain scenarios (e.g., when a client device leaves the server's network), the client device can control the server by sending commands to it through a relay device. In this case, how the client device can accurately control the server device using the relay device is an urgent problem that needs to be solved.

[0003] Summary of the Invention

[0004] The present application provides a command transmission method, device, chip, storage medium, and computer program. The following introduces various aspects of the present application.

[0005] In a first aspect, a command transmission method is provided, comprising: a relay device receives a first command sent by a client device; the relay device forwards the first command to a server device; wherein the node identifier of the server device is recorded in one or more of the following information: device information of a first virtual device, wherein the first virtual device is a virtual device in the relay device that has a mapping relationship with the server device; and encoding information of a command path information block corresponding to the first command.

[0006] In a second aspect, a command transmission method is provided, comprising: a client device sends a first command to a relay device, the first command being used to control a server device, and the first command being forwarded to the server device via the relay device; wherein the node identifier of the server device is recorded in one or more of the following information: device information of a first virtual device, wherein the first virtual device is a virtual device in the relay device that has a mapping relationship with the server device; and encoding information of a command path information block corresponding to the first command.

[0007] According to a third aspect, a command transmission method is provided, comprising: a server device receives a first command sent by a relay device, wherein the first command is forwarded by a client device to the server device through the relay device; wherein the node identifier of the server device is recorded in one or more of the following information: device information of a first virtual device, wherein the first virtual device is a virtual device in the relay device that has a mapping relationship with the server device; and encoding information of a command path information block corresponding to the first command.

[0008] In a fourth aspect, a command transmission device is provided, which is configured in a relay device, and the relay device includes: a first receiving module for receiving a first command sent by a client device; a first sending module for forwarding the first command to a server device; wherein the node identifier of the server device is recorded in one or more of the following information: device information of a first virtual device, wherein the first virtual device is a virtual device in the relay device that has a mapping relationship with the server device; and encoding information of a command path information block corresponding to the first command.

[0009] In a fifth aspect, a command transmission device is provided, which is configured on a client device, and the client device includes: a first sending module, used to send a first command to a relay device, wherein the first command is used to control a server device, and the first command is forwarded to the server device through the relay device; wherein the node identifier of the server device is recorded in one or more of the following information: device information of a first virtual device, wherein the first virtual device is a virtual device in the relay device that has a mapping relationship with the server device; and encoding information of a command path information block corresponding to the first command.

[0010] In a sixth aspect, a command transmission device is provided, which is configured on a server-side device, and the server-side device includes: a receiving module for receiving a first command sent by a relay device, wherein the first command is forwarded by a client device to the server-side device through the relay device; wherein the node identifier of the server-side device is recorded in one or more of the following information: device information of a first virtual device, wherein the first virtual device is a virtual device in the relay device that has a mapping relationship with the server-side device; and encoding information of a command path information block corresponding to the first command.

[0011] In the seventh aspect, a command transmission device is provided, which is configured in a relay device, and the relay device includes a processor, a memory and a communication interface, the memory is used to store one or more computer programs, and the processor is used to call the computer program in the memory so that the relay device executes part or all of the steps in the method of the first aspect.

[0012] In an eighth aspect, a command transmission device is provided, which is configured on a client device, and the client device includes a processor, a memory, and a communication interface, the memory is used to store one or more computer programs, and the processor is used to call the computer program in the memory so that the client device executes part or all of the steps in the method of the second aspect.

[0013] In the ninth aspect, a command transmission device is provided, which is configured on a server-side device. The server-side device includes a processor, a memory, and a communication interface. The memory is used to store one or more computer programs, and the processor is used to call the computer program in the memory so that the server-side device executes part or all of the steps in the method of the third aspect.

[0014] In a tenth aspect, embodiments of the present application provide a communication system comprising one or more of the aforementioned relay device, client device, and server device. In another possible design, the system may further include other devices that interact with the relay device, client device, or server device in the solutions provided in embodiments of the present application.

[0015] In the eleventh aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program enables a relay device, a client device or a server device to execute part or all of the steps in the methods of the above aspects.

[0016] In a twelfth aspect, embodiments of the present application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a relay device, a client device, or a server device to perform some or all of the steps of the methods described in each of the above aspects. In some implementations, the computer program product may be a software installation package.

[0017] In the thirteenth aspect, an embodiment of the present application provides a chip, which includes a memory and a processor. The processor can call and run a computer program from the memory to implement some or all of the steps described in the methods of the above aspects.

[0018] In an embodiment of the present application, the node identifier of the server device can be recorded in the first virtual device in the relay device, so that the client device can accurately control the server device by querying the mapping relationship between the node identifiers of the first virtual device and the server device; or, the node identifier of the server device can be recorded in the encoding information of the command path information block corresponding to the first command, so that the relay device can accurately forward the first command to the server device according to the node identifier corresponding to the first command, thereby improving the customer experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] FIG1 is a schematic diagram of a model structure of a Matter device applicable to an embodiment of the present application.

[0020] FIG2 is a diagram showing an example of a system architecture of a communication system to which an embodiment of the present application is applicable.

[0021] FIG3 is a diagram showing an example of a system architecture of a communication system to which a relay communication mechanism is applicable.

[0022] FIG4 is a flow chart of a command transmission method provided in an embodiment of the present application.

[0023] FIG5 shows an example of mapping a relay device to an endpoint of a server device.

[0024] FIG. 6 shows another example of mapping an endpoint of a server device to a relay device.

[0025] FIG7 is a flow chart of a command transmission method provided in another embodiment of the present application.

[0026] FIG8 shows an example of a node in which a relay device is mapped to a server device.

[0027] FIG9 is a flowchart of a command transmission method provided in yet another embodiment of the present application.

[0028] FIG10 is a flow chart of a command transmission method provided in yet another embodiment of the present application.

[0029] FIG11 is a flow chart of a command transmission method provided in yet another embodiment of the present application.

[0030] FIG12 is a flow chart of a command transmission method provided in yet another embodiment of the present application.

[0031] FIG13 is a schematic structural diagram of a relay device provided in an embodiment of the present application.

[0032] FIG14 is a schematic diagram of the structure of a client device provided in an embodiment of the present application.

[0033] FIG15 is a schematic diagram of the structure of the server device provided in an embodiment of the present application.

[0034] FIG16 is a schematic structural diagram of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] The technical solutions in this application will be described below in conjunction with the accompanying drawings. For ease of understanding, the terms involved in the embodiments of this application are introduced below in conjunction with Figures 1 to 3. It should be noted that the following uses the Matter protocol scenario as an example to introduce the terms involved in the embodiments of this application, as well as the solutions of the embodiments of this application. Of course, the solutions of the embodiments of this application can also be applied to other Internet of Things protocols.

[0036] The Internet of Things (IoT), or "Internet of Everything," is an extension and expansion of the Internet. Through various information sensing devices (such as radio frequency identification and global positioning systems), any object can be connected to the Internet to form a vast network for information exchange and communication, enabling interconnection and interoperability between all things. In some embodiments, IoT devices can be smart home devices, such as smart air conditioners, smart refrigerators, washing machines, rice cookers, and robot vacuums. In some embodiments, IoT devices can be smart monitoring devices, such as surveillance cameras, temperature sensors, and sound sensors.

[0037] At present, different manufacturers may use different communication protocols (also known as ecological chain protocols) to achieve interoperability between IoT devices that support the communication protocols. This may result in the inability of IoT devices produced by different manufacturers to communicate with each other, and the failure to achieve true interconnection of all things.

[0038] Based on this, the Connectivity Standards Alliance (CSA) has launched an IoT application layer technology standard - the Matter standard protocol, which can provide an interoperable application layer solution for smart home devices based on the Internet Protocol (IP). In some embodiments, the Matter standard can also be called the connected home over IP (CHIP) standard. In some embodiments, the Matter standard can support three underlying communication protocols: Ethernet, Wi-Fi, and Thread, and can enable IoT devices with different protocols to communicate with each other.

[0039] Data model of Matter device

[0040] 1 is a data model structure of a Matter device applicable to an embodiment of the present application. The data model structure 100 of the Matter device includes a node 110, an endpoint 120, and a function cluster 130.

[0041] Node 110 encapsulates a unique, addressable resource on the network, possessing a set of functions and capabilities that users can clearly perceive as a functional entity. Typically, node 110 can be the highest or outermost first-order element in a data model. In other words, node 110 is the only addressable element at the outermost level of a data model.

[0042] A physical entity (e.g., a Matter device) can be a node 110, or in other words, a node 110 can refer to a Matter device node. It should be noted that a node can have multiple node identifiers (IDs), and the scope of each node ID is a specific network (fabric). For example, when a node ID is used as the target address for an interaction, the network scoped to the specified node ID is the access network for the interaction.

[0043] A node may include one or more endpoints 120. An endpoint 120 is an instance, which can be a service or a virtual device, as indicated by a device type. Each endpoint 120 conforms to one or more device type definitions, which define the functional clusters supported by the endpoint. In some embodiments, an endpoint can be understood as a service / virtual device indicated by the device type. A functional cluster is an object class instantiated on the endpoint.

[0044] It should be noted that in this architecture model, the device type can be the highest semantic element. The device type defines a set of conformances of the endpoint 120. The device type defines a set of requirements for the node 110 or the endpoint 120.

[0045] Each endpoint 120 may be a collection of a type of functionality, which may include one or more functional clusters 130 .

[0046] Functional cluster 130 is a functional building block element of the data model. In some embodiments, functional cluster can also be referred to as functional set, cluster, cluster, etc., which is not limited by the embodiments of the present application. The functional cluster specification defines the client and server that correspond to each other through interaction. Functional cluster 130 can be regarded as an interface, service or object class, which is the lowest independent functional element in the data model. Each functional cluster 130 can be defined by a functional cluster specification, which defines the elements of the functional cluster 130, including attributes, events, commands and behaviors related to the interaction of these elements. In some embodiments, attributes, commands, and events can also be referred to as interface units of functional cluster 130, and corresponding functions can be provided through these three interface units.

[0047] In some embodiments, the attributes, events, commands, and behaviors in a functional cluster 130 are mandatory or optional, depending on the definition of the functional cluster 130 .

[0048] Generally, the above functional clusters can be divided into two categories: utility functional clusters and application functional clusters.

[0049] The utility function cluster is not part of the main application operation of the endpoint. The utility function cluster can be used for configuration, discovery, addressing, diagnosis, monitoring device health, software updates, etc. The utility function cluster may have a temporary relationship with its function cluster counterpart (cluster counterpart). In an embodiment of the present application, the utility cluster may include one or more of a descriptor function cluster and a relay configuration function cluster. Of course, the embodiment of the present application is not limited to this. The utility function cluster may also include other function clusters such as a binding function cluster.

[0050] An application function cluster supports the primary operations of an endpoint. In some embodiments, this cluster can also be referred to as a business function cluster. It can support the interaction of one or more persistent applications between a client and a server. For example, consider the on / off function cluster in a smart light. The client can send control commands to the server (i.e., the on / off function cluster) to turn the smart light on or off.

[0051] In some embodiments, the service function cluster may refer to a function cluster on other endpoints except endpoint 0 in the node (which may be understood as the first endpoint in the node, and the device type of the endpoint is "root node").

[0052] An application functionality cluster is not a utility functionality cluster, even though it may itself support utility functionality such as calibration, operation modes, etc. An application functionality cluster specification should not involve layers and processes outside its application domain.

[0053] The following is a brief introduction to the main elements of the function cluster, such as commands, properties, and events.

[0054] A functional cluster command (also known as a "command") is a set of data fields, each of which is passed between client and server cluster instances to invoke behavior on the command recipient. Currently, the protocol stipulates that each command can be listed in a table, which can contain columns for the command's data quality: ID, name, direction, response, access, and conformance. Accordingly, a command can indicate zero or more fields defined in a table. Each command field is defined as a row in the table.

[0055] Attributes are functional cluster data. Currently, the protocol stipulates that each attribute can be listed in a table. The data quality columns of the attribute defined in this table may include: ID, name, (data) type, constraint, other qualities, access, default (value), and compliance. In some implementations, attributes can also define their related semantics and behaviors. Attributes can reflect the queryable / settable state, configuration, and capabilities of a device. In some cases, if no privileges are explicitly defined for an attribute, the default access privilege takes effect.

[0056] An event defines a record of something that happened in the past. In this respect, an event record can be thought of as a log entry that provides a chronological view of events on a node through a stream of event records. Unlike attributes, which do not provide any edge-preserving functionality (that is, there is no guarantee that every attribute change will be passed to the observer), events allow each individual edge or change to be captured and reliably passed to the observer. This is critical for safety and security applications that rely on guarantees of correct behavior. Currently, the protocol stipulates that each functional cluster event can be listed in a table, and the data quality columns defined by the table for the event can include: ID, priority, access, and compliance.

[0057] For ease of understanding, the following describes the meanings of several common data qualities included in commands, attributes, and events. It should be noted that the commands, attributes, and events in the embodiments of this application may also include other data qualities, or include some of the above data qualities. This embodiment of the application is not limited to this.

[0058] Identifier, which indicates the unique field ID of a field, or the unique identifier of a command (or attribute, event).

[0059] Name: The unique name of the field, or the name of the command (or attribute).

[0060] Type indicates the data type of the field, or the data type of the command parameter (or attribute parameter).

[0061] Direction, usually present in the command list, is used to define the transmission direction of the command. For example, it can be defined as from the client to the server. Another example is from the server to the client.

[0062] Access rights define how an element can be accessed (e.g., read or write) and what permissions are required to access the data. In some implementations, access rights may include V, which indicates that read access or call access requires the view privilege. Access rights may also include O, which indicates that "read access," "write access," or "call access" requires the operation privilege. Access rights may also include R, which indicates read access. Access rights may also include W, which indicates write access.

[0063] Response, usually exists in the command list, is used to define the response message of the command.

[0064] Quality, used to define additional data qualities not covered in other columns.

[0065] Default is used to define a default value. It should be noted that the default value is not the value used when the server returns the factory refresh settings. Default values ​​can indicate that the compliance specified for a data field is optional or can change over time. Default values ​​can be defined to fulfill dependencies when the actual data field value does not exist.

[0066] Conformance defines the optionality and dependencies of any data model element or set of elements. Typically, this column is valid for attributes, commands, events, enumerations, and fields of commands, events, or structures. In some implementations, "M" indicates that the corresponding command is part of the basic mandatory feature set, and "O" indicates that the corresponding command is part of the optional feature set.

[0067] For commands, client-to-server command conformance means that the server should recognize and support client-to-server commands and generate responses as defined. Server-to-client command conformance means that the server should send commands as defined by cluster behavior, i.e., respond to client-to-server commands. Command conformance depends on supported server features. Clients should not be required to support optional commands or commands that depend on optional features.

[0068] Constraints include "all" and "desc." "all" in a numeric data type indicates that all values ​​are allowed. "desc" indicates that the constraint is defined in the description section.

[0069] Range indicates the value range of the field. Range can support two forms: explicit constraint and width constraint. Among them, the explicit constraint can give the minimum and maximum values ​​corresponding to the value of the field, for example, the value range of a field is (0,128). The width constraint can limit the value of the field to a specific number of bytes, for example, the value of a field is limited to 8 bytes. In some embodiments, the value of the range may include "N / A" to indicate not applicable. Of course, "N / A" can also appear in other parts (other data quality), such as defaults, constraints, etc.

[0070] Priority: Each event record has an associated priority. This priority can be used to describe the usage semantics of the event.

[0071] Communication system based on Matter protocol

[0072] The following describes a communication system applicable to an embodiment of the present application in conjunction with Figure 2. The communication system shown in Figure 2 includes a Matter client device 210, a Matter server device 220, and a configuration device 230. It should be noted that the data structure model of the Matter client device 210 and the Matter server device 220 can be as shown in Figure 1.

[0073] Matter client device 210 is a user-side client device that can communicate with Matter server device 220. In some implementations, Matter client device 210 can send control information to Matter server device 220 to control Matter server device 220. For example, when Matter server device 220 is a smart air conditioner, Matter client device 210 can send control information to Matter server device 220 to control the temperature of Matter server device 220.

[0074] In some embodiments, the Matter client device 210 may refer to a terminal device installed with a Matter client, wherein the terminal device may be a mobile phone, a computer, a tablet computer, a smart bracelet, a smart watch, etc., which is not limited in the embodiments of the present application. It should be understood that the Matter client may be an application (APP) or a mini-program, etc., which is not limited in the embodiments of the present application.

[0075] Matter server device 220 may refer to an IoT device that supports the Matter standard protocol. Matter server device 220 may communicate directly with Matter client device 210 so that Matter client device 210 can control Matter server device 220.

[0076] For example, when the Matter server device 220 is a smart air conditioner that supports the Matter standard protocol, the Matter client device 210 can control the smart air conditioner's power on and off, and set the temperature, wind speed, etc. When the Matter server device 220 is a robot vacuum that supports the Matter standard protocol, the Matter client device 210 can control the robot vacuum to start or stop working, control the robot vacuum's operating mode, etc.

[0077] Currently, the control interfaces supported by the Matter server device 220 mainly include control and subscription and reporting. Among them, control can be understood as a set of functional clusters corresponding to one or more attribute values ​​of the Matter server device that can be modified or retrieved. For example, the Matter client device is a smart speaker and the Matter server device is a smart air conditioner. The user can say "cool down" to the smart speaker, and then the smart speaker sends a control command to lower the temperature to the smart air conditioner.

[0078] The configuration (commissioner) device 230 can be used to configure the Matter server device 220. In other words, the configuration device can be understood as a terminal device installed with a configuration terminal, through which the user can configure the Matter server device 120. Among them, the terminal device can be a mobile phone, computer, tablet computer, smart bracelet, smart watch, etc., which is not limited in the embodiment of the present application. In some embodiments, the configuration terminal can be an application or a small program, etc., which is not limited in the embodiment of the present application.

[0079] It should be noted that the configuration terminal can be the same APP or mini-program as the Matter client. Of course, the configuration terminal can be a different APP or mini-program from the Matter client. This embodiment of the application is not limited to this.

[0080] Path and Command Path Information Block

[0081] A path can be used to represent each entity defined in the data model. The format of a path can be expressed as:

[0082] <path> ::= <target> <cluster><cluster element>

[0083] <target>::=<group target>|<endpoint target>

[0084] <group target>::=<group ID>

[0085] <endpoint target>::= <node> <endpoint>

[0086] <endpoint>::=<wildcard endpoint>|<concrete endpoint>

[0087] <cluster>::=<wildcard cluster>|<concrete cluster>

[0088] <cluster element>::= <attribute> | <event>| <command> .

[0089] It can be seen that a path may include several elements, namely, a target, a functional cluster, and a functional cluster element. In other words, a path may be composed of three elements, namely, a target, a functional cluster, and a functional cluster element.

[0090] In some embodiments, the target may be a group target. The group target may be used to identify a group of targets, which may be represented by a group ID.

[0091] In some embodiments, the target can be an endpoint target. The endpoint target can be composed of a node and an endpoint. The node can also be called a path node (corresponding to the path node mentioned later, that is, the node corresponding to the recipient of the first command, which is omitted in the encoding information of the command path information block). In some embodiments, endpoints can be divided into two types: wildcard endpoints and concrete endpoints. Wildcard endpoints can represent multiple target paths, while concrete endpoints can represent a single target path.

[0092] Function clusters can be divided into two types: wildcard function clusters and concrete function clusters. Wildcard function clusters can represent multiple target paths, while concrete function clusters can represent a single target path.

[0093] Function cluster elements can be any of the three types: attributes, events, and commands. According to the different function cluster elements, the path can be divided into attribute path, event path, and command path.

[0094] Attribute paths can be used to represent attributes in a functional cluster. The format of attributes in an attribute path can be expressed as:

[0095] <attribute>::=<attribute ID> <field> *

[0096] <field>::=<struct field ID> |<list entry index> .

[0097] The attribute ID is the identifier of the target attribute in the functional cluster (for example, a serial number). The field field is optional and can be left blank if the attribute is not composite data. If the attribute is composite data, the field field should contain a field ID. For example, if the attribute is a structure, the field field should be the structure field ID (struct field ID). If the attribute is a list, the field field should be the list entry index ID.

[0098] In the embodiments of the present application, no specific distinction is made between identifiers and indexes, and the two can be replaced with each other. In other words, the identifiers mentioned in the embodiments of the present application can be replaced with indexes, or the IDs in the embodiments of the present application can refer to both identifiers and indexes.

[0099] An event path can be used to represent a functional cluster event. The format of an event in an event path can be expressed as: <event>::=<event ID> Wherein, event ID refers to the identifier (eg, number) of the target event in the function cluster.

[0100] The command path can be used to represent a functional cluster command. The format of the command in the command path can be expressed as: <command> ::=<command ID> The command ID refers to the identifier (eg, number) of the target command in the function cluster.

[0101] A path can be associated with an information block (IB). For example, a command path can be associated with a command path information block (CommandPathIB). The command path information block represents the path information block of a command. The contents of the command path information block can be found in Table 1.

[0102] Table 1

[0103] Path Field Type Quality Compliance ClusterPath (Function Cluster Path) ClusterPathIB M Command (Command) command-id M

[0104] ClusterPathIB is the path information block of the functional cluster. Command-id indicates the identifier of the target command in the functional cluster. M indicates that the corresponding path field is mandatory. For example, the path field ClusterPathIB is mandatory.

[0105] The contents of ClusterPathIB can be found in Table 2.

[0106] Table 2

[0107] Path Field Type Quality Compliance Group (Group) group-id! EndpointNode (Node) node-id! GroupEndpoint (Endpoint) endpoint-idA! GroupCluster (Function Cluster) cluster-idAM

[0108] !Endpoint indicates that if the path's target is an endpoint, the path field "Group" is not supported. !Group indicates that if the path's target is a group, the path fields "Node" and "Endpoint" are not supported. A indicates wildcardable, meaning that wildcard characters can be used in this field.

[0109] It should be noted that the "node" field in Table 2 corresponds to the node corresponding to the recipient of the first command, that is, the path node mentioned later, which is omitted in the encoding information of the command path information block.

[0110] In some embodiments, Table 1 and Table 2 can be understood as the contents of the command path information block and the function cluster path information block defined at the data model layer.

[0111] In some embodiments, during the encoding of the command path information block, the content of ClusterPathIB can be expanded into CommandPathIB to improve encoding efficiency. Table 3 shows the content of CommandPathIB after the content of ClusterPathIB is expanded into CommandPathIB during encoding.

[0112] Table 3

[0113] Element Explanation Tag Type Tag Number TLV Type Range Endpoint (Endpoint) Context Tag 0 Unsigned integer 16 bits Cluster (Function cluster) Context Tag 1 Unsigned integer 32 bits Command (Command) Context Tag 2 Unsigned integer 32 bits

[0114] In Table 3, if an element is missing, it means that multiple elements can be wildcarded, that is, the element is a wildcard element. For example, if the endpoint element is missing, it means that multiple endpoints can be wildcarded.

[0115] Continuing with Table 3, we can see that, compared to Table 2, the node ID in Table 3 can be omitted at the encoding level. This is because, for messages containing this element, the corresponding node ID (i.e., the ID of the path node, or the ID of the node corresponding to the recipient of the first command) can be obtained from the message layer and can therefore be omitted during encoding. Similarly, the Group field can also be obtained from the DST (Destination Node ID) field in the message header and can therefore also be omitted during encoding.

[0116] Communication mechanism based on relay equipment

[0117] In some scenarios, for example, when the client device leaves the communication network where the server device is located, the client device can send commands (or control information, control instructions, etc.) to the server device through a relay device to control the server device and improve the customer experience.

[0118] Referring to Figure 3, communication based on relay devices generally involves a Matter client device, a Matter server device, and a relay device. Among them, the relay device can forward the command sent by the client device to the server device. In addition, the relay device can further forward the command response returned by the server device to the client device. In other words, the relay device can provide a command relay service (also known as a control information relay service, a control instruction relay service, etc.), so that the command sent by the client device can be sent to the server device through the relay link provided by the command relay service.

[0119] As described above, a relay device can forward commands sent by a client device to a server device. Therefore, a relay device typically has network connectivity. Alternatively, a relay device can be any device with network connectivity, such as a router or smart speaker, though this is not a limitation in the present embodiment.

[0120] As a possible implementation, after being configured with a corresponding server device, the relay device can obtain relevant information about the server device (or target server device, target device, etc.) to establish a relay relationship with the server device. For example, the relay device can obtain one or more of the following information to establish a relay relationship between the relay device and the server device: node information of the server device, endpoint information of the server device, functional cluster information of the server device, and information such as a list of attributes and a list of commands contained in the functional cluster of the server device.

[0121] Exemplarily, the relay device can create a virtual device that corresponds to the server device relayed by the relay device. In some embodiments, the correspondence between the virtual device and the server device can also be understood as a mapping relationship between the virtual device and the server device. In some embodiments, the correspondence between the virtual device and the server device can mean that the data model structure of the virtual device is consistent with the data model structure of the server device. As an implementation method, the relay device can create a virtual device to carry the business resources of the server device, and subscribe to the server device to maintain the consistency of the data model structure of the virtual device with the data model structure of the server device.

[0122] In this way, when the client device sends a command to the virtual device in the relay device, the relay device can forward the command to the server device corresponding to the virtual device to complete the relay of the command.

[0123] Therefore, when a client device provides command relay services through a relay device, how the client device can use the relay device to accurately control the server device is an urgent problem that needs to be solved. For example, if the relay device can relay multiple server devices, how can the client device accurately send the command corresponding to the server device it wants to control to the relay device?

[0124] To solve the above problems, the present invention provides a command transmission solution that can ensure that the client device can accurately control the server device using the relay device. The solution provided by the present invention is described in detail below with reference to the accompanying drawings.

[0125] FIG4 is a flow chart of a command transmission method provided by an embodiment of the present application. The method shown in FIG4 is described from the perspective of the interaction between a client device, a relay device, and a server device. For example, the client device and the server device may be, for example, the client device 210 and the server device 220 shown in FIG2 , and the relay device may be, for example, the relay device shown in FIG3 . The method of FIG4 may include steps S410 and S420, which are described in detail below.

[0126] In step S410 , the client device sends a first command to the relay device.

[0127] In step S420, the relay device forwards the first command to the server device.

[0128] The first command can be used to control the server device. For example, the first command can be used to operate a function cluster (e.g., a business function cluster) of the server device. As a specific example, taking the server device as a smart light, the first command can be used to operate the switch function cluster in the smart light to control the switch of the smart light. As another specific example, taking the server device as a smart air conditioner, the first command can be used to operate the air conditioning temperature function cluster in the smart air conditioner to control the temperature adjustment of the smart air conditioner.

[0129] In some embodiments, when the relay device is capable of forwarding the first command to the server device, the server device can be understood as the server device relayed by the relay device. Therefore, the server device can also be called the target server device, or simply the target device.

[0130] In some embodiments, the identity information of the server device can be indicated using the node ID of the server device. Generally speaking, the node ID of the server device is unique within the same network and can be used to indicate the unique identity of the server device within the network. The server device can use different node IDs in different networks.

[0131] That is, in a certain network, a client device or a relay device can uniquely identify its corresponding server device through the node ID of the server device.

[0132] In order to further enhance the customer experience, when the relay device receives the first command sent by the client device, it can promptly feed back to the client device the command response given by the server device to the first command (the response result to the first command), and the function cluster in the server device corresponding to the first command can be set in the relay device. That is to say, assuming that the first command is used to control the target function cluster in the server device, then the relay device can include a mapping function cluster, which is the same as the target function cluster in the server device. It should be noted that the target function cluster and the mapping function cluster are just a name, which is used to indicate the mapping relationship between the two function clusters, and can also be replaced by other names.

[0133] There are many ways to configure the target functional cluster and the mapping functional cluster to be the same, and the embodiments of the present application are not limited thereto. For example, the relay device can obtain information such as the node, endpoint, functional cluster, and attribute list and command list contained in the functional cluster of the server device, and then send a subscription request to the server device to request to subscribe to the target functional cluster, for example, to subscribe to the attribute list and command list of the target functional cluster.

[0134] In order to improve resource utilization of the relay device, in some embodiments, the relay device can provide command relay services for multiple server devices. Therefore, the relay device can be provided with a functional cluster of multiple server devices.

[0135] As an implementation, a relay device can be configured with one or more virtual devices, each of which has a mapping relationship with a server device. In other words, each virtual device corresponds to a server device. Furthermore, each virtual device in the relay device can be configured with the same functional cluster as the service functional cluster in the server device's node.

[0136] In other words, the above-mentioned mapping function cluster can be set in a virtual device, and the mapping function cluster is the same as the target function cluster of the server device.

[0137] In some embodiments, the virtual device may be created by a relay device.

[0138] In some embodiments, the virtual device may include a virtual endpoint having a mapping relationship with a service endpoint of the server device, or in other words, the virtual device refers to a virtual endpoint having a mapping relationship with a service endpoint of the server device.

[0139] In some embodiments, the virtual device may include a virtual node having a mapping relationship with a node of the server device, or in other words, the virtual device refers to a virtual node having a mapping relationship with a node of the server device.

[0140] In the embodiment of the present application, the client device and / or the relay device can use the node ID of the server device to accurately control the server device.

[0141] In some embodiments, the node ID of the server device can be recorded in the device information of the first virtual device. The first virtual device is a virtual device in the relay device that has a mapping relationship with the server device. This allows the client device to query the device information of the first virtual device to obtain the mapping relationship between the node IDs of the first virtual device and the server device, thereby achieving accurate control of the server device and improving the customer experience.

[0142] In some embodiments, the node ID of the server device can be recorded in the encoded information of the command path information block corresponding to the first command. In this way, the relay device can accurately forward the first command to the server device based on the node ID corresponding to the first command, thereby improving the customer experience.

[0143] The following describes in more detail how to accurately control the server device based on the node ID of the server device in conjunction with Example 1 and Example 2. It should be noted that Example 1 and Example 2 can be used in combination in part or in whole, and the embodiments of this application are not limited to this.

[0144] Example 1: The node ID of the server device is recorded in the device information of the first virtual device

[0145] In some embodiments, the device information of the first virtual device may refer to a functional cluster of the first virtual device, that is, the node ID of the server device may be recorded in the functional cluster of the first virtual device.

[0146] As described above, the server device may include one or more service endpoints. In some embodiments, the first virtual device may include a virtual endpoint that has a mapping relationship with the service endpoint of the server device (hereinafter, the example is explained using the server device including the first service endpoint and the first virtual device including the first virtual endpoint that has a mapping relationship with the first service endpoint).

[0147] In some embodiments, a virtual endpoint in the first virtual device (eg, a first virtual endpoint) may include one or more functional clusters, such as a first functional cluster, a second functional cluster, and the like.

[0148] In some embodiments, the node ID of the server device may be recorded in the endpoint information of the first virtual endpoint. The endpoint information of the first virtual endpoint may include, for example, the endpoint identifier of the first virtual endpoint, the functional cluster in the first virtual endpoint, and information such as the attribute list and command list contained in the functional cluster, although this embodiment of the present application is not limited thereto.

[0149] In some embodiments, the node ID of the server device may be recorded in the functional cluster of the first virtual endpoint, for example, in the first functional cluster.

[0150] The first functional cluster can be any functional cluster in the first virtual endpoint, which is not specifically limited in the embodiment of the present application. Several preferred embodiments of the first functional cluster are given below.

[0151] In some embodiments, the first functional cluster may be a functional cluster used to describe the first virtual endpoint. In some embodiments, the first functional cluster is a functional cluster used to describe the first virtual endpoint, which may mean that the first functional cluster is a functional cluster used to describe (or report) basic information of the first virtual endpoint, such as device type information and functional cluster information used to describe the first virtual endpoint. In some embodiments, the first functional cluster is a functional cluster used to describe the first virtual endpoint, which may also be understood as the first functional cluster used to describe the endpoint instance of the first virtual endpoint.

[0152] In some embodiments, the first functional cluster may be an existing functional cluster. In this case, a field (eg, an attribute field) may be added to the existing functional cluster to indicate the node ID of the server device corresponding to the first virtual endpoint.

[0153] For example, the first functional cluster may be a descriptor functional cluster. The descriptor functional cluster may be understood as an existing functional cluster that is used to describe an endpoint in a node. In the prior art, the attributes included in the descriptor functional cluster may be referred to in Table 4.

[0154] Table 4

[0155]

[0156] Among them, F indicates that the field has a fixed value; R indicates read permission; V indicates view permission; and M indicates mandatory.

[0157] Specifically, the device type list can list the device types and corresponding versions that the endpoint conforms to (for example, contained in the DeviceTypeStruct structure). It should be noted that the device type list should contain at least one device type. For example, the extended color lamp device type may support device type IDs for dimmable lamps and switchable lamps, as these are subsets of extended color lamps.

[0158] The server list can give the IDs of all functional clusters with server roles on the endpoint.

[0159] The client list can give the cluster IDs of all functions on the endpoint that have the client role.

[0160] A parts list can list all the endpoints that make up a device type instance. For example, a refrigerator device type can be defined as consisting of multiple temperature sensor endpoints, a metering endpoint, and two thermostat endpoints.

[0161] In an embodiment of the present application, a field can be added to the descriptor function cluster to indicate the node ID of the server device corresponding to the first virtual endpoint. For example, an attribute field, such as an origin node identifier (e.g., represented by OriginNodeID), can be added to indicate this. Specifically, when the first function cluster in an embodiment of the present application is a descriptor function cluster, the attributes included in the descriptor function cluster can be found in Table 5.

[0162] Table 5

[0163]

[0164] Here, O indicates that the attribute is optional, that is, the attribute only exists in some cases (such as in relay devices).

[0165] In some embodiments, after the relay device completes the creation of the first virtual endpoint and maps the first service endpoint to the first virtual endpoint, the relay device can set the value of the original node identifier attribute to the node ID of the target node where the first service endpoint is located (or the node ID of the server device).

[0166] Figure 5 shows a specific example of a relay device mapping the endpoint of a server device. Referring to Figure 5, it is assumed that the relay device originally has an endpoint EP0, and the endpoint EP0 contains relay capabilities such as a relay configuration function cluster and a relay discovery function cluster. When the relay device needs to establish a relay relationship with a server device with switching capabilities, the relay device obtains the service endpoint EP1 of the server device (or, the node of the server device) and the function cluster it contains, the attribute list and command list contained in the function cluster, and other information. Then, the relay device can create a virtual endpoint EP11 and map all the function clusters on the endpoint EP1 of the server device and the attribute list and command list it contains to the virtual endpoint EP11. Furthermore, the relay device can set the value of the attribute of the original node identifier in the descriptor function cluster of the virtual endpoint EP11 to the node ID of the server device where the first service endpoint is located.

[0167] In this example, the switch (OnOff) function cluster in the virtual endpoint EP11 is the same as the switch function cluster of endpoint EP1, the label (Label) function cluster in the virtual endpoint EP11 is the same as the label function cluster of endpoint EP1, and the descriptor function cluster in the virtual endpoint EP11 not only has all the information of the descriptor function cluster of endpoint EP1, but also includes the node ID of the server device.

[0168] In some embodiments, the first functional cluster can be a functional cluster specifically used to record the node of the server device relayed by the first virtual endpoint (which can be understood as the node where the first business endpoint corresponding to the first virtual endpoint is located), and the first functional cluster includes the node ID of the server device relayed by the first virtual endpoint.

[0169] In some embodiments, the first functional cluster may be a newly added functional cluster specifically configured to record the node of the server device relayed by the first virtual endpoint, or in other words, the newly added functional cluster specifically configured to record the node ID of the server device. In other words, the first functional cluster may be a new functional cluster added to the first virtual endpoint after the relay device creates the first virtual endpoint and maps the first service endpoint to the first virtual endpoint.

[0170] For example, after creating the first virtual endpoint and mapping the first service endpoint to the first virtual endpoint, the relay device may add a function cluster named RelayedNode to the first virtual endpoint. The attributes of the function cluster may be shown in Table 6.

[0171] Table 6

[0172]

[0173] The OriginNodeID attribute field may be used to indicate the node ID of the server device where the service endpoint mapped to the first virtual node is located.

[0174] In some embodiments, after the relay device adds a first functional cluster (eg, RelayedNode functional cluster) in the first virtual endpoint, it may set the value of the original node identifier attribute in the first functional cluster to the node ID of the server device where the first service endpoint is located.

[0175] Figure 6 shows another specific example of a relay device mapping the endpoint of a server device. Referring to Figure 6, it is assumed that the relay device has an original endpoint EP0, and the endpoint EP0 contains relay capabilities such as a relay configuration function cluster and a relay discovery function cluster. When the relay device needs to establish a relay relationship with a server device with switching capabilities, the relay device obtains the service endpoint EP1 of the server device and the function cluster it contains, the attribute list and command list contained in the function cluster, and other information. Then, the relay device can create a virtual endpoint EP11 and map all the function clusters on the endpoint EP1 of the server device and the attribute list and command list contained in it to the virtual endpoint EP11. Furthermore, the relay device can add a new function cluster called a relayed node (RelayedNode) in the virtual endpoint EP11, and the node ID of the server device is recorded in the function cluster.

[0176] In this example, the switch (OnOff) function cluster in the virtual endpoint EP11 is the same as the switch function cluster of endpoint EP1, the label (Label) function cluster in the virtual endpoint EP11 is the same as the label function cluster of endpoint EP1, the descriptor (Descriptor) function cluster in the virtual endpoint EP11 is the same as the descriptor function cluster of endpoint EP1, and the virtual endpoint EP11 also includes a function cluster called the relayed node, which records the node ID of the server device.

[0177] In some embodiments, the endpoint information of the first virtual endpoint may further include a network identifier of the network in which the server device resides. For example, the network identifier may be recorded in the first functional cluster of the first virtual endpoint (e.g., the descriptor functional cluster or the relayed node functional cluster described above).

[0178] Taking the first functional cluster as the relayed node functional cluster mentioned above as an example, in addition to the original node ID attribute field, the functional cluster may also include a network ID (FabricID) attribute field.

[0179] Table 7

[0180]

[0181] The FabricID attribute field may be used to indicate the network where the server device is located, or may also be understood as indicating the network where the node of the server device is located.

[0182] In some embodiments, the server device may be uniquely associated with a node ID of the server device and a network identifier of a network where the server device is located.

[0183] In the case where the node ID of the server device is recorded in the endpoint information of the first virtual endpoint, when the client device sends a first command to the relay device, the first command can be associated with the first command path information block. The encoding information of the first command path information block may include the endpoint identifier of the first virtual endpoint, the identifier of the functional cluster where the first command is located, and the identifier of the first command. For example, the encoding information of the first command path information block can be expressed as: <endpoint identifier of the first virtual endpoint> / <identifier of the functional cluster where the first command is located> / <identifier of the first command>.

[0184] In some embodiments, the path node corresponding to the first command sent by the client device to the relay device is the relay device (or relay device node), that is, the path node is used to indicate the node corresponding to the recipient of the first command.

[0185] In the case where the node ID of the server device is recorded in the endpoint information of the first virtual endpoint, when the relay device forwards the first command to the server device, the first command can be associated with the second command path information block. The encoding information of the second command path information block may include the endpoint identifier of the first service endpoint, the identifier of the functional cluster where the first command is located, and the identifier of the first command. For example, the encoding information of the second command path information block can be expressed as: <endpoint identifier of the first service endpoint> / <identifier of the functional cluster where the first command is located> / <identifier of the first command>.

[0186] In some embodiments, before sending the first command to the relay device, the client device may also query the device information of the virtual device (for example, the first virtual device) in the relay device to determine the mapping relationship between the virtual device in the relay device and the server device, and then accurately send the first command to the relay device based on the mapping relationship.

[0187] FIG7 is a flow chart of a method for transmitting a command according to another embodiment of the present application. As shown in FIG7 , the method may include steps S710 to S740. These steps are described below.

[0188] In step S710, the client device sends a first message to the relay device, where the first message is used to query a first functional cluster. The first functional cluster is a functional cluster in the relay device that records the node ID of the server device.

[0189] In some embodiments, the first functional cluster may refer to the functional cluster mentioned above for describing the first virtual endpoint, for example, a descriptor functional cluster.

[0190] In some embodiments, the first functional cluster may refer to the functional cluster mentioned above that is specifically used to record nodes relayed by the first virtual endpoint, for example, a relayed node functional cluster.

[0191] In step S720 , the relay device sends a first response to the client device, where the first response includes information about the first functional cluster.

[0192] In some embodiments, the first response may be that the relay device returns the first functional cluster to the client device, and the client device may obtain the node ID of the server device corresponding to the first virtual endpoint according to the attribute field in the first functional cluster.

[0193] However, the embodiments of the present application are not limited to this. In some embodiments, the client device can directly request to query the attribute field in the first functional cluster for recording the node ID of the server device, for example, directly request to query the original node identification attribute in the first functional cluster to obtain the node ID of the server device.

[0194] In some embodiments, the information of the first functional cluster can be used by the client device to display the server device corresponding to the node identifier according to the node identifier. For example, only the server device corresponding to the node identifier is displayed on the client device to facilitate user control.

[0195] In step S730 , the client device sends a first command to the relay device.

[0196] In step S740 , the relay device forwards the first command to the server device.

[0197] For a detailed description of step S730 and step S740, please refer to the description of step S410 and step S420 above, which will not be repeated here.

[0198] In some embodiments, after the client device obtains the node ID of the server device corresponding to the first virtual endpoint in the relay device, it can also establish a pointing relationship between the first virtual endpoint and the server device directly connected to the client device based on the node ID of the server device. In some embodiments, this pointing relationship can be used by the client device to display the server device corresponding to the node ID based on the node ID. For example, only the server device corresponding to the node ID is displayed on the client device to facilitate user control.

[0199] 7 , in some embodiments, the method shown in FIG7 may further include step S725 . In step S725 , the client device establishes a pointing relationship between the first virtual endpoint and the server device directly connected to the client device based on the node ID of the server device.

[0200] For example, the server device is a smart air conditioner A. When the connection is discovered locally, the client device has already established a control relationship with the server device and displayed the server device in the client device's controllable device list (the controllable device list can be used to indicate information about the server device directly connected to the client device). When the client device discovers the first virtual endpoint of the device type being an air conditioner through the relay device, and the value of the attribute field for recording the node ID of the server device in the first virtual endpoint is the same as the node ID of the previously locally connected smart air conditioner A, the client device can point the first virtual endpoint of the relay device to the smart air conditioner A in the controllable device list to establish a pointing relationship between the first virtual endpoint and the server device directly connected to the client device.

[0201] In some embodiments, if the endpoint information of the first virtual endpoint also records the network identifier of the network where the server device is located, the server device can be uniquely associated with the network identifier and the node ID of the server device.

[0202] That is, in some embodiments, when establishing a pointing relationship between the first virtual endpoint and the server device to which the client device is directly connected, the network identifier of the network in which the server device resides may also be considered. For example, the client device may compare the network identifier obtained from the endpoint information of the first virtual endpoint with the network identifier of the network in which the actual server device resides to determine whether they match.

[0203] By establishing a pointing relationship between the virtual endpoint in the relay device and the server device directly connected to the client device, the problem that the client device cannot identify the server device relayed by the relay device and correspond to the server device discovered by the client device when directly connected can be solved, so that users can maintain a consistent experience of relay control and direct connection control.

[0204] Embodiment 2: The node ID of the server device is recorded in the encoding information of the command path information block corresponding to the first command

[0205] In some embodiments, the first virtual device may include a virtual node having a mapping relationship with the server device (hereinafter described using the first virtual node as an example).

[0206] In some embodiments, the virtual node in the first virtual device (e.g., the first virtual node) may include one or more endpoints (e.g., business endpoints), each endpoint may include one or more functional clusters, such as a first functional cluster, a second functional cluster, etc.

[0207] In some embodiments, after the relay device obtains the node information of the server device, it may create a first virtual node corresponding to the server device and map the node of the server device to the first virtual node.

[0208] Figure 8 shows a specific example of a relay device mapping a node of a server device. Referring to Figure 8, it is assumed that the relay device includes an original node Node0, that is, a node that provides relay services. The original node Node0 of the relay device contains three endpoints. When the relay device needs to establish a relay relationship with the node Node0 of the server device with switching capabilities, the relay device can obtain two service endpoints EP1 and EP2 of the three endpoints of the node Node0 of the server device, as well as information such as the function clusters contained in the two service endpoints EP1 and EP2, the attribute lists and command lists contained in the function clusters, and the like. Then, the relay device can create a virtual node Node1 and map all the endpoints EP1 and EP2 on the node Node0 of the server device and the function clusters, attribute lists and command lists contained in the function clusters to the virtual node Node1.

[0209] In this example, the virtual node Node1 includes two service endpoints EP1 and EP2 in the server device's node Node0. However, the embodiments of the present application are not limited to this. In some embodiments, the relay device can map all endpoints (three endpoints in this example) of the server device's node Node0, as well as information such as the function clusters included in all endpoints, the attribute lists and command lists included in the function clusters, to the virtual node Node1.

[0210] In some embodiments, after the relay device adds the first virtual node, the node ID of the server device can be added to the relay configuration cluster (RelayConfiguration Cluster) of the relay device, for example, it can be added to the target node (or target list, TargetList) field in the relay configuration cluster.

[0211] The relay configuration cluster contained in the relay device allows users to configure the server devices that the relay device relays to. For the properties contained in the relay configuration cluster, see Table 8.

[0212] Table 8

[0213]

[0214] N indicates that the attribute is non-volatile and remains valid after the device is restarted. W indicates write permission.

[0215] The fields that ConfigurationStruct may include can be found in Table 9.

[0216] Table 9

[0217]

[0218] The network identifier is used to indicate the index of the network the device is located in. The target list is a list of node IDs of the server devices relayed by the relay device.

[0219] In some embodiments, the relay device can extend the encoding information of the command path information block of its own command. Specifically, a first element (node ​​element) can be added to the encoding information of the command path information block. The first element can be used to indicate the node information of the server device corresponding to the command sent to the relay device.

[0220] For example, the content of the encoding information of the command path information block can be seen in Table 10.

[0221] Table 10

[0222] Element Explanation Tag Type Tag Number TLV Type Range Node (node) Context Tag 0 Unsigned integer 64 bits Endpoint (endpoint) Context Tag 1 Unsigned integer 16 bits Cluster (function cluster) Context Tag 2 Unsigned integer 32 bits Command (command) Context Tag 3 Unsigned integer 32 bits

[0223] In this way, after the relay device receives the command sent by the client device, it can accurately know which server device the command is sent to based on the encoding information of the command path information block corresponding to the command, and then accurately forward the command to the corresponding server device.

[0224] As a possible implementation method, after the relay device receives the command sent by the client device, it can determine that the command is sent to the first virtual node in the relay device based on the node ID recorded in the "node" element in the encoding information of the command path information block, and then forward the command to the corresponding server device based on the mapping relationship between the first virtual node and the node of the server device.

[0225] As another possible implementation method, after the relay device receives the command sent by the client device, it can directly determine which server device the command is sent to based on the node ID recorded in the "node" element in the encoded information of the command path information block, and forward the command to the corresponding server device.

[0226] In the case where the relay device creates a first virtual node mapping to the server device, when the client device sends a first command to the relay device, the first command can be associated with a third command path information block. The encoding information of the third command path information block may include the node ID of the server device, the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command. For example, the encoding information of the third command path information block can be expressed as: <node ID of the server device> / <endpoint identifier of the endpoint where the first command is located> / <identifier of the functional cluster where the first command is located> / <identifier of the first command>.

[0227] In some embodiments, the path node corresponding to the first command sent by the client device to the relay device is a relay device node, and the relay device node can be understood as an original node of the relay device.

[0228] In the case where the relay device creates a first virtual node mapping to the server device, when the relay device forwards the first command to the server device, the first command can be associated with the fourth command path information block. The encoding information of the fourth command path information block may include the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command. For example, the encoding information of the fourth command path information block can be expressed as: <endpoint identifier of the endpoint where the first command is located> / <identifier of the functional cluster where the first command is located> / <identifier of the first command>.

[0229] FIG9 is a flow chart of a method for transmitting a command according to another embodiment of the present application. As shown in FIG9 , the method of FIG9 may further include steps S910 to S940. These steps are described below.

[0230] In step S910, the client device sends a second message to the relay device. The second message is used to query target node information in the relay configuration cluster. The target node information records the node ID of the server device.

[0231] In some embodiments, the target node information may refer to the relevant information of the target list mentioned above, and the target list may record the node IDs of one or more relayed server devices.

[0232] In step S920 , the relay device sends target node information to the client device.

[0233] The client device can determine whether a server device is relayed by the relay device by querying the target list in the configured cluster, so as to forward commands through the relay device.

[0234] In some embodiments, the target node information can be used by the client device to display the server device corresponding to the node identifier according to the node identifier. For example, only the server device corresponding to the node identifier is displayed on the client device to facilitate user control.

[0235] In step S930 , the client device sends a first command to the relay device.

[0236] In step S940 , the relay device forwards the first command to the server device.

[0237] For the relevant description of step S930 and step S940, please refer to the description of step S410 and step S420 above, which will not be repeated here.

[0238] In some embodiments, after the client device obtains the node ID of the server device corresponding to the first virtual node in the relay device, it can also establish a pointing relationship between the first virtual node and the server device directly connected to the client device based on the node ID of the server device. In some embodiments, this pointing relationship can be used by the client device to display the server device corresponding to the node ID based on the node ID. For example, only the server device corresponding to the node ID is displayed on the client device to facilitate user control.

[0239] 9 , in some embodiments, the method shown in FIG9 may further include step S925 . In step S925 , the client device establishes a pointing relationship between the first virtual node and the server device directly connected to the client device based on the node ID of the server device.

[0240] For example, if the server device is smart air conditioner A, and the client device has already established a control relationship with the server device when discovering the connection locally, and displays the server device in the client device's controllable device list, then when the client device obtains the first node ID from the target node information of the relay device, the first node ID corresponds to the first virtual node, and the first node ID is the same as the node ID of the previously locally connected smart air conditioner A, the client device can point the first virtual node of the relay device to smart air conditioner A in the controllable device list to establish a pointing relationship between the first virtual node and the server device directly connected to the client device.

[0241] In some embodiments, the relay device, the client device, and the server device may all be in the same network. In some embodiments, the relay device, the client device, and the server device may be in different networks, which is not limited in the present embodiment.

[0242] For ease of understanding, the following text, in conjunction with Figures 10 to 12, introduces the method flow of an embodiment of the present application by taking the communication scenario based on the Matter protocol as an example. It should be noted that in the communication scenario based on the Matter protocol, the client device mentioned above can also be referred to as a Matter client device, and the server device mentioned above can also be referred to as a Matter server device. In addition, the functional clusters involved in the methods shown in Figures 10 to 12 have been introduced in detail above, and for the sake of brevity, they will not be repeated below.

[0243] It should be noted that the embodiments of the present application do not specifically limit the order in which the steps are executed. The order below is only for illustrative purposes. During actual execution, only some of the steps listed may be executed, or more steps than the steps listed may be executed. Alternatively, during actual execution, the order of execution may also be swapped. Taking the steps shown in Figure 10 as an example, step S1060 may not be executed in some solutions, or S1060 may be executed after step S1070 or S1080 in some solutions. The embodiments of the present application do not limit this.

[0244] In some embodiments, the server device may, for example, refer to a smart home device in the user's home, and the relay device may, for example, refer to a router. The user may use the APP on the terminal device as a client (i.e., the client device is a terminal device) to control the smart home device through the router.

[0245] Figure 10 is a flow chart of a method for transmitting a command according to another embodiment of the present application. The method shown in Figure 10 may include steps S1010 to S1080.

[0246] In step S1010 , the relay device obtains information of a first service endpoint of the server device.

[0247] The server device can be understood as the target device being relayed corresponding to the relay device, or the target server device.

[0248] In some embodiments, the relay device can read the node, endpoint, and function cluster information of the server device and initiate a subscription request to the service function cluster in the server device to subscribe to the attribute list and command list contained in the service function cluster. Accordingly, if the server device allows the subscription request, the server device can send the attribute list and command list contained in the service function cluster to the relay device.

[0249] In step S1020 , the relay device creates a first virtual endpoint.

[0250] The first virtual endpoint has a mapping relationship with the first service endpoint. In other words, the relay device can map all function clusters of the first service endpoint and the attributes and commands contained therein to the created first virtual endpoint.

[0251] Furthermore, the relay device may set the origin node identifier (OriginNodeID) attribute value of the descriptor function cluster in the first virtual endpoint to the node ID of the server device.

[0252] In step S1030 , the client device queries endpoint information of the first virtual endpoint.

[0253] The client device can obtain description information such as the controllable interface of the first virtual endpoint by querying the endpoint information of the first virtual endpoint.

[0254] In step S1040 , the relay device returns the descriptor capability cluster attribute of the first virtual endpoint to the client device.

[0255] In step S1050, the client device obtains original node identification attribute information from the descriptor function cluster attribute of the first virtual endpoint, that is, obtains the node ID of the server device.

[0256] In some embodiments, the client device may also directly query the original node identification attribute of the descriptor function cluster of the first virtual endpoint to obtain the node ID of the server device.

[0257] In step S1060, the client device establishes a pointing relationship with the server device obtained in the local discovery connection through the obtained node ID of the server device.

[0258] For example, if the server device is smart air conditioner A, the client device has established a control relationship with the device when the connection is discovered locally, and the device is displayed in the controllable device list of the client device. When the client device discovers an endpoint with a device type of air conditioner through the relay device, and the value of the original node identification attribute is the same as the node ID of the previously locally connected smart air conditioner A, the client device can point the corresponding endpoint (first virtual endpoint) of the relay device to the smart air conditioner A in the controllable device list.

[0259] In step S1070 , the client device sends a first command to the first virtual endpoint of the relay device.

[0260] The node of the path corresponding to the first command is a relay device node, and the encoding information of the command path information block corresponding to the first command includes <endpoint identifier of the first virtual endpoint> / <identifier of the functional cluster where the first command is located> / <identifier of the first command>.

[0261] In step S1080 , the relay device forwards the first command to the server device.

[0262] After receiving the first command, the relay device may forward the first command to the server device based on the mapping relationship between the first virtual endpoint and the first service endpoint (or, the relay relationship). Specifically, the relay device may send the first command to the server device along the following path: the node of the path corresponding to the first command is the server device node, and the encoding information of the command path information block corresponding to the first command includes <endpoint identifier of the first service endpoint> / <identifier of the functional cluster where the first command is located> / <identifier of the first command>.

[0263] Figure 11 is a flow chart of a method for transmitting a command according to another embodiment of the present application. The method shown in Figure 11 may include steps S1110 to S1190.

[0264] In step S1110 , the relay device obtains information of the first service endpoint of the server device.

[0265] In step S1120 , the relay device creates a first virtual endpoint.

[0266] For the first service endpoint of the server device, the relay device creates a first virtual endpoint, which has a mapping relationship with the first service endpoint. In other words, the relay device can map the entire function cluster of the first service endpoint and its included attributes and commands to the first virtual endpoint.

[0267] Furthermore, the relay device may add a first functional cluster to the first virtual endpoint. The first functional cluster is a new functional cluster used to specifically record information about the node of the server device relayed by the first virtual endpoint.

[0268] In step S1130 , the client device queries information of the first functional cluster.

[0269] The client device can obtain the node ID of the server device corresponding to the first virtual endpoint by querying the information of the first functional cluster.

[0270] In step S1140 , the relay device returns the attributes of the first functional cluster to the client device.

[0271] In step S1150 , the client device obtains the original node identification attribute information from the first functional cluster attribute, that is, obtains the node ID of the server device.

[0272] In some embodiments, the client device may also directly query the original node identification attribute in the first functional cluster to obtain the node ID of the server device.

[0273] In step S1160 , the client device obtains the network identifier of the network where the original node is located from the attribute information of the first functional cluster, that is, obtains the network identifier of the network where the server device is located.

[0274] In step S1170 , the client device establishes a pointing relationship with the server device obtained in the local discovery connection through the obtained node ID of the server device.

[0275] For example, if the server device is smart air conditioner A, the client device has established a control relationship with the device when the connection is discovered locally, and the device is displayed in the controllable device list of the client device. When the client device discovers an endpoint with a device type of air conditioner through the relay device, and the value of the original node identification attribute is the same as the node ID of the previously locally connected smart air conditioner A, the client device can point the corresponding endpoint (first virtual endpoint) of the relay device to the smart air conditioner A in the controllable device list.

[0276] Furthermore, if it is necessary to combine the network identifier and the node ID to uniquely associate the server device, the identifier of the network where the original node is located can also be compared with the network identifier of the network where the node of the actual server device is located to determine whether they match, wherein the identifier of the network where the original node is located is obtained from the network identifier attribute in the first functional cluster of the first virtual endpoint.

[0277] In step S1180 , the client device sends a first command to the first virtual endpoint of the relay device.

[0278] The node of the path corresponding to the first command is a relay device node, and the encoding information of the command path information block corresponding to the first command includes <endpoint identifier of the first virtual endpoint> / <identifier of the functional cluster where the first command is located> / <identifier of the first command>.

[0279] In step S1190 , the relay device forwards the first command to the server device.

[0280] After receiving the first command, the relay device may forward the first command to the server device based on the mapping relationship between the first virtual endpoint and the first service endpoint (or, the relay relationship). Specifically, the relay device may send the first command to the server device along the following path: the node of the path corresponding to the first command is the server device node, and the encoding information of the command path information block corresponding to the first command includes <endpoint identifier of the first service endpoint> / <identifier of the functional cluster where the first command is located> / <identifier of the first command>.

[0281] Figure 12 is a flow chart of a method for transmitting a command according to another embodiment of the present application. The method shown in Figure 12 may include steps S1210 to S1280.

[0282] In step S1210 , the relay device obtains node information of the server device, where the node ID of the server device is AAA.

[0283] In step S1220 , the relay device creates a first virtual node.

[0284] For the node of the server device, the relay device creates a first virtual node and maps the service endpoint contained in the node of the server device (as well as all function clusters contained in the service endpoint and their attributes and commands) to the first virtual node.

[0285] Furthermore, the relay device may establish an association relationship between the first virtual node and the node ID of the server device, that is, establish an association relationship between the first virtual node and the node ID AAA.

[0286] In step S1230 , the client device checks the relay configuration function cluster of the original node of the relay device to check the target list attribute of the relay configuration function cluster.

[0287] For example, the client device can view the endpoint EP0 in the original node. The device type of the endpoint EP0 is "root node", and the endpoint EP0 includes the relay configuration function cluster mentioned above.

[0288] The client device can determine whether the relay device can relay the server device whose node ID is AAA by querying the target list attribute.

[0289] In step S1240 , the relay device returns the target node list of the target list attribute to the client device.

[0290] In step S1250, the client device obtains the node ID AAA from the target node list of the target list attribute, that is, obtains the node ID of the server device.

[0291] In step S1260, the client device establishes a pointing relationship with the server device obtained in the local discovery connection through the obtained node ID of the server device.

[0292] For example, if the server device is smart air conditioner A, the client device has established a control relationship with the device when the connection is discovered locally, and the device is displayed in the controllable device list of the client device. When the client device obtains the node ID AAA from the target node list of the relay device, and AAA is the same as the node ID of the smart air conditioner A previously connected locally, the client device can point the corresponding node (first virtual node) of the relay device to the smart air conditioner A in the controllable device list.

[0293] In step S1270 , the client device sends a first command to the original node of the relay device.

[0294] The node of the path corresponding to the first command is the relay device node, and the encoding information of the command path information block corresponding to the first command includes <node ID of the server device> / <endpoint identifier of the endpoint where the first command is located> / <identifier of the functional cluster where the first command is located> / <identifier of the first command>.

[0295] In step S1280, the relay device forwards the first command to the server device.

[0296] Specifically, after receiving the first command, the relay device can determine that the first command is sent to the first virtual node based on the mapping relationship (or association relationship) between the first virtual node and the node ID AAA, and forward the first command to the server device based on the mapping relationship between the first virtual node and the server device. Specifically, the first command can be sent to the following path of the server device: the node of the path corresponding to the first command is the server device node, and the encoding information of the command path information block corresponding to the first command includes <endpoint identifier of the endpoint where the first command is located> / <identifier of the functional cluster where the first command is located> / <identifier of the first command>.

[0297] The method embodiment of the present application is described in detail above in conjunction with Figures 1 to 12. The device embodiment of the present application is described in detail below in conjunction with Figures 13 to 16. It should be understood that the description of the method embodiment corresponds to the description of the device embodiment. Therefore, for parts not described in detail, reference can be made to the above method embodiment.

[0298] FIG13 is a schematic diagram of the structure of a relay device provided in an embodiment of the present application. The relay device 1300 shown in FIG13 can be used for transmitting commands, and the relay device 1300 includes a first receiving module 1310 and a first sending module 1320 .

[0299] The first receiving module 1310 may be configured to receive a first command sent by a client device.

[0300] The first sending module 1320 can be used to forward the first command to the server device, wherein the node identifier of the server device is recorded in one or more of the following information: device information of the first virtual device, wherein the first virtual device is a virtual device in the relay device that has a mapping relationship with the server device; encoding information of the command path information block corresponding to the first command.

[0301] Optionally, the server device includes a first service endpoint, the first virtual device includes a first virtual endpoint having a mapping relationship with the first service endpoint, and the node identifier is recorded in endpoint information of the first virtual endpoint.

[0302] Optionally, the first virtual endpoint includes a first functional cluster, and the node identifier is recorded in the first functional cluster; wherein the first functional cluster is one of the following functional clusters: a functional cluster used to describe the first virtual endpoint; and a functional cluster specifically used to record the node relayed by the first virtual endpoint.

[0303] Optionally, the relay device 1300 further includes: a second receiving module for receiving a first message sent by the client device, the first message being used to query the first functional cluster; and a second sending module for sending a first response to the client device, the first response including information about the first functional cluster.

[0304] Optionally, the information of the first functional cluster is used by the client device to display the server device corresponding to the node identifier according to the node identifier.

[0305] Optionally, the endpoint information of the first virtual endpoint records a network identifier of the network where the server device is located.

[0306] Optionally, the first command received by the relay device is associated with a first command path information block, and the encoding information of the first command path information block includes the endpoint identifier of the first virtual endpoint, the identifier of the functional cluster where the first command is located, and the identifier of the first command; and / or, the first command sent by the relay device to the server device is associated with a second command path information block, and the encoding information of the second command path information block includes the endpoint identifier of the first service endpoint, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

[0307] Optionally, the first virtual device includes a first virtual node having a mapping relationship with the server device.

[0308] Optionally, the relay device 1300 also includes: a third receiving module, used to receive a second message sent by the client device, the second message is used to query the target node information in the relay configuration cluster, and the target node information records the node identifier; a third sending module, used to send the target node information to the client device.

[0309] Optionally, the target node information is used by the client device to display the server device corresponding to the node identifier according to the node identifier.

[0310] Optionally, the first command received by the relay device is associated with a third command path information block, and the encoding information of the third command path information block includes the node identifier, the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command; and / or, the first command sent by the relay device to the server device is associated with a fourth command path information block, and the encoding information of the fourth command path information block includes the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

[0311] FIG14 is a schematic diagram of the structure of a client device provided in an embodiment of the present application. The client device 1400 shown in FIG14 can be used for transmitting commands, and the client device 1400 includes a first sending module 1410.

[0312] The first sending module 1410 can be used to send a first command to the relay device, where the first command is used to control the server device, and the first command is forwarded to the server device through the relay device; wherein the node identifier of the server device is recorded in one or more of the following information: device information of the first virtual device, where the first virtual device is a virtual device in the relay device that has a mapping relationship with the server device; and encoding information of the command path information block corresponding to the first command.

[0313] Optionally, the server device includes a first service endpoint, the first virtual device includes a first virtual endpoint having a mapping relationship with the first service endpoint, and the node identifier is recorded in endpoint information of the first virtual endpoint.

[0314] Optionally, the first virtual endpoint includes a first functional cluster, and the node identifier is recorded in the first functional cluster; wherein the first functional cluster is one of the following functional clusters: a functional cluster used to describe the first virtual endpoint; and a functional cluster specifically used to record the node relayed by the first virtual endpoint.

[0315] Optionally, the client device 1400 further includes: a second sending module 1420, configured to send a first message to the relay device, wherein the first message is used to query the first functional cluster; and a first receiving module, configured to receive a first response sent by the relay device, wherein the first response includes information about the first functional cluster.

[0316] Optionally, the endpoint information of the first virtual endpoint records a network identifier of the network where the server device is located.

[0317] Optionally, the first command sent by the client device to the relay device is associated with a first command path information block, and the encoding information of the first command path information block includes the endpoint identifier of the first virtual endpoint, the identifier of the functional cluster where the first command is located, and the identifier of the first command; and / or, the first command sent by the relay device to the server device is associated with a second command path information block, and the encoding information of the second command path information block includes the endpoint identifier of the first service endpoint, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

[0318] Optionally, the client device 1400 further includes: a first establishing module, configured to establish, according to the node identifier, a pointing relationship between the first virtual endpoint and a server device to which the client device is directly connected.

[0319] Optionally, the pointing relationship is used by the client device to display the server device corresponding to the node identifier according to the node identifier.

[0320] Optionally, the first virtual device includes a first virtual node having a mapping relationship with the server device.

[0321] Optionally, the client device 1400 also includes: a third sending module, used to send a second message to the relay device, the second message is used to query the target node information in the relay configuration cluster, and the target node information records the node identifier; a second receiving module, used to receive the target node information sent by the relay device.

[0322] Optionally, the first command sent by the client device to the relay device is associated with a third command path information block, and the encoding information of the third command path information block includes the node identifier, the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command; and / or, the first command sent by the relay device to the server device is associated with a fourth command path information block, and the encoding information of the fourth command path information block includes the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

[0323] Optionally, the client device 1400 further includes: a second establishing module, configured to establish, according to the node identifier, a pointing relationship between the first virtual node and a server device to which the client device is directly connected.

[0324] Optionally, the pointing relationship is used by the client device to display the server device corresponding to the node identifier according to the node identifier.

[0325] FIG15 is a schematic diagram of the structure of a server device provided in an embodiment of the present application. The server device 1500 shown in FIG15 can be used for transmitting commands. The server device 1500 includes a receiving module 1510.

[0326] The receiving module 1510 can be used to receive a first command sent by a relay device, where the first command is forwarded by a client device to the server device through the relay device; wherein the node identifier of the server device is recorded in one or more of the following information: device information of a first virtual device, where the first virtual device is a virtual device in the relay device that has a mapping relationship with the server device; and encoding information of a command path information block corresponding to the first command.

[0327] Optionally, the server device includes a first service endpoint, the first virtual device includes a first virtual endpoint having a mapping relationship with the first service endpoint, and the node identifier is recorded in endpoint information of the first virtual endpoint.

[0328] Optionally, the first virtual endpoint includes a first functional cluster, and the node identifier is recorded in the first functional cluster; wherein the first functional cluster is one of the following functional clusters: a functional cluster used to describe the first virtual endpoint; and a functional cluster specifically used to record the node relayed by the first virtual endpoint.

[0329] Optionally, the endpoint information of the first virtual endpoint records a network identifier of the network where the server device is located.

[0330] Optionally, the first command received by the relay device is associated with a first command path information block, and the encoding information of the first command path information block includes the endpoint identifier of the first virtual endpoint, the identifier of the functional cluster where the first command is located, and the identifier of the first command; and / or, the first command received by the server device is associated with a second command path information block, and the encoding information of the second command path information block includes the endpoint identifier of the first service endpoint, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

[0331] Optionally, the first virtual device includes a first virtual node having a mapping relationship with the server device.

[0332] Optionally, the first command received by the relay device is associated with a third command path information block, and the encoding information of the third command path information block includes the node identifier, the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command; and / or, the first command received by the server device is associated with a fourth command path information block, and the encoding information of the fourth command path information block includes the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

[0333] Figure 16 is a schematic block diagram of a communication device according to an embodiment of the present application. The dashed lines in Figure 16 indicate that the unit or module is optional. Device 1600 may be used to implement the method described in the above method embodiment. Device 1600 may be a chip, a terminal device, or a network device.

[0334] The device 1600 may include one or more processors 1610. The processor 1610 may support the device 1600 to implement the method described in the above method embodiment. The processor 1610 may be a general-purpose processor or a special-purpose processor. For example, the processor may be a central processing unit (CPU). Alternatively, the processor may be another general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0335] The apparatus 1600 may further include one or more memories 1620. The memories 1620 store programs that can be executed by the processor 1610, causing the processor 1610 to perform the methods described in the above method embodiments. The memories 1620 may be independent of the processor 1610 or integrated into the processor 1610.

[0336] The apparatus 1600 may further include a transceiver 1630. The processor 1610 may communicate with other devices or chips via the transceiver 1630. For example, the processor 1610 may transmit and receive data with other devices or chips via the transceiver 1630.

[0337] The present application also provides a computer-readable storage medium for storing a program. The computer-readable storage medium can be applied to a terminal or network device provided in the present application, and the program enables a computer to execute the method performed by the terminal or network device in each embodiment of the present application.

[0338] The present application also provides a computer program product. The computer program product includes a program. The computer program product can be applied to a terminal or network device provided in the present application, and the program causes a computer to execute the method performed by the terminal or network device in each embodiment of the present application.

[0339] The embodiments of the present application also provide a computer program. The computer program can be applied to the terminal or network device provided in the embodiments of the present application, and the computer program enables a computer to execute the method performed by the terminal or network device in each embodiment of the present application.

[0340] It should be understood that the terms "system" and "network" in this application can be used interchangeably. In addition, the terms used in this application are only used to explain the specific embodiments of this application and are not intended to limit this application. The terms "first," "second," "third," and "fourth," etc. in the specification and claims of this application and the accompanying drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions.

[0341] In the embodiments of this application, the term "indication" can refer to direct or indirect indications, or can also indicate an association. For example, "A indicates B" can mean that A directly indicates B, for example, B can obtain information through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can obtain information through C; it can also mean that A and B are associated with each other.

[0342] In the embodiments of the present application, "B corresponding to A" means that B is associated with A and B can be determined based on A. However, it should be understood that determining B based on A does not mean determining B based solely on A; B can also be determined based on A and / or other information.

[0343] In the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between the two, or an association relationship between the two, or a relationship between indication and indication, configuration and configuration, etc.

[0344] In the embodiments of the present application, "pre-defined" or "pre-configured" may be implemented by pre-storing corresponding codes, tables, or other methods that can be used to indicate relevant information in a device (e.g., a terminal device or a network device). The present application does not limit the specific implementation method. For example, pre-defined may refer to a definition in a protocol.

[0345] In the embodiments of the present application, the "protocol" may refer to a standard protocol in the communication field, for example, it may include an LTE protocol, an NR protocol, and related protocols used in future communication systems, and this application does not limit this.

[0346] In the embodiments of this application, the term "and / or" is simply a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0347] In various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0348] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0349] The units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0350] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0351] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be read by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0352] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.< / event> < / field> < / field> < / attribute> < / event> < / attribute> < / cluster> < / endpoint> < / endpoint> < / node> < / target> < / cluster> < / target> < / path>

Claims

1. A method for transmitting a command, characterized in that: include: The relay device receives a first command sent by the client device; The relay device forwards the first command to the server device; The node identifier of the server device is recorded in one or more of the following information: Device information of a first virtual device, wherein the first virtual device is a virtual device in the relay device that has a mapping relationship with the server device; Encoding information of the command path information block corresponding to the first command.

2. The method according to claim 1, characterized in that The server device includes a first service endpoint, the first virtual device includes a first virtual endpoint having a mapping relationship with the first service endpoint, and the node identifier is recorded in endpoint information of the first virtual endpoint.

3. The method according to claim 2, characterized in that The first virtual endpoint includes a first functional cluster, and the node identifier is recorded in the first functional cluster; The first functional cluster is one of the following functional clusters: A functional cluster for describing the first virtual endpoint; and A functional cluster specifically used to record the nodes relayed by the first virtual endpoint.

4. The method according to claim 3, characterized in that The method further comprises: The relay device receives a first message sent by the client device, where the first message is used to query the first functional cluster; The relay device sends a first response to the client device, where the first response includes information about the first functional cluster.

5. The method according to claim 3 or 4, characterized in that The information of the first functional cluster is used by the client device to display the server device corresponding to the node identifier according to the node identifier.

6. The method according to any one of claims 2 to 5, characterized in that The endpoint information of the first virtual endpoint records the network identifier of the network where the server device is located.

7. The method according to any one of claims 2 to 6, characterized in that: The first command received by the relay device is associated with a first command path information block, where the encoding information of the first command path information block includes an endpoint identifier of the first virtual endpoint, an identifier of the functional cluster where the first command is located, and an identifier of the first command; and / or The first command sent by the relay device to the server device is associated with a second command path information block, and the encoding information of the second command path information block includes the endpoint identifier of the first service endpoint, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

8. The method according to claim 1, characterized in that The first virtual device includes a first virtual node having a mapping relationship with the server device.

9. The method according to claim 8, characterized in that The method further comprises: The relay device receives a second message sent by the client device, where the second message is used to query target node information in the relay configuration cluster, where the target node information records the node identifier; The relay device sends the target node information to the client device.

10. The method according to claim 9, characterized in that The target node information is used by the client device to display the server device corresponding to the node identifier according to the node identifier.

11. The method according to any one of claims 8 to 10, characterized in that: The first command received by the relay device is associated with a third command path information block, where encoding information of the third command path information block includes the node identifier, the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command; and / or The first command sent by the relay device to the server device is associated with a fourth command path information block, and the encoding information of the fourth command path information block includes the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

12. A method for transmitting a command, characterized in that: include: The client device sends a first command to the relay device, where the first command is used to control the server device and is forwarded to the server device via the relay device. The node identifier of the server device is recorded in one or more of the following information: Device information of a first virtual device, wherein the first virtual device is a virtual device in the relay device that has a mapping relationship with the server device; Encoding information of the command path information block corresponding to the first command.

13. The method according to claim 12, characterized in that The server device includes a first service endpoint, the first virtual device includes a first virtual endpoint having a mapping relationship with the first service endpoint, and the node identifier is recorded in endpoint information of the first virtual endpoint.

14. The method according to claim 13, characterized in that The first virtual endpoint includes a first functional cluster, and the node identifier is recorded in the first functional cluster; The first functional cluster is one of the following functional clusters: A functional cluster for describing the first virtual endpoint; and A functional cluster specifically used to record the nodes relayed by the first virtual endpoint.

15. The method according to claim 14, characterized in that The method further comprises: The client device sends a first message to the relay device, where the first message is used to query the first functional cluster; The client device receives a first response sent by the relay device, where the first response includes information about the first functional cluster.

16. The method according to any one of claims 13 to 15, characterized in that The endpoint information of the first virtual endpoint records the network identifier of the network where the server device is located.

17. The method according to any one of claims 13 to 16, characterized in that: The first command sent by the client device to the relay device is associated with a first command path information block, where encoding information of the first command path information block includes an endpoint identifier of the first virtual endpoint, an identifier of the functional cluster where the first command is located, and an identifier of the first command; and / or The first command sent by the relay device to the server device is associated with a second command path information block, and the encoding information of the second command path information block includes the endpoint identifier of the first service endpoint, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

18. The method according to any one of claims 13 to 17, characterized in that The method further comprises: The client device establishes a pointing relationship between the first virtual endpoint and a server device directly connected to the client device according to the node identifier.

19. The method according to claim 18, characterized in that The pointing relationship is used by the client device to display the server device corresponding to the node identifier according to the node identifier.

20. The method according to claim 12, wherein The first virtual device includes a first virtual node having a mapping relationship with the server device.

21. The method according to claim 20, characterized in that The method further comprises: The client device sends a second message to the relay device, where the second message is used to query target node information in the relay configuration cluster, where the target node information records the node identifier; The client device receives the target node information sent by the relay device.

22. The method according to claim 20 or 21, characterized in that: The first command sent by the client device to the relay device is associated with a third command path information block, where encoding information of the third command path information block includes the node identifier, the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command; and / or The first command sent by the relay device to the server device is associated with a fourth command path information block, and the encoding information of the fourth command path information block includes the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

23. The method according to any one of claims 20 to 22, characterized in that The method further comprises: The client device establishes a pointing relationship between the first virtual node and a server device directly connected to the client device according to the node identifier.

24. The method according to claim 23, wherein The pointing relationship is used by the client device to display the server device corresponding to the node identifier according to the node identifier.

25. A method for transmitting a command, characterized in that: include: The server device receives a first command sent by the relay device, where the first command is forwarded by the client device to the server device through the relay device; The node identifier of the server device is recorded in one or more of the following information: Device information of a first virtual device, wherein the first virtual device is a virtual device in the relay device that has a mapping relationship with the server device; Encoding information of the command path information block corresponding to the first command.

26. The method according to claim 25, characterized in that The server device includes a first service endpoint, the first virtual device includes a first virtual endpoint having a mapping relationship with the first service endpoint, and the node identifier is recorded in endpoint information of the first virtual endpoint.

27. The method according to claim 26, characterized in that The first virtual endpoint includes a first functional cluster, and the node identifier is recorded in the first functional cluster; The first functional cluster is one of the following functional clusters: A functional cluster for describing the first virtual endpoint; and A functional cluster specifically used to record the nodes relayed by the first virtual endpoint.

28. The method according to claim 26 or 27, characterized in that The endpoint information of the first virtual endpoint records the network identifier of the network where the server device is located.

29. The method according to any one of claims 26 to 28, characterized in that: The first command received by the relay device is associated with a first command path information block, where the encoding information of the first command path information block includes an endpoint identifier of the first virtual endpoint, an identifier of the functional cluster where the first command is located, and an identifier of the first command; and / or The first command received by the server device is associated with a second command path information block, and the encoding information of the second command path information block includes the endpoint identifier of the first service endpoint, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

30. The method according to claim 25, wherein The first virtual device includes a first virtual node having a mapping relationship with the server device.

31. The method according to claim 30, wherein: The first command received by the relay device is associated with a third command path information block, where encoding information of the third command path information block includes the node identifier, the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command; and / or The first command received by the server device is associated with a fourth command path information block, and the encoding information of the fourth command path information block includes the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

32. A command transmission device, characterized in that: The apparatus is configured in a relay device, and the relay device includes: A first receiving module, configured to receive a first command sent by a client device; A first sending module, configured to forward the first command to a server device; The node identifier of the server device is recorded in one or more of the following information: Device information of a first virtual device, wherein the first virtual device is a virtual device in the relay device that has a mapping relationship with the server device; Encoding information of the command path information block corresponding to the first command.

33. The device according to claim 32, characterized in that The server device includes a first service endpoint, the first virtual device includes a first virtual endpoint having a mapping relationship with the first service endpoint, and the node identifier is recorded in endpoint information of the first virtual endpoint.

34. The device according to claim 33, characterized in that The first virtual endpoint includes a first functional cluster, and the node identifier is recorded in the first functional cluster; The first functional cluster is one of the following functional clusters: A functional cluster for describing the first virtual endpoint; and A functional cluster specifically used to record the nodes relayed by the first virtual endpoint.

35. The device according to claim 34, characterized in that The device further comprises: A second receiving module is configured to receive a first message sent by the client device, where the first message is used to query the first functional cluster; The second sending module is configured to send a first response to the client device, where the first response includes information about the first functional cluster.

36. The device according to claim 34 or 35, characterized in that The information of the first functional cluster is used by the client device to display the server device corresponding to the node identifier according to the node identifier.

37. The device according to any one of claims 33 to 36, characterized in that The endpoint information of the first virtual endpoint records the network identifier of the network where the server device is located.

38. The device according to any one of claims 33 to 37, characterized in that: The first command received by the relay device is associated with a first command path information block, where the encoding information of the first command path information block includes an endpoint identifier of the first virtual endpoint, an identifier of the functional cluster where the first command is located, and an identifier of the first command; and / or The first command sent by the relay device to the server device is associated with a second command path information block, and the encoding information of the second command path information block includes the endpoint identifier of the first service endpoint, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

39. The device according to claim 32, characterized in that The first virtual device includes a first virtual node having a mapping relationship with the server device.

40. The device according to claim 39, characterized in that The device further comprises: a third receiving module, configured to receive a second message sent by the client device, where the second message is used to query target node information in the relay configuration cluster, where the target node information records the node identifier; The third sending module is configured to send the target node information to the client device.

41. The device according to claim 40, characterized in that The target node information is used by the client device to display the server device corresponding to the node identifier according to the node identifier.

42. The device according to any one of claims 39 to 41, characterized in that: The first command received by the relay device is associated with a third command path information block, where encoding information of the third command path information block includes the node identifier, the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command; and / or The first command sent by the relay device to the server device is associated with a fourth command path information block, and the encoding information of the fourth command path information block includes the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

43. A command transmission device, characterized in that: The apparatus is configured on a client device, and the client device includes: A first sending module is configured to send a first command to a relay device, where the first command is used to control a server device and is forwarded to the server device via the relay device; The node identifier of the server device is recorded in one or more of the following information: Device information of a first virtual device, wherein the first virtual device is a virtual device in the relay device that has a mapping relationship with the server device; Encoding information of the command path information block corresponding to the first command.

44. The device according to claim 43, characterized in that The server device includes a first service endpoint, the first virtual device includes a first virtual endpoint having a mapping relationship with the first service endpoint, and the node identifier is recorded in endpoint information of the first virtual endpoint.

45. The device according to claim 44, characterized in that The first virtual endpoint includes a first functional cluster, and the node identifier is recorded in the first functional cluster; The first functional cluster is one of the following functional clusters: A functional cluster for describing the first virtual endpoint; and A functional cluster specifically used to record the nodes relayed by the first virtual endpoint.

46. ​​The device according to claim 45, characterized in that The device further comprises: A second sending module, configured to send a first message to the relay device, where the first message is used to query the first functional cluster; The first receiving module is configured to receive a first response sent by the relay device, where the first response includes information about the first functional cluster.

47. The device according to any one of claims 44 to 46, characterized in that The endpoint information of the first virtual endpoint records the network identifier of the network where the server device is located.

48. The device according to any one of claims 44 to 47, characterized in that: The first command sent by the client device to the relay device is associated with a first command path information block, where encoding information of the first command path information block includes an endpoint identifier of the first virtual endpoint, an identifier of the functional cluster where the first command is located, and an identifier of the first command; and / or The first command sent by the relay device to the server device is associated with a second command path information block, and the encoding information of the second command path information block includes the endpoint identifier of the first service endpoint, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

49. The device according to any one of claims 44 to 48, characterized in that The device further comprises: The first establishing module is configured to establish, according to the node identifier, a pointing relationship between the first virtual endpoint and a server device directly connected to the client device.

50. The device according to claim 49, characterized in that The pointing relationship is used by the client device to display the server device corresponding to the node identifier according to the node identifier.

51. The device according to claim 43, characterized in that The first virtual device includes a first virtual node having a mapping relationship with the server device.

52. The device according to claim 51, characterized in that The device further comprises: A third sending module is configured to send a second message to the relay device, where the second message is used to query target node information in the relay configuration cluster, where the target node information records the node identifier; The second receiving module is used to receive the target node information sent by the relay device.

53. The device according to claim 51 or 52, characterized in that: The first command sent by the client device to the relay device is associated with a third command path information block, where encoding information of the third command path information block includes the node identifier, the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command; and / or The first command sent by the relay device to the server device is associated with a fourth command path information block, and the encoding information of the fourth command path information block includes the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

54. The device according to any one of claims 51 to 53, characterized in that The device further comprises: The second establishing module is configured to establish, according to the node identifier, a pointing relationship between the first virtual node and a server device directly connected to the client device.

55. The device according to claim 54, characterized in that The pointing relationship is used by the client device to display the server device corresponding to the node identifier according to the node identifier.

56. A command transmission device, characterized in that: The device is configured on a server device, and the server device includes: a receiving module, configured to receive a first command sent by a relay device, where the first command is forwarded by a client device to the server device via the relay device; The node identifier of the server device is recorded in one or more of the following information: Device information of a first virtual device, wherein the first virtual device is a virtual device in the relay device that has a mapping relationship with the server device; Encoding information of the command path information block corresponding to the first command.

57. The device according to claim 56, characterized in that The server device includes a first service endpoint, the first virtual device includes a first virtual endpoint having a mapping relationship with the first service endpoint, and the node identifier is recorded in endpoint information of the first virtual endpoint.

58. The device according to claim 57, characterized in that The first virtual endpoint includes a first functional cluster, and the node identifier is recorded in the first functional cluster; The first functional cluster is one of the following functional clusters: A functional cluster for describing the first virtual endpoint; and A functional cluster specifically used to record the nodes relayed by the first virtual endpoint.

59. The device according to claim 57 or 58, characterized in that The endpoint information of the first virtual endpoint records the network identifier of the network where the server device is located.

60. The device according to any one of claims 57 to 59, characterized in that: The first command received by the relay device is associated with a first command path information block, where the encoding information of the first command path information block includes an endpoint identifier of the first virtual endpoint, an identifier of the functional cluster where the first command is located, and an identifier of the first command; and / or The first command received by the server device is associated with a second command path information block, and the encoding information of the second command path information block includes the endpoint identifier of the first service endpoint, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

61. The device according to claim 56, characterized in that The first virtual device includes a first virtual node having a mapping relationship with the server device.

62. The device according to claim 61, characterized in that: The first command received by the relay device is associated with a third command path information block, where encoding information of the third command path information block includes the node identifier, the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command; and / or The first command received by the server device is associated with a fourth command path information block, and the encoding information of the fourth command path information block includes the endpoint identifier of the endpoint where the first command is located, the identifier of the functional cluster where the first command is located, and the identifier of the first command.

63. A command transmission device, characterized in that: The apparatus is configured in a relay device, which includes a memory, a processor, and a transceiver. The memory is used to store a program, and the processor is used to call the program in the memory so that the relay device executes the method according to any one of claims 1 to 11.

64. A command transmission device, characterized in that: The apparatus is configured in a client device, which includes a memory, a processor, and a transceiver. The memory is used to store a program, and the processor is used to call the program in the memory so that the client device executes the method according to any one of claims 12 to 24.

65. A command transmission device, characterized in that: The apparatus is configured in a server-side device, which includes a memory, a processor, and a transceiver. The memory is used to store programs, and the processor is used to call the programs in the memory so that the server-side device executes the method as described in any one of claims 25-31.

66. A device, characterized in that The device comprises a processor configured to call a program from a memory so as to enable the device to execute the method according to any one of claims 1 to 31.

67. A chip, characterized in that: The device comprises a processor configured to call a program from a memory so that a device equipped with the chip executes the method according to any one of claims 1 to 31.

68. A computer-readable storage medium, characterized in that A program is stored thereon, and the program causes a computer to execute the method according to any one of claims 1 to 31.

69. A computer program product, characterized in that The method comprises a program for causing a computer to execute the method according to any one of claims 1 to 31.

70. A computer program, characterized in that The computer program causes a computer to execute the method according to any one of claims 1 to 31.