CN103546520B - message distributing method and device - Google Patents
message distributing method and device Download PDFInfo
- Publication number
- CN103546520B CN103546520B CN201210247246.XA CN201210247246A CN103546520B CN 103546520 B CN103546520 B CN 103546520B CN 201210247246 A CN201210247246 A CN 201210247246A CN 103546520 B CN103546520 B CN 103546520B
- Authority
- CN
- China
- Prior art keywords
- message
- code
- distributed
- mapping node
- mapping
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Abstract
The invention provides a kind of message distributing method and device, wherein, this method includes:After receiving message to be distributed, matched according to message code of the message code of message to be distributed carrying successively with the message mapping node of multi-stage scheduling level layer;Message to be distributed is sent according to command action corresponding with the message code that the match is successful.The present invention solves the problems, such as the message distribution mechanism flexibly handled not over equipment adaptation layer in correlation technique, so as to improve the diversity of message distribution, improves the operability of message distribution, flexibility.
Description
Technical field
The present invention relates to the communications field, in particular to a kind of message distributing method and device.
Background technology
Transmission net of new generation is by comprehensive service-oriented Internet protocol(Internet Protocol, referred to as IP)Change, net
Network packetizing implements technology shifts.Main line transmission net uses IP over optical transport networks(Optical Transport
Network, referred to as OTN)Technology adapts to business IPization, bandwidth granularity maximization, networking flexibility and the demand of high existence;In city
Domain net will also be gradually introducing new Packet Transport Network(Packet Transfer Network, referred to as PTN)Technology, to adapt to
It is grouped the needs of the telecommunication service of the universal cross transmitted, Supporting multi-services, scalability, manageability and high quality-of-service.
Telecommunication service IPization development trend is complied with, industry releases a new generation's packet delivery platform one after another.As shown in figure 1, point
Group delivery platform is generally divided into:NML, equipment adaptation layer, key-course and transport layer.Wherein, NML is main
Some management tools that the visually needs such as management, Visual Maintenance are carried out to equipment network, individual equipment are provided the user with, specifically
Instrument such as " Unified Network management platform ".Equipment adaptation layer is mainly to be adapted to webmaster to be handed down to the configuration information of equipment, safeguard letter
Breath, while the warning information, performance information, third party of equipment can also be can configure by information reporting by adaptation layer and give network pipe
Manage layer.Functionally see, equipment adaptation layer can be referred to as NE management layer by we again, and equipment adaptation layer is in PTN device
Hierarchical structure is as shown in figure 1, key-course includes the protocol stack of packet delivery platform, operating system etc..Transport layer then refers to setting
Standby physical layer, it is responsible for specific electro-optical signal conversion.
By equipment adaptation layer, the data using business object as granularity of NML can be changed into business pair
As attribute for granularity data distributing to key-course(Can this data flow direction be referred to as positive direction).On the other hand, equipment is adapted to
Layer can by key-course using data that business object attribute is granularity by interface, it is recognizable to be adapted to NML
Data using business object as particle(Can this data flow direction be referred to as opposite direction).In addition, equipment adaptation layer also will be responsible in real time
Storage;Recover business configuration when equipment is restarted;Incidence relation in configuration between processing business object;Network element alarming performance
Configuration and inquiry may also be realized by equipment adaptation layer.
Wherein, message distribution is a critical function of equipment adaptation layer, therefore, it is necessary to a kind of either to positive direction
Message data still can be transferred through the message distribution that the scheduling feature of equipment adaptation layer is flexibly handled to the message data of opposite direction
Mechanism.
For it is at least one above-mentioned in correlation technique the problem of, not yet propose effective solution at present.
The content of the invention
The invention provides a kind of message distributing method and device, at least to solve to fit not over equipment in correlation technique
The problem of message distribution mechanism flexibly handled with layer.
According to an aspect of the invention, there is provided a kind of message distributing method, it includes:Receive message to be distributed
Afterwards, the message code successively message code progress with the message mapping node of multi-stage scheduling level layer carried according to message to be distributed
Match somebody with somebody;Message to be distributed is sent according to command action corresponding with the message code that the match is successful.
Preferably, before message to be distributed is received, above-mentioned message distributing method also includes:Mapped by default base message
Node derives multi-stage scheduling level layer step by step, wherein, the message mapping node of every grade of scheduling level layer includes following information:The first information
With the second information, the first information is used to representing between message mapping node in message mapping node and last layer scheduling level layer
Derivative logical relation, the second information be used to representing message mapping node treatable message mapping group.
Preferably, every grade of scheduling level layer in multi-stage scheduling level layer includes multiple message mapping nodes, wherein, multiple message
Mapping node is respectively used to the processing message to be distributed that purposes is identical and transmission means is different.
Preferably, the message code carried according to message to be distributed successively disappears with the message mapping node of multi-stage scheduling level layer
Breath code, which carries out matching, to be included:According to message to be distributed carry message code determined from the scheduling level layer of highest series one with
The message mapping node that the message code that message to be distributed carries is matched, wherein, the message code that message to be distributed carries belongs to
The presetting message code scope for the message mapping node determined;Reflected in the message code that message to be distributed carries with the message determined
The message code of node is penetrated in the case that it fails to match, is dispatched according to the first information for the message mapping node determined from last layer
The message mapping node of the derivative message mapping node determined is found in level layer;By the message code that message to be distributed carries with it is upper
The message code of the message mapping node found in one layer of scheduling level layer is matched.
Preferably, the message code of message code message to be distributed carried and the message mapping node found carries out matching bag
Include:According to the pointer for being used to point to the mapping group of the message mapping node found in the second information of the message mapping node found
The mapping group of the message mapping node found, wherein, the element in mapping group includes following information:Message code and disappear with this
Cease the command action of message corresponding to code;The message code that message to be distributed the is carried information code with the element in mapping group one by one
Matched.
Preferably, the message code successively message with the message mapping node of multi-stage scheduling level layer carried in message to be distributed
For code in the case that it fails to match, then the command action defined according to base message mapping node sends message to be distributed.
Preferably, after multi-stage scheduling level layer is derived step by step by base message mapping node, above-mentioned message distributing method is also
Including:The message mapping node of every grade of scheduling level layer is operated, wherein, action type includes:Increase operation, delete behaviour
Make.
Preferably, method also includes:Element in mapping group is operated, wherein, action type includes:Increase behaviour
Make, deletion action.
Preferably, the first information includes:The message in last layer scheduling level layer for pointing to derivative message mapping node
The pointer of mapping node.
According to another aspect of the present invention, there is provided a kind of message distribution device, it includes:Matching module, for receiving
To after message to be distributed, the message code carried according to message to be distributed successively disappears with the message mapping node of multi-stage scheduling level layer
Breath code is matched;Sending module, for sending message to be distributed according to command action corresponding with the message code that the match is successful.
Preferably, above-mentioned message distribution device also includes:Derivative module, for being spread out step by step by default base message mapping node
Raw multi-stage scheduling level layer, wherein, the message mapping node of every grade of scheduling level layer includes following information:The first information and the second letter
Breath, the first information are used to represent the derivative logic between the message mapping node in message mapping node and last layer scheduling level layer
Relation, the second information be used for represent message mapping node treatable message mapping group.
Preferably, matching module includes:Determining unit, for according to the message code that message to be distributed carries from highest series
Scheduling level layer in determine the message mapping node that is matched of message code carried with message to be distributed, wherein, treat
The message code that dispatch messages carry belongs to the presetting message code scope for the message mapping node determined;Processing unit, for
The message code and the message code for the message mapping node determined that message to be distributed carries are in the case that it fails to match, according to determination
The first information of the message mapping node gone out finds disappearing for the derivative message mapping node determined from last layer scheduling level layer
Cease mapping node;Matching unit, for the message code that carries message to be distributed and the message that is found in last layer scheduling level layer
The message code of mapping node is matched.
Preferably, matching unit includes:Subelement is handled, in the second information according to the message mapping node found
The mapping group for the message mapping node that the pointer of mapping group for pointing to the message mapping node found is found, wherein,
Element in mapping group includes following information:The command action of message code and message corresponding with the message code;Coupling subelement,
Matched for the information code of the message code that carries message to be distributed one by one with the element in mapping group.
Preferably, above-mentioned message distribution device also includes:Operation module, for mapping section to the message of every grade of scheduling level layer
Element in point and mapping group is operated, wherein, action type includes:Increase operation, deletion action.
In the present invention, by the way that message of the message code of the message to be distributed received successively with multi-stage scheduling level layer is reflected
The message code for penetrating node is matched to find command action corresponding with above-mentioned message to be distributed, and is sent according to command action
Message to be distributed, realize either the message of the message of positive direction data flow or opposite direction data flow can according to it is upper
The message code for stating the message mapping node of multi-stage scheduling level layer is matched to find corresponding command action, is disappeared to send
Breath, improves the diversity of message distribution, in addition, being treated by the message code of the message mapping node of multi-stage scheduling level layer to search
The command action of dispatch messages, the message mapping node of multi-stage scheduling level layer can change the series of scheduling level layer as needed
Number is put into message mapping node, so as to improve the operability of message distribution, flexibility.
Brief description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, forms the part of the application, this hair
Bright schematic description and description is used to explain the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the hierarchical structure schematic diagram in PTN device according to the equipment adaptation layer of correlation technique;
Fig. 2 is the flow chart of message distributing method according to embodiments of the present invention;
Fig. 3 is the structured flowchart of message distribution device according to embodiments of the present invention;
Fig. 4 is the structured flowchart of another message distribution device according to embodiments of the present invention;
Fig. 5 is the structured flowchart of matching module according to embodiments of the present invention;
Fig. 6 is the structured flowchart of matching unit according to embodiments of the present invention;
Fig. 7 is the structured flowchart of another message distribution device according to embodiments of the present invention;
Fig. 8 is the schematic diagram of Message Map node according to embodiments of the present invention;
Fig. 9 is the schematic diagram of Message Map according to embodiments of the present invention;
Figure 10 is the flow chart that order according to embodiments of the present invention is transmitted;
Figure 11 is the schematic diagram of increase according to embodiments of the present invention with deleting Message Map node;And
Figure 12 is the signal of the message map entry of increase according to embodiments of the present invention with deleting Message Map node
Figure.
Embodiment
Describe the present invention in detail below with reference to accompanying drawing and in conjunction with the embodiments.It should be noted that do not conflicting
In the case of, the feature in embodiment and embodiment in the application can be mutually combined.
A kind of message distributing method is present embodiments provided, as shown in Fig. 2 the message distributing method includes step S202 extremely
Step S204.
Step S202:After receiving message to be distributed, according to message to be distributed carry message code successively with multi-stage scheduling
The message code of the message mapping node of level layer is matched;
Step S204:Message to be distributed is sent according to command action corresponding with the message code that the match is successful.
By above-mentioned steps, by by the message code of the message to be distributed received the successively message with multi-stage scheduling level layer
The message code of mapping node is matched to find command action corresponding with above-mentioned message to be distributed, and is sent out according to command action
The message to be distributed is sent, realizing the either message of the message of positive direction data flow or opposite direction data flow can root
Matched according to the message code of the message mapping node with above-mentioned multi-stage scheduling level layer to find corresponding command action, to send out
Message is sent, improves the diversity of message distribution, in addition, being looked into by the message code of the message mapping node of multi-stage scheduling level layer
The command action of message to be distributed is looked for, the message mapping node of multi-stage scheduling level layer can change scheduling level layer as needed
Sum of series message mapping node is put into number, so as to improve the operability of message distribution, flexibility.
In order to improve the autgmentability of message distribution, it is easy to safeguard, in the preferred embodiment, is receiving message to be distributed
Before, above-mentioned multi-stage scheduling level layer is derived by default base message mapping node step by step, wherein, the message mapping of every grade of scheduling level layer
Node includes following information:The first information and the second information, the first information are used to represent the message mapping node and last layer
The derivative logical relation between message mapping node in scheduling level layer, second information are used to represent the message mapping node institute
The mapping group of treatable message.
In above preferred embodiment, multi-stage scheduling level layer is derived by above-mentioned steps, it is clear between scheduling level layers at different levels
The level of Chu's expression interface scheduling, while be also the guiding of message route lines to be distributed, when equipment adaptation layer receives positive direction
Or during opposite direction message to be distributed, be scheduled by above-mentioned multi-stage scheduling level layer, can be neatly by message distribution to be distributed
Go out, meanwhile, above-mentioned multi-stage scheduling level layer can at least include two message mapping nodes, specifically can be as needed(For example,
The dispensed amount of message, the species of message)To adjust the number of the sum of series message mapping node of scheduling level layer, dynamic dispatching is realized
The process of message route, so as to improve the autgmentability of message distribution, maintainability.
In order to improve the diversity of message distribution, meet the needs of different application scene, it is in the preferred embodiment, multistage
Every grade of scheduling level layer in scheduling level layer includes multiple message mapping nodes, wherein, multiple message mapping nodes are respectively used to locate
The reason message to be distributed that purposes is identical and transmission means is different.
During the command action of message to be distributed is searched, it can be realized by following steps, according to be distributed
The message code that message carries successively carries out matching with the message code of the message mapping node of multi-stage scheduling level layer to be included:According to above-mentioned
The message code that message to be distributed carries determines one and above-mentioned message carrying to be distributed from the scheduling level layer of highest series
The message mapping node that message code is matched, wherein, message code that above-mentioned message to be distributed carries belongs to above-mentioned and determined
The presetting message code scope of message mapping node;Reflected in the message code that above-mentioned message to be distributed carries with the above-mentioned message determined
The message code of node is penetrated in the case that it fails to match, according to the first information of the above-mentioned message mapping node determined from last layer
The message mapping node of the derivative message mapping node determined is found in scheduling level layer;Disappear what above-mentioned message to be distributed carried
The message code for ceasing message mapping node of the code with being found in last layer scheduling level layer is matched.Regularly to realize above-mentioned treat point
The process that the message code that hair message carries successively is matched with the message code of the message mapping node of multi-stage scheduling level layer, is helped
In the efficiency for improving message distribution.
, in the preferred embodiment, will be above-mentioned in order to correctly find command action corresponding with above-mentioned message to be distributed
The message code and the message code of the above-mentioned message mapping node found that message to be distributed carries, which carry out matching, to be included:Looked for according to above-mentioned
To message mapping node the second information in the pointer of mapping group that is used to point to the message mapping node found find
The mapping group of the message mapping node found is stated, wherein, the element in the mapping group includes following information:Message code and disappear with this
Cease the command action of message corresponding to code;The message code that message to be distributed the is carried information code with the element in mapping group one by one
Matched.I.e. by carrying out the message code of above-mentioned message to be distributed with the information code of the element in above-mentioned mapping group one by one
Match somebody with somebody to find command action corresponding with above-mentioned message to be distributed, so as to be favorably improved find it is corresponding with above-mentioned message to be distributed
Command action accuracy rate.
In order to meet the needs of different application scene, in the preferred embodiment, disappear what above-mentioned message to be distributed carried
Code is ceased successively with the message code of the message mapping node of multi-stage scheduling level layer in the case that it fails to match, then according to above-mentioned base message
The command action that mapping node defines sends message to be distributed.
In order to improve message transmission flexibility, autgmentability, in the preferred embodiment, by base message mapping node by
After the derivative multi-stage scheduling level layer of level, the message mapping node of every grade of scheduling level layer is operated, wherein, action type bag
Include:Increase operation, deletion action.
In order to further improve the flexibility of message transmission, autgmentability, in the preferred embodiment, mapped by base message
After node derives multi-stage scheduling level layer step by step, the element in mapping group is operated, wherein, action type includes:Increase
Operation, deletion action.
In order to correctly find the message mapping node in last layer scheduling level layer, in the preferred embodiment, above-mentioned
One information can include:The finger of the message mapping node in last layer scheduling level layer for pointing to derivative message mapping node
Pin.
A kind of message distribution device is provided in the preferred embodiment, as shown in figure 3, the message distribution device includes:
Matching module 302, after receiving message to be distributed, according to message to be distributed carry message code successively with multi-stage scheduling level
The message code of the message mapping node of layer is matched;Sending module 304, be connected to matching module 302, for according to matching
Command action corresponding to successful message code sends message to be distributed.
In above preferred embodiment, by matching module 302 by the message code of the message to be distributed received successively with
The message code of the message mapping node of multi-stage scheduling level layer is matched to be moved to find order corresponding with above-mentioned message to be distributed
Make, sending module 304 sends message to be distributed according to command action, realizes the either message of positive direction data flow or anti-
The message of bearing data stream can be matched according to the message code of the message mapping node with above-mentioned multi-stage scheduling level layer come
Corresponding command action is found, to send message, improves the diversity of message distribution, in addition, passing through multi-stage scheduling level layer
The message code of message mapping node search the command action of message to be distributed, the message mapping node of multi-stage scheduling level layer can
To be put into number as needed to change the sum of series message mapping node of scheduling level layer, so as to improve grasping for message distribution
The property made, flexibility.
In order to improve the autgmentability of message distribution, it is easy to safeguard, in the preferred embodiment, as shown in figure 4, above-mentioned message
Dispensing device also includes:Derivative module 306, for deriving multi-stage scheduling level layer step by step by default base message mapping node, wherein,
The message mapping node of every grade of scheduling level layer includes following information:The first information and the second information, the first information disappear for expression
The derivative logical relation between the message mapping node in mapping node and last layer scheduling level layer is ceased, the second information is used to represent
Message mapping node treatable message mapping group.
In order to improve the diversity of message distribution, meet the needs of different application scene, in the preferred embodiment, such as scheme
Shown in 5, above-mentioned matching module 302 includes:Determining unit 3022, for according to the message code that message to be distributed carries from the superlative degree
The message mapping node that a message code carried with message to be distributed is matched is determined in several scheduling level layers, wherein,
The message code that message to be distributed carries belongs to the presetting message code scope for the message mapping node determined;Processing unit 3024,
Determining unit 3022 is connected to, for the message code carried in message to be distributed and the message code for the message mapping node determined
In the case that it fails to match, derivative is found from last layer scheduling level layer according to the first information for the message mapping node determined
The message mapping node for the message mapping node determined;Matching unit 3026, processing unit 3024 is connected to, for that will treat point
The message code of message mapping node of the message code that hair message carries with being found in last layer scheduling level layer is matched.
During the command action of message to be distributed is searched, as shown in fig. 6, above-mentioned matching unit 3026 includes:Place
Subelement 602 is managed, for being used to point to the message mapping node found in the second information according to the message mapping node found
Mapping group the mapping group of message mapping node that finds of pointer, wherein, the element in mapping group includes following information:
The command action of message code and message corresponding with the message code;Coupling subelement 604, processing subelement 602 is connected to, is used for
Information code of the message code that message to be distributed is carried one by one with the element in mapping group is matched.
In order to correctly find command action corresponding with above-mentioned message to be distributed, in the preferred embodiment, above-mentioned
With subelement 604, it is additionally operable to be used to point to the message found in the second information according to the above-mentioned message mapping node found
The pointer of the mapping group of mapping node finds the mapping group of the above-mentioned message mapping node found, wherein, the member in the mapping group
Element includes following information:The command action of message code and message corresponding with the message code;The message that message to be distributed is carried
Information code of the code one by one with the element in mapping group is matched.I.e. by by the message code of above-mentioned message to be distributed one by one with it is upper
The information code for stating the element in mapping group is matched to find command action corresponding with above-mentioned message to be distributed, so as to help
In improving the accuracy rate that finds command action corresponding with above-mentioned message to be distributed.
In order to meet the needs of different application scene, in the preferred embodiment, as shown in fig. 7, above-mentioned message distribution fills
Putting also includes:Operation module 308, grasped for the element in the message mapping node and mapping group to every grade of scheduling level layer
Make, wherein, action type includes:Increase operation, deletion action.
Above-mentioned each preferred embodiment is described in detail below in conjunction with accompanying drawing.
For the ease of description, the message mapping node of above-mentioned multi-stage scheduling level layer is reflected with message in the following examples
The form of firing table represents, and is described by taking the distribution of PTN device adaptation layer message as an example.
Implement the process of Message Map node as shown in figure 8, Message Map node(Map and save equivalent to above-mentioned message
Point)LAYERNODE is may be defined as, each Message Map node can include following information:
The Part I member of Message Map node(Equivalent to the above-mentioned first information)It is for maintenance schedule level layer
Logical relation, the Message Map node for indicating the scheduling level layer are the Message Map node derivatives by which layer scheduling level layer
Come, for example, it is by Message Map node that Message Map node S1 P1 marks, which are used for description messages mapping table node S2,
It the scheduling level layer that S1 derives from, can be specifically the following form of expression, point to the pointer of Message Map node in last layer.
Message Map node Part II member(Equivalent to above-mentioned second information)It is used to refer to disappearing for the scheduling level layer
Cease the treatable message mapping group of mapping table node(Equivalent to above-mentioned mapping group)With the message for pointing to this Message Map node
The pointer of array is mapped, message mapping group can use the form of elongated array, array member(Equivalent to above-mentioned element)Structure
Can be following form, for example, the combining structure of { message code, ordering }, Message Map node S1 pointer PA1 points to array
A1, array A1 element are Ti(I=0,1 ... n), Ti structure is the combining structure of { message code, ordering }, has the special elementses to be
{ 0, NULL }, the message mapping of the element are used to refer to last element of message mapping array.
Two Message Map nodes for having derived relation have identical member's structure type, simply structure member
Value it is different.
For the ease of implementing, above-mentioned scheduling level and Message Map node can be real by the form of Message Map
Existing, the implementation process is as shown in Figure 9.In order to improve the diversity of message distribution, Message Map is reflected by two or more message
Firing table node is formed, i.e. Message Map at least two Message Map nodes, and one is base Message Map node S0(Phase
When in above-mentioned base message mapping node), all Message Map nodes are all derived from base Message Map node in schedule level one
S0, for example, the Message Map node S3 in schedule level one is derived from Message Map node S0, and the message in second-level dispatching
Mapping table node S4, S5 are derived from Message Map node S3, the like.By by Message Map node organization into one
There is the mapping table of logicality, equipment adaptation layer is receiving the message of management level or key-course(Equivalent to above-mentioned message to be distributed)
When, this mapping table can be just used, performs the command action with this match messages.
Preferably, in order to improve the flexibility of message distribution, in the preferred embodiment, above-mentioned every grade of scheduling level can be with
Including multiple Message Map nodes, for example, second-level dispatching level includes Message Map node S4, S5, certainly, according to need
Want every grade of scheduling level that more Message Map nodes can be set, wherein, multiple message mapping in every grade of scheduling level
Table node handles the message that purposes is identical and transmission means is different respectively.
Implementation is as shown in Figure 10 come the order transmittance process of dispatch messages according to above-mentioned Message Map, and the process includes step
Rapid S1002 to step S1012.
Step S1002:When equipment adaptation layer is receiving the message of management level or key-course(Disappear equivalent to the distribution of above-mentioned band
Breath)When, the scheduling level layer according to the Part II member of the message code of the message and the Message Map node from highest layer
In a Message Map node message mapping group message code in look for the message code of above-mentioned message, the message code of the message
Belong to the presetting message code scope of above-mentioned Message Map node.Exemplified by improve the convenience of implementation, in the scheduling of highest layer
It is in advance each one message code scope of Message Map node distribution when level layer includes multiple Message Map nodes, should
Message corresponding to part messages code in the range of the Message Map node processing message code, message corresponding to other message codes point
Do not handled by the Message Map node of other grade layer associated with the Message Map node, for example, as shown in figure 9,
If three Levels Scheduling also includes Message Map node S7, a message is distributed respectively for Message Map node S6 and S7 in advance
Code scope, and the message code of the message now received belongs to Message Map node S6 message code scope, then by message by
Message Map node S6 start to process, still, Message Map node S6 handles the part messages code in the range of its message code
Corresponding message, message corresponding to other message codes are handled by Message Map node S5 and S3 respectively, can be pointed in PA6
Identical message code is searched in message mapping array A6.
Step S1004:Judge whether to have found the message code identical message code with above-mentioned message, if so, then going to step
Rapid S1010, if it is not, then going to step S1006.
Step S1006:If not finding, pass through the Part I data of the Message Map node of this scheduling level layer
Member, the Message Map node of the Message Map node derived from last layer scheduling level layer is found, for example, as shown in figure 9,
If the end mapping { 0, NULL } into breath mapping array A6 is not found also, show that Message Map node S6 can not
The command action of execution, the Message Map node S5 of two layers of scheduling level layer is found by P6, carries out same lookup, successively class
Push away.
Step S1008:Whether the Message Map node for the last layer scheduling level layer for judging to find is base Message Map
Node S0, if so, step S1012 is then gone to, if it is not, then going to step S1002.
Step S1010:If found, command action corresponding with above-mentioned message code is performed, sends above-mentioned message, and
Terminate this flow.
Step S1012:If base Message Map node S0, then the order of base Message Map node S0 acquiescences is performed
Action, and terminate this flow, if for example, the message found under Message Map node S3 maps array still without executable
Command action, then perform the executable command action of base Message Map node S0 acquiescence, such as returned to management level or key-course
Receipt row message result, or return to mistake.
In order to improve the flexibility of message distribution, diversity, autgmentability, in the preferred embodiment, can provide following
Operation to Message Map:
1)The Message Map node of increase scheduling level.
2)Delete the Message Map node of scheduling level.
3)Increase the message map entry of Message Map node.
4)Delete the message map entry of Message Map node.
Figure 11 is the schematic diagram of increase according to embodiments of the present invention with deleting Message Map node, as shown in figure 11,
Message Map node can be operated, for example, the Message Map node of increase scheduling level, can be connect by following
Mouthful abstract expression is realized:
AddLayerNode(LAYERNODE BaseLyaerNode,LAYERNODE NewLayerNode);
Wherein, LAYERNODE is Message Map node structure, and parameter BaseLyaerNode is that last layer dispatches level
Message Map node, NewLayerNode is to need newly-generated Message Map node, and the two parameters have identical
LAYERNODE structures will generate new derivation S1 message mapping node S2 when performing AddMsgItem (S1, S2).
The Message Map node of scheduling level is deleted, can be expressed by following interface abstraction to realize:
SubLayerNode(LAYERNODE LayerNode);
Wherein, LayerNode is Message Map node to be deleted.Message Map node only need to be provided, is connect
Mouth SubLayerNode can be matched in whole Message Map, delete this Message Map node from Message Map
Remove.When needing to delete Message Map node S3, SubLayerNode (S3) is performed.
Figure 12 is the signal of the message map entry of increase according to embodiments of the present invention with deleting Message Map node
Figure, as shown in figure 12, can be operated to the message map entry of Message Map node, for example, increase mapping table node
Message map entry, can be expressed and realized by following interface abstraction:
AddMsgItem(LAYERNODE LayerNode, TYPE MsgCode, FUNCTION MsgFunction);
Wherein, LayerNode is the Message Map node that need to increase message map entry, and TYPE is user's self-defining
Information order code type, MsgCode be message map entry message code, Function be message map entry order move
Make type, MsgFunction is the command action of message map entry.Increase message mapping bar under Message Map node S2
Mesh T1 { 1, FUNCTION }, perform AddMsgItem (S2,1, FUNCTION1).
The message map entry of mapping table node is deleted, can be expressed by following interface abstraction to realize:
SubMsgItem(LAYERNODE LayerNode, TYPE MsgCode);
Wherein, LayerNode be message map entry to be deleted residing Message Map node, TYPE be user from
The information order code type of row definition, MsgCode are the message code of message map entry.Deleted under Message Map node S2
Message map entry T2, perform SubMsgItem (S2,2).
As can be seen from the above description, following technique effect is above embodiments enabled:By being treated what is received
The message code of dispatch messages successively matched with the message code of the message mapping node of multi-stage scheduling level layer find with it is above-mentioned
Command action corresponding to message to be distributed, and the message to be distributed is sent according to command action, realize either positive direction
The message of data flow or the message of opposite direction data flow can be according to the message mapping nodes with above-mentioned multi-stage scheduling level layer
Message code matched to find corresponding command action, to send message, improve the diversity of message distribution, separately
Outside, the command action of message to be distributed, multi-stage scheduling are searched by the message code of the message mapping node of multi-stage scheduling level layer
The sum of series message mapping node that the message mapping node of level layer can change scheduling level layer as needed is put into number, so as to
Improve the operability of message distribution, flexibility.
Obviously, those skilled in the art should be understood that above-mentioned each module of the invention or each step can be with general
Computing device realize that they can be concentrated on single computing device, or be distributed in multiple computing devices and formed
Network on, alternatively, they can be realized with the program code that computing device can perform, it is thus possible to they are stored
Performed in the storage device by computing device, and in some cases, can be with different from shown in order execution herein
The step of going out or describing, they are either fabricated to each integrated circuit modules respectively or by multiple modules in them or
Step is fabricated to single integrated circuit module to realize.So, the present invention is not restricted to any specific hardware and software combination.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area
For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies
Change, equivalent substitution, improvement etc., should be included in the scope of the protection.
Claims (12)
- A kind of 1. message distributing method, it is characterised in that including:After receiving message to be distributed, the message code that is carried according to the message to be distributed successively message with multi-stage scheduling level layer The message code of mapping node is matched;The message to be distributed is sent according to command action corresponding with the message code that the match is successful;Wherein, before the message to be distributed is received, in addition to:Derived step by step by default base message mapping node described more Level scheduling level layer, wherein, the message mapping node of every grade of scheduling level layer includes following information:The first information and the second information, institute The first information is stated to be used to represent the derivative between the message mapping node in message mapping node and last layer the scheduling level layer Logical relation, second information be used for represent the message mapping node treatable message mapping group.
- 2. according to the method for claim 1, it is characterised in that every grade of scheduling level layer in the multi-stage scheduling level layer includes Multiple message mapping nodes, wherein, the multiple message mapping node is respectively used to handle purposes identical and transmission means is different Message to be distributed.
- 3. according to the method for claim 1, it is characterised in that the message code carried according to the message to be distributed successively with The message code of the message mapping node of multi-stage scheduling level layer, which carries out matching, to be included:The message code carried according to the message to be distributed determines that one is treated point with described from the scheduling level layer of highest series The message mapping node that the message code that hair message carries is matched, wherein, the message code that the message to be distributed carries belongs to The presetting message code scope for the message mapping node determined;It fails to match for the message code and the message code of the message mapping node determined carried in the message to be distributed In the case of, found according to the first information of the message mapping node determined from last layer scheduling level layer derivative described true The message mapping node for the message mapping node made;By disappearing for the message code that the message to be distributed carries and the message mapping node that is found in the last layer scheduling level layer Breath code is matched.
- 4. according to the method for claim 3, it is characterised in that look for the message code that the message to be distributed carries with described To the message code of message mapping node carry out matching and include:The message mapping node found according to being used to point in the second information of the message mapping node found reflects The pointer for penetrating group finds the mapping group of the message mapping node found, wherein, the element in the mapping group includes following Information:The command action of message code and message corresponding with the message code;Information code of the message code that the message to be distributed is carried one by one with the element in the mapping group is matched.
- 5. the method according to claim 3 or 4, it is characterised in that in the message code that the message to be distributed carries successively With the message code of the message mapping node of the multi-stage scheduling level layer in the case that it fails to match, then mapped according to the base message The command action of node definition sends the message to be distributed.
- 6. according to the method for claim 1, it is characterised in that described more being derived step by step by the base message mapping node After level scheduling level layer, in addition to:The message mapping node of every grade of scheduling level layer is operated, wherein, the type of the operation includes:Increase behaviour Make, deletion action.
- 7. according to the method for claim 4, it is characterised in that methods described also includes:Element in the mapping group is operated, wherein, the type of the operation includes:Increase operation, deletion action.
- 8. according to the method for claim 1, it is characterised in that the first information includes:Disappear for pointing to described in derivative Cease the pointer of the message mapping node in the last layer scheduling level layer of mapping node.
- A kind of 9. message distribution device, it is characterised in that including:Matching module, after receiving message to be distributed, the message code that is carried according to the message to be distributed successively with multistage The message code of the message mapping node of scheduling level layer is matched;Sending module, for sending the message to be distributed according to command action corresponding with the message code that the match is successful;Wherein, the message distribution device also includes:Derivative module, described in being derived step by step as default base message mapping node Multi-stage scheduling level layer, wherein, the message mapping node of every grade of scheduling level layer includes following information:The first information and the second information, The first information is for spreading out between representing the message mapping node in message mapping node and last layer the scheduling level layer Raw logical relation, second information be used to representing the message mapping node treatable message mapping group.
- 10. device according to claim 9, it is characterised in that the matching module includes:Determining unit, the message code for being carried according to the message to be distributed determine one from the scheduling level layer of highest series The message mapping node that the individual message code carried with the message to be distributed is matched, wherein, the message to be distributed carries Message code belong to the presetting message code scope of the message mapping node determined;Processing unit, for the message of the message code and the message mapping node determined that are carried in the message to be distributed Code is looked for according to the first information of the message mapping node determined from last layer scheduling level layer in the case that it fails to match To the message mapping node for the message mapping node determined described in derivative;Matching unit, for the message code for carrying the message to be distributed and the message found in the last layer scheduling level layer The message code of mapping node is matched.
- 11. device according to claim 10, it is characterised in that the matching unit includes:Handle subelement, for be used to pointing in the second information of message mapping node for finding according to it is described find disappear The pointer for ceasing the mapping group of mapping node finds the mapping group of the message mapping node found, wherein, in the mapping group Element include following information:The command action of message code and message corresponding with the message code;Coupling subelement, for the message code that the carries the message to be distributed information with the element in the mapping group one by one Code is matched.
- 12. device according to claim 11, it is characterised in that also include:Operation module, grasped for the element in the message mapping node and the mapping group to every grade of scheduling level layer Make, wherein, the type of the operation includes:Increase operation, deletion action.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210247246.XA CN103546520B (en) | 2012-07-17 | 2012-07-17 | message distributing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210247246.XA CN103546520B (en) | 2012-07-17 | 2012-07-17 | message distributing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103546520A CN103546520A (en) | 2014-01-29 |
CN103546520B true CN103546520B (en) | 2018-03-09 |
Family
ID=49969563
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210247246.XA Active CN103546520B (en) | 2012-07-17 | 2012-07-17 | message distributing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103546520B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109089163B (en) * | 2018-07-27 | 2021-05-28 | 武汉斗鱼网络科技有限公司 | Bullet screen message distribution method, device, equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1407451A (en) * | 2001-08-29 | 2003-04-02 | 深圳市中兴通讯股份有限公司上海第二研究所 | Command backtracking method for embedded gateway command line interface |
CN101247337A (en) * | 2008-02-18 | 2008-08-20 | 华为技术有限公司 | Packet forwarding method and equipment |
CN102497435A (en) * | 2011-12-16 | 2012-06-13 | 海南杰福瑞网络科技有限公司 | Data distributing method and device of data service |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI256940B (en) * | 2004-06-18 | 2006-06-21 | Walsin Lihwa Corp | Integration manufacturing process for MEMS element |
-
2012
- 2012-07-17 CN CN201210247246.XA patent/CN103546520B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1407451A (en) * | 2001-08-29 | 2003-04-02 | 深圳市中兴通讯股份有限公司上海第二研究所 | Command backtracking method for embedded gateway command line interface |
CN101247337A (en) * | 2008-02-18 | 2008-08-20 | 华为技术有限公司 | Packet forwarding method and equipment |
CN102497435A (en) * | 2011-12-16 | 2012-06-13 | 海南杰福瑞网络科技有限公司 | Data distributing method and device of data service |
Also Published As
Publication number | Publication date |
---|---|
CN103546520A (en) | 2014-01-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104283806B (en) | Business chain processing method and equipment | |
CN103309738B (en) | User job dispatching method and device | |
CN105556916B (en) | The information statistical method and device of network flow | |
WO2008061042A3 (en) | Managing aggregation and sending of communications | |
CN101789949B (en) | Method and router equipment for realizing load sharing | |
CN105264509A (en) | Adaptive interrupt coalescing in a converged network | |
CN101009649A (en) | Queue management in a network processor | |
US7554914B1 (en) | System and method for adaptively balancing network traffic over router output ports | |
CN110351286A (en) | Link flood attack detects response mechanism in a kind of software defined network | |
CN104852869B (en) | A kind of port convergence method and device | |
CN103916274B (en) | A kind of parallel network element cut-in method of many examples and system | |
CN108605017A (en) | Inquiry plan and operation perception communication buffer management | |
CN109462634A (en) | Message treatment method, device and equipment in a kind of distributed system | |
CN102707696A (en) | Multi-serial-port data transmission method and transmission center system | |
CN103957267A (en) | Multi-network multi-task multi-node data distribution method | |
CN103546520B (en) | message distributing method and device | |
CN109981456A (en) | The intelligent buffer for being used to be grouped rearrangement of dummy node in network equipment | |
CN106453092B (en) | A kind of route renewing method and device | |
CN107135116A (en) | Method and apparatus for carrying out detection of connectivity | |
CN101753266B (en) | Network topology search and error control optimization method of coaxially-loading Ethernet equipment | |
CN107249192A (en) | A kind of method for monitoring state and device of shared network section | |
CN108696455A (en) | Method and device for processing service flow | |
CN104838624B (en) | The method, apparatus and system that a kind of control business data forward in virtual network | |
CN105978942A (en) | Fragmented CDN network | |
CN101820394B (en) | Statistical method and equipment of access flow |
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 |