WO2015154459A1 - Notification method and device for change of subscribed resource - Google Patents

Notification method and device for change of subscribed resource Download PDF

Info

Publication number
WO2015154459A1
WO2015154459A1 PCT/CN2014/091044 CN2014091044W WO2015154459A1 WO 2015154459 A1 WO2015154459 A1 WO 2015154459A1 CN 2014091044 W CN2014091044 W CN 2014091044W WO 2015154459 A1 WO2015154459 A1 WO 2015154459A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
sub
subscribed
subscription
notification message
Prior art date
Application number
PCT/CN2014/091044
Other languages
French (fr)
Chinese (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 中兴通讯股份有限公司
Publication of WO2015154459A1 publication Critical patent/WO2015154459A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and apparatus for subscribing to resource change notifications.
  • the Internet of Things (M2M) communication network consists of various M2M nodes and bearer networks.
  • the M2M nodes communicate with each other through a bearer network.
  • An M2M node includes at least one application entity or one public service entity.
  • the application entity is a logical unit that executes an actual M2M application
  • the public service entity is a logical unit that manages and services the application.
  • the application node is the end execution node, such as a smart meter, a temperature measurement and control sensor, a fire alarm, a smart home appliance, etc.
  • the intermediate node is a middleware that connects the end execution node to the network side server, such as a gateway, and a base.
  • the node is a server on the network side, and the application entity registered on the base node is usually a management software or management platform of the M2M service provider.
  • the communication between the M2M applications is realized through the interaction between the public service entity service environment CAMEL (Camel Service Environment referred to as CSE), and the premise of the communication is that the M2M application first needs to be registered in the local CSE, and FIG. 1 is according to the related technology.
  • CSE Car Service Environment
  • FIG. 1 is according to the related technology.
  • the application entity on the application node needs to register the CSE on the intermediate node, then the CSE on the intermediate node is the local CSE of the application entity on the application node, and then can communicate through the CSE.
  • the interaction of the M2M application is implemented, as shown in the related art in the related art M2M system architecture diagram.
  • the application node is a physical entity
  • the application entity AE is a logical unit, which is a logical unit that actually executes an application on the physical entity of the application node.
  • the application entity When the application entity is registered on the local CSE, the application entity needs to provide a security certificate that can identify its own legality and provide it to the local CSE for authentication. Only the authentication can be registered in the local CSE, and the application entity also needs to provide the application entity recommendation. Register the name for the local CSE reference.
  • the registered application entity AE can also create an application-related resource on the local CSE as a sub-resource of the application resource.
  • the local CSE creates a resource “application” after the AE is registered, and the application can also be applied to the resource in order to save the application data.
  • the AE can subscribe to the message of whether a resource has changed.
  • the resource being subscribed to is in the attribute or sub
  • the resource is changed, for example, the value of the attribute is modified, the sub-resource is deleted, or the sub-resource is newly created, and the CSE where the resource is located may send a notification message to the AE to inform that the resource of interest is modified.
  • the subscription to the resource is implemented by the AE creating a sub-resource of type "subscriPN24145tion" under the resource that the CSE wants to subscribe to.
  • the subscription is only valid for the current resource, and when the attribute of the sub-resource of the sub-resource is modified, or the sub-resource of the sub-resource is deleted or created. , no notification message will be sent.
  • the present invention provides a method and an apparatus for subscribing to a resource change notification, so as to at least solve the related art, if a plurality of sub-resources are nested under one resource, and the subscriber needs to obtain a change notification message of all resources and sub-resources thereof, Each resource's sub-resource creates a subscription resource, which causes the CSE where the resource is located to consume a large amount of storage resources.
  • a method for subscribing to a resource change notification includes: detecting whether a sub-resource of a subscribed resource and/or the subscribed resource changes; when the subscribed resource and/or the When the child resource sends a change, the notification message is sent to the subscriber according to the subscription validity range of the subscriber of the subscribed resource, where the subscription valid scope includes: the subscribed resource and/or the child resource.
  • sending a notification message to the subscribing party according to a subscription valid range of the subscribing resource of the subscribed resource including at least one of: when the subscription valid range is the subscribed resource, in the subscribed Sending the notification message to the subscriber when the resource changes; when the subscription validity range is the sub-resource, sending the notification message to the sub-subscribe when the sub-resource changes;
  • the subscription valid range is the subscribed resource and the sub-resource, when the subscribed resource and/or the sub-resource change, the notification message is sent to the subscribing party.
  • the notification message carries indication information indicating that the changed subscription resource is the subscribed resource and/or the sub-resource.
  • detecting whether the subscribed resource and/or the sub-resource of the subscribed resource changes including at least one of: detecting whether the attribute of the sub-resource and/or the sub-resource of the subscribed resource is changed; detecting Whether the subscribing resource and/or the sub-resource of the subscribed resource is deleted; whether the subscribed resource and/or the sub-resource of the subscribed resource create a new sub-resource.
  • the method further includes: receiving a request message for creating a subscription resource sent by the subscribing party, where the request message carries the The subscription valid range of the subscription resource; setting the subscription validity range carried in the request message to the subscriber's subscription valid range.
  • the subscribed resource and the sub-resource are M2M application resources.
  • an apparatus for subscribing to a resource change notification includes: a detecting module configured to detect whether a sub-resource of a subscribed resource and/or the subscribed resource changes; a sending module, configured to When the subscribed resource and/or the sub-resource sends a change, sending a notification message to the subscribing party according to a subscription valid range of the subscribing party of the subscribed resource, where the subscription valid range includes: Subscribed to resources and/or the sub-resources.
  • the sending module includes: a first sending unit, configured to send the notification to the subscribing party when the subscribed resource changes, when the subscription valid range is the subscribed resource a second sending unit, configured to send the notification message to the subscribing party when the sub-resource changes when the sub-resource is changed, and the third sending unit is configured to be When the subscription valid range is the subscribed resource and the sub-resource, when the subscribed resource and/or the sub-resource change, the notification message is sent to the subscribing party; wherein the notification The message carries the indication information indicating that the changed subscription resource is the subscribed resource and/or the sub-resource.
  • the detecting module includes: a first detecting unit, configured to detect whether the attribute of the subscribed resource and/or the sub-resource of the subscribed resource is changed; and the second detecting unit is configured to detect the subscribed resource and/or Whether the sub-resource of the subscribed resource is deleted; the third detecting unit is configured to be a sub-resource and/or a sub-resource of the sub-resource to create a new sub-resource.
  • the method further includes: a receiving module, configured to receive a request message for creating a subscription resource sent by the subscriber, where the request message carries a subscription valid range of the subscription resource; and a setting module is configured to: The subscription validity range carried in the request message is set to the subscription valid range of the subscriber.
  • the embodiment of the present invention adopts a manner of sending a notification message to a subscribing party according to a subscription effective range of a subscriber of the subscribed resource when the subscription resource and/or the sub-resource change is sent, wherein the subscription valid scope includes: the subscribed resource And/or a sub-resource, that is, selecting a valid range of sending a notification message according to a valid range of the subscription resource, thereby eliminating the need to send a notification message for each subscribing resource, and solving the related art if a resource is under When a plurality of sub-resources are nested and the subscriber needs to obtain the change notification message of all the resources and their sub-resources, a sub-resource is created for each sub-resource of each resource, and the CSE where the sub-resource is located consumes a large amount of storage resources. The problem saves storage resources.
  • FIG. 1 is a structural diagram of an M2M system according to the related art
  • FIG. 2 is a flowchart of a method for subscribing to a resource change notification according to an embodiment of the present invention
  • FIG. 3 is a structural block diagram of a subscription resource change notification apparatus according to an embodiment of the present invention.
  • FIG. 4 is a block diagram 1 of an optional structure of a subscription resource change notification device according to an embodiment of the present invention.
  • FIG. 5 is a block diagram 2 of an optional structure of a subscription resource change notification apparatus according to an embodiment of the present invention.
  • FIG. 6 is a block diagram 3 of an optional structure of a subscription resource change notification apparatus according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of a method for subscribing to a resource change notification according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:
  • Step S202 detecting whether the sub-resource of the subscribed resource and/or the subscribed resource changes;
  • Step S204 When the subscription resource and/or the sub-resource change is sent, the notification message is sent to the subscribing party according to the subscription valid range of the subscribing resource of the subscribed resource, where the subscription valid scope includes: the subscribed resource and/or the subscribed resource. Child resources.
  • the manner in which the notification message is sent to the subscriber according to the subscription validity range of the subscriber of the subscribed resource is adopted, wherein the subscription effective scope includes: the manner of being subscribed to the resource and/or the sub-resource, and solving one of the related technologies. Multiple sub-resources are nested under the resource, and the subscriber needs to get all the resources and their sub-resources.
  • the notification message is changed, a subscription resource needs to be created for each resource of the resource, and the CSE where the subscription resource is located consumes a large amount of storage resources, thereby saving storage resources.
  • the notification message is sent to the subscriber according to the subscription validity range of the subscriber of the subscribed resource, including at least one of the following: when the subscription valid scope is the subscribed resource, to the subscriber when the subscribed resource changes Sending a notification message; when the subscription valid range is a child resource, sending a notification message to the subscriber when the child resource changes; when the subscription validity range is the subscribed resource and the child resource, when the subscribed resource and/or the child resource changes , send a notification message to the subscriber.
  • the notification message carries the indication information that the subscription resource that is changed is the subscribed resource and/or the sub-resource.
  • detecting whether the sub-resource of the subscribed resource and/or the subscribed resource changes including at least one of: detecting whether the attribute of the sub-resource and/or the sub-resource of the subscribed resource is changed; detecting Whether the subscribed resource and/or the sub-resource of the subscribed resource is deleted; whether the subscribed resource and/or the sub-resource of the subscribed resource create a new sub-resource.
  • the method before detecting whether the sub-resource of the subscribed resource and/or the subscribed resource is changed, the method further includes: receiving a request message for creating a subscription resource sent by the subscribing party, where the request message carries a subscription valid range of the subscription resource; Set the subscription validity range carried in the request message to the subscriber's subscription validity range.
  • the subscribed resource and the sub-resource are M2M application resources.
  • a device for subscribing to the resource change notification is provided, and the device is used to implement the foregoing embodiment and the optional implementation manner, and details are not described herein.
  • the term “module” can implement software for a predetermined function.
  • FIG. 3 is a structural block diagram of a subscription resource change notification apparatus according to an embodiment of the present invention.
  • the apparatus includes: a detection module 32 configured to detect whether a sub-resource of a subscribed resource and/or a subscribed resource changes.
  • the sending module 34 is coupled to the detecting module 32, and is configured to send a notification message to the subscriber according to the subscription valid range of the subscriber of the subscribed resource when the subscription resource and/or the sub-resource is changed, wherein the subscription valid range includes : Subscribed to resources and/or sub-resources.
  • FIG. 4 is a block diagram of an optional structure of a subscription resource change notification apparatus according to an embodiment of the present invention.
  • the sending module 34 includes: a first sending unit 42 configured to: when the subscription valid range is a subscribed resource, Sending a notification message to the subscribing party when the subscribed resource is changed;
  • the second sending unit 44 is coupled to the first sending unit 42 and is configured to be configured to the subscribing party when the sub-resource changes when the subscription valid range is a sub-resource Sending a notification message;
  • the third sending unit 46 is coupled to the second sending unit 44, and is configured to send a notification to the subscriber when the subscribed resource and/or the sub-resource change when the subscription valid range is the subscribed resource and the sub-resource a message; wherein the notification message carries indication information indicating that the changed subscription resource is a subscribed resource and/or a sub-resource.
  • FIG. 5 is a block diagram 2 of an optional structure of a subscription resource change notification apparatus according to an embodiment of the present invention.
  • the detection module 32 includes: a first detection unit 52 configured to detect a subscribed resource and/or a subscribed resource. Whether the attribute of the sub-resource is changed; the second detecting unit 54 is coupled to the first detecting unit 52, and is configured to detect whether the sub-resource of the subscribed resource and/or the subscribed resource is deleted; the third detecting unit 56 and the second detecting Unit 54 is coupled to set up to be a sub-resource that is subscribed to the resource and/or sub-resourced to create a new sub-resource.
  • FIG. 6 is a block diagram 3 of an optional structure of a device for subscribing to a resource change notification according to an embodiment of the present invention.
  • the device includes: a receiving module 62, configured to receive a subscriber, in addition to the module of FIG. a request message for creating a subscription resource, wherein the request message carries a subscription validity range of the subscription resource; the setting module 64 is coupled to the receiving module 62, and is configured to set the subscription validity range carried in the request message to the subscription validity range of the subscriber. .
  • An optional embodiment of the present invention provides a notification method for subscribing to a resource change, so that the subscriber can specify a valid range of the subscription resource, thereby implementing a beneficial effect of reducing resource creation and saving storage space for the above scenario.
  • Step S302 The subscription initiator sends a request to create a subscription resource to the CSE.
  • the request to create a subscription resource includes the following parameters and their values: the address of the subscribed resource, the valid range of the subscription: the value of the subscription valid range is “global” or “local”, And the notification sending address;
  • Step S304 After verifying that the request originator has the right to create a subscription resource, the CSE creates a sub-resource under the sub-subscribed resource: subscribes to the resource, and creates an attribute “subscription valid range” for the subscription resource, and the value is set to create a subscription resource request.
  • the value of the parameter subscription valid range, and the attribute "notification sending address" is created for the subscription resource, and the value is set to the value of the notification sending address in the subscription resource request;
  • Step S306 If the value of the attribute "subscription valid range" is "global", when the attribute value of the subscribed resource is changed, or the sub-resource of the subscribed resource is deleted, or the sub-resource is created by the subscribed resource, or is subscribed The attribute value of each level of the resource of the resource is changed, or the child resource of each level of the sub-resource of the subscribed resource is deleted, or When each sub-resource of the subscribed resource creates a new sub-resource, the CSE sends a notification message to the destination address in the attribute "Notification Send Address".
  • Step S308 If the value of the attribute "subscription valid range" is "local", when the attribute value of the subscribed resource is changed, or the sub-resource of the subscribed resource is deleted, or the sub-resource is created by the sub-resource, the CSE sends The notification message goes to the destination address in the attribute "Notification Send Address”.
  • Step S402 The application entity AE sends a create resource request, requesting to create an application resource on the CSE;
  • Step S404 The CSE creates a resource "application"
  • Step S406 The AE sends a create resource request, and requests to create a container resource under the resource “application” on the CSE;
  • Step S408 The CSE creates a sub-resource "container" under the resource "application”;
  • Step S410 The AE sends a create resource request, and requests to create an instance resource under the resource “container” on the CSE.
  • Step S412 The CSE creates a sub-resource "instance" under the resource "container";
  • Step S414 The AE, as a subscription initiator, sends a request for creating a resource, requesting to create a subscription resource on the CSE, where the request includes: (1) resource type: subscription; (2) subscribed resource address: ⁇ CSE ⁇ application; (3) ) Subscription valid range: global (4) notification sending address: " ⁇ AE1 ";
  • Step S416 According to the subscribed resource address in the request, the CSE creates a subscription type resource “Subscription 1” under the resource “Apply”, and sets a property “Subscription Validity Range” for the resource “Subscription”, and the value is set to “global”. Set the attribute "notification sending address” for the resource "subscription”, and its value is set to " ⁇ AE1";
  • Step S418 When the resource "application”, or the resource “container”, or the attribute value of the resource "instance” is changed, or its sub-resource is deleted, or when a new sub-resource is created, the CSE sends a notification message to the attribute "notification". The destination address in the "send address”.
  • Step S502 The application entity AE sends a create resource request, requesting to create an application resource on the CSE;
  • Step S504 The CSE creates a resource "application"
  • Step S506 The AE sends a create resource request, and requests to create a container resource under the resource “application” on the CSE;
  • Step S508 The CSE creates a sub-resource "container" under the resource "application”;
  • Step S510 The AE sends a create resource request, requesting to create an instance resource under the resource “container” on the CSE;
  • Step S512 The CSE creates a sub-resource "instance" under the resource "container";
  • Step S514 The AE, as a subscription initiator, sends a create resource request, requesting to create a subscription resource on the CSE, where the request includes: (1) resource type: subscription; (2) subscribed resource address: ⁇ CSE ⁇ application; (3) ) Subscription valid range: local (4) notification sending address: ⁇ AE1;
  • Step S516 According to the subscribed resource address in the request, the CSE creates a subscription type resource “Subscription 1” under the resource “Apply”, and sets a property “Subscription Validity Range” for the resource “Subscription”, and the value is set to “local”. Set the property "Notification Send Address” for the resource “Subscription” with the value set to " ⁇ AE1 ".
  • Step S518 When the attribute value of the resource "application” is changed, or its sub-resource is deleted, or when a new sub-resource is created, the CSE sends a notification message to the target address in the attribute "notification sending address".
  • the CSE does not send a notification message when the attribute values of the resource "container" and the resource "instance” change, or their child resources are deleted, or when a new child resource is created.
  • the notification message is sent to the subscriber by using the steps of the foregoing optional embodiment, and the notification message is sent to the subscriber when the subscription validity range is global, and the notification message is sent when the subscription resource and its sub-resources are changed. To the subscriber; when the subscription valid range is local, the notification message is sent to the subscriber only when the subscription sub-resource is changed.
  • the subscriber can select the effective range of the subscription resource according to the need, thereby reducing the subscription resource creation and saving the storage space.
  • the embodiment of the present invention adopts a manner of sending a notification message to a subscribing party according to a subscription effective range of a subscriber of the subscribed resource when the subscription resource and/or the sub-resource change is sent, wherein the subscription valid scope includes: the subscribed resource And/or the sub-resources, that is, the effective range of sending the notification message is selected according to the valid range of the subscription resource, so that the method for sending the notification message for each sub-resource is not needed, and the related technology is configured to nest multiple sub-resources under one resource.
  • a subscription resource is created for each resource's child resources, and the CSE where the subscription resource is located consumes a large amount of storage resources, thereby saving storage resources.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.

Abstract

Provided are a notification method and device for the change of a subscribed resource. The method comprises: detecting whether a subscribed resource and/or a sub-resource of the subscribed resource are/is changed; and when the subscribed resource and/or the sub-resource are/is changed, according to an effective subscription range of a subscriber of the subscribed resource, sending a notification message to the subscriber, wherein the effective subscription range comprises the subscribed resource and/or the sub-resource. By means of the present invention, the problem in the related art that if a plurality of sub-resources are nested below one resource and the subscriber needs to acquire notification messages of the changes of all resources and sub-resources thereof, a CSE where the subscribed resources are located consumes a large number of storage resources due to the fact that subscribed resources need to be created for sub-resources of each resource is solved, thereby saving storage resources.

Description

订阅资源变更通知的方法及装置Method and device for subscribing to resource change notification 技术领域Technical field
本发明涉及通信领域,具体而言,涉及一种订阅资源变更通知的方法及装置。The present invention relates to the field of communications, and in particular, to a method and apparatus for subscribing to resource change notifications.
背景技术Background technique
物联网(Machine to Machine简称为M2M)通信网络由各个M2M节点和承载网络组成。M2M节点通过承载网络实现互相通信,一个M2M节点至少包含一个应用实体或者一个公共业务实体。其中应用实体是执行实际M2M应用的逻辑单元,公共业务实体是对应用进行管理和服务的逻辑单元。The Internet of Things (M2M) communication network consists of various M2M nodes and bearer networks. The M2M nodes communicate with each other through a bearer network. An M2M node includes at least one application entity or one public service entity. The application entity is a logical unit that executes an actual M2M application, and the public service entity is a logical unit that manages and services the application.
在M2M系统架构中,应用节点是末端的执行节点,例如智能电表,温度测控传感器,火警报警器,智能家电等等,中间节点是连接末端执行节点到网络侧服务器的中间件,例如网关,基础节点是网络侧的服务器,注册在基础节点上的应用实体通常是M2M服务商的管理软件或管理平台。In the M2M system architecture, the application node is the end execution node, such as a smart meter, a temperature measurement and control sensor, a fire alarm, a smart home appliance, etc., and the intermediate node is a middleware that connects the end execution node to the network side server, such as a gateway, and a base. The node is a server on the network side, and the application entity registered on the base node is usually a management software or management platform of the M2M service provider.
M2M应用之间的通信是通过公共业务实体服务环境CAMEL(Camel Service Environment简称为CSE)之间的交互来实现,而通信的前提是M2M应用首先需要在本地CSE进行注册,图1是根据相关技术中M2M系统架构图,如图1所示应用节点上的应用实体需要注册在中间节点上的CSE,那么中间节点上的CSE就是应用节点上应用实体的本地CSE,然后才能通过CSE之间的通信实现M2M应用的交互,如图1所示相关技术中M2M系统架构图。The communication between the M2M applications is realized through the interaction between the public service entity service environment CAMEL (Camel Service Environment referred to as CSE), and the premise of the communication is that the M2M application first needs to be registered in the local CSE, and FIG. 1 is according to the related technology. In the M2M system architecture diagram, as shown in Figure 1, the application entity on the application node needs to register the CSE on the intermediate node, then the CSE on the intermediate node is the local CSE of the application entity on the application node, and then can communicate through the CSE. The interaction of the M2M application is implemented, as shown in the related art in the related art M2M system architecture diagram.
应用节点是物理实体,应用实体AE是逻辑单元,是在应用节点这个物理实体上真正执行应用的逻辑单元。The application node is a physical entity, and the application entity AE is a logical unit, which is a logical unit that actually executes an application on the physical entity of the application node.
在应用实体注册在本地CSE上时,应用实体需要提供能标识自己合法性的安全证书,提供给本地CSE进行验证,只有验证通过才能在本地CSE进行注册,同时应用实体还需要提供应用实体建议的注册名称给本地CSE参考。When the application entity is registered on the local CSE, the application entity needs to provide a security certificate that can identify its own legality and provide it to the local CSE for authentication. Only the authentication can be registered in the local CSE, and the application entity also needs to provide the application entity recommendation. Register the name for the local CSE reference.
注册后的应用实体AE还可以在本地CSE上创建应用相关的资源,作为应用资源的子资源,例如AE注册后本地CSE创建资源“应用”,为了保存应用的数据,应用还可以在资源“应用”下创建资源“容器”,资源“容器”用来保存AE相关的数据。AE可以通过订阅的方式来获取某个资源是否变更的消息。被订阅的资源在属性或者子 资源变更时,例如属性的值被修改,子资源被删除,或新创建了子资源等,该资源所在的CSE可以向AE发送通知消息,告知其关注的资源被修改了。对资源的订阅是通过AE在CSE想要订阅的资源下上创建类型为“subscriPN24145tion”的子资源来实现的。The registered application entity AE can also create an application-related resource on the local CSE as a sub-resource of the application resource. For example, the local CSE creates a resource “application” after the AE is registered, and the application can also be applied to the resource in order to save the application data. "Create a resource "container" under which the resource "container" is used to store AE-related data. The AE can subscribe to the message of whether a resource has changed. The resource being subscribed to is in the attribute or sub When the resource is changed, for example, the value of the attribute is modified, the sub-resource is deleted, or the sub-resource is newly created, and the CSE where the resource is located may send a notification message to the AE to inform that the resource of interest is modified. The subscription to the resource is implemented by the AE creating a sub-resource of type "subscriPN24145tion" under the resource that the CSE wants to subscribe to.
现有技术中,出于避免订阅者接收大量的通知消息的考虑,订阅只对当前资源有效,而当被订阅的资源的子资源的属性被修改,或者子资源的子资源被删除或创建时,不会发送通知消息。In the prior art, in order to prevent the subscriber from receiving a large number of notification messages, the subscription is only valid for the current resource, and when the attribute of the sub-resource of the sub-resource is modified, or the sub-resource of the sub-resource is deleted or created. , no notification message will be sent.
在现有技术的机制下,如果一个资源下面嵌套多个多层的子资源,且订阅方需要获取所有资源及其子资源的变更通知消息时,需要为每个资源的子资源都创建一个订阅资源,由此导致资源所在的CSE消耗大量的存储资源。Under the prior art mechanism, if multiple multiple sub-resources are nested under one resource, and the subscribing party needs to obtain the change notification message of all resources and their sub-resources, it is necessary to create a sub-resource for each resource. Subscribing to resources, resulting in the CSE where the resources are located consumes a large amount of storage resources.
发明内容Summary of the invention
本发明提供了一种订阅资源变更通知的方法及装置,以至少解决相关技术中如果一个资源下面嵌套多个子资源,且订阅方需要获取所有资源及其子资源的变更通知消息时,需要为每个资源的子资源都创建一个订阅资源,而导致资源所在的CSE消耗大量的存储资源的问题。The present invention provides a method and an apparatus for subscribing to a resource change notification, so as to at least solve the related art, if a plurality of sub-resources are nested under one resource, and the subscriber needs to obtain a change notification message of all resources and sub-resources thereof, Each resource's sub-resource creates a subscription resource, which causes the CSE where the resource is located to consume a large amount of storage resources.
根据本发明的一个方面,提供了一种订阅资源变更通知的方法,包括:检测被订阅资源和/或所述被订阅资源的子资源是否发生变化;当所述被订阅资源和/或所述子资源发送变化时,根据所述被订阅资源的订阅方的订阅有效范围向所述订阅方发送通知消息,其中,所述订阅有效范围包括:所述被订阅资源和/或所述子资源。According to an aspect of the present invention, a method for subscribing to a resource change notification includes: detecting whether a sub-resource of a subscribed resource and/or the subscribed resource changes; when the subscribed resource and/or the When the child resource sends a change, the notification message is sent to the subscriber according to the subscription validity range of the subscriber of the subscribed resource, where the subscription valid scope includes: the subscribed resource and/or the child resource.
进一步地,根据所述被订阅资源的订阅方的订阅有效范围向所述订阅方发送通知消息,包括以下至少之一:当所述订阅有效范围为所述被订阅资源时,在所述被订阅资源发生变化的情况下向所述订阅方发送所述通知消息;当所述订阅有效范围为所述子资源时,在所述子资源发生变化时向所述订阅方发送所述通知消息;当所述订阅有效范围为所述被订阅资源和所述子资源时,在所述被订阅资源和/或所述子资源发生变化时,向所述订阅方发送所述通知消息。Further, sending a notification message to the subscribing party according to a subscription valid range of the subscribing resource of the subscribed resource, including at least one of: when the subscription valid range is the subscribed resource, in the subscribed Sending the notification message to the subscriber when the resource changes; when the subscription validity range is the sub-resource, sending the notification message to the sub-subscribe when the sub-resource changes; When the subscription valid range is the subscribed resource and the sub-resource, when the subscribed resource and/or the sub-resource change, the notification message is sent to the subscribing party.
进一步地,所述通知消息中携带有指示发生变化的订阅资源是所述被订阅资源和/或所述子资源的指示信息。Further, the notification message carries indication information indicating that the changed subscription resource is the subscribed resource and/or the sub-resource.
进一步地,检测被订阅资源和/或所述被订阅资源的子资源是否发生变化,包括以下至少之一:检测被订阅资源和/或所述被订阅资源的子资源的属性是否变更;检测被 订阅资源和/或所述被订阅资源的子资源是否被删除;被订阅资源和/或所述被订阅资源的子资源是否创建新的子资源。Further, detecting whether the subscribed resource and/or the sub-resource of the subscribed resource changes, including at least one of: detecting whether the attribute of the sub-resource and/or the sub-resource of the subscribed resource is changed; detecting Whether the subscribing resource and/or the sub-resource of the subscribed resource is deleted; whether the subscribed resource and/or the sub-resource of the subscribed resource create a new sub-resource.
进一步地,检测被订阅资源和/或所述被订阅资源的子资源是否发生变化之前,还包括:接收所述订阅方发送的创建订阅资源的请求消息,其中所述请求消息中携带有所述订阅资源的订阅有效范围;将所述请求消息中携带的订阅有效范围设置为所述订阅方的订阅有效范围。Further, before detecting whether the subscribed resource and/or the sub-resource of the subscribed resource is changed, the method further includes: receiving a request message for creating a subscription resource sent by the subscribing party, where the request message carries the The subscription valid range of the subscription resource; setting the subscription validity range carried in the request message to the subscriber's subscription valid range.
进一步地,所述被订阅资源和所述子资源为M2M的应用资源。Further, the subscribed resource and the sub-resource are M2M application resources.
根据本发明的另一个方面,提供了一种订阅资源变更通知的装置,包括:检测模块,设置为检测被订阅资源和/或所述被订阅资源的子资源是否发生变化;发送模块,设置为当所述被订阅资源和/或所述子资源发送变化时,根据所述被订阅资源的订阅方的订阅有效范围向所述订阅方发送通知消息,其中,所述订阅有效范围包括:所述被订阅资源和/或所述子资源。According to another aspect of the present invention, an apparatus for subscribing to a resource change notification includes: a detecting module configured to detect whether a sub-resource of a subscribed resource and/or the subscribed resource changes; a sending module, configured to When the subscribed resource and/or the sub-resource sends a change, sending a notification message to the subscribing party according to a subscription valid range of the subscribing party of the subscribed resource, where the subscription valid range includes: Subscribed to resources and/or the sub-resources.
进一步地,所述发送模块包括,第一发送单元,设置为当所述订阅有效范围为所述被订阅资源时,在所述被订阅资源发生变化的情况下向所述订阅方发送所述通知消息;第二发送单元,设置为当所述订阅有效范围为所述子资源时,在所述子资源发生变化时向所述订阅方发送所述通知消息;第三发送单元,设置为当所述订阅有效范围为所述被订阅资源和所述子资源时,在所述被订阅资源和/或所述子资源发生变化时,向所述订阅方发送所述通知消息;其中,所述通知消息中携带有指示发生变化的订阅资源是所述被订阅资源和/或所述子资源的指示信息。Further, the sending module includes: a first sending unit, configured to send the notification to the subscribing party when the subscribed resource changes, when the subscription valid range is the subscribed resource a second sending unit, configured to send the notification message to the subscribing party when the sub-resource changes when the sub-resource is changed, and the third sending unit is configured to be When the subscription valid range is the subscribed resource and the sub-resource, when the subscribed resource and/or the sub-resource change, the notification message is sent to the subscribing party; wherein the notification The message carries the indication information indicating that the changed subscription resource is the subscribed resource and/or the sub-resource.
进一步地,所述检测模块包括:第一检测单元,设置为检测被订阅资源和/或所述被订阅资源的子资源的属性是否变更;第二检测单元,设置为检测被订阅资源和/或所述被订阅资源的子资源是否被删除;第三检测单元,设置为被订阅资源和/或所述被订阅资源的子资源是否创建新的子资源。Further, the detecting module includes: a first detecting unit, configured to detect whether the attribute of the subscribed resource and/or the sub-resource of the subscribed resource is changed; and the second detecting unit is configured to detect the subscribed resource and/or Whether the sub-resource of the subscribed resource is deleted; the third detecting unit is configured to be a sub-resource and/or a sub-resource of the sub-resource to create a new sub-resource.
进一步地,还包括:接收模块,设置为接收所述订阅方发送的创建订阅资源的请求消息,其中所述请求消息中携带有所述订阅资源的订阅有效范围;设置模块,设置为将所述请求消息中携带的订阅有效范围设置为所述订阅方的订阅有效范围。Further, the method further includes: a receiving module, configured to receive a request message for creating a subscription resource sent by the subscriber, where the request message carries a subscription valid range of the subscription resource; and a setting module is configured to: The subscription validity range carried in the request message is set to the subscription valid range of the subscriber.
通过本发明实施例,采用当被订阅资源和/或子资源发送变化时,根据被订阅资源的订阅方的订阅有效范围向订阅方发送通知消息的方式,其中,订阅有效范围包括:被订阅资源和/或子资源,即根据订阅资源的有效范围选择发送通知消息的有效范围,进而不需要为每个订阅资源发送通知消息的方式,解决了相关技术中如果一个资源下 面嵌套多个子资源,且订阅方需要获取所有资源及其子资源的变更通知消息时,需要为每个资源的子资源都创建一个订阅资源,而导致订阅资源所在的CSE消耗大量的存储资源的问题,节省了存储资源。The embodiment of the present invention adopts a manner of sending a notification message to a subscribing party according to a subscription effective range of a subscriber of the subscribed resource when the subscription resource and/or the sub-resource change is sent, wherein the subscription valid scope includes: the subscribed resource And/or a sub-resource, that is, selecting a valid range of sending a notification message according to a valid range of the subscription resource, thereby eliminating the need to send a notification message for each subscribing resource, and solving the related art if a resource is under When a plurality of sub-resources are nested and the subscriber needs to obtain the change notification message of all the resources and their sub-resources, a sub-resource is created for each sub-resource of each resource, and the CSE where the sub-resource is located consumes a large amount of storage resources. The problem saves storage resources.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据相关技术中M2M系统架构图;1 is a structural diagram of an M2M system according to the related art;
图2是根据本发明实施例的订阅资源变更通知的方法流程图;2 is a flowchart of a method for subscribing to a resource change notification according to an embodiment of the present invention;
图3是根据本发明实施例的订阅资源变更通知装置的结构框图;FIG. 3 is a structural block diagram of a subscription resource change notification apparatus according to an embodiment of the present invention; FIG.
图4是根据本发明实施例的订阅资源变更通知装置的可选结构框图一;4 is a block diagram 1 of an optional structure of a subscription resource change notification device according to an embodiment of the present invention;
图5是根据本发明实施例的订阅资源变更通知装置的可选结构框图二;FIG. 5 is a block diagram 2 of an optional structure of a subscription resource change notification apparatus according to an embodiment of the present invention; FIG.
图6是根据本发明实施例的订阅资源变更通知装置的可选结构框图三。FIG. 6 is a block diagram 3 of an optional structure of a subscription resource change notification apparatus according to an embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
在本实施例中提供了一种订阅资源变更通知的方法,图2是根据本发明实施例的订阅资源变更通知的方法流程图,如图2所示,该流程包括如下步骤:In this embodiment, a method for subscribing to a resource change notification is provided. FIG. 2 is a flowchart of a method for subscribing to a resource change notification according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:
步骤S202:检测被订阅资源和/或被订阅资源的子资源是否发生变化;Step S202: detecting whether the sub-resource of the subscribed resource and/or the subscribed resource changes;
步骤S204:当被订阅资源和/或子资源发送变化时,根据被订阅资源的订阅方的订阅有效范围向订阅方发送通知消息,其中,订阅有效范围包括:被订阅资源和/或被订阅资源的子资源。Step S204: When the subscription resource and/or the sub-resource change is sent, the notification message is sent to the subscribing party according to the subscription valid range of the subscribing resource of the subscribed resource, where the subscription valid scope includes: the subscribed resource and/or the subscribed resource. Child resources.
通过上述步骤,采用根据被订阅资源的订阅方的订阅有效范围向订阅方发送通知消息的方式,其中,订阅有效范围包括:被订阅资源和/或子资源的方式,解决了相关技术中如果一个资源下面嵌套多个子资源,且订阅方需要获取所有资源及其子资源的 变更通知消息时,需要为每个资源的子资源都创建一个订阅资源,而导致订阅资源所在的CSE消耗大量的存储资源的问题,节省了存储资源。Through the above steps, the manner in which the notification message is sent to the subscriber according to the subscription validity range of the subscriber of the subscribed resource is adopted, wherein the subscription effective scope includes: the manner of being subscribed to the resource and/or the sub-resource, and solving one of the related technologies. Multiple sub-resources are nested under the resource, and the subscriber needs to get all the resources and their sub-resources. When the notification message is changed, a subscription resource needs to be created for each resource of the resource, and the CSE where the subscription resource is located consumes a large amount of storage resources, thereby saving storage resources.
可选地,根据被订阅资源的订阅方的订阅有效范围向订阅方发送通知消息,包括以下至少之一:当订阅有效范围为被订阅资源时,在被订阅资源发生变化的情况下向订阅方发送通知消息;当订阅有效范围为子资源时,在子资源发生变化时向订阅方发送通知消息;当订阅有效范围为被订阅资源和子资源时,在被订阅资源和/或子资源发生变化时,向订阅方发送通知消息。Optionally, the notification message is sent to the subscriber according to the subscription validity range of the subscriber of the subscribed resource, including at least one of the following: when the subscription valid scope is the subscribed resource, to the subscriber when the subscribed resource changes Sending a notification message; when the subscription valid range is a child resource, sending a notification message to the subscriber when the child resource changes; when the subscription validity range is the subscribed resource and the child resource, when the subscribed resource and/or the child resource changes , send a notification message to the subscriber.
可选地,通知消息中携带有指示发生变化的订阅资源是被订阅资源和/或子资源的指示信息。Optionally, the notification message carries the indication information that the subscription resource that is changed is the subscribed resource and/or the sub-resource.
可选地,检测被订阅资源和/或所述被订阅资源的子资源是否发生变化,包括以下至少之一:检测被订阅资源和/或所述被订阅资源的子资源的属性是否变更;检测被订阅资源和/或所述被订阅资源的子资源是否被删除;被订阅资源和/或所述被订阅资源的子资源是否创建新的子资源。Optionally, detecting whether the sub-resource of the subscribed resource and/or the subscribed resource changes, including at least one of: detecting whether the attribute of the sub-resource and/or the sub-resource of the subscribed resource is changed; detecting Whether the subscribed resource and/or the sub-resource of the subscribed resource is deleted; whether the subscribed resource and/or the sub-resource of the subscribed resource create a new sub-resource.
可选地,检测被订阅资源和/或被订阅资源的子资源是否发生变化之前,还包括:接收订阅方发送的创建订阅资源的请求消息,其中请求消息中携带有订阅资源的订阅有效范围;将请求消息中携带的订阅有效范围设置为订阅方的订阅有效范围。Optionally, before detecting whether the sub-resource of the subscribed resource and/or the subscribed resource is changed, the method further includes: receiving a request message for creating a subscription resource sent by the subscribing party, where the request message carries a subscription valid range of the subscription resource; Set the subscription validity range carried in the request message to the subscriber's subscription validity range.
可选地,被订阅资源和子资源为M2M的应用资源。Optionally, the subscribed resource and the sub-resource are M2M application resources.
在本实施例中还提供了一种订阅资源变更通知的装置,该装置用于实现上述实施例及可选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件。In the embodiment, a device for subscribing to the resource change notification is provided, and the device is used to implement the foregoing embodiment and the optional implementation manner, and details are not described herein. As used below, the term "module" can implement software for a predetermined function.
图3是根据本发明实施例的订阅资源变更通知装置的结构框图,如图3所示,该装置包括:检测模块32,设置为检测被订阅资源和/或被订阅资源的子资源是否发生变化;发送模块34与检测模块32耦合连接,设置为当被订阅资源和/或子资源发送变化时,根据被订阅资源的订阅方的订阅有效范围向订阅方发送通知消息,其中,订阅有效范围包括:被订阅资源和/或子资源。FIG. 3 is a structural block diagram of a subscription resource change notification apparatus according to an embodiment of the present invention. As shown in FIG. 3, the apparatus includes: a detection module 32 configured to detect whether a sub-resource of a subscribed resource and/or a subscribed resource changes. The sending module 34 is coupled to the detecting module 32, and is configured to send a notification message to the subscriber according to the subscription valid range of the subscriber of the subscribed resource when the subscription resource and/or the sub-resource is changed, wherein the subscription valid range includes : Subscribed to resources and/or sub-resources.
图4是根据本发明实施例的订阅资源变更通知装置的可选结构框图一,如图4所示,发送模块34包括:第一发送单元42,设置为当订阅有效范围为被订阅资源时,在被订阅资源发生变化的情况下向订阅方发送通知消息;第二发送单元44与第一发送单元42耦合连接,设置为当订阅有效范围为子资源时,在子资源发生变化时向订阅方 发送通知消息;第三发送单元46与第二发送单元44耦合连接,设置为当订阅有效范围为被订阅资源和子资源时,在被订阅资源和/或子资源发生变化时,向订阅方发送通知消息;其中,通知消息中携带有指示发生变化的订阅资源是被订阅资源和/或子资源的指示信息。FIG. 4 is a block diagram of an optional structure of a subscription resource change notification apparatus according to an embodiment of the present invention. As shown in FIG. 4, the sending module 34 includes: a first sending unit 42 configured to: when the subscription valid range is a subscribed resource, Sending a notification message to the subscribing party when the subscribed resource is changed; the second sending unit 44 is coupled to the first sending unit 42 and is configured to be configured to the subscribing party when the sub-resource changes when the subscription valid range is a sub-resource Sending a notification message; the third sending unit 46 is coupled to the second sending unit 44, and is configured to send a notification to the subscriber when the subscribed resource and/or the sub-resource change when the subscription valid range is the subscribed resource and the sub-resource a message; wherein the notification message carries indication information indicating that the changed subscription resource is a subscribed resource and/or a sub-resource.
图5是根据本发明实施例的订阅资源变更通知装置的可选结构框图二,如图5所示,检测模块32包括:第一检测单元52,设置为检测被订阅资源和/或被订阅资源的子资源的属性是否变更;第二检测单元54与第一检测单元52耦合连接,设置为检测被订阅资源和/或被订阅资源的子资源是否被删除;第三检测单元56与第二检测单元54耦合连接,设置为被订阅资源和/或被订阅资源的子资源是否创建新的子资源。FIG. 5 is a block diagram 2 of an optional structure of a subscription resource change notification apparatus according to an embodiment of the present invention. As shown in FIG. 5, the detection module 32 includes: a first detection unit 52 configured to detect a subscribed resource and/or a subscribed resource. Whether the attribute of the sub-resource is changed; the second detecting unit 54 is coupled to the first detecting unit 52, and is configured to detect whether the sub-resource of the subscribed resource and/or the subscribed resource is deleted; the third detecting unit 56 and the second detecting Unit 54 is coupled to set up to be a sub-resource that is subscribed to the resource and/or sub-resourced to create a new sub-resource.
图6是根据本发明实施例的订阅资源变更通知的装置的可选结构框图三,如图6所示,该装置除了图2的模块以外,还包括:接收模块62,设置为接收订阅方发送的创建订阅资源的请求消息,其中请求消息中携带有订阅资源的订阅有效范围;设置模块64与接收模块62耦合连接,设置为将请求消息中携带的订阅有效范围设置为订阅方的订阅有效范围。FIG. 6 is a block diagram 3 of an optional structure of a device for subscribing to a resource change notification according to an embodiment of the present invention. As shown in FIG. 6, the device includes: a receiving module 62, configured to receive a subscriber, in addition to the module of FIG. a request message for creating a subscription resource, wherein the request message carries a subscription validity range of the subscription resource; the setting module 64 is coupled to the receiving module 62, and is configured to set the subscription validity range carried in the request message to the subscription validity range of the subscriber. .
下面结合可选实施例,对本发明实施例进行说明。The embodiments of the present invention are described below in conjunction with alternative embodiments.
本发明的可选实施例提供了一种订阅资源变更的通知方法,使得订阅者可以指定订阅资源的有效范围,从而对上述场景实现减少资源创建,节省存储空间的有益效果。An optional embodiment of the present invention provides a notification method for subscribing to a resource change, so that the subscriber can specify a valid range of the subscription resource, thereby implementing a beneficial effect of reducing resource creation and saving storage space for the above scenario.
本发明可选实施例的方法包括:The method of an alternative embodiment of the present invention includes:
步骤S302:订阅发起者发送创建订阅资源请求给CSE,创建订阅资源请求中包含以下参数及其值:被订阅资源的地址、订阅有效范围:订阅有效范围的值为“global”或“local”、以及通知发送地址;Step S302: The subscription initiator sends a request to create a subscription resource to the CSE. The request to create a subscription resource includes the following parameters and their values: the address of the subscribed resource, the valid range of the subscription: the value of the subscription valid range is “global” or “local”, And the notification sending address;
步骤S304:CSE在验证请求发起方具有创建订阅资源的权限后,在被订阅资源下创建子资源:订阅资源,并为订阅资源创建属性“订阅有效范围”,其值设置为创建订阅资源请求中参数订阅有效范围的值,为订阅资源创建属性“通知发送地址”,其值设置为创建订阅资源请求中通知发送地址的值;Step S304: After verifying that the request originator has the right to create a subscription resource, the CSE creates a sub-resource under the sub-subscribed resource: subscribes to the resource, and creates an attribute “subscription valid range” for the subscription resource, and the value is set to create a subscription resource request. The value of the parameter subscription valid range, and the attribute "notification sending address" is created for the subscription resource, and the value is set to the value of the notification sending address in the subscription resource request;
步骤S306:如果属性“订阅有效范围”的值是“global”,则当被订阅资源的属性值变更,或被订阅资源的子资源被删除,或被订阅资源创建新的子资源,或被订阅资源的每一级子资源的属性值变更,或被订阅资源的每一级子资源的子资源被删除,或 被订阅资源的每一级子资源创建新的子资源时,CSE发送通知消息到属性“通知发送地址”中的目标地址。Step S306: If the value of the attribute "subscription valid range" is "global", when the attribute value of the subscribed resource is changed, or the sub-resource of the subscribed resource is deleted, or the sub-resource is created by the subscribed resource, or is subscribed The attribute value of each level of the resource of the resource is changed, or the child resource of each level of the sub-resource of the subscribed resource is deleted, or When each sub-resource of the subscribed resource creates a new sub-resource, the CSE sends a notification message to the destination address in the attribute "Notification Send Address".
步骤S308:如果属性“订阅有效范围”的值是“local”,则当被订阅资源的属性值变更,或被订阅资源的子资源被删除,或被订阅资源创建新的子资源时,CSE发送通知消息到属性“通知发送地址”中的目标地址。Step S308: If the value of the attribute "subscription valid range" is "local", when the attribute value of the subscribed resource is changed, or the sub-resource of the subscribed resource is deleted, or the sub-resource is created by the sub-resource, the CSE sends The notification message goes to the destination address in the attribute "Notification Send Address".
可选实施例一:Alternative embodiment 1:
步骤S402:应用实体AE发送创建资源请求,请求在CSE上创建应用资源;Step S402: The application entity AE sends a create resource request, requesting to create an application resource on the CSE;
步骤S404:CSE创建资源“应用”;Step S404: The CSE creates a resource "application";
步骤S406:AE发送创建资源请求,请求在CSE上的资源“应用”下创建容器资源;Step S406: The AE sends a create resource request, and requests to create a container resource under the resource “application” on the CSE;
步骤S408:CSE在资源“应用”下创建子资源“容器”;Step S408: The CSE creates a sub-resource "container" under the resource "application";
步骤S410:AE发送创建资源请求,请求在CSE上的资源“容器”下创建实例资源;Step S410: The AE sends a create resource request, and requests to create an instance resource under the resource “container” on the CSE.
步骤S412:CSE在资源“容器”下创建子资源“实例”;Step S412: The CSE creates a sub-resource "instance" under the resource "container";
步骤S414:AE作为订阅发起者,发送创建资源请求,请求在CSE上创建订阅资源,请求中包含:(1)资源类型:订阅;(2)被订阅资源地址:\\CSE\应用;(3)订阅有效范围:global(4)通知发送地址:“\\AE1”;Step S414: The AE, as a subscription initiator, sends a request for creating a resource, requesting to create a subscription resource on the CSE, where the request includes: (1) resource type: subscription; (2) subscribed resource address: \\CSE\application; (3) ) Subscription valid range: global (4) notification sending address: " \\AE1 ";
步骤S416:根据请求中的被订阅资源地址,CSE在资源“应用”下创建订阅类型的资源“订阅1”,为资源“订阅”设置属性“订阅有效范围”,其值设置为“global”,为资源“订阅”设置属性“通知发送地址”,其值设置为“\\AE1”;Step S416: According to the subscribed resource address in the request, the CSE creates a subscription type resource “Subscription 1” under the resource “Apply”, and sets a property “Subscription Validity Range” for the resource “Subscription”, and the value is set to “global”. Set the attribute "notification sending address" for the resource "subscription", and its value is set to "\\AE1";
步骤S418:当资源“应用”,或资源“容器”,或资源“实例”的属性值发生变更,或其子资源被删除,或其创建新的子资源时,CSE发送通知消息给属性“通知发送地址”中的目标地址。Step S418: When the resource "application", or the resource "container", or the attribute value of the resource "instance" is changed, or its sub-resource is deleted, or when a new sub-resource is created, the CSE sends a notification message to the attribute "notification". The destination address in the "send address".
可选实施例二:Alternative embodiment 2:
步骤S502:应用实体AE发送创建资源请求,请求在CSE上创建应用资源;Step S502: The application entity AE sends a create resource request, requesting to create an application resource on the CSE;
步骤S504:CSE创建资源“应用”; Step S504: The CSE creates a resource "application";
步骤S506:AE发送创建资源请求,请求在CSE上的资源“应用”下创建容器资源;Step S506: The AE sends a create resource request, and requests to create a container resource under the resource “application” on the CSE;
步骤S508:CSE在资源“应用”下创建子资源“容器”;Step S508: The CSE creates a sub-resource "container" under the resource "application";
步骤S510:AE发送创建资源请求,请求在CSE上的资源“容器”下创建实例资源;Step S510: The AE sends a create resource request, requesting to create an instance resource under the resource “container” on the CSE;
步骤S512:CSE在资源“容器”下创建子资源“实例”;Step S512: The CSE creates a sub-resource "instance" under the resource "container";
步骤S514:AE作为订阅发起者,发送创建资源请求,请求在CSE上创建订阅资源,请求中包含:(1)资源类型:订阅;(2)被订阅资源地址:\\CSE\应用;(3)订阅有效范围:local(4)通知发送地址:\\AE1;Step S514: The AE, as a subscription initiator, sends a create resource request, requesting to create a subscription resource on the CSE, where the request includes: (1) resource type: subscription; (2) subscribed resource address: \\CSE\application; (3) ) Subscription valid range: local (4) notification sending address: \\AE1;
步骤S516:根据请求中的被订阅资源地址,CSE在资源“应用”下创建订阅类型的资源“订阅1”,为资源“订阅”设置属性“订阅有效范围”,其值设置为“local”,为资源“订阅”设置属性“通知发送地址”,其值设置为“\\AE1”。Step S516: According to the subscribed resource address in the request, the CSE creates a subscription type resource “Subscription 1” under the resource “Apply”, and sets a property “Subscription Validity Range” for the resource “Subscription”, and the value is set to “local”. Set the property "Notification Send Address" for the resource "Subscription" with the value set to " \\AE1 ".
步骤S518:当资源“应用”的属性值发生变更,或其子资源被删除,或其创建新的子资源时,CSE发送通知消息给属性“通知发送地址”中的目标地址。Step S518: When the attribute value of the resource "application" is changed, or its sub-resource is deleted, or when a new sub-resource is created, the CSE sends a notification message to the target address in the attribute "notification sending address".
当资源“容器”和资源“实例”的属性值发生变更,或其子资源被删除,或其创建新的子资源时,CSE不发送通知消息。The CSE does not send a notification message when the attribute values of the resource "container" and the resource "instance" change, or their child resources are deleted, or when a new child resource is created.
通过上述可选实施例的步骤,采用根据订阅资源创建属性订阅有效范围的不同,向订阅方发送通知消息,当订阅有效范围为global时,在订阅资源及其子资源发送变化时,发送通知消息给订阅方;当订阅有效范围为local时,仅仅在订阅子资源发送变化时,发送通知消息给订阅方。通过上述步骤使得订阅方可以根据需要选择订阅资源的有效范围,从而对上述场景实现减少了订阅资源创建,节省了存储空间。The notification message is sent to the subscriber by using the steps of the foregoing optional embodiment, and the notification message is sent to the subscriber when the subscription validity range is global, and the notification message is sent when the subscription resource and its sub-resources are changed. To the subscriber; when the subscription valid range is local, the notification message is sent to the subscriber only when the subscription sub-resource is changed. Through the above steps, the subscriber can select the effective range of the subscription resource according to the need, thereby reducing the subscription resource creation and saving the storage space.
工业实用性Industrial applicability
通过本发明实施例,采用当被订阅资源和/或子资源发送变化时,根据被订阅资源的订阅方的订阅有效范围向订阅方发送通知消息的方式,其中,订阅有效范围包括:被订阅资源和/或子资源,即根据订阅资源的有效范围选择发送通知消息的有效范围,进而不需要为每个订阅资源发送通知消息的方式,解决了相关技术中如果一个资源下面嵌套多个子资源,且订阅方需要获取所有资源及其子资源的变更通知消息时,需要 为每个资源的子资源都创建一个订阅资源,而导致订阅资源所在的CSE消耗大量的存储资源的问题,节省了存储资源。The embodiment of the present invention adopts a manner of sending a notification message to a subscribing party according to a subscription effective range of a subscriber of the subscribed resource when the subscription resource and/or the sub-resource change is sent, wherein the subscription valid scope includes: the subscribed resource And/or the sub-resources, that is, the effective range of sending the notification message is selected according to the valid range of the subscription resource, so that the method for sending the notification message for each sub-resource is not needed, and the related technology is configured to nest multiple sub-resources under one resource. And when the subscriber needs to get the change notification message for all resources and their sub-resources, A subscription resource is created for each resource's child resources, and the CSE where the subscription resource is located consumes a large amount of storage resources, thereby saving storage resources.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的可选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The above description is only an alternative embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Claims (10)

  1. 一种订阅资源变更通知的方法,包括:A method of subscribing to resource change notifications, including:
    检测被订阅资源和/或所述被订阅资源的子资源是否发生变化;Detecting whether the subscribed resource and/or the sub-resource of the subscribed resource changes;
    当所述被订阅资源和/或所述子资源发送变化时,根据所述被订阅资源的订阅方的订阅有效范围向所述订阅方发送通知消息,其中,所述订阅有效范围包括:所述被订阅资源和/或所述子资源。When the subscribed resource and/or the sub-resource sends a change, sending a notification message to the subscribing party according to a subscription valid range of the subscribing party of the subscribed resource, where the subscription valid range includes: Subscribed to resources and/or the sub-resources.
  2. 根据权利要求1所述的方法,其中,根据所述被订阅资源的订阅方的订阅有效范围向所述订阅方发送通知消息,包括以下至少之一:The method of claim 1, wherein the notification message is sent to the subscriber according to a subscription validity range of the subscriber of the subscribed resource, including at least one of the following:
    当所述订阅有效范围为所述被订阅资源时,在所述被订阅资源发生变化的情况下向所述订阅方发送所述通知消息;When the subscription valid range is the subscribed resource, sending the notification message to the subscribing party if the subscribed resource changes;
    当所述订阅有效范围为所述子资源时,在所述子资源发生变化时向所述订阅方发送所述通知消息;When the subscription valid range is the sub-resource, sending the notification message to the subscribing party when the sub-resource changes;
    当所述订阅有效范围为所述被订阅资源和所述子资源时,在所述被订阅资源和/或所述子资源发生变化时,向所述订阅方发送所述通知消息。And when the subscription valid range is the subscribed resource and the sub-resource, when the subscribed resource and/or the sub-resource change, the notification message is sent to the subscribing party.
  3. 根据权利要求2所述的方法,其中,所述通知消息中携带有指示发生变化的订阅资源是所述被订阅资源和/或所述子资源的指示信息。The method according to claim 2, wherein the notification message carries indication information indicating that the changed subscription resource is the subscribed resource and/or the sub-resource.
  4. 根据权利要求1所述的方法,其中,检测被订阅资源和/或所述被订阅资源的子资源是否发生变化,包括以下至少之一:The method of claim 1, wherein detecting whether the subscribed resource and/or the sub-resource of the subscribed resource has changed comprises at least one of:
    检测被订阅资源和/或所述被订阅资源的子资源的属性是否变更;Detecting whether the attribute of the subscribed resource and/or the sub-resource of the subscribed resource is changed;
    检测被订阅资源和/或所述被订阅资源的子资源是否被删除;Detecting whether the subscribed resource and/or the sub-resource of the subscribed resource is deleted;
    被订阅资源和/或所述被订阅资源的子资源是否创建新的子资源。Whether the subscribed resource and/or the sub-resource of the subscribed resource creates a new sub-resource.
  5. 根据权利要求1所述的方法,其中,检测被订阅资源和/或所述被订阅资源的子资源是否发生变化之前,还包括:The method of claim 1, wherein before detecting whether the subscribed resource and/or the sub-resource of the subscribed resource changes, the method further comprises:
    接收所述订阅方发送的创建订阅资源的请求消息,其中所述请求消息中携带有所述订阅资源的订阅有效范围;Receiving a request message for creating a subscription resource sent by the subscriber, where the request message carries a subscription valid range of the subscription resource;
    将所述请求消息中携带的订阅有效范围设置为所述订阅方的订阅有效范围。 Setting a subscription validity range carried in the request message to a subscription valid range of the subscriber.
  6. 根据权利要求4所述的方法,其中,所述被订阅资源和所述子资源为M2M的应用资源。The method of claim 4, wherein the subscribed resource and the sub-resource are M2M application resources.
  7. 一种订阅资源变更通知的装置,包括:A device for subscribing to resource change notifications, including:
    检测模块,设置为检测被订阅资源和/或所述被订阅资源的子资源是否发生变化;a detecting module, configured to detect whether a sub-resource of the subscribed resource and/or the subscribed resource changes;
    发送模块,设置为当所述被订阅资源和/或所述子资源发送变化时,根据所述被订阅资源的订阅方的订阅有效范围向所述订阅方发送通知消息,其中,所述订阅有效范围包括:所述被订阅资源和/或所述子资源。a sending module, configured to send a notification message to the subscriber according to a subscription validity range of the subscriber of the subscribed resource, when the subscribed resource and/or the sub-resource sends a change, where the subscription is valid The scope includes: the subscribed resource and/or the sub-resource.
  8. 根据权利要求7所述的装置,其中,所述发送模块包括,The apparatus of claim 7 wherein said transmitting module comprises
    第一发送单元,设置为当所述订阅有效范围为所述被订阅资源时,在所述被订阅资源发生变化的情况下向所述订阅方发送所述通知消息;a first sending unit, configured to: when the subscription valid range is the subscribed resource, send the notification message to the subscribing party if the subscribed resource changes;
    第二发送单元,设置为当所述订阅有效范围为所述子资源时,在所述子资源发生变化时向所述订阅方发送所述通知消息;a second sending unit, configured to send the notification message to the subscribing party when the sub-resource changes when the subscription valid range is the sub-resource;
    第三发送单元,设置为当所述订阅有效范围为所述被订阅资源和所述子资源时,在所述被订阅资源和/或所述子资源发生变化时,向所述订阅方发送所述通知消息;a third sending unit, configured to: when the subscription valid range is the subscribed resource and the sub-resource, send the location to the sub-subscribe when the subscribed resource and/or the sub-resource change Notification message
    其中,所述通知消息中携带有指示发生变化的订阅资源是所述被订阅资源和/或所述子资源的指示信息。The notification message carries indication information indicating that the changed subscription resource is the subscribed resource and/or the sub-resource.
  9. 根据权利要求7所述的装置,其中,所述检测模块包括:The apparatus of claim 7 wherein said detecting module comprises:
    第一检测单元,设置为检测被订阅资源和/或所述被订阅资源的子资源的属性是否变更;a first detecting unit, configured to detect whether the attribute of the subscribed resource and/or the sub-resource of the subscribed resource is changed;
    第二检测单元,设置为检测被订阅资源和/或所述被订阅资源的子资源是否被删除;a second detecting unit, configured to detect whether the subscribed resource and/or the sub-resource of the subscribed resource is deleted;
    第三检测单元,设置为被订阅资源和/或所述被订阅资源的子资源是否创建新的子资源。The third detecting unit is configured to be a sub-resource and/or a sub-resource of the subscribed resource to create a new sub-resource.
  10. 根据权利要求7所述的装置,其中,还包括:The apparatus according to claim 7, further comprising:
    接收模块,设置为接收所述订阅方发送的创建订阅资源的请求消息,其中所述请求消息中携带有所述订阅资源的订阅有效范围; a receiving module, configured to receive a request message for creating a subscription resource sent by the subscriber, where the request message carries a subscription valid range of the subscription resource;
    设置模块,设置为将所述请求消息中携带的订阅有效范围设置为所述订阅方的订阅有效范围。 And a setting module, configured to set a subscription validity range carried in the request message to a subscription valid range of the subscriber.
PCT/CN2014/091044 2014-07-14 2014-11-13 Notification method and device for change of subscribed resource WO2015154459A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410335051.X 2014-07-14
CN201410335051.XA CN105323743A (en) 2014-07-14 2014-07-14 Method and device for subscribing to resource change notices

Publications (1)

Publication Number Publication Date
WO2015154459A1 true WO2015154459A1 (en) 2015-10-15

Family

ID=54287217

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/091044 WO2015154459A1 (en) 2014-07-14 2014-11-13 Notification method and device for change of subscribed resource

Country Status (2)

Country Link
CN (1) CN105323743A (en)
WO (1) WO2015154459A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109074283A (en) * 2016-04-05 2018-12-21 康维达无线有限责任公司 The M2M service layer based on pond is established by NFV
US20220103635A1 (en) * 2019-01-14 2022-03-31 Beijing Boe Technology Development Co., Ltd. Event subscription notification method, network side device, application entity, internet of things system, and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110956485B (en) * 2018-09-27 2022-11-25 千寻位置网络有限公司 Message subscription method and component based on RocktMQ and message subscription system
JP2022537643A (en) * 2019-05-29 2022-08-29 オッポ広東移動通信有限公司 Resource subscription method, device, server and computer storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013142139A2 (en) * 2012-03-22 2013-09-26 Interdigital Patent Holdings, Inc. Method and apparatus for supporting machine-to-machine caching at a service capability layer
CN103414589A (en) * 2013-08-13 2013-11-27 华为技术有限公司 Method and device for managing resource information
CN103503358A (en) * 2013-02-26 2014-01-08 华为终端有限公司 A method and an apparatus for message interaction of group resources
CN103596118A (en) * 2012-08-13 2014-02-19 华为终端有限公司 Method, device and system for discovering machine to machine service
CN103795689A (en) * 2012-10-29 2014-05-14 中兴通讯股份有限公司 Resource subscription method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104838618B (en) * 2012-12-05 2019-05-10 Lg电子株式会社 The method and apparatus of authentication-access authorization in a wireless communication system
CN106603394B (en) * 2013-12-05 2020-02-14 华为技术有限公司 Method and device for realizing subscription notification

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013142139A2 (en) * 2012-03-22 2013-09-26 Interdigital Patent Holdings, Inc. Method and apparatus for supporting machine-to-machine caching at a service capability layer
CN103596118A (en) * 2012-08-13 2014-02-19 华为终端有限公司 Method, device and system for discovering machine to machine service
CN103795689A (en) * 2012-10-29 2014-05-14 中兴通讯股份有限公司 Resource subscription method and device
CN103503358A (en) * 2013-02-26 2014-01-08 华为终端有限公司 A method and an apparatus for message interaction of group resources
CN103414589A (en) * 2013-08-13 2013-11-27 华为技术有限公司 Method and device for managing resource information

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109074283A (en) * 2016-04-05 2018-12-21 康维达无线有限责任公司 The M2M service layer based on pond is established by NFV
US20220103635A1 (en) * 2019-01-14 2022-03-31 Beijing Boe Technology Development Co., Ltd. Event subscription notification method, network side device, application entity, internet of things system, and storage medium
US11930078B2 (en) * 2019-01-14 2024-03-12 Beijing Boe Technology Development Co., Ltd. Event subscription notification method, network side device, application entity, internet of things system, and storage medium

Also Published As

Publication number Publication date
CN105323743A (en) 2016-02-10

Similar Documents

Publication Publication Date Title
CN115361657B (en) Multicast and broadcast services in 5G networks for IoT applications
CN112188444B (en) Method and device for subscribing service
JP6803779B2 (en) Service tier resource propagation across domains
US10085244B2 (en) Method for guaranteeing operation of control message in wireless communication system and device for same
KR102059257B1 (en) Methods and apparatuses for analyzing and grouping service layer subscriptions and notifications for enhanced efficiency
US9867164B2 (en) Method and device for processing a specific request message in wireless communication system
CN107667550B (en) Method for processing request through polling channel in wireless communication system and apparatus therefor
US10129852B2 (en) Method for broadcasting to unspecified entity in wireless communication system and device for the same
WO2015188440A1 (en) Resource subscription processing method and device
US9883320B2 (en) Method for processing request message in wireless communication system and apparatus therefor
WO2016054888A1 (en) Method and device for creating subscription resource
EP3754504B1 (en) Dynamic event subscriptions for m2m communication
US20170126828A1 (en) Sending Method and Apparatus and Computer Storage Medium of Notification Message
US10219133B2 (en) Notification message transmission method and device, and computer storage medium
WO2015154459A1 (en) Notification method and device for change of subscribed resource
WO2016003134A1 (en) Method for processing request messages in wireless communication system, and device for same
WO2016026282A1 (en) Application registration method and apparatus
WO2016115885A1 (en) Method and apparatus for processing resource operation request
WO2015117446A1 (en) Method and device for sending control resource change notification message
WO2015117342A1 (en) Notification message sending method, device and system
KR102455894B1 (en) Filters for bulk subscriptions
WO2016197783A2 (en) Method and apparatus for controlling message transmission
CN105323186B (en) Notification message load control method and device
WO2016101429A1 (en) Mtc packet management method, device, system and network entity
US20170311114A1 (en) Registration method and communication method for application dedicated node (adn), and nodes

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14889099

Country of ref document: EP

Kind code of ref document: A1