CN102546354A - Channel-based message routing method - Google Patents

Channel-based message routing method Download PDF

Info

Publication number
CN102546354A
CN102546354A CN2010105797695A CN201010579769A CN102546354A CN 102546354 A CN102546354 A CN 102546354A CN 2010105797695 A CN2010105797695 A CN 2010105797695A CN 201010579769 A CN201010579769 A CN 201010579769A CN 102546354 A CN102546354 A CN 102546354A
Authority
CN
China
Prior art keywords
message
predetermined
information
receiving terminal
mode
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
Application number
CN2010105797695A
Other languages
Chinese (zh)
Other versions
CN102546354B (en
Inventor
乐以长
高超霖
张百春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New Founder Holdings Development Co ltd
Peking University
Founder International Beijing Co Ltd
Original Assignee
Peking University
Founder International Beijing Co Ltd
Peking University Founder Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking University, Founder International Beijing Co Ltd, Peking University Founder Group Co Ltd filed Critical Peking University
Priority to CN201010579769.5A priority Critical patent/CN102546354B/en
Publication of CN102546354A publication Critical patent/CN102546354A/en
Application granted granted Critical
Publication of CN102546354B publication Critical patent/CN102546354B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a channel-based message routing method. The channel-based message routing method comprises the following steps: a message receiving step: receiving a message sent by a message sensing device, wherein the message comprises a data part and a message head, and the message head contains information of a message channel identifier; an extraction step: extracting the information of the message channel identifier and storing the data part to a predetermined message channel area corresponding to the information of the message channel identifier; and a forwarding step: extracting the data part from the predetermined message channel area and forwarding the data part to a message receiving device according to a predetermined message routing way. According to the channel-based message routing method disclosed by the invention, the message sending device and the message receiving device do not need to be connected directly, and when the number of the message receiving devices is increased, the message sending device can be prevented from being influenced greatly, so that the problems of poor expansibility of a system and insufficient convenience and flexibility in realization caused by direct connection of a sending end and a receiving end and close coupling of the system in a data routing method of the prior art can be further overcome.

Description

Message route method based on channel
Technical field
The present invention relates to field of data exchange, in particular to a kind of message route method based on channel.
Background technology
Along with the continuous development of The present computer technology and network communications technology is popularized, utilize the Internet to carry out exchanges data and resource-sharing is very general.
Exchanges data is meant utilizes computer network, and transmit the data that are dispersed in some application systems each other and share, thus the utilance of raising information resources.In network, the exchange of data and transmission normally realize through route assignment.
In the prior art, the exchanges data method for routing is normally static, and transmit leg is confirmed the transmission target through the information such as IP (Internet Protocol, intercommunicated agreement between the network) address of intended receiver, promptly by data receiver specific data switching path.
But it is complicated directly to use the IP address to realize that Data Interchange Technology realizes, the developer is required than higher, and transmitting terminal directly is connected with receiving terminal, and system's close coupling causes system extension property bad.If need notify all transmitting terminal scheduler tabulations when needing to increase new system's (transmission node).And need travel through each goal systems during pocket transmission news, increase or deletion system all can make troubles.
This shows, data routing method technical sophistication of the prior art, and also transmitting terminal directly is connected with receiving terminal, and system's close coupling causes system extension property bad, realizes convenient, flexible inadequately.
Summary of the invention
The present invention aims to provide a kind of message route method based on channel, and to solve data routing method technical sophistication of the prior art, transmitting terminal directly is connected with receiving terminal, and system's close coupling causes system extension property bad, realizes convenient, flexible inadequately problem.
To achieve these goals, the invention provides a kind of message route method, comprising: the message sink step based on channel; Receive the message that the message dispensing device sends; Wherein, message comprises data division and message header, and message header comprises message channel identication information; Extraction step extracts message channel identication information, and data division is stored to the predetermined message channel zone corresponding with message channel identication information; Transmit step, extract data division, and data division is forwarded to message receiving apparatus according to the predetermined message routing mode from predetermined message channel zone.
Further, extraction step also comprises: after extracting message channel identication information, whether checking message dispensing device has the authority of sending message to the corresponding predetermined message channel zone of message channel identication information; When the message dispensing device has when the corresponding predetermined message channel zone of message channel identication information sends the authority of message, data division is stored to the predetermined message channel zone corresponding with message channel identication information; When the message dispensing device does not have the authority of sending message, abandon the message executable operations.
Further; Message header also comprises receiving terminal identification information and broadcast identification information; The predetermined message routing mode comprises ad hoc mode, subscribing mode and broadcast mode, in transmitting step, confirms the predetermined message routing mode through extracting receiving terminal identification information and broadcast identification information, wherein; When receiving terminal identification information non-NULL and broadcast identification information were the first information, the predetermined message routing mode was an ad hoc mode; When the receiving terminal identification information is sky and broadcast identification information when being the first information, the predetermined message routing mode is a subscribing mode; When the receiving terminal identification information is sky and broadcast identification information when being second information, the predetermined message routing mode is a broadcast mode.
Further, when the predetermined message routing mode is ad hoc mode, transmits step and comprise: extract data division from predetermined message channel zone, and be forwarded to the corresponding message receiving apparatus of receiving terminal identification information.
Further, when the predetermined message routing mode is subscribing mode, transmits step and comprise: extract the corresponding receiving terminal tabulation of predetermined message channel zone from the memory block; Extract data division from predetermined message channel zone, be forwarded to the corresponding message receiving apparatus of receiving terminal tabulation successively according to the predetermined order of transmitting.
Further, when having online said message receiving apparatus, said predetermined forwarding order comprises: the ordering of the receiving terminal tabulation that online message receiving apparatus is corresponding.
Further, when said message receiving apparatus was all not online, said predetermined forwarding order comprised: the message receiving apparatus of first login that receiving terminal is listed.
Further, when the predetermined message routing mode is a broadcast mode and when having online message receiving apparatus, transmit step and comprise: extract the corresponding receiving terminal tabulation of predetermined message channel zone from the memory block; Extract data division from predetermined message channel zone, be forwarded to online message receiving apparatus in the receiving terminal tabulation respectively.
Further, when the predetermined message routing mode is a broadcast mode and when having not online message receiving apparatus, transmit step and comprise: extract the corresponding receiving terminal tabulation of predetermined message channel zone from the memory block; Extract data division from predetermined message channel zone, when message receiving apparatus is logined, said data division is transmitted to this device.。
Use technical scheme of the present invention, through extracting the message channel information that is comprised in the message, with data division be stored to the corresponding message channel zone of message channel information in; And be forwarded to message receiving apparatus, to realize the route of message between transmitting terminal and receiving terminal, promptly the message dispensing device does not need directly to be connected with message receiving apparatus; And the message dispensing device does not need the IP address of intended receiver yet when sending message; When message receiving apparatus quantity increases or reduce, can not produce considerable influence to the message dispensing device, overcome data routing method complicated technology realization of the prior art; Transmitting terminal directly is connected with receiving terminal; System's close coupling causes system extension property bad, realizes convenient, flexible inadequately problem.
Except top described purpose, feature and advantage, the present invention also has other purpose, feature and advantage.To do further detailed explanation to the present invention with reference to figure below.
Description of drawings
Accompanying drawing is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 shows system configuration sketch map one of the present invention;
Fig. 2 shows system configuration sketch map two of the present invention;
Fig. 3 shows the flow chart of the embodiment of the invention one;
Fig. 4 shows the flow chart of the embodiment of the invention two;
Fig. 5 shows the message dispensing device workflow diagram of the embodiment of the invention three;
Fig. 6 shows the message receiving apparatus workflow diagram of the embodiment of the invention three; And
Fig. 7 shows the swap server workflow diagram of the embodiment of the invention three.
Embodiment
Below in conjunction with accompanying drawing embodiments of the invention are elaborated, but the multitude of different ways that the present invention can be defined by the claims and cover is implemented.
Fig. 1 shows system configuration sketch map one of the present invention.Referring to Fig. 1, the system of embodiment of the present invention message route method comprises message dispensing device 11, swap server 12 that is connected with message dispensing device 11 and a plurality of message receiving apparatus 13 that directly are connected with swap server 12 or connect through network.
Fig. 2 shows system configuration sketch map two of the present invention.Referring to Fig. 2; The system of embodiment of the present invention message route method also can comprise a plurality of message dispensing devices 11, swap server 12 that is connected with a plurality of message dispensing devices 11 and a plurality of message receiving apparatus 13 that directly are connected with swap server 12 or connect through network.
The main processing process of message route method of the present invention is positioned at swap server 12, though Fig. 1 and system configuration shown in Figure 2 are distinguished to some extent, concrete message route method is identical, and will in following embodiment, introduce in detail.
Specify embodiments of the invention one below in conjunction with Fig. 3.
Fig. 3 shows the flow chart of the embodiment of the invention.As shown in Figure 3, comprise based on the message route method of channel:
S10 receives the message that the message dispensing device sends, and promptly accomplishes the message sink step.Wherein, message comprises data division and message header, and message header comprises message channel identication information.
Particularly, data exchange service device 12 receives the message that message dispensing device 11 sends.Message dispensing device 11 is when sending message, and the message of being sent not only comprises data division, also comprises message header, and message header comprises the message channel information.
S12 extracts message channel identication information, and data division is stored to the predetermined message channel zone corresponding with message channel identication information, promptly realizes extraction step.
Particularly, the message header of data exchange service device 12 from the message that is received partly extracts message channel identication information, and in the message channel zone of data division storage as for the message channel identication information correspondence of being extracted with this message.The message channel identication information of extracting in the message header like the message A1 that the data swap server received is " systems20100706 ", and then data exchange service device 12 can be stored to the data division of message A1 in the memory block corresponding with " systems20100706 " in the data exchange service device 12.
S14 extracts data division from predetermined message channel zone, and according to the predetermined message routing mode data division is forwarded to message receiving apparatus, promptly accomplishes and transmits step.
Particularly; After data exchange service device 12 is stored in the information storage area corresponding with message channel identication information with the data division of message; Message routing mode according to predetermined is sent to message receiving apparatus 13 with data division; Can it be sent to a message receiving apparatus, also can send it to a plurality of message receiving apparatus.After being stored to the data division of message A1 in the memory block corresponding like data swap server 12 with " systems20100706 "; If predetermined message routing mode is " be in the message channel zone of systems20100706 data all be sent to message receiving apparatus App5 and message receiving apparatus App6 " with channel identication, then data exchange service device 12 can be that the interior all data forwarding of message channel zone of " systems20100706 " are to message receiving apparatus App5 and message receiving apparatus App6 with channel identication according to this message routing mode.Predetermined message routing mode can be specified by message dispensing device 11, also can be confirmed according to content of sending and user's demand by data exchange service device 12.
In the present embodiment, through extracting the message channel information that is comprised in the message, with data division be stored to the corresponding message channel zone of message channel information in; And be forwarded to message receiving apparatus, to realize the route of message between transmitting terminal and receiving terminal, promptly the message dispensing device does not need directly to be connected with message receiving apparatus; And the message dispensing device does not need the IP address of intended receiver yet when sending message; When message receiving apparatus quantity increases or reduce, can not produce considerable influence to the message dispensing device, overcome data routing method complicated technology realization of the prior art; Transmitting terminal directly is connected with receiving terminal; System's close coupling causes system extension property bad, realizes convenient, flexible inadequately problem.
Specify embodiments of the invention two below in conjunction with Fig. 4.
Fig. 4 shows the flow chart of the embodiment of the invention two.Different with embodiment one is to transmit step S12 and comprise:
S121 extracts message channel identication information.
S122; Whether checking message dispensing device has the authority of sending message to the corresponding predetermined message channel zone of message channel identication information; When the message dispensing device has when the corresponding predetermined message channel zone of message channel identication information sends the authority of message, go to step S123; Otherwise execution in step S16 abandons this message executable operations.
S123 is stored to the predetermined message channel zone corresponding with message channel identication information with data division.
Promptly in the step S12 of embodiment one; Add checking message dispensing device 11 and whether have the step of sending the authority of message to the corresponding predetermined message channel zone of message channel identication information; To guarantee safety of data transmission in the whole message routing process; Prevent that message dispensing device 11 or certain the message dispensing device in a plurality of message dispensing devices 11 among Fig. 2 among Fig. 1 do not have when the corresponding predetermined message channel zone of message channel identication information sends the authority of message; Message error is sent in the data exchange service device 12, thereby causes the appearance of data transmission errors situation.
Particularly; After data exchange service device 12 extracts message channel identication information; The sending permission of 12 pairs of message dispensing devices 11 of data exchange service device device verifies whether the message dispensing device 11 that sends message among proof diagram 1 or Fig. 2 has the authority of sending message to the corresponding predetermined message channel zone of message channel identication information, if this message dispensing device 11 has the message sending permission; Execution in step S123 then; Promptly carry out original storing step of embodiment one and treatment step S14 afterwards, but, then abandon the message executable operations that this message dispensing device is sent if this message dispensing device 11 does not have the message sending permission; Promptly do not carry out step S14 afterwards, directly finish the process of transmitting of this message.
For example; Data exchange service device 12 among Fig. 1 or Fig. 2 receives the message A2 that message dispensing device 11 sends; And the message channel identication information that the message header of message A2 comprises is " systems20100706 "; Then data exchange service device 12 extracts message identifier information " systems20100706 ", and checking message dispensing device 11 whether oriented " systems20100706 " corresponding message channel zone send the authority of message.If certain the message dispensing device 11 shown in message dispensing device shown in Figure 1 11 or Fig. 2 does not send the authority of message to " systems20100706 " corresponding message channel zone, then stop the process that this message dispensing device 11 sends message.If the message channel zone that this message dispensing device 11 oriented " systems20100706 " is corresponding sends the authority of message, then the data division with this message is stored in " systems20100706 " corresponding message channel zone.
In the present embodiment; The checking message dispensing device 11 whether corresponding message channel zone of oriented message channel identication information sends the authority of message; Can in data exchange service device 12, accomplish, perhaps verify through the channel authority memory device that is connected with data exchange service device 12.Concrete proof procedure can for: the identification information storage of the message dispensing device that each predetermined channel district is corresponding is in data exchange service device 12 or channel authority memory device; When checking; Obtain the identification information of the message dispensing device 11 that sends message, and compare with the identification information of stored message dispensing device.If identical, think that then this message dispensing device has the authority of sending message to this channel zone; Otherwise, think that then this message dispensing device does not have the authority of sending message to this channel zone.Certainly, also have other verification method, the existing in the prior art more introduction of concrete verification method is not described in detail at this.
In the above embodiment of the present invention, the predetermined message routing mode comprises ad hoc mode, subscribing mode and broadcast mode.And, through these the three kinds of message routing modes of data separation that comprise in the message header.
Particularly; In order to discern these three kinds predetermined message routing modes; Message header also comprises receiving terminal identification information and broadcast identification information; In transmitting step, confirm the predetermined message routing mode, to confirm the message routing mode easily through extracting receiving terminal identification information and broadcast identification information.As confirm to receive the message receiving apparatus of message through the receiving terminal identification information; Confirm the scope that message is sent through broadcast identification information; And the receiving terminal identification information can be the ID (Identity, identity code) of message receiving apparatus or other identification information of message receiving apparatus.
Wherein, when receiving terminal identification information non-NULL and broadcast identification information were the first information, the predetermined message routing mode was an ad hoc mode; When the receiving terminal identification information is sky and broadcast identification information when being the first information, the predetermined message routing mode is a subscribing mode; When the receiving terminal identification information is sky and broadcast identification information when being second information, the predetermined message routing mode is a broadcast mode, is " false " like the first information, and second information is " true ".
For example, the setup message head is 8 binary codes, and sets the identification information that comprises the message channel in the 1st to the 3rd; The 4th to the 7th bit representation receiving terminal identification information; The 8th bit representation broadcast identification information when being binary " 1 " for the 8th, can think that broadcast identification information is " true "; When being binary " 0 " for the 8th, can think that broadcast identification information is " false ".The implication of the concrete first information and the second information representative can be selected according to the concrete applied environment of message routing mode, is not described in detail selective rule at this.But describe for ease, in an embodiment of the present invention, the first information refers to " false ", and second information refers to " true ".
Adopt the mode that is provided with like this, the scope of transmitting terminal specify message recipient and message transmission very easily.
To describe the message routing mode under every kind of pattern below in detail.
When the predetermined message routing mode is ad hoc mode, after executing message sink step and extraction step, transmits step and comprise: extract data division from predetermined message channel zone, and be forwarded to the corresponding message receiving apparatus of receiving terminal identification information.Under ad hoc mode; Even the message sink end increases new message receiving apparatus; Receiving terminal identification information to existing message receiving apparatus can be not influential yet, and do not know that at transmitting terminal message routing process still can be carried out under the situation of identification information of new message receiving apparatus.
For example, if the identification information of message dispensing device 11 is App1, comprise two message receiving apparatus 13, the receiving terminal identification information is respectively App2 and App3, and the message routing mode is when being ad hoc mode, and concrete message routing process is as follows:
It is that " systems20100706 " sends message that step 1, message dispensing device App1 specify to the message channel at message header; Specify message recipient is App2 and the corresponding message receiving apparatus of App3; It is false that broadcast flag information is set, and representes non-broadcast.
After step 2, data exchange service device 12 received the message from App1, the message channel information that extracts the transmitting terminal appointment from message header was that " systems20100706 ", receiving terminal identification information are App2 and App3, and broadcast flag information is false.
Step 3, data exchange service device 12 channel authority memory device checking App1 whether oriented message channel " systems20100706 " send the authority of message, if there is not authority, the termination messages process of transmitting; If the oriented message channel of App1 " systems20100706 " sends the authority of message, the data division of the message of then App1 being sent is stored in " systems20100706 " corresponding message channel zone.
Step 4, data exchange service device 12 are according to the receiving terminal identification information that is extracted; Decision message receives and is designated App2 and the corresponding message receiving apparatus of App3; Form the message routing table according to the message recipient that determines, wherein, App2 and App3 are the receiving terminal of message routing table.And because receiving terminal identification information non-NULL, represent that therefore message dispensing device 11 specified concrete message sink end.
Step 5, data exchange service device 12 are given App2 and the corresponding message receiving apparatus 13 of App3 according to the message routing table with forwards.
Step 6, receiving terminal identification information are that the message receiving apparatus 13 of App2 and App3 receives message.
When the predetermined message routing mode is subscribing mode, execute message sink step and extraction step after, transmit step and comprise: extract the corresponding receiving terminal tabulation of predetermined message channel zone from the memory block; Extract data division from predetermined message channel zone, be forwarded to the corresponding message receiving apparatus of receiving terminal tabulation successively according to the predetermined order of transmitting.
And when having online message receiving apparatus, the predetermined order of transmitting comprises: the ordering of the receiving terminal tabulation that online message receiving apparatus is corresponding; When message receiving apparatus was all not online, the predetermined order of transmitting comprised: the message receiving apparatus of first login that receiving terminal is listed.Promptly the range of transmission according to the appointment of message dispensing device sends message, and when message receiving apparatus is not online, in swap server, this message is preserved.Adopt this message routing mode, neither take the resource of message dispensing device, guarantee promptness and reliability that message is sent simultaneously again.
In the present embodiment, receiving terminal tabulation both can be stored in the memory block in the data exchange service device 12, also can be stored in the independent memory device, like the data channel authority memory device that is connected with swap server 12 or other memory device.
For example, as if the App1 that is designated of message dispensing device 11, when the message routing mode was subscribing mode, concrete message routing process was as follows:
Step 1, message dispensing device App1 are " systems20100706 ", specify message receiving system not at message header specify message channel, i.e. the receiving terminal identification information of appointment is empty, broadcast flag information is set is " false ", representes non-broadcast.
After step 2, data exchange service device 12 receive the message from App1, extract the message channel identication information " systems20100706 " of transmitting terminal appointment from message header, message recipient is empty, and broadcast flag information is false.
Step 3, data exchange service device 12 channel authority memory device checking App1 whether oriented said message channel " systems20100706 " send the authority of message, if there is not authority, the termination messages process of transmitting; If the oriented message channel of App1 " systems20100706 " sends the authority of message, the data division of the message of then App1 being sent is stored in " systems20100706 " corresponding message channel zone.
The message header information that step 4, data exchange service device 12 extract according to step 2 is judged message recipient information for empty.
The receiving terminal tabulation that step 5, the data exchange service device 12 message channel information in channel authority memory device query steps 2 is corresponding; For example inquire corresponding to comprising App2, App3 and three message sink ends signs of App4 in the receiving terminal of " systems20100706 " tabulation, and order is App2, App3, App4.
The message header information that step 6, data exchange service device 12 extract according to step 2, obtaining this message is non-broadcast.
Step 7, data exchange service device 12 judge whether the corresponding message receiving apparatus of receiving terminal identification information App2, App3 and App4 is online; If App2 and App3 are online, then two online receiving terminals receive the message in " systems20100706 " corresponding message channel zone in turn.The a plurality of message of message channel zone as " systems20100706 " is corresponding are all selected subscribing mode, then select App2 to select App3 as the recipient as recipient, second message first message earlier successively, because App4 is not online; Can be with it as the recipient; The 3rd message is selected App2 again, and forms the routing table of each message successively according to selected recipient's order, wherein; The receiving terminal of routing table is the corresponding recipient of each message, gets into step 9 then.
If step 8 App2, App3 and App4 are all not online, temporary transient uncertain message sink end after the receiving terminal login of first login in the corresponding message receiving apparatus of App2, App3 and App4, is put into routing table with its recipient as message.Suppose at App2, App3 and three usefulness of App4 off-line per family, be designated at first login system of App4 this moment, so with App4 as the recipient and put it into routing table.
Step 9, data exchange service device 12 are given the receiving system in the routing table with forwards.
Step 10, message receiving apparatus 13 are receiving terminals of message route results, carry out the task of receiving message.
When the predetermined message routing mode is a broadcast mode and when having online message receiving apparatus, transmit step and comprise: extract the corresponding receiving terminal tabulation of predetermined message channel zone from the memory block; Extract data division from predetermined message channel zone, be forwarded to online message receiving apparatus in the receiving terminal tabulation respectively, promptly the range of transmission according to the appointment of message dispensing device sends message.
When the predetermined message routing mode is broadcast mode and when having not online message receiving apparatus, transmits step and comprise: extract the corresponding receiving terminal tabulation of predetermined message channel zone from the memory block; Extract data division from predetermined message channel zone, when the deferred information receiving system is logined, said data division is transmitted to it.Promptly when message receiving apparatus is not online, in swap server, this message is preserved.Adopt this message routing mode, neither take the resource of message dispensing device, guarantee promptness and reliability that message is sent simultaneously again.
For example, if the identification information of message dispensing device 11 is App1, when the message routing mode was broadcast mode, concrete message routing process was as follows:
Step 1, message dispensing device App1 are that " systems20100706 ", specify message recipient are sky at message header specify message channel, broadcast flag is set is " true ", the expression broadcast.
After step 2, data exchange service device 12 received the message from App1, the message channel that extracts the transmitting terminal appointment from message header was that " systems20100706 ", message recipient are sky, and broadcast flag information is " true ".
Step 3, data exchange service device 12 channel authority memory device checking App1 whether oriented said message channel " systems20100706 " send the authority of message, if there is not authority, the termination messages process of transmitting; If the oriented message channel of App1 " systems20100706 " sends the authority of message, the data division of the message of then App1 being sent is stored in " systems20100706 " corresponding message channel zone.
The message header information that step 4, data exchange service device 12 extract according to step 2 is judged the receiving terminal identification information for empty.
The receiving terminal that step 5, the data exchange service device 12 message channel information in channel authority memory device query steps 2 is corresponding is tabulated, and for example inquires to comprise App2, App3 and three message sink ends signs of App4 in the receiving terminal tabulation corresponding to " systems20100706 ".
The message header information that step 6, data exchange service device 12 extract according to step 2, obtaining message is broadcast;
Step 7, data exchange service device 12 judge whether the corresponding message receiving apparatus of receiving terminal identification information App2, App3 and App4 is online; These two receiving terminals receive the message in " systems20100706 " corresponding message channel zone simultaneously if App2 and App3 are online; And form the message routing table, wherein App2 and App3 are the receiving terminal of message routing table; Because App4 is not online, when App4 logins, said data division is transmitted to App4., its recipient as message is put into routing table.
Step 8, data exchange service device 12 are given the receiving terminal in the routing table with forwards.
Step 9, message receiving apparatus 13 are receiving terminals of message route results, carry out the task of receiving message.
Under subscribing mode and broadcast mode, when the message sink end increases new message receiving apparatus, only need the receiving terminal tabulation of updated stored to get final product, do not upgrade even if receiving terminal is not tabulated, routing procedure still can be carried out.
In the above embodiment of the present invention, be employed in the message header and add the receiving terminal identification information and distinguish message receiving apparatus; Rather than adopt receiving terminal IP address information to distinguish message receiving apparatus; Like this when the message sink end increases new message receiving apparatus; Just need not to notify transmitting terminal to upgrade IP address list, only need notify the receiving terminal identification information that increases new message receiving apparatus correspondence to get final product, even under subscribing mode and broadcast mode; The message dispensing device need not to upgrade IP address list, only needs to upgrade the receiving terminal tabulation and gets final product.
Describe embodiments of the invention three in detail below in conjunction with Fig. 5 to Fig. 7.
Wherein, Fig. 5 shows the message dispensing device workflow diagram of the embodiment of the invention three, and Fig. 6 shows the message receiving apparatus workflow diagram of the embodiment of the invention three, and Fig. 7 shows the swap server workflow diagram of the embodiment of the invention three.
As shown in Figure 5, the workflow of message dispensing device 11 is as follows:
S501, specify message channel, recipient and broadcast identification.Promptly in the message header of the message of sending, give outbound message channel identication information, receiving terminal identification information and broadcast identification information.
Particularly, the message header informational needs that extracted of swap server 12 is specified by the message dispensing device.And receiving terminal identification information and broadcast identification information are optional information, can when sending message, not specify these two kinds of information.
S502 sends message.
S503 finishes.
As shown in Figure 6, the workflow of message receiving apparatus 13 is as follows:
S601 starts watcher thread.
Particularly, each message receiving apparatus 13 is constantly monitored the signal of swap server 12, waits for that swap server 12 sends message to it.
S602 receives message.
S603 finishes.
As shown in Figure 7, the workflow of swap server 12 is as follows:
S701 receives message.
S702 extracts message channel, recipient and broadcast identification.Promptly from the message header of the message of sending, extract message channel identication information, receiving terminal identification information and broadcast identification information.
S703, checking channel authority.If have sending permission, go to step S704, otherwise go to step S711.The message channel whether the message dispensing device of i.e. checking transmission message has appointment in message header sends the authority of message, if having authority, then goes to step S704, if do not have authority, then goes to step S711.
S704, whether the recipient is empty.For sky then goes to step S705, otherwise go to step S706.Judge promptly whether the receiving terminal identification information is empty; For then meaning, sky do not have the specify message receiving system; Do not specified concrete message receiving apparatus for empty then meaning, and if message sink end identification message is that sky then goes to step S705, otherwise go to step S706.
S705 obtains the corresponding receiving terminal tabulation of message channel.Promptly when specify message receiving system not, extract the corresponding receiving terminal tabulation of this message channel information, go to step S707.
S706 tabulates the recipient as the message sink end in the routing table.Promptly when message dispensing device specify message receiving system, the receiving terminal identification information of the message receiving apparatus of appointment in the message dispensing device is formed recipient's tabulation, and, go to step S710 as the message sink end in the routing table.
S707 judges whether to be broadcast.Be then to go to step S708, otherwise go to step S709.Whether comprise broadcast identification information in the message header of the message that i.e. judgement receives,, then go to step S708,, then go to step S709 if broadcast identification information is false if broadcast identification information is true.
S708, with receiving terminal identification informations all in the receiving terminal tabulation as the message sink end in the routing table.When comprising broadcast identification information in the message header of the message that promptly receives, with receiving terminal identification informations all in the receiving terminal tabulation as being the message sink end in the routing table.
S709, with a receiving terminal identification information in the receiving terminal tabulation as the message sink end in the routing table.When not comprising broadcast identification information in the message header of the message that promptly receives, with one of them the receiving terminal identification information in the receiving terminal tabulation as being the message sink end in the routing table.Concrete implementation method is existing in subscribing mode to be introduced in detail, is not described in detail at this.
S710 sends message to receiving system.According to result of determination before, send message according to predetermined mode.
S711 finishes.
Can find out that from Fig. 5 to Fig. 7 flow chart shown in Figure 5, the step S701 among Fig. 7, step S702, step S703 are equivalent to step S10 and the step S12 among Fig. 3 and Fig. 4 in fact.Step S704 among Fig. 7 is equivalent to the processing procedure of step S14 in fact to step S711 and flow chart shown in Figure 6.
Simultaneously, from Fig. 5 to Fig. 7, also can find out the message routing process under each pattern that the workflow of each device comes down to introduce in the enforcement two of the present invention among the embodiment three.For example, the process of execution in step S701, S702, S703, S704, S706 and S710 is exactly in the message routing process of carrying out ad hoc mode; The process of execution in step S701, S702, S703, S704, S705, S707, S709 and S710 is exactly in the message routing process of carrying out subscribing mode; The process of execution in step S701, S702, S703, S704, S705, S707, S708 and S710 is exactly in the message routing process of carrying out broadcast mode.
From above description, can find out that the above embodiments of the present invention have realized following technique effect: the message dispensing device does not need directly to be connected with message receiving apparatus; And the message dispensing device does not need the IP address of intended receiver yet when sending message; When message receiving apparatus quantity increases or reduce, can not produce considerable influence to the message dispensing device, overcome data routing method complicated technology realization of the prior art; Transmitting terminal directly is connected with receiving terminal; System's close coupling causes system extension property bad, realizes convenient, flexible inadequately problem.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (9)

1. the message route method based on channel is characterized in that, comprising:
The message sink step receives the message that the message dispensing device sends, and wherein, said message comprises data division and message header, and message header comprises message channel identication information;
Extraction step extracts said message channel identication information, and said data division is stored to the predetermined message channel zone corresponding with said message channel identication information;
Transmit step, extract said data division from predetermined message channel zone, and said data division is forwarded to message receiving apparatus according to the predetermined message routing mode.
2. message route method according to claim 1 is characterized in that, said extraction step also comprises:
After extracting said message channel identication information, verify whether said message dispensing device has the authority of sending message to the corresponding predetermined message channel zone of said message channel identication information;
When said message dispensing device has when the corresponding predetermined message channel zone of said message channel identication information sends the authority of message, said data division is stored to the predetermined message channel zone corresponding with said message channel identication information;
When said message dispensing device does not have the authority of sending message, abandon said message executable operations.
3. message route method according to claim 2; It is characterized in that; Said message header also comprises receiving terminal identification information and broadcast identification information, and said predetermined message routing mode comprises ad hoc mode, subscribing mode and broadcast mode, in said forwarding step, confirms said predetermined message routing mode through extracting said receiving terminal identification information and said broadcast identification information; Wherein
When said receiving terminal identification information non-NULL and broadcast identification information were the first information, said predetermined message routing mode was an ad hoc mode;
When said receiving terminal identification information is sky and broadcast identification information when being the first information, said predetermined message routing mode is a subscribing mode;
When said receiving terminal identification information is sky and broadcast identification information when being second information, said predetermined message routing mode is a broadcast mode.
4. message route method according to claim 3 is characterized in that, when the predetermined message routing mode was said ad hoc mode, said forwarding step comprised:
Extract said data division from predetermined message channel zone, and be forwarded to the corresponding message receiving apparatus of said receiving terminal identification information.
5. message route method according to claim 3 is characterized in that, when the predetermined message routing mode was said subscribing mode, said forwarding step comprised:
Extract the said predetermined corresponding receiving terminal tabulation of message channel zone from the memory block;
Extract said data division from predetermined message channel zone, be forwarded to the corresponding message receiving apparatus of said receiving terminal tabulation successively according to the predetermined order of transmitting.
6. message route method according to claim 5 is characterized in that, when having online said message receiving apparatus, said predetermined forwarding order comprises:
The ordering of the receiving terminal tabulation that online said message receiving apparatus is corresponding.
7. message route method according to claim 5 is characterized in that, when said message receiving apparatus was all not online, said predetermined forwarding order comprised:
The message receiving apparatus of first login that said receiving terminal is listed.
8. message route method according to claim 3 is characterized in that, when said predetermined message routing mode is a broadcast mode and when having online said message receiving apparatus, said forwarding step comprises:
Extract the said predetermined corresponding receiving terminal tabulation of message channel zone from the memory block;
Extract said data division from predetermined message channel zone, be forwarded to the corresponding online message receiving apparatus of said receiving terminal tabulation respectively.
9. message route method according to claim 3 is characterized in that, when said predetermined message routing mode is a broadcast mode and when having not online said message receiving apparatus, said forwarding step comprises:
Extract the said predetermined corresponding receiving terminal tabulation of message channel zone from the memory block;
Extract said data division from predetermined message channel zone, when said not online message receiving apparatus is logined, said data division is transmitted to this device.
CN201010579769.5A 2010-12-08 2010-12-08 Channel-based message routing method Active CN102546354B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010579769.5A CN102546354B (en) 2010-12-08 2010-12-08 Channel-based message routing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010579769.5A CN102546354B (en) 2010-12-08 2010-12-08 Channel-based message routing method

Publications (2)

Publication Number Publication Date
CN102546354A true CN102546354A (en) 2012-07-04
CN102546354B CN102546354B (en) 2015-03-18

Family

ID=46352352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010579769.5A Active CN102546354B (en) 2010-12-08 2010-12-08 Channel-based message routing method

Country Status (1)

Country Link
CN (1) CN102546354B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1684447A (en) * 2004-04-14 2005-10-19 国际商业机器公司 Method and device for validating message in message line environment
CN100425021C (en) * 2004-03-04 2008-10-08 雅马哈株式会社 Data delivery apparatus and method, and terminal apparatus
US20100150148A1 (en) * 2003-07-30 2010-06-17 Foundry Networks, Inc. Method and system for IP fragmentation handling

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100150148A1 (en) * 2003-07-30 2010-06-17 Foundry Networks, Inc. Method and system for IP fragmentation handling
CN100425021C (en) * 2004-03-04 2008-10-08 雅马哈株式会社 Data delivery apparatus and method, and terminal apparatus
CN1684447A (en) * 2004-04-14 2005-10-19 国际商业机器公司 Method and device for validating message in message line environment

Also Published As

Publication number Publication date
CN102546354B (en) 2015-03-18

Similar Documents

Publication Publication Date Title
US6542491B1 (en) Wireless server, system and method
EP4009593A1 (en) Data transmission method and apparatus, network card and storage medium
CN103339901B (en) Terminal in content guiding network environment and the communication means of intermediate node and terminal and intermediate node
US5245608A (en) Logical grouping of layer entities in a layered communication architecture
CN101179603B (en) Method and device for controlling user network access in IPv6 network
WO2006046296A1 (en) Mobile radio communication terminal, and communication control method
CN102316416A (en) Access method for terminal and wireless communication network
US9370031B2 (en) Wireless network setup and configuration distribution system
WO2012155994A1 (en) Anonymous signalling
CN101656656B (en) Method and device for sending and receiving isomerized mobile communication network-based message
CN110784489B (en) Secure communication system and method thereof
CN102984261A (en) Network service login method, equipment and system based on mobile telephone terminal
CN110247959A (en) A kind of data transmission method and device
CN101309453A (en) System and method for correlating messages within a wireless transaction
CN100440872C (en) Method for realizing message-switching in distributed environment and its device
CN100479457C (en) Implementation method for transferring data in virtual private network
CN113556753A (en) User-based service continuity method and system
CN116566897A (en) Addressing routing method, device, equipment and medium
CN101309154B (en) Datagram sending method, sending apparatus and transmission system
US20160365987A1 (en) Personal computer network
JP2003318939A (en) Communication system and control method thereof
CN103096273B (en) Method, equipment and the system that a kind of up short message sends
CN102546354B (en) Channel-based message routing method
CN101286991B (en) Implementing method and device for dynamic host configuring protocol Option82
CN114257634B (en) Server discovery method, device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220913

Address after: 100871 No. 5, the Summer Palace Road, Beijing, Haidian District

Patentee after: Peking University

Patentee after: New founder holdings development Co.,Ltd.

Patentee after: Founder International Co.,Ltd. (Beijing)

Address before: 100871 No. 5, the Summer Palace Road, Beijing, Haidian District

Patentee before: Peking University

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: Founder International Co.,Ltd. (Beijing)

TR01 Transfer of patent right