WO2024050832A1 - Command transmission method and apparatus, chip, storage medium and computer program - Google Patents

Command transmission method and apparatus, chip, storage medium and computer program Download PDF

Info

Publication number
WO2024050832A1
WO2024050832A1 PCT/CN2022/118195 CN2022118195W WO2024050832A1 WO 2024050832 A1 WO2024050832 A1 WO 2024050832A1 CN 2022118195 W CN2022118195 W CN 2022118195W WO 2024050832 A1 WO2024050832 A1 WO 2024050832A1
Authority
WO
WIPO (PCT)
Prior art keywords
command
endpoint
identifier
virtual
node
Prior art date
Application number
PCT/CN2022/118195
Other languages
French (fr)
Chinese (zh)
Inventor
茹昭
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2022/118195 priority Critical patent/WO2024050832A1/en
Publication of WO2024050832A1 publication Critical patent/WO2024050832A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present application relates to the technical field of the Internet of Things, and more specifically, to a command transmission method, device, chip, storage medium and computer program.
  • the client device can send commands to the server device through the relay device to control the server device.
  • the client device uses the relay device to accurately control the server device is an issue that needs to be solved urgently.
  • This application provides a command transmission method, device, chip, storage medium and computer program. Each aspect involved in this application is introduced below.
  • a command transmission method including: a relay device receiving a first command sent by a client device; the relay device forwarding the first command to a server device; wherein, the server The node identification of the device is recorded in one or more of the following information: device information of the first virtual device, where the first virtual device is one of the relay devices that has a mapping relationship with the server device. Virtual device; encoding information of the command path information block corresponding to the first command.
  • a command transmission method including: the client device sends a first command to the relay device, the first command is used to control the server device, and the first command is transmitted through the forwarded by the relay device 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, where the first virtual device It is a virtual device in the relay device that has a mapping relationship with the server device; and the encoding information of the command path information block corresponding to the first command.
  • a command transmission method including: a server device receiving a first command sent by a relay device, and the first command is forwarded by the client device to the server device through the relay device. ; wherein the node identification 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 the same as all the relay devices in the relay device.
  • the server device has a virtual device with a mapping relationship; and the encoding information of the command path information block corresponding to the first command.
  • a command transmission device configured in a relay device.
  • the relay device includes: a first receiving module for receiving the first command sent by the client device; a first sending module , 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 The virtual device is a virtual device in the relay device that has a mapping relationship with the server device; the encoding information of the command path information block corresponding to the first command.
  • a command transmission device configured on a client device.
  • the client device includes: a first sending module for sending a first command to a relay device.
  • the first command Used to control the server device, the first command is forwarded to the server device through the relay device; wherein the node identification of the server device is recorded in one or more of the following information: Center: 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; the command path information block corresponding to the first command encoded information.
  • a command transmission device configured on a server device.
  • the server device includes: a receiving module configured to receive a first command sent by a relay device.
  • the first command is The client device forwards it 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; the encoding information of the command path information block corresponding to the first command.
  • a command transmission device configured in a relay device.
  • the relay device includes a processor, a memory, and a communication interface.
  • the memory is used to store one or more computer programs.
  • the processor is configured to call a computer program in the memory so that the relay device performs some or all of the steps in the method of the first aspect.
  • a command transmission device configured on a client device.
  • the client device includes a processor, a memory, and a communication interface.
  • the memory is used to store one or more computer programs.
  • the processor is configured to call a computer program in the memory so that the client device executes some or all of the steps in the method of the second aspect.
  • a command transmission device configured on a server device.
  • the server device includes a processor, a memory, and a communication interface.
  • the memory is used to store one or more computer programs.
  • the processor is configured to call a computer program in the memory to cause the server device to execute some or all of the steps in the method of the third aspect.
  • embodiments of the present application provide a communication system, which includes one or more of the above-mentioned relay devices, client devices, and server devices.
  • the system may also include other devices that interact with the relay device, client device, or server device in the solution provided by the embodiments of the present application.
  • embodiments of the present application provide a computer-readable storage medium that stores a computer program.
  • the computer program causes a relay device, a client device, or a server device to execute each of the above. Some or all of the steps in a method.
  • 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, and the computer program is operable to cause the relay device to , the client device or the server device performs some or all of the steps in the methods of the above aspects.
  • the computer program product can be a software installation package.
  • embodiments of the present application provide 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. .
  • 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 realize the mapping relationship by querying the mapping relationship between the node identifiers of the first virtual device and the server device.
  • Accurate control of the server device; or, the node identification 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 control the first command according to the node identification corresponding to the first command. It is forwarded directly to the server device to improve customer experience.
  • Figure 1 is a schematic diagram of the model structure of a Matter device applicable to the embodiment of the present application.
  • FIG. 2 is an example system architecture diagram of a communication system applicable to the embodiment of the present application.
  • Figure 3 is an example system architecture diagram of a communication system to which the relay communication mechanism is applicable.
  • FIG. 4 is a schematic flowchart of a command transmission method provided by an embodiment of the present application.
  • Figure 5 shows an example in which a relay device maps an endpoint of a server device.
  • Figure 6 shows another example of a relay device mapping an endpoint of a server device.
  • FIG. 7 is a schematic flowchart of a command transmission method provided by another embodiment of the present application.
  • Figure 8 shows an example in which a relay device maps a node of a server device.
  • FIG. 9 is a schematic flowchart of a command transmission method provided by yet another embodiment of the present application.
  • Figure 10 is a schematic flowchart of a command transmission method provided by yet another embodiment of the present application.
  • Figure 11 is a schematic flowchart of a command transmission method provided by yet another embodiment of the present application.
  • Figure 12 is a schematic flowchart of a command transmission method provided by yet another embodiment of the present application.
  • Figure 13 is a schematic structural diagram of a relay device provided by an embodiment of the present application.
  • Figure 14 is a schematic structural diagram of a client device provided by an embodiment of the present application.
  • Figure 15 is a schematic structural diagram of a server device provided by an embodiment of the present application.
  • Figure 16 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • IoT The Internet of things
  • IoT devices may be smart home devices.
  • IoT devices may include smart air conditioners, smart refrigerators, washing machines, rice cookers, sweeping robots, and other devices.
  • the IoT device may be an intelligent monitoring device.
  • the IoT device may include a surveillance camera, a temperature sensor, a sound sensor, etc.
  • the Connectivity Standards Alliance launched an Internet of Things application layer technology standard—Matter Standard Protocol, which can provide an interoperable application layer for smart home devices based on Internet Protocol (Internet Protocol, IP) solution.
  • IP Internet Protocol
  • the Matter standard may also be called a connected home over IP (CHIP) standard.
  • the Matter standard can support three underlying communication protocols: Ethernet, Wi-Fi, and Thread, and can allow IoT devices with different protocols to communicate with each other.
  • Figure 1 is the data model structure of the Matter device applicable to the embodiment of this application.
  • the data model structure 100 of the Matter device includes a node 110, an endpoint 120, and a functional cluster 130.
  • Node 110 encapsulates an addressable and unique resource on the network and has a set of functions and capabilities that users can clearly view as a functional whole.
  • node 110 may be the highest or outermost first-order element in the data model. In other words, node 110 is the only addressable element in the outermost layer of the data model.
  • a physical entity for example, Matter device
  • a node can have multiple node identifiers (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 within the scope of the specified node ID is the access network for the interaction.
  • a node may include one or more endpoints 120.
  • Endpoint 120 is an instance, which can be a service or a virtual device, as indicated by the device type.
  • Each endpoint 120 conforms to one or more device type definitions, which define the functional clusters supported by the endpoint.
  • the endpoint may be understood to be a service/virtual device indicated by the device type.
  • Functional clusters are object classes that are instantiated on endpoints.
  • a device type defines the compliance of a set of endpoints 120.
  • a device type defines a set of requirements for a node 110 or endpoint 120.
  • Each endpoint 120 may be a collection of functions, which may include one or more function clusters 130 .
  • the functional cluster 130 is a functional building block element of the data model.
  • the functional cluster can also be called a functional set, a cluster, a cluster, etc., and the embodiments of the present application are not limited to this.
  • Functional cluster specifications define clients and servers that interact with each other.
  • Functional cluster 130 can be viewed as an interface, service or object class, which is the lowest independent functional element in the data model.
  • Each functional cluster 130 may be defined by a functional cluster specification that defines elements of the functional cluster 130, including attributes, events, commands, and behaviors related to interactions with these elements.
  • attributes, commands, and events can also be called interface units of the functional cluster 130, and corresponding functions can be provided through these three interface units.
  • the above functional clusters can be divided into two categories: utility functional clusters (utility clusters) and application functional clusters (application clusters).
  • Utility feature clusters are not part of the endpoint's main application operation. Clusters of utility functions can be used for configuration, discovery, addressing, diagnostics, monitoring device health, software updates, and more.
  • a utility functional cluster may have a temporary relationship with its functional cluster counterpart.
  • the utility cluster may include one or more of a descriptor function cluster (descriptor cluster) and a relay configuration cluster (relay configuration cluster).
  • descriptor cluster descriptor cluster
  • relay configuration cluster relay configuration cluster
  • the utility function cluster may also include other functional clusters such as a binding function cluster.
  • the application function cluster supports the main operations of the endpoint.
  • the application function cluster may also be called a business function cluster.
  • Application function clusters can support the interaction of one or more persistent applications between clients and servers. For example, in the switch function cluster (On/Off cluster) in a smart light, the client can send control commands to the server (ie, the switch function cluster) to control the switch of the smart light.
  • the switch function cluster On/Off cluster
  • the server ie, the switch function cluster
  • the business function cluster may refer to the functional cluster on other endpoints except endpoint 0 in the node (which can be understood as the first endpoint in the node, and the device type of this endpoint is "root node”) .
  • An application function cluster is not a utility function cluster, even though it may itself support utility functions such as calibration, operating modes, etc.
  • Application functional cluster specifications should not involve layers and processes outside their application domain.
  • a functional cluster command (also known as a "command", command) is a set of data fields, each data type passed between client and server cluster instances to invoke the behavior of the command recipient.
  • each command can be listed in a table, which can contain the data quality columns of the command: identification (ID), name (name), direction (direction), response (response), access (access) ), 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.
  • Attributes are functional cluster data. Currently, the agreement stipulates that each attribute can be listed in a table.
  • the data quality columns of the attributes defined in the table can include: ID, name, (data) type (type), constraint (constraint), other qualities, access, Default (value) and conformance.
  • properties may also define their associated semantics and behavior. Properties can reflect the device's queryable/settable status, configuration, and capabilities. In some cases, if no privileges are explicitly defined for a property, default access privileges take effect.
  • An event defines a record of something that happened in the past.
  • an event record can be thought of as a log entry that provides a chronological view of events on a node through an event record stream.
  • attributes which do not provide any edge-preserving functionality (that is, there is no guarantee that every attribute change will be passed to observers)
  • events allow each individual edge or change to be captured, and Reliably delivered to observers. This is critical for security and safety applications that rely on guarantees of correct behavior.
  • the agreement stipulates that each functional cluster event can be listed in a table, and the data quality columns of the event defined in the table can include: ID, priority, access, and compliance.
  • commands, attributes, and events may also include other data qualities, or include parts of the above-mentioned data qualities.
  • the embodiments of the present application do not limit this.
  • Identity represents the unique field ID of the field, or the unique identifier of the command (or attribute or event).
  • Name represents the unique name of the field, or the name of the command (or attribute).
  • Type represents the data type of the field, or in other words, represents the data type of the command parameter (or attribute parameter).
  • 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 client to server. For another example, it can be determined from the server to the client.
  • Access permissions are used to define how an element can be accessed (such as read or write) and what permissions are required to access the data.
  • access rights may include V, where V indicates that read access or call access requires view privileges.
  • Access permissions can also include O, which means "read access”, “write access” or “call access” require operation permissions.
  • Access permissions can also include R, which stands for read access.
  • Access permissions can also include W, which represents write access.
  • Response usually present in the command list, is used to define the response message of the command.
  • Default used to define the default value. It should be noted that the default value is not the value used when the server returns to the factory refresh settings. Default values can indicate that compliance specified for a data field can be optional or change over time. Default values can be defined to complete the dependency when the actual data field value is not present.
  • Conformance which defines the optionality and dependencies of any data model element or set of elements. Typically, this column is valid for properties, commands, events, enumerations, and fields of commands, events, or structures.
  • M indicates that the corresponding command is part of the basic mandatory feature set
  • O indicates that the corresponding command is part of the optional feature set.
  • client-to-server command compliance means that the server should recognize and support client-to-server commands and generate responses as defined.
  • Server-to-client command compliance means that the server should send commands in a manner defined by cluster behavior, e.g., in response to client-to-server commands. Compliance of the command depends on supported server features. Clients should not be required to support optional commands or commands that rely on optional features.
  • Constraints including all and desc. Among them, all is defined in the numeric data type to allow all values. desc indicates that the constraint is defined in the description section.
  • Range represents the value range of the field.
  • Range can support two forms: explicit constraint and width constraint.
  • explicit constraints can give the minimum and maximum values corresponding to the value of the field.
  • the value range of a certain field is (0,128).
  • Width constraints can limit the value of a field to a specific number of bytes.
  • the value of a certain field can be limited to 8 bytes.
  • 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 qualities), such as defaults, constraints, etc.
  • Each event record has an associated priority. This priority can be used to describe the usage semantics of the event.
  • the communication system applicable to the embodiment of the present application is introduced below with reference to FIG. 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 may be as shown in Figure 1 .
  • the Matter client device 210 is a client device on the user side, and the Matter client device 210 can communicate with the Matter server device 220 .
  • the Matter client device 210 can send control information to the Matter server device 220 to control the Matter server device 220.
  • the Matter server device 220 is a smart air conditioner
  • the Matter client device 210 can control the temperature adjustment of the Matter server device 220 by sending control information to the Matter server device 220 .
  • the above-mentioned Matter client device 210 may refer to a terminal device with a Matter client installed, where the terminal device may be a mobile phone, a computer, a tablet, a smart bracelet, a smart watch, etc.
  • the Matter client can be an application (application, APP) or a small program, etc., and the embodiments of the present application are not limited to this.
  • the Matter server device 220 may refer to an Internet of Things device that supports the Matter standard protocol.
  • the Matter server device 220 can directly communicate with the Matter client device 210, so that the Matter client device 210 controls the Matter server device 220.
  • the Matter server device 220 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 switch of the smart air conditioner and set the air conditioner temperature, wind speed, etc.
  • the Matter server device 220 is a sweeping robot that supports the Matter standard protocol
  • the Matter client device 210 can control the sweeping robot to start or stop working, control the working mode of the sweeping robot, etc.
  • control interfaces supported by the Matter server device 220 mainly include control and subscribe and report.
  • control can be understood as a set of functional clusters that can modify or retrieve one or more attribute values of the Matter server device.
  • 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.
  • the configuration (commissioner) device 230 can be used to configure the Matter server device 220.
  • 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 .
  • the terminal device may be a mobile phone, a computer, a tablet, a smart bracelet, a smart watch, etc., which are not limited in the embodiments of the present application.
  • the configuration terminal may be an application program or an applet, which is not limited in the embodiments of the present application.
  • configuration terminal can be the same APP or applet as the Matter client.
  • configuration terminal can be a different APP or applet from the Matter client.
  • the embodiments of the present application do not limit this.
  • Paths can be used to represent various entities defined in the data model.
  • the format of the path can be expressed as:
  • the path can include several elements: target, functional cluster, and functional cluster element.
  • the path can be composed of three elements: target, functional cluster, and functional cluster element.
  • the target may be a group target.
  • Group goals can be used to identify a group of goals, and this group of goals can be represented by a group ID (group ID).
  • the target may 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 in the command is omitted from the encoding information of the path information block).
  • endpoints can be divided into two types: wildcard endpoints and concrete endpoints. Wildcard endpoints can represent multiple target paths, and concrete endpoints can represent a single target path.
  • Functional clusters can be divided into two types: wildcard functional clusters and concrete functional clusters. Wildcard functional clusters can represent multiple target paths, while concrete functional clusters can represent a single target path.
  • Functional cluster elements can be any of three types: attributes, events, and commands. According to different functional cluster elements, paths can be divided into attribute paths, event paths and command paths.
  • Property paths can be used to represent properties within a functional cluster.
  • the format of the attributes in the attribute path can be expressed as:
  • attribute ID refers to the identification (for example, number) of the target attribute in the functional cluster.
  • Field is optional. If the attribute is not composite data, the field can be left blank. If the attribute is composite data, the field should contain the field ID. For example, if the attribute is structure data, then the field should be the structure field ID (struct field ID), and if the attribute is a list, then the field should be the list field ID (list entry index).
  • the identifier and the index can be replaced equally. That is to say, the identifier mentioned in the embodiment of this application can be replaced by an index, or the ID in the embodiment of this application can refer to an identifier or an index.
  • Event paths can be used to represent a functional cluster event.
  • event ID refers to the identification (for example, number) of the target event in the functional cluster.
  • the command path can be used to represent a functional cluster command.
  • command ID refers to the identification (for example, number) of the target command in the functional cluster.
  • a path can be associated with an information block (IB).
  • IB information block
  • 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 content contained in the command path information block can be seen in Table 1.
  • ClusterPathIB is the path information block of the functional cluster.
  • command-id indicates the identification of the target command in the functional cluster.
  • M indicates that the corresponding path field is a required field.
  • the path field ClusterPathIB is a required field.
  • ClusterPathIB The contents of ClusterPathIB can be seen in Table 2.
  • Endpoint indicates that if the target of the path is an endpoint target, the path field "Group” will not be supported.
  • Group means that if the target of the path is a group target, the path field "Node” and the path field "Endpoint” will not be supported.
  • A means wildcardable, that is, wildcard characters can be used in this field.
  • 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.
  • 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 by the data model layer.
  • the content of ClusterPathIB can be extended to CommandPathIB to improve encoding efficiency.
  • Table 3 shows the contents of CommandPathIB after the contents of ClusterPathIB are expanded into CommandPathIB during coding implementation.
  • Tag type tag number TLV type scope Endpoint contextual tags 0 unsigned integer 16 bits Cluster (functional cluster) contextual tags 1 unsigned integer 32 bits Command contextual tags 2 unsigned integer 32 bits
  • an element if an element is missing, it means that multiple elements can be wildcarded, that is, the element is a wildcard element.
  • the endpoint element if the endpoint element is missing, it can mean that multiple endpoints can be wildcarded.
  • the node ID can be omitted in the encoding layer.
  • the corresponding node ID that is, the ID of the path node, or the ID of the node corresponding to the recipient of the first command
  • the Group field can also be obtained from the DST (target node ID) field of the message header, so it can also be omitted during encoding.
  • the client device 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 the relay device to Control server devices to improve customer experience.
  • commands or control information, control instructions, etc.
  • communication based on relay devices usually involves Matter client devices, Matter server devices and relay devices.
  • the relay device can forward the command sent by the client device to the server device.
  • the relay device can further forward the command response returned by the server device to the client device. That is to say, the relay device can provide a command relay service (which can also be called a control information relay service, a control instruction relay service, etc.), so that commands sent by the client device can pass through the relay chain provided by the command relay service. sent to the server device.
  • a command relay service which can also be called a control information relay service, a control instruction relay service, etc.
  • the relay device can forward the commands sent by the client device to the server device. Therefore, the relay device usually has the ability to connect to the network.
  • the relay device can be any device with network connection capabilities.
  • the relay device can be a router, a smart speaker, etc., which is not limited in the embodiments of the present application.
  • the relay device after the relay device is configured with a corresponding server device, it can obtain relevant information of the server device (or target server device, target device, etc.) to communicate with the server device.
  • the device establishes a relay relationship.
  • 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, and functional cluster of the server device. information, as well as the attribute list and command list contained in the functional cluster of the server device.
  • the relay device can create a virtual device corresponding to the server device relayed by the relay device.
  • the correspondence between the virtual device and the server device can also be understood to mean that there is a mapping relationship between the virtual device and the server device.
  • correspondence between the virtual device and the server device may mean that the data model structure of the virtual device is consistent with the data model structure of the server device.
  • the relay device can create a virtual device to carry the service resources of the server device, and subscribe to the server device to maintain the data model structure of the virtual device consistent with the data model structure of the server device.
  • the relay device can forward the command to the server device corresponding to the virtual device to complete the relay of the command.
  • a relay device can relay multiple server devices. How does the client device accurately send commands corresponding to the server devices it wants to control to the relay device.
  • embodiments of the present application provide a command transmission solution that can ensure that the client device can use the relay device to accurately control the server device.
  • FIG. 4 is a schematic flowchart of a command transmission method provided by an embodiment of the present application.
  • the method shown in Figure 4 is described from the perspective of interaction between a client device, a relay device, and a server device.
  • the client device and the server device may be the client device 210 and the server device 220 shown in FIG. 2
  • the relay device may be the relay device shown in FIG. 3 .
  • the method in Figure 4 may include step S410 and step S420, and these steps will be introduced in detail below.
  • step S410 the client device sends a first command to the relay device.
  • step S420 the relay device forwards the first command to the server device.
  • the first command may be used to control the server device.
  • the first command may be used to operate a functional cluster (for example, a business function cluster) of the server device.
  • a functional cluster for example, a business function cluster
  • the first command can be used to operate the switch function cluster in the smart light to control the switch of the smart light.
  • the first command can be used to operate the air conditioning temperature function cluster in the smart air conditioner to control the adjustment of the temperature of the smart air conditioner.
  • the server device when the relay device can forward 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 also It can be called the target server device, or simply the target device.
  • the identity information of the server device may be indicated using the node ID of the server device.
  • the node ID of the server device is unique, which can be used to indicate the unique identity of the server device in the network.
  • server devices can use different node IDs.
  • the client device or relay device can uniquely determine its corresponding server device through the node ID of the server device.
  • the relay device 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 in response to the first command (the response result to the first command),
  • the functional 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, the relay device may include a mapping function cluster, and the mapping function cluster 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 names, which are used to indicate the mapping relationship between the two function clusters, and can also be replaced with other names.
  • the relay device can obtain the node, endpoint, function cluster of the server device, and the attribute list and command list contained in the function cluster, and then send a subscription request to the server device to request to subscribe to the above target function.
  • the cluster for example, subscribes to a list of properties and a list of commands for the target functional cluster.
  • the relay device can provide command relay services for multiple server devices. Therefore, a functional cluster with multiple server devices can be set up in the relay device.
  • the relay device may be provided with one or more virtual devices, and there is a mapping relationship between each virtual device and the server device, or in other words, each virtual device corresponds to a server device. Moreover, for the virtual devices in the relay device, each virtual device may be provided with the same functional cluster as the service function cluster in the node of the server device.
  • mapping function cluster can be set in the virtual device, and the mapping function cluster is the same as the target function cluster of the server device.
  • the above-mentioned virtual device may be created by a relay device.
  • the above-mentioned virtual device may include a virtual endpoint that has a mapping relationship with the service endpoint of the server device, or that the above-mentioned virtual device refers to a virtual endpoint that has a mapping relationship with the service endpoint of the server device.
  • the above-mentioned virtual device may include a virtual node that has a mapping relationship with a node of the server device, or that the above-mentioned virtual device refers to a virtual node that has a mapping relationship with a node of the server device.
  • the client device and/or the relay device can use the node ID of the server device to achieve accurate control of the server device.
  • the node ID of the server device may 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.
  • the client device can obtain the mapping relationship between the node IDs of the first virtual device and the server device by querying the device information of the first virtual device, thereby achieving accurate control of the server device and improving customer experience.
  • the node ID of the server device may 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 according to the node ID corresponding to the first command, thereby improving customer experience.
  • Embodiment 1 and Embodiment 2 can be used partially or completely in combination, and the embodiments of the present application are not limited to this.
  • Embodiment 1 The node ID of the server device is recorded in the device information of the first virtual device
  • the device information of the first virtual device may refer to the 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.
  • the server device may include one or more service endpoints.
  • the first virtual device may include a virtual endpoint that has a mapping relationship with the service endpoint of the server device (hereinafter, the server device includes the third A service endpoint, the first virtual device includes a first virtual endpoint that has a mapping relationship with the first service endpoint, as an example for illustration).
  • the virtual endpoint (for example, the first virtual endpoint) in the first virtual device may include one or more functional clusters, such as a first functional cluster, a second functional cluster, etc.
  • 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 the attribute list and command list included in the functional cluster.
  • the embodiments of the present application are not limited to this. .
  • 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.
  • the first functional cluster may be any functional cluster in the first virtual endpoint, which is not specifically limited in the embodiments of this application. Several preferred embodiments of the first functional cluster are given below.
  • the first functional cluster may be a functional cluster describing the first virtual endpoint.
  • 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, for example , used to describe the device type information and functional cluster information of the first virtual endpoint.
  • the first functional cluster is a functional cluster used to describe the first virtual endpoint. It can also be understood that the first functional cluster is used to describe the endpoint instance of the first virtual endpoint.
  • the first functional cluster may be an existing functional cluster.
  • the first functional cluster may be a descriptor cluster.
  • the descriptor function cluster can be understood as an existing function cluster, which is used to describe an endpoint in the node.
  • the attributes included in the descriptor function cluster can be seen in Table 4.
  • F means that the field is a fixed value; R means read permission; V means view permission; M means required.
  • the device type list can give 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.
  • the extended color light device type might support device type IDs for dimmable and switch lights because they are a subset of the extended color light.
  • the server list can give all functional cluster IDs on the endpoint that have the server role.
  • the client list can give all functional cluster IDs on the endpoint that have the client role.
  • a refrigerator device type can be defined as consisting of multiple temperature sensor endpoints, a metering endpoint, and two thermostat endpoints.
  • a field may be added to the descriptor function cluster, and the added field may be used to indicate the node ID of the server device corresponding to the first virtual endpoint.
  • the attribute field of the original node identification (for example, represented by OriginNodeID) can be added to indicate.
  • the attributes included in the descriptor functional cluster can be seen in Table 5.
  • O indicates that this attribute is optional, that is, this attribute only exists in some cases (such as in relay equipment).
  • the relay device may set the value of the attribute of the original node identification to the location where the first service endpoint is located.
  • the node ID of the target node or the node ID of the server device).
  • Figure 5 shows a specific example of a relay device mapping an endpoint of a server device.
  • the endpoint EP0 contains relay capabilities such as a relay configuration function cluster and a relay discovery function cluster.
  • the relay device obtains the service endpoint EP1 of the server device (or node of the server device) and the function clusters and function clusters it contains. attribute list, command list and other information.
  • the relay device can create a virtual endpoint EP11, and map all the functional clusters on the endpoint EP1 of the server device and the attribute list and command list it contains to the virtual endpoint EP11.
  • the relay device may set the value of the original node identification attribute 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.
  • the switch (OnOff) function cluster in virtual endpoint EP11 is the same as the switch function cluster of endpoint EP1
  • the label (Label) function cluster in virtual endpoint EP11 is the same as the label function cluster of endpoint EP1
  • the descriptor function cluster also includes the node ID of the server device.
  • the first functional cluster may be a function of a node specifically used to record the server device relayed by the first virtual endpoint (which can be understood as the node where the first service endpoint corresponding to the first virtual endpoint is located).
  • the first functional cluster includes the node ID of the server device relayed by the first virtual endpoint.
  • the first functional cluster may be a newly added functional cluster, which is specially used to record the nodes of the server device relayed by the first virtual endpoint, or in other words, the new functional cluster The cluster is used to specifically record the node ID of the server device.
  • the first functional cluster may be a new functional cluster added by the relay device to the first virtual endpoint after creating the first virtual endpoint and mapping the first service endpoint to the first virtual endpoint.
  • the relay device can add a functional cluster named relayed node (RelayedNode) to the first virtual endpoint.
  • the functional cluster The included attributes can be found in Table 6.
  • the OriginNodeID attribute field may be used to indicate the node ID of the server device where the service endpoint mapped by the first virtual node is located.
  • the value of the attribute identifying the original node in the first functional cluster can be set as the first service The node ID of the server device where the endpoint is located.
  • Figure 6 shows another specific example of a relay device mapping an endpoint of a server device.
  • the endpoint EP0 contains relay capabilities such as a relay configuration function cluster and a relay discovery function cluster.
  • the relay device obtains information such as the service endpoint EP1 of the server device and the function cluster it contains, as well as the attribute list and command list contained in the function cluster.
  • the relay device can create a virtual endpoint EP11, and map all the functional clusters on the endpoint EP1 of the server device and the attribute list and command list it contains to the virtual endpoint EP11.
  • the relay device can add a new functional cluster named relayed node (RelayedNode) in the virtual endpoint EP11, and the node ID of the server device is recorded in the functional cluster.
  • relayed node relayed node
  • the switch (OnOff) function cluster in virtual endpoint EP11 is the same as the switch function cluster of endpoint EP1
  • the label (Label) function cluster in virtual endpoint EP11 is the same as the label function cluster of endpoint EP1
  • the The descriptor function cluster is the same as the descriptor function cluster of the endpoint EP1
  • the virtual endpoint EP11 also includes a function cluster named the relayed node, and the node ID of the server device is recorded in the function cluster.
  • the endpoint information of the first virtual endpoint may also record the network identifier of the network where the server device is located.
  • the network identifier may be recorded in the first functional cluster of the first virtual endpoint (for example, the above descriptor functional cluster or the relayed node functional cluster).
  • the functional cluster may also include a network identification (FabricID) attribute field.
  • the attributes included in the first functional cluster can be found in Table 7 for details.
  • the FabricID attribute field can be used to indicate the network where the server device is located, or it can also be understood as indicating the network where the node of the server device is located.
  • the server device can be uniquely associated by combining the node ID of the server device and the network identifier of the network where the server device is located.
  • the first command when the client device sends the first command to the relay device, the first command may be associated with the first command path information block.
  • the encoded information of the first command path information block may include 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.
  • the encoding information of the first command path information block may be expressed as: ⁇ endpoint identification of the first virtual endpoint>/ ⁇ identification of the functional cluster where the first command is located>/ ⁇ identification of the first command>.
  • 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 recipient of the first command. node.
  • the first command when the relay device forwards the first command to the server device, the first command may 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.
  • the encoding information of the second command path information block may 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>.
  • 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 and the server device, and then accurately sends the first command to the relay device according to the mapping relationship.
  • the virtual device for example, the first virtual device
  • FIG. 7 is a schematic flowchart of a command transmission method provided by another embodiment of the present application. As shown in Figure 7, the method of Figure 7 may include steps S710 to S740. These steps are described below.
  • step S710 the client device sends a first message to the relay device, where the first message is used to query the first functional cluster.
  • the first functional cluster refers to a functional cluster in the relay device that records the node ID of the server device.
  • the first functional cluster may refer to the functional cluster mentioned above for describing the first virtual endpoint, for example, the descriptor functional cluster.
  • the first functional cluster may refer to the functional cluster mentioned above that is specially used to record the node to which the first virtual endpoint is relayed, for example, the relayed node functional cluster.
  • step S720 the relay device sends a first response to the client device, where the first response includes the information of the above-mentioned first functional cluster.
  • the first response may mean that the relay device returns the first functional cluster to the client device.
  • the client device may obtain the server device corresponding to the first virtual endpoint according to the attribute field in the first functional cluster. Node ID.
  • the client device may directly request to query the attribute field used to record the node ID of the server device in the first functional cluster. For example, directly request to query the first functional cluster. The original node identification attribute in the functional cluster to obtain the node ID of the server device.
  • 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.
  • the client device only displays the server device corresponding to the node identifier for convenience. User control.
  • step S730 the client device sends a first command to the relay device.
  • step S740 the relay device forwards the first command to the server device.
  • step S730 and step S740 please refer to the previous description of step S410 and step S420, which will not be described again here.
  • the client device 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 direct connection between the first virtual endpoint and the client device based on the node ID of the server device.
  • the pointing relationship between connected server devices can be used by the client device to display the server device corresponding to the node identifier according to the node identifier. For example, the client device only displays the server device corresponding to the node identifier to facilitate user control.
  • the method shown in Figure 7 may further include step S725.
  • step S725 the client device establishes a pointing relationship between the first virtual endpoint and the server device directly connected to the client device according to the node ID of the server device.
  • the server device is smart air conditioner A.
  • the client device When the connection is discovered locally, the client device has established a control relationship with the server device and displays the server device in the client device's controllable device list (controllable device).
  • the list can be used to indicate information about server devices directly connected to the client device).
  • the client device When the client device discovers the first virtual endpoint whose device type is an air conditioner through the relay device, and the value of the attribute field in the first virtual endpoint used to record the node ID of the server device is the same as the value of the previously locally connected smart air conditioner A If the node IDs are the same, 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. .
  • the endpoint information of the first virtual endpoint also records the network identifier of the network where the server device is located, the network identifier and the node ID of the server device can be combined to uniquely associate the server device.
  • the network identifier of the network where the server device is located may also be considered.
  • 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 where the actual server device is located to determine whether there is a match.
  • 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.
  • the first virtual device may include a virtual node that has a mapping relationship with the server device (the first virtual node is used as an example for description below).
  • a virtual node (eg, a first virtual node) in the first virtual device may include one or more endpoints (eg, a service endpoint), and each endpoint may include one or more functional clusters, such as First functional cluster, second functional cluster, etc.
  • the relay device can create a first virtual node corresponding to the server device, and map the node of the server device to the first virtual node.
  • Figure 8 shows a specific example of a relay device mapping a node of a server device.
  • the relay device includes the original node Node0, that is, the node that provides relay services.
  • the original node Node0 of the relay device contains 3 endpoints.
  • the relay device can obtain 2 service endpoints EP1 and EP2 among the 3 endpoints of the node Node0 of the server device, as well as two services Information such as the functional clusters contained in endpoints EP1 and EP2, the attribute list and command list contained in the functional clusters.
  • the relay device can create a virtual node Node1, and map the endpoints EP1 and EP2 on the node Node0 of the server device and the functional clusters they contain, as well as the attribute list and command list contained in the functional clusters, to the virtual node Node1.
  • the virtual node Node1 contains two service endpoints EP1 and EP2 in the node Node0 of the server device.
  • the embodiments of the present application are not limited to this.
  • the relay device can connect all endpoints of the node Node0 of the server device (3 endpoints in this example), as well as the function clusters and functions contained in all endpoints.
  • the attribute list, command list and other information contained in the cluster are mapped to the virtual node Node1.
  • 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 relay configuration cluster.
  • the target node or target list, TargetList field.
  • the relay configuration cluster included in the relay device can be used to allow users to configure the server devices that the relay device relays.
  • the attributes included in the relay configuration cluster can be seen in Table 8.
  • N means that the attribute is non-volatile and remains valid after the device is restarted.
  • W means write permission.
  • ConfigurationStruct can include The fields that ConfigurationStruct can include can be found in Table 9.
  • the network identifier is used to indicate the index of the network where the device is located.
  • the target list is a list indicating node IDs of server devices to which the relay device relays.
  • the relay device may extend the encoding information of the command path information block of its own command. Specifically, a first element (node element) may be added to the encoding information of the command path information block. The first element may be used to indicate node information of the server device corresponding to the command sent to the relay device.
  • the content of the encoding information of the command path information block can be seen in Table 10.
  • Tag type tag number TLV type scope
  • Node contextual tags 0 unsigned integer 64 bits
  • Endpoint contextual tags 1 unsigned integer 16 bits
  • Cluster (functional cluster) contextual tags 2 unsigned integer 32 bits
  • Command contextual tags 3 unsigned integer 32 bits
  • the relay device 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 server device. Forwarded to the corresponding server device.
  • the relay device can determine whether the command is sent to the center based on the node ID recorded in the "node" element in the encoding information of the command path information block. The first virtual node in the relay device, and then forwards the command to the corresponding server device according to the mapping relationship between the first virtual node and the node of the server device.
  • the relay device can directly determine whether the command is sent based on the node ID recorded in the "node" element in the encoding information of the command path information block. Which server device it is for, and forward the command to the corresponding server device.
  • the first command when the client device sends the first command to the relay device, the first command may be associated with the 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.
  • the encoding information of the third command path information block can be expressed as: ⁇ node ID of the server device>/ ⁇ endpoint identification of the endpoint where the first command is located>/ ⁇ identification of the functional cluster where the first command is located>/ ⁇ first command The logo>.
  • the path node corresponding to the first command sent by the client device to the relay device is the relay device node, and the relay device node can be understood as the original node of the relay device.
  • the relay device when the relay device forwards the first command to the server device, the first command may be associated with the fourth command path information block.
  • the encoding information of the fourth command path information block may include an endpoint identifier of the endpoint where the first command is located, an identifier of the functional cluster where the first command is located, and an identifier of the first command.
  • 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>/ ⁇ identification of the functional cluster where the first command is located>/ ⁇ identification of the first command>.
  • FIG. 9 is a schematic flowchart of a command transmission method provided by yet another embodiment of the present application. As shown in Figure 9, the method in Figure 9 may also include steps S910 to S940. These steps are described below.
  • step S910 the client device sends a second message to the relay device.
  • the second message is used to query the target node information in the relay configuration cluster.
  • the target node information records the node ID of the server device.
  • the target node information may refer to information related to the target list mentioned above, and the target list may record the node IDs of one or more relayed server devices.
  • step S920 the relay device sends the target node information to the client device.
  • 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 that commands can be forwarded through the relay device.
  • 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, the client device only displays the server device corresponding to the node identifier to facilitate user control.
  • step S930 the client device sends a first command to the relay device.
  • step S940 the relay device forwards the first command to the server device.
  • step S930 and step S940 please refer to the previous description of step S410 and step S420, which will not be described again here.
  • the client device 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 direct connection between the first virtual node and the client device based on the node ID of the server device.
  • the pointing relationship between connected server devices can be used by the client device to display the server device corresponding to the node identifier according to the node identifier. For example, the client device only displays the server device corresponding to the node identifier to facilitate user control.
  • the method shown in Figure 9 may further include step S925.
  • step S925 the client device establishes a pointing relationship between the first virtual node and the server device directly connected to the client device according to the node ID of the server device.
  • the server device is smart air conditioner A.
  • the client device When the connection is discovered locally, the client device has established a control relationship with the server device and displays the server device in the controllable device list of the client device.
  • 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, then The client device can point the first virtual node of the relay device to the 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.
  • the relay device, client device, and server device may all be in the same network. In some embodiments, the relay device, client device, and server device may be located in different networks, which is not limited in the embodiments of the present application.
  • 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 are not limited to this. .
  • the server device may refer to a smart home device in the user's home, for example, the relay device may refer to a router, and the user may act as a client through an APP on the terminal device (that is, the client device is a terminal device) Realize the control of smart home devices through the router.
  • the relay device may refer to a router
  • the user may act as a client through an APP on the terminal device (that is, the client device is a terminal device) Realize the control of smart home devices through the router.
  • FIG. 10 is a schematic flowchart of a command transmission method provided by yet another embodiment of the present application.
  • the method shown in FIG. 10 may include steps S1010 to S1080.
  • step S1010 the relay device obtains information about the first service endpoint of the server device.
  • the server device can be understood as a relayed target device corresponding to the relay device, or a target server device.
  • the relay device can read the information of nodes, endpoints, and functional clusters of the server device, and initiate a subscription request to the business function cluster in the server device to request to subscribe to the information contained in the business function cluster.
  • Property list and command list can be read from the server device, and initiate a subscription request to the business function cluster in the server device to request to subscribe to the information contained in the business function cluster.
  • the server device can send the attribute list and command list included in the business function cluster to the relay device.
  • step S1020 the relay device creates a first virtual endpoint.
  • the first virtual endpoint has a mapping relationship with the above-mentioned first service endpoint.
  • the relay device can map all functional clusters of the first service endpoint and the attributes and commands it contains to the created first virtual endpoint.
  • the relay device may set the original node identification (OriginNodeID) attribute value of the descriptor function cluster in the first virtual endpoint to the node ID of the server device.
  • OEM original node identification
  • step S1030 the client device queries the endpoint information of the first virtual endpoint.
  • 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.
  • step S1040 the relay device returns the descriptor function cluster attribute of the first virtual endpoint to the client device.
  • step S1050 the client device obtains the 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.
  • the client device can 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.
  • 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.
  • 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.
  • the client device passes If the relay device discovers an endpoint whose device type is an air conditioner, 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 transfer the corresponding endpoint (first virtual endpoint) of the relay device to Point to smart air conditioner A in the controllable device list.
  • step S1070 the client device sends a first command to the first virtual endpoint of the relay device.
  • the node of the path corresponding to the first command is a relay device node.
  • the encoding information of the command path information block corresponding to the first command includes ⁇ endpoint identification of the first virtual endpoint>/ ⁇ identification of the functional cluster where the first command is located>/ ⁇ th The identifier of a command>.
  • step S1080 the relay device forwards the first command to the server device.
  • the relay device may forward the first command to the server device according to the mapping relationship (or relay relationship) between the first virtual endpoint and the first service endpoint. Specifically, the relay device may send the first command 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 ⁇ first Endpoint identification of the business endpoint>/ ⁇ Identity of the functional cluster where the first command is located>/ ⁇ Identity of the first command>.
  • FIG. 11 is a schematic flowchart of a command transmission method provided by yet another embodiment of the present application.
  • the method shown in FIG. 11 may include steps S1110 to S1190.
  • step S1110 the relay device obtains the information of the first service endpoint of the server device.
  • step S1120 the relay device creates a first virtual endpoint.
  • the relay device For the first service endpoint of the server device, the relay device creates a first virtual endpoint, and the first virtual endpoint has a mapping relationship with the first service endpoint. In other words, the relay device can map all functional clusters of the first service endpoint and the attributes and commands they contain to the first virtual endpoint.
  • the relay device can add a first functional cluster to the first virtual endpoint.
  • the first functional cluster is a new functional cluster.
  • the new functional cluster is used to specifically record the server device relayed by the first virtual endpoint. node information.
  • step S1130 the client device queries the information of the first functional cluster.
  • 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.
  • step S1140 the relay device returns the attributes of the first functional cluster to the client device.
  • 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.
  • the client device can also directly query the original node identification attribute in the first functional cluster to obtain the node ID of the server device.
  • 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, the client device obtains the network identifier of the network where the server device is located.
  • 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.
  • 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.
  • the client device passes If the relay device discovers an endpoint whose device type is an air conditioner, 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 transfer the corresponding endpoint (first virtual endpoint) of the relay device to Point to smart air conditioner A in the controllable device list.
  • the obtained 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 there is a match, where, The identity of the network where the original node is located is obtained from the network identity attribute in the first functional cluster of the first virtual endpoint.
  • step S1180 the client device sends a first command to the first virtual endpoint of the relay device.
  • the node of the path corresponding to the first command is a relay device node.
  • the encoding information of the command path information block corresponding to the first command includes ⁇ endpoint identification of the first virtual endpoint>/ ⁇ identification of the functional cluster where the first command is located>/ ⁇ th The identifier of a command>.
  • step S1190 the relay device forwards the first command to the server device.
  • the relay device may forward the first command to the server device according to the mapping relationship (or relay relationship) between the first virtual endpoint and the first service endpoint. Specifically, the relay device may send the first command 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 ⁇ first Endpoint identification of the business endpoint>/ ⁇ Identity of the functional cluster where the first command is located>/ ⁇ Identity of the first command>.
  • FIG. 12 is a schematic flowchart of a command transmission method provided by yet another embodiment of the present application.
  • the method shown in FIG. 12 may include steps S1210 to S1280.
  • step S1210 the relay device obtains node information of the server device, and the node ID of the server device is AAA.
  • step S1220 the relay device creates a first virtual node.
  • the relay device For the node of the server device, the relay device creates a first virtual node, and maps the business endpoint contained in the node of the server device (as well as all the functional clusters contained in the business endpoint and the attributes and commands it contains) to the first virtual node .
  • the relay device can establish an association between the first virtual node and the node ID of the server device, that is, establish an association between the first virtual node and the node ID AAA.
  • 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.
  • the client device can view the endpoint EP0 in the original node.
  • the device type of the endpoint EP0 is "root node”.
  • the endpoint EP0 includes the relay configuration function cluster mentioned above.
  • 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.
  • step S1240 the relay device returns the target node list of the target list attribute to the client device.
  • 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.
  • 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.
  • the client device has established a control relationship with the device when the connection is discovered locally, and displays the device in the controllable device list of the client device.
  • the node ID AAA is obtained in the target node list of the device, and AAA is the same as the node ID of the previously locally connected smart air conditioner A, then the client device can point the corresponding node (first virtual node) of the relay device to the controllable device list Smart air conditioner in A.
  • step S1270 the client device sends the first command to the original node of the relay device.
  • the node of the path corresponding to the first command is a relay device node.
  • 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>/ ⁇ first The identifier of the functional cluster where the command is located>/ ⁇ the identifier of the first command>.
  • step S1280 the relay device forwards the first command to the server device.
  • the relay device can determine that the first command is sent to the first virtual node according to the mapping relationship (or association relationship) between the first virtual node and the node ID AAA, and determine the first command according to the first virtual node.
  • the mapping relationship between the virtual node and the server device forwards the first command to the server device.
  • 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 where the first command is located The endpoint identifier>/ ⁇ the identifier of the functional cluster where the first command is located>/ ⁇ the identifier of the first command>.
  • Figure 13 is a schematic structural diagram of a relay device provided by an embodiment of the present application.
  • the relay device 1300 shown in Figure 13 can be used for command transmission.
  • the relay device 1300 includes a first receiving module 1310 and a first sending module 1320.
  • the first receiving module 1310 may be used to receive the first command sent by the client device.
  • the first sending module 1320 may be used to forward the first command to the server device, where 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 the encoding information of the command path information block corresponding to the first command.
  • the server device includes a first service endpoint
  • the first virtual device includes a first virtual endpoint that has a mapping relationship with the first service endpoint
  • the node identification is recorded in the endpoint of the first virtual endpoint. information.
  • the first virtual endpoint includes a first functional cluster, and the node identification is recorded in the first functional cluster; wherein the first functional cluster is one of the following functional clusters: used to describe the A functional cluster of the first virtual endpoint; and a functional cluster dedicated to recording the node to which the first virtual endpoint is relayed.
  • the relay device 1300 further includes: a second receiving module, configured to receive a first message sent by the client device, where the first message is used to query the first functional cluster; a second sending module, Used to send a first response to the client device, where the first response contains information about the first functional cluster.
  • 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.
  • the endpoint information of the first virtual endpoint records the network identifier of the network where the server device is located.
  • the first command received by the relay device is associated with a first command path information block
  • the encoding information of the first command path information block includes the endpoint identification of the first virtual endpoint, and the The identifier of the functional cluster where the first command is located, and the identifier of the first command
  • the first command sent by the relay device to the server device is associated with the second command path information block, so
  • 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.
  • the first virtual device includes a first virtual node that has a mapping relationship with the server device.
  • the relay device 1300 further includes: a third receiving module, configured to receive a second message sent by the client device, where the second message is used to query the target node information in the relay configuration cluster, the The target node information is recorded with the node identifier; a third sending module is used to send the target node information to the client device.
  • a third receiving module configured to receive a second message sent by the client device, where the second message is used to query the target node information in the relay configuration cluster, the The target node information is recorded with the node identifier; a third sending module is used to send the target node information to the client device.
  • 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.
  • the first command received by the relay device is associated with a third command path information block
  • the encoding information of the third command path information block includes the node identifier, and the endpoint where the first command is located
  • FIG. 14 is a schematic structural diagram of a client device provided by an embodiment of the present application.
  • the client device 1400 shown in FIG. 14 can be used for command transmission, and the client device 1400 includes a first sending module 1410.
  • the first sending module 1410 may be used to send a first command to the relay device.
  • the first command is used to control the server device.
  • the first command is forwarded to the server device through the relay device. ; wherein the node identification 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 the same as all the relay devices in the relay device.
  • the server device has a virtual device with a mapping relationship; and the encoding information of the command path information block corresponding to the first command.
  • the server device includes a first service endpoint
  • the first virtual device includes a first virtual endpoint that has a mapping relationship with the first service endpoint
  • the node identification is recorded in the endpoint of the first virtual endpoint. information.
  • the first virtual endpoint includes a first functional cluster, and the node identification is recorded in the first functional cluster; wherein the first functional cluster is one of the following functional clusters: used to describe the A functional cluster of the first virtual endpoint; and a functional cluster dedicated to recording the node to which the first virtual endpoint is relayed.
  • the client device 1400 further includes: a second sending module 1420, used to send a first message to the relay device, where the first message is used to query the first functional cluster; a first receiving module, Used to receive a first response sent by the relay device, where the first response contains information about the first functional cluster.
  • a second sending module 1420 used to send a first message to the relay device, where the first message is used to query the first functional cluster
  • a first receiving module Used to receive a first response sent by the relay device, where the first response contains information about the first functional cluster.
  • the endpoint information of the first virtual endpoint records the network identifier of the network where the server device is located.
  • 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 first virtual endpoint.
  • the client device 1400 further includes: a first establishment module, configured to establish a pointing relationship between the first virtual endpoint and the server device directly connected to the client device according to the node identifier.
  • a first establishment module configured to establish a pointing relationship between the first virtual endpoint and the server device directly connected to the client device according to the node identifier.
  • the pointing relationship is used for the client device to display the server device corresponding to the node identifier according to the node identifier.
  • the first virtual device includes a first virtual node that has a mapping relationship with the server device.
  • the client device 1400 further includes: a third sending module, 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.
  • the target The node information is recorded with the node identifier; the second receiving module is used to receive the target node information sent by the relay device.
  • 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, and the 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 message sent by the relay device to the server device.
  • the command is associated with a fourth command path information block, and the encoding information of the fourth command path information block includes an endpoint identifier of the endpoint where the first command is located, an identifier of the functional cluster where the first command is located, and the first command logo.
  • the client device 1400 further includes: a second establishment module, configured to establish a pointing relationship between the first virtual node and the server device directly connected to the client device according to the node identifier.
  • a second establishment module configured to establish a pointing relationship between the first virtual node and the server device directly connected to the client device according to the node identifier.
  • the pointing relationship is used for the client device to display the server device corresponding to the node identifier according to the node identifier.
  • FIG 15 is a schematic structural diagram of a server device provided by an embodiment of the present application.
  • the server device 1500 shown in Figure 15 can be used for command transmission.
  • the server device 1500 includes a receiving module 1510.
  • the receiving module 1510 may be used to receive the first command sent by the relay device, which is forwarded by the client device to the server device through the relay device; wherein, the node identifier of the server device 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; The encoding information of the command path information block corresponding to the first command.
  • the server device includes a first service endpoint
  • the first virtual device includes a first virtual endpoint that has a mapping relationship with the first service endpoint
  • the node identification is recorded in the endpoint of the first virtual endpoint. information.
  • the first virtual endpoint includes a first functional cluster, and the node identification is recorded in the first functional cluster; wherein the first functional cluster is one of the following functional clusters: used to describe the A functional cluster of the first virtual endpoint; and a functional cluster dedicated to recording the node to which the first virtual endpoint is relayed.
  • the endpoint information of the first virtual endpoint records the network identifier of the network where the server device is located.
  • 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 identification of the first virtual endpoint, and the 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 second command path
  • the encoded information of the 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.
  • the first virtual device includes a first virtual node that has a mapping relationship with the server device.
  • the first command received by the relay device is associated with a third command path information block
  • the encoding information of the third command path information block includes the node identifier, and the endpoint where the first command is located
  • the first command received by the server device is associated with the fourth command path information block
  • 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.
  • Figure 16 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • the dashed line in Figure 16 indicates that the unit or module is optional.
  • the device 1600 can be used to implement the method described in the above method embodiment.
  • Device 1600 may be a chip, terminal device or network device.
  • Apparatus 1600 may include one or more processors 1610.
  • the processor 1610 can support the device 1600 to implement the method described in the foregoing method embodiments.
  • the processor 1610 may be a general-purpose processor or a special-purpose processor.
  • the processor may be a central processing unit (CPU).
  • the processor can also be another general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), or an off-the-shelf programmable gate array (FPGA) Or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA off-the-shelf programmable gate array
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • Apparatus 1600 may also include one or more memories 1620.
  • the memory 1620 stores a program, which can be executed by the processor 1610, so that the processor 1610 executes the method described in the foregoing method embodiment.
  • the memory 1620 may be independent of the processor 1610 or integrated in the processor 1610.
  • Apparatus 1600 may also include a transceiver 1630.
  • Processor 1610 may communicate with other devices or chips through transceiver 1630.
  • the processor 1610 can transmit and receive data with other devices or chips through the transceiver 1630.
  • An embodiment of the present application also provides a computer-readable storage medium for storing a program.
  • the computer-readable storage medium can be applied in the terminal or network device provided by the embodiments of the present application, and the program causes the computer to execute the methods performed by the terminal or network device in various embodiments of the present application.
  • An embodiment of the present application also provides a computer program product.
  • the computer program product includes a program.
  • the computer program product can be applied in the terminal or network device provided by the embodiments of the present application, and the program causes the computer to execute the methods performed by the terminal or network device in various embodiments of the present application.
  • An embodiment of the present application also provides a computer program.
  • the computer program can be applied to the terminal or network device provided by the embodiments of the present application, and the computer program causes the computer to execute the methods performed by the terminal or network device in various embodiments of the present application.
  • the "instruction" mentioned may be a direct instruction, an indirect instruction, or an association relationship.
  • a indicates B which can mean that A directly indicates B, for example, B can be obtained through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also mean that there is an association between A and B. relation.
  • B corresponding to A means that B is associated with A, and B can be determined based on A.
  • determining B based on A does not mean determining B only based on A.
  • B can also be determined based on A and/or other information.
  • the term "correspondence” can mean that there is a direct correspondence or indirect correspondence between the two, or it can also mean that there is an association between the two, or it can also mean indicating and being instructed, configuring and being configured, etc. relation.
  • predefinition or “preconfiguration” can be achieved by pre-saving corresponding codes, tables or other methods that can be used to indicate relevant information in devices (for example, including terminal devices and network devices).
  • devices for example, including terminal devices and network devices.
  • predefined can refer to what is defined in the protocol.
  • the "protocol” may refer to a standard protocol in the communication field, which may include, for example, LTE protocol, NR protocol, and related protocols applied in future communication systems. This application does not limit this.
  • the size of the sequence numbers of the above-mentioned processes does not mean the order of execution.
  • the execution order of each process should be determined by its functions and internal logic, and should not be determined by the implementation process of the embodiments of the present application. constitute any limitation.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transferred from a website, computer, server, or data center Transmission to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means.
  • the computer-readable storage medium may be any available medium that can be read by a computer or a data storage device such as a server or data center integrated with one or more available media.
  • the available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs (DVD)) or semiconductor media (e.g., solid state disks (SSD) )wait.
  • magnetic media e.g., floppy disks, hard disks, magnetic tapes
  • optical media e.g., digital video discs (DVD)
  • semiconductor media e.g., solid state disks (SSD)

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

Provided are a command transmission method and apparatus, a chip, a storage medium, and a computer program. The method comprises: a relay device receiving a first command sent by a client device; the relay device forwarding the first command to a server device, a node identifier of the server device being recorded in one or more of the following items of information: device information of a first virtual device, the first virtual device being a virtual device in the relay device having a mapping relationship with the server device; encoding information of a command path information block corresponding to the first command. In the embodiments of the present application, the node identifier of the server device can be recorded in the first virtual device of the relay device or 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 accurately control the server device, thereby improving a customer experience.

Description

命令的传输方法、装置、芯片、存储介质和计算机程序Command transmission method, device, chip, storage medium and computer program 技术领域Technical field
本申请涉及物联网技术领域,并且更为具体地,涉及一种命令的传输方法、装置、芯片、存储介质和计算机程序。The present application relates to the technical field of the Internet of Things, and more specifically, to a command transmission method, device, chip, storage medium and computer program.
背景技术Background technique
在某些场景(比如,客户端设备离开服务端设备所在的通信网络)下,客户端设备可以通过中继设备向服务端设备发送命令,以对服务端设备进行控制。这种情况下,客户端设备如何利用中继设备实现对服务端设备的准确控制,是亟需解决的问题。In certain scenarios (for example, the client device leaves the communication network where the server device is located), the client device can send commands to the server device through the relay device to control the server device. In this case, how the client device uses the relay device to accurately control the server device is an issue that needs to be solved urgently.
发明内容Contents of the invention
本申请提供一种命令的传输方法、装置、芯片、存储介质和计算机程序。下面对本申请涉及的各个方面进行介绍。This application provides a command transmission method, device, chip, storage medium and computer program. Each aspect involved in this application is introduced below.
第一方面,提供了一种命令的传输方法,包括:中继设备接收客户端设备发送的第一命令;所述中继设备向服务端设备转发所述第一命令;其中,所述服务端设备的节点标识记录在以下一种或多种信息之中:第一虚拟设备的设备信息,其中,所述第一虚拟设备为所述中继设备中的与所述服务端设备具有映射关系的虚拟设备;所述第一命令对应的命令路径信息块的编码信息。In a first aspect, a command transmission method is provided, including: a relay device receiving a first command sent by a client device; the relay device forwarding the first command to a server device; wherein, the server The node identification of the device is recorded in one or more of the following information: device information of the first virtual device, where the first virtual device is one of the relay devices that has a mapping relationship with the server device. Virtual device; encoding information of the command path information block corresponding to the first command.
第二方面,提供了一种命令的传输方法,包括:客户端设备向中继设备发送第一命令,所述第一命令用于对服务端设备进行控制,所述第一命令是通过所述中继设备转发给所述服务端设备的;其中,所述服务端设备的节点标识记录在以下一种或多种信息之中:第一虚拟设备的设备信息,其中,所述第一虚拟设备为所述中继设备中的与所述服务端设备具有映射关系的虚拟设备;所述第一命令对应的命令路径信息块的编码信息。In a second aspect, a command transmission method is provided, including: the client device sends a first command to the relay device, the first command is used to control the server device, and the first command is transmitted through the forwarded by the relay device 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, where the first virtual device It is a virtual device in the relay device that has a mapping relationship with the server device; and the encoding information of the command path information block corresponding to the first command.
第三方面,提供了一种命令的传输方法,包括:服务端设备接收中继设备发送的第一命令,所述第一命令是客户端设备通过所述中继设备转发给所述服务端设备的;其中,所述服务端设备的节点标识记录在以下一种或多种信息之中:第一虚拟设备的设备信息,其中,所述第一虚拟设备为所述中继设备中的与所述服务端设备具有映射关系的虚拟设备;所述第一命令对应的命令路径信息块的编码信息。In a third aspect, a command transmission method is provided, including: a server device receiving a first command sent by a relay device, and the first command is forwarded by the client device to the server device through the relay device. ; wherein the node identification 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 the same as all the relay devices in the relay device. The server device has a virtual device with a mapping relationship; and the encoding information of the command path information block corresponding to the first command.
第四方面,提供了一种命令的传输装置,所述装置配置于中继设备,所述中继设备包括:第一接收模块,用于接收客户端设备发送的第一命令;第一发送模块,用于向服务端设备转发所述第一命令;其中,所述服务端设备的节点标识记录在以下一种或多种信息之中:第一虚拟设备的设备信息,其中,所述第一虚拟设备为所述中继设备中的与所述服务端设备具有映射关系的虚拟设备;所述第一命令对应的命令路径信息块的编码信息。In a fourth aspect, a command transmission device is provided. The device is configured in a relay device. The relay device includes: a first receiving module for receiving the first command sent by the client device; a first sending module , 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 The virtual device is a virtual device in the relay device that has a mapping relationship with the server device; the encoding information of the command path information block corresponding to the first command.
第五方面,提供了一种命令的传输装置,所述装置配置于客户端设备,所述客户端设备包括:第一发送模块,用于向中继设备发送第一命令,所述第一命令用于对服务端设备进行控制,所述第一命令是通过所述中继设备转发给所述服务端设备的;其中,所述服务端设备的节点标识记录在以下一种或多种信息之中:第一虚拟设备的设备信息,其中,所述第一虚拟设备为所述中继设备中的与所述服务端设备具有映射关系的虚拟设备;所述第一命令对应的命令路径信息块的编码信息。In a fifth aspect, a command transmission device is provided. The device is configured on a client device. The client device includes: a first sending module for sending a first command to a relay device. The first command Used to control the server device, the first command is forwarded to the server device through the relay device; wherein the node identification of the server device is recorded in one or more of the following information: Center: 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; the command path information block corresponding to the first command encoded information.
第六方面,提供了一种命令的传输装置,所述装置配置于服务端设备,所述服务端设备包括:接收模块,用于接收中继设备发送的第一命令,所述第一命令是客户端设备通过所述中继设备转发给所述服务端设备的;其中,所述服务端设备的节点标识记录在以下一种或多种信息之中:第一虚拟设备的设备信息,其中,所述第一虚拟设备为所述中继设备中的与所述服务端设备具有映射关系的虚拟设备;所述第一命令对应的命令路径信息块的编码信息。In a sixth aspect, a command transmission device is provided. The device is configured on a server device. The server device includes: a receiving module configured to receive a first command sent by a relay device. The first command is The client device forwards it 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; the encoding information of the command path information block corresponding to the first command.
第七方面,提供了一种命令的传输装置,所述装置配置于中继设备,所述中继设备包括处理器、存储器以及通信接口,所述存储器用于存储一个或多个计算机程序,所述处理器用于调用所述存储器中的计算机程序使得所述中继设备执行第一方面的方法中的部分或全部步骤。In a seventh aspect, a command transmission device is provided. The device is configured in a relay device. The relay device includes a processor, a memory, and a communication interface. The memory is used to store one or more computer programs. The processor is configured to call a computer program in the memory so that the relay device performs some or all of the steps in the method of the first aspect.
第八方面,提供了一种命令的传输装置,所述装置配置于客户端设备,所述客户端设备包括处理器、存储器以及通信接口,所述存储器用于存储一个或多个计算机程序,所述处理器用于调用所述存储器中的计算机程序使得所述客户端设备执行第二方面的方法中的部分或全部步骤。In an eighth aspect, a command transmission device is provided. The device is configured on a client device. The client device includes a processor, a memory, and a communication interface. The memory is used to store one or more computer programs. The processor is configured to call a computer program in the memory so that the client device executes some or all of the steps in the method of the second aspect.
第九方面,提供了一种命令的传输装置,所述装置配置于服务端设备,所述服务端设备包括处理器、存储器以及通信接口,所述存储器用于存储一个或多个计算机程序,所述处理器用于调用所述存储器中的计算机程序使得所述服务端设备执行第三方面的方法中的部分或全部步骤。In a ninth aspect, a command transmission device is provided. The device is configured on a server device. The server device includes a processor, a memory, and a communication interface. The memory is used to store one or more computer programs. The processor is configured to call a computer program in the memory to cause the server device to execute some or all of the steps in the method of the third aspect.
第十方面,本申请实施例提供了一种通信系统,该系统包括上述的中继设备、客户端设备和服务端设备中的一种或多种。在另一种可能的设计中,该系统还可以包括本申请实施例提供的方案中与该中继设备、客户端设备或服务端设备进行交互的其他设备。In a tenth aspect, embodiments of the present application provide a communication system, which includes one or more of the above-mentioned relay devices, client devices, and server devices. In another possible design, the system may also include other devices that interact with the relay device, client device, or server device in the solution provided by the embodiments of the present application.
第十一方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序使得中继设备、客户端设备或服务端设备执行上述各个方面的方法中的部分或全部步骤。In an eleventh aspect, embodiments of the present application provide a computer-readable storage medium that stores a computer program. The computer program causes a relay device, a client device, or a server device to execute each of the above. Some or all of the steps in a method.
第十二方面,本申请实施例提供了一种计算机程序产品,其中,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使中继设备、客户端设备或服务端设备执行上述各个方面的方法中的部分或全部步骤。在一些实现方式中,该计算机程序产品可以为一个软件安装包。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, and the computer program is operable to cause the relay device to , the client device or the server device performs some or all of the steps in the methods of the above aspects. In some implementations, the computer program product can be a software installation package.
第十三方面,本申请实施例提供了一种芯片,该芯片包括存储器和处理器,处理器可以从存储器中调用并运行计算机程序,以实现上述各个方面的方法中所描述的部分或全部步骤。In a thirteenth aspect, embodiments of the present application provide 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. .
本申请实施例中,服务端设备的节点标识可以记录在中继设备中的第一虚拟设备中,使得客户端设备可以通过查询第一虚拟设备和服务端设备的节点标识的映射关系来实现对服务端设备的准确控制;或者,服务端设备的节点标识可以记录在第一命令对应的命令路径信息块的编码信息中,使得中继设备可以根据第一命令对应的节点标识将第一命令准确地转发给服务端设备,提升客户体验。In this 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 realize the mapping relationship by querying the mapping relationship between the node identifiers of the first virtual device and the server device. Accurate control of the server device; or, the node identification 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 control the first command according to the node identification corresponding to the first command. It is forwarded directly to the server device to improve customer experience.
附图说明Description of the drawings
图1为本申请实施例适用的Matter设备的模型结构的示意图。Figure 1 is a schematic diagram of the model structure of a Matter device applicable to the embodiment of the present application.
图2为本申请实施例适用的通信系统的系统架构示例图。FIG. 2 is an example system architecture diagram of a communication system applicable to the embodiment of the present application.
图3为中继通信机制适用的通信系统的系统架构示例图。Figure 3 is an example system architecture diagram of a communication system to which the relay communication mechanism is applicable.
图4为本申请一实施例提供的命令的传输方法的流程示意图。FIG. 4 is a schematic flowchart of a command transmission method provided by an embodiment of the present application.
图5示出了中继设备映射服务端设备的端点的一个示例。Figure 5 shows an example in which a relay device maps an endpoint of a server device.
图6示出了中继设备映射服务端设备的端点的另一个示例。Figure 6 shows another example of a relay device mapping an endpoint of a server device.
图7为本申请另一实施例提供的命令的传输方法的流程示意图。FIG. 7 is a schematic flowchart of a command transmission method provided by another embodiment of the present application.
图8示出了中继设备映射服务端设备的节点的一个示例。Figure 8 shows an example in which a relay device maps a node of a server device.
图9为本申请又一实施例提供的命令的传输方法的流程示意图。FIG. 9 is a schematic flowchart of a command transmission method provided by yet another embodiment of the present application.
图10为本申请又一实施例提供的命令的传输方法的流程示意图。Figure 10 is a schematic flowchart of a command transmission method provided by yet another embodiment of the present application.
图11为本申请又一实施例提供的命令的传输方法的流程示意图。Figure 11 is a schematic flowchart of a command transmission method provided by yet another embodiment of the present application.
图12为本申请又一实施例提供的命令的传输方法的流程示意图。Figure 12 is a schematic flowchart of a command transmission method provided by yet another embodiment of the present application.
图13为本申请实施例提供的中继设备的结构示意图。Figure 13 is a schematic structural diagram of a relay device provided by an embodiment of the present application.
图14为本申请实施例提供的客户端设备的结构示意图。Figure 14 is a schematic structural diagram of a client device provided by an embodiment of the present application.
图15为本申请实施例提供的服务端设备的结构示意图。Figure 15 is a schematic structural diagram of a server device provided by an embodiment of the present application.
图16为本申请实施例提供的通信装置的示意性结构图。Figure 16 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请中的技术方案进行描述。为了便于理解,下文结合图1至图3介绍本申请实施例涉及的术语。需要说明的是,下文以Matter协议的场景为例,介绍本申请实施例涉及的术语,以及本申请实施例的方案。当然,本申请实施例的方案还可以应用于其他物联网协议。The technical solutions in this application will be described below with reference to the accompanying drawings. For ease of understanding, terminology involved in the embodiments of the present application is introduced below with reference to FIGS. 1 to 3 . It should be noted that the following uses the Matter protocol scenario as an example to introduce the terminology involved in the embodiments of the present application and the solutions of the embodiments of the present application. Of course, the solutions in the embodiments of this application can also be applied to other Internet of Things protocols.
物联网(internet of things,IoT)即“万物相连的互联网”,其是在互联网基础上延伸和扩展的网络,可以通过各种信息传感设备(如射频识别、全球定位系统等)将任何物品与互联网连接起来形成一个巨大的网络,进行信息交换和通信,以实现万物之间的互联互通。在一些实施例中,物联网设备可以是智能家居设备,例如,物联网设备可以包括智能空调、智能冰箱、洗衣机、电饭煲、扫地机器人等设备。在一些实施例中,物联网设备可以是智能监控设备,例如,物联网设备可以包括监控摄像头、温度传感器、声音传感器等。The Internet of things (IoT) is the "Internet where everything is connected". It is a network that is extended and expanded based on the Internet. It can connect any item through various information sensing devices (such as radio frequency identification, global positioning system, etc.) Connected to the Internet to form a huge network for information exchange and communication to achieve interconnection among all things. In some embodiments, IoT devices may be smart home devices. For example, IoT devices may include smart air conditioners, smart refrigerators, washing machines, rice cookers, sweeping robots, and other devices. In some embodiments, the IoT device may be an intelligent monitoring device. For example, the IoT device may include a surveillance camera, a temperature sensor, a sound sensor, etc.
目前,不同厂家可能使用不同的通信协议(也可以称为生态链协议),实现支持该通信协议的物联网设备之间的互联互通,这样可能导致不同厂家生产的物联网设备之间不能通信,不能达到真正的万物互联。At present, different manufacturers may use different communication protocols (also called ecological chain protocols) to achieve interconnection and interoperability between IoT devices that support this communication protocol. This may cause IoT devices produced by different manufacturers to be unable to communicate with each other. The true Internet of Everything cannot be achieved.
基于此,连接标准联盟(connectivity standards alliance,CSA)推出一种物联网应用层技术标准—Matter标准协议,其可以提供基于互联网协议(internet protocol,IP)的智能家居设备的可互操作的应用层解决方案。在一些实施例中,Matter标准也可以称为基于IP的互联家居(connected home over IP,CHIP)标准。在一些实施例中,Matter标准可以支持以太网、Wi-Fi和Thread三种底层通信协议,并且 可以让不同协议的物联网设备互相通信。Based on this, the Connectivity Standards Alliance (CSA) launched an Internet of Things application layer technology standard—Matter Standard Protocol, which can provide an interoperable application layer for smart home devices based on Internet Protocol (Internet Protocol, IP) solution. In some embodiments, the Matter standard may also be called a 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 allow IoT devices with different protocols to communicate with each other.
Matter设备的数据模型Data model for Matter devices
图1是本申请实施例适用的Matter设备的数据模型结构。Matter设备的数据模型结构100包括节点(node)110、端点(endpoint)120、功能集群(cluster)130。Figure 1 is the data model structure of the Matter device applicable to the embodiment of this application. The data model structure 100 of the Matter device includes a node 110, an endpoint 120, and a functional cluster 130.
节点(node)110,封装了网络上可寻址的、唯一的资源,具有一组功能和能力,用户可以清楚地将其视为一个功能整体。通常,节点110可以是数据模型中最高或最外层的一阶元素。或者说,节点110是数据模型最外层唯一的可寻址元素。Node 110 encapsulates an addressable and unique resource on the network and has a set of functions and capabilities that users can clearly view as a functional whole. Typically, node 110 may be the highest or outermost first-order element in the data model. In other words, node 110 is the only addressable element in the outermost layer of the data model.
一个物理实体(例如,Matter设备)可以是一个节点110,或者说,节点110可以是指Matter设备节点。需要说明的是,一个节点可以有多个节点标识(identifier,ID),每个节点ID的作用域是一个特定的网络(fabric)。例如,当节点ID被用作交互的目标地址时,指定节点ID作用域的网络就是交互的访问网络。A physical entity (for example, Matter device) may be a node 110, or the node 110 may refer to a Matter device node. It should be noted that a node can have multiple node identifiers (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 within the scope of the specified node ID is the access network for the interaction.
一个节点可以包括一个或多个端点120。端点120是一个实例,它可以是一个服务或虚拟设备,由设备类型指示。每个端点120都符合一个或多个设备类型定义,这些设备类型定义了端点支持的功能集群,在一些实施例中,端点可以理解为是由设备类型指示的服务/虚拟设备。而功能集群是在端点上实例化的对象类。A node may include one or more endpoints 120. Endpoint 120 is an instance, which can be a service or a virtual device, as indicated by the 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, the endpoint may be understood to be a service/virtual device indicated by the device type. Functional clusters, on the other hand, are object classes that are instantiated on endpoints.
需要说明的是,在这个体系结构模型中,上述设备类型可以是最高语义元素。设备类型定义了一组端点120的符合性。设备类型为节点110或端点120定义了一组需求。It should be noted that in this architectural model, the above device types can be the highest semantic elements. A device type defines the compliance of a set of endpoints 120. A device type defines a set of requirements for a node 110 or endpoint 120.
每个端点120可以是一类功能的集合,其可以包含一个或多个功能集群130。Each endpoint 120 may be a collection of functions, which may include one or more function clusters 130 .
功能集群130是数据模型的功能构建块元素,在一些实施例中,功能集群又可以称为功能集、集群、群集等,本申请实施例对此并不限定。功能集群规范定义了通过交互相互对应的客户端和服务端。功能集群130可以被视为接口、服务或对象类,是数据模型中最低的独立功能元素。每个功能集群130都可以由一个功能集群规范定义,该规范定义了功能集群130的元素,包括属性、事件、命令以及与这些元素交互相关的行为。在一些实施例中,属性、命令、事件也可以称为功能集群130的接口单元,可以通过这三种接口单元提供相应的功能。The functional cluster 130 is a functional building block element of the data model. In some embodiments, the functional cluster can also be called a functional set, a cluster, a cluster, etc., and the embodiments of the present application are not limited to this. Functional cluster specifications define clients and servers that interact with each other. Functional cluster 130 can be viewed as an interface, service or object class, which is the lowest independent functional element in the data model. Each functional cluster 130 may be defined by a functional cluster specification that defines elements of the functional cluster 130, including attributes, events, commands, and behaviors related to interactions with these elements. In some embodiments, attributes, commands, and events can also be called interface units of the functional cluster 130, and corresponding functions can be provided through these three interface units.
在一些实施例中,功能集群130中的属性、事件、命令和行为是强制性的还是可选的,取决于功能集群130的定义。In some embodiments, whether attributes, events, commands, and behaviors in functional cluster 130 are mandatory or optional depends on the definition of functional cluster 130 .
通常,上述功能集群可以分为实用程序功能集群(utility cluster)和应用程序功能集群(application cluster)两类。Generally, the above functional clusters can be divided into two categories: utility functional clusters (utility clusters) and application functional clusters (application clusters).
实用程序功能集群不是端点的主要应用程序操作的一部分。实用程序功能集群可以用于配置、发现、寻址、诊断、监视设备运行状况、软件更新等。实用程序功能集群可能与它的功能集群对等物(cluster counterpart)有一个临时的关系。在本申请实施例中,实用程序群集可以包括描述符功能集群(descriptor cluster)、中继配置功能集群(relay configuration cluster)中的一种或多种。当然,本申请实施例并不限定于此,实用程序功能集群例如还可以包括绑定功能集群(binding cluster)等其他功能集群。Utility feature clusters are not part of the endpoint's main application operation. Clusters of utility functions can be used for configuration, discovery, addressing, diagnostics, monitoring device health, software updates, and more. A utility functional cluster may have a temporary relationship with its functional cluster counterpart. In this embodiment of the present application, the utility cluster may include one or more of a descriptor function cluster (descriptor cluster) and a relay configuration cluster (relay configuration cluster). Of course, the embodiments of the present application are not limited to this. The utility function cluster may also include other functional clusters such as a binding function cluster.
应用程序功能集群支持端点的主要操作,在一些实施例中,应用程序功能集群也可以称为业务功能集群。应用程序功能集群可以支持客户端和服务端之间的一个或多个持久应用程序的交互。例如,智能电灯中的开关功能集群(On/Off cluster),客户端可以向服务端(即,开关功能集群)发送控制命令,以控制智能电灯的开关。The application function cluster supports the main operations of the endpoint. In some embodiments, the application function cluster may also be called a business function cluster. Application function clusters can support the interaction of one or more persistent applications between clients and servers. For example, in the switch function cluster (On/Off cluster) in a smart light, the client can send control commands to the server (ie, the switch function cluster) to control the switch of the smart light.
在一些实施例中,业务功能集群可以是指除节点中的端点0(可以理解为节点中的第一个端点,该端点的设备类型为“根节点”)之外的其他端点上的功能集群。In some embodiments, the business function cluster may refer to the functional cluster on other endpoints except endpoint 0 in the node (which can be understood as the first endpoint in the node, and the device type of this endpoint is "root node") .
应用程序功能集群不是实用程序功能集群,即使它本身可能支持实用程序功能,例如校准、操作模式等。应用程序功能集群规范不应涉及其应用领域之外的层和进程。An application function cluster is not a utility function cluster, even though it may itself support utility functions such as calibration, operating modes, etc. Application functional cluster specifications should not involve layers and processes outside their application domain.
下面对功能集群的命令、属性、以及事件等主要元素进行简单介绍。The following is a brief introduction to the main elements of functional clusters such as commands, properties, and events.
功能集群命令(又称“命令”,command)是一组数据字段,每个数据类型在客户端和服务端群集实例之间传递,以调用命令接收者的行为。目前,协议中约定,每个命令都可以列在一个表中,该表可以包含命令的数据质量列:标识(ID)、名称(name)、方向(direction)、响应(response)、访问(access)、符合性(conformance)。相应地,一条命令可以指示一个表中定义的零个或多个字段。每个命令字段定义为表中的一行。A functional cluster command (also known as a "command", command) is a set of data fields, each data type passed between client and server cluster instances to invoke the behavior of the command recipient. Currently, the agreement stipulates that each command can be listed in a table, which can contain the data quality columns of the command: identification (ID), name (name), direction (direction), response (response), access (access) ), 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.
属性(attribute)是功能集群数据。目前,协议中约定,每个属性可以列在一个表中,该表定义的属性的数据质量列可以包括:ID、名称、(数据)类型(type)、约束(constraint)、其他质量、访问、默认(值)和符合性。在一些实现方式中,属性还可以定义其相关的语义和行为。属性可以反映设备的可查询/可设置的状态、配置和能力。在一些情况下,如果没有为属性显式定义特权,则默认的访问特权生效。Attributes are functional cluster data. Currently, the agreement stipulates that each attribute can be listed in a table. The data quality columns of the attributes defined in the table can include: ID, name, (data) type (type), constraint (constraint), other qualities, access, Default (value) and conformance. In some implementations, properties may also define their associated semantics and behavior. Properties can reflect the device's queryable/settable status, configuration, and capabilities. In some cases, if no privileges are explicitly defined for a property, default access privileges take effect.
事件(event)定义了过去发生的事情的记录。在这方面,事件记录可以被认为是一个日志条目,该日志条目可以通过事件记录流提供节点上的事件的时间顺序视图。与属性不同,属性不提供任何临界点保留(edge-preserving)的功能(也就是说,不保证每一个属性的变化都会传递给观察者),事件允许捕捉每一个单独的临界点或变化,并可靠地传递给观察者。这对于依赖于正确行为保证的安全和安全应用程序至关重要。目前,协议中规定,每个功能集群事件可以列在一个表中,该表定义的事件的数据质量列可以包括:ID、优先级(priority)、访问、符合性。An event defines a record of something that happened in the past. In this regard, an event record can be thought of as a log entry that provides a chronological view of events on a node through an event record stream. Unlike attributes, which do not provide any edge-preserving functionality (that is, there is no guarantee that every attribute change will be passed to observers), events allow each individual edge or change to be captured, and Reliably delivered to observers. This is critical for security and safety applications that rely on guarantees of correct behavior. Currently, the agreement stipulates that each functional cluster event can be listed in a table, and the data quality columns of the event defined in the table can include: ID, priority, access, and compliance.
为了便于理解,下文介绍命令、属性和事件中包含的几种常见的数据质量的含义。需要说明的是,本申请实施例中的命令、属性和事件中还可以包含其他数据质量,或者包含上述数据质量中的部分。本申请实施例对此不作限定。For ease of understanding, the following introduces the meanings of several common data qualities contained in commands, properties, 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 parts of the above-mentioned data qualities. The embodiments of the present application do not limit this.
标识,表示字段的唯一字段ID,或者说,是命令(或,属性、事件)的唯一标识。Identity represents the unique field ID of the field, or the unique identifier of the command (or attribute or event).
名称,表示字段的唯一名称,或者说,表示命令(或,属性)的名称。Name represents the unique name of the field, or the name of the command (or attribute).
类型,表示字段的数据类型,或者说,表示命令参数(或,属性参数)的数据类型。Type represents the data type of the field, or in other words, represents the data type of the command parameter (or attribute parameter).
方向,通常存在于命令列表中,用于定义命令的传输方向,例如,可以定义为从客户端到服务端。又例如,可以定于为从服务端到客户端。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 client to server. For another example, it can be determined from the server to the client.
访问权限,用于定义一个元素如何被访问(例如读或写)以及访问该数据需要哪些权限。在一些实现方式中,访问权限可以包括V,V表示读取访问或调用访问需要视图特权。访问权限还可以包括O,O表示“读访问”、“写访问”或“调用访问”需要操作权限。访问权限还可以包括R,R表示读访问。访问权限还可以包括W,W表示写访问。Access permissions are used to define how an element can be accessed (such as read or write) and what permissions are required to access the data. In some implementations, access rights may include V, where V indicates that read access or call access requires view privileges. Access permissions can also include O, which means "read access", "write access" or "call access" require operation permissions. Access permissions can also include R, which stands for read access. Access permissions can also include W, which represents write access.
响应,通常存在于命令列表中,用于定义命令的响应消息。Response, usually present in the command list, is used to define the response message of the command.
质量,用于定义其他列中没有涉及的其他数据质量。Quality, used to define additional data quality not covered in other columns.
默认,用于定义的默认值。需要说明的是,默认值并不是服务端返回出厂刷新设置时使用的值。默认值可以指示为数据字段指定的符合性可以是可选的,也可以随时间变化。当实际数据字段值不存在时,可以定义默认值以完成依赖关系。Default, used to define the default value. It should be noted that the default value is not the value used when the server returns to the factory refresh settings. Default values can indicate that compliance specified for a data field can be optional or change over time. Default values can be defined to complete the dependency when the actual data field value is not present.
符合性,定义了任何数据模型元素或元素集的可选性和依赖性。通常,此列对属性、命令、事件、枚举以及命令、事件或结构的字段有效。在一些实现方式中,“M”表示对应的命令为基本的强制特性集的一部分,“O”表示对应的命令为可选的特性集的一部分。Conformance, which defines the optionality and dependencies of any data model element or set of elements. Typically, this column is valid for properties, 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.
对于命令而言,客户端到服务端命令的符合性意味着服务器应该识别并支持客户端到服务器的命令,并按照定义生成响应。服务端到客户端命令的符合性意味着服务器应该按照群集行为定义的方式发送命令,例如,响应客户端到服务器的命令。命令的符合性取决于所支持的服务器特性。客户端不应被要求支持可选命令或依赖于可选特性的命令。For commands, client-to-server command compliance means that the server should recognize and support client-to-server commands and generate responses as defined. Server-to-client command compliance means that the server should send commands in a manner defined by cluster behavior, e.g., in response to client-to-server commands. Compliance of the command depends on supported server features. Clients should not be required to support optional commands or commands that rely on optional features.
约束,包含all和desc。其中,all定义在数值数据类型中表示允许所有值。desc表示约束是在描述部分定义的。Constraints, including all and desc. Among them, all is defined in the numeric data type to allow all values. desc indicates that the constraint is defined in the description section.
范围(range),表示字段的取值范围。范围可以支持两种形式:显式约束(explicit constraint)和宽度约束(width constraint)。其中,显式约束可以给出字段的取值对应的最小值和最大值,例如,某个字段的取值范围为(0,128)。宽度约束可以将字段的取值限定在特定字节数内,例如,某个字段的取值限定在8个字节内。在一些实施例中,范围的取值可以包含“N/A”表示不适用。当然,“N/A”也可以出现在其他部分(其他数据质量中),比如,默认、约束等。Range (range) represents the value range of the field. Range can support two forms: explicit constraint and width constraint. Among them, explicit constraints can give the minimum and maximum values corresponding to the value of the field. For example, the value range of a certain field is (0,128). Width constraints can limit the value of a field to a specific number of bytes. For example, the value of a certain field can be 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 qualities), such as defaults, constraints, etc.
优先级:每个事件记录都有一个相关的优先级。该优先级可以用于描述事件的使用语义。Priority: Each event record has an associated priority. This priority can be used to describe the usage semantics of the event.
基于Matter协议的通信系统Communication system based on Matter protocol
下文结合图2介绍本申请实施例适用的通信系统。图2所示的通信系统包含Matter客户端设备210、Matter服务端设备220、配置设备230。需要说明的是,Matter客户端设备210、Matter服务端设备220的数据结构模型可以为图1所示。The communication system applicable to the embodiment of the present application is introduced below with reference to FIG. 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 may be as shown in Figure 1 .
Matter客户端(client)设备210为用户侧的客户端设备,Matter客户端设备210可以与Matter服务端设备220进行通信。在一些实现方式中,Matter客户端设备210可以向Matter服务端设备220发送控制信息,以对Matter服务端设备220进行控制。例如当Matter服务端设备220为智能空调时,Matter客户端设备210可以通过向Matter服务端设备220发送控制信息,以控制Matter服务端设备220的调节温度。The Matter client device 210 is a client device on the user side, and the Matter client device 210 can communicate with the Matter server device 220 . In some implementations, the Matter client device 210 can send control information to the Matter server device 220 to control the Matter server device 220. For example, when the Matter server device 220 is a smart air conditioner, the Matter client device 210 can control the temperature adjustment of the Matter server device 220 by sending control information to the Matter server device 220 .
在一些实施例中,上述Matter客户端设备210可以是指安装有Matter客户端的终端设备,其中,终端设备可以是手机、电脑、平板电脑、智能手环、智能手表等,本申请实施例对此并不进行限定。应该理解,Matter客户端可以为应用程序(application,APP)或者小程序等,本申请实施例对此并不限定。In some embodiments, the above-mentioned Matter client device 210 may refer to a terminal device with a Matter client installed, where the terminal device may be a mobile phone, a computer, a tablet, a smart bracelet, a smart watch, etc. This embodiment of the present application will Not limited. It should be understood that the Matter client can be an application (application, APP) or a small program, etc., and the embodiments of the present application are not limited to this.
Matter服务端(server)设备220可以指支持Matter标准协议的物联网设备。Matter服务端设备220 可以直接和Matter客户端设备210进行通信,以便Matter客户端设备210对Matter服务端设备220进行控制。The Matter server device 220 may refer to an Internet of Things device that supports the Matter standard protocol. The Matter server device 220 can directly communicate with the Matter client device 210, so that the Matter client device 210 controls the Matter server device 220.
示例性地,当Matter服务端设备220为支持Matter标准协议的智能空调时,Matter客户端设备210可以控制智能空调的开关以及设置空调温度、风速等。当Matter服务端设备220为支持Matter标准协议的扫地机器人时,Matter客户端设备210可以控制扫地机器人开始工作或停止工作、控制扫地机器人的工作模式等。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 switch of the smart air conditioner and set the air conditioner temperature, wind speed, etc. When the Matter server device 220 is a sweeping robot that supports the Matter standard protocol, the Matter client device 210 can control the sweeping robot to start or stop working, control the working mode of the sweeping robot, etc.
目前,Matter服务端设备220所支持的操控接口主要包含控制(control)、订阅上报(subscribe and report)两类。其中,控制可以理解为可以修改或检索Matter服务端设备的一个或多个属性值对应的一组功能集群。例如,Matter客户端设备为智能扬声器,Matter服务端设备为智能空调,用户可以对智能扬声器说“降温”,然后,智能扬声器向智能空调发送降低温度的控制命令。Currently, the control interfaces supported by the Matter server device 220 mainly include control and subscribe and report. Among them, control can be understood as a set of functional clusters that can modify or retrieve one or more attribute values of the Matter server device. 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.
配置(commissioner)设备230可以用于对Matter服务端设备220进行配置。或者说,配置设备可以理解为安装有配置端的终端设备,用户可以通过该配置端对Matter服务端设备120进行配置。其中,终端设备可以是手机、电脑、平板电脑、智能手环、智能手表等,本申请实施例对此并不进行限定。在一些实施例中,配置端可以为应用程序或者小程序等,本申请实施例对此并不限定。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 . The terminal device may be a mobile phone, a computer, a tablet, a smart bracelet, a smart watch, etc., which are not limited in the embodiments of the present application. In some embodiments, the configuration terminal may be an application program or an applet, which is not limited in the embodiments of the present application.
需要说明的是,上述配置端可以与Matter客户端是相同的APP或小程序,当然,配置端可以与Matter客户端是不同的APP或小程序。本申请实施例对此不作限定。It should be noted that the above configuration terminal can be the same APP or applet as the Matter client. Of course, the configuration terminal can be a different APP or applet from the Matter client. The embodiments of the present application do not limit this.
路径和命令路径信息块Path and command path information blocks
路径(path)可以用于表示数据模型中定义的各个实体。路径的格式可以表示为:Paths can be used to represent various entities defined in the data model. The format of the path can be expressed as:
<path>::=<target><cluster><cluster element><path>::=<target><cluster><cluster element>
<target>::=<group target>|<endpoint target><target>::=<group target>|<endpoint target>
<group target>::=<group ID><group target>::=<group ID>
<endpoint target>::=<node><endpoint><endpoint target>::=<node><endpoint>
<endpoint>::=<wildcard endpoint>|<concrete endpoint><endpoint>::=<wildcard endpoint>|<concrete endpoint>
<cluster>::=<wildcard cluster>|<concrete cluster><cluster>::=<wildcard cluster>|<concrete cluster>
<cluster element>::=<attribute>|<event>|<command>。<cluster element>::=<attribute>|<event>|<command>.
可以看出,路径可以包括目标(target)、功能集群(cluster)、功能集群元素(cluster element)这几个元素,或者说,路径可以由目标、功能集群、功能集群元素这三个元素组成。It can be seen that the path can include several elements: target, functional cluster, and functional cluster element. In other words, the path can be composed of three elements: target, functional cluster, and functional cluster element.
在一些实施例中,目标可以是组目标(group target)。组目标可以用于标识一组目标,这一组目标可以用组ID(group ID)表示。In some embodiments, the target may be a group target. Group goals can be used to identify a group of goals, and this group of goals can be represented by a group ID (group ID).
在一些实施例中,目标可以是端点目标(endpoint target)。端点目标可以由节点(node)和端点(endpoint)组成,该节点也可以称为路径节点(对应于后文的所提及的路径节点,即第一命令的接收者对应的节点,其在命令路径信息块的编码信息中是省略的)。在一些实施例中,端点可以分为通配符端点(wildcard endpoint)和具体端点(concrete endpoint)两种类型,通配符端点可以表示多个目标路径,而具体端点可以表示单个目标路径。In some embodiments, the target may 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 in the command is omitted from the encoding information of the 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, and concrete endpoints can represent a single target path.
功能集群可以分为通配符功能集群(wildcard cluster)和具体功能集群(concrete cluster)两种类型,其中,通配符功能集群可以表示多个目标路径,而具体功能集群可以表示单个目标路径。Functional clusters can be divided into two types: wildcard functional clusters and concrete functional clusters. Wildcard functional clusters can represent multiple target paths, while concrete functional clusters can represent a single target path.
功能集群元素可以是属性、事件和命令这三种中的任意一种。根据功能集群元素的不同,路径可以分为属性路径、事件路径和命令路径。Functional cluster elements can be any of three types: attributes, events, and commands. According to different functional cluster elements, paths can be divided into attribute paths, event paths and command paths.
属性路径可以用于表示功能集群中的属性。属性路径中的属性的格式可以表示为:Property paths can be used to represent properties within a functional cluster. The format of the attributes in the attribute path can be expressed as:
<attribute>::=<attribute ID><field>*<attribute>::=<attribute ID><field>*
<field>::=<struct field ID>|<list entry index>。<field>::=<struct field ID>|<list entry index>.
其中,attribute ID是指目标属性在功能集群中的标识(例如,编号)。field是可选项,如果属性不是复合数据,则field可以不填。如果属性是复合数据,则field应该包含field ID。比如属性是结构体数据,那么field应该为结构体字段ID(struct field ID),又比如属性是一个列表,那么field应该为列表字段ID(list entry index)。Among them, attribute ID refers to the identification (for example, number) of the target attribute in the functional cluster. Field is optional. If the attribute is not composite data, the field can be left blank. If the attribute is composite data, the field should contain the field ID. For example, if the attribute is structure data, then the field should be the structure field ID (struct field ID), and if the attribute is a list, then the field should be the list field ID (list entry index).
在本申请实施例中,对标识和索引不做具体区分,两者可以等同替换。也就是说,本申请实施例中提及的标识,可以替换为索引,或者说本申请实施例中的ID可以是指标识,也可以是指索引。In the embodiment of the present application, no specific distinction is made between the identifier and the index, and they can be replaced equally. That is to say, the identifier mentioned in the embodiment of this application can be replaced by an index, or the ID in the embodiment of this application can refer to an identifier or an index.
事件路径可以用于表示一个功能集群事件。事件路径中的事件的格式可以表示为:<event>::=<event ID>。其中,event ID是指目标事件在功能集群中的标识(例如,编号)。Event paths can be used to represent a functional cluster event. The format of events in the event path can be expressed as: <event>::=<event ID>. Among them, event ID refers to the identification (for example, number) of the target event in the functional cluster.
命令路径可以用于表示一个功能集群命令。命令路径中的命令的格式可以表示为:<command>::=<command ID>。其中,command ID是指目标命令在功能集群中的标识(例如,编号)。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>. Among them, command ID refers to the identification (for example, number) of the target command in the functional cluster.
路径可以关联有信息块(information block,IB),例如,命令路径可以关联有命令路径信息块(CommandPathIB)。命令路径信息块表示一个命令的路径信息块。命令路径信息块包含的内容可以参 见表1。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 content contained in the command path information block can be seen in Table 1.
表1Table 1
路径字段path field 类型type 质量quality 符合性Conformity
ClusterPath(功能集群路径)ClusterPath (functional cluster path) ClusterPathIBClusterPathIB   MM
Command(命令)Command command-idcommand-id   MM
其中,ClusterPathIB为功能集群的路径信息块。command-id表示目标命令在功能集群中的标识。M表示其对应的路径字段为必选的字段,例如ClusterPathIB这个路径字段为必选的字段。Among them, ClusterPathIB is the path information block of the functional cluster. command-id indicates the identification of the target command in the functional cluster. M indicates that the corresponding path field is a required field. For example, the path field ClusterPathIB is a required field.
ClusterPathIB包含的内容可以参见表2。The contents of ClusterPathIB can be seen in Table 2.
表2Table 2
路径字段path field 类型type 质量quality 符合性Conformity
Group(组)Group group-idgroup-id   !Endpoint! Endpoint
Node(节点)Node node-idnode-id   !Group! Group
Endpoint(端点)Endpoint endpoint-idendpoint-id AA !Group! Group
Cluster(功能集群)Cluster (functional cluster) cluster-idcluster-id AA MM
其中,!Endpoint表示如果路径的目标为端点目标,则路径字段“Group”将不被支持。!Group表示如果路径的目标为组目标,则路径字段“Node”和路径字段“Endpoint”将不被支持。A表示wildcardable,即该字段可以使用通配符。in,! Endpoint indicates that if the target of the path is an endpoint target, the path field "Group" will not be supported. ! Group means that if the target of the path is a group target, the path field "Node" and the path field "Endpoint" will not be supported. A means wildcardable, that is, wildcard characters can be used in this field.
需要说明的是,表2中的“节点”字段对应于第一命令的接收者所对应的节点,即后文提及的路径节点,其在命令路径信息块的编码信息中是省略的。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.
在一些实施例中,表1和表2可以理解为是数据模型层定义的命令路径信息块以及功能集群路径信息块的内容。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 by the data model layer.
在一些实施例中,在对命令路径信息块进行编码实现的过程中,可以将ClusterPathIB的内容扩展到CommandPathIB中,以提高编码效率。表3示出了编码实现时,将ClusterPathIB的内容扩展到CommandPathIB中之后,CommandPathIB包含的内容。In some embodiments, during the process of encoding the command path information block, the content of ClusterPathIB can be extended to CommandPathIB to improve encoding efficiency. Table 3 shows the contents of CommandPathIB after the contents of ClusterPathIB are expanded into CommandPathIB during coding implementation.
表3table 3
元素element 解释explain 标签类型Tag type 标签号tag number TLV类型TLV type 范围scope
Endpoint(端点)Endpoint   上下文标签contextual tags 00 无符号整数unsigned integer 16比特16 bits
Cluster(功能集群)Cluster (functional cluster)   上下文标签 contextual tags 11 无符号整数unsigned integer 32比特32 bits
Command(命令)Command   上下文标签contextual tags 22 无符号整数unsigned integer 32比特32 bits
在表3中,如果某项元素缺失,则表示可以通配多个该元素,即该元素为通配符(wildcard)元素。例如,如果endpoint这个元素缺失,则可以表示可以通配多个endpoint。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 can mean that multiple endpoints can be wildcarded.
继续参见表3,可以看出,与表2相比,在表3中节点ID在编码层可以被省略。这是因为,对于包含该元素的消息,可以从消息层获取到相应的节点ID(即,路径节点的ID,或者,第一命令的接收者所对应的节点的ID),因此编码时可以省略。同理,Group字段也可以通过在消息头的DST(目标节点ID)字段中获取到,因此编码时也可以省略。Continuing to refer to Table 3, it can be seen that compared with Table 2, in Table 3 the node ID can be omitted in the encoding layer. This is because, for the message containing this element, the corresponding node ID (that is, 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, so it can be omitted when encoding. . In the same way, the Group field can also be obtained from the DST (target node ID) field of the message header, so it can also be omitted during encoding.
基于中继设备的通信机制Communication mechanism based on relay equipment
在某些场景下,例如,客户端设备离开服务端设备所在的通信网络的场景下,客户端设备可以通过中继设备向服务端设备发送命令(或称,控制信息,控制指令等),以对服务端设备进行控制,提高客户体验。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 the relay device to Control server devices to improve customer experience.
参见图3,基于中继设备的通信通常涉及Matter客户端设备、Matter服务端设备以及中继设备。其中,中继设备可以将客户端设备发送的命令转发给服务端设备。并且,中继设备还可以将服务端设备返回的命令响应进一步转发给客户端设备。也就是说,中继设备可以提供命令中继服务(也可以称为控制信息中继服务、控制指令中继服务等),使得客户端设备发送的命令可以通过命令中继服务提供的中继链路发送到服务端设备。Referring to Figure 3, communication based on relay devices usually involves Matter client devices, Matter server devices and relay devices. Among them, the relay device can forward the command sent by the client device to the server device. Moreover, the relay device can further forward the command response returned by the server device to the client device. That is to say, the relay device can provide a command relay service (which can also be called a control information relay service, a control instruction relay service, etc.), so that commands sent by the client device can pass through the relay chain provided by the command relay service. sent to the server device.
如上文所述,中继设备可以将客户端设备发送的命令,转发给服务端设备,因此,中继设备通常具有连接网络的能力。或者说,中继设备可以是任意具有网络连接能力的设备,例如,中继设备可以是路由器、智能音箱等,本申请实施例对此并不限定。As mentioned above, the relay device can forward the commands sent by the client device to the server device. Therefore, the relay device usually has the ability to connect to the network. In other words, the relay device can be any device with network connection capabilities. For example, the relay device can be a router, a smart speaker, etc., which is not limited in the embodiments of the present application.
作为一种可能的实现方式,中继设备在被配置了相应的服务端设备后,可以获取该服务端设备(或称,目标服务端设备、目标设备等)的相关信息,以与该服务端设备建立中继关系。例如,中继设备可以获取以下信息中的一种或多种来建立中继设备与服务端设备的中继关系:服务端设备的节点信息、服务端设备的端点信息、服务端设备的功能集群信息、以及服务端设备的功能集群所包含的属性列表和命 令列表等信息。As a possible implementation method, after the relay device is configured with a corresponding server device, it can obtain relevant information of the server device (or target server device, target device, etc.) to communicate with the server device. The device establishes a relay relationship. 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, and functional cluster of the server device. information, as well as the attribute list and command list contained in the functional cluster of the server device.
示例性地,中继设备可以创建一个虚拟设备,该虚拟设备与中继设备所中继的服务端设备对应。在一些实施例中,虚拟设备与服务端设备对应也可以理解为,虚拟设备与服务端设备之间存在映射关系。在一些实施例中,虚拟设备与服务端设备对应可以是指,虚拟设备的数据模型结构与该服务端设备的数据模型结构一致。作为一种实现方式,中继设备可以创建一个虚拟设备承载服务端设备的业务资源,并通过订阅该服务端设备,以维持虚拟设备的数据模型结构与该服务端设备的数据模型结构一致。For example, the relay device can create a virtual device corresponding 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 to mean that there is a mapping relationship between the virtual device and the server device. In some embodiments, correspondence between the virtual device and the server device may 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 service resources of the server device, and subscribe to the server device to maintain the data model structure of the virtual device consistent with the data model structure of the server device.
如此一来,当客户端设备向中继设备中的虚拟设备发送命令后,中继设备可以将该命令转发给虚拟设备对应的服务端设备,以完成命令的中继。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.
那么,在客户端设备通过中继设备提供命令中继服务的情况下,客户端设备如何利用中继设备实现对服务端设备的准确控制,是亟需解决的问题。例如,中继设备能够中继多个服务端设备,客户端设备如何准确地向中继设备发送想要控制的服务端设备对应的命令。Then, when the client device provides command relay services through the relay device, how the client device uses the relay device to accurately control the server device is an urgent problem that needs to be solved. For example, a relay device can relay multiple server devices. How does the client device accurately send commands corresponding to the server devices it wants to control to the relay device.
为了解决上述问题,本申请实施例提供一种命令的传输方案,能够保证客户端设备可以利用中继设备实现对服务端设备的准确控制。下面结合附图对本申请实施例提供的方案进行详细描述。In order to solve the above problem, embodiments of the present application provide a command transmission solution that can ensure that the client device can use the relay device to accurately control the server device. The solutions provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
图4为本申请一实施例提供的命令的传输方法的流程示意图。图4所示的方法是站在客户端设备、中继设备以及服务端设备交互的角度描述的。示例性地,客户端设备、服务端设备例如可以是图2所示的客户端设备210和服务端设备220,中继设备例如可以是图3所示的中继设备。图4的方法可以包括步骤S410和步骤S420,下面对这些步骤进行详细介绍。FIG. 4 is a schematic flowchart of a command transmission method provided by an embodiment of the present application. The method shown in Figure 4 is described from the perspective of interaction between a client device, a relay device, and a server device. For example, the client device and the server device may be the client device 210 and the server device 220 shown in FIG. 2 , and the relay device may be the relay device shown in FIG. 3 . The method in Figure 4 may include step S410 and step S420, and these steps will be introduced in detail below.
在步骤S410,客户端设备向中继设备发送第一命令。In step S410, the client device sends a first command to the relay device.
在步骤S420,中继设备向服务端设备转发第一命令。In step S420, the relay device forwards the first command to the server device.
第一命令可以用于对服务端设备进行控制,例如第一命令可以用于对服务端设备的功能集群(比如,业务功能集群)进行操作。作为一个具体示例,以服务端设备为智能电灯为例,第一命令可以用于对智能电灯中的开关功能集群进行操作,以控制智能电灯的开关。作为另一个具体示例,以服务端设备为智能空调为例,第一命令可以用于对智能空调中的空调温度功能集群进行操作,以控制智能空调温度的调节。The first command may be used to control the server device. For example, the first command may be used to operate a functional cluster (for example, a business function cluster) of the server device. As a specific example, assuming that the server device is 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, assuming that the server device is 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 adjustment of the temperature of the smart air conditioner.
在一些实施例中,在中继设备能够向服务端设备转发第一命令的情况下,该服务端设备可以理解为是该中继设备所中继的服务端设备,因此,该服务端设备也可以称为目标服务端设备,或者简称为目标设备。In some embodiments, when the relay device can forward 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 also It can be called the target server device, or simply the target device.
在一些实施例中,服务端设备的身份信息可以使用服务端设备的节点ID进行指示。通常而言,在同一网络中,服务端设备的节点ID是唯一的,其可以用于指示该服务端设备在该网络中的唯一身份。在不同的网络中,服务端设备可以使用不同的节点ID。In some embodiments, the identity information of the server device may be indicated using the node ID of the server device. Generally speaking, in the same network, the node ID of the server device is unique, which can be used to indicate the unique identity of the server device in the network. In different networks, server devices can use different node IDs.
也就是说,在某一个网络中,客户端设备或中继设备可以通过服务端设备的节点ID来唯一确定其对应的服务端设备。That is to say, in a certain network, the client device or relay device can uniquely determine its corresponding server device through the node ID of the server device.
为了进一步提升客户体验,当中继设备接收到客户端设备发送的第一命令后,能够及时向客户端设备反馈服务端设备针对第一命令给出的命令响应(针对第一命令的响应结果),可以在中继设备中设置第一命令对应的服务端设备中的功能集群。也就是说,假设第一命令用于对服务端设备中的目标功能集群进行控制,那么中继设备中可以包含映射功能集群,该映射功能集群与服务端设备中的目标功能集群相同。需要说明的是,目标功能集群和映射功能集群只是一个名称,其用于指示两个功能集群之间的映射关系,也可以使用其他名称替换。In order to further improve 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 in response to the first command (the response result to the first command), The functional 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, the relay device may include a mapping function cluster, and the mapping function cluster 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 names, which are used to indicate the mapping relationship between the two function clusters, and can also be replaced with other names.
配置上述目标功能集群和映射功能集群相同的实现方式有多种,本申请实施例对此并不限定。示例性地,中继设备可以获取服务端设备的节点、端点、功能集群、以及功能集群所包含的属性列表和命令列表等信息,再通过向服务端设备发送订阅请求,以请求订阅上述目标功能集群,例如,订阅目标功能集群的属性列表以及命令列表。There are many implementation methods for configuring the above target function cluster and the mapping function cluster to be the same, and the embodiments of this application are not limited to this. For example, the relay device can obtain the node, endpoint, function cluster of the server device, and the attribute list and command list contained in the function cluster, and then send a subscription request to the server device to request to subscribe to the above target function. The cluster, for example, subscribes to a list of properties and a list of commands for the target functional cluster.
为了提高中继设备的资源利用率,在一些实施例中,中继设备可以为多个服务端设备提供命令中继服务。因此,中继设备中可以设置有多个服务端设备的功能集群。In order to improve the resource utilization of the relay device, in some embodiments, the relay device can provide command relay services for multiple server devices. Therefore, a functional cluster with multiple server devices can be set up in the relay device.
作为一种实现方式,中继设备中可以设置有一个或多个虚拟设备,每个虚拟设备与服务端设备之间存在映射关系,或者说,每个虚拟设备对应一个服务端设备。并且,对于中继设备中的虚拟设备而言,每个虚拟设备中可以设置有与服务端设备的节点中的业务功能集群相同的功能集群。As an implementation manner, the relay device may be provided with one or more virtual devices, and there is a mapping relationship between each virtual device and the server device, or in other words, each virtual device corresponds to a server device. Moreover, for the virtual devices in the relay device, each virtual device may be provided with the same functional cluster as the service function cluster in the node of the server device.
或者说,上述的映射功能集群可以设置在虚拟设备中,该映射功能集群与服务端设备的目标功能集群是相同的。In other words, the above mapping function cluster can be set in the virtual device, and the mapping function cluster is the same as the target function cluster of the server device.
在一些实施例中,上述虚拟设备可以是由中继设备创建的。In some embodiments, the above-mentioned virtual device may be created by a relay device.
在一些实施例中,上述虚拟设备可以包括与服务端设备的业务端点具有映射关系的虚拟端点,或者说,上述虚拟设备是指与服务端设备的业务端点具有映射关系的虚拟端点。In some embodiments, the above-mentioned virtual device may include a virtual endpoint that has a mapping relationship with the service endpoint of the server device, or that the above-mentioned virtual device refers to a virtual endpoint that has a mapping relationship with the service endpoint of the server device.
在一些实施例中,上述虚拟设备可以包括与服务端设备的节点具有映射关系的虚拟节点,或者说,上述虚拟设备是指与服务端设备的节点具有映射关系的虚拟节点。In some embodiments, the above-mentioned virtual device may include a virtual node that has a mapping relationship with a node of the server device, or that the above-mentioned virtual device refers to a virtual node that has a mapping relationship with a node of the server device.
本申请实施例中,客户端设备和/或中继设备可以利用服务端设备的节点ID实现对服务端设备的准确控制。In this embodiment of the present application, the client device and/or the relay device can use the node ID of the server device to achieve accurate control of the server device.
在一些实施例中,服务端设备的节点ID可以记录在第一虚拟设备的设备信息中。其中,第一虚拟设备为中继设备中的与服务端设备具有映射关系的虚拟设备。如此一来,客户端设备可以通过查询第一虚拟设备的设备信息,获取第一虚拟设备和服务端设备的节点ID的映射关系,以此来实现对服务端设备的准确控制,提升客户体验。In some embodiments, the node ID of the server device may 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. In this way, the client device can obtain the mapping relationship between the node IDs of the first virtual device and the server device by querying the device information of the first virtual device, thereby achieving accurate control of the server device and improving customer experience.
在一些实施例中,服务端设备的节点ID可以记录在第一命令对应的命令路径信息块的编码信息中。如此一来,中继设备可以根据第一命令对应的节点ID将第一命令准确地转发给服务端设备,提升客户体验。In some embodiments, the node ID of the server device may 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 according to the node ID corresponding to the first command, thereby improving customer experience.
下面结合实施例一和实施例二对如何基于服务端设备的节点ID实现对服务端设备的准确控制进行更为详细的描述。需要说明的是,实施例一和实施例二可以部分或全部结合使用,本申请实施例对此并不限定。A more detailed description of how to achieve accurate control of the server device based on the node ID of the server device will be described below in conjunction with Embodiment 1 and Embodiment 2. It should be noted that Embodiment 1 and Embodiment 2 can be used partially or completely in combination, and the embodiments of the present application are not limited to this.
实施例一:服务端设备的节点ID记录在第一虚拟设备的设备信息中Embodiment 1: The node ID of the server device is recorded in the device information of the first virtual device
在一些实施例中,第一虚拟设备的设备信息可以是指第一虚拟设备的功能集群,即服务端设备的节点ID可以记录在第一虚拟设备的功能集群中。In some embodiments, the device information of the first virtual device may refer to the 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.
如上文所述,服务端设备可以包括一个或多个业务端点,在一些实施例中,第一虚拟设备可以包括与服务端设备的业务端点具有映射关系的虚拟端点(下文以服务端设备包括第一业务端点,第一虚拟设备包括与第一业务端点具有映射关系的第一虚拟端点为例进行说明)。As mentioned 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 server device includes the third A service endpoint, the first virtual device includes a first virtual endpoint that has a mapping relationship with the first service endpoint, as an example for illustration).
在一些实施例中,第一虚拟设备中的虚拟端点(比如,第一虚拟端点)可以包括一个或多个功能集群,例如包括第一功能集群、第二功能集群等。In some embodiments, the virtual endpoint (for example, the first virtual endpoint) in the first virtual device may include one or more functional clusters, such as a first functional cluster, a second functional cluster, etc.
在一些实施例中,服务端设备的节点ID可以记录在第一虚拟端点的端点信息中。第一虚拟端点的端点信息例如可以包括第一虚拟端点的端点标识、第一虚拟端点中的功能集群、以及功能集群所包含的属性列表和命令列表等信息,本申请实施例对此并不限定。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 the attribute list and command list included in the functional cluster. The embodiments of the present application are not limited to this. .
在一些实施例中,服务端设备的节点ID可以记录在第一虚拟端点的功能集群中,例如,记录在第一功能集群中。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.
第一功能集群可以是第一虚拟端点中的任意一个功能集群,本申请实施例对此不作具体限定。下面给出第一功能集群的几种优选实施例。The first functional cluster may be any functional cluster in the first virtual endpoint, which is not specifically limited in the embodiments of this application. Several preferred embodiments of the first functional cluster are given below.
在一些实施例中,第一功能集群可以是用于描述第一虚拟端点的功能集群。在一些实施例中,第一功能集群是用于描述第一虚拟端点的功能集群,可以是指,第一功能集群是用于描述(或报告)第一虚拟端点的基础信息的功能集群,例如,用于描述第一虚拟端点的设备类型(device type)信息和功能集群信息等。在一些实施例中,第一功能集群是用于描述第一虚拟端点的功能集群,也可以理解为,第一功能集群用于描述第一虚拟端点这个端点实例。In some embodiments, the first functional cluster may be a functional cluster describing 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, for example , used to describe the device type information and functional cluster information of the first virtual endpoint. In some embodiments, the first functional cluster is a functional cluster used to describe the first virtual endpoint. It can also be understood that the first functional cluster is used to describe the endpoint instance of the first virtual endpoint.
在一些实施例中,第一功能集群可以是现有的功能集群。这种情况下,可以在现有的功能集群中增加一个字段(比如,属性字段),使用该字段来指示第一虚拟端点对应的服务端设备的节点ID。In some embodiments, the first functional cluster may be an existing functional cluster. In this case, you can add a field (for example, attribute field) to the existing functional cluster, and use this field to indicate the node ID of the server device corresponding to the first virtual endpoint.
例如,第一功能集群可以是描述符功能集群(descriptor cluster)。描述符功能集群可以理解为是现有的一个功能集群,其用于描述节点中的一个端点。现有技术中,描述符功能集群包含的属性可以参见表4。For example, the first functional cluster may be a descriptor cluster. The descriptor function cluster can be understood as an existing function cluster, which is used to describe an endpoint in the node. In the prior art, the attributes included in the descriptor function cluster can be seen in Table 4.
表4Table 4
Figure PCTCN2022118195-appb-000001
Figure PCTCN2022118195-appb-000001
其中,F表示该字段为固定值;R表示读权限;V表示查看权限;M表示必选。Among them, F means that the field is a fixed value; R means read permission; V means view permission; M means required.
具体地,设备类型列表可以给出端点所符合的设备类型以及相应版本(例如,包含在DeviceTypeStruct结构中)。需要说明的是,设备类型列表中应该至少包含一个设备类型。例如:扩展 色灯设备类型可能支持可调灯和开关灯的设备类型ID,因为它们是扩展色灯的子集。Specifically, the device type list can give 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 light device type might support device type IDs for dimmable and switch lights because they are a subset of the extended color light.
服务端列表可以给出端点上的全部具有服务端角色的功能集群ID。The server list can give all functional cluster IDs on the endpoint that have the server role.
客户端列表可以给出端点上的全部具有客户端角色的功能集群ID。The client list can give all functional cluster IDs on the endpoint that have the client role.
部件列表可以给出组成设备类型实例的全部端点。例如:一个冰箱设备类型可以定义为由多个温度传感器端点、一个计量端点和两个恒温器端点组成。The parts list gives all the endpoints that make up an instance of the device type. For example: a refrigerator device type can be defined as consisting of multiple temperature sensor endpoints, a metering endpoint, and two thermostat endpoints.
本申请实施例中,可以在描述符功能集群中增加一个字段,通过该增加的字段来指示第一虚拟端点对应的服务端设备的节点ID。例如,可以增加原节点标识(比如,用OriginNodeID表示)这个属性字段来指示。具体地,本申请实施例中的第一功能集群为描述符功能集群时,描述符功能集群包含的属性可以参见表5。In this embodiment of the present application, a field may be added to the descriptor function cluster, and the added field may be used to indicate the node ID of the server device corresponding to the first virtual endpoint. For example, the attribute field of the original node identification (for example, represented by OriginNodeID) can be added to indicate. Specifically, when the first functional cluster in the embodiment of this application is a descriptor functional cluster, the attributes included in the descriptor functional cluster can be seen in Table 5.
表5table 5
Figure PCTCN2022118195-appb-000002
Figure PCTCN2022118195-appb-000002
其中,O表示该属性为可选的,即该属性仅在部分(如中继设备中)情况下存在。Among them, O indicates that this attribute is optional, that is, this attribute only exists in some cases (such as in relay equipment).
在一些实施例中,当中继设备完成第一虚拟端点的创建以及将第一业务端点映射至第一虚拟端点之后,中继设备可以将原节点标识这个属性的值设置为第一业务端点所在的目标节点的节点ID(或称,服务端设备的节点ID)。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 may set the value of the attribute of the original node identification to the location where the first service endpoint is located. The node ID of the target node (or the node ID of the server device).
图5示出了中继设备映射服务端设备的端点的一个具体示例。参见图5,假设中继设备原有端点EP0,端点EP0中包含中继配置功能集群、中继发现功能集群等中继能力。当中继设备需要与具有开关能力的服务端设备建立中继关系时,中继设备获取服务端设备(或称,服务端设备的节点)的业务端点EP1及其包含的功能集群、功能集群所包含的属性列表和命令列表等信息。然后,中继设备可以创建一个虚拟端点EP11,并将服务端设备的端点EP1上的功能集群及其所包含的属性列表和命令列表全部映射到虚拟端点EP11。进一步地,中继设备可以将虚拟端点EP11的描述符功能集群中的原节点标识这个属性的值设置为第一业务端点所在的服务端设备的节点ID。Figure 5 shows a specific example of a relay device mapping an endpoint of a server device. Referring to Figure 5, it is assumed that the relay device has an original endpoint EP0. 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 node of the server device) and the function clusters and function clusters it contains. attribute list, command list and other information. Then, the relay device can create a virtual endpoint EP11, and map all the functional clusters on the endpoint EP1 of the server device and the attribute list and command list it contains to the virtual endpoint EP11. Further, the relay device may set the value of the original node identification attribute 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.
在该示例中,虚拟端点EP11中的开关(OnOff)功能集群与端点EP1的开关功能集群相同,虚拟端点EP11中的标签(Label)功能集群与端点EP1的标签功能集群相同,虚拟端点EP11中的描述符功能集群除具备端点EP1的描述符功能集群的所有信息之外,还包括服务端设备的节点ID。In this example, the switch (OnOff) function cluster in virtual endpoint EP11 is the same as the switch function cluster of endpoint EP1, the label (Label) function cluster in virtual endpoint EP11 is the same as the label function cluster of endpoint EP1, and the In addition to all the information of the descriptor function cluster of endpoint EP1, the descriptor function cluster also includes the node ID of the server device.
在一些实施例中,第一功能集群可以是专门用于记录第一虚拟端点所中继的服务端设备的节点(可以理解为,第一虚拟端点对应的第一业务端点所在的节点)的功能集群,该第一功能集群中包括第一虚拟端点所中继的服务端设备的节点ID。In some embodiments, the first functional cluster may be a function of a node specifically used to record the server device relayed by the first virtual endpoint (which can be understood as the node where the first service endpoint corresponding to the first virtual endpoint is located). Cluster, the first functional cluster includes the node ID of the server device relayed by the first virtual endpoint.
在一些实施例中,第一功能集群可以是新增的功能集群,该新增的功能集群专门用于记录第一虚拟端点所中继的服务端设备的节点,或者说,该新增的功能集群用于专门记录服务端设备的节点ID。换句话说,第一功能集群可以是中继设备在创建第一虚拟端点并将第一业务端点映射至第一虚拟端点之后,在第一虚拟端点中增加的新的功能集群。In some embodiments, the first functional cluster may be a newly added functional cluster, which is specially used to record the nodes of the server device relayed by the first virtual endpoint, or in other words, the new functional cluster The cluster is used to specifically record the node ID of the server device. In other words, the first functional cluster may be a new functional cluster added by the relay device to the first virtual endpoint after creating the first virtual endpoint and mapping the first service endpoint to the first virtual endpoint.
例如,中继设备在创建第一虚拟端点并将第一业务端点映射至第一虚拟端点之后,可以在第一虚拟端点中增加一个名为被中继节点(RelayedNode)的功能集群,该功能集群包含的属性可以参见表6。For example, after creating the first virtual endpoint and mapping the first service endpoint to the first virtual endpoint, the relay device can add a functional cluster named relayed node (RelayedNode) to the first virtual endpoint. The functional cluster The included attributes can be found in Table 6.
表6Table 6
Figure PCTCN2022118195-appb-000003
Figure PCTCN2022118195-appb-000003
其中,OriginNodeID属性字段可以用于指示第一虚拟节点所映射的业务端点所在的服务端设备的节点ID。The OriginNodeID attribute field may be used to indicate the node ID of the server device where the service endpoint mapped by the first virtual node is located.
在一些实施例中,中继设备在第一虚拟端点中新增第一功能集群(比如,RelayedNode功能集群)之后,可以将第一功能集群中的原节点标识这个属性的值设置为第一业务端点所在的服务端设备的节 点ID。In some embodiments, after the relay device adds the first functional cluster (for example, the RelayedNode functional cluster) to the first virtual endpoint, the value of the attribute identifying the original node in the first functional cluster can be set as the first service The node ID of the server device where the endpoint is located.
图6示出了中继设备映射服务端设备的端点的另一个具体示例。参见图6,假设中继设备原有端点EP0,端点EP0中包含中继配置功能集群、中继发现功能集群等中继能力。当中继设备需要与具有开关能力的服务端设备建立中继关系时,中继设备获取服务端设备的业务端点EP1及其包含的功能集群、功能集群所包含的属性列表和命令列表等信息。然后,中继设备可以创建一个虚拟端点EP11,并将服务端设备的端点EP1上的功能集群及其所包含的属性列表和命令列表全部映射到虚拟端点EP11。进一步地,中继设备可以在虚拟端点EP11中新增一个名为被中继节点(RelayedNode)的功能集群,该功能集群中记录有服务端设备的节点ID。Figure 6 shows another specific example of a relay device mapping an endpoint of a server device. Referring to Figure 6, it is assumed that the relay device has an original endpoint EP0. 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 information such as the service endpoint EP1 of the server device and the function cluster it contains, as well as the attribute list and command list contained in the function cluster. Then, the relay device can create a virtual endpoint EP11, and map all the functional clusters on the endpoint EP1 of the server device and the attribute list and command list it contains to the virtual endpoint EP11. Further, the relay device can add a new functional cluster named relayed node (RelayedNode) in the virtual endpoint EP11, and the node ID of the server device is recorded in the functional cluster.
在该示例中,虚拟端点EP11中的开关(OnOff)功能集群与端点EP1的开关功能集群相同,虚拟端点EP11中的标签(Label)功能集群与端点EP1的标签功能集群相同,虚拟端点EP11中的描述符(Descriptor)功能集群与端点EP1的描述符功能集群相同,且虚拟端点EP11中还包括一个名为被中继节点的功能集群,该功能集群中记录有服务端设备的节点ID。In this example, the switch (OnOff) function cluster in virtual endpoint EP11 is the same as the switch function cluster of endpoint EP1, the label (Label) function cluster in virtual endpoint EP11 is the same as the label function cluster of endpoint EP1, and the The descriptor function cluster is the same as the descriptor function cluster of the endpoint EP1, and the virtual endpoint EP11 also includes a function cluster named the relayed node, and the node ID of the server device is recorded in the function cluster.
在一些实施例中,第一虚拟端点的端点信息中还可以记录有服务端设备所在网络的网络标识。例如,第一虚拟端点的第一功能集群(比如,上文的描述符功能集群或被中继节点功能集群)中可以记录有该网络标识。In some embodiments, the endpoint information of the first virtual endpoint may also record the network identifier of the network where the server device is located. For example, the network identifier may be recorded in the first functional cluster of the first virtual endpoint (for example, the above descriptor functional cluster or the relayed node functional cluster).
以第一功能集群为上文提及的被中继节点功能集群为例,该功能集群中除包含原节点标识这个属性字段之外,还可以包含网络标识(FabricID)属性字段。第一功能集群包含的属性具体可以参见表7。Taking the first functional cluster as the relayed node functional cluster mentioned above as an example, in addition to the original node identification attribute field, the functional cluster may also include a network identification (FabricID) attribute field. The attributes included in the first functional cluster can be found in Table 7 for details.
表7Table 7
Figure PCTCN2022118195-appb-000004
Figure PCTCN2022118195-appb-000004
其中,FabricID属性字段可以用于指示服务端设备所在的网络,或者,也可以理解为指示服务端设备的节点所在的网络。The FabricID attribute field can be used to indicate the network where the server device is located, or it can also be understood as indicating the network where the node of the server device is located.
在一些实施例中,可以结合服务端设备的节点ID和服务端设备所在网络的网络标识来唯一关联服务端设备。In some embodiments, the server device can be uniquely associated by combining the node ID of the server device and the network identifier of the network where the server device is located.
在服务端设备的节点ID记录在第一虚拟端点的端点信息的情况下,客户端设备向中继设备发送第一命令时,第一命令可以与第一命令路径信息块关联。该第一命令路径信息块的编码信息可以包括第一虚拟端点的端点标识,第一命令所在功能集群的标识,以及第一命令的标识。例如,第一命令路径信息块的编码信息可以表示为:<第一虚拟端点的端点标识>/<第一命令所在功能集群的标识>/<第一命令的标识>。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 the first command to the relay device, the first command may be associated with the first command path information block. The encoded information of the first command path information block may include 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. For example, the encoding information of the first command path information block may be expressed as: <endpoint identification of the first virtual endpoint>/<identification of the functional cluster where the first command is located>/<identification of the first command>.
在一些实施例中,客户端设备向中继设备发送的第一命令对应的路径节点为中继设备(或称,中继设备节点),即路径节点用于指示第一命令的接收者对应的节点。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 recipient of the first command. node.
在服务端设备的节点ID记录在第一虚拟端点的端点信息的情况下,中继设备向服务端设备转发第一命令时,第一命令可以与第二命令路径信息块关联。该第二命令路径信息块的编码信息可以包括第一业务端点的端点标识,第一命令所在功能集群的标识,以及第一命令的标识。例如,第二命令路径信息块的编码信息可以表示为:<第一业务端点的端点标识>/<第一命令所在功能集群的标识>/<第一命令的标识>。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 may 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 may 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>.
在一些实施例中,客户端设备在向中继设备发送第一命令之前,还可以先查询中继设备中的虚拟设备(比如,第一虚拟设备)的设备信息,以确定中继设备中的虚拟设备和服务端设备之间的映射关系,进而根据该映射关系准确地向中继设备发送第一命令。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 and the server device, and then accurately sends the first command to the relay device according to the mapping relationship.
图7为本申请另一实施例提供的命令的传输方法的流程示意图。如图7所示,图7的方法可以包括步骤S710至步骤S740。下面对这些步骤进行介绍。FIG. 7 is a schematic flowchart of a command transmission method provided by another embodiment of the present application. As shown in Figure 7, the method of Figure 7 may include steps S710 to S740. These steps are described below.
在步骤S710,客户端设备向中继设备发送第一消息,第一消息用于查询第一功能集群。该第一功能集群是指中继设备中的记录有服务端设备的节点ID的功能集群。In step S710, the client device sends a first message to the relay device, where the first message is used to query the first functional cluster. The first functional cluster refers to a functional cluster in the relay device that records the node ID of the server device.
在一些实施例中,第一功能集群可以是指上文提及的用于描述第一虚拟端点的功能集群,例如,描述符功能集群。In some embodiments, the first functional cluster may refer to the functional cluster mentioned above for describing the first virtual endpoint, for example, the descriptor functional cluster.
在一些实施例中,第一功能集群可以是指上文提及的专门用于记录第一虚拟端点所中继的节点的功能集群,例如,被中继节点功能集群。In some embodiments, the first functional cluster may refer to the functional cluster mentioned above that is specially used to record the node to which the first virtual endpoint is relayed, for example, the relayed node functional cluster.
在步骤S720,中继设备向客户端设备发送第一响应,该第一响应包含上述第一功能集群的信息。In step S720, the relay device sends a first response to the client device, where the first response includes the information of the above-mentioned first functional cluster.
在一些实施例中,第一响应可以是指中继设备向客户端设备返回第一功能集群,客户端设备可以根 据第一功能集群中的属性字段,得到第一虚拟端点对应的服务端设备的节点ID。In some embodiments, the first response may mean that the relay device returns the first functional cluster to the client device. The client device may obtain the server device corresponding to the first virtual endpoint according to the attribute field in the first functional cluster. Node ID.
不过本申请实施例并不限定于此,在一些实施例中,客户端设备可以直接请求查询第一功能集群中的用于记录服务端设备的节点ID的属性字段,例如,直接请求查询第一功能集群中的原节点标识属性,以得到服务端设备的节点ID。However, the embodiments of the present application are not limited to this. In some embodiments, the client device may directly request to query the attribute field used to record the node ID of the server device in the first functional cluster. For example, directly request to query the first functional cluster. The original node identification attribute in the functional cluster to obtain the node ID of the server device.
在一些实施例中,第一功能集群的信息可以用于客户端设备根据节点标识显示该节点标识对应的服务端设备,例如,在客户端设备仅显示该节点标识对应的服务端设备,以方便用户控制。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, the client device only displays the server device corresponding to the node identifier for convenience. User control.
在步骤S730,客户端设备向中继设备发送第一命令。In step S730, the client device sends a first command to the relay device.
在步骤S740,中继设备向服务端设备转发第一命令。In step S740, the relay device forwards the first command to the server device.
关于步骤S730和步骤S740的详细描述,可以参见前文步骤S410和步骤S420的描述,此处不再赘述。For detailed description of step S730 and step S740, please refer to the previous description of step S410 and step S420, which will not be described again here.
在一些实施例中,客户端设备得到中继设备中的第一虚拟端点对应的服务端设备的节点ID后,还可以根据该服务端设备的节点ID,建立第一虚拟端点与客户端设备直连的服务端设备之间的指向关系。在一些实施例中,该指向关系可以用于客户端设备根据节点标识显示该节点标识对应的服务端设备,例如,在客户端设备仅显示该节点标识对应的服务端设备,以方便用户控制。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 direct connection between the first virtual endpoint and the client device based on the node ID of the server device. The pointing relationship between connected server devices. In some embodiments, the pointing relationship can be used by the client device to display the server device corresponding to the node identifier according to the node identifier. For example, the client device only displays the server device corresponding to the node identifier to facilitate user control.
继续参见图7,在一些实施例中,图7所示的方法还可以包括步骤S725。在步骤S725,客户端设备根据服务端设备的节点ID,建立第一虚拟端点与客户端设备直连的服务端设备之间的指向关系。Continuing to refer to Figure 7, in some embodiments, the method shown in Figure 7 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 according to the node ID of the server device.
例如,服务端设备为智能空调A,在本地发现连接时,客户端设备已经与该服务端设备建立过控制关系,并将该服务端设备显示在客户端设备的可控设备列表(可控设备列表可以用于指示与客户端设备直连的服务端设备的信息)中。当客户端设备通过中继设备发现了设备类型为空调的第一虚拟端点,且第一虚拟端点中的用于记录服务端设备的节点ID的属性字段的值与之前本地连接的智能空调A的节点ID相同,则客户端设备可以将中继设备的第一虚拟端点指向可控设备列表中的智能空调A,以建立第一虚拟端点与客户端设备直连的服务端设备之间的指向关系。For example, the server device is smart air conditioner A. When the connection is discovered locally, the client device has established a control relationship with the server device and displays the server device in the client device's controllable device list (controllable device). The list can be used to indicate information about server devices directly connected to the client device). When the client device discovers the first virtual endpoint whose device type is an air conditioner through the relay device, and the value of the attribute field in the first virtual endpoint used to record the node ID of the server device is the same as the value of the previously locally connected smart air conditioner A If the node IDs are the same, 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. .
在一些实施例中,如果第一虚拟端点的端点信息中还记录有服务端设备所在网络的网络标识,可以结合该网络标识与服务端设备的节点ID来唯一关联服务端设备。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 network identifier and the node ID of the server device can be combined to uniquely associate the server device.
也就是说,在一些实施例中,在建立第一虚拟端点与客户端设备直连的服务端设备之间的指向关系时,还可以考虑服务端设备所在网络的网络标识这个因素。示例性地,客户端设备可以对从第一虚拟端点的端点信息中得到的网络标识和实际服务端设备所在网络的网络标识进行比较,以确定是否匹配。That is to say, in some embodiments, when establishing the pointing relationship between the first virtual endpoint and the server device directly connected to the client device, the network identifier of the network where the server device is located 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 where the actual server device is located to determine whether there is a match.
通过建立中继设备中的虚拟端点与客户端设备直连的服务端设备之间的指向关系,可以解决客户端设备无法对中继设备所中继的服务端设备进行识别,以与客户端设备在直连时所发现的服务端设备进行对应的问题,使得用户可以保持中继控制与直连控制的一致性体验。By establishing a pointing relationship between the virtual endpoint in the relay device and the server device directly connected to the client device, it can solve the problem that the client device cannot identify the server device relayed by the relay device, so as to communicate with the client device. Corresponding issues found on the server device during direct connection enable users to maintain a consistent experience of relay control and direct connection control.
实施例二:服务端设备的节点ID记录在第一命令对应的命令路径信息块的编码信息中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.
在一些实施例中,第一虚拟设备可以包括与服务端设备具有映射关系的虚拟节点(下文以第一虚拟节点为例进行说明)。In some embodiments, the first virtual device may include a virtual node that has a mapping relationship with the server device (the first virtual node is used as an example for description below).
在一些实施例中,第一虚拟设备中的虚拟节点(比如,第一虚拟节点)可以包括一个或多个端点(比如,业务端点),每个端点可以包括一个或多个功能集群,例如包括第一功能集群、第二功能集群等。In some embodiments, a virtual node (eg, a first virtual node) in the first virtual device may include one or more endpoints (eg, a service endpoint), and each endpoint may include one or more functional clusters, such as First functional cluster, second functional cluster, etc.
在一些实施例中,中继设备获取服务端设备的节点信息后,可以创建该服务端设备对应的第一虚拟节点,并将服务端设备的节点映射到第一虚拟节点。In some embodiments, after obtaining the node information of the server device, the relay device can create a first virtual node corresponding to the server device, and map the node of the server device to the first virtual node.
图8示出了中继设备映射服务端设备的节点的一个具体示例。参见图8,假设中继设备包括原有节点Node0,即提供中继服务的节点。中继设备的原有节点Node0包含3个端点。当中继设备需要与具有开关能力的服务端设备的节点Node0建立中继关系时,中继设备可以获取服务端设备的节点Node0的3个端点中的2个业务端点EP1、EP2,以及两个业务端点EP1、EP2包含的功能集群、功能集群所包含的属性列表和命令列表等信息。然后,中继设备可以创建一个虚拟节点Node1,并将服务端设备的节点Node0上的端点EP1、EP2及其包含的功能集群、功能集群所包含的属性列表和命令列表全部映射到虚拟节点Node1。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 the original node Node0, that is, the node that provides relay services. The original node Node0 of the relay device contains 3 endpoints. When the relay device needs to establish a relay relationship with the node Node0 of the server device with switching capability, the relay device can obtain 2 service endpoints EP1 and EP2 among the 3 endpoints of the node Node0 of the server device, as well as two services Information such as the functional clusters contained in endpoints EP1 and EP2, the attribute list and command list contained in the functional clusters. Then, the relay device can create a virtual node Node1, and map the endpoints EP1 and EP2 on the node Node0 of the server device and the functional clusters they contain, as well as the attribute list and command list contained in the functional clusters, to the virtual node Node1.
在该示例中,虚拟节点Node1中包含服务端设备的节点Node0中的2个业务端点EP1、EP2。不过本申请实施例并不限定于此,在一些实施例中,中继设备可以将服务端设备的节点Node0的所有端点(该示例中为3个端点),以及所有端点包含的功能集群、功能集群所包含的属性列表和命令列表等信息均映射到虚拟节点Node1。In this example, the virtual node Node1 contains two service endpoints EP1 and EP2 in the node Node0 of the server device. However, the embodiments of the present application are not limited to this. In some embodiments, the relay device can connect all endpoints of the node Node0 of the server device (3 endpoints in this example), as well as the function clusters and functions contained in all endpoints. The attribute list, command list and other information contained in the cluster are mapped to the virtual node Node1.
在一些实施例中,中继设备增加第一虚拟节点后,可以将服务端设备的节点ID添加至中继设备的中继配置集群(RelayConfiguration Cluster)中,例如,可以添加至中继配置集群中的目标节点(或称,目标列表,TargetList)字段中。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 relay configuration cluster. In the target node (or target list, TargetList) field.
中继设备中包含的中继配置集群可以用于让用户配置中继设备所中继的服务端设备。中继配置集 群中包含的属性可以参见表8。The relay configuration cluster included in the relay device can be used to allow users to configure the server devices that the relay device relays. The attributes included in the relay configuration cluster can be seen in Table 8.
表8Table 8
Figure PCTCN2022118195-appb-000005
Figure PCTCN2022118195-appb-000005
其中,N表示该属性是非易失性的,并且在设备重启后依然有效。W表示写权限。Among them, N means that the attribute is non-volatile and remains valid after the device is restarted. W means write permission.
ConfigurationStruct可以包括的字段可以参见表9。The fields that ConfigurationStruct can include can be found in Table 9.
表9Table 9
Figure PCTCN2022118195-appb-000006
Figure PCTCN2022118195-appb-000006
其中,网络标识用于指示设备所在网络的索引。目标列表是指示中继设备所中继的服务端设备的节点ID的列表。Among them, the network identifier is used to indicate the index of the network where the device is located. The target list is a list indicating node IDs of server devices to which the relay device relays.
在一些实施例中,中继设备可以扩展自身命令的命令路径信息块的编码信息。具体而言,可以在命令路径信息块的编码信息中添加第一元素(节点元素)。该第一元素可以用于指示发送给中继设备的命令所对应的服务端设备的节点信息。In some embodiments, the relay device may extend the encoding information of the command path information block of its own command. Specifically, a first element (node element) may be added to the encoding information of the command path information block. The first element may be used to indicate node information of the server device corresponding to the command sent to the relay device.
示例性地,命令路径信息块的编码信息的内容可以参见表10。For example, the content of the encoding information of the command path information block can be seen in Table 10.
表10Table 10
元素element 解释explain 标签类型Tag type 标签号tag number TLV类型TLV type 范围scope
Node(节点)Node   上下文标签contextual tags 00 无符号整数unsigned integer 64比特64 bits
Endpoint(端点)Endpoint   上下文标签 contextual tags 11 无符号整数unsigned integer 16比特16 bits
Cluster(功能集群)Cluster (functional cluster)   上下文标签contextual tags 22 无符号整数unsigned integer 32比特32 bits
Command(命令)Command   上下文标签contextual tags 33 无符号整数unsigned integer 32比特32 bits
如此一来,中继设备接收到客户端设备发送的命令后,根据该命令对应的命令路径信息块的编码信息,可以准确知道该命令是发送给哪个服务端设备的,进而准确地将该命令转发给对应的服务端设备。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 server device. Forwarded to the corresponding server device.
作为一种可能的实现方式,中继设备接收到客户端设备发送的命令后,可以根据命令路径信息块的编码信息中“节点”这一元素所记录的节点ID,确定该命令是发送给中继设备中的第一虚拟节点,然后根据第一虚拟节点和服务端设备的节点之间的映射关系,将该命令转发给对应的服务端设备。As a possible implementation method, after receiving the command sent by the client device, the relay device can determine whether the command is sent to the center based on the node ID recorded in the "node" element in the encoding information of the command path information block. The first virtual node in the relay device, and then forwards the command to the corresponding server device according to the mapping relationship between the first virtual node and the node of the server device.
作为另一种可能的实现方式,中继设备接收到客户端设备发送的命令后,可以根据命令路径信息块的编码信息中“节点”这一元素所记录的节点ID,直接确定该命令是发送给哪个服务端设备的,并将该命令转发给对应的服务端设备。As another possible implementation, after receiving the command sent by the client device, the relay device can directly determine whether the command is sent based on the node ID recorded in the "node" element in the encoding information of the command path information block. Which server device it is for, and forward the command to the corresponding server device.
在中继设备创建第一虚拟节点映射服务端设备的情况下,客户端设备向中继设备发送第一命令时,第一命令可以与第三命令路径信息块关联。该第三命令路径信息块的编码信息可以包括服务端设备的节点ID,第一命令所在端点的端点标识,第一命令所在功能集群的标识,以及第一命令的标识。例如,第三命令路径信息块的编码信息可以表示为:<服务端设备的节点ID>/<第一命令所在端点的端点标识>/<第一命令所在功能集群的标识>/<第一命令的标识>。In the case where the relay device creates the first virtual node mapping server device, when the client device sends the first command to the relay device, the first command may be associated with the 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 identification of the endpoint where the first command is located>/<identification of the functional cluster where the first command is located>/<first command The logo>.
在一些实施例中,客户端设备向中继设备发送的第一命令对应的路径节点为中继设备节点,该中继设备节点可以理解为中继设备的原有节点。In some embodiments, the path node corresponding to the first command sent by the client device to the relay device is the relay device node, and the relay device node can be understood as the original node of the relay device.
在中继设备创建第一虚拟节点映射服务端设备的情况下,中继设备向服务端设备转发第一命令时,第一命令可以与第四命令路径信息块关联。该第四命令路径信息块的编码信息可以包括第一命令所在端点的端点标识,第一命令所在功能集群的标识,以及第一命令的标识。例如,第四命令路径信息块的编码信息可以表示为:<第一命令所在端点的端点标识>/<第一命令所在功能集群的标识>/<第一命令的标识>。In the case where the relay device creates the first virtual node mapping server device, when the relay device forwards the first command to the server device, the first command may be associated with the fourth command path information block. The encoding information of the fourth command path information block may include an endpoint identifier of the endpoint where the first command is located, an identifier of the functional cluster where the first command is located, and an 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>/<identification of the functional cluster where the first command is located>/<identification of the first command>.
图9为本申请又一实施例提供的命令的传输方法的流程示意图。如图9所示,图9的方法还可以包括步骤S910至步骤S940。下面对这些步骤进行介绍。FIG. 9 is a schematic flowchart of a command transmission method provided by yet another embodiment of the present application. As shown in Figure 9, the method in Figure 9 may also include steps S910 to S940. These steps are described below.
在步骤S910,客户端设备向中继设备发送第二消息,第二消息用于查询中继配置集群中的目标节点信息,该目标节点信息记录有服务端设备的节点ID。In step S910, the client device sends a second message to the relay device. The second message is used to query the target node information in the relay configuration cluster. The target node information records the node ID of the server device.
在一些实施例中,目标节点信息可以是指上文提及的目标列表的相关信息,该目标列表中可以记录有一个或多个被中继的服务端设备的节点ID。In some embodiments, the target node information may refer to information related to the target list mentioned above, and the target list may record the node IDs of one or more relayed server devices.
在步骤S920,中继设备向客户端设备发送目标节点信息。In step S920, the relay device sends the target node information to the client device.
客户端设备可以通过查询中配置集群中的目标列表,确定某个服务端设备是否由该中继设备中继,以便通过该中继设备进行命令的转发。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 that commands can be forwarded through the relay device.
在一些实施例中,目标节点信息可以用于客户端设备根据节点标识显示该节点标识对应的服务端设备,例如,在客户端设备仅显示该节点标识对应的服务端设备,以方便用户控制。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, the client device only displays the server device corresponding to the node identifier to facilitate user control.
在步骤S930,客户端设备向中继设备发送第一命令。In step S930, the client device sends a first command to the relay device.
在步骤S940,中继设备向服务端设备转发第一命令。In step S940, the relay device forwards the first command to the server device.
关于步骤S930和步骤S940的相关描述,可以参见前文步骤S410和步骤S420的描述,此处不再赘述。For relevant descriptions of step S930 and step S940, please refer to the previous description of step S410 and step S420, which will not be described again here.
在一些实施例中,客户端设备得到中继设备中的第一虚拟节点对应的服务端设备的节点ID后,还可以根据该服务端设备的节点ID,建立第一虚拟节点与客户端设备直连的服务端设备之间的指向关系。在一些实施例中,该指向关系可以用于客户端设备根据节点标识显示该节点标识对应的服务端设备,例如,在客户端设备仅显示该节点标识对应的服务端设备,以方便用户控制。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 direct connection between the first virtual node and the client device based on the node ID of the server device. The pointing relationship between connected server devices. In some embodiments, the pointing relationship can be used by the client device to display the server device corresponding to the node identifier according to the node identifier. For example, the client device only displays the server device corresponding to the node identifier to facilitate user control.
继续参见图9,在一些实施例中,图9所示的方法还可以包括步骤S925。在步骤S925,客户端设备根据服务端设备的节点ID,建立第一虚拟节点与客户端设备直连的服务端设备之间的指向关系。Continuing to refer to Figure 9, in some embodiments, the method shown in Figure 9 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 according to the node ID of the server device.
例如,服务端设备为智能空调A,在本地发现连接时,客户端设备已经与该服务端设备建立过控制关系,并将该服务端设备显示在客户端设备的可控设备列表中。当客户端设备从中继设备的目标节点信息中得到第一节点ID,第一节点ID是与第一虚拟节点对应的,且第一节点ID与之前本地连接的智能空调A的节点ID相同,则客户端设备可以将中继设备的第一虚拟节点指向可控设备列表中的智能空调A,以建立第一虚拟节点与客户端设备直连的服务端设备之间的指向关系。For example, the server device is smart air conditioner A. When the connection is discovered locally, the client device has established a control relationship with the server device and displays the server device in the controllable device list of the client device. 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, then The client device can point the first virtual node of the relay device to the 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.
在一些实施例中,中继设备、客户端设备、服务端设备均可以在同一个网络中。在一些实施例中,中继设备、客户端设备、服务端设备可能位于不同的网络中,本申请实施例对此并不限定。In some embodiments, the relay device, client device, and server device may all be in the same network. In some embodiments, the relay device, client device, and server device may be located in different networks, which is not limited in the embodiments of the present application.
为了便于理解,下文结合图10至图12,以基于Matter协议通信场景为例介绍本申请实施例的方法流程。需要说明的是,在基于Matter协议的通信场景中,上文的客户端设备又可以称为Matter客户端设备,上文的服务端设备又可以称为Matter服务端设备。另外,图10至图12所示的方法中涉及的功能集群在上文中详细进行了介绍,为了简洁,下文不再赘述。For ease of understanding, the method flow of the embodiment of the present application will be introduced below with reference to Figures 10 to 12, taking a communication scenario based on the Matter protocol as an example. It should be noted that in a communication scenario based on the Matter protocol, the above client device can also be called a Matter client device, and the above server device can also be called 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 simplicity, they will not be described again below.
需要说明的是,本申请实施例对各步骤的执行顺序不作具体限定。下文的顺序只是示例性说明。在实际执行时,可以仅执行列举的步骤中的部分步骤,也可以执行比列举的步骤更多的步骤。或者,在实际执行时,执行的顺序也可以进行调换等。以图10中所示的步骤为例,步骤S1060在某些方案中可以不执行,或者,S1060在某些方案中可以在步骤S1070或者S1080之后执行均可,本申请实施例对此并不限定。It should be noted that the embodiments of the present application do not specifically limit the execution order of each step. The following sequence is an illustration only. During actual execution, only some of the listed steps may be executed, or more steps than the listed steps may be executed. Alternatively, during actual execution, the order of execution may be exchanged. 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 are not limited to this. .
在一些实施例中,服务端设备例如可以是指用户家中的智能家居设备,中继设备例如可以是指路由器,用户可以通过终端设备上的APP作为客户端(即,客户端设备为终端设备)实现通过路由器对智能家居设备的控制。In some embodiments, the server device may refer to a smart home device in the user's home, for example, the relay device may refer to a router, and the user may act as a client through an APP on the terminal device (that is, the client device is a terminal device) Realize the control of smart home devices through the router.
图10为本申请又一实施例提供的命令的传输方法的流程示意图。图10所示的方法可以包括步骤S1010至步骤S1080。Figure 10 is a schematic flowchart of a command transmission method provided by yet another embodiment of the present application. The method shown in FIG. 10 may include steps S1010 to S1080.
在步骤S1010中,中继设备获取服务端设备的第一业务端点的信息。In step S1010, the relay device obtains information about the first service endpoint of the server device.
该服务端设备可以理解为中继设备对应的被中继的目标设备,或者目标服务端设备。The server device can be understood as a relayed target device corresponding to the relay device, or a target server device.
在一些实施例中,中继设备可以读取服务端设备的节点、端点、以及功能集群的信息,并向该服务端设备中的业务功能集群发起订阅请求,以请求订阅业务功能集群所包含的属性列表和命令列表。相应地,在服务端设备允许上述订阅请求的情况下,服务端设备可以向中继设备发送该业务功能集群所包含的属性列表和命令列表。In some embodiments, the relay device can read the information of nodes, endpoints, and functional clusters of the server device, and initiate a subscription request to the business function cluster in the server device to request to subscribe to the information contained in the business function cluster. Property list and command list. Correspondingly, when the server device allows the above subscription request, the server device can send the attribute list and command list included in the business function cluster to the relay device.
在步骤S1020,中继设备创建第一虚拟端点。In step S1020, the relay device creates a first virtual endpoint.
第一虚拟端点与上述第一业务端点具有映射关系。或者说,中继设备可以将第一业务端点的全部功能集群及其包含的属性和命令映射到创建的第一虚拟端点。The first virtual endpoint has a mapping relationship with the above-mentioned first service endpoint. In other words, the relay device can map all functional clusters of the first service endpoint and the attributes and commands it contains to the created first virtual endpoint.
进一步地,中继设备可以将第一虚拟端点中的描述符功能集群的原节点标识(OriginNodeID)属性值设置为服务端设备的节点ID。Further, the relay device may set the original node identification (OriginNodeID) attribute value of the descriptor function cluster in the first virtual endpoint to the node ID of the server device.
在步骤S1030,客户端设备查询第一虚拟端点的端点信息。In step S1030, the client device queries the endpoint information of the first virtual endpoint.
客户端设备通过查询第一虚拟端点的端点信息,可以获取第一虚拟端点的可控制接口等描述信息。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.
在步骤S1040,中继设备将第一虚拟端点的描述符功能集群属性返回给客户端设备。In step S1040, the relay device returns the descriptor function cluster attribute of the first virtual endpoint to the client device.
在步骤S1050,客户端设备从第一虚拟端点的描述符功能集群属性中得到原节点标识属性信息,即得到服务端设备的节点ID。In step S1050, the client device obtains the 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.
在一些实施例中,客户端设备也可以直接查询第一虚拟端点的描述符功能集群的原节点标识属性, 得到服务端设备的节点ID。In some embodiments, the client device can 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.
在步骤S1060,客户端设备通过得到的服务端设备的节点ID,与在本地发现连接中得到的该服务端设备建立指向关系。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.
例如,服务端设备为智能空调A,则在本地发现连接时客户端设备已经与该设备建立过控制关系,并将该设备显示在客户端设备的可控设备列表中,当客户端设备通过中继设备发现了设备类型为空调的端点,且原节点标识属性的值与之前本地连接的智能空调A的节点ID相同,则客户端设备可以将中继设备的对应的端点(第一虚拟端点)指向可控设备列表中的智能空调A。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 passes If the relay device discovers an endpoint whose device type is an air conditioner, 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 transfer the corresponding endpoint (first virtual endpoint) of the relay device to Point to smart air conditioner A in the controllable device list.
在步骤S1070,客户端设备向中继设备的第一虚拟端点发送第一命令。In step S1070, the client device sends a first command to the first virtual endpoint of the relay device.
第一命令对应的路径的节点为中继设备节点,第一命令对应的命令路径信息块的编码信息包括<第一虚拟端点的端点标识>/<第一命令所在功能集群的标识>/<第一命令的标识>。The node of the path corresponding to the first command is a relay device node. The encoding information of the command path information block corresponding to the first command includes <endpoint identification of the first virtual endpoint>/<identification of the functional cluster where the first command is located>/<th The identifier of a command>.
在步骤S1080,中继设备向服务端设备转发第一命令。In step S1080, the relay device forwards the first command to the server device.
中继设备收到第一命令后,可以根据第一虚拟端点和第一业务端点的映射关系(或称,中继关系),将第一命令转发给服务端设备。具体地,中继设备可以将第一命令发送给服务端设备的以下路径:第一命令对应的路径的节点为服务端设备节点,第一命令对应的命令路径信息块的编码信息包括<第一业务端点的端点标识>/<第一命令所在功能集群的标识>/<第一命令的标识>。After receiving the first command, the relay device may forward the first command to the server device according to the mapping relationship (or relay relationship) between the first virtual endpoint and the first service endpoint. Specifically, the relay device may send the first command 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 <first Endpoint identification of the business endpoint>/<Identity of the functional cluster where the first command is located>/<Identity of the first command>.
图11为本申请又一实施例提供的命令的传输方法的流程示意图。图11所示的方法可以包括步骤S1110至步骤S1190。Figure 11 is a schematic flowchart of a command transmission method provided by yet another embodiment of the present application. The method shown in FIG. 11 may include steps S1110 to S1190.
在步骤S1110中,中继设备获取服务端设备的第一业务端点的信息。In step S1110, the relay device obtains the information of the first service endpoint of the server device.
在步骤S1120,中继设备创建第一虚拟端点。In step S1120, the relay device creates a first virtual endpoint.
针对服务端设备的第一业务端点,中继设备创建第一虚拟端点,第一虚拟端点与上述第一业务端点具有映射关系。或者说,中继设备可以将第一业务端点的全部功能集群及其包含的属性和命令映射到第一虚拟端点。For the first service endpoint of the server device, the relay device creates a first virtual endpoint, and the first virtual endpoint has a mapping relationship with the first service endpoint. In other words, the relay device can map all functional clusters of the first service endpoint and the attributes and commands they contain to the first virtual endpoint.
进一步地,中继设备可以在第一虚拟端点中增加第一功能集群,该第一功能集群为新的功能集群,该新的功能集群用于专门记录第一虚拟端点所中继的服务端设备的节点的信息。Further, the relay device can add a first functional cluster to the first virtual endpoint. The first functional cluster is a new functional cluster. The new functional cluster is used to specifically record the server device relayed by the first virtual endpoint. node information.
在步骤S1130,客户端设备查询第一功能集群的信息。In step S1130, the client device queries the information of the first functional cluster.
客户端设备通过查询第一功能集群的信息,可以获取第一虚拟端点对应的服务端设备的节点ID。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.
在步骤S1140,中继设备将该第一功能集群的属性返回给客户端设备。In step S1140, the relay device returns the attributes of the first functional cluster to the client device.
在步骤S1150,客户端设备从第一功能集群属性中得到原节点标识属性信息,即得到服务端设备的节点ID。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.
在一些实施例中,客户端设备也可以直接查询第一功能集群中的原节点标识属性,得到服务端设备的节点ID。In some embodiments, the client device can also directly query the original node identification attribute in the first functional cluster to obtain the node ID of the server device.
在步骤S1160,客户端设备从第一功能集群的属性信息中得到原节点所在网络的网络标识,即得到服务端设备所在网络的网络标识。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, the client device obtains the network identifier of the network where the server device is located.
在步骤S1170,客户端设备通过得到的服务端设备的节点ID,与在本地发现连接中得到的该服务端设备建立指向关系。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.
例如,服务端设备为智能空调A,则在本地发现连接时客户端设备已经与该设备建立过控制关系,并将该设备显示在客户端设备的可控设备列表中,当客户端设备通过中继设备发现了设备类型为空调的端点,且原节点标识属性的值与之前本地连接的智能空调A的节点ID相同,则客户端设备可以将中继设备的对应的端点(第一虚拟端点)指向可控设备列表中的智能空调A。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 passes If the relay device discovers an endpoint whose device type is an air conditioner, 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 transfer the corresponding endpoint (first virtual endpoint) of the relay device to Point to smart air conditioner A in the controllable device list.
进一步地,如果需要结合网络标识与节点ID唯一关联服务端设备,也可以将得到的原节点所在网络的标识与实际服务端设备的节点所在网络的网络标识进行比较,以确定是否匹配,其中,原节点所在网络的标识是从第一虚拟端点的第一功能集群中的网络标识属性中得到的。Further, if it is necessary to uniquely associate the server device with the network identifier and the node ID, the obtained 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 there is a match, where, The identity of the network where the original node is located is obtained from the network identity attribute in the first functional cluster of the first virtual endpoint.
在步骤S1180,客户端设备向中继设备的第一虚拟端点发送第一命令。In step S1180, the client device sends a first command to the first virtual endpoint of the relay device.
第一命令对应的路径的节点为中继设备节点,第一命令对应的命令路径信息块的编码信息包括<第一虚拟端点的端点标识>/<第一命令所在功能集群的标识>/<第一命令的标识>。The node of the path corresponding to the first command is a relay device node. The encoding information of the command path information block corresponding to the first command includes <endpoint identification of the first virtual endpoint>/<identification of the functional cluster where the first command is located>/<th The identifier of a command>.
在步骤S1190,中继设备向服务端设备转发第一命令。In step S1190, the relay device forwards the first command to the server device.
中继设备收到第一命令后,可以根据第一虚拟端点和第一业务端点的映射关系(或称,中继关系),将第一命令转发给服务端设备。具体地,中继设备可以将第一命令发送给服务端设备的以下路径:第一命令对应的路径的节点为服务端设备节点,第一命令对应的命令路径信息块的编码信息包括<第一业务端点的端点标识>/<第一命令所在功能集群的标识>/<第一命令的标识>。After receiving the first command, the relay device may forward the first command to the server device according to the mapping relationship (or relay relationship) between the first virtual endpoint and the first service endpoint. Specifically, the relay device may send the first command 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 <first Endpoint identification of the business endpoint>/<Identity of the functional cluster where the first command is located>/<Identity of the first command>.
图12为本申请又一实施例提供的命令的传输方法的流程示意图。图12所示的方法可以包括步骤S1210至步骤S1280。Figure 12 is a schematic flowchart of a command transmission method provided by yet another embodiment of the present application. The method shown in FIG. 12 may include steps S1210 to S1280.
在步骤S1210中,中继设备获取服务端设备的节点的信息,服务端设备的节点ID为AAA。In step S1210, the relay device obtains node information of the server device, and the node ID of the server device is AAA.
在步骤S1220,中继设备创建第一虚拟节点。In step S1220, the relay device creates a first virtual node.
针对服务端设备的节点,中继设备创建第一虚拟节点,并将服务端设备的节点包含的业务端点(以及业务端点包含的全部功能集群及其包含的属性和命令)映射到第一虚拟节点。For the node of the server device, the relay device creates a first virtual node, and maps the business endpoint contained in the node of the server device (as well as all the functional clusters contained in the business endpoint and the attributes and commands it contains) to the first virtual node .
进一步地,中继设备可以建立第一虚拟节点和服务端设备的节点ID的关联关系,即建立第一虚拟节点与节点ID AAA的关联关系。Further, the relay device can establish an association between the first virtual node and the node ID of the server device, that is, establish an association between the first virtual node and the node ID AAA.
在步骤S1230,客户端设备查看中继设备的原有节点的中继配置功能集群,以查看中继配置功能集群的目标列表属性。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.
例如,客户端设备可以查看原有节点中的端点EP0,端点EP0的设备类型为“根节点”,端点EP0包括上文的中继配置功能集群。For example, the client device can view the endpoint EP0 in the original node. The device type of the endpoint EP0 is "root node". The endpoint EP0 includes the relay configuration function cluster mentioned above.
客户端设备通过查询该目标列表属性,可以确定中继设备能否中继节点ID为AAA的服务端设备。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.
在步骤S1240,中继设备将目标列表属性的目标节点列表返回给客户端设备。In step S1240, the relay device returns the target node list of the target list attribute to the client device.
在步骤S1250,客户端设备从目标列表属性的目标节点列表得到节点ID AAA,即得到服务端设备的节点ID。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.
在步骤S1260,客户端设备通过得到的服务端设备的节点ID,与在本地发现连接中得到的该服务端设备建立指向关系。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.
例如,服务端设备为智能空调A,则在本地发现连接时客户端设备已经与该设备建立过控制关系,并将该设备显示在客户端设备的可控设备列表中,当客户端设备从中继设备的目标节点列表中得到节点ID AAA,且AAA与之前本地连接的智能空调A的节点ID相同,则客户端设备可以将中继设备的对应的节点(第一虚拟节点)指向可控设备列表中的智能空调A。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 displays the device in the controllable device list of the client device. The node ID AAA is obtained in the target node list of the device, and AAA is the same as the node ID of the previously locally connected smart air conditioner A, then the client device can point the corresponding node (first virtual node) of the relay device to the controllable device list Smart air conditioner in A.
在步骤S1270,客户端设备向中继设备的原有节点发送第一命令。In step S1270, the client device sends the first command to the original node of the relay device.
第一命令对应的路径的节点为中继设备节点,第一命令对应的命令路径信息块的编码信息包括<服务端设备的节点ID>/<第一命令所在端点的端点标识>/<第一命令所在功能集群的标识>/<第一命令的标识>。The node of the path corresponding to the first command is a relay device node. 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>/<first The identifier of the functional cluster where the command is located>/<the identifier of the first command>.
在步骤S1280,中继设备向服务端设备转发第一命令。In step S1280, the relay device forwards the first command to the server device.
具体地,中继设备收到第一命令后,可以根据第一虚拟节点和节点ID AAA的映射关系(或称,关联关系)确定第一命令是发给第一虚拟节点的,并根据第一虚拟节点与服务端设备的映射关系将第一命令转发给服务端设备。具体地,可以将第一命令发送给服务端设备的以下路径:第一命令对应的路径的节点为服务端设备节点,第一命令对应的命令路径信息块的编码信息包括<第一命令所在端点的端点标识>/<第一命令所在功能集群的标识>/<第一命令的标识>。Specifically, after receiving the first command, the relay device can determine that the first command is sent to the first virtual node according to the mapping relationship (or association relationship) between the first virtual node and the node ID AAA, and determine the first command according to the first virtual node. The mapping relationship between the virtual node and the server device forwards the first command to 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 where the first command is located The endpoint identifier>/<the identifier of the functional cluster where the first command is located>/<the identifier of the first command>.
上文结合图1至图12,详细描述了本申请的方法实施例,下面结合图13至图16,详细描述本申请的装置实施例。应理解,方法实施例的描述与装置实施例的描述相互对应,因此,未详细描述的部分可以参见前面方法实施例。The method embodiments of the present application are described in detail above with reference to FIGS. 1 to 12 , and the device embodiments of the present application are described in detail below with reference to FIGS. 13 to 16 . It should be understood that the description of the method embodiments corresponds to the description of the device embodiments. Therefore, for parts not described in detail, please refer to the previous method embodiments.
图13为本申请实施例提供的中继设备的结构示意图。图13所示的中继设备1300可以用于命令的传输,该中继设备1300包括第一接收模块1310和第一发送模块1320。Figure 13 is a schematic structural diagram of a relay device provided by an embodiment of the present application. The relay device 1300 shown in Figure 13 can be used for command transmission. The relay device 1300 includes a first receiving module 1310 and a first sending module 1320.
第一接收模块1310可以用于接收客户端设备发送的第一命令。The first receiving module 1310 may be used to receive the first command sent by the client device.
第一发送模块1320可以用于向服务端设备转发所述第一命令,其中,所述服务端设备的节点标识记录在以下一种或多种信息之中:第一虚拟设备的设备信息,其中,所述第一虚拟设备为所述中继设备中的与所述服务端设备具有映射关系的虚拟设备;所述第一命令对应的命令路径信息块的编码信息。The first sending module 1320 may be used to forward the first command to the server device, where 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 the encoding information of the command path information block corresponding to the first command.
可选地,服务端设备包括第一业务端点,所述第一虚拟设备包括与所述第一业务端点具有映射关系的第一虚拟端点,所述节点标识记录在所述第一虚拟端点的端点信息中。Optionally, the server device includes a first service endpoint, the first virtual device includes a first virtual endpoint that has a mapping relationship with the first service endpoint, and the node identification is recorded in the endpoint of the first virtual endpoint. information.
可选地,第一虚拟端点包括第一功能集群,所述节点标识记录在所述第一功能集群中;其中,所述第一功能集群为以下功能集群中的一种:用于描述所述第一虚拟端点的功能集群;以及专门用于记录所述第一虚拟端点所中继的节点的功能集群。Optionally, the first virtual endpoint includes a first functional cluster, and the node identification is recorded in the first functional cluster; wherein the first functional cluster is one of the following functional clusters: used to describe the A functional cluster of the first virtual endpoint; and a functional cluster dedicated to recording the node to which the first virtual endpoint is relayed.
可选地,中继设备1300还包括:第二接收模块,用于接收所述客户端设备发送的第一消息,所述第一消息用于查询所述第一功能集群;第二发送模块,用于向所述客户端设备发送第一响应,所述第一响应包含所述第一功能集群的信息。Optionally, the relay device 1300 further includes: a second receiving module, configured to receive a first message sent by the client device, where the first message is used to query the first functional cluster; a second sending module, Used to send a first response to the client device, where the first response contains information about the first functional cluster.
可选地,所述第一功能集群的信息用于所述客户端设备根据所述节点标识显示所述节点标识对应的服务端设备。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.
可选地,第一虚拟端点的端点信息中记录有所述服务端设备所在网络的网络标识。Optionally, the endpoint information of the first virtual endpoint records the network identifier of the network where the server device is located.
可选地,所述中继设备接收到的所述第一命令与第一命令路径信息块关联,所述第一命令路径信息块的编码信息包括所述第一虚拟端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命 令的标识;和/或,所述中继设备向所述服务端设备发送的所述第一命令与第二命令路径信息块关联,所述第二命令路径信息块的编码信息包括所述第一业务端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识。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 identification of the first virtual endpoint, and the 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 the second command path information block, so 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.
可选地,第一虚拟设备包括与所述服务端设备具有映射关系的第一虚拟节点。Optionally, the first virtual device includes a first virtual node that has a mapping relationship with the server device.
可选地,中继设备1300还包括:第三接收模块,用于接收所述客户端设备发送的第二消息,所述第二消息用于查询中继配置集群中的目标节点信息,所述目标节点信息记录有所述节点标识;第三发送模块,用于向所述客户端设备发送所述目标节点信息。Optionally, the relay device 1300 further includes: a third receiving module, configured to receive a second message sent by the client device, where the second message is used to query the target node information in the relay configuration cluster, the The target node information is recorded with the node identifier; a third sending module is used to send the target node information to the client device.
可选地,所述目标节点信息用于所述客户端设备根据所述节点标识显示所述节点标识对应的服务端设备。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.
可选地,所述中继设备接收到的所述第一命令与第三命令路径信息块关联,所述第三命令路径信息块的编码信息包括所述节点标识,所述第一命令所在端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识;和/或,所述中继设备向所述服务端设备发送的所述第一命令与第四命令路径信息块关联,所述第四命令路径信息块的编码信息包括所述第一命令所在端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识。Optionally, the first command received by the relay device is associated with a third command path information block, the encoding information of the third command path information block includes the node identifier, and the endpoint where the first command is located The endpoint identifier, the identifier of the functional cluster where the first command is located, and the identifier of the first command; and/or, the first command and the fourth command sent by the relay device to the server device Path information block association, 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.
图14为本申请实施例提供的客户端设备的结构示意图。图14所示的客户端设备1400可以用于命令的传输,该客户端设备1400包括第一发送模块1410。Figure 14 is a schematic structural diagram of a client device provided by an embodiment of the present application. The client device 1400 shown in FIG. 14 can be used for command transmission, and the client device 1400 includes a first sending module 1410.
第一发送模块1410可以用于向中继设备发送第一命令,所述第一命令用于对服务端设备进行控制,所述第一命令是通过所述中继设备转发给所述服务端设备的;其中,所述服务端设备的节点标识记录在以下一种或多种信息之中:第一虚拟设备的设备信息,其中,所述第一虚拟设备为所述中继设备中的与所述服务端设备具有映射关系的虚拟设备;所述第一命令对应的命令路径信息块的编码信息。The first sending module 1410 may be used to send a first command to the relay device. The first command is used to control the server device. The first command is forwarded to the server device through the relay device. ; wherein the node identification 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 the same as all the relay devices in the relay device. The server device has a virtual device with a mapping relationship; and the encoding information of the command path information block corresponding to the first command.
可选地,服务端设备包括第一业务端点,所述第一虚拟设备包括与所述第一业务端点具有映射关系的第一虚拟端点,所述节点标识记录在所述第一虚拟端点的端点信息中。Optionally, the server device includes a first service endpoint, the first virtual device includes a first virtual endpoint that has a mapping relationship with the first service endpoint, and the node identification is recorded in the endpoint of the first virtual endpoint. information.
可选地,第一虚拟端点包括第一功能集群,所述节点标识记录在所述第一功能集群中;其中,所述第一功能集群为以下功能集群中的一种:用于描述所述第一虚拟端点的功能集群;以及专门用于记录所述第一虚拟端点所中继的节点的功能集群。Optionally, the first virtual endpoint includes a first functional cluster, and the node identification is recorded in the first functional cluster; wherein the first functional cluster is one of the following functional clusters: used to describe the A functional cluster of the first virtual endpoint; and a functional cluster dedicated to recording the node to which the first virtual endpoint is relayed.
可选地,客户端设备1400还包括:第二发送模块1420,用于向所述中继设备发送第一消息,所述第一消息用于查询所述第一功能集群;第一接收模块,用于接收所述中继设备发送的第一响应,所述第一响应包含所述第一功能集群的信息。Optionally, the client device 1400 further includes: a second sending module 1420, used to send a first message to the relay device, where the first message is used to query the first functional cluster; a first receiving module, Used to receive a first response sent by the relay device, where the first response contains information about the first functional cluster.
可选地,第一虚拟端点的端点信息中记录有所述服务端设备所在网络的网络标识。Optionally, the endpoint information of the first virtual endpoint records the network identifier of the network where the server device is located.
可选地,所述客户端设备向所述中继设备发送的所述第一命令与第一命令路径信息块关联,所述第一命令路径信息块的编码信息包括所述第一虚拟端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识;和/或,所述中继设备向所述服务端设备发送的所述第一命令与第二命令路径信息块关联,所述第二命令路径信息块的编码信息包括所述第一业务端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识。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 first virtual endpoint. The endpoint identifier, the identifier of the functional cluster where the first command is located, and the identifier of the first command; and/or the first command and the second command path sent by the relay device to the server device Information block association, 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.
可选地,客户端设备1400还包括:第一建立模块,用于根据所述节点标识,建立所述第一虚拟端点与所述客户端设备直连的服务端设备之间的指向关系。Optionally, the client device 1400 further includes: a first establishment module, configured to establish a pointing relationship between the first virtual endpoint and the server device directly connected to the client device according to the node identifier.
可选地,所述指向关系用于所述客户端设备根据所述节点标识显示所述节点标识对应的服务端设备。Optionally, the pointing relationship is used for the client device to display the server device corresponding to the node identifier according to the node identifier.
可选地,第一虚拟设备包括与所述服务端设备具有映射关系的第一虚拟节点。Optionally, the first virtual device includes a first virtual node that has a mapping relationship with the server device.
可选地,客户端设备1400还包括:第三发送模块,用于向所述中继设备发送第二消息,所述第二消息用于查询中继配置集群中的目标节点信息,所述目标节点信息记录有所述节点标识;第二接收模块,用于接收所述中继设备发送的目标节点信息。Optionally, the client device 1400 further includes: a third sending module, 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. The target The node information is recorded with the node identifier; the second receiving module is used to receive the target node information sent by the relay device.
可选地,所述客户端设备向所述中继设备发送的所述第一命令与第三命令路径信息块关联,所述第三命令路径信息块的编码信息包括所述节点标识,所述第一命令所在端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识;和/或,所述中继设备向所述服务端设备发送的所述第一命令与第四命令路径信息块关联,所述第四命令路径信息块的编码信息包括所述第一命令所在端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识。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, and the 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 message sent by the relay device to the server device. The command is associated with a fourth command path information block, and the encoding information of the fourth command path information block includes an endpoint identifier of the endpoint where the first command is located, an identifier of the functional cluster where the first command is located, and the first command logo.
可选地,客户端设备1400还包括:第二建立模块,用于根据所述节点标识,建立所述第一虚拟节点与所述客户端设备直连的服务端设备之间的指向关系。Optionally, the client device 1400 further includes: a second establishment module, configured to establish a pointing relationship between the first virtual node and the server device directly connected to the client device according to the node identifier.
可选地,所述指向关系用于所述客户端设备根据所述节点标识显示所述节点标识对应的服务端设备。Optionally, the pointing relationship is used for the client device to display the server device corresponding to the node identifier according to the node identifier.
图15为本申请实施例提供的服务端设备的结构示意图。图15所示的服务端设备1500可以用于命 令的传输。该服务端设备1500包括接收模块1510。Figure 15 is a schematic structural diagram of a server device provided by an embodiment of the present application. The server device 1500 shown in Figure 15 can be used for command transmission. The server device 1500 includes a receiving module 1510.
接收模块1510可以用于接收中继设备发送的第一命令,所述第一命令是客户端设备通过所述中继设备转发给所述服务端设备的;其中,所述服务端设备的节点标识记录在以下一种或多种信息之中:第一虚拟设备的设备信息,其中,所述第一虚拟设备为所述中继设备中的与所述服务端设备具有映射关系的虚拟设备;所述第一命令对应的命令路径信息块的编码信息。The receiving module 1510 may be used to receive the first command sent by the relay device, which is forwarded by the client device to the server device through the relay device; wherein, the node identifier of the server device 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; The encoding information of the command path information block corresponding to the first command.
可选地,服务端设备包括第一业务端点,所述第一虚拟设备包括与所述第一业务端点具有映射关系的第一虚拟端点,所述节点标识记录在所述第一虚拟端点的端点信息中。Optionally, the server device includes a first service endpoint, the first virtual device includes a first virtual endpoint that has a mapping relationship with the first service endpoint, and the node identification is recorded in the endpoint of the first virtual endpoint. information.
可选地,第一虚拟端点包括第一功能集群,所述节点标识记录在所述第一功能集群中;其中,所述第一功能集群为以下功能集群中的一种:用于描述所述第一虚拟端点的功能集群;以及专门用于记录所述第一虚拟端点所中继的节点的功能集群。Optionally, the first virtual endpoint includes a first functional cluster, and the node identification is recorded in the first functional cluster; wherein the first functional cluster is one of the following functional clusters: used to describe the A functional cluster of the first virtual endpoint; and a functional cluster dedicated to recording the node to which the first virtual endpoint is relayed.
可选地,第一虚拟端点的端点信息中记录有所述服务端设备所在网络的网络标识。Optionally, the endpoint information of the first virtual endpoint records the network identifier of the network where the server device is located.
可选地,所述中继设备接收到的所述第一命令与第一命令路径信息块关联,所述第一命令路径信息块的编码信息包括所述第一虚拟端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识;和/或,所述服务端设备接收到的所述第一命令与第二命令路径信息块关联,所述第二命令路径信息块的编码信息包括所述第一业务端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识。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 identification of the first virtual endpoint, and the 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 second command path The encoded information of the 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.
可选地,第一虚拟设备包括与所述服务端设备具有映射关系的第一虚拟节点。Optionally, the first virtual device includes a first virtual node that has a mapping relationship with the server device.
可选地,所述中继设备接收到的所述第一命令与第三命令路径信息块关联,所述第三命令路径信息块的编码信息包括所述节点标识,所述第一命令所在端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识;和/或,所述服务端设备接收到的所述第一命令与第四命令路径信息块关联,所述第四命令路径信息块的编码信息包括所述第一命令所在端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识。Optionally, the first command received by the relay device is associated with a third command path information block, the encoding information of the third command path information block includes the node identifier, and the endpoint where the first command is located The endpoint identifier, 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 the fourth command path information block, 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.
图16是本申请实施例的通信装置的示意性结构图。图16中的虚线表示该单元或模块为可选的。该装置1600可用于实现上述方法实施例中描述的方法。装置1600可以是芯片、终端设备或网络设备。Figure 16 is a schematic structural diagram of a communication device according to an embodiment of the present application. The dashed line in Figure 16 indicates that the unit or module is optional. The device 1600 can be used to implement the method described in the above method embodiment. Device 1600 may be a chip, terminal device or network device.
装置1600可以包括一个或多个处理器1610。该处理器1610可支持装置1600实现前文方法实施例所描述的方法。该处理器1610可以是通用处理器或者专用处理器。例如,该处理器可以为中央处理单元(central processing unit,CPU)。或者,该处理器还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。Apparatus 1600 may include one or more processors 1610. The processor 1610 can support the device 1600 to implement the method described in the foregoing method embodiments. 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 can also be another general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), or an off-the-shelf programmable gate array (FPGA) Or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
装置1600还可以包括一个或多个存储器1620。存储器1620上存储有程序,该程序可以被处理器1610执行,使得处理器1610执行前文方法实施例所描述的方法。存储器1620可以独立于处理器1610也可以集成在处理器1610中。Apparatus 1600 may also include one or more memories 1620. The memory 1620 stores a program, which can be executed by the processor 1610, so that the processor 1610 executes the method described in the foregoing method embodiment. The memory 1620 may be independent of the processor 1610 or integrated in the processor 1610.
装置1600还可以包括收发器1630。处理器1610可以通过收发器1630与其他设备或芯片进行通信。例如,处理器1610可以通过收发器1630与其他设备或芯片进行数据收发。Apparatus 1600 may also include a transceiver 1630. Processor 1610 may communicate with other devices or chips through transceiver 1630. For example, the processor 1610 can transmit and receive data with other devices or chips through the transceiver 1630.
本申请实施例还提供一种计算机可读存储介质,用于存储程序。该计算机可读存储介质可应用于本申请实施例提供的终端或网络设备中,并且该程序使得计算机执行本申请各个实施例中的由终端或网络设备执行的方法。An embodiment of the present application also provides a computer-readable storage medium for storing a program. The computer-readable storage medium can be applied in the terminal or network device provided by the embodiments of the present application, and the program causes the computer to execute the methods performed by the terminal or network device in various embodiments of the present application.
本申请实施例还提供一种计算机程序产品。该计算机程序产品包括程序。该计算机程序产品可应用于本申请实施例提供的终端或网络设备中,并且该程序使得计算机执行本申请各个实施例中的由终端或网络设备执行的方法。An embodiment of the present application also provides a computer program product. The computer program product includes a program. The computer program product can be applied in the terminal or network device provided by the embodiments of the present application, and the program causes the computer to execute the methods performed by the terminal or network device in various embodiments of the present application.
本申请实施例还提供一种计算机程序。该计算机程序可应用于本申请实施例提供的终端或网络设备中,并且该计算机程序使得计算机执行本申请各个实施例中的由终端或网络设备执行的方法。An embodiment of the present application also provides a computer program. The computer program can be applied to the terminal or network device provided by the embodiments of the present application, and the computer program causes the computer to execute the methods performed by the terminal or network device in various embodiments of the present application.
应理解,本申请中术语“系统”和“网络”可以被可互换使用。另外,本申请使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。It should be understood that the terms "system" and "network" may be used interchangeably in this application. In addition, the terms used in this application are only used to explain specific embodiments of the application and are not intended to limit the application. The terms “first”, “second”, “third” and “fourth” in the description, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific sequence. . Furthermore, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion.
在本申请的实施例中,提到的“指示”可以是直接指示,也可以是间接指示,还可以是表示具有关联关系。举例说明,A指示B,可以表示A直接指示B,例如B可以通过A获取;也可以表示A间接指示B,例如A指示C,B可以通过C获取;还可以表示A和B之间具有关联关系。In the embodiments of this application, the "instruction" mentioned may be a direct instruction, an indirect instruction, or an association relationship. For example, A indicates B, which can mean that A directly indicates B, for example, B can be obtained through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also mean that there is an association between A and B. relation.
在本申请实施例中,“与A相应的B”表示B与A相关联,根据A可以确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。In the embodiment of this application, "B corresponding to A" means that B is associated with A, and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B only based on A. B can also be determined based on A and/or other information.
在本申请实施例中,术语“对应”可表示两者之间具有直接对应或间接对应的关系,也可以表示两者之间具有关联关系,也可以是指示与被指示、配置与被配置等关系。In the embodiments of this application, the term "correspondence" can mean that there is a direct correspondence or indirect correspondence between the two, or it can also mean that there is an association between the two, or it can also mean indicating and being instructed, configuring and being configured, etc. relation.
本申请实施例中,“预定义”或“预配置”可以通过在设备(例如,包括终端设备和网络设备)中预先保存相应的代码、表格或其他可用于指示相关信息的方式来实现,本申请对于其具体的实现方式不做限定。比如预定义可以是指协议中定义的。In the embodiment of this application, "predefinition" or "preconfiguration" can be achieved by pre-saving corresponding codes, tables or other methods that can be used to indicate relevant information in devices (for example, including terminal devices and network devices). The application does not limit its specific implementation method. For example, predefined can refer to what is defined in the protocol.
本申请实施例中,所述“协议”可以指通信领域的标准协议,例如可以包括LTE协议、NR协议以及应用于未来的通信系统中的相关协议,本申请对此不做限定。In the embodiment of this application, the "protocol" may refer to a standard protocol in the communication field, which may include, for example, LTE protocol, NR protocol, and related protocols applied in future communication systems. This application does not limit this.
本申请实施例中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。The term "and/or" in the embodiment of this application is only an association relationship describing associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, and A and B exist simultaneously. , there are three situations of B alone. In addition, the character "/" in this article generally indicates that the related objects are an "or" relationship.
在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。In the various embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its functions and internal logic, and should not be determined by the implementation process of the embodiments of the present application. constitute any limitation.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。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 only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够读取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,数字通用光盘(digital video disc,DVD))或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may 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 processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transferred from a website, computer, server, or data center Transmission to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be read by a computer or a data storage device such as a server or data center integrated with one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs (DVD)) or semiconductor media (e.g., solid state disks (SSD) )wait.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application. should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (70)

  1. 一种命令的传输方法,其特征在于,包括:A command transmission method, characterized by including:
    中继设备接收客户端设备发送的第一命令;The relay device receives the first command sent by the client device;
    所述中继设备向服务端设备转发所述第一命令;The relay device forwards the first command to the server device;
    其中,所述服务端设备的节点标识记录在以下一种或多种信息之中:Wherein, the node identification 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. 根据权利要求1所述的方法,其特征在于,所述服务端设备包括第一业务端点,所述第一虚拟设备包括与所述第一业务端点具有映射关系的第一虚拟端点,所述节点标识记录在所述第一虚拟端点的端点信息中。The method of claim 1, wherein the server device includes a first service endpoint, the first virtual device includes a first virtual endpoint that has a mapping relationship with the first service endpoint, and the node The identification is recorded in the endpoint information of the first virtual endpoint.
  3. 根据权利要求2所述的方法,其特征在于,所述第一虚拟端点包括第一功能集群,所述节点标识记录在所述第一功能集群中;The method of claim 2, wherein 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 describing the first virtual endpoint; and
    专门用于记录所述第一虚拟端点所中继的节点的功能集群。A functional cluster dedicated to recording the nodes relayed by the first virtual endpoint.
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:The method of claim 3, further comprising:
    所述中继设备接收所述客户端设备发送的第一消息,所述第一消息用于查询所述第一功能集群;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. 根据权利要求3或4所述的方法,其特征在于,所述第一功能集群的信息用于所述客户端设备根据所述节点标识显示所述节点标识对应的服务端设备。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. 根据权利要求2-5中任一项所述的方法,其特征在于,所述第一虚拟端点的端点信息中记录有所述服务端设备所在网络的网络标识。The method according to any one of claims 2 to 5, characterized in that the endpoint information of the first virtual endpoint records a network identifier of the network where the server device is located.
  7. 根据权利要求2-6中任一项所述的方法,其特征在于:The method according to any one of claims 2-6, characterized in that:
    所述中继设备接收到的所述第一命令与第一命令路径信息块关联,所述第一命令路径信息块的编码信息包括所述第一虚拟端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识;和/或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 an endpoint identifier of the first virtual endpoint, where the first command is located. The identification of the functional cluster, and the identification 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 identification of the first service endpoint, so The identifier of the functional cluster where the first command is located, and the identifier of the first command.
  8. 根据权利要求1所述的方法,其特征在于,所述第一虚拟设备包括与所述服务端设备具有映射关系的第一虚拟节点。The method of claim 1, wherein the first virtual device includes a first virtual node that has a mapping relationship with the server device.
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:The method of claim 8, further comprising:
    所述中继设备接收所述客户端设备发送的第二消息,所述第二消息用于查询中继配置集群中的目标节点信息,所述目标节点信息记录有所述节点标识;The relay device receives the 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;
    所述中继设备向所述客户端设备发送所述目标节点信息。The relay device sends the target node information to the client device.
  10. 根据权利要求9所述的方法,其特征在于,所述目标节点信息用于所述客户端设备根据所述节点标识显示所述节点标识对应的服务端设备。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. 根据权利要求8-10中任一项所述的方法,其特征在于:The method according to any one of claims 8-10, characterized in that:
    所述中继设备接收到的所述第一命令与第三命令路径信息块关联,所述第三命令路径信息块的编码信息包括所述节点标识,所述第一命令所在端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识;和/或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 an 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 command transmission method, characterized by including:
    客户端设备向中继设备发送第一命令,所述第一命令用于对服务端设备进行控制,所述第一命令是通过所述中继设备转发给所述服务端设备的;The client device sends a first command to the relay device, 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 identification 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. 根据权利要求12所述的方法,其特征在于,所述服务端设备包括第一业务端点,所述第一虚拟设备包括与所述第一业务端点具有映射关系的第一虚拟端点,所述节点标识记录在所述第一虚拟端点的端点信息中。The method of claim 12, wherein the server device includes a first service endpoint, the first virtual device includes a first virtual endpoint that has a mapping relationship with the first service endpoint, and the node The identification is recorded in the endpoint information of the first virtual endpoint.
  14. 根据权利要求13所述的方法,其特征在于,所述第一虚拟端点包括第一功能集群,所述节点标识记录在所述第一功能集群中;The method of claim 13, wherein the first virtual endpoint includes a first functional cluster, and the node identification is recorded in the first functional cluster;
    其中,所述第一功能集群为以下功能集群中的一种:Wherein, the first functional cluster is one of the following functional clusters:
    用于描述所述第一虚拟端点的功能集群;以及a functional cluster describing the first virtual endpoint; and
    专门用于记录所述第一虚拟端点所中继的节点的功能集群。A functional cluster dedicated to recording the nodes relayed by the first virtual endpoint.
  15. 根据权利要求14所述的方法,其特征在于,所述方法还包括:The method of claim 14, further comprising:
    所述客户端设备向所述中继设备发送第一消息,所述第一消息用于查询所述第一功能集群;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 contains information of the first functional cluster.
  16. 根据权利要求13-15中任一项所述的方法,其特征在于,所述第一虚拟端点的端点信息中记录有所述服务端设备所在网络的网络标识。The method according to any one of claims 13 to 15, characterized in that the endpoint information of the first virtual endpoint records a network identifier of the network where the server device is located.
  17. 根据权利要求13-16中任一项所述的方法,其特征在于:The method according to any one of claims 13-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, and the encoding information of the first command path information block includes an endpoint identification of the first virtual endpoint, so 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 identification of the first service endpoint, so The identifier of the functional cluster where the first command is located, and the identifier of the first command.
  18. 根据权利要求13-17中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 13-17, characterized in that the method further includes:
    所述客户端设备根据所述节点标识,建立所述第一虚拟端点与所述客户端设备直连的服务端设备之间的指向关系。The client device establishes a pointing relationship between the first virtual endpoint and the server device directly connected to the client device according to the node identifier.
  19. 根据权利要求18所述的方法,其特征在于,所述指向关系用于所述客户端设备根据所述节点标识显示所述节点标识对应的服务端设备。The method according to claim 18, wherein the pointing relationship is used for the client device to display the server device corresponding to the node identifier according to the node identifier.
  20. 根据权利要求12所述的方法,其特征在于,所述第一虚拟设备包括与所述服务端设备具有映射关系的第一虚拟节点。The method of claim 12, wherein the first virtual device includes a first virtual node having a mapping relationship with the server device.
  21. 根据权利要求20所述的方法,其特征在于,所述方法还包括:The method of claim 20, further comprising:
    所述客户端设备向所述中继设备发送第二消息,所述第二消息用于查询中继配置集群中的目标节点信息,所述目标节点信息记录有所述节点标识;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, and the target node information records the node identifier;
    所述客户端设备接收所述中继设备发送的目标节点信息。The client device receives the target node information sent by the relay device.
  22. 根据权利要求20或21所述的方法,其特征在于: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, and the encoding information of the third command path information block includes the node identifier, where the first command is located. The endpoint identifier of the 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 fourth command path information block, and the encoding information of the fourth command path information block includes an 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. 根据权利要求20-22中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 20-22, characterized in that the method further includes:
    所述客户端设备根据所述节点标识,建立所述第一虚拟节点与所述客户端设备直连的服务端设备之间的指向关系。The client device establishes a pointing relationship between the first virtual node and the server device directly connected to the client device according to the node identifier.
  24. 根据权利要求23所述的方法,其特征在于,所述指向关系用于所述客户端设备根据所述节点标识显示所述节点标识对应的服务端设备。The method according to claim 23, characterized in that the pointing relationship is used for the client device to display the server device corresponding to the node identifier according to the node identifier.
  25. 一种命令的传输方法,其特征在于,包括:A command transmission method, characterized by including:
    服务端设备接收中继设备发送的第一命令,所述第一命令是客户端设备通过所述中继设备转发给所述服务端设备的;The server device receives the first command sent by the relay device, and the first command is forwarded by the client device to the server device through the relay device;
    其中,所述服务端设备的节点标识记录在以下一种或多种信息之中:Wherein, the node identification 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. 根据权利要求25所述的方法,其特征在于,所述服务端设备包括第一业务端点,所述第一虚 拟设备包括与所述第一业务端点具有映射关系的第一虚拟端点,所述节点标识记录在所述第一虚拟端点的端点信息中。The method of claim 25, wherein the server device includes a first service endpoint, the first virtual device includes a first virtual endpoint that has a mapping relationship with the first service endpoint, and the node The identification is recorded in the endpoint information of the first virtual endpoint.
  27. 根据权利要求26所述的方法,其特征在于,所述第一虚拟端点包括第一功能集群,所述节点标识记录在所述第一功能集群中;The method of claim 26, wherein the first virtual endpoint includes a first functional cluster, and the node identification is recorded in the first functional cluster;
    其中,所述第一功能集群为以下功能集群中的一种:Wherein, the first functional cluster is one of the following functional clusters:
    用于描述所述第一虚拟端点的功能集群;以及a functional cluster describing the first virtual endpoint; and
    专门用于记录所述第一虚拟端点所中继的节点的功能集群。A functional cluster dedicated to recording the nodes relayed by the first virtual endpoint.
  28. 根据权利要求26或27所述的方法,其特征在于,所述第一虚拟端点的端点信息中记录有所述服务端设备所在网络的网络标识。The method according to claim 26 or 27, characterized in that the endpoint information of the first virtual endpoint records a network identifier of the network where the server device is located.
  29. 根据权利要求26-28中任一项所述的方法,其特征在于:The method according to any one of claims 26-28, characterized in that:
    所述中继设备接收到的所述第一命令与第一命令路径信息块关联,所述第一命令路径信息块的编码信息包括所述第一虚拟端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识;和/或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 an endpoint identifier of the first virtual endpoint, where the first command is located. The identification of the functional cluster, and the identification 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, where the first command is located. The identifier of the functional cluster, and the identifier of the first command.
  30. 根据权利要求25所述的方法,其特征在于,所述第一虚拟设备包括与所述服务端设备具有映射关系的第一虚拟节点。The method of claim 25, wherein the first virtual device includes a first virtual node having a mapping relationship with the server device.
  31. 根据权利要求30所述的方法,其特征在于:The method according to claim 30, characterized in that:
    所述中继设备接收到的所述第一命令与第三命令路径信息块关联,所述第三命令路径信息块的编码信息包括所述节点标识,所述第一命令所在端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识;和/或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. The encoding information of the fourth command path information block includes an endpoint identifier of the endpoint where the first command is located. The first command The identifier of the functional cluster where it is located, and the identifier of the first command.
  32. 一种命令的传输装置,其特征在于,所述装置配置于中继设备,所述中继设备包括:A command transmission device, characterized in that the device is configured in a relay device, and the relay device includes:
    第一接收模块,用于接收客户端设备发送的第一命令;A first receiving module, configured to receive the first command sent by the client device;
    第一发送模块,用于向服务端设备转发所述第一命令;A first sending module, configured to forward the first command to the server device;
    其中,所述服务端设备的节点标识记录在以下一种或多种信息之中:Wherein, the node identification 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. 根据权利要求32所述的装置,其特征在于,所述服务端设备包括第一业务端点,所述第一虚拟设备包括与所述第一业务端点具有映射关系的第一虚拟端点,所述节点标识记录在所述第一虚拟端点的端点信息中。The apparatus according to claim 32, wherein 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 The identification is recorded in the endpoint information of the first virtual endpoint.
  34. 根据权利要求33所述的装置,其特征在于,所述第一虚拟端点包括第一功能集群,所述节点标识记录在所述第一功能集群中;The device according to claim 33, wherein the first virtual endpoint includes a first functional cluster, and the node identification is recorded in the first functional cluster;
    其中,所述第一功能集群为以下功能集群中的一种:Wherein, the first functional cluster is one of the following functional clusters:
    用于描述所述第一虚拟端点的功能集群;以及a functional cluster describing the first virtual endpoint; and
    专门用于记录所述第一虚拟端点所中继的节点的功能集群。A functional cluster dedicated to recording the nodes relayed by the first virtual endpoint.
  35. 根据权利要求34所述的装置,其特征在于,所述装置还包括:The device of claim 34, further comprising:
    第二接收模块,用于接收所述客户端设备发送的第一消息,所述第一消息用于查询所述第一功能集群;a second receiving module, configured to receive the 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 contains information about the first functional cluster.
  36. 根据权利要求34或35所述的装置,其特征在于,所述第一功能集群的信息用于所述客户端设备根据所述节点标识显示所述节点标识对应的服务端设备。The apparatus according to claim 34 or 35, wherein 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. 根据权利要求33-36中任一项所述的装置,其特征在于,所述第一虚拟端点的端点信息中记录有所述服务端设备所在网络的网络标识。The device according to any one of claims 33 to 36, characterized in that the endpoint information of the first virtual endpoint records a network identifier of the network where the server device is located.
  38. 根据权利要求33-37中任一项所述的装置,其特征在于:The device according to any one of claims 33-37, characterized in that:
    所述中继设备接收到的所述第一命令与第一命令路径信息块关联,所述第一命令路径信息块的编码信息包括所述第一虚拟端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识;和/或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 an endpoint identifier of the first virtual endpoint, where the first command is located. The identification of the functional cluster, and the identification 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 identification of the first service endpoint, so The identifier of the functional cluster where the first command is located, and the identifier of the first command.
  39. 根据权利要求32所述的装置,其特征在于,所述第一虚拟设备包括与所述服务端设备具有映射关系的第一虚拟节点。The apparatus according to claim 32, wherein the first virtual device includes a first virtual node having a mapping relationship with the server device.
  40. 根据权利要求39所述的装置,其特征在于,所述装置还包括:The device of claim 39, further comprising:
    第三接收模块,用于接收所述客户端设备发送的第二消息,所述第二消息用于查询中继配置集群中的目标节点信息,所述目标节点信息记录有所述节点标识;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 is recorded with the node identifier;
    第三发送模块,用于向所述客户端设备发送所述目标节点信息。The third sending module is used to send the target node information to the client device.
  41. 根据权利要求40所述的装置,其特征在于,所述目标节点信息用于所述客户端设备根据所述节点标识显示所述节点标识对应的服务端设备。The apparatus according to claim 40, wherein 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. 根据权利要求39-41中任一项所述的装置,其特征在于:The device according to any one of claims 39-41, characterized in that:
    所述中继设备接收到的所述第一命令与第三命令路径信息块关联,所述第三命令路径信息块的编码信息包括所述节点标识,所述第一命令所在端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识;和/或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 an 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 device is configured on a client device, and the client device includes:
    第一发送模块,用于向中继设备发送第一命令,所述第一命令用于对服务端设备进行控制,所述第一命令是通过所述中继设备转发给所述服务端设备的;The first sending module is used to send a first command to the relay device. The first command is used to control the server device. The first command is forwarded to the server device through the relay device. ;
    其中,所述服务端设备的节点标识记录在以下一种或多种信息之中:Wherein, the node identification 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. 根据权利要求43所述的装置,其特征在于,所述服务端设备包括第一业务端点,所述第一虚拟设备包括与所述第一业务端点具有映射关系的第一虚拟端点,所述节点标识记录在所述第一虚拟端点的端点信息中。The apparatus according to claim 43, wherein 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 The identification is recorded in the endpoint information of the first virtual endpoint.
  45. 根据权利要求44所述的装置,其特征在于,所述第一虚拟端点包括第一功能集群,所述节点标识记录在所述第一功能集群中;The device according to claim 44, wherein the first virtual endpoint includes a first functional cluster, and the node identification is recorded in the first functional cluster;
    其中,所述第一功能集群为以下功能集群中的一种:Wherein, the first functional cluster is one of the following functional clusters:
    用于描述所述第一虚拟端点的功能集群;以及a functional cluster describing the first virtual endpoint; and
    专门用于记录所述第一虚拟端点所中继的节点的功能集群。A functional cluster dedicated to recording the nodes relayed by the first virtual endpoint.
  46. 根据权利要求45所述的装置,其特征在于,所述装置还包括:The device of claim 45, further comprising:
    第二发送模块,用于向所述中继设备发送第一消息,所述第一消息用于查询所述第一功能集群;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;
    第一接收模块,用于接收所述中继设备发送的第一响应,所述第一响应包含所述第一功能集群的信息。A first receiving module, configured to receive a first response sent by the relay device, where the first response contains information about the first functional cluster.
  47. 根据权利要求44-46中任一项所述的装置,其特征在于,所述第一虚拟端点的端点信息中记录有所述服务端设备所在网络的网络标识。The device according to any one of claims 44 to 46, characterized in that the endpoint information of the first virtual endpoint records a network identifier of the network where the server device is located.
  48. 根据权利要求44-47中任一项所述的装置,其特征在于:The device according to any one of claims 44-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, and the encoding information of the first command path information block includes an endpoint identification of the first virtual endpoint, so 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 identification of the first service endpoint, so The identifier of the functional cluster where the first command is located, and the identifier of the first command.
  49. 根据权利要求44-48中任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 44-48, characterized in that the device further includes:
    第一建立模块,用于根据所述节点标识,建立所述第一虚拟端点与所述客户端设备直连的服务端设备之间的指向关系。A first establishment module, configured to establish a pointing relationship between the first virtual endpoint and the server device directly connected to the client device according to the node identifier.
  50. 根据权利要求49所述的装置,其特征在于,所述指向关系用于所述客户端设备根据所述节点标识显示所述节点标识对应的服务端设备。The apparatus according to claim 49, wherein the pointing relationship is used for the client device to display the server device corresponding to the node identifier according to the node identifier.
  51. 根据权利要求43所述的装置,其特征在于,所述第一虚拟设备包括与所述服务端设备具有映 射关系的第一虚拟节点。The apparatus according to claim 43, wherein the first virtual device includes a first virtual node having a mapping relationship with the server device.
  52. 根据权利要求51所述的装置,其特征在于,所述装置还包括:The device of claim 51, further comprising:
    第三发送模块,用于向所述中继设备发送第二消息,所述第二消息用于查询中继配置集群中的目标节点信息,所述目标节点信息记录有所述节点标识;A third sending module, 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 is recorded with the node identifier;
    第二接收模块,用于接收所述中继设备发送的目标节点信息。The second receiving module is used to receive the target node information sent by the relay device.
  53. 根据权利要求51或52所述的装置,其特征在于: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, and the encoding information of the third command path information block includes the node identifier, where the first command is located. The endpoint identifier of the 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 fourth command path information block, and the encoding information of the fourth command path information block includes an 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. 根据权利要求51-53中任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 51-53, characterized in that the device further includes:
    第二建立模块,用于根据所述节点标识,建立所述第一虚拟节点与所述客户端设备直连的服务端设备之间的指向关系。The second establishment module is configured to establish a pointing relationship between the first virtual node and the server device directly connected to the client device according to the node identifier.
  55. 根据权利要求54所述的装置,其特征在于,所述指向关系用于所述客户端设备根据所述节点标识显示所述节点标识对应的服务端设备。The apparatus according to claim 54, wherein the pointing relationship is used for 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 the 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;
    其中,所述服务端设备的节点标识记录在以下一种或多种信息之中:Wherein, the node identification 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. 根据权利要求56所述的装置,其特征在于,所述服务端设备包括第一业务端点,所述第一虚拟设备包括与所述第一业务端点具有映射关系的第一虚拟端点,所述节点标识记录在所述第一虚拟端点的端点信息中。The apparatus according to claim 56, wherein 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 The identification is recorded in the endpoint information of the first virtual endpoint.
  58. 根据权利要求57所述的装置,其特征在于,所述第一虚拟端点包括第一功能集群,所述节点标识记录在所述第一功能集群中;The device according to claim 57, wherein the first virtual endpoint includes a first functional cluster, and the node identification is recorded in the first functional cluster;
    其中,所述第一功能集群为以下功能集群中的一种:Wherein, the first functional cluster is one of the following functional clusters:
    用于描述所述第一虚拟端点的功能集群;以及a functional cluster describing the first virtual endpoint; and
    专门用于记录所述第一虚拟端点所中继的节点的功能集群。A functional cluster dedicated to recording the nodes relayed by the first virtual endpoint.
  59. 根据权利要求57或58所述的装置,其特征在于,所述第一虚拟端点的端点信息中记录有所述服务端设备所在网络的网络标识。The apparatus according to claim 57 or 58, wherein the endpoint information of the first virtual endpoint records a network identifier of the network where the server device is located.
  60. 根据权利要求57-59中任一项所述的装置,其特征在于:The device according to any one of claims 57-59, characterized in that:
    所述中继设备接收到的所述第一命令与第一命令路径信息块关联,所述第一命令路径信息块的编码信息包括所述第一虚拟端点的端点标识,所述第一命令所在功能集群的标识,以及所述第一命令的标识;和/或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 an endpoint identifier of the first virtual endpoint, where the first command is located. The identification of the functional cluster, and the identification 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, where the first command is located. The identifier of the functional cluster, and the identifier of the first command.
  61. 根据权利要求56所述的装置,其特征在于,所述第一虚拟设备包括与所述服务端设备具有映射关系的第一虚拟节点。The apparatus according to claim 56, wherein the first virtual device includes a first virtual node having a mapping relationship with the server device.
  62. 根据权利要求61所述的装置,其特征在于: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, 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. The encoding information of the fourth command path information block includes an endpoint identifier of the endpoint where the first command is located. The first command The identifier of the functional cluster where it is located, and the identifier of the first command.
  63. 一种命令的传输装置,其特征在于,所述装置配置于中继设备,所述中继设备包括存储器、处理器和收发器,所述存储器用于存储程序,所述处理器用于调用所述存储器中的程序,以使所述中继设 备执行如权利要求1-11中任一项所述的方法。A command transmission device, characterized in that the device is configured in a relay device, the relay device includes a memory, a processor and a transceiver, the memory is used to store programs, and the processor is used to call the A program in the memory to cause the relay device to perform the method according to any one of claims 1-11.
  64. 一种命令的传输装置,其特征在于,所述装置配置于客户端设备,所述客户端设备包括存储器、处理器和收发器,所述存储器用于存储程序,所述处理器用于调用所述存储器中的程序,以使所述客户端设备执行如权利要求12-24中任一项所述的方法。A command transmission device, characterized in that the device is configured on a client device, the client device includes a memory, a processor and a transceiver, the memory is used to store programs, and the processor is used to call the A program in the memory to cause the client device to perform the method according to any one of claims 12-24.
  65. 一种命令的传输装置,其特征在于,所述装置配置于服务端设备,所述服务端设备包括存储器、处理器和收发器,所述存储器用于存储程序,所述处理器用于调用所述存储器中的程序,以使所述服务端设备执行如权利要求25-31中任一项所述的方法。A command transmission device, characterized in that the device is configured on a server device, the server device includes a memory, a processor and a transceiver, the memory is used to store programs, and the processor is used to call the The program in the memory enables the server device to execute the method according to any one of claims 25-31.
  66. 一种装置,其特征在于,包括处理器,用于从存储器中调用程序,以使所述装置执行如权利要求1-31中任一项所述的方法。A device, characterized by comprising a processor for calling a program from a memory, so that the device executes the method according to any one of claims 1-31.
  67. 一种芯片,其特征在于,包括处理器,用于从存储器调用程序,使得安装有所述芯片的设备执行如权利要求1-31中任一项所述的方法。A chip, characterized in that it includes a processor for calling a program from a memory, so that a device equipped with the chip executes the method according to any one of claims 1-31.
  68. 一种计算机可读存储介质,其特征在于,其上存储有程序,所述程序使得计算机执行如权利要求1-31中任一项所述的方法。A computer-readable storage medium, characterized in that a program is stored thereon, and the program causes the computer to execute the method according to any one of claims 1-31.
  69. 一种计算机程序产品,其特征在于,包括程序,所述程序使得计算机执行如权利要求1-31中任一项所述的方法。A computer program product, characterized by comprising a program that causes a computer to execute the method according to any one of claims 1-31.
  70. 一种计算机程序,其特征在于,所述计算机程序使得计算机执行如权利要求1-31中任一项所述的方法。A computer program, characterized in that the computer program causes the computer to perform the method according to any one of claims 1-31.
PCT/CN2022/118195 2022-09-09 2022-09-09 Command transmission method and apparatus, chip, storage medium and computer program WO2024050832A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/118195 WO2024050832A1 (en) 2022-09-09 2022-09-09 Command transmission method and apparatus, chip, storage medium and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/118195 WO2024050832A1 (en) 2022-09-09 2022-09-09 Command transmission method and apparatus, chip, storage medium and computer program

Publications (1)

Publication Number Publication Date
WO2024050832A1 true WO2024050832A1 (en) 2024-03-14

Family

ID=90192559

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/118195 WO2024050832A1 (en) 2022-09-09 2022-09-09 Command transmission method and apparatus, chip, storage medium and computer program

Country Status (1)

Country Link
WO (1) WO2024050832A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103391325A (en) * 2013-07-30 2013-11-13 李想 Network operating system device and method for Internet of Things
CN103856497A (en) * 2012-11-29 2014-06-11 华为终端有限公司 Method and device for terminal management in home network, and home network
WO2021102694A1 (en) * 2019-11-26 2021-06-03 Oppo广东移动通信有限公司 Ble mesh device access method and apparatus, device and storage medium
CN113411536A (en) * 2021-05-27 2021-09-17 青岛海尔科技有限公司 Method and system for video call

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856497A (en) * 2012-11-29 2014-06-11 华为终端有限公司 Method and device for terminal management in home network, and home network
CN103391325A (en) * 2013-07-30 2013-11-13 李想 Network operating system device and method for Internet of Things
WO2021102694A1 (en) * 2019-11-26 2021-06-03 Oppo广东移动通信有限公司 Ble mesh device access method and apparatus, device and storage medium
CN113411536A (en) * 2021-05-27 2021-09-17 青岛海尔科技有限公司 Method and system for video call

Similar Documents

Publication Publication Date Title
US20230319534A1 (en) Cross-resource subscription for m2m service layer
US11716669B2 (en) Internet of things service routing method
US11968100B2 (en) Service enabler function
JP5981662B2 (en) Method and apparatus for access authorization authentication in a wireless communication system
KR102245367B1 (en) Method and apparatus for authenticating access authority for specific resource in wireless communication system
CN113411215B (en) Time-sensitive network centralized user configuration method and system based on OPC UA
US20070275683A1 (en) System and method for multi-radio control
US20120317254A1 (en) Network platform in a network device ecosystem
EP3286936B1 (en) Device and method for adding a service
KR20150107720A (en) Method and apparatus for controlling access in wireless communication system
US20080178202A1 (en) Interface For Supporting an Element Management System
CN110830841B (en) Screen projection method, system and intelligent device under different local area networks
US11870873B2 (en) Service layer-based methods to enable efficient analytics of IoT data
EP2814217B1 (en) Access control method for wifi device and wifi device thereof
EP3332513B1 (en) Service element host selection
WO2024050832A1 (en) Command transmission method and apparatus, chip, storage medium and computer program
WO2024065091A1 (en) Method for device capability discovery, server device, and client device
WO2023205988A1 (en) Method and apparatus for transmitting control information
WO2024026802A1 (en) Data reporting method and apparatus, chip, storage medium, and computer program
WO2024050753A1 (en) Communication method, first device, configuration device, and cloud platform
WO2024032294A1 (en) Information transmission method, apparatus, and system
WO2023216042A1 (en) Event management method and apparatus, device, storage medium, and program product
US20230262142A1 (en) Service layer methods for offloading iot application message generation and response handling
WO2023087274A1 (en) Notification method and notification apparatus
WO2023108653A1 (en) Subscription access information processing method and apparatus, computer device and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22957800

Country of ref document: EP

Kind code of ref document: A1