CN105656971A - Method, device and system for building message subscription relation between nodes - Google Patents
Method, device and system for building message subscription relation between nodes Download PDFInfo
- Publication number
- CN105656971A CN105656971A CN201410682390.5A CN201410682390A CN105656971A CN 105656971 A CN105656971 A CN 105656971A CN 201410682390 A CN201410682390 A CN 201410682390A CN 105656971 A CN105656971 A CN 105656971A
- Authority
- CN
- China
- Prior art keywords
- message
- node
- source sending
- identify
- sending node
- 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.)
- Granted
Links
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses and provides a method, device and system for building a message subscription relation between nodes. The method, the device and the system are used for solving the problems in the prior art that the business logic organization is fixed, the extension is difficult and an Internet of Things information isolated island is liable to be formed. The method comprises that a first node receives a first message pushed by a control server; whether the first message can be identified is judged; whether the first node and the source sending node of the first message have a message subscription relation is judged; when judging that the first message can be identified and the first node and the source sending node of the first message have no message subscription relation, the message subscription relation between the first node and the source sending node of the first message is built; when judging that the first message can be identified and the first node and the source sending node of the first message have the message subscription relation, or when judging that the first message cannot be identified, the first message is forwarded to the control server; and the control server continues to push the first message to other nodes except the first node.
Description
Technical field
The present invention relates to technology of Internet of things field, particularly relate to the methods, devices and systems setting up message subscribing relation between a kind of node.
Background technology
The communication connection that the internet of things service logic that existing technology of Internet of things has normally been imagined in advance according to planner is come between hoc apparatus and Message Transmission. Such as, an automatic Lighting Control Assembly is made up of three equipment, and one for detecting the controller of the switches such as the optical sensor of intensity of illumination in room, a biosensor whether having people in room for detecting and a control illumination. The business logic of planner's imagination is for when having people and intensity of illumination in room lower than opening illumination during threshold value, closing illumination when no-one is present in the house. So mode of connection and message transmission between equipment just determine with reception mechanism. Existing thing working application is all set up in this way. This kind of method is no doubt simple, but it also brings, and business logic tissue is fixing, the problem of expansion difficulty, very easily formation networked information isolated island.
Summary of the invention
The embodiment of the present invention provides the methods, devices and systems setting up message subscribing relation between a kind of node, and in order to solve in prior art, the business logic tissue existed is fixing, the problem of expansion difficulty, very easily formation networked information isolated island.
The embodiment of the present invention is by the following technical solutions:
Embodiments provide a kind of method setting up message subscribing relation between node, comprising:
First node receives the first message that Control Server pushes;
According to the type of message that can identify pre-set, judge whether to identify described first message, and whether the source sending node of described first node and described first message exists message subscribing relation;
When judging to identify described first message, and when the source sending node of described first node and described first message does not exist message subscribing relation, set up the message subscribing relation of the source sending node with described first message;
When judging to identify described first message, and there is message subscribing relation in the source sending node of described first node and described first message, or when judging to identify described first message, described first message is forwarded to described Control Server, by described Control Server, described first message is continued other node being pushed to except described first node, enable other node described by judging whether to identify described first message, and whether the source sending node of self and described first message exists message subscribing relation and determines whether that the source sending node with described first message sets up message subscribing relation.
Optionally, judge whether to identify described first message, specifically comprise:
When can correctly resolve described first message, and obtain the source sending node of described first message, and when the message of described reception meets any one condition following, it is determined that described first message can be identified;Otherwise, it is determined that described first message can not be identified;
Described condition comprises: the state that described first message can trigger described first node changes, can trigger described first node performs specific action and can trigger described first node to issue new message.
Optionally, judge whether the source sending node of described first node and described first message exists message subscribing relation, specifically comprise:
When obtaining the source sending node of described first message, source sending node according to described first message obtained, and prestore with the subscription object that self there is message subscribing relation, judge whether the source sending node of described first node and described first message exists message subscribing relation;
When obtaining the source sending node less than described first message, it is determined that the source sending node of described first node and described first message does not exist message subscribing relation.
Optionally, when judging to identify described first message, and there is message subscribing relation in the source sending node of described first node and described first message, or when judging to identify described first message, described first message is forwarded to described Control Server, specifically comprises:
When judging to identify described first message, and when the source sending node of described first node and described first message exists message subscribing relation, described first message is forwarded to described Control Server with the first probability;
When judging to identify described first message, and when the source sending node of described first node and described first message exists message subscribing relation, described first message is forwarded to described Control Server with the 2nd probability;
When judging to identify described first message, and when the source sending node of described first node and described first message does not exist message subscribing relation, described first message is forwarded to described Control Server with the 4th probability;
Wherein, described first probability is greater than described 2nd probability, and described 2nd probability is greater than described 4th probability.
Optionally, when judging to identify described first message, and when the source sending node of described first node and described first message exists message subscribing relation, described method also comprises:
According to the quantity of preset rules record from the message that can not identify of the source sending node of described first message; Wherein, described preset rules comprises: when receiving from the message that can identify of the source sending node of described first message, described quantity initialize made zero; When receiving from the message that can not identify of the source sending node of described first message, described quantity is added 1;
When described quantity reaches predetermined threshold value, release the message subscribing relation of the source sending node with described first message.
Optionally, after the message subscribing relation of the source sending node of foundation and described first message, described method also comprises:
Described first message is forwarded to described Control Server with the 3rd probability; Wherein, described 3rd probability equals described first probability.
Embodiments provide a kind of method setting up message subscribing relation between node, comprising:
Control Server receives the first message that source sending node is first node;
Described first message push is given other node except described first node by described Control Server, enable other node described by judging whether self can identify described first message, and whether self and described first node exist message subscribing relation and determine whether to set up message subscribing relation with described first node.
Optionally, other node described comprises:
The node of message subscribing relation is there is with a upper transmission side of described first message, and except the part of nodes in described first node and the node except there is the node of message subscribing relation with described first node.
Embodiments provide the device setting up message subscribing relation between a kind of node, comprising:
Receive unit, for receiving the first message that Control Server pushes;
Judging unit, for judging whether the first message that can identify that described reception unit receives, and whether the source sending node of described device and described first message exists message subscribing relation;
Message subscribing relation sets up unit, for judging to identify described first message when described judging unit, and the source sending node of described device and described first message is not when existing message subscribing relation, set up the message subscribing relation of the source sending node of described device and described first message;
First retransmission unit, for judging to identify described first message when described judging unit, and there is message subscribing relation in the source sending node of described device and described first message, or when judging to identify described first message, described first message is forwarded to described Control Server, by described Control Server, described first message is continued other node being pushed to except described device, enable other node described by judging whether to identify described first message, and whether the source sending node of self and described first message exists message subscribing relation and determines whether that the source sending node with described first message sets up message subscribing relation.
Optionally, described judging unit, specifically for:
When can correctly resolve described first message, and obtain the source sending node of described first message, and when the message of described reception meets any one condition following, it is determined that described first message can be identified; Otherwise, it is determined that described first message can not be identified;
Described condition comprises: the state that described first message can trigger described device changes, can trigger described device performs specific action and can trigger described device to issue new message.
Optionally, described judging unit, specifically for:
When obtaining the source sending node of described first message, source sending node according to described first message obtained, and prestore with the subscription object that self there is message subscribing relation, judge whether the source sending node of described device and described first message exists message subscribing relation;
When obtaining the source sending node less than described first message, it is determined that the source sending node of described device and described first message does not exist message subscribing relation.
Optionally, described first retransmission unit, specifically comprises:
First forwarding module, judges to identify described first message for working as, and when the source sending node of described device and described first message exists message subscribing relation, forwards to described Control Server by described first message with the first probability;
2nd forwarding module, judges to identify described first message for working as, and when the source sending node of described device and described first message exists message subscribing relation, forwards to described Control Server by described first message with the 2nd probability;
3rd forwarding module, judges to identify described first message for working as, and when the source sending node of described device and described first message does not exist message subscribing relation, forwards to described Control Server by described first message with the 4th probability;Wherein, described first probability is greater than described 2nd probability, and described 2nd probability is greater than described 4th probability.
Optionally, described device also comprises:
Record cell, judges to identify described first message for working as, and when the source sending node of described device and described first message exists message subscribing relation, records the quantity of the message that can not identify of the source sending node from described first message; Wherein, described quantity meets: when receiving from the message that can identify of the source sending node of described first message, described quantity initialize made zero; When receiving from the message that can not identify of the source sending node of described first message, described quantity is added 1;
Message subscribing relation broken unit, for when the quantity of described recording unit records reaches predetermined threshold value, releasing the message subscribing relation of the source sending node of described device and described first message.
Optionally, described device also comprises:
2nd retransmission unit, for set up described device and described first node message subscribing relation after, described first message is forwarded to described Control Server with the 3rd probability; Wherein, described 3rd probability equals described first probability.
Embodiments provide the device setting up message subscribing relation between a kind of node, comprising:
Receive unit, for receiving the first message that source sending node is first node;
Push unit, other node except described first node is given for the first message push of being received by described reception unit, enable other node described by judging whether self can identify described first message, and self whether there is message subscribing relation with described first node and determine whether to set up message subscribing relation with described first node.
Optionally, other node described comprises:
The node of message subscribing relation is there is with a upper transmission side of described first message, and except the part of nodes in described first node and the node except there is the node of message subscribing relation with described first node.
Embodiments provide the system setting up message subscribing relation between a kind of node, comprising: Control Server and at least two nodes, wherein:
First node in described at least two nodes, for sending the first message as source sending node to described Control Server;
Described Control Server, for receiving the first message that described first node sends, gives the Section Point except described first node in described at least two nodes by described first message push; And receive the first message of described Section Point transmission, described first message push is given other node except described first node and described Section Point in described at least two nodes;
Section Point in described at least two nodes, for receiving the first message that described Control Server pushes; Judge whether to identify described first message, and with whether described first node exists message subscribing relation; When judging to identify described first message, and and described first node between when there is not message subscribing relation, set up the message subscribing relation with described first node to described Control Server request; When judging to identify described first message, and there is message subscribing relation in the source sending node with described first message, or when judging to identify described first message, forwards described first message to described Control Server.
The useful effect of the embodiment of the present invention is as follows:
In the embodiment of the present invention, by the forwarding of message and node to the recognition capability of the message received, make can automatically set up between node message subscribing relation, thus the business logic organizational form in being networked by existing thing becomes open from closure, business logic during thing is networked is organized automatically with incremental mode, greatly reduces the difficulty of business logical extension in thing networking.
Other features and advantages of the present invention will be set forth in the following description, and, partly become apparent from specification sheets, or understand by implementing the present invention. The object of the present invention and other advantages realize by structure specifically noted in the specification sheets write, claim book and accompanying drawing and obtain.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, forms the part of the present invention, and the schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention. In the accompanying drawings:
The flowchart of the method for message subscribing relation is set up for the embodiment of the present invention between the node of a kind of end side enforcement that Fig. 1 provides;
The flowchart of the method for message subscribing relation is set up for the embodiment of the present invention between the node of a kind of network side enforcement that Fig. 2 provides;
The structural representation of the device of message subscribing relation is set up between the first node that Fig. 3 provides for the embodiment of the present invention;
The structural representation of the device of message subscribing relation is set up between the 2nd kind of node that Fig. 4 provides for the embodiment of the present invention;
The structural representation of the system of message subscribing relation is set up between a kind of node that Fig. 5 provides for the embodiment of the present invention.
Embodiment
The business logic tissue existed to solve in prior art is fixing, the problem of expansion difficulty, very easily formation networked information isolated island, and the scheme of prior art is carefully studied by applicant.
In prior art, first company produce device A cannot automatically and company B production equipment B form business logic, now slip-stick artist to be paid hard work and great amount of cost carries out application integration, equipment C may occur again after the application integration that slip-stick artist completes device A and B, need so again to revise business logic further and bring equipment C into design, when that is adding new equipment every time, business logic between equipment can't independently increase, but needs artificially the business logic in system to be redesigned or revised.
In order to solve the problem, embodiments provide the scheme setting up message subscribing relation between a kind of node. In this technical scheme, by the forwarding of message and node to the recognition capability of the message received, make can automatically set up between node message subscribing relation, thus the business logic organizational form in being networked by existing thing becomes open from closure, business logic during thing is networked is organized automatically with incremental mode, greatly reduces the difficulty of business logical extension in thing networking.
Below in conjunction with Figure of description, embodiments of the invention are described, it will be appreciated that embodiment described herein, only for instruction and explanation of the present invention, is not limited to the present invention. And when not conflicting, embodiment and the feature of embodiment in the present invention can be combined with each other.
Embodiments providing a kind of method setting up message subscribing relation between node based on network side, as shown in Figure 1, the method comprises:
Step 11, Control Server receives the first message that source sending node is first node;
Wherein, the transmit path that the first message arrives Control Server can be divided into following two kinds of situations, wherein:
The first situation: the source sending node of the first message > Control Server, namely directly to reaching, Control Server sends the first message to source sending node, and period there is no other node and forwards;
2nd kind of situation: the source sending node of the first message > Control Server > other forward node > Control Server, the first message namely sent by source sending node, after repeatedly forwarding, is sent to Control Server by forward node.
Step 12, first message push is given other node except first node by Control Server, enable other node by judging whether self can identify the first message, and self whether there is message subscribing relation with first node and determine whether to set up with first node message subscribing relation.
Wherein, other node except first node can be, but not limited to comprise:
The node of message subscribing relation is there is with a upper transmission side of this first message, and except the part of nodes in described first node and the node except there is the node of message subscribing relation with described first node.
Wherein, in the first situation of above-mentioned steps 11, a upper transmission side of this first message is the source sending node of this first message; And in the 2nd kind of situation of above-mentioned steps 11, a upper transmission side of this first message is the forward node of this first message.
In the embodiment of the present invention, by the forwarding of message and node to the recognition capability of the message received, make can automatically set up between node message subscribing relation, thus the business logic organizational form in being networked by existing thing becomes open from closure, business logic during thing is networked is organized automatically with incremental mode, greatly reduces the difficulty of business logical extension in thing networking.
The method setting up message subscribing relation below between node end side realized carries out detail.
As shown in Figure 2, for setting up the principle flow chart of the method for message subscribing relation between the node of a kind of end side realization of embodiment of the present invention offer, specifically comprise the steps:
Step 21, first node receives the first message that Control Server pushes.
Wherein, the transmit path that the first message arrives first node can be divided into following two kinds of situations, wherein:
The first situation: the source sending node of the first message > Control Server > first node, the first message that namely source sending node sends directly is pushed by Control Server and gives first node, and period there is no other node and forwards;
2nd kind of situation: the source sending node of the first message > Control Server > other forward node > Control Server > first node, the first message namely sent by source sending node, after repeatedly forwarding, is just pushed to first node by Control Server.
Step 22, judges whether to identify the first message, and whether the source sending node of first node and the first message exists message subscribing relation.
Concrete, when first node can correctly be resolved this first message and be obtained the source sending node of this first message, and this first message meets any one condition following: the state that the first message can trigger first node changes, the first message can trigger first node and perform specific action and the first message can trigger first node when issuing new message, just can determine that first node can identify this first message; Otherwise determine that first node can not identify this first message.
After obtaining whether identifying the judged result of the first message, if obtaining the source sending node of the first message, then can further according to the source sending node of the first message obtained, and prestore with the subscription object that self there is message subscribing relation, judge whether the source sending node of first node and this first message exists message subscribing relation; If when obtaining the source sending node less than this first message, then determining that the source sending node of first node and this first message does not exist message subscribing relation.
It should be noted that, the transmit path of the first message no matter received is the first situation above-mentioned or above-mentioned 2nd kind of situation, when judging message subscribing relation, it is all the message subscribing relation judged between the source sending node of first node and this first message, instead of the message subscribing relation considered between first node and the forward node of this first message.
Step 23, when first node is judged to identify the first message, and when there is not message subscribing relation between the source sending node of first node and the first message, sets up the message subscribing relation of the source sending node with the first message.
Step 24, when first node is judged to identify described first message, and there is message subscribing relation in the source sending node of first node and the first message, or when judging to identify the first message, first message is forwarded to Control Server, by Control Server, the first message is continued other node being pushed to except first node, enable other node by judging whether to identify the first message, and whether the source sending node of self and the first message exists message subscribing relation and determines whether that the source sending node with the first message sets up message subscribing relation.
Concrete, step 14 can be divided into again following several situation:
1, when first node is judged to identify the 2nd message, and when the source sending node of first node and the first message exists message subscribing relation, the first message is forwarded to Control Server with the first probability;
2, when first node is judged to identify the first message, and when the source sending node of first node and the first message exists message subscribing relation, the first message is forwarded to Control Server with the 2nd probability;
3, when first node is judged to identify the first message, and when the source sending node of first node and the first message does not exist message subscribing relation, the first message is forwarded to Control Server with the 4th probability.
Wherein, the first probability is greater than the 2nd probability, and the 2nd probability is greater than the 4th probability.
Why the first message is forwarded, it is consider system may exist to identify this message, and not yet set up other node of message subscribing relation with the source sending node of the first message.
Why the first probability is greater than the 2nd probability, and the 2nd probability is greater than the 4th probability, is to be limited by the forwarding probability of this first message, this first message can not be gone down by unconfined forwarding. If a message can by certain node recognition, bigger forwarding probability should be obtained when so this message is forwarded by this node, if a message can not by certain node recognition, less forwarding probability should be obtained when so this message is forwarded by this node, therefore can be, but not limited to meet: the first probability is greater than the 2nd probability, the 2nd probability is greater than the 4th probability.
Further, in the 2nd kind of situation of step 24, namely first node is judged to identify the first message, and the source sending node of first node and the first message exists message subscribing relation, now can also comprise the steps:
Record the quantity of the message that can not identify of the source sending node from the first message; Wherein, this quantity can meet: when receiving from the message that can identify of the source sending node of the first message, this quantity initialize is made zero; When receiving from the message that can not identify of the source sending node of the first message, this quantity is added 1.
When the quantity recorded reaches predetermined threshold value, first node just can release the message subscribing relation of the source sending node with the first message.
In addition, after the source sending node of first node and the first message sets up message subscribing relation, the method can also comprise the steps:
First message is forwarded to Control Server with the 3rd probability by first node;
Now, there is message subscribing relation in the source sending node of first node and the first message, and first node can identify this first message, namely identical with the first situation in step 24, and therefore the 3rd probability is equal with above-mentioned first probability.
In the embodiment of the present invention, by the forwarding of message and node to the recognition capability of the message received, make can automatically set up between node message subscribing relation, thus the business logic organizational form in being networked by existing thing becomes open from closure, business logic during thing is networked is organized automatically with incremental mode, greatly reduces the difficulty of business logical extension in thing networking.
Embodiment for a better understanding of the present invention, is described below in conjunction with the concrete specific implementation process to the embodiment of the present invention of implementing.
In above-described embodiment, the system of each node composition can be referred to as the social network of machine (being called for short machine microblogging), this machine microblogging network (abbreviation microblogging) social to the mankind is similar, adopts the mechanism of news release and subscription to transmit message between machine. After a machine A starts, first to be registered on machine microblogging, after completing registration, any message that machine A issues all will be pushed to the bean vermicelli (namely establishing the machine of message subscribing relation with machine A) of machine A by machine microblogging. Any machine Y can require the message subscribing to another machine X by machine microblogging, namely sets up message subscribing relation, it is also possible to require to release message subscribing relation. This is exactly the basic working mechanism of machine microblogging, substantially identical with the mode of operation of mankind's microblogging.
The machine (also referred to as node) being connected to machine microblogging is done below illustrate, to facilitate follow-up elaborating technical scheme. First machine designs realization by planner, and machine exists basic different be from the mankind: the mankind are appreciated that the microblogging information that other people use natural language to issue, but machine can not have the ability to process the message that other machines all are issued. The message that such as Lighting control device person of being designed is designed to understand optical sensor and biosensor is sent, and the message that air-conditioner controller sends cannot be understood. So, the type of message that machine can identify is limited. On the other hand, the type of message that machine can send also is limited, and such as Lighting control device can only be issued message and illustrate that the state of head light opens or closes, and this is also realize determined by the design of machine. But all nodes in machine microblogging have the direct ability forwarding message that remains untouched, such as nodes X have received the message from node Y, although nodes X can not identify this message, but nodes X still can directly forward this message (being again published in machine microblogging by this message, the bean vermicelli of nodes X will receive this message).
The message that so-called node can identify refers to: node M receives the message from nodes X, when meeting following two conditions simultaneously, just illustrates that node M can identify this message.
1) node M can correctly resolve this message, and obtains the source sender of this message;
2) any met below in three:
This message trigger node M is inner, and state changes, this message trigger node M performs specific action and this message trigger node M has issued a new message.
Any two nodes X and Y. Assume that Y have received a message m from XX-> y, whether can identify whether this message and Y pay close attention to X (namely whether Y exists message subscribing relation with X) two dimension degree and 4 kinds of situations can be divided into discuss according to Y, such as following table 1.
Table 1:
In 1st kind of situation, Y can identification message mX-> yAnd Y has paid close attention to again X, illustrate and there is business logic between X and Y or business logic may be set up.Now Y can with probable valueForward this message.
In 2nd kind of situation, Y has paid close attention to X, illustrates and there is business logic between X and Y or may set up business logic; Y can not identification message mX-> y, illustrate that X has part message to be that Y can not identify. For example, the biosensor in room can distinguish humans and animals, and when there being people to enter room, biosensor microblog message publishing " has people " in room, and Lighting control device can identify this message and head light has been carried out control action. When there being pet to enter room, biosensor sends Twitter message " having dog in room ", and Lighting control device can not identify that the implication of this message also can not make any action. Now, Y can record the quantity of the message that can not identify continuously from XAfter Y pays close attention to X,It is initialized as 0, Y and often receives the message that can not identify from X just generalValue add 1, Y often receives the message identified from X and just willValue reset to 0. WhenTime (predetermined threshold value), Y just can release the concern relation between X. Y can with probable valueForward this message.
In 3rd kind of situation, Y can identification message mX-> y, illustrating and business logic between X and Y, may be set up, Y does not pay close attention to X, illustrates and not yet sets up business logic between them. Y first time have received the message that can identify from X, and Y has reason expection completely and can continue to receive the message that can identify from X, so Y can set up the concern relation between X, and with probable valueForward this message. After the concern relation between Y foundation and X, the 3rd kind of situation substantially equals the 1st kind of situation, so
In 4th kind of situation, Y can not identification message mX-> y, Y does not pay close attention to X, illustrates and not yet sets up business logic between Y and X, cannot show that Y and X likely sets up the conclusion of business logic from this message yet. It is contemplated that may there are other nodes can identify this message, so Y can probable valueForward this message.
Below based on above-mentioned four kinds of situations, there is not the original state of any concern relation (i.e. message subscribing relation) from machine microblogging, illustrate the process setting up concern relation between node.
First assume machine microblogging has accessed 4 nodes: A, B, C, D, temporarily do not exist any concern relation between them.
1st step, A has issued the 1st article of message to machine microbloggingNow A is without any bean vermicelli, so carrying out PUSH message according to subscribing relationship, will can receive this message without any a node. Except according to subscribing relationship PUSH message, machine microblogging can also select part of nodes as the reception node of this message at random in other node except the bean vermicelli node of A and A. Assume that the node selected at random is B, C.
2nd step, B receives messageB can identify this message (the 3rd kind of situation), so B pays close attention to A to machine microblogging request. Then B is with probabilityForward message
3rd step, C receives messageThis message of C None-identified (the 4th kind of situation), so C is with probabilityForward this message.
4th step, Node B forwarded messageBut B does not temporarily also have bean vermicelli, therefore machine microblogging is random from residue node (eliminating the bean vermicelli Node B of source sending node A and A) selects part of nodes as the reception node of this forwarding message. Assume that the node selected at random is C, D.
5th step, C repeats to have received messageIt is directly abandoned by C, does not do any action.
6th step, D have received messageD can identify this message (the 3rd kind of situation), so D pays close attention to A to machine microblogging request. Then D is with probabilityForward message
7th step, D forwarded this messageBut D is temporarily also without any bean vermicelli, therefore machine microblogging is random from residue node (eliminating bean vermicelli Node B, the D of source sending node A and A) selects part of nodes as the reception node of this message. Assume that the node selected at random is C.
8th step, C repeats to have received messageIt is directly abandoned by C, does not do any action.
9th step, through step above, A has had two beans vermicelli B, D.
A has issued the 2nd article of messageThis message will be pushed directly to B and D, and then machine microblogging is selected C at random from residue node and received this message.
10th step, B can identify(the 1st kind of situation), with probabilityForwarded this message. And B performs again corresponding action and issues messageB does not temporarily also have bean vermicelli, and machine microblogging have selected C at random and receivesAnd have selected D reception at random
11st step, C have received message twiceCan not identify for 1st time and with probabilityForward, directly abandon for the 2nd time.
12nd step, D understands message(the 3rd kind of situation), D sets up the concern relation with B to machine microblogging request, then with probabilityForward
It should be noted that, above-mentioned message can't be gone down by open-rely. Because the probability that node forwards message is less than 1. Assuming that the 0th node is source sending node, so message is forwarded the probability received by the n-th node after n-1 time and isWherein P(s)Represent the forwarding probability propagating s node on chain.
If the node recognition that a message can be propagated on chain, so this message should obtain bigger forwarding chance, if the node recognition that a message is not propagated on chain, so this message should obtain less forwarding chance. Also should have exactly
Individual node can by controlControl the forwarding ability of oneself. This machine microblogging can pass through all nodes of controlControl the message flood of whole system. Bigger forwarding probable value can be used when system loading is lighter, less forwarding probable value can be used when system loading is heavier.
In the embodiment of the present invention, being just through the process that continuous message sends and receives, make automatically to generate in system some concern relations, in fact these concern relations represent the thing working application logic between message channel and machine and connect. In fact this kind of logic connecting relation be that the message understanding ability based on machine is progressively set up. Any machine newly adding machine microblogging all may set up business logic relation with other machine in machine microblogging, the mode of the business logic tissue so just networked by thing becomes open from closed, the development of new business of being networked by thing logic becomes incrementally, significantly reduces the difficulty of internet of things service logical extension.
Conceive based on same invention, the embodiment of the present invention also each provides the system of the message subscribing relation of setting up between device and node setting up message subscribing relation between the node of the device setting up message subscribing relation between the node of a kind of end side enforcement and the enforcement of network side, the principle dealt with problems due to said apparatus and system is similar to setting up the method setting up message subscribing relation between the method for message subscribing relation with the node that network side is implemented between the node that end side is implemented, therefore the enforcement of said apparatus and system can see the enforcement of method, repeat part to repeat no more.
As shown in Figure 3, for setting up the structural representation of the device of message subscribing relation between the first node that the embodiment of the present invention provides, comprising:
Receive unit 31, for receiving the first message that Control Server pushes;
Judging unit 32, for judging whether the first message that can identify that described reception unit 31 receives, and whether the source sending node of described device and described first message exists message subscribing relation;
Message subscribing relation sets up unit 33, for judging to identify described first message when described judging unit 32, and the source sending node of described device and described first message is not when existing message subscribing relation, set up the message subscribing relation of the source sending node of described device and described first message;
First retransmission unit 34, for judging to identify described first message when described judging unit 32, and there is message subscribing relation in the source sending node of described device and described first message, or when judging to identify described first message, described first message is forwarded to described Control Server, by described Control Server, described first message is continued other node being pushed to except described device, enable other node described by judging whether to identify described first message, and whether the source sending node of self and described first message exists message subscribing relation and determines whether that the source sending node with described first message sets up message subscribing relation.
Optionally, described judging unit 32, specifically for:
When can correctly resolve described first message, and obtain the source sending node of described first message, and when the message of described reception meets any one condition following, it is determined that described first message can be identified; Otherwise, it is determined that described first message can not be identified;
Described condition comprises: the state that described first message can trigger described device changes, can trigger described device performs specific action and can trigger described device to issue new message.
Optionally, described judging unit 32, specifically for:
When obtaining the source sending node of described first message, source sending node according to described first message obtained, and prestore with the subscription object that self there is message subscribing relation, judge whether the source sending node of described device and described first message exists message subscribing relation;
When obtaining the source sending node less than described first message, it is determined that the source sending node of described device and described first message does not exist message subscribing relation.
Optionally, described first retransmission unit 34, specifically comprises:
First forwarding module 341, judges to identify described first message for working as, and when the source sending node of described device and described first message exists message subscribing relation, forwards to described Control Server by described first message with the first probability;
2nd forwarding module 342, judges to identify described first message for working as, and when the source sending node of described device and described first message exists message subscribing relation, forwards to described Control Server by described first message with the 2nd probability;
3rd forwarding module 343, judges to identify described first message for working as, and when the source sending node of described device and described first message does not exist message subscribing relation, forwards to described Control Server by described first message with the 4th probability; Wherein, described first probability is greater than described 2nd probability, and described 2nd probability is greater than described 4th probability.
Optionally, described device also comprises:
Record cell 35, judges to identify described first message for working as, and when the source sending node of described device and described first message exists message subscribing relation, records the quantity of the message that can not identify of the source sending node from described first message; Wherein, described quantity meets: when receiving from the message that can identify of the source sending node of described first message, described quantity initialize made zero; When receiving from the message that can not identify of the source sending node of described first message, described quantity is added 1;
Message subscribing relation broken unit 36, for when the quantity that described record cell 35 records reaches predetermined threshold value, releasing the message subscribing relation of the source sending node of described device and described first message.
Optionally, described device also comprises:
2nd retransmission unit 37, for set up described device and described first node message subscribing relation after, described first message is forwarded to described Control Server with the 3rd probability; Wherein, described 3rd probability equals described first probability.
For convenience of description, above each several part is divided into each module (or unit) according to function and describes respectively. Certainly, the function of each module (or unit) can be realized in same or multiple software or hardware when implementing of the present invention.
When specifically implementing, the device setting up message subscribing relation between the first node above-mentioned can be arranged in each node.
As shown in Figure 4, for setting up the structural representation of the device of message subscribing relation between the 2nd kind of node that the embodiment of the present invention provides, comprising:
Receive unit 41, for receiving the first message that source sending node is first node;
Push unit 42, other node except described first node is given for the first message push of being received by described reception unit 41, enable other node described by judging whether self can identify described first message, and self whether there is message subscribing relation with described first node and determine whether to set up message subscribing relation with described first node.
Optionally, other node described comprises:
The node of message subscribing relation is there is with a upper transmission side of described first message, and except the part of nodes in described first node and the node except there is the node of message subscribing relation with described first node.
For convenience of description, above each several part is divided into each module (or unit) according to function and describes respectively. Certainly, the function of each module (or unit) can be realized in same or multiple software or hardware when implementing of the present invention.
When specifically implementing, the device setting up message subscribing relation between above-mentioned 2nd kind of node can be arranged in Control Server.
As shown in Figure 5, for setting up the structural representation of the system of message subscribing relation between the node that the embodiment of the present invention provides, comprising: Control Server 51 and at least two nodes 52, wherein:
First node in described at least two nodes 52, for sending the first message as source sending node to described Control Server 51;
Described Control Server 51, for receiving the first message that described first node sends, gives the Section Point except described first node in described at least two nodes by described first message push; And receive the first message of described Section Point transmission, described first message push is given other node except described first node and described Section Point in described at least two nodes;
Section Point in described at least two nodes 52, for receiving the first message that described Control Server 51 pushes; Judge whether to identify described first message, and with whether described first node exists message subscribing relation; When judging to identify described first message, and and described first node between when there is not message subscribing relation, set up the message subscribing relation with described first node to described Control Server request; When judging to identify described first message, and there is message subscribing relation in the source sending node with described first message, or when judging to identify described first message, forwards described first message to described Control Server 51.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program. Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect. And, the present invention can adopt the form at one or more upper computer program implemented of computer-usable storage medium (including but not limited to multiple head unit, CD-ROM, optical memory etc.) wherein including computer usable program code.
The present invention is that schema and/or skeleton diagram with reference to method according to embodiments of the present invention, equipment (system) and computer program describe. Should understand can by the combination of the flow process in each flow process in computer program instructions flowchart and/or skeleton diagram and/or square frame and schema and/or skeleton diagram and/or square frame. These computer program instructions can be provided to the treater of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine so that the instruction performed by the treater of computer or other programmable data processing device is produced for realizing the device of function specified in schema flow process or multiple flow process and/or skeleton diagram square frame or multiple square frame.
These computer program instructions also can be stored in and can guide in computer-readable memory that computer or other programmable data processing device work in a specific way, making the instruction that is stored in this computer-readable memory produce the manufacture comprising instruction device, this instruction device realizes the function specified in schema flow process or multiple flow process and/or skeleton diagram square frame or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform a series of operation steps to produce computer implemented process, thus the instruction performed on computer or other programmable devices is provided for realizing the step of the function specified in schema flow process or multiple flow process and/or skeleton diagram square frame or multiple square frame.
Although having described the preferred embodiments of the present invention, but those skilled in the art once the substantially creative concept of cicada, then these embodiments can be made other change and amendment. Therefore, it is intended that the appended claims shall be construed comprise preferred embodiment and fall into all changes and the amendment of the scope of the invention.
Obviously, the present invention can be carried out various change and modification and not depart from the spirit and scope of the present invention by the technician of this area. Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these change and modification.
Claims (17)
1. between a node, set up the method for message subscribing relation, it is characterised in that, comprising:
First node receives the first message that Control Server pushes;
Judge whether to identify described first message, and whether the source sending node of described first node and described first message exists message subscribing relation;
When judging to identify described first message, and when the source sending node of described first node and described first message does not exist message subscribing relation, set up the message subscribing relation of the source sending node with described first message;
When judging to identify described first message, and there is message subscribing relation in the source sending node of described first node and described first message, or when judging to identify described first message, described first message is forwarded to described Control Server, by described Control Server, described first message is continued other node being pushed to except described first node, enable other node described by judging whether to identify described first message, and whether the source sending node of self and described first message exists message subscribing relation and determines whether that the source sending node with described first message sets up message subscribing relation.
2. the method for claim 1, it is characterised in that, judge whether to identify described first message, specifically comprise:
When can correctly resolve described first message, and obtain the source sending node of described first message, and when the message of described reception meets any one condition following, it is determined that described first message can be identified; Otherwise, it is determined that described first message can not be identified;
Described condition comprises: the state that described first message can trigger described first node changes, can trigger described first node performs specific action and can trigger described first node to issue new message.
3. method as claimed in claim 2, it is characterised in that, judge whether the source sending node of described first node and described first message exists message subscribing relation, specifically comprise:
When obtaining the source sending node of described first message, source sending node according to described first message obtained, and prestore with the subscription object that self there is message subscribing relation, judge whether the source sending node of described first node and described first message exists message subscribing relation;
When obtaining the source sending node less than described first message, it is determined that the source sending node of described first node and described first message does not exist message subscribing relation.
4. the method for claim 1, it is characterized in that, when judging to identify described first message, and there is message subscribing relation in the source sending node of described first node and described first message, or when judging to identify described first message, described first message is forwarded to described Control Server, specifically comprises:
When judging to identify described first message, and when the source sending node of described first node and described first message exists message subscribing relation, described first message is forwarded to described Control Server with the first probability;
When judging to identify described first message, and when the source sending node of described first node and described first message exists message subscribing relation, described first message is forwarded to described Control Server with the 2nd probability;
When judging to identify described first message, and when the source sending node of described first node and described first message does not exist message subscribing relation, described first message is forwarded to described Control Server with the 4th probability;
Wherein, described first probability is greater than described 2nd probability, and described 2nd probability is greater than described 4th probability.
5. method as claimed in claim 4, it is characterised in that, when judging to identify described first message, and when the source sending node of described first node and described first message exists message subscribing relation, described method also comprises:
According to the quantity of preset rules record from the message that can not identify of the source sending node of described first message; Wherein, described preset rules comprises: when receiving from the message that can identify of the source sending node of described first message, described quantity initialize made zero; When receiving from the message that can not identify of the source sending node of described first message, described quantity is added 1;
When described quantity reaches predetermined threshold value, release the message subscribing relation of the source sending node with described first message.
6. method as claimed in claim 4, it is characterised in that, after the message subscribing relation of the source sending node of foundation and described first message, described method also comprises:
Described first message is forwarded to described Control Server with the 3rd probability;Wherein, described 3rd probability equals described first probability.
7. between a node, set up the method for message subscribing relation, it is characterised in that, comprising:
Control Server receives the first message that source sending node is first node;
Described first message push is given other node except described first node by described Control Server, enable other node described by judging whether self can identify described first message, and whether self and described first node exist message subscribing relation and determine whether to set up message subscribing relation with described first node.
8. method as claimed in claim 7, it is characterised in that, other node described comprises:
The node of message subscribing relation is there is with a upper transmission side of described first message, and except the part of nodes in described first node and the node except there is the node of message subscribing relation with described first node.
9. between a node, set up the device of message subscribing relation, it is characterised in that, comprising:
Receive unit, for receiving the first message that Control Server pushes;
Judging unit, for judging whether the first message that can identify that described reception unit receives, and whether the source sending node of described device and described first message exists message subscribing relation;
Message subscribing relation sets up unit, for judging to identify described first message when described judging unit, and the source sending node of described device and described first message is not when existing message subscribing relation, set up the message subscribing relation of the source sending node of described device and described first message;
First retransmission unit, for judging to identify described first message when described judging unit, and there is message subscribing relation in the source sending node of described device and described first message, or when judging to identify described first message, described first message is forwarded to described Control Server, by described Control Server, described first message is continued other node being pushed to except described device, enable other node described by judging whether to identify described first message, and whether the source sending node of self and described first message exists message subscribing relation and determines whether that the source sending node with described first message sets up message subscribing relation.
10. device as claimed in claim 9, it is characterised in that, described judging unit, specifically for:
When can correctly resolve described first message, and obtain the source sending node of described first message, and when the message of described reception meets any one condition following, it is determined that described first message can be identified; Otherwise, it is determined that described first message can not be identified;
Described condition comprises: the state that described first message can trigger described device changes, can trigger described device performs specific action and can trigger described device to issue new message.
11. devices as claimed in claim 10, it is characterised in that, described judging unit, specifically for:
When obtaining the source sending node of described first message, source sending node according to described first message obtained, and prestore with the subscription object that self there is message subscribing relation, judge whether the source sending node of described device and described first message exists message subscribing relation;
When obtaining the source sending node less than described first message, it is determined that the source sending node of described device and described first message does not exist message subscribing relation.
12. devices as claimed in claim 9, it is characterised in that, described first retransmission unit, specifically comprises:
First forwarding module, judges to identify described first message for working as, and when the source sending node of described device and described first message exists message subscribing relation, forwards to described Control Server by described first message with the first probability;
2nd forwarding module, judges to identify described first message for working as, and when the source sending node of described device and described first message exists message subscribing relation, forwards to described Control Server by described first message with the 2nd probability;
3rd forwarding module, judges to identify described first message for working as, and when the source sending node of described device and described first message does not exist message subscribing relation, forwards to described Control Server by described first message with the 4th probability; Wherein, described first probability is greater than described 2nd probability, and described 2nd probability is greater than described 4th probability.
13. devices as claimed in claim 12, it is characterised in that, described device also comprises:
Record cell, judges to identify described first message for working as, and when the source sending node of described device and described first message exists message subscribing relation, records the quantity of the message that can not identify of the source sending node from described first message; Wherein, described quantity meets: when receiving from the message that can identify of the source sending node of described first message, described quantity initialize made zero; When receiving from the message that can not identify of the source sending node of described first message, described quantity is added 1;
Message subscribing relation broken unit, for when the quantity of described recording unit records reaches predetermined threshold value, releasing the message subscribing relation of the source sending node of described device and described first message.
14. devices as claimed in claim 11, it is characterised in that, described device also comprises:
2nd retransmission unit, for set up described device and described first node message subscribing relation after, described first message is forwarded to described Control Server with the 3rd probability; Wherein, described 3rd probability equals described first probability.
The device of message subscribing relation is set up between 15. 1 kinds of nodes, it is characterised in that, comprising:
Receive unit, for receiving the first message that source sending node is first node;
Push unit, other node except described first node is given for the first message push of being received by described reception unit, enable other node described by judging whether self can identify described first message, and self whether there is message subscribing relation with described first node and determine whether to set up message subscribing relation with described first node.
16. devices as claimed in claim 15, it is characterised in that, other node described comprises:
The node of message subscribing relation is there is with a upper transmission side of described first message, and except the part of nodes in described first node and the node except there is the node of message subscribing relation with described first node.
The system of message subscribing relation is set up between 17. 1 kinds of nodes, it is characterised in that, comprising: Control Server and at least two nodes, wherein:
First node in described at least two nodes, for sending the first message as source sending node to described Control Server;
Described Control Server, for receiving the first message that described first node sends, gives the Section Point except described first node in described at least two nodes by described first message push;And receive the first message of described Section Point transmission, described first message push is given other node except described first node and described Section Point in described at least two nodes;
Section Point in described at least two nodes, for receiving the first message that described Control Server pushes; According to the type of message that can identify pre-set, judge whether to identify described first message, and with whether described first node exists message subscribing relation; When judging to identify described first message, and and described first node between when there is not message subscribing relation, set up the message subscribing relation with described first node to described Control Server request; When judging to identify described first message, and there is message subscribing relation in the source sending node with described first message, or when judging to identify described first message, forwards described first message to described Control Server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410682390.5A CN105656971B (en) | 2014-11-24 | 2014-11-24 | The methods, devices and systems of message subscribing relationship are established between a kind of node |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410682390.5A CN105656971B (en) | 2014-11-24 | 2014-11-24 | The methods, devices and systems of message subscribing relationship are established between a kind of node |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105656971A true CN105656971A (en) | 2016-06-08 |
CN105656971B CN105656971B (en) | 2019-02-05 |
Family
ID=56480352
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410682390.5A Active CN105656971B (en) | 2014-11-24 | 2014-11-24 | The methods, devices and systems of message subscribing relationship are established between a kind of node |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105656971B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1744582A (en) * | 2004-08-31 | 2006-03-08 | 华为技术有限公司 | Network instant communication system and method for providing instant message subscribing |
CN102217261A (en) * | 2011-05-12 | 2011-10-12 | 华为技术有限公司 | Interaction method between equipments and machine to machine communication network syste |
CN102855571A (en) * | 2011-06-30 | 2013-01-02 | 南京中兴新软件有限责任公司 | Resource information processing method and device |
CN102904962A (en) * | 2012-10-23 | 2013-01-30 | 深圳市汇智集信息科技有限公司 | Message pushing system and message pushing method thereof |
CN102917026A (en) * | 2012-09-20 | 2013-02-06 | 中国联合网络通信集团有限公司 | Method, equipment and system for subscribing information of internet of things |
CN103916839A (en) * | 2012-12-31 | 2014-07-09 | 华为终端有限公司 | Method and apparatus for releasing service information |
-
2014
- 2014-11-24 CN CN201410682390.5A patent/CN105656971B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1744582A (en) * | 2004-08-31 | 2006-03-08 | 华为技术有限公司 | Network instant communication system and method for providing instant message subscribing |
CN102217261A (en) * | 2011-05-12 | 2011-10-12 | 华为技术有限公司 | Interaction method between equipments and machine to machine communication network syste |
CN102855571A (en) * | 2011-06-30 | 2013-01-02 | 南京中兴新软件有限责任公司 | Resource information processing method and device |
CN102917026A (en) * | 2012-09-20 | 2013-02-06 | 中国联合网络通信集团有限公司 | Method, equipment and system for subscribing information of internet of things |
CN102904962A (en) * | 2012-10-23 | 2013-01-30 | 深圳市汇智集信息科技有限公司 | Message pushing system and message pushing method thereof |
CN103916839A (en) * | 2012-12-31 | 2014-07-09 | 华为终端有限公司 | Method and apparatus for releasing service information |
Also Published As
Publication number | Publication date |
---|---|
CN105656971B (en) | 2019-02-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Lemanski | Infrastructural citizenship: The everyday citizenships of adapting and/or destroying public infrastructure in Cape Town, South Africa | |
US20090083338A1 (en) | Synchronization of electronic postings | |
US10366359B2 (en) | Automatic extraction and completion of tasks associated with communications | |
CN104216619A (en) | Method and device for processing data and electronic equipment | |
KR20170099969A (en) | Technology for graph-based natural language processing | |
CN105704168A (en) | Method and device for adjusting relationships between network nodes in Internet of things | |
Kraemer | Friend or freund: Social media and transnational connections in Berlin | |
Camacho et al. | An ontology-based approach to conflict resolution in Home and Building Automation Systems | |
CN103906012A (en) | Information sending method and device | |
Baborska-Narozny et al. | Exploring the Relationship Between a'Facebook Group'and Face-to-Face Interactions in'Weak-Tie'Residential Communities | |
CN104391808A (en) | Data transmission method | |
Coe | Afterword: Towards a political ecology of labour? | |
Applin et al. | Thing theory: Connecting humans to location-aware smart environments | |
CN103501346B (en) | A kind of non-structural P 2 P resource search method based on machine learning and network node prestige | |
Tiainen | New opportunities in electrical engineering as a result of the emergence of the Internet of Things | |
CN105656971A (en) | Method, device and system for building message subscription relation between nodes | |
CN109871408A (en) | A kind of multi-type database adaptation method, device, electronic equipment and storage medium | |
CN104902026A (en) | Information processing method and cloud service platform | |
CN103324727A (en) | Sharing control method and system | |
CN106302097A (en) | A kind of edit methods of instant communication information | |
Everuss | Using mobilities theory to study the nexus between climate change and human movement | |
US20160248660A1 (en) | Method and device for forwarding information | |
CN104751256B (en) | The method and system of message structure | |
CN105978853A (en) | Session scheduling method, scheduling server and terminal | |
Kassem et al. | A framework for the integration and coordination of the construction supply chain |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |