CN107968805B - Event notification method and server - Google Patents

Event notification method and server Download PDF

Info

Publication number
CN107968805B
CN107968805B CN201610915406.1A CN201610915406A CN107968805B CN 107968805 B CN107968805 B CN 107968805B CN 201610915406 A CN201610915406 A CN 201610915406A CN 107968805 B CN107968805 B CN 107968805B
Authority
CN
China
Prior art keywords
subscription
resource
condition
attribute
publisher
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201610915406.1A
Other languages
Chinese (zh)
Other versions
CN107968805A (en
Inventor
马帅
陈瑞
石磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201610915406.1A priority Critical patent/CN107968805B/en
Publication of CN107968805A publication Critical patent/CN107968805A/en
Application granted granted Critical
Publication of CN107968805B publication Critical patent/CN107968805B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/56Provisioning of proxy services
    • H04L67/567Integrating service provisioning from a plurality of service providers
    • 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

Abstract

The embodiment of the invention provides an event notification method and a server, relates to the technical field of communication, and can solve the problem that in the prior art, due to the fact that subscription conditions are only simple superposition of a limited number of atomic conditions, diversified subscription requirements of subscribers cannot be met. The specific scheme is as follows: the server determines whether the updated publisher resource meets subscription conditions, the subscription conditions include composite subscription conditions, the composite subscription conditions include at least one first atomic condition, the first atomic condition is a condition corresponding to a first resource identifier, a first resource attribute or data content of a resource instance, the first atomic conditions in the composite subscription conditions are combined through a logical relationship, and the logical relationship includes and, or not; and if the updated resources of the publisher meet the subscription conditions, notifying the updated events corresponding to the resources of the publisher to the addresses of the subscribers corresponding to the subscription conditions. The embodiment of the invention is used for event notification.

Description

Event notification method and server
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to an event notification method and a server.
Background
The first generation of Machine-to-Machine (oneM 2M) standard is a standard specification for inter-Machine communication in conjunction with the internet of things. In the oneM2M standard, a Common Service Entity (CSE) represents a series of instances of Common Service Functions (CSFs), where each CSF has a corresponding resource representation and implementation. In the process of publishing and subscribing, the proxy server notifies the event meeting the requirements of the subscriber to the address of the subscriber stored in the attribute of the notification address (notification uri) according to the Subscription condition stored in the attribute of the event notification rule (eventnotification criterion) in the Subscription (Subscription) resource corresponding to each subscriber.
The event notification rule attribute can store at least one atomic condition which is not separable, and the object which can be described by the atomic condition comprises a resource identifier or a condition corresponding to a limited number of resource attributes, so that the number of the atomic conditions is limited, and the subscription condition corresponding to a subscriber is simple superposition of the limited number of the atomic conditions in the event notification rule attribute. Specifically, the attributes and corresponding descriptions included in the existing atomic conditions can be referred to in fig. 1.
Therefore, in the existing publish-subscribe mechanism, the subscription condition is only an and combination of a limited number of atomic conditions, and many basic subscription conditions cannot be represented, so that the subscription condition cannot accurately express diversified and personalized subscription requirements of the user, and often leads to unnecessary notifications being sent to the user or unnecessary notifications required by the user not being sent.
Disclosure of Invention
The embodiment of the invention provides an event notification method and a server, which can solve the problem that in the prior art, due to the fact that subscription conditions are only simple superposition of a limited number of atomic conditions, diversified subscription requirements of subscribers cannot be met.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in a first aspect, an embodiment of the present invention provides an event notification method, where the method includes: when the resources of the publisher in the server are updated, determining whether the updated resources of the publisher meet subscription conditions. The subscription conditions comprise composite subscription conditions, the composite subscription conditions comprise at least one first atomic condition, the first atomic condition is a condition corresponding to the first resource identifier, the first resource attribute or the data content of the resource instance, the first atomic conditions in the composite subscription conditions are combined through a logical relationship, and the logical relationship comprises AND, OR or NOT. And then, if the server determines that the updated resources of the publisher meet the subscription conditions, notifying the addresses of the subscribers corresponding to the subscription conditions of events corresponding to the updated resources of the publisher.
Since the subscription condition herein may include a composite subscription condition, the composite subscription condition may include at least one non-separable first atomic condition. The first atomic condition in the composite subscription condition may be a condition corresponding to the data content of the resource instance, in addition to a condition corresponding to the resource identifier or a condition corresponding to the resource attribute. Moreover, different first atomic conditions in the composite subscription condition can be nested and combined through logical relations of AND, OR or NOT. Therefore, the method not only can meet the subscription requirement of the subscriber on the resource instance data content, expand the content range which can be described by the atomic conditions in the subscription conditions, but also expand the number and the types of the atomic conditions in the subscription conditions, thereby meeting the diversified and personalized subscription requirement of the subscriber.
In one possible implementation, the publisher's resources may include a state identification attribute. The server determining that the resource of the publisher is updated may include: when the state identification attribute changes, the server determines that the publisher's resource has been updated. Therefore, the server can conveniently judge whether the resource of the publisher is updated according to whether the state identification attribute is changed.
In a possible implementation manner, the resources in the server further include at least one processing rule resource, the resources of the publisher in the server include at least one subscription resource, and each processing rule resource corresponds to at least one subscription resource. Wherein the processing rule resource comprises a processing rule and at least one composite subscription condition. Each subscription resource comprises a first subscription condition attribute, and the first subscription condition attribute corresponds to at least one composite subscription condition in the processing rule resource. The server determining whether the updated publisher's resources satisfy the subscription condition includes: and the server respectively determines whether the updated resources of the publisher meet each composite subscription condition corresponding to the first subscription condition attribute according to the processing rule. The step of notifying the updated event corresponding to the resource of the publisher to the address of the subscriber corresponding to the subscription condition by the server comprises the following steps: and if the updated resources of the publisher meet any composite subscription condition corresponding to the first subscription condition attribute in the subscription resources, the server informs the updated events corresponding to the resources of the publisher to the address of the subscriber corresponding to any composite subscription condition. Thus, various subscription requirements can be described by one first subscription resource attribute in the subscription resource.
In one possible implementation, the first subscription condition attribute corresponds to a composite subscription condition in the processing rule resource.
In one possible implementation, the first subscription condition attribute corresponds to at least one composite subscription condition in the processing rule resource.
In one possible implementation, the subscribed resource further includes a first address attribute, and the first address attribute stores addresses of at least one group of subscribers. And the address of each group of subscribers corresponds to one composite subscription condition corresponding to the first subscription condition attribute. The server notifies the updated event corresponding to the resource of the publisher to the address of the subscriber corresponding to any composite subscription condition, and the address comprises the following steps: and the server informs the updated event corresponding to the resource of the publisher to the addresses of a group of subscribers corresponding to any composite subscription condition in the first address attribute.
Therefore, the subscription requirements of a plurality of groups of subscribers can be described through one first subscription resource attribute, when the updated resource of the publisher meets the subscription requirements of a certain group of subscribers, the corresponding event is notified to the group of subscribers, and other groups of subscribers in the subscription resource do not receive the event notification.
In one possible implementation, the processing rule resource includes a composite subscription condition attribute, a policy tag attribute, a parsing rule attribute, and a matching rule attribute. Wherein, at least one composite subscription condition is stored in the composite subscription condition attribute. At least one label is stored in the strategy label attribute, and each label corresponds to one composite subscription condition in the composite subscription condition attributes. And the analysis rule attribute stores an analysis rule for analyzing the composite subscription condition in the composite subscription condition attribute. The matching rule attribute stores a matching rule, and the matching rule is used for judging whether the updated publisher resources are matched with the composite subscription conditions in the composite subscription condition attribute. The processing rules include parsing rules and matching rules.
In one possible implementation, the processing rule resource includes a mapping list attribute, a parsing rule attribute, and a matching rule attribute. Wherein, the mapping list attribute stores at least one composite subscription condition, at least one label, and a one-to-one mapping relationship between the composite subscription condition and the label. And the analysis rule attribute stores an analysis rule for analyzing the composite subscription condition in the composite subscription condition attribute. The matching rule attribute stores a matching rule, and the matching rule is used for judging whether the updated publisher resources are matched with the composite subscription conditions in the composite subscription condition attribute. The processing rules include parsing rules and matching rules.
In one possible implementation, the content of the tag is a composite subscription condition. In another possible implementation manner, the content of the tag is a number corresponding to the composite subscription condition. In another possible implementation manner, when only one composite subscription condition is included in the composite subscription condition attribute of the processing rule resource, the content of the tag is an address corresponding to the processing rule resource. There may be various representations for the tags that find and determine the corresponding composite subscription condition.
In one possible implementation, the first subscription condition attribute holds at least one tag in a processing rule resource. The server respectively determines whether the updated publisher resource meets each composite subscription condition corresponding to the first subscription condition attribute according to the processing rule, and the method comprises the following steps: and the server respectively determines whether the updated resources of the publisher meet each composite subscription condition corresponding to each label in the first subscription condition attribute according to the analysis rule and the matching rule.
In one possible implementation, the subscription resource further includes a second subscription condition attribute. The second subscription condition attribute comprises at least one second atomic condition, the second atomic condition comprises a second resource identifier or a condition corresponding to the second resource attribute, and the subscription condition further comprises at least one second atomic condition included in the second subscription condition attribute. The server determining whether the updated publisher's resources satisfy the subscription condition further comprises: the server determines whether the updated publisher's resource satisfies each of the second atomic conditions included in the second subscription condition attribute in the subscription resource. The step of notifying the updated event corresponding to the resource of the publisher to the address of the subscriber corresponding to the subscription condition by the server comprises the following steps: if the updated publisher resource meets any composite subscription condition corresponding to the first subscription condition attribute in the subscription resources and meets each second atomic condition included in the second subscription condition attribute, the server notifies the updated publisher resource event to the address of the subscriber corresponding to the any composite subscription condition.
When the subscription resource comprises the first subscription condition attribute and the second subscription condition attribute, the subscription condition comprises at least one composite subscription condition corresponding to the first subscription condition attribute and at least one second atomic condition contained in the second subscription condition attribute. The process of the server determining whether the updated publisher's resources satisfy the subscription conditions includes determining whether the updated publisher's resources satisfy: at least one composite subscription condition corresponding to the first subscription condition attribute and at least one second atomic condition in the second subscription condition attribute.
In one possible implementation, when the second subscription condition attribute is included in the subscribed resource, the subscribed resource further includes a second address attribute. The second address attribute stores addresses of a group of subscribers corresponding to at least one second atomic condition in the second subscription condition attribute. The server notifies the updated event corresponding to the resource of the publisher to the address of the subscriber corresponding to the subscription condition, and the method further includes: and if the updated publisher resource does not meet each composite subscription condition corresponding to the first subscription condition attribute and meets each second atomic condition in the second subscription condition attribute, notifying the updated publisher resource event corresponding to the updated publisher resource to the address of the group of subscribers in the second address attribute.
In one possible implementation, the method further includes: and the server receives the service information issued by the issuer and updates the resource of the issuer according to the service information.
In one possible implementation, the method further includes: and the server receives subscription indication information sent by the subscriber and determines subscription conditions according to the subscription indication information. The subscription conditions comprise at least one composite subscription condition corresponding to a first subscription condition attribute of the subscription resource and at least one second atomic condition included in a second subscription condition attribute.
In a second aspect, an embodiment of the present invention provides a server, including: and the determining unit is used for determining whether the updated resources of the publisher meet the subscription conditions when the resources of the publisher in the server are updated. The subscription condition comprises a composite subscription condition, the composite subscription condition comprises at least one first atomic condition, and the first atomic condition is a condition corresponding to a first resource identifier, a first resource attribute or data content of a resource instance. The first atomic conditions in the composite subscription condition are combined through a logical relationship, wherein the logical relationship comprises AND, OR or NOT. And the notification unit is used for notifying the address of the subscriber corresponding to the subscription condition of the event corresponding to the updated resource of the publisher if the updated resource of the publisher is determined to meet the subscription condition.
In a possible implementation manner, the resource of the publisher includes a state identification attribute, and the determining unit is configured to determine that the resource of the publisher in the server is updated specifically includes: when the state identification attribute changes, the resource of the publisher is determined to be updated.
In a possible implementation manner, the resource in the server further includes at least one processing rule resource, and the resource of the publisher in the server includes at least one subscription resource. Each processing rule resource corresponds to at least one subscription resource, and the processing rule resources comprise processing rules and at least one composite subscription condition. Each subscription resource comprises a first subscription condition attribute, and the first subscription condition attribute corresponds to at least one composite subscription condition in the processing rule resource. The determining unit is configured to determine whether the updated publisher resource satisfies the subscription condition specifically includes: and respectively determining whether the updated resources of the publisher meet each composite subscription condition corresponding to the first subscription condition attribute according to the processing rule. The notification unit is specifically configured to: and if the updated resources of the publisher meet any composite subscription condition corresponding to the first subscription condition attribute in the subscription resources, notifying the updated events corresponding to the resources of the publisher to the address of the subscriber corresponding to the any composite subscription condition.
In a possible implementation manner, the subscription resource further includes a first address attribute, where addresses of at least one group of subscribers are stored in the first address attribute, and the address of each group of subscribers corresponds to one composite subscription condition corresponding to the first subscription condition attribute. The notifying unit is configured to notify the updated event corresponding to the resource of the publisher to the address of the subscriber corresponding to any composite subscription condition, where the notifying unit is configured to specifically include: and notifying the updated event corresponding to the resource of the publisher to the addresses of a group of subscribers corresponding to any composite subscription condition in the first address attribute.
In a possible implementation manner, the subscription resource further includes a second subscription condition attribute, the second subscription condition attribute includes at least one second atomic condition, the second atomic condition includes a second resource identifier or a condition corresponding to the second resource attribute, and the subscription condition further includes at least one second atomic condition included in the second subscription condition attribute. The determining unit is configured to determine whether the updated publisher's resource satisfies the subscription condition, and further includes: and determining whether the updated resource of the publisher meets each second atomic condition included in the second subscription condition attribute in the subscription resource. The notification unit is specifically configured to: and if the updated publisher resource meets any composite subscription condition corresponding to the first subscription condition attribute in the subscription resources and meets each second atomic condition included in the second subscription condition attribute, notifying an event corresponding to the updated publisher resource to the address of the subscriber corresponding to any composite subscription condition.
In another aspect, an embodiment of the present invention provides a server, where the server has a function of implementing the event notification method of the first aspect. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more units corresponding to the above functions.
In another aspect, an embodiment of the present invention provides a server, where the server includes a memory, a transceiver, and a processor. Wherein the memory is configured to store computer executable program code and is coupled to the transceiver. The program code comprises instructions which, when executed by a processor, cause a server to perform the information or instructions referred to in the above method.
In another aspect, an embodiment of the present invention provides a computer storage medium for storing computer software instructions for the server, which includes a program designed to execute the above aspects.
In still another aspect, a communication system is provided, which includes a publisher, a subscriber and the server provided in the above aspect, and the publisher, the subscriber and the server are configured to execute the event notification method provided in the first aspect.
For ease of understanding, examples are given in part to illustrate concepts related to the present invention. As follows:
the publisher: a generic name for the service object is generated.
A subscriber: the generic term of a consuming service object.
A server: the generic term of a proxy server providing publish and subscribe services.
Compared with the prior art, the subscription condition in the embodiment of the present invention includes a composite subscription condition, where the composite subscription condition may include at least one first atomic condition that is not separable, and the first atomic condition may be a condition corresponding to data content of a resource instance, in addition to a condition corresponding to a resource identifier or a condition corresponding to a resource attribute as in the prior art. Moreover, different first atomic conditions in the composite subscription condition can be nested and combined through logical relations of AND, OR or NOT, and are not just simple to be superposed as in the prior art. Therefore, the method not only can meet the subscription requirement of the subscriber on the resource instance data content, expand the content range which can be described by the atomic conditions in the subscription conditions, but also expand the number and the types of the atomic conditions in the subscription conditions, thereby meeting the diversified and personalized subscription requirement of the subscriber.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a diagram of attributes and corresponding descriptions in an atomic condition provided in the prior art;
fig. 2 is a schematic diagram of a system architecture of a publish-subscribe interaction platform according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a resource structure in a server according to an embodiment of the present invention;
fig. 4 is a flowchart of an event notification method according to an embodiment of the present invention;
FIG. 5 is a schematic view of resources in a weather forecast scenario according to an embodiment of the present invention;
fig. 6 is a schematic resource diagram in an intelligent meter reading scene according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of resources in another weather forecast scenario provided by an embodiment of the present invention;
FIG. 8 is a diagram illustrating a location of a processing rule resource according to an embodiment of the present invention;
FIG. 9 is a flowchart of another event notification method provided by an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a subscription resource according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of another subscription resource according to an embodiment of the present invention;
FIG. 12 is a block diagram of a processing rule resource according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of another subscription resource according to an embodiment of the present invention;
FIG. 14 is a flowchart of another event notification method provided by an embodiment of the present invention;
fig. 15 is a schematic structural diagram of another subscription resource according to an embodiment of the present invention;
FIG. 16 is a flow chart of another event notification method provided by the embodiments of the present invention;
fig. 17 is a schematic structural diagram of a server according to an embodiment of the present invention;
fig. 18 is a schematic structural diagram of another server according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
A schematic diagram of a system architecture of a publish-subscribe interaction platform can be seen in fig. 2, and the system mainly includes a publisher, a subscriber and a server. The publisher is a general name for generating a service object, and specifically may be a device that publishes or cancels a service of the publisher to a server by invoking a Publish (Publish) operation or a cancel (Unpublish) operation; the subscriber is a generic term for a consumer service object, and specifically may be a personal device that subscribes or unsubscribes to a service from a server by invoking a Subscribe (Subscribe) operation or an Unsubscribe operation (ubscript). The server may be a mobile operator, a user monitoring center, or the like, and matches the service published by the publisher with the subscription condition of the subscriber, and invokes a notification (Notify) operation, so as to timely and reliably deliver the service and event meeting the subscription condition to the subscriber interested in the service and event.
Wherein, referring to fig. 3, the resource structure in the server may be distributed in a tree. Specifically, the server may have a root node resource, and under the root node resource, the server may create a target node resource for each publisher, where the root node resource is a parent resource of the target node resource, and the target node resource is a child resource of the root node resource. The target resource may have several attributes for representing information of the publisher, which may include, for example, a creator (creator) attribute, a maximum number of instances (maxNrOfInstances) attribute, and the like. The target node resource may also have a plurality of child nodes, each child node may correspond to one child resource, for example, the child resources in the target node resource may include resources such as an instance (contentInstance), a container (container), a subscription (subscription), and the like, and each child resource may also include a plurality of attributes. The sub-resource of the subscription resource under the target node resource is used for representing the information of the subscriber; other sub-resources under the target node resource are used to represent the publisher's information. Thus, in a target node resource created by a server for a publisher, the resource attribute of the target node resource and other sub-resources except the sub-resource of the subscription resource are used to describe information of the publisher, and thus may be referred to as resources of the publisher.
In the publisher's resources, the sub-resource of the instance may include an attribute of content (content) for indicating specific data content of the service provided by the publisher, for example, specific data content of weather forecast (provided service) published by a certain weather bureau (publisher) may be "{ (city, beijing) (highest temperature, 34 ℃) (wind power, 4 level) }".
In the existing subscription mechanism under the oneM2M standard, the subscription condition corresponding to the subscriber is only a simple superposition of a limited number of second atomic conditions, and the object describable by the second atomic conditions is only a condition corresponding to the resource identifier or a condition corresponding to a limited number of resource attributes, so that the diversified subscription requirements of the subscriber cannot be satisfied. Aiming at the problem, the invention provides an event notification method and a server, the subscription condition corresponding to a subscriber can comprise a composite subscription condition, the composite subscription condition can comprise at least one first atomic condition, the first atomic condition can also be a condition corresponding to the data content of a resource instance, and different first atomic conditions can be nested and combined through a logical relation AND, OR or NOT, so that the subscription requirement of the subscriber on the data content of the resource instance can be met, and the diversified and personalized subscription requirement of the subscriber can be met.
Referring to fig. 4, an embodiment of the present invention provides an event notification method, which may include:
101. when the resource of a publisher in the server is updated, the server determines whether the updated resource of the publisher meets subscription conditions, the subscription conditions include composite subscription conditions, the composite subscription conditions include at least one first atomic condition, the first atomic condition is a condition corresponding to a first resource identifier, a first resource attribute or data content of a resource instance, the first atomic conditions in the composite subscription conditions are combined through a logical relationship, and the logical relationship includes "and", "or" not ".
Wherein updating may include creating new resources, deleting existing resources, or modifying resource attributes. The resources herein may include various sub-resources within the publisher's resources. In the embodiment of the present invention, resources and sub-resources may be collectively referred to as resources, and a resource identifier is used to uniquely identify one resource.
The server creates the service information issued by the publisher as the resource of the publisher, and when the service information issued by the publisher changes, for example, when the server receives new service information issued by the publisher, the resource of the publisher stored in the server is updated. It should be noted that only a part of the attributes in the resource of the publisher may be directly modified, other attributes may not be directly modified, and a new resource including the modified resource attributes needs to be created again, and the data content in the resource instance may not be directly modified, and when the data content in the resource instance changes, a new resource instance needs to be created again to describe the changed resource information.
In particular, the server may determine whether the publisher's resources have been updated in a number of ways. In one possible implementation, the resource of the publisher may include a status identification attribute, and the server determining that the resource of the publisher is updated may include: when the state identification attribute changes, the resource of the publisher is determined to be updated.
The state identification (stateTag) attribute is used to identify whether a new resource is created in the resource where the state identification attribute is located, whether the created resource is deleted, or whether the resource attribute is modified, and once any one of the new resource and the created resource is deleted, the attribute value in the state identification attribute changes (for example, 1 is added). When the status identification attribute in the publisher's resource changes, it can be said that the publisher's resource is updated.
When the resource of the publisher is updated, the server may be triggered to determine whether the updated resource of the publisher meets the subscription condition, so as to determine whether event notification is required. It should be noted that the subscription condition herein may include a composite subscription condition, the composite subscription condition may include at least one first atomic condition, the first atomic condition may be a condition corresponding to the first resource identifier, or a condition corresponding to the first resource attribute, or a condition corresponding to the data content of the resource instance, and multiple nested combinations may be performed between different first atomic conditions in the composite subscription condition through a logical relationship "and", "or", or "not".
For example, in a weather forecast application scenario, the resources of the weather bureau as the publisher may be a container (container) resource type as shown in FIG. 5. The personalized subscription requirement of the subscriber one is as follows: "time 08:00-09: 00", "creator beijing weather bureau or shanghai weather bureau", and "city beijing or shanghai".
In the prior art, the subscription condition is only a simple superposition of a limited number of second atomic conditions, where the second atomic conditions may only be conditions corresponding to the second resource identifiers, or conditions corresponding to a limited number of second resource attributes, but not conditions corresponding to the data content of the resource instances. Thus, for the personalized subscription requirement of the first subscriber, the existing subscription mechanism may represent the subscription requirement of the first subscriber of "time: 08:00-09: 00" by "modifying time later than (modifying time): 08: 00" AND "modifying time earlier than (unmodified time): 09: 00", but may not represent other subscription requirements of the first subscriber, such as "creator beijing weather bureau or shanghai weather bureau". According to the existing publish-subscribe mechanism, the server can easily notify all events meeting the time of 08:00-09:00 to the first subscriber, so that unnecessary notification occurs, and therefore, the first subscriber cannot be accurately notified of the events meeting the requirement of one-time subscription of the subscriber.
In the embodiment of the present invention, the personalized subscription requirement of the first subscriber may be described by the first composite subscription condition, that is: (08:00< time <09:00) AND (creator-beijing meteorological office) AND (city-beijing) OR ((08:00< time <09:00) AND (creator-shanghai meteorological office) AND (city-shanghai)).
In the above-mentioned first composite subscription condition, "08: 00< time <09: 00", "creator ═ beijing meteorological office", "city ═ beijing", "creator ═ shanghai meteorological office", and "city ═ shanghai" are atomic conditions. And, "08: 00< time <09: 00", "creator ═ beijing meteorological office", and "creator ═ shanghai meteorological office" are conditions corresponding to the resource attributes. "08: 00< time <09: 00" is a condition corresponding to the resource attribute "last modified time (lastmodified time)", and "creator ═ beijing weather bureau" and "creator ═ shanghai weather bureau" are conditions corresponding to the resource attribute "creator (creator)". The "city ═ beijing" and the "city ═ shanghai" are conditions corresponding to the data content (content) of the resource instance (content instance). Where "AND" OR "denote the logical relationships" AND "OR", respectively. In addition, the logical relationship here may also include "NOT", which may be represented by "NOT".
It can be seen that, compared with the prior art, in the event notification method provided in the embodiment of the present invention, the first atomic condition in the composite subscription condition may be not only a condition corresponding to the resource identifier, or a condition corresponding to the resource attribute, but also a condition corresponding to the data content of the resource instance, so that various subscription conditions in the subscription requirements of the subscriber may be represented, thereby extending the content that can be described by the atomic condition in the subscription condition, expanding the number and the types of the atomic conditions in the subscription condition, and satisfying the personalized subscription requirements of the subscriber.
Also, different subscribers may have different subscription requirements. For example, in a scenario of a smart meter reading application, a resource corresponding to a smart meter as a publisher in a server may be a container resource type as shown in fig. 6, and subscription conditions corresponding to different subscribers may be a combination of multiple different forms of atomic conditions. For example:
the subscription requirement of the subscriber two is a waste alarm, namely: "today meter reading-yesterday meter reading > 100";
the subscription requirement of the subscriber three is a current imbalance alarm, namely: "three-phase three-wire", "unbalance rate > 30%", "one-phase current is greater than 0.05A", "duration is greater than 10 minutes";
the subscription requirement of the subscriber four is current imbalance warning, namely that the connection parameter is three-phase four-wire, the imbalance rate is greater than 50 percent, the one-phase current is greater than 0.1A, and the duration is greater than 10 minutes.
In the prior art, the subscription condition is only a simple superposition of a limited number of second atomic conditions, which is equivalent to the and combination of the limited number of second atomic conditions, and the second atomic conditions cannot be combined in other complex forms, so that a complete combination specification of the atomic conditions cannot be formed, and diversified and differentiated subscription requirements of different subscribers cannot be expressed.
In fact, for the subscription requirement of the subscriber two, the existing publish-subscribe mechanism cannot be accurately described. As can be seen from fig. 6, the power consumption difference of zhang three exceeds 100 in 20150501 to 20150502, which satisfies the waste alert notification, but the alert will not be notified under the existing publish-subscribe mechanism, which results in the necessary event not being notified, and thus the subscription requirement of the subscriber two will not be satisfied.
In the event notification method provided in the embodiment of the present invention, the subscription requirement of the second subscriber can be expressed as: today meter reading-yesterday meter reading >100, or NOT (today meter reading-yesterday meter reading < ═ 100).
Likewise, existing publish-subscribe mechanisms will not accurately describe the subscription requirements of subscribers three and four. In the event notification method provided in the embodiment of the present invention, the subscription condition of the subscriber three may be represented by a composite subscription condition three as: (connection parameter ═ three-phase three-wire) AND (imbalance > 30%) AND ((phase 1 current >0.05A) OR (phase 2 current >0.05A) OR (phase 3 current >0.05A)) AND (duration >10 minutes). The subscription condition of the subscriber four can be expressed as: (connection parameter ═ three-phase four-wire) AND (imbalance > 50%) AND ((phase 1 current >0.1A) OR (phase 2 current >0.1A) OR (phase 3 current >0.1A)) AND (duration >10 minutes).
Therefore, compared with the prior art, in the event notification method provided by the embodiment of the invention, the composite subscription condition is NOT limited to simple superposition of the first atomic condition, AND the first atomic condition can be subjected to multiple nested combination through logical relations of "AND", "OR" AND "NOT", so that a complete combination specification of the atomic conditions can be formed, the subscription conditions have rich expression forms, the types of the subscription conditions capable of being expressed are enlarged, AND diversified AND complicated subscription requirements of subscribers can be better described.
102. And if the server determines that the updated resources of the publisher meet the subscription conditions, notifying the updated events corresponding to the resources of the publisher to the addresses of the subscribers corresponding to the subscription conditions.
If the updated publisher resource meets the subscription condition in the publisher resource, the server may notify the address of the subscriber corresponding to the subscription condition of the event corresponding to the updated publisher resource. It should be noted that one or more addresses of subscribers corresponding to the subscription conditions may be used. The address of the subscriber is used to identify the location of the subscriber, and may be, for example, a Uniform Resource Identifier (URI).
For example, if a weather instance 4 is newly created in the container resource shown in fig. 5, and the weather instance 4 may specifically refer to fig. 7, since the created weather instance 4 is a resource that meets the composite subscription condition one, the server may further notify the event corresponding to the weather instance 4 to the address of the subscriber corresponding to the composite subscription condition one after creating the weather instance 4. Illustratively, the server may notify the address of subscriber one of the following events: the Shanghai weather bureau 08:20 issues, the highest temperature in Shanghai city is 34 ℃, and the wind power is 4-grade.
In the event notification method provided in the foregoing embodiment of the present invention, when the resource of the publisher is updated, if the server determines that the updated resource of the publisher satisfies the subscription condition, the server notifies the address of the subscriber corresponding to the subscription condition of the event corresponding to the updated resource of the publisher. The subscription condition may include a composite subscription condition, and the composite subscription condition may include at least one first atomic condition. The first atomic condition in the composite subscription condition can be a condition corresponding to the resource identifier, or a condition corresponding to the resource attribute, as the second atomic condition in the prior art, and can also be a condition corresponding to the data content of the resource instance, and different first atomic conditions can be combined in a nested manner through a logical relationship of and, or not, unlike the prior art, only a limited number of second atomic conditions can be simply superposed, so that the subscription requirement of the subscriber on the data content of the resource instance can be met, the content range which can be described by the atomic condition in the subscription condition is expanded, and the number and the types of the original sub conditions in the subscription condition are expanded, thereby meeting the diversified and personalized subscription requirement of the subscriber.
Further, the resource in the server may further include at least one processing rule resource, and the resource of the publisher in the server may include at least one subscription resource. Each processing rule resource may correspond to at least one subscription resource. The processing rule resource may include a processing rule and at least one composite subscription condition. Each subscription resource comprises a first subscription condition attribute, and the first subscription condition attribute corresponds to at least one composite subscription condition in the processing rule resource.
It should be noted that, in the embodiment of the present invention, a specific location of the processing rule resource in the server is not limited. For example, the node where the processing rule resource is located may be a child node of the root node of the server, so that the processing rule resource may correspond to subscription resources included in resources of all publishers in the publish-subscribe interaction platform. Alternatively, referring to fig. 8, the node where the processing rule resource is located may also be a child node of a resource node corresponding to a publisher, so as to correspond to a subscription resource included in the resource of the publisher.
On this basis, the server determining whether the updated publisher's resource satisfies the subscription condition in step 101 may include: and the server respectively determines whether the updated resources of the publisher meet each composite subscription condition corresponding to the first subscription condition attribute according to the processing rule.
The server notifies the updated event corresponding to the resource of the publisher to the address of the subscriber corresponding to the subscription condition in step 102, which may include: and if the updated resources of the publisher meet any composite subscription condition corresponding to the first subscription condition attribute in the subscription resources, notifying the updated events corresponding to the resources of the publisher to the address of the subscriber corresponding to the any composite subscription condition.
Thus, the server can describe various subscription requirements by subscribing to one of the first subscription resource attributes in the resource. Specifically, the server may determine, one by one, whether the updated publisher resource satisfies each composite subscription condition corresponding to the first subscription condition attribute in each subscription resource included in the publisher resource according to the processing rule, so as to perform event notification when the determination is satisfied.
For any one of the first subscription condition attributes, referring to the flowchart shown in fig. 9, the first subscription condition attribute corresponds to N (positive integer) composite subscription conditions, the server may determine, according to the processing rule, whether the updated publisher resource satisfies an ith composite subscription condition corresponding to the first subscription condition attribute, where i takes a value from 1, and if so, the server notifies the updated event to an address of the ith subscriber corresponding to the subscription condition, and determines whether i is less than N; if not, the server directly determines if i is less than N. If i is greater than or equal to N, ending the flow; and if i is smaller than N, adding 1 to i, and determining whether the updated resources of the publisher meet the ith composite subscription condition corresponding to the first subscription condition attribute until i is larger than or equal to N.
Furthermore, the subscription resource may further include a first address attribute, where addresses of at least one group of subscribers are stored in the first address attribute, and the address of each group of subscribers corresponds to one composite subscription condition corresponding to the first subscription condition attribute. The notifying, by the server, the event corresponding to the updated resource of the publisher to the address of the subscriber corresponding to any composite subscription condition may include: and notifying the updated event corresponding to the resource of the publisher to the addresses of a group of subscribers corresponding to any composite subscription condition in the first address attribute.
In this case, the server may describe the subscription requirements of multiple groups of subscribers through one first subscription resource attribute, and when the updated resource of the publisher meets the subscription requirements of a certain group of subscribers, notify the group of subscribers of the corresponding event, and the other groups of subscribers in the subscription resource do not receive the event notification. For example, when the first subscription condition attribute corresponds to N composite subscription conditions, the first address attribute stores addresses of N groups of subscribers, the address of the ith group of subscribers corresponds to the ith composite subscription condition, and when the server determines that the updated publisher resource satisfies the ith composite subscription condition, the server only notifies the address of the ith group of subscribers of an event corresponding to the updated publisher resource.
In one possible implementation, referring to fig. 10, the first subscription condition attribute in the subscription resource corresponds to a composite subscription condition in the processing rule resource. At this point, the first address attribute holds the addresses of a group of subscribers.
In one possible implementation, referring to fig. 11, a first subscription condition attribute in a subscription resource corresponds to a plurality of composite subscription conditions in a processing rule resource. In this case, the first subscription condition attribute may be a list (list) type, where the first address attribute stores addresses of multiple groups of subscribers, or may be a list type, where the list type is denoted by "L" in fig. 11.
In addition, in the embodiment of the present invention, the processing rule resource may include a processing rule and a composite subscription condition, and the specific implementation form of the processing rule resource may be various.
For example, referring to fig. 12, in one possible implementation, the processing rule resource may include a composite subscription condition attribute, a policy tag attribute, a resolution rule attribute, and a matching rule attribute. Wherein, at least one composite subscription condition is stored in the composite subscription condition attribute. At least one label is stored in the strategy label attribute, and each label corresponds to one composite subscription condition in the composite subscription condition attributes. And the analysis rule attribute stores an analysis rule for analyzing the composite subscription condition in the composite subscription condition attribute. The matching rule attribute stores a matching rule, and the matching rule is used for judging whether the updated publisher resources are matched with the composite subscription conditions in the composite subscription condition attribute. The processing rules include parsing rules and matching rules.
Illustratively, in another possible implementation, the processing rule resource includes a mapping list attribute, a parsing rule attribute, and a matching rule attribute. Wherein, the mapping list attribute stores at least one composite subscription condition, at least one label, and a one-to-one mapping relationship between the composite subscription condition and the label. And the analysis rule attribute stores an analysis rule for analyzing the composite subscription condition in the composite subscription condition attribute. The matching rule attribute stores a matching rule, and the matching rule is used for judging whether the updated publisher resources are matched with the composite subscription conditions in the composite subscription condition attribute. The processing rules include parsing rules and matching rules.
Wherein, the label in the processing rule resource can have a plurality of representation forms. For example, in one possible implementation, the content of the tag is a composite subscription condition; in another possible implementation manner, the content of the tag is a number corresponding to the composite subscription condition; in another possible implementation manner, when only one composite subscription condition is included in the composite subscription condition attribute of the processing rule resource, the content of the tag is an address corresponding to the processing rule resource.
When the processing rule resource includes a tag, one possible implementation manner is that the first subscription condition attribute stores at least one tag in the processing rule resource. The server respectively determines whether the updated publisher resource meets each composite subscription condition corresponding to the first subscription condition attribute according to the processing rule, and the method comprises the following steps: and the server respectively determines whether the updated resources of the publisher meet each composite subscription condition corresponding to each label in the first subscription condition attribute according to the analysis rule and the matching rule.
Still further, referring to fig. 13, the subscribed resource may further include a second subscription condition attribute. The second subscription condition attribute may include at least one second atomic condition, where the second atomic condition includes a second resource identifier or a condition corresponding to the second resource attribute, and the subscription condition further includes at least one second atomic condition included in the second subscription condition attribute. The server determining whether the updated publisher's resources satisfy the subscription condition further comprises: the server determines whether the updated publisher's resource satisfies each of the second atomic conditions included in the second subscription condition attribute in the subscription resource. The step of notifying the updated event corresponding to the resource of the publisher to the address of the subscriber corresponding to the subscription condition by the server comprises the following steps: if the updated publisher resource meets any composite subscription condition corresponding to the first subscription condition attribute in the subscription resources and meets each second atomic condition included in the second subscription condition attribute, the server notifies the updated publisher resource event to the address of the subscriber corresponding to any composite subscription condition.
When the subscription resource comprises the first subscription condition attribute and the second subscription condition attribute, the subscription condition comprises at least one composite subscription condition corresponding to the first subscription condition attribute and at least one second atomic condition contained in the second subscription condition attribute. The process of the server determining whether the updated publisher's resources satisfy the subscription conditions includes determining whether the updated publisher's resources satisfy: at least one second atomic condition in the second subscription condition attributes and at least one composite subscription condition corresponding to the first subscription condition attributes.
In this possible implementation manner, referring to the flowchart shown in fig. 14, the server may first determine, according to the processing rule, whether the updated resource of the publisher meets each second atomic condition in the second subscription condition attribute, and if not, end the process; if so, the server may perform event notification according to the flow shown in fig. 9.
Still further, referring to fig. 15, when the second subscription condition attribute is included in the subscribed resource, the subscribed resource may further include a second address attribute. The second address attribute stores addresses of a group of subscribers corresponding to at least one second atomic condition in the second subscription condition attribute. The server notifies the updated event corresponding to the resource of the publisher to the address of the subscriber corresponding to the subscription condition, and the method further includes: and if the updated publisher resource does not meet each composite subscription condition corresponding to the first subscription condition attribute and meets each second atomic condition in the second subscription condition attribute, notifying the updated publisher resource event corresponding to the updated publisher resource to the address of the group of subscribers in the second address attribute.
In addition, it should be noted that, in the prior art, each subscription resource may include an eventnotificationcriterion attribute and a notifiationuri attribute. Wherein, at least one second atomic condition is stored in the eventnotiationcriterion attribute, which is equivalent to the second subscription condition attribute in the embodiment of the present invention. The notifiationuri attribute stores therein addresses of a group of subscribers, which corresponds to the second address attribute in the embodiment of the present invention.
When the subscription resource in the embodiment of the present invention does not include the second subscription condition attribute and the second address attribute, but includes a first subscription condition attribute and a first address attribute, the first subscription condition attribute may be a replacement attribute of the eventnotiationcriterion attribute, and the first address attribute may be a replacement attribute of the notifiationuri attribute. In a specific implementation, the eventnotiationcriterion attribute may be modified to be the first subscription condition attribute, and the notifiationuri attribute may be modified to be the first address attribute.
When the subscription resource in the embodiment of the present invention does not include the second address attribute, but includes a first subscription condition attribute, a second subscription condition attribute, and a first address attribute, and the first subscription condition attribute corresponds to a composite subscription condition, the second subscription condition attribute may be an eventnotification criterion attribute in the prior art, and the first address attribute may be a notifiationuri attribute in the prior art.
Still further, referring to fig. 16, the event notification method provided in the embodiment of the present invention may further include:
103. the server receives the service information published by the publisher.
104. And the server updates the resources of the publisher according to the service information.
In addition, the subscription condition in step 101 may specifically be that the server receives subscription indication information of the subscriber and determines according to the subscription indication information, or that the server is preset according to the subscription requirement of the subscriber.
When the subscription condition is that the server determines according to the subscription indication information of the subscriber, the method may further include:
105. and the server receives subscription indication information sent by the subscriber.
106. And the server determines subscription conditions according to the subscription indication information.
In addition, the weather forecast scenario and the intelligent meter reading scenario are only illustrations of applicable scenarios of the method provided by the embodiment of the present invention, and the method may also be applied to other scenarios such as a customer notification service application scenario, which are not illustrated here.
As shown in fig. 17, an embodiment of the present invention further provides a schematic structural diagram of a server 1700. The server 1700 includes a determination unit 1701 and a notification unit 1702. The determining unit 1701 is configured to, when a resource of a publisher in the server 1700 is updated, determine whether the updated resource of the publisher meets a subscription condition, where the subscription condition includes a composite subscription condition, the composite subscription condition includes at least one first atomic condition, the first atomic condition is a condition corresponding to a resource identifier, a resource attribute, or data content of a resource instance, and the first atomic conditions in the composite subscription condition are combined through a logical relationship, where the logical relationship includes "and", "or", or "not";
the notifying unit 1702 is configured to, if it is determined that the updated resource of the publisher meets the subscription condition, notify the address of the subscriber corresponding to the subscription condition of the event corresponding to the updated resource of the publisher.
In addition, the determining unit 1701 and the notifying unit 1702 may also be configured to execute the processes in fig. 9 and 14, and the server 1700 shown in fig. 17 may be configured to execute any process executed by the server 1700 in the method processes shown in fig. 4, 9, 14 and 16, and the embodiment of the present invention is not described in detail herein.
Further, the server 1700 in fig. 17 is presented in the form of a functional unit. An "element" may refer to an application-specific integrated circuit (ASIC), an electronic circuit, a processor and memory that execute one or more software or firmware programs, an integrated logic circuit, and/or other devices that may provide the described functionality. In a simple embodiment, those skilled in the art will appreciate that the server 1700 in FIG. 17 may take the form shown in FIG. 18. The units may be implemented by the processor and memory of fig. 18.
Fig. 18 is a schematic structural diagram of another server 1800 according to an embodiment of the present invention. The server 1800 may include a plurality of ports 1804 coupled to a transceiver 1803. The transceiver 1803 may be a transmitter, a receiver, or a combination thereof, and may also be a communication interface for sending or receiving data packets from other network nodes via the port 1804. The processor 1801 is coupled to the transceiver 1803 for processing data packets. The processor 1801 may include one or more multi-core processors and/or memory 1802. The processor 1801 may be a general purpose processor, an Application Specific Integrated Circuit (ASIC), or a Digital Signal Processor (DSP).
The memory 1802 may be a non-transitory storage medium coupled to the processor 1801 for storing various types of data, and the like. Memory 1802 may include a Read Only Memory (ROM), a Random Access Memory (RAM), or other type of dynamic storage device that may store information and instructions, and may also be a disk memory. Memory 1802 may be used to store instructions related to implementing an event notification method. It is to be appreciated that the executable instructions can be at least one of programmed or loaded into the processor 1801, cached and stored for long periods of time of the server 1800.
The server 1800 shown in FIG. 18 may implement one or more instructions to execute to trigger the event notification method according to embodiments of the invention. These instructions may be stored in the memory 1802 or may be integrated into the kernel of the network element's operating system or a plug-in to the kernel. Additionally, memory 1802, also for storing computer executable program code; the program code includes instructions that, when executed by a processor, cause the server 1800 to: when the resources of the publisher in the server are updated, determining whether the updated resources of the publisher meet subscription conditions; the subscription conditions comprise composite subscription conditions, the composite subscription conditions comprise at least one first atomic condition, the first atomic condition is a condition corresponding to a first resource identifier, a first resource attribute or data content of a resource instance, the first atomic conditions in the composite subscription conditions are combined through a logical relationship, and the logical relationship comprises AND, OR or NOT; and if the updated resources of the publisher meet the subscription conditions, notifying the updated events corresponding to the resources of the publisher to the addresses of the subscribers corresponding to the subscription conditions.
Embodiments of the present invention also provide a computer storage medium for storing computer software instructions for the server shown in fig. 17 or fig. 18, which includes a program designed to execute the above method embodiments. Notification of events may be accomplished by executing stored programs.
An embodiment of the present invention further provides a communication system, which may include a publisher, a subscriber, and the server described in the foregoing apparatus embodiment, and a schematic architecture diagram of the communication system may refer to fig. 1. Wherein the subscriber, the publisher and the server in the system are used for executing relevant steps in the method flows shown in fig. 4-16.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. An event notification method, comprising:
the resources in the server comprise at least one processing rule resource, and the resources of the publisher in the server comprise at least one subscription resource; each processing rule resource corresponds to at least one subscription resource and comprises a processing rule and at least one composite subscription condition; each subscription resource comprises a first subscription condition attribute, and the first subscription condition attribute corresponds to at least one composite subscription condition in the processing rule resource;
when the resources of the publisher in the server are updated, respectively determining whether the updated resources of the publisher meet each composite subscription condition corresponding to the first subscription condition attribute according to the processing rule; the composite subscription condition comprises at least one first atomic condition, the first atomic condition is a condition corresponding to a first resource identifier, a first resource attribute or data content of a resource instance, the first atomic conditions in the composite subscription condition are combined through a logical relationship, and the logical relationship comprises 'AND', 'OR' or 'NOT';
and if the updated resources of the publisher meet any composite subscription condition corresponding to the first subscription condition attribute in the subscription resources, notifying the updated events corresponding to the resources of the publisher to the address of the subscriber corresponding to the any composite subscription condition.
2. The method of claim 1, wherein the publisher's resources include a state identification attribute, the method further comprising:
and when the state identification attribute changes, determining that the resource of the publisher is updated.
3. The method according to claim 1, wherein the subscription resource further includes a first address attribute, the first address attribute stores addresses of at least one group of subscribers, and the addresses of each group of subscribers respectively correspond to one composite subscription condition corresponding to the first subscription condition attribute;
the notifying the updated event corresponding to the resource of the publisher to the address of the subscriber corresponding to the arbitrary composite subscription condition includes:
and notifying the updated event corresponding to the resource of the publisher to the addresses of a group of subscribers corresponding to the arbitrary composite subscription condition in the first address attribute.
4. The method of claim 1, wherein the subscription resource further comprises a second subscription condition attribute, wherein the second subscription condition attribute comprises at least one second atomic condition, wherein the second atomic condition comprises a second resource identifier or a condition corresponding to a second resource attribute, and wherein the subscription condition further comprises the at least one second atomic condition included in the second subscription condition attribute;
the determining whether the updated publisher's resources satisfy the subscription condition further includes:
determining whether the updated publisher's resource satisfies each second atomic condition included in the subscription resource, the second subscription condition attribute;
the notifying the updated event corresponding to the resource of the publisher to the address of the subscriber corresponding to the subscription condition includes:
and if the updated publisher resource meets any composite subscription condition corresponding to the first subscription condition attribute in the subscription resources and meets each second atomic condition included in the second subscription condition attribute, notifying an event corresponding to the updated publisher resource to the address of the subscriber corresponding to the any composite subscription condition.
5. A server, wherein the resources in the server comprise at least one processing rule resource, and wherein the resources of the publisher in the server comprise at least one subscription resource; each processing rule resource corresponds to at least one subscription resource and comprises a processing rule and at least one composite subscription condition; each subscription resource comprises a first subscription condition attribute, and the first subscription condition attribute corresponds to at least one composite subscription condition in the processing rule resource; the server includes:
the determining unit is configured to determine whether the updated publisher resource satisfies a subscription condition when the publisher resource in the server is updated, and includes: respectively determining whether the updated resources of the publisher meet each composite subscription condition corresponding to the first subscription condition attribute according to the processing rule; the subscription conditions comprise composite subscription conditions, the composite subscription conditions comprise at least one first atomic condition, the first atomic condition is a condition corresponding to a first resource identifier, a first resource attribute or data content of a resource instance, the first atomic conditions in the composite subscription conditions are combined through a logical relationship, and the logical relationship comprises AND, OR or NOT;
and the notification unit is used for notifying the updated event corresponding to the resource of the publisher to the address of the subscriber corresponding to the any composite subscription condition if the updated resource of the publisher meets any composite subscription condition corresponding to the first subscription condition attribute in the subscription resource.
6. The server according to claim 5, wherein the resource of the publisher includes a state identification attribute, and the determining unit is specifically configured to:
and when the state identification attribute changes, determining that the resource of the publisher is updated.
7. The server according to claim 5, wherein the subscription resource further includes a first address attribute, the first address attribute stores addresses of at least one group of subscribers, and the addresses of each group of subscribers respectively correspond to one composite subscription condition corresponding to the first subscription condition attribute;
the notifying unit is configured to notify the updated event corresponding to the resource of the publisher to the address of the subscriber corresponding to the arbitrary composite subscription condition, where the notifying unit is configured to specifically include:
and notifying the updated event corresponding to the resource of the publisher to the addresses of a group of subscribers corresponding to the arbitrary composite subscription condition in the first address attribute.
8. The server according to claim 5, wherein the subscription resource further includes a second subscription condition attribute, the second subscription condition attribute includes at least one second atomic condition, the second atomic condition includes a second resource identifier or a condition corresponding to a second resource attribute, and the subscription condition further includes the at least one second atomic condition included in the second subscription condition attribute;
the determining unit is configured to determine whether the updated publisher's resource satisfies the subscription condition, and further includes:
determining whether the updated publisher's resource satisfies each second atomic condition included in the subscription resource, the second subscription condition attribute;
the notification unit is specifically configured to:
and if the updated publisher resource meets any composite subscription condition corresponding to the first subscription condition attribute in the subscription resources and meets each second atomic condition included in the second subscription condition attribute, notifying an event corresponding to the updated publisher resource to the address of the subscriber corresponding to the any composite subscription condition.
CN201610915406.1A 2016-10-20 2016-10-20 Event notification method and server Active CN107968805B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610915406.1A CN107968805B (en) 2016-10-20 2016-10-20 Event notification method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610915406.1A CN107968805B (en) 2016-10-20 2016-10-20 Event notification method and server

Publications (2)

Publication Number Publication Date
CN107968805A CN107968805A (en) 2018-04-27
CN107968805B true CN107968805B (en) 2020-10-27

Family

ID=61997244

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610915406.1A Active CN107968805B (en) 2016-10-20 2016-10-20 Event notification method and server

Country Status (1)

Country Link
CN (1) CN107968805B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111245875B (en) * 2018-11-28 2022-03-04 京东方科技集团股份有限公司 Event notification method, device, apparatus and computer storage medium
CN111436027B (en) 2019-01-14 2023-06-20 京东方科技集团股份有限公司 Event subscription notification method, server, internet of things system and storage medium
CN111629018B (en) * 2019-02-28 2022-07-08 Oppo广东移动通信有限公司 Resource synchronization method, device, equipment and storage medium
CN112218272A (en) * 2019-07-10 2021-01-12 大唐移动通信设备有限公司 Event subscription method, device and equipment
CN112511579A (en) * 2019-09-16 2021-03-16 京东方科技集团股份有限公司 Event notification method, system, server device, computer storage medium
CN114328156B (en) * 2021-12-28 2023-06-16 苏州万店掌网络科技有限公司 Health detection method, device and equipment of protocol port and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251860A (en) * 2008-03-10 2008-08-27 北京航空航天大学 Web information publish administrating system and method
CN101431462A (en) * 2007-11-07 2009-05-13 周磊 Method for collecting public feedback information at any moment
CN101848236A (en) * 2010-05-06 2010-09-29 北京邮电大学 Real-time data distribution system with distributed network architecture and working method thereof
CN102789491A (en) * 2012-07-03 2012-11-21 河海大学 Configurable data subscribing and publishing system and method thereof
CN103227803A (en) * 2012-01-30 2013-07-31 华为技术有限公司 Internet of thing resource obtaining method, client and internet of thing resource devices
CN104243611A (en) * 2014-09-30 2014-12-24 浪潮软件股份有限公司 Distribution thought based message service middleware system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431462A (en) * 2007-11-07 2009-05-13 周磊 Method for collecting public feedback information at any moment
CN101251860A (en) * 2008-03-10 2008-08-27 北京航空航天大学 Web information publish administrating system and method
CN101848236A (en) * 2010-05-06 2010-09-29 北京邮电大学 Real-time data distribution system with distributed network architecture and working method thereof
CN103227803A (en) * 2012-01-30 2013-07-31 华为技术有限公司 Internet of thing resource obtaining method, client and internet of thing resource devices
CN102789491A (en) * 2012-07-03 2012-11-21 河海大学 Configurable data subscribing and publishing system and method thereof
CN104243611A (en) * 2014-09-30 2014-12-24 浪潮软件股份有限公司 Distribution thought based message service middleware system

Also Published As

Publication number Publication date
CN107968805A (en) 2018-04-27

Similar Documents

Publication Publication Date Title
CN107968805B (en) Event notification method and server
US11368522B2 (en) Lightweight IoT information model
EP2892251B1 (en) System and method for machine-to-machine communication
CN110310034B (en) Service arrangement and business flow processing method and device applied to SaaS
US10880785B2 (en) Resource obtaining method and related device
CN111130825B (en) Network slice template generation method, device, equipment and storage medium
US7921427B2 (en) Method and system for processing messages in an application cluster
CN109905431B (en) Message processing method and system, storage medium and electronic equipment
WO2020112793A2 (en) Framework for dynamic brokerage and management of topics and data at the service layer
CN113377626B (en) Visual unified alarm method, device, equipment and medium based on service tree
US10219133B2 (en) Notification message transmission method and device, and computer storage medium
EP3570567B1 (en) Method and device for operating instance resources
Badidi et al. A cloud-based approach for context information provisioning
KR102601628B1 (en) Resource processing methods and systems, storage media, electronic devices
US20220256007A1 (en) Method, apparatus, and device for subscribing resources in field of internet of things, and storage medium
CN106790323B (en) Resource discovery method and device
CN114390015A (en) Data pushing system, method and equipment based on object model and storage medium
CN105025459B (en) Resource notification method and system, local CSE and remote CSE
CN106844502B (en) Data consistency processing method and equipment
US20230333836A1 (en) System to identify and characterize code changes
CN116708024B (en) Threat information collision screening method, gateway system, electronic device and storage medium
CN110868452B (en) Data transmission method and system
US9430514B1 (en) Locking metadata associated with catalog items
US20230038513A1 (en) Interface display method and device, storage medium, and electronic device
CN113296832A (en) Data processing method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant