CN105656959A - Multi-terminal PUB/SUB (Publish/Subscribe) message synchronization method based on routing mechanism - Google Patents

Multi-terminal PUB/SUB (Publish/Subscribe) message synchronization method based on routing mechanism Download PDF

Info

Publication number
CN105656959A
CN105656959A CN201410639742.9A CN201410639742A CN105656959A CN 105656959 A CN105656959 A CN 105656959A CN 201410639742 A CN201410639742 A CN 201410639742A CN 105656959 A CN105656959 A CN 105656959A
Authority
CN
China
Prior art keywords
message
theme
routing
rule
described
Prior art date
Application number
CN201410639742.9A
Other languages
Chinese (zh)
Inventor
王默涵
杨海波
贾正锋
卜立平
颜君志
吴晓东
Original Assignee
中国科学院沈阳计算技术研究所有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国科学院沈阳计算技术研究所有限公司 filed Critical 中国科学院沈阳计算技术研究所有限公司
Priority to CN201410639742.9A priority Critical patent/CN105656959A/en
Publication of CN105656959A publication Critical patent/CN105656959A/en

Links

Abstract

The invention relates to a multi-terminal PUB/SUB (Publish/Subscribe) message synchronization method based on a routing mechanism, which defines a message routing rule for a server which is based on a subscribe-publish model application. The method comprises the following steps: when the server receives a message transmitted by the application, searching a matched routing rule by the server according to a receiving theme of the message; and if the server searches the matched routing rule in the message routing rule, then initiating a corresponding message routing operation to a routing rule objective theme by the server according to a routing mode in the routing rule. According to the multi-terminal PUB/SUB message synchronization method based on the routing mechanism provided by the invention, when the application publishes the message to one theme, the server inquires the message routing rule according to the theme and initiates a message synchronous operation to the objective theme corresponding to the inquired routing rule according to the rule; furthermore, multi-terminal message synchronization of a user can be realized through the customization of the routing rule, and automatic and customizable multi-terminal message synchronization can be realized.

Description

Based on the multiple terminals PUB/SUB message synchronization method of routing mechanism

Technical field

The present invention relates to the multiple terminals message synchronization technology of the communications field, specifically a kind of multiple terminals PUB/SUB message synchronization method based on routing mechanism.

Background technology

Subscribe to Issuance model, it it is a kind of asynchronous message transfer model, it define Application models, together with the publisher of message is contacted in the way of a kind of loose coupling with the subscriber of message, they do not need to know any information of the other side, even do not need to know whether the other side exists, so that it may to realize the asynchronous transmission of message. Exchanging information by theme between publisher and subscriber: publisher is Information issued to theme character string, and subscriber registers on theme and receives information, theme character string connects publisher and subscriber get up in this way.

In prior art, if same user has multiple terminating unit, multiple terminating unit uses based on the application program subscribing to Issuance model simultaneously, when any one terminal issues message to its subscriber, cannot the action of perception other-end between each terminal of this user, namely message can not accomplish multiple terminal synchronizes of transmission side, causes user may repeat to perform identical operation in multiple terminal, brings great inconvenience to user.

Summary of the invention

For the deficiencies in the prior art, the present invention provides a kind of multiple terminals PUB/SUB message synchronization method based on routing mechanism, can realize the synchronous of multiple terminals message in the message system based on subscription Issuance model.

The technical scheme that the present invention adopts for achieving the above object is: a kind of multiple terminals PUB/SUB message synchronization method based on routing mechanism, comprises the following steps:

Step 1: for based on the server definition Message routing rule subscribing to Issuance model application;

Step 2: after described server receives the message that described application sends, described server searches the route rule of coupling according to the reception theme of message;

Step 3: if described server finds the route rule of coupling in Message routing rule, then described server initiates corresponding message routing operation according to the routing mode in route rule to route rule object theme.

If described in the Message routing rule object theme that matches be the theme of other-end corresponding to described application place user, and Message routing mode is for copying message, then initiate message synchronization operation to the other-end of user.

Described Message routing rule comprises source theme, object theme, routing mode.

Described routing mode comprises duplication message, forwards message, abandons message, ignores message.

The process of the described route rule searching coupling is: compares server and receives the source theme in the object theme of message and Message routing rule, find identical with source theme in Message routing rule or belong to object theme and the Message routing mode of a concrete theme in the theme class of source, be the route rule of coupling.

The described object theme comparing server reception message comprises with the source theme in Message routing rule: compare completely and Fuzzy comparisons.

It is described that to compare the source theme received for: server in the object theme of message and Message routing rule completely be same theme.

Described Fuzzy comparisons is: the source theme of Message routing rule is a class theme, and the object theme that server receives message belongs to one of them.

The present invention has following useful effect and advantage:

The present invention can described based in the application subscribing to Issuance model, if after message a to theme is issued in application, server can initiate message synchronization operation according to theme query messages route rule to the object theme that the route rule inquired is corresponding, the message synchronization of user multiple terminals can be realized further by the customization of route rule, avoid in prior art owing to user that can not be synchronous caused may repeat to perform the problem of identical operation in multiple application terminal, it is achieved that the multiple terminals message synchronization of automatization, customizable.

Accompanying drawing explanation

Fig. 1 is the method flow diagram of the present invention.

Embodiment

Below in conjunction with drawings and Examples, the present invention is described in further detail.

Below with reference to the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, it will be appreciated that embodiment described herein is only for instruction and explanation of the present invention, but is not used in restriction the present invention.

As shown in Figure 1, the described multiple terminals PUB/SUB message synchronization method based on routing mechanism of the present embodiment comprises:

In figure, client terminal 1-1, client terminal 1-2, client terminal 2 are three client terminals based on the application subscribing to Issuance model, and client terminal 1-1 and client terminal 1-2 is two terminals of client 1, and client terminal 2 is a terminal of client 2; Server is based on the server subscribing to Issuance model, wherein built-in Message routing module. Assume that Message routing rule defines, and it has been loaded in server.

Concrete, described Message routing rule comprises source theme, object theme, routing mode.

Concrete, described routing mode comprises duplication message, forwards message, abandons message, ignores message.

S101: the first terminal of message transmission side, namely the client terminal 1-1 of described client 1 sends message to client 2. First message mail to client 2 on the theme of server.

S102: the message that server receives the terminal of client 1 and described client terminal 1-1 sends, replys, to the terminal of client 1 and described client terminal 1-1, the notice receiving message.

S103: the theme of the acceptor of the message that server is sent according to the terminal of the client 1 received and described client terminal 1-1, message call route module, searches the route rule whether having coupling.If not matching relevant route rule, then message normally forwards to acceptor. , finding the route rule of coupling herein, the object theme of route rule is the theme of client terminal 1-2, and routing mode is for copying message.

Wherein, the process of the described route rule searching coupling is: compares server and receives the source theme in the object theme of message and Message routing rule, find identical with source theme in Message routing rule or belong to object theme and the Message routing mode of a concrete theme in the theme class of source, be the route rule of coupling.

Concrete, the described object theme comparing server reception message comprises with the source theme in Message routing rule: compare completely and Fuzzy comparisons.

Concrete, described to compare the source theme received for: server in the object theme of message and Message routing rule completely be same theme.

Concrete, described Fuzzy comparisons is: the source theme of Message routing rule is a class theme, and the object theme that server receives message belongs to one of them.

Theme according to message recipient in S104:S103, has inquired the route rule of coupling, according to the object address in route rule and routing mode, message copy one part has been sent to the 2nd terminal of client 1 and described terminal 1-2.

Wherein, described routing mode is for copying message, and the message copy one part being about to receive is to route rule object theme, and message still can be sent to former object theme.

S105: the other-end of client 1 and described client terminal 1-2 reply the notice having received message to server.

S106: server sends, to the terminal of client 2 and described terminal 2, the message that client 1 is sent to client 2.

S107: the terminal of client 2 and described client terminal 2 reply the notice having received message to server. Flow process terminates.

The non-message transmitting terminal of client 1 and client terminal 1-2 receive client 1 message transmitting terminal and client terminal 1-1 is sent to the message of client 2, it is achieved that the multiple terminals message synchronization operation of transmission side.

Claims (8)

1. the multiple terminals PUB/SUB message synchronization method based on routing mechanism, it is characterised in that: comprise the following steps:
Step 1: for based on the server definition Message routing rule subscribing to Issuance model application;
Step 2: after described server receives the message that described application sends, described server searches the route rule of coupling according to the reception theme of message;
Step 3: if described server finds the route rule of coupling in Message routing rule, then described server initiates corresponding message routing operation according to the routing mode in route rule to route rule object theme.
2. the multiple terminals PUB/SUB message synchronization method based on routing mechanism according to claim 1, it is characterized in that: if described in the Message routing rule object theme that matches be the theme of other-end corresponding to described application place user, and Message routing mode is for copying message, then initiate message synchronization operation to the other-end of user.
3. the multiple terminals PUB/SUB message synchronization method based on routing mechanism according to claim 1 and 2, it is characterised in that: described Message routing rule comprises source theme, object theme, routing mode.
4. the multiple terminals PUB/SUB message synchronization method based on routing mechanism according to claim 3, it is characterised in that: described routing mode comprises duplication message, forwards message, abandons message, ignores message.
5. the multiple terminals PUB/SUB message synchronization method based on routing mechanism according to claim 1, it is characterized in that: described in search coupling the process of route rule be: compare server and receive the source theme in the object theme of message and Message routing rule, find identical with source theme in Message routing rule or belong to object theme and the Message routing mode of a concrete theme in the theme class of source, be the route rule of coupling.
6. the multiple terminals PUB/SUB message synchronization method based on routing mechanism according to claim 5, it is characterised in that: the described object theme comparing server reception message comprises with the source theme in Message routing rule: compare completely and Fuzzy comparisons.
7. the multiple terminals PUB/SUB message synchronization method based on routing mechanism according to claim 6, it is characterised in that: it is described that to compare the source theme received for: server in the object theme of message and Message routing rule completely be same theme.
8. the multiple terminals PUB/SUB message synchronization method based on routing mechanism according to claim 6, it is characterised in that: described Fuzzy comparisons is: the source theme of Message routing rule is a class theme, and the object theme that server receives message belongs to one of them.
CN201410639742.9A 2014-11-13 2014-11-13 Multi-terminal PUB/SUB (Publish/Subscribe) message synchronization method based on routing mechanism CN105656959A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410639742.9A CN105656959A (en) 2014-11-13 2014-11-13 Multi-terminal PUB/SUB (Publish/Subscribe) message synchronization method based on routing mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410639742.9A CN105656959A (en) 2014-11-13 2014-11-13 Multi-terminal PUB/SUB (Publish/Subscribe) message synchronization method based on routing mechanism

Publications (1)

Publication Number Publication Date
CN105656959A true CN105656959A (en) 2016-06-08

Family

ID=56478682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410639742.9A CN105656959A (en) 2014-11-13 2014-11-13 Multi-terminal PUB/SUB (Publish/Subscribe) message synchronization method based on routing mechanism

Country Status (1)

Country Link
CN (1) CN105656959A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528307A (en) * 2016-11-14 2017-03-22 济南浪潮高新科技投资发展有限公司 Method for realizing extensible message routing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060036679A1 (en) * 2002-07-26 2006-02-16 International Business Machines Corporation Pub/sub message invoking a subscribers client application program
CN102227927A (en) * 2008-11-28 2011-10-26 三星电子株式会社 Method and apparatus for providing communication history
CN103647776A (en) * 2013-12-13 2014-03-19 国家图书馆 Media resource synchronization method and system for multiple terminals
CN103944924A (en) * 2014-05-15 2014-07-23 重庆邮电大学 Ubiquitous network publish-subscribe middleware model based on RESTful

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060036679A1 (en) * 2002-07-26 2006-02-16 International Business Machines Corporation Pub/sub message invoking a subscribers client application program
CN102227927A (en) * 2008-11-28 2011-10-26 三星电子株式会社 Method and apparatus for providing communication history
CN103647776A (en) * 2013-12-13 2014-03-19 国家图书馆 Media resource synchronization method and system for multiple terminals
CN103944924A (en) * 2014-05-15 2014-07-23 重庆邮电大学 Ubiquitous network publish-subscribe middleware model based on RESTful

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王广泽: ""基于Pub/Sub模式的智能消息中间件研究"", 《信息技术》 *
马建刚等: ""面向大规模分布式计算发布订阅系统核心技术"", 《软件学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528307A (en) * 2016-11-14 2017-03-22 济南浪潮高新科技投资发展有限公司 Method for realizing extensible message routing
CN106528307B (en) * 2016-11-14 2019-08-02 浪潮通用软件有限公司 A kind of expansible message route implementation method

Similar Documents

Publication Publication Date Title
JP2013546280A (en) Terminals and intermediate nodes in a content-oriented networking environment, and their communication methods
Clausen et al. Mobile ad hoc network (manet) neighborhood discovery protocol (nhdp)
KR101861050B1 (en) Synchronizing and collaboration of information among a mobile device group
US7493413B2 (en) APIS to build peer to peer messaging applications
JP6204510B2 (en) Topology discovery in hybrid networks
US20040218550A1 (en) System and method for discovering path MTU in ad hoc network
BRPI0517147A (en) apparatus for transferring data objects in a network, method for transferring data objects in a network, communication network node, cache dictionary associated with a communication network node, remote identification apparatus, remote identification method, apparatus for finding the nearest destination node to a receiving location, apparatus for finding the nearest receiving location of a sending location, method for finding the closest destination node to a receiving location, and method for finding the location nearest to the shipping town
MX2007013119A (en) Apparatus and method for community relay node delivery.
JP2008011448A (en) Ad-hoc network, node, and route control and program
BRPI0514716A (en) interface module for use in a process control system, process control system, and process control information exchange method
CN101023631A (en) System and method for exchanging awareness information in a network environment
FR2886494B1 (en) Method and device for exchanging data between mobile stations in an audio pair network
EP1551163A3 (en) Presence-based routing in a communications network environment
KR20080089382A (en) Optimizing communication using scaleable peer groups
KR20170041743A (en) Method and apparatus for automatically generating an events dictionary in an internet of things (iot) network
TW201006272A (en) Method and apparatus for maintaining communications connections over a distributed wireless network
KR20140070426A (en) Method and multi-homed equipment for establishing a multipath connection
CA2585059A1 (en) Implied acknowledgement data transport protocol for a multi-station network
SG173503A1 (en) Multi-source transmission system and method of instant messaging file
WO2004077280A3 (en) System and method for communications between servers in a cluster
CN101160903A (en) Method, system, client terminal and server for implementing data synchronization
WO2010119026A3 (en) Asynchronous file transfer in a peer to peer network to an offline user
CN101350790A (en) Document transmission method and device base on instant communications system
JP4805646B2 (en) Sensor terminal and sensor terminal control method
US9319241B2 (en) Flow-based packet transport device and packet management method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160608