WO2015176365A1 - 通知消息的发送方法、装置及计算机存储介质 - Google Patents

通知消息的发送方法、装置及计算机存储介质 Download PDF

Info

Publication number
WO2015176365A1
WO2015176365A1 PCT/CN2014/081953 CN2014081953W WO2015176365A1 WO 2015176365 A1 WO2015176365 A1 WO 2015176365A1 CN 2014081953 W CN2014081953 W CN 2014081953W WO 2015176365 A1 WO2015176365 A1 WO 2015176365A1
Authority
WO
WIPO (PCT)
Prior art keywords
sending
notification
notification message
address
receiving end
Prior art date
Application number
PCT/CN2014/081953
Other languages
English (en)
French (fr)
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 EP14892853.4A priority Critical patent/EP3148156A4/en
Priority to US15/312,301 priority patent/US20170126828A1/en
Publication of WO2015176365A1 publication Critical patent/WO2015176365A1/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/50Network services
    • H04L67/55Push-based network services
    • 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/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]

Definitions

  • the present invention relates to communication technologies, and in particular, to a method, an apparatus, and a computer storage medium for transmitting a notification message. Background technique
  • the machine-to-machine (M2M) communication network consists of individual M2M nodes and bearer networks.
  • the M2M nodes communicate with each other through the bearer network.
  • One M2M node can include but is not limited to: an application entity or a public service entity.
  • the application entity is the logical unit that actually executes the M2M application
  • the public service entity is the logical unit that manages and services the application.
  • the application node is the end execution node, such as: smart meter, temperature measurement and control sensor, fire alarm, smart home appliance, etc.; and the intermediate node is the middleware connecting the end execution node and the network side server, for example
  • the gateway is the server on the network side, where the application entity registered on the base node is usually the management software or management platform of the M2M service provider.
  • FIG. 1 is a schematic diagram of an M2M system architecture according to the related art.
  • communication between M2M applications is typically achieved through interaction between public service entities (CSEs).
  • CSEs public service entities
  • the premise of communication is that the M2M application first needs to be registered in the local CSE (for example: the application entity on the application node in Figure 1 needs to be registered in the CSE of the intermediate node, then the CSE on the intermediate node is the local of the application entity on the application node. CSE), then the interaction of the M2M application can be realized through the communication between the CSEs.
  • An application node is a physical entity
  • an 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 AE When the AE registers with the local CSE, the AE needs to provide a security certificate capable of identifying its own legality to the local CSE so that the CSE can verify it. And only after the verification is passed, It is possible to register at the local CSE, and the AE also needs to provide the registered name of the AE recommendation for reference by the local CSE.
  • the registered application can also create an application-related resource on the local CSE as a sub-resource of the application resource, for example:
  • the local CSE will create a resource "application”, in order to save the application data, the application can also Create a resource "container" under the resource "Apply”, which is used to store application data.
  • AE can subscribe to the message of whether a resource has changed.
  • the attribute or sub-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 can send a notification message to the AE to inform the user of the concern.
  • the resource has been modified. Subscribing to a resource is accomplished by AE creating a sub-resource of type "subscription" on the resource that CSE wants to subscribe to.
  • resources subscribed by an AE or a CSE may contain more attributes and sub-resources, and thus these attributes and sub-resources may be frequently modified.
  • a notification message is sent to the AE or CSE, causing the AE or CSE to frequently receive a large number of notification messages.
  • the embodiment of the present invention provides a method, a device, and a computer storage medium for sending a notification message.
  • the AE or the CSE When the resources subscribed by the AE or the CSE are changed in the related art, the AE or the CSE frequently receives a large number of notification messages and wastes. Problems with network resources and local storage space.
  • a method of transmitting a notification message includes: the receiving end receives the request for creating a subscription resource from the sending end, where the request to create the subscription resource carries the sending address of the notification sending policy and the notification message, and the notification sending policy is used for sending
  • the receiving end instructs the receiving end to send one or the sending end to the sending end according to the sending mode specified by the sending end.
  • a plurality of notification messages when the resource subscribed by the sender changes, the receiver sends one or more notification messages to the sending address of the notification message according to the notification sending policy.
  • the notification sending policy comprises: sending, by the receiving end, the maximum number of the notification message to the sending address of the notification message, the sending mode of the notification message, and the sending rule parameter associated with the sending module; and sending the notification message mode to the batch mode when the sending mode indicates
  • the receiving end determines whether the number of the currently stored notification messages is less than or equal to the difference between the maximum quantity and the first quantity, where The quantity is the number of notification messages that the receiving end has sent to the sending address of the notification message, and the maximum number and the first number are both positive integers; if yes, the receiving end sends one or more to the sending address of the notification message according to the sending rule parameter.
  • a notification message if not, the receiving end sends one or more notification messages to the sending address of the notification message according to the number of differences.
  • the sending rule parameter includes: a preset quantity and/or a preset duration; the receiving end sends one or more notification messages to the sending address of the notification message according to the sending rule parameter, including one of the following: when the sending rule parameter is a preset quantity When the number of the notification messages to be sent to the sending address of the notification message has reached the preset number, the receiving end sends a preset number of notification messages to the sending address of the notification message; when the sending rule parameter is In the case of the preset duration, when the time of the notification message to be sent to the sending address of the notification message has reached the preset duration, the receiving end sends all the currently stored notification messages to the sending address of the notification message; When the sending rule parameter is the preset number and the preset duration, one or more notification messages are sent to the sending address of the notification message according to the first-used sending rule parameter.
  • the notification sending policy includes: a maximum number of the notification message sent by the receiving end to the sending address of the notification message, a sending mode of the notification message, and a sending rule parameter associated with the sending module; when the sending mode indicates that only the newly generated notification is sent only In the message mode, the receiving end sends a notification message to the sending address of the notification message according to the notification sending policy, including: the receiving end determines whether the first quantity is less than the maximum quantity, where the first quantity is that the receiving end has sent to the notification The number of notification messages of the sending address of the message; if yes, the receiving end sends the newly generated one notification message to the sending address of the notification message according to the sending rule parameter.
  • the sending rule parameter includes: a preset quantity and/or a preset duration; the receiving end sends the newly generated one notification message to the sending address of the notification message according to the sending rule parameter, including one of the following: when the sending rule parameter is a preset quantity When the number of the notification messages to be sent to the sending address of the notification message has reached the preset number, the receiving end sends a newly generated one of the preset number of notification messages to the notification message.
  • the newly generated one notification message is sent to the sending address of the notification message; when the sending rule parameter is the preset number and the preset duration, the newly generated one notification message is sent to the sending address of the notification message according to the first sending sending rule parameter.
  • the sending end is one of the following: a first CSE, an AE; and a receiving end is: a second CSE.
  • a transmitting apparatus for a notification message is provided.
  • the sending device of the notification message according to the embodiment of the present invention includes: a receiving module, configured to receive a request for creating a subscription resource from the sending end, where the request to create a subscription resource carries a sending address of the notification sending policy and the notification message, and the sending sending policy is notified When the resource that the sender subscribes to at the receiving end changes, the receiving end sends the one or more notification messages to the sending end according to the sending mode specified by the sending end.
  • the sending module is configured to change the resources subscribed by the sending end. One or more notification messages are sent to the sending address of the notification message according to the notification sending policy.
  • the notification sending policy includes: a receiving end sending a maximum number of the notification message to the sending address of the notification message, a sending mode of the notification message, and a sending rule parameter associated with the sending mode; the sending module includes: a first determining unit configured to When the sending mode indicates that the notification message mode is sent in batch mode, it is determined whether the number of currently stored notification messages is less than a difference between the maximum number and the first quantity, where the first quantity is that the receiving end has sent to the sending place of the notification message.
  • the number of the notification messages of the address, the maximum number and the first number are both positive integers; the first sending unit is configured to send one or more pieces to the sending address of the notification message according to the sending rule parameter when the output of the first determining unit is YES The second sending unit is configured to send one or more notification messages to the sending address of the notification message according to the number of the difference when the output of the first determining unit is negative.
  • the sending rule parameter includes: a preset quantity and/or a preset duration; the first sending unit is configured to perform one of the following operations: when the sending rule parameter is a preset quantity, the currently stored to be sent to the notification message If the number of the notification messages of the sending address has reached the preset number, the preset number of notification messages are sent to the sending address of the notification message; when the sending rule parameter is the preset duration, the currently stored to be sent to the notification message When the time of sending the notification message of the address has reached the preset duration, all the currently stored notification messages are sent to the sending address of the notification message; when the sending rule parameter is the preset number and the preset duration, the first satisfaction is satisfied.
  • the sending rule parameter sends one or more notification messages to the sending address of the notification message.
  • the notification sending policy includes: a receiving end sending a maximum number of the notification message to the sending address of the notification message, a sending mode of the notification message, and a sending rule parameter associated with the sending module;
  • the sending module includes: a second determining unit configured to When the sending mode indicates that only the newly generated notification message mode is sent, it is determined whether the first quantity is less than the maximum number, where the first quantity is the number of notification messages that the receiving end has sent to the sending address of the notification message; And configured to: when the output of the second determining unit is YES, send the newly generated one notification message to the sending address of the notification message according to the sending rule parameter.
  • the sending rule parameter includes: a preset quantity and/or a preset duration; the third sending unit is configured to perform one of the following operations: when the sending rule parameter is a preset quantity, the currently stored to be sent to the notification message When the number of the notification messages of the sending address has reached the preset number, a newly generated one of the preset number of notification messages is sent to the sending address of the notification message; when the sending rule parameter is the preset duration, Currently stored to be sent to notification When the time of the notification message of the sending address of the information has reached the preset duration, a newly generated one of the currently stored notification messages is sent to the sending address of the notification message; when the sending rule parameter is the preset number and the pre- When the duration is set, the latest generated one notification message is sent to the sending address of the notification message according to the first-used transmission rule parameter.
  • the sending end is one of the following: a first CSE, an AE; and a receiving end is: a second CSE.
  • a computer storage medium is provided, wherein computer executable instructions are stored in the computer storage medium, and the computer executable instructions are used to execute the notification message sending method described above.
  • the receiving end receives the request for creating a subscription resource from the sending end, where the request to create the subscription resource carries the sending address of the notification sending policy and the notification message, and the notification sending policy is used by the sending end to subscribe at the receiving end.
  • the receiving end sends one or more notification messages to the sending end according to the sending mode specified by the sending end.
  • the receiving end changes the resource subscribed by the sending end, the receiving end sends the notification message to the sending address of the notification message according to the notification sending policy.
  • the AE or the CSE frequently receives a large number of notification messages, thereby wasting network resources and local storage space, thereby saving Network resources and storage space local to AE or CSE.
  • FIG. 1 is a schematic diagram of an architecture of an M2M system according to the related art
  • FIG. 2 is a flowchart of a method for transmitting a notification message according to an embodiment of the present invention
  • FIG. 3 is a structural block diagram 1 of a device for transmitting a notification message according to an embodiment of the present invention
  • FIG. 4 is a block diagram 2 of a device for transmitting a notification message according to an embodiment of the present invention.
  • FIG. 2 is a flow chart of a method of transmitting a notification message according to an embodiment of the present invention. As shown in FIG. 2, the method may include the following processing steps:
  • Step S202 The receiving end receives the request for creating a subscription resource from the sending end, where the request for creating the subscription resource carries the sending address of the notification sending policy and the notification message, and the notification sending policy is used when the resource subscribed by the receiving end changes. Instructing the receiving end to send one or more notification messages to the sending end according to the sending manner specified by the sending end;
  • Step S204 When the resource subscribed by the sending end changes, the receiving end sends one or more notification messages to the sending address of the notification message according to the notification sending policy.
  • the sender can receive the notification message according to its actual needs (for example, it does not want to receive the notification message too often, or the physical storage space of the physical device is limited and does not want to receive a large number of notification messages. ) Flexible choice of how to receive notification messages. Therefore, when the resources subscribed by the AE or the CSE in the related art are changed, the AE or the CSE frequently receives a large number of notification messages, thereby wasting network resources and local storage space, thereby saving network resources and AE. Or CSE local storage space.
  • the foregoing sending end may be one of the following: a first CSE, an AE; and the receiving end may be: a second CSE.
  • the foregoing notification sending policy may include: sending, by the receiving end, a maximum number of the notification message to the sending address of the notification message, a sending mode of the notification message, and a sending rule parameter associated with the sending module; in step S204, when the sending mode indication
  • the receiving end sends one or more notification messages to the sending address of the notification message according to the notification sending policy, which may include the following operations:
  • Step S1 The receiving end determines whether the number of currently stored notification messages is less than or equal to the maximum a difference between the quantity and the first quantity, where the first quantity is a number of notification messages that the receiving end has sent to the sending address of the notification message, and the maximum quantity and the first quantity are both positive integers;
  • Step S2 If yes, the receiving end sends one or more notification messages to the sending address of the notification message according to the sending rule parameter;
  • Step S3 If no, the receiving end sends one or more notification messages to the sending address of the notification message according to the number of differences.
  • the sending rule parameter includes: a preset quantity and/or a preset duration; in step S2, the receiving end sends one or more notification messages to the sending address of the notification message according to the sending rule parameter, which may include one of the following:
  • Step S21 When the sending rule parameter is a preset number, if the number of the notification messages to be sent to the sending address of the notification message stored by the receiving end has reached the preset number, the preset number is sent to the sending address of the notification message. Notification message; or,
  • Step S22 When the sending rule parameter is the preset duration, if the time of the notification message to be sent to the sending address of the notification message stored by the receiving end has reached the preset duration, all the currently stored notification messages are sent to The sending address of the notification message;
  • Step S23 When the sending rule parameter is the preset number and the preset duration, one or more notification messages are sent to the sending address of the notification message according to the first-used sending rule parameter.
  • the sending end (for example, AE) sends a request to create a subscription resource to the receiving end (for example, CSE), where the request to create a subscription resource carries a notification sending policy, which may include but is not limited to At least one of the following:
  • the notification sending rule may include but is not limited to at least one of the following: a number of convergences (corresponding to the preset number), waiting time (phase When in the above preset duration).
  • the CSE After the CSE verifies that the requesting party has the right to create a subscription resource, the CSE creates a subscription resource and also creates an attribute corresponding to the notification sending policy in the request to create the subscription resource. If the notification sending mode indication in the attribute of the subscription resource is sent as a batch (ie, multiple notification messages are sent), when the sub-resource or attribute of the subscribed resource is changed (deleted, added, or modified), the CSE temporarily saves the notification message. And deal with the following situations:
  • Condition 1 When the number of saved notification messages reaches the number of aggregations in the properties of the subscription resource; Condition 2) When the notification message save time reaches the waiting time in the properties of the subscription resource.
  • Case 4 Regardless of whether the attribute of the subscription resource includes the number of aggregations or the waiting time, or both, if the number of saved notification messages reaches the number of notification messages in the attributes of the subscription resource, the CSE sends the saved notification message to the attribute.
  • the foregoing notification sending policy may include: sending, by the receiving end, a maximum number of the notification message to the sending address of the notification message, a sending mode of the notification message, and a sending rule parameter associated with the sending module; in step S204, when the sending mode indication When only the latest generated notification message mode is sent, the receiving end sends a notification message to the sending address of the notification message according to the notification sending policy, which may include the following steps: Step S4: The receiving end determines whether the first quantity is less than the maximum quantity, where the first quantity is the number of notification messages that the receiving end has sent to the sending address of the notification message;
  • Step S5 If yes, the receiving end sends the newly generated one notification message to the sending address of the notification message according to the sending rule parameter.
  • the sending rule parameter may include: a preset quantity and/or a preset duration; in step S5, the receiving end sends the newly generated one notification message to the sending address of the notification message according to the sending rule parameter, which may include one of the following:
  • Step S51 When the sending rule parameter is a preset number, if the number of the notification messages to be sent to the sending address of the notification message stored by the receiving end has reached the preset number, the latest generation of the preset number of notification messages is generated. a notification message is sent to the sending address of the notification message; or
  • Step S52 When the sending rule parameter is the preset duration, if the time of the notification message to be sent to the sending address of the notification message stored by the receiving end has reached the preset duration, the latest generated all the notification messages are generated. a notification message is sent to the sending address of the notification message;
  • Step S53 When the sending rule parameter is the preset quantity and the preset duration, the newly generated one notification message is sent to the sending address of the notification message according to the first sending sending rule parameter.
  • the sending end (for example, AE) sends a request to create a subscription resource to the receiving end (for example, CSE), where the request to create a subscription resource carries a notification sending policy, which may include but is not limited to At least one of the following:
  • the notification sending rule may include but is not limited to at least one of the following: a number of convergences (corresponding to the preset number), waiting time (phase When in the above preset duration).
  • the CSE After the CSE verifies that the requesting party has the right to create a subscription resource, the CSE creates a subscription resource and also creates an attribute corresponding to the notification sending policy in the request to create the subscription resource. If the notification sending mode in the attribute of the subscription resource indicates that only the latest notification is sent (ie, only one notification message is sent), when the sub-resource or attribute of the subscribed resource is changed (deleted, added, or modified), the CSE temporarily saves the notification message. And deal with the following situations separately:
  • Condition 1 When the number of saved notification messages reaches the number of aggregations in the properties of the subscription resource; Condition 2) When the notification message save time reaches the waiting time in the properties of the subscription resource.
  • Case 2 If the attribute of the subscription resource only contains the aggregation number, when the condition 1) is satisfied, the CSE sends a notification message last generated in the notification message saved by the CSE to the target address in the attribute "notification sending address";
  • Scenario 3 If the attribute of the subscription resource contains only the waiting time, when the condition 2) is satisfied, the CSE sends a notification message last generated in the notification message saved to the destination address in the attribute "notification sending address".
  • the AE sends a request for creating a resource to the CSE, where the information carried in the request for creating the resource may include but is not limited to:
  • the CSE After receiving the request for creating a resource from the AE, the CSE verifies whether the AE has the right to create a resource, and if so, creates a resource in the CSE resource directory CSEBase, sets the resource name to "myApplication", and sets the resource. The type is "Application”. At the same time, you can also create the properties of the resource "myApplication" based on the content in the create resource request.
  • the AE sends a request for creating a resource to the CSE.
  • the information carried in the request for creating the resource may include but is not limited to:
  • a notification sending policy where the notification sending policy may include the names of the following parameters and the values corresponding to the names:
  • the number of notification messages is a positive integer, for example: 100, which is used to indicate the maximum number of notification messages sent. When the notification message reaches the number, the corresponding subscription resources will be deleted.
  • Batch processing rule Its value contains the number of sub-parameter aggregation, for example: 15 lines, and / or, the value of the waiting time, for example: 20 minutes;
  • Notification sending address The value is a Uniform Resource Identifier (URI), which is used to indicate the destination address to which the notification message is sent.
  • URI Uniform Resource Identifier
  • the CSE After receiving the AE creation resource request, the CSE verifies that the AE has the right to create a resource, and has the readable permission for the resource referred to in the "location created by the resource", that is, the resource "myApplication”. Create a child resource under the resource " myApplication "
  • the resource "my Application” is called the subscribed resource.
  • the CSE sends its saved notification message to the destination address in the attribute "notification sending address" when one of the following conditions is met:
  • a counter can be used to count the notification messages generated by the CSE and generated by the subscription resource. Each time a notification message is generated and saved by the CSE, the counter value is incremented by one. When the value of the counter reaches the value of the number of parameter aggregations in the "Batch Send Condition", it is considered that this condition is satisfied, and the counter is cleared after the notification message is sent. After this round of transmission is completed, the first notification generated in succession is also called the first notification message, and the re-counting starts again from this one notification message.
  • a timer is used for timing.
  • the value of the timer reaches the parameter waiting time in the "batch transmission rule"
  • the timing is Cleared to zero.
  • the subsequent first notification is also called the first notification message, and the re-time is started again from this notification message.
  • the counter and the timer can also use the method of counting down and counting down, and the initial value is set to the value of the number of convergence and the waiting time, and the corresponding conditions are also changed. For counters or timers up to 0, clearing is also changed to return to the initial value.
  • step 5.1 If the batch processing rule only contains the number of aggregations, when the condition 1) in step 5.1 is satisfied, the CSE sends its saved notification message to the label address in the attribute "notification sending address";
  • step 5.1 If the "Batch Send Rule" contains only the waiting time, then when the condition 2) in step 5.1 is satisfied, the CSE sends its saved notification message to the address in the attribute "Notification Send Address”.
  • the number of notification messages is sent, for example, the number of notification messages is 5, and when only one of condition 1) or condition 2 is satisfied, there are 10 notification messages saved by the CSE, and only the last 5 notification messages are sent. Go to the destination address in the "Notification Send Address".
  • the AE sends a request for creating a resource to the CSE, and the information carried in the request for creating the resource may be including but not limited to:
  • the CSE After receiving the request for creating a resource from the AE, the CSE verifies whether the AE has the right to create a resource, and if so, creates a resource in the CSE resource directory CSEBase, sets the resource name to "myApplication", and sets the resource. The type is "Application”. At the same time, you can also create the properties of the resource "myApplication" based on the content in the create resource request.
  • the AE sends a request for creating a resource to the CSE.
  • the information carried in the request for creating the resource may include but is not limited to:
  • a notification sending policy where the notification sending policy may include the names of the following parameters and the values corresponding to the names:
  • the number of notification messages is a positive integer, for example: 100, which is used to indicate the maximum number of notification messages sent. When the notification message reaches the number, the corresponding subscription resources will be deleted.
  • Its value contains the number of sub-parameter aggregation, for example: 15 bars, and / or, the value of the waiting time, for example: 20 minutes;
  • Notification sending address The value is a Uniform Resource Identifier (URI), which is used to indicate the destination address to which the notification message is sent.
  • URI Uniform Resource Identifier
  • the CSE After receiving the AE creation resource request, the CSE verifies that the AE has the right to create a resource, and the resource referred to in the "location created by the resource", that is, the resource "myApplication", After having the readable permissions, create the sub-resource "mySubscription" under the resource "myApplication", and set the property "notification message number” to the value of the number of notification messages in the creation resource request message, and set the attribute "only send the latest notification” Rule "To send only the value of the latest notification rule in the Create Resource Request message, set the attribute "Notification Send Address” to the value of the notification send address in the Create Resource Request message.
  • the resource "myApplication" is called the subscribed resource.
  • a counter can be used to count the notification messages generated by the CSE and saved by the subscription resource. Each time a notification message is generated and saved by the CSE, the counter value is incremented by 1, when the value of the counter reaches the parameter in the "send only the latest notification rule". When the number of values is aggregated, it is considered that the condition is satisfied. After the notification message is sent, the counter is cleared. After the round of transmission is completed, the first notification generated subsequently is called the first notification message. A notification message starts counting again;
  • the counter and the timer can also use the method of counting down and counting down, and the initial value is set to the value of the number of convergence and the waiting time, and the condition is also changed to a counter or a timer until 0, and the zero is also cleared. Change to return to the initial value accordingly.
  • step 5.1 If the "only send latest notification rule" contains only the number of aggregations, when the condition 1) in step 5.1 is satisfied, the CSE sends a notification message last generated in the notification message saved to the attribute "notification sending address". Destination address
  • step 5.1 If the "only send latest notification rule" contains only the waiting time, when the condition 2) in step 5.1 is satisfied, the CSE sends a notification message last generated in the saved notification message to the attribute "notification sending address". Destination address.
  • the AE sends a request for creating a resource to the CSE, where the information carried in the request for creating the resource may include but is not limited to:
  • the CSE After receiving the request for creating a resource from the AE, the CSE verifies whether the AE has the permission to create a resource, and if so, creates a resource in the CSE resource directory CSEBase, and sets the resource. Set the resource name to "myApplication” and set the resource type to "Application”. At the same time, you can also create the attribute of the resource "myApplication" based on the content in the create resource request.
  • the AE sends a request for creating a resource to the CSE.
  • the information carried in the request for creating the resource may include but is not limited to:
  • a notification sending policy where the notification sending policy may include the names of the following parameters and values corresponding to the names:
  • the number of notification messages is a positive integer, for example: 100, which is used to indicate the maximum number of notification messages sent. When the notification message reaches the number, the corresponding subscription resources will be deleted.
  • Notification sending mode The value is an enumerated type, which can be one of the following: batch sending, sending only the latest notification;
  • Notification sending rule Its value contains the number of sub-parameter aggregation, for example: 15 , and / or, the value of the waiting time, for example: 20 minutes;
  • Notification sending address The value is a Uniform Resource Identifier (URI), which is used to indicate the destination address to which the notification message is sent.
  • URI Uniform Resource Identifier
  • the CSE After receiving the AE creation resource request, the CSE verifies that the AE has the right to create a resource, and has the readable permission for the resource indicated in the "location created by the resource", that is, the resource "myApplication” Create a child resource under the resource " myApplication "
  • the CSE temporarily saves the notification message when the sub-resource or attribute of the resource "myApplication" changes.
  • the CSE sends its saved notification message to the destination address in the attribute "notification sending address" when one of the following conditions is met:
  • a counter can be used to count the notification messages generated by the CSE and generated by the subscription resource. Each time a notification message is generated and saved by the CSE, the counter value is incremented by one. When the value of the counter reaches the value of the number of parameter aggregations in the "Batch Send Condition", it is considered that this condition is satisfied, and the counter is cleared after the notification message is sent. After this round of transmission is completed, the first notification generated in succession is also called the first notification message, and the re-counting starts again from this one notification message.
  • a timer is used for timing.
  • the value of the timer reaches the parameter waiting time in the "batch transmission rule"
  • the timing is Cleared to zero.
  • the subsequent first notification is also called the first notification message, and the re-time is started again from this notification message.
  • the counter and the timer can also use the method of counting down and counting down, and the initial value is set to the value of the number of convergence and the waiting time, and the condition is also changed to a counter or a timer until 0, and the zero is also cleared. Change to return to the initial value accordingly.
  • the count is counting in another condition
  • the timer being clocked should be reset, ie cleared or restored to its initial value.
  • step 5.1 If the batch processing rule only contains the number of aggregations, when the condition 1) in step 5.1 is satisfied, the CSE sends its saved notification message to the label address in the attribute "notification sending address";
  • step 5.1 If the "Batch Send Rule" contains only the waiting time, then when the condition 2) in step 5.1 is satisfied, the CSE sends its saved notification message to the address in the attribute "Notification Send Address”.
  • the number of notification messages is sent, for example, the number of notification messages is 5, and when only one of condition 1) or condition 2 is satisfied, there are 10 notification messages saved by the CSE, and only the last 5 notification messages are sent. Go to the destination address in the "Notification Send Address".
  • CSE temporarily saves the notification message.
  • a counter can be used to count the notification messages generated by the CSE and saved by the subscription resource. Each time a notification message is generated and saved by the CSE, the counter value is incremented by 1, when the value of the counter reaches the parameter in the "send only the latest notification rule". When the number of values is aggregated, it is considered that the condition is satisfied. After the notification message is sent, the counter is cleared. After the round of transmission is completed, the first notification generated subsequently is called the first notification message. A notification message starts counting again;
  • the counter and the timer can also use the method of counting down and counting down, and the initial value is set to the value of the number of convergence and the waiting time, and the condition is also changed to a counter or a timer until 0, and the zero is also cleared. Change to return to the initial value accordingly.
  • step 5.1 If the "only send latest notification rules" contains only the number of aggregations, then step 5.1 When the condition 1) is satisfied, the CSE sends a notification message last generated in the notification message held by the CSE to the target address in the attribute "notification sending address";
  • step 5.1 If the "only send latest notification rule" contains only the waiting time, when the condition 2) in step 5.1 is satisfied, the CSE sends a notification message last generated in the saved notification message to the attribute "notification sending address". Destination address.
  • FIG. 3 is a structural block diagram of a transmitting apparatus of a notification message according to an embodiment of the present invention.
  • the sending device of the notification message may include: a receiving module 10, configured to receive a request for creating a subscription resource from a sending end, where the request for creating a subscription resource carries a sending address of a notification sending policy and a notification message,
  • the notification sending policy is used by the sending end to send one or more notification messages to the sending end according to the sending manner specified by the sending end
  • the sending module 20 is configured to subscribe to the resources subscribed by the sending end.
  • one or more notification messages are sent to the sending address of the notification message according to the notification sending policy.
  • the device shown in FIG. 3 solves the problem that the AE or the CSE frequently receives a large number of notification messages and wastes network resources and local storage space when the resources subscribed by the AE or the CSE are changed in the related art. , which saves network resources and local storage space of AE or CSE.
  • the foregoing sending end may be one of the following: a first CSE, an AE; and the receiving end may be: a second CSE.
  • the foregoing notification sending policy may include: a maximum number of notification messages sent by the receiving end to the sending address of the notification message, a sending mode of the notification message, and a sending rule parameter associated with the sending module;
  • the method may include: a first determining unit 200, When the sending mode indicates that the notification message mode is sent in batch mode, it is determined whether the number of currently stored notification messages is less than a difference between the maximum number and the first quantity, where the first quantity is sent by the receiving end to the notification message.
  • the number of the notification messages of the address, the maximum number and the first number are both positive integers; the first sending unit 202 is configured to send multiple notifications to the sending address of the notification message according to the sending rule parameter when the output of the first determining unit is YES
  • the second sending unit 204 is configured to, when the output of the first determining unit is NO, send a plurality of notification messages to the sending address of the notification message according to the number of the difference.
  • the sending rule parameter may include: a preset number and/or a preset duration; the first sending unit 202 is configured to perform one of the following operations: when the sending rule parameter is a preset quantity, the currently stored to be sent to When the number of the notification messages of the sending address of the notification message has reached the preset number, the preset number of notification messages are sent to the sending address of the notification message; when the sending rule parameter is the preset duration, the currently stored to be sent to When the time of the notification message of the sending address of the notification message has reached the preset duration, all the currently stored notification messages are sent to the sending address of the notification message; when the sending rule parameter is the preset number and the preset duration, according to The first satisfied transmission rule parameter sends one or more notification messages to the sending address of the notification message.
  • the foregoing notification sending policy may include: a maximum number of notification messages sent by the receiving end to the sending address of the notification message, a sending mode of the notification message, and a sending rule parameter associated with the sending module;
  • the second determining unit 206 is configured to: when the sending mode indicates that only the newly generated notification message mode is sent, determine whether the first quantity is less than a maximum quantity, where the first quantity is that the receiving end has sent the sending to the notification message.
  • the number of notification messages of the address; the third sending unit 208 is configured to, when the output of the second determining unit is YES, send the newly generated one notification message to the sending address of the notification message according to the sending rule parameter.
  • the sending rule parameter comprises: a preset quantity and/or a preset duration; the third sending unit 208, configured to perform one of the following operations: when the sending rule parameter is a preset quantity, if the number of the currently stored notification messages to be sent to the sending address of the notification message has reached a preset number, the preset quantity is The latest generated one of the notification messages is sent to the sending address of the notification message; when the sending rule parameter is the preset duration, the time of the currently stored notification message to be sent to the sending address of the notification message has reached a preset duration If the sending rule parameter is the preset number and the preset duration, the sending rule parameter is firstly notified to the notification message when the sending rule parameter is the preset number and the preset duration. The sending address sends a newly generated notification message.
  • the receiving module 10 can be implemented by a receiver in the device; the transmitting module 20 can be implemented by a transmitter in the device.
  • the above embodiments achieve the following technical effects (it is required that the effects are achievable by some preferred embodiments): ⁇ using the technical solution provided by the embodiment of the present invention, sending The terminal can flexibly choose the way to receive the notification message according to its actual needs. Therefore, when the resources subscribed by the AE or the CSE in the related art are changed, the AE or the CSE frequently receives a large number of notification messages, thereby wasting network resources and local storage space, thereby saving network resources and AE. Or CSE local storage space.
  • modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed 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 are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the above is only the preferred 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.

Abstract

本发明实施例公开了一种通知消息的发送方法、装置及计算机存储介质,在上述方法中,接收端接收来自于发送端的创建订阅资源请求,其中,创建订阅资源请求中携带有通知发送策略和通知消息的发送地址,通知发送策略用于发送端在接收端订阅的资源发生变化时,指示接收端按照发送端指定的发送方式向发送端发送一条或多条通知消息;接收端在发送端订阅的资源发生变化时,根据通知发送策略向通知消息的发送地址发送一条或多条通知消息。

Description

通知消息的发送方法、 装置及计算机存储介质 技术领域
本发明涉及通信技术, 具体涉及一种通知消息的发送方法、 装置及计 算机存储介质。 背景技术
机器对机器( M2M )通信网络由各个 M2M节点和承载网络组成。 M2M 节点通过承载网络实现互相通信, 一个 M2M节点可以包括但不限于: 一个 应用实体或者一个公共业务实体。应用实体是实际执行 M2M应用的逻辑单 元, 而公共业务实体则是对应用进行管理与服务的逻辑单元。
在 M2M系统架构中, 应用节点是末端的执行节点, 例如: 智能电表、 温度测控传感器、 火警报警器、 智能家电等等; 而中间节点则为连接末端 执行节点与网络侧服务器的中间件, 例如: 网关; 基础节点即为网络侧的 服务器, 其中, 注册在基础节点上的应用实体通常为 M2M服务商的管理软 件或管理平台。
图 1是根据相关技术的 M2M系统架构示意图。 如图 1所示, M2M应 用之间的通信在一般情况下是通过公共业务实体( CSE )之间的交互来实现 的。 而通信的前提是 M2M应用首先需要在本地 CSE进行注册(例如: 图 1 中应用节点上的应用实体需要注册在中间节点的 CSE中, 那么中间节点上 的 CSE则为应用节点上应用实体的本地 CSE ), 然后才能通过 CSE之间的 通信实现 M2M应用的交互。
应用节点是物理实体, 应用实体(AE )是逻辑单元, 其为应用节点这 个物理实体上真正执行应用的逻辑单元。
当 AE注册到本地 CSE上时, AE需要将能够标识自身合法性的安全证 书提供给本地 CSE, 以便于 CSE对其进行验证。 而只有在验证通过后, 才 能够在本地 CSE进行注册, 同时 AE还需要提供 AE建议的注册名称供本 地 CSE进行参考。
另外, 注册后的应用还可以在本地 CSE上创建应用相关的资源, 作为 应用资源的子资源, 例如: 在应用注册后, 本地 CSE将创建资源 "应用", 为了保存应用的数据, 应用还可以在资源 "应用" 下创建资源 "容器", 资 源 "容器" 用于存储应用数据。 AE可以通过订阅的方式来获取某个资源是 否变更的消息。 被订阅的资源在属性或者子资源变更时, 例如: 属性的值 被修改, 子资源被删除, 或者, 新创建了子资源等, 该资源所在的 CSE可 以向 AE发送通知消息,告知其关注的资源已经被修改。对资源的订阅是通 过 AE在 CSE想要订阅的资源上创建类型为 "subscription" 的子资源来实 现的。
相关技术中, AE或 CSE所订阅的资源可能包含较多的属性和子资源, 由此可能会出现这些属性和子资源被频繁的修改。 然而, 根据目前所釆用 的订阅规则, 每进行一次修改都会向 AE或 CSE发送通知消息, 从而导致 AE或 CSE会频繁地接收到数量庞大的通知消息。 发明内容
本发明实施例提供了一种通知消息的发送方法、 装置及计算机存储介 质, 解决相关技术中 AE或 CSE所订阅的资源发生变化时, AE或 CSE会 频繁地接收到数量庞大的通知消息进而浪费网络资源以及本地的存储空间 的问题。
根据本发明实施例的一个方面, 提供了一种通知消息的发送方法。 根据本发明实施例的通知消息的发送方法包括: 接收端接收来自于发 送端的创建订阅资源请求, 其中, 创建订阅资源请求中携带有通知发送策 略和通知消息的发送地址, 通知发送策略用于发送端在接收端订阅的资源 发生变化时, 指示接收端按照发送端指定的发送方式向发送端发送一条或 多条通知消息; 接收端在发送端订阅的资源发生变化时, 根据通知发送策 略向通知消息的发送地址发送一条或多条通知消息。
优选地, 通知发送策略包括: 接收端向通知消息的发送地址发送通知 消息的最大数量、 通知消息的发送模式以及与发送模块相关联的发送规则 参数; 当发送模式指示为批处理发送通知消息模式时, 接收端根据通知发 送策略向通知消息的发送地址发送一条或多条通知消息包括: 接收端判断 当前存储的通知消息的数量是否小于或等于最大数量与第一数量的差值, 其中, 第一数量为接收端已经发送至通知消息的发送地址的通知消息的数 目, 最大数量与第一数量均为正整数; 如果是, 则接收端按照发送规则参 数向通知消息的发送地址发送一条或多条通知消息; 如果否, 则接收端按 照差值的数量向通知消息的发送地址发送一条或多条通知消息。
优选地, 发送规则参数包括: 预设数量和 /或预设时长; 接收端按照发 送规则参数向通知消息的发送地址发送一条或多条通知消息包括以下之 一: 当发送规则参数为预设数量时, 在接收端存储的待发送至通知消息的 发送地址的通知消息的数量已经达到预设数量的情况下, 接收端向通知消 息的发送地址发送预设数量的通知消息; 当发送规则参数为预设时长时, 在接收端存储的待发送至通知消息的发送地址的通知消息的时间已经达到 预设时长的情况下, 接收端将当前存储的全部通知消息均发送至通知消息 的发送地址; 当发送规则参数为预设数量和预设时长时, 按照首先满足的 发送规则参数向通知消息的发送地址发送一条或多条通知消息。
优选地, 通知发送策略包括: 接收端向通知消息的发送地址发送通知 消息的最大数量、 通知消息的发送模式以及与发送模块相关联的发送规则 参数; 当发送模式指示为只发送最新生成的通知消息模式时, 接收端根据 通知发送策略向通知消息的发送地址发送一条通知消息包括: 接收端判断 第一数量是否小于最大数量, 其中, 第一数量为接收端已经发送至通知消 息的发送地址的通知消息的数目; 如果是, 则接收端按照发送规则参数向 通知消息的发送地址发送最新生成的一条通知消息。
优选地, 发送规则参数包括: 预设数量和 /或预设时长; 接收端按照发 送规则参数向通知消息的发送地址发送最新生成的一条通知消息包括以下 之一: 当发送规则参数为预设数量时, 在接收端存储的待发送至通知消息 的发送地址的通知消息的数量已经达到预设数量的情况下, 接收端将预设 数量的通知消息中最新生成的一条通知消息发送至通知消息的发送地址; 当发送规则参数为预设时长时, 在接收端存储的待发送至通知消息的发送 地址的通知消息的时间已经达到预设时长的情况下, 接收端将当前存储的 全部通知消息中最新生成的一条通知消息发送至通知消息的发送地址; 当 发送规则参数为预设数量和预设时长时, 按照首先满足的发送规则参数向 通知消息的发送地址发送最新生成的一条通知消息。
优选地, 发送端为以下之一: 第一 CSE、 AE; 接收端为: 第二 CSE。 根据本发明实施例的另一方面, 提供了一种通知消息的发送装置。 根据本发明实施例的通知消息的发送装置包括: 接收模块, 配置为接 收来自于发送端的创建订阅资源请求, 其中, 创建订阅资源请求中携带有 通知发送策略和通知消息的发送地址, 通知发送策略用于发送端在接收端 订阅的资源发生变化时, 指示接收端按照发送端指定的发送方式向发送端 发送一条或多条通知消息; 发送模块, 配置为在发送端订阅的资源发生变 化时, 根据通知发送策略向通知消息的发送地址发送一条或多条通知消息。
优选地, 通知发送策略包括: 接收端向通知消息的发送地址发送通知 消息的最大数量、 通知消息的发送模式以及与发送模式相关联的发送规则 参数; 发送模块包括: 第一判断单元, 配置为当发送模式指示为批处理发 送通知消息模式时, 判断当前存储的通知消息的数量是否小于最大数量与 第一数量的差值, 其中, 第一数量为接收端已经发送至通知消息的发送地 址的通知消息的数目, 最大数量与第一数量均为正整数; 第一发送单元, 配置为在第一判断单元输出为是时, 按照发送规则参数向通知消息的发送 地址发送一条或多条通知消息; 第二发送单元, 配置为在第一判断单元输 出为否时, 按照差值的数量向通知消息的发送地址发送一条或多条通知消 息。
优选地, 发送规则参数包括: 预设数量和 /或预设时长; 第一发送单元, 配置为执行以下操作之一: 当发送规则参数为预设数量时, 在当前存储的 待发送至通知消息的发送地址的通知消息的数量已经达到预设数量的情况 下, 向通知消息的发送地址发送预设数量的通知消息; 当发送规则参数为 预设时长时, 在当前存储的待发送至通知消息的发送地址的通知消息的时 间已经达到预设时长的情况下, 将当前存储的全部通知消息均发送至通知 消息的发送地址; 当发送规则参数为预设数量和预设时长时, 按照首先满 足的发送规则参数向通知消息的发送地址发送一条或多条通知消息。
优选地, 通知发送策略包括: 接收端向通知消息的发送地址发送通知 消息的最大数量、 通知消息的发送模式以及与发送模块相关联的发送规则 参数; 发送模块包括: 第二判断单元, 配置为当发送模式指示为只发送最 新生成的通知消息模式时, 判断第一数量是否小于最大数量, 其中, 第一 数量为接收端已经发送至通知消息的发送地址的通知消息的数目; 第三发 送单元, 配置为在第二判断单元输出为是时, 按照发送规则参数向通知消 息的发送地址发送最新生成的一条通知消息。
优选地, 发送规则参数包括: 预设数量和 /或预设时长; 第三发送单元, 配置为执行以下操作之一: 当发送规则参数为预设数量时, 在当前存储的 待发送至通知消息的发送地址的通知消息的数量已经达到预设数量的情况 下, 将预设数量的通知消息中最新生成的一条通知消息发送至通知消息的 发送地址; 当发送规则参数为预设时长时, 在当前存储的待发送至通知消 息的发送地址的通知消息的时间已经达到预设时长的情况下, 将当前存储 的全部通知消息中最新生成的一条通知消息发送至通知消息的发送地址; 当发送规则参数为预设数量和预设时长时, 按照首先满足的发送规则参数 向通知消息的发送地址发送最新生成的一条通知消息。
优选地, 发送端为以下之一: 第一 CSE、 AE; 接收端为: 第二 CSE。 根据本发明实施例的一个方面, 提供了一种计算机存储介质, 所述计 算机存储介质中存储有计算机可执行指令, 所述计算机可执行指令用于执 行以上所述的通知消息发送方法。
通过本发明实施例, 釆用接收端接收来自于发送端的创建订阅资源请 求, 其中, 创建订阅资源请求中携带有通知发送策略和通知消息的发送地 址, 通知发送策略用于发送端在接收端订阅的资源发生变化时, 指示接收 端按照发送端指定的发送方式向发送端发送一条或多条通知消息; 接收端 在发送端订阅的资源发生变化时, 根据通知发送策略向通知消息的发送地 址发送一条或多条通知消息, 解决了相关技术中 AE或 CSE所订阅的资源 发生变化时, AE或 CSE会频繁地接收到数量庞大的通知消息进而浪费网 络资源以及本地的存储空间的问题, 进而节省了网络资源以及 AE或 CSE 本地的存储空间。 附图说明
图 1是根据相关技术的 M2M系统架构示意图;
图 2是根据本发明实施例的通知消息的发送方法的流程图;
图 3是根据本发明实施例的通知消息的发送装置的结构框图一; 图 4是根据本发明实施例的通知消息的发送装置的结构框图二。 具体实施方式
下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的情况下, 本申请中的实施例及实施例中的特征可以相互组合。 图 2是根据本发明实施例的通知消息的发送方法的流程图。 如图 2所 示, 该方法可以包括以下处理步骤:
步骤 S202: 接收端接收来自于发送端的创建订阅资源请求, 其中, 创 建订阅资源请求中携带有通知发送策略和通知消息的发送地址, 通知发送 策略用于发送端在接收端订阅的资源发生变化时, 指示接收端按照发送端 指定的发送方式向发送端发送一条或多条通知消息;
步骤 S204: 接收端在发送端订阅的资源发生变化时, 根据通知发送策 略向通知消息的发送地址发送一条或多条通知消息。
相关技术中 AE或 CSE所订阅的资源发生变化时, AE或 CSE会频繁 地接收到数量庞大的通知消息进而浪费网络资源以及本地的存储空间。 釆 用如图 2 所示的方法, 发送端可以根据自身的实际需求(例如: 不希望过 于频繁的接收到通知消息, 或者, 其所在的物理设备存储空间有限而不希 望接收数量庞大的通知消息)灵活地选择接收通知消息的方式。 由此解决 了相关技术中 AE或 CSE所订阅的资源发生变化时, AE或 CSE会频繁地 接收到数量庞大的通知消息进而浪费网络资源以及本地的存储空间的问 题, 进而节省了网络资源以及 AE或 CSE本地的存储空间。
在优选实施过程中, 上述发送端可以为以下之一: 第一 CSE、 AE; 上 述接收端可以为: 第二 CSE。
优选地, 上述通知发送策略可以包括: 接收端向通知消息的发送地址 发送通知消息的最大数量、 通知消息的发送模式以及与发送模块相关联的 发送规则参数; 在步骤 S204中, 当发送模式指示为批处理发送通知消息模 式时, 接收端根据通知发送策略向通知消息的发送地址发送一条或多条通 知消息可以包括以下操作:
步骤 S1 : 接收端判断当前存储的通知消息的数量是否小于或等于最大 数量与第一数量的差值, 其中, 第一数量为接收端已经发送至通知消息的 发送地址的通知消息的数目, 最大数量与第一数量均为正整数;
步骤 S2: 如果是, 则接收端按照发送规则参数向通知消息的发送地址 发送一条或多条通知消息;
步骤 S3: 如果否, 则接收端按照差值的数量向通知消息的发送地址发 送一条或多条通知消息。
优选地, 发送规则参数包括: 预设数量和 /或预设时长; 在步骤 S2中, 接收端按照发送规则参数向通知消息的发送地址发送一条或多条通知消息 可以包括以下之一:
步骤 S21 : 当发送规则参数为预设数量时,在接收端存储的待发送至通 知消息的发送地址的通知消息的数量已经达到预设数量的情况下, 向通知 消息的发送地址发送预设数量的通知消息; 或者,
步骤 S22: 当发送规则参数为预设时长时,在接收端存储的待发送至通 知消息的发送地址的通知消息的时间已经达到预设时长的情况下, 将当前 存储的全部通知消息均发送至通知消息的发送地址;
步骤 S23: 当发送规则参数为预设数量和预设时长时,按照首先满足的 发送规则参数向通知消息的发送地址发送一条或多条通知消息。
在优选实施例中, 发送端 (例如: AE ) 向接收端 (例如: CSE )发送 创建订阅资源请求, 其中, 该创建订阅资源请求中携带有通知发送策略, 该通知发送策略可以包括但不限于以下至少之一:
( 1 )通知消息条数(相当于上述最大数量);
( 2 )通知发送地址;
( 3 )通知发送模式;
( 4 )与通知发送模式相关联的通知发送规则, 该通知发送规则可以包 括但不限于以下至少之一: 汇聚数目(相当于上述预设数量)、等待时间(相 当于上述预设时长)。
CSE在验证发起请求方具备创建订阅资源的权限后, 创建订阅资源, 同时还创建与创建订阅资源请求中的通知发送策略所对应的属性。 如果订 阅资源的属性中通知发送模式指示为批处理发送(即发送多条通知消息), 当被订阅的资源的子资源或者属性发生变更(删除、 添加或者修改) 时, CSE暂时保存通知消息, 并分别按照以下情形进行处理:
情形一、 如果订阅资源的属性中同时包括汇聚数目和等待时间, 则当 先满足以下条件之一时, CSE发送其保存的通知消息至属性 "通知发送地 址" 中的目标地址:
条件 1 ) 当保存的通知消息数目达到订阅资源的属性中的汇聚数目; 条件 2 ) 当通知消息保存时间达到订阅资源的属性中的等待时间。
情形二、 如果订阅资源的属性中仅包含汇聚数目, 则当上述条件 1 )满 足时, CSE发送所保存的通知消息至属性 "通知发送地址" 中的目标地址。
情形三、 如果订阅资源的属性中仅包含等待时间, 则当上述条件 2 )满 足时, CSE发送所保存的通知消息至属性 "通知发送地址" 中的目标地址。
情形四、 不管订阅资源的属性中包含汇聚数目还是等待时间, 还是两 者均包含, 如果保存的通知消息数目达到订阅资源的属性中的通知消息条 数时, CSE发送所保存的通知消息到属性 "通知发送地址" 中的目标地址; 或者在仅满足条件 1 )或条件 2 )其中之一时, 只选取最后产生的数量等于 订阅资源的属性中的通知消息条数的通知消息进行发送。
优选地, 上述通知发送策略可以包括: 接收端向通知消息的发送地址 发送通知消息的最大数量、 通知消息的发送模式以及与发送模块相关联的 发送规则参数; 在步骤 S204中, 当发送模式指示为只发送最新生成的通知 消息模式时, 接收端根据通知发送策略向通知消息的发送地址发送一条通 知消息可以包括以下步骤: 步骤 S4: 接收端判断第一数量是否小于最大数量, 其中, 第一数量为 接收端已经发送至通知消息的发送地址的通知消息的数目;
步骤 S5: 如果是, 则接收端按照发送规则参数向通知消息的发送地址 发送最新生成的一条通知消息。
优选地, 发送规则参数可以包括: 预设数量和 /或预设时长; 在步骤 S5 中, 接收端按照发送规则参数向通知消息的发送地址发送最新生成的一条 通知消息可以包括以下之一:
步骤 S51 : 当发送规则参数为预设数量时,在接收端存储的待发送至通 知消息的发送地址的通知消息的数量已经达到预设数量的情况下, 将预设 数量的通知消息中最新生成的一条通知消息发送至通知消息的发送地址; 或者,
步骤 S52: 当发送规则参数为预设时长时,在接收端存储的待发送至通 知消息的发送地址的通知消息的时间已经达到预设时长的情况下, 将当前 存储的全部通知消息中最新生成的一条通知消息发送至通知消息的发送地 址;
步骤 S53: 当发送规则参数为预设数量和预设时长时,按照首先满足的 发送规则参数向通知消息的发送地址发送最新生成的一条通知消息。
在优选实施例中, 发送端 (例如: AE ) 向接收端 (例如: CSE )发送 创建订阅资源请求, 其中, 该创建订阅资源请求中携带有通知发送策略, 该通知发送策略可以包括但不限于以下至少之一:
( 1 )通知消息条数(相当于上述最大数量);
( 2 )通知发送地址;
( 3 )通知发送模式;
( 4 )与通知发送模式相关联的通知发送规则, 该通知发送规则可以包 括但不限于以下至少之一: 汇聚数目(相当于上述预设数量)、等待时间(相 当于上述预设时长)。
CSE在验证发起请求方具备创建订阅资源的权限后, 创建订阅资源, 同时还创建与创建订阅资源请求中的通知发送策略所对应的属性。 如果订 阅资源的属性中通知发送模式指示为只发送最新通知 (即仅发送一条通知 消息), 当被订阅的资源的子资源或者属性发生变更(删除、添加或者修改) 时, CSE暂时保存通知消息, 并分别按照以下情形进行处理:
情形一、 如果订阅资源的属性中同时包含汇聚数目和等待时间, 则当 先满足以下条件之一时, CSE发送其所保存的通知消息中最后产生的一条 通知消息到属性 "通知发送地址" 中的目标地址:
条件 1 ) 当保存的通知消息数目达到订阅资源的属性中的汇聚数目; 条件 2 ) 当通知消息保存时间达到订阅资源的属性中的等待时间。
情形二、如果订阅资源的属性中只包含汇聚数目,则当条件 1 )满足时, CSE发送其所保存的通知消息中最后产生的一条通知消息到属性 "通知发 送地址" 中的目标地址;
情形三、如果订阅资源的属性中只包含等待时间,则当条件 2 )满足时, CSE发送其所保存的通知消息中最后产生的一条通知消息到属性 "通知发 送地址" 中的目标地址。
下面将结合优选实施例一至优选实施例三对上述优选实施过程作进一 步的描述。
优选实施例一
1、 AE向 CSE发送创建资源请求, 其中, 该创建资源请求中携带的信 息可以包括但不限于:
( 1 ) 资源名称: "myApplication" (非必要参数, 如果 AE不提供, 则 可以由 CSE分配 );
( 2 ) 资源类型: "Application" ; (3) 资源创建的位置为: CSEBase;
(4) 内容: 包含该资源需要创建的属性。
2、 CSE在接收到来自于 AE的创建资源请求后, 验证 AE是否具备创 建资源的权限, 如果是, 则在 CSE的资源目录 CSEBase下创建资源, 并设 置資源名称为 "myApplication", 以及设置资源类型为 "Application"。 同时, 还可以根据创建资源请求中的内容创建资源 "myApplication" 的属性。
3、 AE向 CSE发送创建资源请求, 该创建资源请求中携带的信息可以 包括但不限于:
( 1 )资源名称: "mySubscription" (非必要参数, 如果 AE不提供, 则 由 CSE分配 );
(2) 资源类型: "Subscription";
(3) 资源创建的位置为: \\CSEBase\myApplication
(4) 内容: 通知发送策略, 其中, 该通知发送策略可以包括以下参数 的名称以及与名称相对应的取值:
1 )通知消息条数: 其值为正整数, 例如: 100条, 用于指示发送的通 知消息的最大数目, 当发送的通知消息达到该数目后, 其所对应的订阅资 源将被删除;
2)批处理发送规则: 其值包含子参数汇聚数目, 例如: 15条, 和 /或, 等待时间的值, 例如: 20分钟;
3)通知发送地址: 其值为统一资源标识(URI), 用于指示通知消息发 送的目标地址。
4、 CSE在接收到 AE的创建资源请求后, 验证 AE具有创建资源的权 限, 并且对 "资源创建的位置" 中所指的资源, 即资源 "myApplication", 具有可读取的权限后, 在资源 " myApplication " 下创建子资源
"mySubscription" , 以及设置属性 "通知消息条数"为创建资源请求消息中 通知消息条数的值, 设置属性 "批处理发送规则" 为创建资源请求消息中 批处理发送规则的值, 设置属性 "通知发送地址" 为创建资源请求消息中 通知发送地址的值。
ifc时, 資源 "my Application" 称为被订阅的資源。
5、 当 CSE上的资源 "myApplication" 的属性或子资源发生变更时, CSE暂时保存通知消息。
5.1、 如果 "批处理发送规则" 中同时包含汇聚数目和等待时间, 则当 先满足以下条件之一时, CSE发送其所保存的通知消息至属性 "通知发送 地址" 中的目标地址:
条件 1 )当保存的通知消息数目达到属性 "批处理发送规则" 中的汇聚 数目:
可以使用一个计数器对 CSE保存的由该订阅资源产生的通知消息进行 计数, 每产生一条通知消息并被 CSE保存, 则计数器值增加 1。 当计数器 的值达到 "批处理发送条件" 中的参数汇聚数目的值时, 则认为是满足此 条件, 在通知消息发送完成后, 该计数器清零。 在这一轮发送完成后, 后 续产生的第一个通知又称为第一个通知消息, 从这一个通知消息再次开始 重新计数。
条件 2 )当通知消息保存时间达到属性 "批处理发送规则" 中的等待时 间:
从产生第一个通知消息开始, 使用一个计时器进行计时, 当计时器的 值达到 "批处理发送规则" 中的参数等待时间时, 认为是满足此条件, 在 通知消息发送完成后, 该计时器清零。 在这一轮发送完成后, 后续产生的 第一个通知又称为第一个通知消息, 从这一个通知消息再次开始重新计时。
在优选实施过程中, 上述计数器和计时器还可以使用倒计数和倒计时 的方式, 初始值设置为汇聚数目和等待时间的值, 满足条件也相应的更改 为计数器或计时器直至 0, 清零也相应地更改为恢复至初始值。
以上两个条件, 任何一个先满足时, 另外一个条件中正在计数的计数 器, 或者, 正在计时的计时器应该复位, 即清零或恢复至初始值。
5.2、 如果 "批处理发送规则" 中只包含汇聚数目, 则当步骤 5.1 中条 件 1 )满足时, CSE发送其所保存的通知消息到属性 "通知发送地址" 中的 标地址;
5.3、 如果 "批处理发送规则" 中只包含等待时间, 则当步骤 5.1 中条 件 2 )满足时, CSE发送其所保存的通知消息到属性 "通知发送地址" 中的 标地址。
6、 CSE每发送一条通知消息, 属性 "通知消息条数"的值就会递减一, 当 "通知消息条数" 的值变为 0时, 则可以删除资源 "mySubscription"。 如 果 CSE还保存有未发送的由资源 "mySubscription"产生的通知消息, 则删 除所有由资源 "mySubscription" 产生的通知消息。
7、 不管 "批处理发送规则" 中仅包含汇聚数目, 或者仅包含等待时间, 又或者同时包含汇聚数目和等待时间, 如果当保存的通知消息数目达到当 前 "通知消息条数" 的值时, 即使未满足条件 1 )和条件 2 ) (即通知消息 保存的时间未到达 "批处理发送规则" 中的等待时间, 或保存的通知消息 数目未达到 "批处理发送规则" 中的汇聚数目), CSE仍发送所保存的通知 消息至属性 "通知发送地址" 中的目标地址; 或者, 在仅满足条件 1 )或条 件 2 )之一时, 只选取最后产生的数量等于订阅资源的属性中的通知消息条 数的通知消息发送, 例如 "通知消息条数" 值为 5, 在仅满足条件 1 )或条 件 2 )之一时, CSE保存的通知消息有 10条, 那么仅发送最后产生的 5条 通知消息到 "通知发送地址" 中的目标地址。 优选实施例二
1、 AE向 CSE发送创建资源请求, 该创建资源请求中携带的信息可以 包括但不限于:
(1 ) 資源名称: "myApplication";
(2) 资源类型: "Application";
(3) 资源创建的位置为: CSEBase;
(4) 内容: 包含该资源需要创建的属性。
2、 CSE在接收到来自于 AE的创建资源请求后, 验证 AE是否具备创 建资源的权限, 如果是, 则在 CSE的资源目录 CSEBase下创建资源, 并设 置資源名称为 "myApplication", 以及设置资源类型为 "Application"。 同时, 还可以根据创建资源请求中的内容创建资源 "myApplication" 的属性。
3、 AE向 CSE发送创建资源请求, 该创建资源请求中携带的信息可以 包括但不限于:
(1 ) 資源名称: "my Subscription";
(2) 资源类型: "Subscription";
(3) 资源创建的位置为: \\CSEBase\myApplication
(4) 内容: 通知发送策略, 其中, 该通知发送策略可以包括以下参数 的名称以及与名称相对应的取值:
1 )通知消息条数: 其值为正整数, 例如: 100条, 用于指示发送的通 知消息的最大数目, 当发送的通知消息达到该数目后, 其所对应的订阅资 源将被删除;
2)只发送最新通知规则: 其值包含子参数汇聚数目, 例如: 15条, 和 /或, 等待时间的值, 例如: 20分钟;
3)通知发送地址: 其值为统一资源标识(URI), 用于指示通知消息发 送的目标地址。
4、 CSE在接收到 AE的创建资源请求后, 验证 AE具有创建资源的权 限, 并且对 "资源创建的位置" 中所指的资源, 即资源 "myApplication", 具有可读取的权限后, 在资源 " myApplication " 下创建子资源 "mySubscription" , 以及设置属性 "通知消息条数"为创建资源请求消息中 通知消息条数的值, 设置属性 "只发送最新通知规则" 为创建资源请求消 息中只发送最新通知规则的值, 设置属性 "通知发送地址" 为创建资源请 求消息中通知发送地址的值。
ifc时, 資源 "myApplication" 称为被订阅的資源。
5、 当 CSE上的资源 "myApplication" 的属性或子资源发生变更时, CSE暂时保存通知消息,
5.1、 如果 "只发送最新通知规则" 中同时包含汇聚数目和等待时间, 则当先满足以下条件之一时, CSE发送其所保存的通知消息中最后产生的 一条通知消息至属性 "通知发送地址" 中的目标地址:
条件 1 )当保存的通知消息数目达到属性 "只发送最新通知规则" 中的 汇聚数目:
可以使用一个计数器对 CSE保存的由该订阅资源产生的通知消息进行 计数, 每产生一条通知消息并被 CSE保存, 则计数器值增加 1, 当计数器 的值达到 "只发送最新通知规则" 中的参数汇聚数目的值时, 认为是满足 此条件, 在通知消息发送完成后, 该计数器清零, 在这一轮发送完成后, 后续产生的第一个通知又称为第一个通知消息, 从这一个通知消息再次开 始重新计数;
条件 2 )当通知消息保存时间达到属性 "只发送最新通知规则" 中的等 待时间:
从产生第一个通知消息开始, 使用一个计时器进行计时, 当计时器的 值达到 "只发送最新通知规则" 中的参数等待时间时, 认为是满足此条件, 在通知消息发送完成后, 该计时器清零。 在这一轮发送完成后, 后续产生 的第一个通知又称为第一个通知消息, 从这一个通知消息再次开始重新计 时;
在优选实施过程中, 上述计数器和计时器还可以使用倒计数和倒计时 的方式, 初始值设置为汇聚数目和等待时间的值, 满足条件也相应的更改 为计数器或计时器直至 0, 清零也相应地更改为恢复至初始值。
以上两个条件, 任何一个先满足时, 另外一个条件中正在计数的计数 器, 或者, 正在计时的计时器应该复位, 即清零或恢复至初始值。
5.2、 如果 "只发送最新通知规则" 中只包含汇聚数目, 则当步骤 5.1 中条件 1 )满足时, CSE发送其所保存的通知消息中最后产生的一条通知消 息到属性 "通知发送地址" 中的目标地址;
5.3、 如果 "只发送最新通知规则" 中只包含等待时间, 则当步骤 5.1 中条件 2 )满足时, CSE发送其所保存的通知消息中最后产生的一条通知消 息到属性 "通知发送地址" 中的目标地址。
6、 CSE每发送一条通知消息, 属性 "通知消息条数"的值就会递减一, 当 "通知消息条数" 的值变为 0时, 则可以删除资源 "mySubscription"。 如 果 CSE还保存有未发送的由资源 "mySubscription"产生的通知消息, 则删 除所有由资源 "mySubscription" 产生的通知消息。 优选实施例三
1、 AE向 CSE发送创建资源请求, 其中, 该创建资源请求中携带的信 息可以包括但不限于:
( 1 ) 資源名称: "myApplication";
( 2 ) 资源类型: "Application" ;
( 3 ) 资源创建的位置为: CSEBase;
( 4 ) 内容: 包含该资源需要创建的属性。
2、 CSE在接收到来自于 AE的创建资源请求后, 验证 AE是否具备创 建资源的权限, 如果是, 则在 CSE的资源目录 CSEBase下创建资源, 并设 置資源名称为 "myApplication", 以及设置资源类型为 "Application"。 同时, 还可以根据创建资源请求中的内容创建资源 "myApplication" 的属性。
3、 AE向 CSE发送创建资源请求, 该创建资源请求中携带的信息可以 包括但不限于:
( 1 ) 資源名称: "my Subscription";
( 2 ) 资源类型: "Subscription" ;
( 3 ) 资源创建的位置为: \\CSEBase\myApplication
( 4 ) 内容: 通知发送策略, 其中, 该通知发送策略可以包括以下参数 的名称以及与名称相对应的取值:
1 )通知消息条数: 其值为正整数, 例如: 100条, 用于指示发送的通 知消息的最大数目, 当发送的通知消息达到该数目后, 其所对应的订阅资 源将被删除。
2 )通知发送模式: 其值为枚举类型, 可以为以下之一: 批处理发送、 只发送最新通知;
3 )通知发送规则: 其值包含子参数汇聚数目, 例如: 15 条, 和 /或, 等待时间的值, 例如: 20分钟;
4 )通知发送地址: 其值为统一资源标识(URI ), 用于指示通知消息发 送的目标地址。
4、 CSE在接收到 AE的创建资源请求后, 验证 AE具有创建资源的权 限, 并且对 "资源创建的位置" 中所指的资源, 即资源 "myApplication" , 具有可读取的权限后, 在资源 " myApplication " 下创建子资源
"mySubscription" , 以及设置属性 "通知消息条数"为创建资源请求消息中 通知消息条数的值, 设置属性 "通知发送模式" 为请求消息中通知发送模 式的值, 设置属性 "通知发送规则" 为请求消息中通知发送策略的值, 以 及设置属性 "通知发送地址" 为请求消息中通知发送地址的值。 ifc时, 資源 "myApplication" 称为被订阅的資源。
5、 如果子资源 "mySubscription" 的属性 "通知发送模式" 的值为 "批 处理发送", 当资源 "myApplication" 的子资源或者属性发生变更时, CSE 暂时保存通知消息。
5.1、 如果 "批处理发送规则" 中同时包含汇聚数目和等待时间, 则当 先满足以下条件之一时, CSE发送其所保存的通知消息至属性 "通知发送 地址" 中的目标地址:
条件 1 )当保存的通知消息数目达到属性 "批处理发送规则" 中的汇聚 数目:
可以使用一个计数器对 CSE保存的由该订阅资源产生的通知消息进行 计数, 每产生一条通知消息并被 CSE保存, 则计数器值增加 1。 当计数器 的值达到 "批处理发送条件" 中的参数汇聚数目的值时, 则认为是满足此 条件, 在通知消息发送完成后, 该计数器清零。 在这一轮发送完成后, 后 续产生的第一个通知又称为第一个通知消息, 从这一个通知消息再次开始 重新计数。
条件 2 )当通知消息保存时间达到属性 "批处理发送规则" 中的等待时 间:
从产生第一个通知消息开始, 使用一个计时器进行计时, 当计时器的 值达到 "批处理发送规则" 中的参数等待时间时, 认为是满足此条件, 在 通知消息发送完成后, 该计时器清零。 在这一轮发送完成后, 后续产生的 第一个通知又称为第一个通知消息, 从这一个通知消息再次开始重新计时。
在优选实施过程中, 上述计数器和计时器还可以使用倒计数和倒计时 的方式, 初始值设置为汇聚数目和等待时间的值, 满足条件也相应的更改 为计数器或计时器直至 0, 清零也相应地更改为恢复至初始值。
以上两个条件, 任何一个先满足时, 另外一个条件中正在计数的计数 器, 或者, 正在计时的计时器应该复位, 即清零或恢复至初始值。
5.2、 如果 "批处理发送规则" 中只包含汇聚数目, 则当步骤 5.1 中条 件 1 )满足时, CSE发送其所保存的通知消息到属性 "通知发送地址" 中的 标地址;
5.3、 如果 "批处理发送规则" 中只包含等待时间, 则当步骤 5.1 中条 件 2 )满足时, CSE发送其所保存的通知消息到属性 "通知发送地址" 中的 标地址。
6、 CSE每发送一条通知消息, 属性 "通知消息条数"的值就会递减一, 当 "通知消息条数" 的值变为 0时, 则可以删除资源 "mySubscription"。 如 果 CSE还保存有未发送的由资源 "mySubscription"产生的通知消息, 则删 除所有由资源 "mySubscription" 产生的通知消息。
7、 不管 "批处理发送规则" 中仅包含汇聚数目, 或者仅包含等待时间, 又或者同时包含汇聚数目和等待时间, 如果当保存的通知消息数目达到当 前 "通知消息条数" 的值时, 即使未满足条件 1 )和条件 2 ) (即通知消息 保存的时间未到达 "批处理发送规则" 中的等待时间, 或保存的通知消息 数目未达到 "批处理发送规则" 中的汇聚数目), CSE仍发送所保存的通知 消息至属性 "通知发送地址" 中的目标地址; 或者, 在仅满足条件 1 )或条 件 2 )之一时, 只选取最后产生的数量等于订阅资源的属性中的通知消息条 数的通知消息发送, 例如 "通知消息条数" 值为 5, 在仅满足条件 1 )或条 件 2 )之一时, CSE保存的通知消息有 10条, 那么仅发送最后产生的 5条 通知消息到 "通知发送地址" 中的目标地址。
然而, 如果子资源 "mySubscription" 的属性 "通知发送模式" 的值为 "只发送最新通知", 将不再执行上述 5-7步骤, 转而执行以下 5-6步骤:
5、 如果子资源 "mySubscription" 的属性 "通知发送模式" 的值为 "只 发送最新通知", 当资源 "myApplication" 的子资源或者属性发生变更时, CSE暂时保存通知消息,
5.1、 如果 "只发送最新通知规则" 中同时包含汇聚数目和等待时间, 则当先满足以下条件之一时, CSE发送其所保存的通知消息中最后产生的 一条通知消息至属性 "通知发送地址" 中的目标地址:
条件 1 )当保存的通知消息数目达到属性 "只发送最新通知规则" 中的 汇聚数目:
可以使用一个计数器对 CSE保存的由该订阅资源产生的通知消息进行 计数, 每产生一条通知消息并被 CSE保存, 则计数器值增加 1, 当计数器 的值达到 "只发送最新通知规则" 中的参数汇聚数目的值时, 认为是满足 此条件, 在通知消息发送完成后, 该计数器清零, 在这一轮发送完成后, 后续产生的第一个通知又称为第一个通知消息, 从这一个通知消息再次开 始重新计数;
条件 2 )当通知消息保存时间达到属性 "只发送最新通知规则" 中的等 待时间:
从产生第一个通知消息开始, 使用一个计时器进行计时, 当计时器的 值达到 "只发送最新通知规则" 中的参数等待时间时, 认为是满足此条件, 在通知消息发送完成后, 该计时器清零。 在这一轮发送完成后, 后续产生 的第一个通知又称为第一个通知消息, 从这一个通知消息再次开始重新计 时;
在优选实施过程中, 上述计数器和计时器还可以使用倒计数和倒计时 的方式, 初始值设置为汇聚数目和等待时间的值, 满足条件也相应的更改 为计数器或计时器直至 0, 清零也相应地更改为恢复至初始值。
以上两个条件, 任何一个先满足时, 另外一个条件中正在计数的计数 器, 或者, 正在计时的计时器应该复位, 即清零或恢复至初始值。
5.2、 如果 "只发送最新通知规则" 中只包含汇聚数目, 则当步骤 5.1 中条件 1 )满足时, CSE发送其所保存的通知消息中最后产生的一条通知消 息到属性 "通知发送地址" 中的目标地址;
5.3、 如果 "只发送最新通知规则" 中只包含等待时间, 则当步骤 5.1 中条件 2 )满足时, CSE发送其所保存的通知消息中最后产生的一条通知消 息到属性 "通知发送地址" 中的目标地址。
6、 CSE每发送一条通知消息, 属性 "通知消息条数"的值就会递减一, 当 "通知消息条数" 的值变为 0时, 则可以删除资源 "mySubscription"。 如 果 CSE还保存有未发送的由资源 "mySubscription"产生的通知消息, 则删 除所有由资源 "mySubscription" 产生的通知消息。
图 3是根据本发明实施例的通知消息的发送装置的结构框图。 如图 3 所示, 该通知消息的发送装置可以包括: 接收模块 10, 配置为接收来自于 发送端的创建订阅资源请求, 其中, 创建订阅资源请求中携带有通知发送 策略和通知消息的发送地址, 通知发送策略用于发送端在接收端订阅的资 源发生变化时, 指示接收端按照发送端指定的发送方式向发送端发送一条 或多条通知消息; 发送模块 20, 配置为在发送端订阅的资源发生变化时, 根据通知发送策略向通知消息的发送地址发送一条或多条通知消息。
釆用如图 3所示的装置, 解决了相关技术中 AE或 CSE所订阅的资源 发生变化时, AE或 CSE会频繁地接收到数量庞大的通知消息进而浪费网 络资源以及本地的存储空间的问题, 进而节省了网络资源以及 AE或 CSE 本地的存储空间。
在优选实施过程中, 上述发送端可以为以下之一: 第一 CSE、 AE; 上 述接收端可以为: 第二 CSE。
优选地, 如图 4 所示, 上述通知发送策略可以包括: 接收端向通知消 息的发送地址发送通知消息的最大数量、 通知消息的发送模式以及与发送 模块相关联的发送规则参数; 发送模块 20可以包括: 第一判断单元 200, 配置为当发送模式指示为批处理发送通知消息模式时, 判断当前存储的通 知消息的数量是否小于最大数量与第一数量的差值, 其中, 第一数量为接 收端已经发送至通知消息的发送地址的通知消息的数目, 最大数量与第一 数量均为正整数; 第一发送单元 202, 配置为在第一判断单元输出为是时, 按照发送规则参数向通知消息的发送地址发送多条通知消息; 第二发送单 元 204, 配置为在第一判断单元输出为否时,按照差值的数量向通知消息的 发送地址发送多条通知消息。
优选地, 发送规则参数可以包括: 预设数量和 /或预设时长; 第一发送 单元 202, 配置为执行以下操作之一: 当发送规则参数为预设数量时, 在当 前存储的待发送至通知消息的发送地址的通知消息的数量已经达到预设数 量的情况下, 向通知消息的发送地址发送预设数量的通知消息; 当发送规 则参数为预设时长时, 在当前存储的待发送至通知消息的发送地址的通知 消息的时间已经达到预设时长的情况下, 将当前存储的全部通知消息均发 送至通知消息的发送地址; 当发送规则参数为预设数量和预设时长时, 按 照首先满足的发送规则参数向通知消息的发送地址发送一条或多条通知消 息。
优选地, 如图 4 所示, 上述通知发送策略可以包括: 接收端向通知消 息的发送地址发送通知消息的最大数量、 通知消息的发送模式以及与发送 模块相关联的发送规则参数; 发送模块 20可以包括: 第二判断单元 206, 配置为当发送模式指示为只发送最新生成的通知消息模式时, 判断第一数 量是否小于最大数量, 其中, 第一数量为接收端已经发送至通知消息的发 送地址的通知消息的数目; 第三发送单元 208, 配置为在第二判断单元输出 为是时, 按照发送规则参数向通知消息的发送地址发送最新生成的一条通 知消息。
优选地, 发送规则参数包括: 预设数量和 /或预设时长; 第三发送单元 208, 配置为执行以下操作之一: 当发送规则参数为预设数量时, 在当前存 储的待发送至通知消息的发送地址的通知消息的数量已经达到预设数量的 情况下, 将预设数量的通知消息中最新生成的一条通知消息发送至通知消 息的发送地址; 当发送规则参数为预设时长时, 在当前存储的待发送至通 知消息的发送地址的通知消息的时间已经达到预设时长的情况下, 将当前 存储的全部通知消息中最新生成的一条通知消息发送至通知消息的发送地 址; 当发送规则参数为预设数量和预设时长时, 按照首先满足的发送规则 参数向通知消息的发送地址发送最新生成的一条通知消息。
接收模块 10可由装置中的接收机实现; 发送模块 20可由装置中的发 射机实现。
从以上的描述中, 可以看出, 上述实施例实现了如下技术效果(需要 说明的是这些效果是某些优选实施例可以达到的效果): 釆用本发明实施例 所提供的技术方案, 发送端可以根据自身的实际需求灵活地选择接收通知 消息的方式。由此解决了相关技术中 AE或 CSE所订阅的资源发生变化时, AE或 CSE会频繁地接收到数量庞大的通知消息进而浪费网络资源以及本 地的存储空间的问题, 进而节省了网络资源以及 AE或 CSE本地的存储空 间。
显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤 可以用通用的计算装置来实现, 它们可以集中在单个的计算装置上, 或者 分布在多个计算装置所组成的网络上, 可选地, 它们可以用计算装置可执 行的程序代码来实现, 从而, 可以将它们存储在存储装置中由计算装置来 执行, 并且在某些情况下, 可以以不同于此处的顺序执行所示出或描述的 步骤, 或者将它们分别制作成各个集成电路模块, 或者将它们中的多个模 块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限制于任何特 定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于 本领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精 神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明 的保护范围之内。

Claims

权利要求书
1、 一种通知消息的发送方法, 包括:
接收端接收来自于发送端的创建订阅资源请求, 其中, 所述创建订阅 资源请求中携带有通知发送策略和通知消息的发送地址, 所述通知发送策 略用于所述接收端在所述发送端订阅的资源发生变化时, 指示所述接收端 按照所述发送端指定的发送方式向所述发送端发送一条或多条通知消息; 所述接收端在所述发送端订阅的资源发生变化时, 根据所述通知发送 策略向所述通知消息的发送地址发送所述一条或多条通知消息。
2、 根据权利要求 1所述的方法, 其中, 所述通知发送策略包括: 所述 接收端向所述通知消息的发送地址发送通知消息的最大数量、 通知消息的 发送模式以及与所述发送模式相关联的发送规则参数;
当所述发送模式指示为批处理发送通知消息模式时, 所述接收端根据 所述通知发送策略向所述通知消息的发送地址发送一条或多条通知消息包 括:
所述接收端判断当前存储的通知消息的数量是否小于所述最大数量与 第一数量的差值, 其中, 所述第一数量为所述接收端已经发送至所述通知 消息的发送地址的通知消息的数目, 所述最大数量与所述第一数量均为正 整数;
如果是, 则所述接收端按照所述发送规则参数向所述通知消息的发送 地址发送所述一条或多条通知消息;
如果否, 则所述接收端按照所述差值的数量向所述通知消息的发送地 址发送所述一条或多条通知消息。
3、 根据权利要求 2所述的方法, 其中, 所述发送规则参数包括: 预设 数量和 /或预设时长; 所述接收端按照所述发送规则参数向所述通知消息的 发送地址发送所述一条或多条通知消息, 包括执行以下之一: 当所述发送规则参数为所述预设数量时, 在所述接收端存储的待发送 至所述通知消息的发送地址的通知消息的数量已经达到所述预设数量的情 况下, 所述接收端向所述通知消息的发送地址发送所述预设数量的通知消 息;
当所述发送规则参数为所述预设时长时, 在所述接收端存储的待发送 至所述通知消息的发送地址的通知消息的时间已经达到所述预设时长的情 况下, 所述接收端将当前存储的全部通知消息均发送至所述通知消息的发 送地址;
当所述发送规则参数为所述预设数量和所述预设时长时, 按照首先满 足的发送规则参数向所述通知消息的发送地址发送所述一条或多条通知消 息。
4、 根据权利要求 1所述的方法, 其中, 所述通知发送策略包括: 所述 接收端向所述通知消息的发送地址发送通知消息的最大数量、 通知消息的 发送模式以及与所述发送模式相关联的发送规则参数; 当所述发送模式指 示为只发送最新生成的通知消息模式时, 所述接收端根据所述通知发送策 略向所述通知消息的发送地址发送一条通知消息包括:
所述接收端判断第一数量是否小于所述最大数量, 其中, 所述第一数 量为所述接收端已经发送至所述通知消息的发送地址的通知消息的数目; 如果是, 则所述接收端按照所述发送规则参数向所述通知消息的发送 地址发送所述最新生成的一条通知消息。
5、 根据权利要求 4所述的方法, 其中, 所述发送规则参数包括: 预设 数量和 /或预设时长; 所述接收端按照所述发送规则参数向所述通知消息的 发送地址发送所述最新生成的一条通知消息, 包括执行以下之一:
当所述发送规则参数为所述预设数量时, 在所述接收端存储的待发送 至所述通知消息的发送地址的通知消息的数量已经达到所述预设数量的情 况下, 所述接收端将所述预设数量的通知消息中最新生成的一条通知消息 发送至所述通知消息的发送地址;
当所述发送规则参数为所述预设时长时, 在所述接收端存储的待发送 至所述通知消息的发送地址的通知消息的时间已经达到所述预设时长的情 况下, 所述接收端将当前存储的全部通知消息中最新生成的一条通知消息 发送至所述通知消息的发送地址;
当所述发送规则参数为所述预设数量和所述预设时长时, 按照首先满 足的发送规则参数向所述通知消息的发送地址发送所述最新生成的一条通 知消息。
6、 根据权利要求 1至 5中任一项所述的方法, 其中,
所述发送端为以下之一: 第一公共业务实体 CSE、 应用实体 AE; 所述接收端为: 第二 CSE。
7、 一种通知消息的发送装置, 包括:
接收模块, 配置为接收来自于发送端的创建订阅资源请求, 其中, 所 述创建订阅资源请求中携带有通知发送策略和通知消息的发送地址, 所述 通知发送策略用于所述发送端在所述接收端订阅的资源发生变化时, 指示 所述接收端按照所述发送端指定的发送方式向所述发送端发送一条或多条 通知消息;
发送模块, 配置为在所述发送端订阅的资源发生变化时, 根据所述通 知发送策略向所述通知消息的发送地址发送所述一条或多条通知消息。
8、 根据权利要求 7所述的装置, 其中, 所述通知发送策略包括: 所述 接收端向所述通知消息的发送地址发送通知消息的最大数量、 通知消息的 发送模式以及与所述发送模块相关联的发送规则参数;
所述发送模块包括:
第一判断单元, 配置为当所述发送模式指示为批处理发送通知消息模 式时, 判断当前存储的通知消息的数量是否小于所述最大数量与第一数量 的差值, 其中, 所述第一数量为所述接收端已经发送至所述通知消息的发 送地址的通知消息的数目, 所述最大数量与所述第一数量均为正整数; 第一发送单元, 配置为在所述第一判断单元输出为是时, 按照所述发 送规则参数向所述通知消息的发送地址发送所述一条或多条通知消息; 第二发送单元, 配置为在所述第一判断单元输出为否时, 按照所述差 值的数量向所述通知消息的发送地址发送所述一条或多条通知消息。
9、 根据权利要求 8所述的装置, 其中, 所述发送规则参数包括: 预设 数量和 /或预设时长;
所述第一发送单元, 配置为执行以下操作之一:
当所述发送规则参数为所述预设数量时, 在当前存储的待发送至所述 通知消息的发送地址的通知消息的数量已经达到所述预设数量的情况下, 向所述通知消息的发送地址发送所述预设数量的通知消息; 或者,
当所述发送规则参数为所述预设时长时, 在当前存储的待发送至所述 通知消息的发送地址的通知消息的时间已经达到所述预设时长的情况下, 将当前存储的全部通知消息均发送至所述通知消息的发送地址; 或者, 所述发送规则参数为所述预设数量和所述预设时长时, 按照首先满足 的发送规则参数向所述通知消息的发送地址发送所述一条或多条通知消 息。
10、 根据权利要求 7 所述的装置, 其中, 所述通知发送策略包括: 所 述接收端向所述通知消息的发送地址发送通知消息的最大数量、 通知消息 的发送模式以及与所述发送模块相关联的发送规则参数; 所述发送模块包 括:
第二判断单元, 配置为当所述发送模式指示为只发送最新生成的通知 消息模式时, 判断第一数量是否小于所述最大数量, 其中, 所述第一数量 为所述接收端已经发送至所述通知消息的发送地址的通知消息的数目; 第三发送单元, 配置为在所述第二判断单元输出为是时, 按照所述发 送规则参数向所述通知消息的发送地址发送所述最新生成的一条通知消 息。
11、 根据权利要求 10所述的装置, 其中, 所述发送规则参数包括: 预 设数量和 /或预设时长;
所述第三发送单元, 配置为执行以下操作之一:
当所述发送规则参数为所述预设数量时, 在当前存储的待发送至所述 通知消息的发送地址的通知消息的数量已经达到预设数量的情况下, 将所 述预设数量的通知消息中最新生成的一条通知消息发送至所述通知消息的 发送地址;
当所述发送规则参数为所述预设时长时, 在当前存储的待发送至所述 通知消息的发送地址的通知消息的时间已经达到预设时长的情况下, 将当 前存储的全部通知消息中最新生成的一条通知消息发送至所述通知消息的 发送地址;
当所述发送规则参数为所述预设数量和所述预设时长时, 按照首先满 足的发送规则参数向所述通知消息的发送地址发送所述最新生成的一条通 知消息。
12、 根据权利要求 7至 11中任一项所述的装置, 其中,
所述发送端为以下之一: 第一公共业务实体 CSE、 应用实体 AE; 所述接收端为: 第二 CSE。
13、 一种计算机存储介质, 所述计算机存储介质中存储有计算机可执 行指令, 所述计算机可执行指令用于执行权利要求 1至 6任一项所述的通 知消息发送方法。
PCT/CN2014/081953 2014-05-21 2014-07-10 通知消息的发送方法、装置及计算机存储介质 WO2015176365A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP14892853.4A EP3148156A4 (en) 2014-05-21 2014-07-10 Sending method and apparatus and computer storage medium of notification message
US15/312,301 US20170126828A1 (en) 2014-05-21 2014-07-10 Sending Method and Apparatus and Computer Storage Medium of Notification Message

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410216076.8 2014-05-21
CN201410216076.8A CN105101412A (zh) 2014-05-21 2014-05-21 通知消息的发送方法及装置

Publications (1)

Publication Number Publication Date
WO2015176365A1 true WO2015176365A1 (zh) 2015-11-26

Family

ID=54553281

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/081953 WO2015176365A1 (zh) 2014-05-21 2014-07-10 通知消息的发送方法、装置及计算机存储介质

Country Status (4)

Country Link
US (1) US20170126828A1 (zh)
EP (1) EP3148156A4 (zh)
CN (1) CN105101412A (zh)
WO (1) WO2015176365A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108112007A (zh) * 2016-11-25 2018-06-01 京东方科技集团股份有限公司 信息通知方法、装置及系统

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113159910A (zh) * 2016-07-29 2021-07-23 京东方科技集团股份有限公司 进行通知的方法、装置和系统
CN107770754A (zh) * 2017-10-23 2018-03-06 中兴通讯股份有限公司 一种通知发送方法、装置和系统
WO2020231060A1 (ko) * 2019-05-13 2020-11-19 현대자동차주식회사 M2m 시스템에서 자원을 삭제하기 위한 방법 및 장치
CN112511579A (zh) * 2019-09-16 2021-03-16 京东方科技集团股份有限公司 事件通知方法、系统,服务器设备、计算机存储介质
CN116155992A (zh) * 2019-10-16 2023-05-23 Oppo广东移动通信有限公司 订阅资源的方法和装置
CN112822247B (zh) * 2020-12-31 2023-04-07 新奥数能科技有限公司 系统异步通讯方法、装置、电子设备和计算机可读介质
CN114070878B (zh) * 2022-01-13 2022-06-24 阿里云计算有限公司 网络连接处理方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100057485A1 (en) * 2008-08-29 2010-03-04 Achim Luft Methods and apparatus for machine-to-machine based communication service classes
CN102238026A (zh) * 2010-04-29 2011-11-09 中兴通讯股份有限公司 物联网通知消息的管理方法和通知业务能力装置
CN102664899A (zh) * 2012-05-04 2012-09-12 华为技术有限公司 一种业务处理方法、装置及系统
CN103596118A (zh) * 2012-08-13 2014-02-19 华为终端有限公司 发现机器对机器业务的方法、设备及系统
CN103618800A (zh) * 2013-12-05 2014-03-05 华为技术有限公司 订阅通知的实现方法和装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1909434A4 (en) * 2005-07-22 2008-11-05 Huawei Tech Co Ltd SUBSCRIPTION METHOD AND DEVICE
CN1933476B (zh) * 2005-09-15 2010-04-28 华为技术有限公司 基于会话发起协议的订阅方法
CN102118735B (zh) * 2010-01-05 2015-04-01 中兴通讯股份有限公司 基于轻量级目录访问协议实现数据订阅通知的方法
WO2012100075A1 (en) * 2011-01-19 2012-07-26 Cummins Intellectual Property, Inc. Fuel injector having a piezoelectric actuator and a sensor assembly
US8676315B2 (en) * 2011-07-26 2014-03-18 General Electric Company System and method of electrical current detection in electrophysiology study
WO2013117534A1 (en) * 2012-02-08 2013-08-15 Nestec S.A. Frozen confectionery product with improved stability
CA2869505C (en) * 2012-05-14 2020-09-29 Huawei Technologies Co., Ltd. Method and system for group communication, group server, and group member device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100057485A1 (en) * 2008-08-29 2010-03-04 Achim Luft Methods and apparatus for machine-to-machine based communication service classes
CN102238026A (zh) * 2010-04-29 2011-11-09 中兴通讯股份有限公司 物联网通知消息的管理方法和通知业务能力装置
CN102664899A (zh) * 2012-05-04 2012-09-12 华为技术有限公司 一种业务处理方法、装置及系统
CN103596118A (zh) * 2012-08-13 2014-02-19 华为终端有限公司 发现机器对机器业务的方法、设备及系统
CN103618800A (zh) * 2013-12-05 2014-03-05 华为技术有限公司 订阅通知的实现方法和装置

Non-Patent Citations (1)

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

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108112007A (zh) * 2016-11-25 2018-06-01 京东方科技集团股份有限公司 信息通知方法、装置及系统
CN108112007B (zh) * 2016-11-25 2020-08-11 京东方科技集团股份有限公司 信息通知方法、装置及系统

Also Published As

Publication number Publication date
EP3148156A4 (en) 2017-05-24
CN105101412A (zh) 2015-11-25
EP3148156A1 (en) 2017-03-29
US20170126828A1 (en) 2017-05-04

Similar Documents

Publication Publication Date Title
WO2015176365A1 (zh) 通知消息的发送方法、装置及计算机存储介质
JP6254702B2 (ja) M2mシステムにおける通知メッセージ伝達方法及びこのための装置
WO2015188440A1 (zh) 资源订阅处理方法及装置
US10085244B2 (en) Method for guaranteeing operation of control message in wireless communication system and device for same
JP6240312B2 (ja) M2m通信システムにおいて購読及び通知のための方法及びそのための装置
CN107667550B (zh) 无线通信系统中通过轮询信道来处理请求的方法及其设备
KR20160082967A (ko) M2m 통신 시스템에서 구독 및 통지를 위한 방법 및 이를 위한 장치
US10609533B2 (en) Method and device for trigger management of a common service entity (CSE) and a network element of bearer network
CN112789842A (zh) 用于在电信网络中支持事件监测的订阅和报告的服务的方法以及相关网络功能
US10219133B2 (en) Notification message transmission method and device, and computer storage medium
EP3163798B1 (en) Method for processing request messages in wireless communication system, and device for same
CN112583726B (zh) 一种流量控制的方法及装置
WO2016054888A1 (zh) 一种创建订阅资源的方法和装置
JP2022537643A (ja) リソース購読方法、機器、サーバ及びコンピュータ記憶媒体
JP7335410B2 (ja) バルクサブスクリプションのフィルタ
WO2015168981A1 (zh) 属性的操作方法及装置
WO2015117446A1 (zh) 控制资源变更通知消息发送方法及装置
CN107770754A (zh) 一种通知发送方法、装置和系统
WO2022052875A1 (zh) 终端跨区域通信方法、网元设备及存储介质
US20220248228A1 (en) Methods and Apparatus for Device Authentication and Authorisation
WO2015117342A1 (zh) 一种通知消息的发送方法、装置和系统
WO2015168974A1 (zh) 资源的创建方法及装置
WO2015154459A1 (zh) 订阅资源变更通知的方法及装置
US10511682B2 (en) Group resource updating processing methods, devices and system, and CSEs
WO2015131497A1 (zh) 一种通知消息的负载控制方法和装置

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

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15312301

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2014892853

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014892853

Country of ref document: EP