WO2013189394A2 - 一种物联网终端设备的资源信息获取方法、系统及设备 - Google Patents

一种物联网终端设备的资源信息获取方法、系统及设备 Download PDF

Info

Publication number
WO2013189394A2
WO2013189394A2 PCT/CN2013/081918 CN2013081918W WO2013189394A2 WO 2013189394 A2 WO2013189394 A2 WO 2013189394A2 CN 2013081918 W CN2013081918 W CN 2013081918W WO 2013189394 A2 WO2013189394 A2 WO 2013189394A2
Authority
WO
WIPO (PCT)
Prior art keywords
resource information
terminal device
request message
access device
adjacent
Prior art date
Application number
PCT/CN2013/081918
Other languages
English (en)
French (fr)
Other versions
WO2013189394A3 (zh
Inventor
范贤友
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to EP13807211.1A priority Critical patent/EP2913977A4/en
Publication of WO2013189394A2 publication Critical patent/WO2013189394A2/zh
Publication of WO2013189394A3 publication Critical patent/WO2013189394A3/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Definitions

  • the present invention relates to the field of communication technologies, and in particular, to a resource information acquisition method, system, terminal device, and access device for an Internet of Things terminal device.
  • Internet of Things comes from the English “Internet of Things, IoT", that is, the Internet of Things and Things.
  • IoT Internet of Things
  • the popular definition of the Internet of Things is: Using radio frequency identification, sensors, two-dimensional code and other sensing components, through the basic network to achieve the interconnection between things and things, people and things, allowing anyone and anything at any time any A network that uses any means to access and interact with any service.
  • IP Internet Protocol
  • these smart objects usually only have weak computational processing power and are sensitive to resource consumption.
  • the protocols currently applied to the Internet are too complicated and expensive, and it is difficult to meet the application scenarios of the Internet of Things.
  • the Internet of Things needs to access a large number of applications.
  • Heterogeneous terminal devices require a versatile and simple and flexible approach.
  • the Restful method is used as an access interface and has been widely accepted and promoted in the field of Internet of Things.
  • ETSI M2M European Telecommunications Standards Institute
  • IETF Internet Engineering Task Force, Internet Engineering) Task Group
  • the CoRe Working Group (Constrained Restful Environments) was established to study the application protocol suitable for the restricted environment, namely the CoAP (Constrained Application Protocol) protocol.
  • the first RFC document RFC 6690 Constrained RESTful Environments (CoRE) Link Format.
  • the characteristics of the CoAP protocol are: Based on the UDP protocol, the message is in binary form, compact in format, and has low overhead on the terminal.
  • the Restful-style access interface can be regarded as a simple text for the Hypertext Transfer Protocol (HTTP).
  • HTTP Hypertext Transfer Protocol
  • Accessing the device may often need to enumerate some or all of the resources on the terminal device.
  • each neighbor node information will be abstracted into a single resource, and a certain method is used to view a certain All neighbor information of a node needs to obtain all the "neighbor node information, the identification list of the resources, and then access one by one according to the identifier, and only one specific resource can be accessed at a time, and the access efficiency is not high; And the content is actually divided into two acquisitions, which also increases the overhead of the network to some extent.
  • the technical problem to be solved by the embodiments of the present invention is to provide a method, a system, a terminal device, and an access device for acquiring resource information of an Internet of Things terminal device, which are used to solve the problem that the related technologies are accessed one by one by first obtaining the identification list of the resources. Access is not efficient.
  • an embodiment of the present invention provides a method for acquiring resource information of an Internet of Things terminal device, including:
  • the terminal device receives the request message for acquiring the resource information sent by the access device, where the request message includes at least the parameters M and N, and indicates the N resource information that the access device needs to acquire the resource information M and is adjacent to the M;
  • the terminal device sends, according to the request message, N resource information that is adjacent to the M after the resource information M to the access device.
  • the terminal device further includes:
  • the packet sent by the terminal device to the access device includes an identifier of each resource information, or an identifier and data content of each resource information.
  • an embodiment of the present invention further provides a resource information acquiring system of an Internet of Things terminal device, including:
  • the access device is configured to send a request message for obtaining resource information, where the request message is at least
  • the parameters M and N are the N resource information that the access device needs to acquire the resource information M and is adjacent to the M.
  • the terminal device is configured to receive the request message, and send N resource information adjacent to the M after the resource information M is sent to the access device according to the request message.
  • the terminal device is further configured to: after receiving the request message, determine whether the number of resource information adjacent to the M after the resource information M on the terminal device is less than N, and if yes, Sending all resource information after the resource information M on the terminal device and adjacent to the M, and informing the access device that the processing of the request message ends.
  • the packet sent by the terminal device to the access device includes an identifier of each resource information, or an identifier and data content of each resource information.
  • the embodiment of the present invention further provides a terminal device, configured to receive a request message for acquiring resource information sent by the access device, and send the resource information M to the access device according to the request message, and N resource information adjacent to M.
  • the terminal device is further configured to: after receiving the request message, determine whether the number of resource information adjacent to the M after the resource information M on the terminal device is less than N, and if yes, Sending all resource information after the resource information M on the terminal device and adjacent to the M, and informing the access device that the processing of the request message ends.
  • the packet sent by the terminal device to the access device includes an identifier of each resource information, or an identifier and data content of each resource information.
  • the embodiment of the present invention further provides an access device, which is configured to send a request message for acquiring resource information to the terminal device, where the request message includes at least parameters M and N, and the access device needs to obtain the resource information M. And N resource information adjacent to M.
  • the Internet of Things terminal device can be flexibly managed through a Restful-style interface, and is particularly suitable for traversing resources on the terminal device, thereby improving access efficiency and reducing network overhead.
  • BRIEF abstract 1 is a flowchart of a method for acquiring resource information of an Internet of Things terminal device according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a resource information acquiring system of an Internet of Things terminal device acquiring an adjacent resource by using a CoAP protocol extension option according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a resource information acquiring system of an Internet of Things terminal device acquiring adjacent resources by using a CoAP protocol extended parameter according to an embodiment of the present invention.
  • Preferred embodiment of the invention
  • an embodiment of the present invention relates to a method for acquiring resource information of an Internet of Things terminal device, including:
  • Step S101 The access device sends a request message for acquiring resource information, where the request message includes at least parameters M and N, and indicates N resource information that is adjacent to the M after the access device needs to obtain the resource information M. It also contains information that you want the terminal device to return to the label or label and content.
  • the "sequential" order of interrupting the resource information on the device is the internal organization logic (sequence) of the access device. It is not necessarily arranged in chronological order, it may be arranged in chronological order, or it may be arranged in the order of device configuration.
  • Step S102 The terminal device receives the request message, and sends, according to the request message, N resource information that is adjacent to the M after the resource information M is sent to the access device.
  • the terminal device After receiving the access request message, if the terminal device supports the request for acquiring the neighboring resource, the terminal device returns one or more adjacent to the requested destination resource (resource information M) to the access device.
  • resource information M The identity or identity of the resource and the content.
  • the temperature information of a temperature sensor is timed, and the temperature information collected by each time is abstracted into a single resource.
  • the access device wants to obtain the temperature parameter collected by the temperature sensor (terminal device) after a certain temperature parameter T of the collection.
  • the access device does not know how many temperature parameters the temperature sensor has collected after collecting the temperature parameter T, and the identification (ID) of these temperature parameters is not known, so that the access device can send a request to the temperature sensor.
  • the message requesting to obtain the temperature parameter N times adjacent to T after the temperature parameter T is obtained.
  • the temperature sensor determines whether the number of temperature parameters collected after the temperature parameter T is less than N. If yes, all the temperature parameters collected after the temperature parameter T are sent, and the access device is notified in the message. The message processing is completed; if not, the temperature parameter N times adjacent to T collected after the temperature parameter T is transmitted.
  • an embodiment of the present invention further relates to a resource information acquiring system for an Internet of Things terminal device that implements the foregoing method, including:
  • the access device is configured to send a request message for obtaining resource information, where the request message includes at least parameters M and N, and indicates that the access device needs to obtain the resource information M and the N resource information adjacent to the M;
  • the terminal device is configured to receive the request message, and send N resource information adjacent to the M after the resource information M is sent to the access device according to the request message.
  • the terminal device is further configured to: after receiving the request message, determine whether the number of resource information adjacent to the M after the resource information M on the terminal device is less than N, and if yes, send the terminal All resource information after the resource information M and adjacent to the M, and informing the access device that the processing of the request message ends; if not, sending the resource information to the access device according to the message N resource information adjacent to M afterwards.
  • the resource information sent by the terminal device to the access device includes an identifier of each resource information, or an identifier of each resource information and data content.
  • Embodiment 1 The specific description is as follows:
  • Table 2 defines the meaning of each byte of the resource information.
  • Token 0x1234 ;
  • the server After receiving the CoAP request, the server returns the following three resource identifiers and contents of the epl/route/entryO to the client.
  • the format of the packet is as follows:
  • Content-Type mix (if only one resource returns, the actual type of the resource); Token: 0x1234;
  • the payloads returned by the server are encapsulated in the normal content-type
  • ayloads is armored according to the content-type, length, value method, and corresponds to the order of appearance in the Location-Path option.
  • the last Location-path is set to null as the final identifier to return.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • this embodiment provides a method for obtaining neighbor resource information by using extended parameters, and the specific description is as follows:
  • the client initiates an extension request to the server.
  • the content of the CoAP message is as follows:
  • Token 0x1234 ;
  • the server After receiving the request, the server returns three resources to the client, each time returning a resource, and marking the resource identifier in the return message.
  • the return message is as follows:
  • Token 0x1234;
  • Content-type (type of resource);
  • Location-path "epl/route/entryl (the identifier corresponding to the resource content in the returned payloads);
  • the server sends a message with a code of 132 (4.04 Not Found) after sending the resources, indicating that the request has been processed. No other resources were found:
  • Token 0x1234;
  • the embodiment of the present invention uses the CoAP protocol, which is more suitable for the Internet of Things application, as an example to describe the technical solution of the embodiment of the present invention. It is obvious that the described embodiment is only a part of the embodiment of the present invention, and is not limited to the CoAP protocol. Can be applied to other RESTful protocols such as HTTP. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without departing from the inventive scope are the scope of the embodiments of the present invention.
  • Embodiment 1 and Embodiment 2 respectively describe a method for a client to initiate a request for acquiring a neighboring resource by using an extended option and an extended parameter, and describe two ways for the server to return multiple resources, two request methods and two There can be any combination of the return modes, and will not be described here.
  • the embodiment of the present invention is based on the Restful style, and adopts a mode of communication between the client and the server, and proposes an extension scheme based on the Restful style protocol, which can be more flexible and convenient for the Internet of Things restricted network node. Access and management.
  • the technical solution of the embodiment of the present invention can implement flexible management of the Internet of Things terminal device, and is particularly suitable for traversing resources on the terminal device, thereby improving access efficiency and reducing network overhead.
  • the Internet of Things terminal device can be flexibly managed through a Restful-style interface, and is particularly suitable for traversing resources on the terminal device, thereby improving access efficiency and reducing network overhead.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种物联网终端设备的资源信息获取方法、系统、终端设备及访问设备,包括:终端设备接收访问设备发送的获取资源信息的请求报文,所述请求报文至少包括参数 M、N,表示访问设备需要获取资源信息 M之后、且与 M 相邻的 N个资源信息;终端设备根据所述请求报文,给所述访问设备发送资源信息 M之后、且与 M相邻的 N个资源信息。利用本发明实施例的技术方案,可以通过 Restful风格的接口对物联网终端设备进行灵活的管理,尤其适合对终端设备上的资源进行遍历,能够提高访问的效率,降低对网络的开销。

Description

一种物联网终端设备的资源信息获取方法、 系统及设备
技术领域
本发明涉及通讯技术领域, 特别是涉及一种物联网终端设备的资源信息 获取方法、 系统、 终端设备及访问设备。
背景技术
"物联网" 一词来源于英文 "Internet of Things, IoT" , 即: 物与物相 连的互联网络。 目前对物联网较为通俗的定义是: 利用射频识别、 传感器、 二维码等传感元件, 通过基础网络实现物与物、 人与物之间的互联互通, 允 许任何人和物在任何时间任何地方利用任何途径对任何服务进行访问和交互 的网络。
物联网汇聚了数量众多的智能物体, 为了实现对物体的访问以及物体之 间良好的互通性, 智能物体的 IP ( Internet Protocol, 互联网协议 )化已是一 大趋势。 但这些智能物体通常只具备很弱的计算处理能力, 对资源消耗很敏 感, 目前应用于 Internet的协议过于复杂, 开销较大, 难以满足物联网的应 用场景需求, 此外物联网需要接入海量的异构终端设备, 需要一种通用而且 简单灵活的方式。
以 Restful 方式作为访问接口, 在物联网领域也已被广泛接受和推广, ETSI M2M ( European Telecommunications Standards Institute, 欧洲电信标准 化协会)选择了 Restful作为访问接口的标准, IETF ( Internet Engineering Task Force, 因特网工程任务组) 专门成立了 CoRE 工作组(Constrained Restful Environments,受限的 Restful环境)致力于研究适合于受限环境的应用协议, 即 CoAP ( Constrained Application Protocol,受限的应用层协议)协议, 已发布 第一个 RFC文档 RFC 6690: Constrained RESTful Environments ( CoRE ) Link Format。 CoAP协议的特点是: 基于 UDP协议, 报文釆用二进制形式, 格式 紧凑, 对终端开销较小, Restful风格的访问接口, 可看作是对超文本传输协 议(HTTP ) 的^"简。
不过,目前 Restful风格接口应用于物联网设备的管理上还存在着一些不 足之处:
访问设备可能会经常需要列举终端设备上的部分或所有的资源,以传感 节点的邻居节点信息为例, 每个邻居节点信息都将被抽象为单个的资源, 通 过 Restful这种方式来查看某个节点的所有邻居信息时,需要先获取到所有的 "邻居节点信息,,资源的标识列表, 然后再根据标识进行逐一的访问, 并且一 次只能访问一个具体资源, 访问效率不高; 此外标识和内容实际是分成了两 次获取, 也在一定程度上增加了对网络的开销。 发明内容
本发明实施例要解决的技术问题是提供一种物联网终端设备的资源信息 获取方法、 系统、 终端设备及访问设备, 用以解决相关技术由于先获取资源 的标识列表再进行逐一的访问造成的访问效率不高的问题。
为解决上述技术问题, 一方面, 本发明实施例提供一种物联网终端设备 的资源信息获取方法, 包括:
终端设备接收访问设备发送的获取资源信息的请求报文, 所述请求报文 至少包括参数 M、 N, 表示访问设备需要获取资源信息 M之后、 且与 M相 邻的 N个资源信息;
终端设备根据所述请求报文,给所述访问设备发送资源信息 M之后、且 与 M相邻的 N个资源信息。
可选地, 终端设备接收所述请求 ^艮文之后, 还包括:
判断所述终端设备上资源信息 M之后、 且与 M相邻的资源信息的个数 是否小于 N, 如果是, 则发送所述终端设备上资源信息 M之后、 且与 M相 邻的所有资源信息, 并告知所述访问设备所述请求报文处理结束。
可选地, 所述终端设备给所述访问设备发送的报文中包含每个资源信息 的标识, 或每个资源信息的标识及数据内容。
另一方面, 本发明实施例还提供一种物联网终端设备的资源信息获取系 统, 包括:
访问设备, 设置为发送获取资源信息的请求报文, 所述请求报文至少包 括参数 M、 N, 表示访问设备需要获取资源信息 M之后、 且与 M相邻的 N 个资源信息;
终端设备, 设置为接收所述请求报文, 以及根据所述请求报文, 给所述 访问设备发送资源信息 M之后、 且与 M相邻的 N个资源信息。
可选地, 所述终端设备还设置为在接收所述请求报文之后, 判断所述终 端设备上资源信息 M之后、 且与 M相邻的资源信息的个数是否小于 N, 如 果是, 则发送所述终端设备上资源信息 M之后、 且与 M相邻的所有资源信 息, 并告知所述访问设备所述请求报文处理结束。
可选地, 所述终端设备给所述访问设备发送的报文中包含每个资源信息 的标识, 或每个资源信息的标识及数据内容。
再一方面, 本发明实施例还提供一种终端设备, 设置为接收访问设备发 送的获取资源信息的请求报文, 并根据所述请求报文, 给所述访问设备发送 资源信息 M之后、 且与 M相邻的 N个资源信息。
可选地, 所述终端设备还设置为在接收所述请求报文之后, 判断所述终 端设备上资源信息 M之后、 且与 M相邻的资源信息的个数是否小于 N, 如 果是, 则发送所述终端设备上资源信息 M之后、 且与 M相邻的所有资源信 息, 并告知所述访问设备所述请求报文处理结束。
可选地, 所述终端设备给所述访问设备发送的报文中包含每个资源信息 的标识, 或每个资源信息的标识及数据内容。
再一方面, 本发明实施例还提供一种访问设备, 设置为向终端设备发送 获取资源信息的请求报文, 所述请求报文至少包括参数 M、 N, 表示访问设 备需要获取资源信息 M之后、 且与 M相邻的 N个资源信息。
本发明实施例有益效果如下:
利用本发明实施例的技术方案,可以通过 Restful风格的接口对物联网终 端设备进行灵活的管理, 尤其适合对终端设备上的资源进行遍历, 能够提高 访问的效率, 降低对网络的开销。
附图概述 图 1是本发明实施例中一种物联网终端设备的资源信息获取方法的流程 图;
图 2 是本发明实施例中物联网终端设备的资源信息获取系统通过 CoAP 协议扩展选项获取相邻资源的示意图;
图 3 是本发明实施例中物联网终端设备的资源信息获取系统通过 CoAP 协议扩展参数获取相邻资源的示意图。 本发明的较佳实施方式
以下结合附图以及实施例, 对本发明实施例进行进一步详细说明。 应当 理解, 此处所描述的具体实施例仅仅用以解释本发明实施例, 并不限定本发 明实施例。
如图 1所示, 本发明实施例涉及一种物联网终端设备的资源信息获取方 法, 包括:
步骤 S101 , 访问设备发送获取资源信息的请求报文, 所述请求报文至少 包括参数 M、 N ,表示访问设备需要获取资源信息 M之后、且与 M相邻的 N 个资源信息;请求报文中还包含希望终端设备返回标示或标示及内容的信息。
中断设备上资源信息的 "先后" 顺序, 是访问设备的内部组织逻辑(顺 序) , 并非一定是按时间顺序进行排列, 可能是按照时间顺序排列, 也可能 是跟设备配置的顺序进行排列。
步骤 S102, 终端设备接收所述请求报文, 根据所述请求报文, 给所述访 问设备发送资源信息 M之后、 且与 M相邻的 N个资源信息。
本步骤中, 终端设备收到上述访问请求报文后, 如果支持这种获取相邻 资源的请求, 则向访问设备返回与请求的目的资源 (资源信息 M )之后、 且 相邻的一个或者多个资源的标识或者标识以及内容。 另外, 在发送之前, 还 判断终端设备上资源信息 M之后、 且与 M相邻的资源信息的个数是否小于 N, 如果是, 即终端设备上与资源信息 M相邻的资源信息数少于访问设备请 求的资源数量, 则发送终端设备上资源信息 M之后、 且与 M相邻的所有资 源信息, 并告知所述访问设备所述请求报文处理结束(例如使用特定的返回 编码或者使用特定的资源标识符进行表示) 。 如果终端设备不支持这种获取 相邻资源的方法,则退化为正常的获取操作,处理时忽略掉扩展选项或参数。
例如, 一个温度传感器定时的釆集温度, 每次釆集到的温度信息被抽象 成单个资源, 访问设备希望获取温度传感器(终端设备)在釆集的某一次温 度参数 T后釆集的温度参数, 但是访问设备不清楚温度传感器在釆集完该温 度参数 T后又釆集了多少次温度参数,也不清楚这些温度参数的的标识( ID ), 这样, 访问设备就可以给温度传感器发送请求报文, 请求获得温度参数 T之 后釆集的与 T相邻的 N次的温度参数。 温度传感器收到报文后, 判断在温度 参数 T之后釆集的温度参数次数是否小于 N, 如果是, 则全部发送在温度参 数 T之后釆集的温度参数, 并在报文中告知访问设备请求报文处理完毕; 如 果否, 则发送在温度参数 T之后釆集的与 T相邻的 N次的温度参数。
另外, 本发明实施例还涉及一种实现上述方法的一种物联网终端设备的 资源信息获取系统, 包括:
访问设备, 设置为发送获取资源信息的请求报文, 所述请求报文至少包 括参数 M、 N, 表示访问设备需要获取资源信息 M之后、 且与 M相邻的 N 个资源信息;
终端设备, 设置为接收所述请求报文, 以及根据所述请求报文, 给所述 访问设备发送资源信息 M之后、 且与 M相邻的 N个资源信息。
所述终端设备还设置为在接收所述请求报文之后, 判断所述终端设备上 资源信息 M之后、 且与 M相邻的资源信息的个数是否小于 N, 如果是, 则 发送所述终端设备上资源信息 M之后、 且与 M相邻的所有资源信息, 并告 知所述访问设备所述请求报文处理结束; 如果否, 则根据所述报文, 给所述 访问设备发送资源信息 M之后、 且与 M相邻的 N个资源信息。
所述终端设备给所述访问设备发送的资源信息包括每个资源信息的标 识, 或每个资源信息的标识及数据内容。
下面, 以两个具体实例进行说明:
实施例一 : , 具体的描述如下:
表 1中定义了扩展的选项。
Figure imgf000008_0001
表 2定义了获取资源信息的各个字节的含义。
表 2
Figure imgf000008_0002
2 客户端 (访问设备) 向服务端 (终端设备)发起扩展的请求, CoAP 文内容如下:
Ver: 1 (当前版本) ;
T: 1 (需确认) ;
OC: 3 (选项个数) ;
CODE: 1 ( GET ) ;
Message id: 0x0001 ;
URI-PATH: "epl/route/entryO" ;
Token: 0x1234 ;
Get-Ext: type=2,value=3; (表明希望获取 e l/route/entryO之后的的邻近 个资源) 。 3 服务端收到该 CoAP请求后, 将 epl/route/entryO其后的三个资源标 识及其内容向客户端返回, 报文格式如下:
Ver: 1 (当前版本) ;
T: 2 ( ACK确认) ;
OC: 5 (选项个数) ;
CODE: 205 ( content ) ;
Message id: 0x0001 ;
Content-Type: mix (如果只有一个资源返回,则为该资源的实际类型 ); Token: 0x1234;
Location-path: " e l /route/entry 1 " (按资源顺序依次出现) ;
Location-path: " ep 1 / route/ entry2 " ;
Location-path: " ep 1 / route/ entry 3 " ;
Payloads。
如果客户端只请求了一个资源, 则服务端返回的 payloads 按正常的 content-type封装;
如果客户端请求了多个资源, 并且服务端存在有多个资源需要返回, 则 将 ayloads按照 content-type, length, value方式去†装, 并且与 Location-Path选 项中的出现顺序——对应。
如果服务端上待返回资源信息数量少于客户端请求的资源信息数量, 则 将最后一个 Location-path置为空作为终结标识进行返回。
实施例二 :
如图 3所示, 本实施例提供了通过扩展参数实现获取相邻资源信息的方 法, 具体的描述如下:
1、 客户端向服务端发起扩展的请求, CoAP报文内容如下:
Ver: 1 (当前版本) ;
T: 1 (需确认) ; OC: 3 (选项个数) ;
CODE: 1 ( GET ) ;
Message id: 0x0001 ;
URI-PATH: "epl/route/entryO" ;
Token: 0x1234 ;
URI-Query: get-next=3 (表明希望获取 mgt/route/entryO之后的的邻近 3 个资源) ;
2、服务端收到请求后, 将 3个资源分别返回给客户端,每次返回一个资 源, 并在返回报文中标明资源的标识, 返回报文如下:
Ver: 1 (当前版本) ;
T: 2 ( ACK确认) ;
0 . 2 (选项个数) ;
CODE: 205 ( content ) ;
Message id: 0x0001 ;
Token: 0x1234;
Content-type: (资源的类型) ;
Location-path: "epl/route/entryl (返回的 payloads中资源内容对应的 标识) ;
Payloads: "xxxx" 。
每次发送将使用不同的 message id,但如果客户端有发送 token选项, 则 每次返回必须与其保持一致。
3 若服务端上待返回资源信息数量小于客户端请求的资源信息数量, 服 务端在发送完各资源后, 发送一个 code为 132 ( 4.04 Not Found )的报文, 表 示该次请求已经处理完毕, 找不到其他的资源了:
Ver: 1 (当前版本) ;
T: 0 (无需确认) ; OC: 1 (选项个数) ;
CODE: 132 ( OblOOOOlOO, 4.04 not found ) ;
Message id: 0x0004;
Token: 0x1234;
本发明实施例使用更加适合于物联网应用的 CoAP协议作为示例来描述 本发明实施例的技术方案, 显然, 所描述的实施例仅是本发明的一部分实施 例,也不局限于 CoAP协议,还可以应用于 HTTP等其他 REST风格的协议。 基于本发明中的实施例, 本领域普通技术人员在没有做出创造性劳动前提下 所获得的所有其他实施例, 都属于本发明实施例保护的范围。
实施例一和实施例二分别用扩展选项和扩展参数的方式描述了客户端发 起获取相邻资源的请求的方法,同时描述了服务端返回多个资源的两种方式, 两种请求方法和两种返回方式之间可以任意的组合, 在此不赘述。
由上述实施例可以看出, 本发明实施例基于 Restful风格, 釆用客户端和 服务端通信的模式,提出了基于 Restful风格协议实现的扩展方案, 能够对物 联网受限网络节点进行更灵活方便的访问和管理。 利用本发明实施例的技术 方案, 可以对物联网终端设备进行灵活的管理, 尤其适合对终端设备上的资 源进行遍历, 能够提高访问的效率, 降低对网络的开销。
尽管为示例目的, 已经公开了本发明的优选实施例, 本领域的技术人员 将意识到各种改进、 增加和取代也是可能的, 因此, 本发明实施例的范围应 当不限于上述实施例。
工业实用性
利用本发明实施例的技术方案,可以通过 Restful风格的接口对物联网终 端设备进行灵活的管理, 尤其适合对终端设备上的资源进行遍历, 能够提高 访问的效率, 降低对网络的开销。

Claims

权 利 要 求 书
1、 一种物联网终端设备的资源信息获取方法, 包括:
终端设备接收访问设备发送的获取资源信息的请求报文, 所述请求报文 至少包括参数 M、 N, 表示访问设备需要获取资源信息 M之后、 且与 M相 邻的 N个资源信息;
终端设备根据所述请求报文,给所述访问设备发送资源信息 M之后、且 与 M相邻的 N个资源信息。
2、如权利要求 1所述的物联网终端设备的资源信息获取方法,终端设备 接收所述请求报文之后, 还包括:
判断所述终端设备上资源信息 M之后、 且与 M相邻的资源信息的个数 是否小于 N, 如果是, 则发送所述终端设备上资源信息 M之后、 且与 M相 邻的所有资源信息, 并告知所述访问设备所述请求报文处理结束。
3、如权利要求 1或 2所述的物联网终端设备的资源信息获取方法,其中, 所述终端设备给所述访问设备发送的报文中包括每个资源信息的标识, 或每 个资源信息的标识及数据内容。
4、 一种物联网终端设备的资源信息获取系统, 包括:
访问设备, 设置为发送获取资源信息的请求报文, 所述请求报文至少包 括参数 M、 N, 表示访问设备需要获取资源信息 M之后、 且与 M相邻的 N 个资源信息;
终端设备, 设置为接收所述请求报文, 以及根据所述请求报文, 给所述 访问设备发送资源信息 M之后、 且与 M相邻的 N个资源信息。
5、 如权利要求 4所述的物联网终端设备的资源信息获取系统, 其中, 所述终端设备还设置为在接收所述请求报文之后, 判断所述终端设备上 资源信息 M之后、 且与 M相邻的资源信息的个数是否小于 N, 如果是, 则 发送所述终端设备上资源信息 M之后、 且与 M相邻的所有资源信息, 并告 知所述访问设备所述请求报文处理结束。
6、如权利要求 4或 5所述的物联网终端设备的资源信息获取系统,其中, 所述终端设备给所述访问设备发送的报文中包括每个资源信息的标识, 或每 个资源信息的标识及数据内容。
7、一种终端设备,设置为接收访问设备发送的获取资源信息的请求报文, 并根据所述请求报文, 给所述访问设备发送资源信息 M之后、 且与 M相邻 的 N个资源信息。
8、如权利要求 7所述的终端设备, 其中, 所述终端设备还设置为在接收 所述请求报文之后, 判断所述终端设备上资源信息 M之后、 且与 M相邻的 资源信息的个数是否小于 N, 如果是, 则发送所述终端设备上资源信息 M之 后、且与 M相邻的所有资源信息, 并告知所述访问设备所述请求报文处理结 束。
9、如权利要求 6或 7所述的终端设备, 其中, 所述终端设备给所述访问 设备发送的报文中包含每个资源信息的标识, 或每个资源信息的标识及数据 内容。
10、 一种访问设备, 设置为向终端设备发送获取资源信息的请求报文, 所述请求报文至少包括参数 M、N,表示访问设备需要获取资源信息 M之后、 且与 M相邻的 N个资源信息。
PCT/CN2013/081918 2012-10-26 2013-08-21 一种物联网终端设备的资源信息获取方法、系统及设备 WO2013189394A2 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP13807211.1A EP2913977A4 (en) 2012-10-26 2013-08-21 METHOD, SYSTEM AND DEVICE FOR COLLECTING RESOURCE INFORMATION FOR AN INTERNET DINGS DEVICE

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210417115.1 2012-10-26
CN201210417115.1A CN103780483A (zh) 2012-10-26 2012-10-26 一种物联网终端设备的资源信息获取方法、系统及设备

Publications (2)

Publication Number Publication Date
WO2013189394A2 true WO2013189394A2 (zh) 2013-12-27
WO2013189394A3 WO2013189394A3 (zh) 2014-02-13

Family

ID=49769540

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/081918 WO2013189394A2 (zh) 2012-10-26 2013-08-21 一种物联网终端设备的资源信息获取方法、系统及设备

Country Status (3)

Country Link
EP (1) EP2913977A4 (zh)
CN (1) CN103780483A (zh)
WO (1) WO2013189394A2 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10123190B2 (en) 2015-05-14 2018-11-06 Hcl Technologies Limited System and method for testing a CoAP server
WO2019047911A1 (zh) * 2017-09-11 2019-03-14 华为技术有限公司 一种物联网资源订阅的方法、设备和系统
CN113196721A (zh) * 2019-03-01 2021-07-30 Oppo广东移动通信有限公司 物联网设备的发现方法、装置及终端设备
CN115086367A (zh) * 2022-05-30 2022-09-20 陕西翰林亿讯智能科技有限公司 一种基于智能灯具的内容分发系统及方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141435A (zh) * 2014-05-26 2015-12-09 上海仪电控股(集团)公司 一种基于Restful架构的物联网异构网络管理技术
CN106612196B (zh) 2015-10-23 2019-02-01 华为技术有限公司 获取资源的方法及装置
CN105678359A (zh) * 2016-01-20 2016-06-15 中国科学技术大学苏州研究院 一种基于WoT的固定资产管理系统和方法

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256572B (zh) * 2008-03-21 2011-08-10 华为技术有限公司 一种xml文档操作方法及xdms
CN101286875B (zh) * 2008-03-31 2011-11-16 华为技术有限公司 一种批量处理xml文档的方法、系统、装置和终端
CN101477535B (zh) * 2008-12-30 2011-06-08 华为技术有限公司 网页页面的显示方法、请求的处理方法、装置和系统
US8660071B2 (en) * 2009-03-19 2014-02-25 Qualcomm Incorporated Adaptive resource partitioning in a wireless communication network
US8483669B2 (en) * 2009-04-03 2013-07-09 Microsoft Corporation Mobile sensor network
CN101547441B (zh) * 2009-05-12 2011-02-16 常熟理工学院 下一代全ip无线传感器网络服务的实现方法
US9729516B2 (en) * 2010-04-09 2017-08-08 Gemalto Sa Method of machine-to-machine communication
CN102137494B (zh) * 2010-12-10 2014-03-12 华为软件技术有限公司 通信资源的分配方法及装置
US9171079B2 (en) * 2011-01-28 2015-10-27 Cisco Technology, Inc. Searching sensor data
CN102130954A (zh) * 2011-03-17 2011-07-20 华为技术有限公司 数据资源传输的方法和设备
CN102694849B (zh) * 2012-05-14 2015-07-08 中国科学院计算机网络信息中心 物联网资源信息获取方法、终端设备及系统

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
None
See also references of EP2913977A4

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10123190B2 (en) 2015-05-14 2018-11-06 Hcl Technologies Limited System and method for testing a CoAP server
WO2019047911A1 (zh) * 2017-09-11 2019-03-14 华为技术有限公司 一种物联网资源订阅的方法、设备和系统
US11528235B2 (en) 2017-09-11 2022-12-13 Huawei Cloud Computing Technologies Co., Ltd. Internet of things resource subscription method, device, and system
CN113196721A (zh) * 2019-03-01 2021-07-30 Oppo广东移动通信有限公司 物联网设备的发现方法、装置及终端设备
CN113196721B (zh) * 2019-03-01 2023-04-25 Oppo广东移动通信有限公司 物联网设备的发现方法、装置及终端设备
CN115086367A (zh) * 2022-05-30 2022-09-20 陕西翰林亿讯智能科技有限公司 一种基于智能灯具的内容分发系统及方法

Also Published As

Publication number Publication date
WO2013189394A3 (zh) 2014-02-13
EP2913977A4 (en) 2015-12-02
CN103780483A (zh) 2014-05-07
EP2913977A2 (en) 2015-09-02

Similar Documents

Publication Publication Date Title
US11882195B2 (en) Systems and methods for enabling access to third party services via a service layer
EP3195566B1 (en) Service layer interworking using mqtt protocol
EP3068110B1 (en) Method and apparatus for providing web services
US10498831B2 (en) Communication sessions at a CoAP protocol layer
EP3243317B1 (en) Machine-to-machine protocol indication and negotiation
WO2013189394A2 (zh) 一种物联网终端设备的资源信息获取方法、系统及设备
CN107278363B (zh) 用于网络通信的系统和技术
WO2014067311A1 (zh) 资源订阅方法及装置
WO2020063086A1 (zh) 基于物联网的数据传输方法及通信装置
Grigorik Making the web faster with HTTP 2.0
WO2018112327A1 (en) Methods of concurrency control for block transfer in coap publish-subscribe architecture
US11700301B2 (en) Service registration based on service capabilities requirements and preferences
Elmangoush et al. A framework for handling heterogeneous M2M traffic
CN103533001A (zh) 基于http多重代理的通信方法和系统、中间代理服务器
WO2017040948A1 (en) Enabling time flexibility for block transfer in coap protocol
US20160344573A1 (en) Method and apparatus for processing interactions between devices

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: 13807211

Country of ref document: EP

Kind code of ref document: A2

WWE Wipo information: entry into national phase

Ref document number: 2013807211

Country of ref document: EP