CN107332787A - A kind of message distributing method and device - Google Patents

A kind of message distributing method and device Download PDF

Info

Publication number
CN107332787A
CN107332787A CN201710516647.3A CN201710516647A CN107332787A CN 107332787 A CN107332787 A CN 107332787A CN 201710516647 A CN201710516647 A CN 201710516647A CN 107332787 A CN107332787 A CN 107332787A
Authority
CN
China
Prior art keywords
message
queue
preset attribute
distribution
sender
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.)
Pending
Application number
CN201710516647.3A
Other languages
Chinese (zh)
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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201710516647.3A priority Critical patent/CN107332787A/en
Publication of CN107332787A publication Critical patent/CN107332787A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/2871Implementation details of single intermediate entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the present application provides a kind of message distributing method and device, is related to Message Processing field.Methods described includes:Each preset attribute for subscribing to message queue of configuration;Presetting message form is determined with message sender;Receive the message that message sender is sent;According to the preset attribute of the subscription message queue, the message distribution of matching is subscribed into message queue to corresponding.Realize that message recipient actively sets the purpose for the attribute for subscribing to message, and message distribution services device is handled message by preset message attributes, and corresponding message queue is sent to, the efficiency of Message Processing is improved on the premise of not increase Message Processing cost.

Description

A kind of message distributing method and device
Technical field
The application is related to message processing technique field, more particularly to a kind of message distributing method and a kind of message distribution dress Put.
Background technology
At present, in message-oriented treatment mechanism, conventional ActiveMQ design object is to provide standard, can Across multilingual and multisystem application integration message communicating middleware, ActiveMQ realizes JMS standards and there is provided a lot Additional characteristic.These additional characteristics include, and (java Management Extensions, i.e. java management is expanded for JMX management Exhibition), principal and subordinate's management (master/salve), message groups communication, ordered message management.Message priority, the delay for subscribing to message Receive, recipient treats slow, virtual recipient, ripe message duration technology, support vernier operate, support turning for message Change, EIP can be supported by using Apache Camel, easily message queue is supervised using the form of mirror image queue Control etc..
Wherein, the ActiveMQ used based on message distribution virtual theme (Virtual Topics), it is multiple realizing Distribution policy during the same topic message of Subscriber subscriptions is matches corresponding message queue name and topic, and the strategy is applicable When there is a small amount of topic and can distinguish type of message, and in the case where size of message is huge, subscriber sets a topic Afterwards, all message related to the topic can be received, cause subscriber to receive the message being much not relevant for, Seriously add Message Processing efficiency.
For above-mentioned situation, if distinguishing type of message using a large amount of topic, sender can be caused using a large amount of Topic distinguishes a large amount of message, so that cause the maintenance cost of sender to dramatically increase, and because message queue can not Receive multiple topic message, subscriber is also required to the message that newly-built a large amount of message queues are used for receiving a large amount of topic of correspondence, And when the type of message for needing to receive changes, it is necessary to write code or local configuration file again to adapt to update, institute To cause Message Processing inefficiency and the problem of the maintenance cost of sender and recipient are all dramatically increased.
The content of the invention
In view of the above problems, it is proposed that the embodiment of the present application overcomes above mentioned problem or at least in part to provide one kind A kind of message distributing method and a kind of corresponding message distribution device solved the above problems.
In order to solve the above problems, this application discloses a kind of message distributing method, including:Configure each subscription message queue Preset attribute;Presetting message form is determined with message sender;Receive the message that message sender is sent;Subscribed to according to described The preset attribute of message queue, message queue is subscribed to by the message distribution of matching to corresponding.
Optionally, the preset attribute according to the subscription message queue, by the message distribution of matching to ordering accordingly The step of readding message queue, including:The message attributes of the message received each are subscribed into the default of message queue with described Attribute is matched one by one;If the match is successful, the message distribution of matching is subscribed into message queue to corresponding.
Optionally, the step of preset attribute of each subscription message queue of the configuration, including:Obtain and subscribe to message queue Preset attribute;The preset attribute includes type of message, message format, message table type, message sender title, message sink Priority one or more therein;Each configuration file for subscribing to message queue of correspondence is configured according to the preset attribute.
Optionally, the step of message that the reception message sender is sent, including:Whether supervisory messages receiving port connects Receive new message;If receiving new message, the message attributes with the message of presetting message form same format are obtained.
Optionally, before the step of the preset attribute of each subscription message queue of the configuration, in addition to:Receive message master Inscribe request to create;Message subject is created, and creates message queue corresponding with the message subject.
Optionally, before the step of the preset attribute of each subscription message queue of the configuration, in addition to:Receive subscriber Message queue connection request;By according to the message queue matched in the message queue connection request, built with the subscriber Vertical connection.
Optionally, before the step of the preset attribute of each subscription message queue of the configuration, in addition to:Receive message master Inscribe request to create;Message subject is created, and creates subscription message queue corresponding with the message subject.
This application discloses a kind of message distribution device, including:Preset attribute module, for configuring each subscription message queue Preset attribute;Presetting message format module, for determining presetting message form with message sender;Message reception module, is used In the message for receiving message sender transmission;Message distribution module, will for the preset attribute according to the subscription message queue The message distribution of matching subscribes to message queue to corresponding.
Optionally, the message distribution module, including:Match messages submodule, for by the message received Message attributes are matched one by one with each preset attribute for subscribing to message queue;Message distribution submodule, if for matching Success, then subscribe to message queue by the message distribution of matching to corresponding.
Optionally, the preset attribute module, including:Preset attribute submodule is received, message queue is subscribed to for obtaining Preset attribute;The preset attribute includes type of message, message format, message table type, message sender title, message and connect Receive priority one or more therein;Configuration file submodule is changed, for respectively being ordered according to preset attribute configuration correspondence Read the configuration file of message queue.
Optionally, the message reception module, including:New information submodule is detected, is for supervisory messages receiving port It is no to receive new message;Message attributes submodule is extracted, if for receiving new message, obtaining and presetting message form The message attributes of the message of same format.
Optionally, before the preset attribute module, in addition to:Theme request to create receiving module, disappears for receiving Cease theme request to create;Message subject module is created, for creating message subject, and disappear corresponding with the message subject is created Cease queue.
Optionally, before the preset attribute module, in addition to:Message queue connection request receiving module, for connecing Receive the message queue connection request of subscriber;Link block is set up, for that will be matched according in the message queue connection request Message queue, with the subscriber set up be connected.
Optionally, before the preset attribute module, in addition to:Message queue request to create receiving module, for connecing Receive message subject request to create;Message queue creation module, for creating message subject, and is created corresponding with the message subject Subscription message queue.
The embodiment of the present application includes advantages below:The embodiment of the present application, according to the default category for configuring each subscription message queue Property;Presetting message form is determined with message sender;Receive the message that message sender is sent;According to the subscription message queue Preset attribute, the message distribution of matching is subscribed into message queue to corresponding.It can be realized for each by said process The message queue of individual subscriber, configures the content and/or attribute and message format of its needs, when receiving new message, Message distribution is carried out according to the condition of configuration, it is ensured that each subscriber receives only the message of needs, reduces Message Processing Pressure, improves Message Processing efficiency.
Brief description of the drawings
Fig. 1 is a kind of step flow chart for message distributing method embodiment that the embodiment of the present application is provided;
Fig. 2 is the step flow chart for another message distributing method embodiment that the embodiment of the present application is provided;
Fig. 3 is a kind of structured flowchart for message distribution device embodiment that the embodiment of the present application is provided;
Fig. 4 is the structured flowchart for another message distribution device embodiment that the embodiment of the present application is provided;
Fig. 5 is a kind of structured flowchart for message distributing system embodiment that the embodiment of the present application is provided.
Embodiment
It is below in conjunction with the accompanying drawings and specific real to enable above-mentioned purpose, the feature and advantage of the application more obvious understandable Mode is applied to be described in further detail the application.
Embodiment one
Reference picture 1, shows a kind of step flow chart of message distributing method embodiment of the application, can specifically include Following steps:
Step 101, each preset attribute for subscribing to message queue of configuration.
In the embodiment of the present invention, when setting message distributing system, first have to according to message recipient to subscribing to message It is required that, the queue attributes and/or content on each subscription message queue are set on message distribution services device, wherein can wrap Include, the keyword or sentence of Filter messages content, type of message, informed source, the restrictive condition such as message priority.For example, when one Message receiver N sets the attribute of a message queue to be the message that keyword is " Europe Cup result of the match ", and informed source Message sender A is set to, type of message is word message, and the priority of message is the first order, then work as message distribution services Device is received after message, and the message of message sender transmission is selected first, is then sieved by keyword " Europe Cup result of the match " The message content that meets is selected, finally confirms for the message distribution of the first order to disappear message priority to message receiver N is corresponding Cease queue.
Step 102 and message sender determine presetting message form.
In the embodiment of the present invention, message distribution services device first has to and disappeared before message sender transmission message is received Breath sender reaches an agreement on sending message, wherein mainly include the form of message content, with message sender When sending the message of specified format, message distribution services device can be handled.
In actual applications, reaching with message sender can also disappear in an agreement on sending message including other The attribute of breath, depends primarily on service that message distribution services device can provide and the ability for handling message, and at any time can be with Changed according to the change of server property, the embodiment of the present invention is not any limitation as to this.
Step 103, the message for receiving message sender transmission.
In the embodiment of the present invention, after the form or attribute of received message is set, when message sender is produced newly During message, the new information will be sent to message distribution services device, wherein, the mode that Distributor receives message can root According to the means of communication used in practical application it is proud realize, can include it is wired and wireless two kinds, no matter any reception mode, All follow a message and send rule, for example, message distribution services device is probably a MQ (Message Queue message queue) Server, and message queue (MQ) is a kind of communication means of application program to application program, wherein to follow specific communication Principle, to meet the communication requirement under different scenes, such as asynchronous communication, message queue provides Asynchronous Invocation, it is allowed to use One message is put into queue by family, but does not immediately treat it.Want to be put into how much message just puts how many into queue, then needing Go to handle them again when wanting, or in the case of processing redundancy, the process of processing data can fail.Except non-data is lasting Change, otherwise will cause to lose.Data are carried out persistence until they have been fully processed by message queue, pass through this mode Loss of data risk is evaded.In " insertion-acquisition-deletion " normal form that many message queues are used, a message from , it is necessary to which your processing system clearly points out that the message is processed, so that it is guaranteed that your number before being deleted in queue According to by the preservation of safety until you are using finishing.MQ common protocols have AMQP agreements, and AMQP is Advanced Message Queuing Protocol, the application layer standard advanced message queue protocol of an offer unified message service is application layer association One open standard of view, is designed for message-oriented middleware.Client based on this agreement can be transmitted with message-oriented middleware Message, not by client or middleware different product, the limitation of the condition such as different development language.XMPP is (expansible to disappear Breath processing Presence Protocol, Extensible Messaging and Presence Protocol) it is to be based on extensible markup language The agreement of (XML) is sayed, is used for instant message (IM) and online in-situ measurement.Grasped immediately suitable for the standard between server Make.Core is that, based on XML stream transmission, this agreement may finally allow Internet user to be sent out to all other men on internet Instant message is sent, even if its operating system is different with browser.
Certainly, different agreements can be used according to different Message Processing demands, is not limited in foregoing description, this hair Bright embodiment is not any limitation as to this.
Step 104, the preset attribute according to the subscription message queue, the message distribution of matching to corresponding subscription is disappeared Cease queue.
In the embodiment of the present invention, after message distribution services device receives the message of message sender transmission, according to preset The attribute of subscription message queue the message is handled, whether before treatment, it is rule that the message received is detected first Fixed form, if not just abandon processing, and send a receipt to message sender, if defined message format, Message just so is first according into message format to be classified, classified further according to sender's title, afterwards according to subscriber Message is carried out successively classification processing by preset message attributes, and is distributed to corresponding message queue, and subscriber passes through message team Row receive the message subscribed to.
In actual applications, when the form for detecting received new information is mismatched with preset format, it can also pass through Message is distributed by the mode of queued name's matching, wherein it is possible to the queued name belonging to the message is obtained in new information, And the queued name is entered to match with existing queued name in MQ servers, and transmits the message to the message of matching Queue.
Certainly, the processing mode for the unmatched new information of message format is not limited to foregoing description, and the present invention is implemented Example is not any limitation as to this.
In embodiments of the present invention, each preset attribute for subscribing to message queue is configured;Default disappear is determined with message sender Cease form;Receive the message that message sender is sent;According to the preset attribute of the subscription message queue, by the message of matching point Be sent to it is corresponding subscribe to message queue, realize that message recipient actively sets the purpose for the attribute for subscribing to message, and message distribution Server is handled message by preset message attributes, and is sent to corresponding message queue, is not increasing message The efficiency of Message Processing is improved on the premise of processing cost.
Embodiment two
Reference picture 2, shows a kind of step flow chart of message distributing method embodiment of the application, can specifically include Following steps:
Step 201, reception message subject request to create.
In the embodiment of the present invention, message queue treatment mechanism is to be directed to MQ servers first, and full name is Message Queue, the message distribution mechanism of Message Queuing server, wherein, message queue (MQ) is a kind of application program to applying journey The communication means of sequence.Application program is communicated by writing and retrieving the data (message) for application program into lining up, and Them are linked without special connection.Message transmission refers to being communicated by sending data in the message between program, and It is not to be communicated by directly invoking each other, directly invoking typically is used for the technology of such as remote procedure call.Queue up what is referred to It is that application program is communicated by queue.The use of queue, which is eliminated, receives and sends the requirement that application program is performed simultaneously, its Middle one end toward continuous write-in message in message queue, and the other end can then be read or subscription queue in message.MQ groups Into generally having:Broker message servers, message core service, the Producer message producers, business are provided as server Initiator, be responsible for production message be transferred to broker.Consumer message consumers, the processing side of business, be responsible for from Broker obtains message and carries out business logic processing.Message under Topic themes, publish-subscribe model uniformly collects ground, no Message is sent to topic with the producer, different subscribers are distributed to by MQ servers, the broadcast of message is realized.Queue teams Under row, ptp mode, specific manufacturer sends message to specific queue, and consumer subscribes to specific queue and completes to specify message Reception.Message message body, the packet that the set form defined according to different communication protocol is encoded, carrys out packaging industry Business data, realize the transmission of message.
In actual applications, when message subscribing person specify message theme topic or message particular community after, for Above-mentioned topic and attribute create corresponding message queue on MQ servers, to receive corresponding message, now, message Subscriber understands transmit queue request to create to MQ servers, the queue request to create of message server receives message subscribing person Afterwards, queued name that will be in request to create and attribute create message queue.
Step 202, establishment message subject, and create subscription message queue corresponding with the message subject.
In the embodiment of the present invention, before message subscribing person's transmit queue request to create, first have to log in MQ servers, i.e., Each message subscribing person can store log-on message on MQ servers, believe including authentications such as username and passwords Breath, is creating user name initial stage accordingly, corresponding authority can be set according to the demand of user, so being logged in message subscribing person After on to MQ servers, the authority information of the subscriber can be further read after its identity information of MQ server authentications, so After the queue for receiving subscriber's transmission creates authority, the authority whether subscriber has queue to create is verified, if had the right Limit, then create corresponding queue according to the queue request to create of its transmission, its request to create ignored if no authority.
In practical application, after subscriber is logged on MQ servers, retrieve created on MQ servers first Message queue and its title and attribute, after the queue for meeting subscriber's demand is found, send connect the queue request To MQ servers, when server receives the queue connection request, then the identity information of subscriber is verified, and require connection Quene state, if both sides meet preparatory condition, sets up connection.Wherein, default condition of contact can include subscriber's Identity information is confined to certain scope, or the linking number of queue is N, if queue has been set up N number of connection, that Just the N+1 connection of refusal.
In actual applications, restrictive condition is configured according to the disposal abilities of MQ servers, and the demand of subscriber, Foregoing description is not limited to, the embodiment of the present invention is not any limitation as to this.
Specifically, after MQ servers receive subscriber's transmit queue connection request, reading the queue name in the request Matched one by one in title and attribute, and the queue created in MQ servers, if the match is successful, and both sides meet pre- If condition, then subscriber's foundation with sending connection request is connected.
Set up after connection, for a new message sender, after being connected with the foundation of MQ servers, new information can be sent out Deliver to MQ servers, and new message subject topic can be created on MQ servers when sending message, wherein message subject Title is based on message suffix title.Certainly, in another case, when message sender sends message, message can be specified to be sent out Past theme, if the theme is not present, asks to create new message on MQ servers.
In actual applications, when the theme that the message package received contains is already present on MQ servers, then by the message Corresponding theme is categorized into, if corresponding subject name is not present on MQ, the subject name contained according to message package creates one Individual new theme, so when MQ servers receive a new message, please equivalent to a theme establishment is received simultaneously Ask, retrieve the subject name wherein included, if be already present on MQ servers, just sort out the message, if in the absence of just Create a new theme.
Wherein, message content in itself and theme have no contact, and theme is only used for marking whether the message needs to carry out base In the distribution of attribute, for example, the message for being sent to VirtualTopic.A uses the distribution based on contents attribute, message format needs Consistent with default form, if message format and default form are inconsistent, the method matched using theme carries out message Distribution, the form without considering message, and is directed to the message distribution based on contents attribute, theme be only used as message attributes it One, the not last distribution policy of decision message, if not having the plan that selection is distributed for message subject in the numerous attributes of message Slightly, then different message subjects has no effect on message point distribution, so, message distribution strategy choose whether according to theme with It is no, depending on for the real needs for message distribution, this embodiment of the present invention is not any limitation as.Likewise, when establishment During one new theme, corresponding message queue is created simultaneously for the subject name, the title of the message queue with The subject name thinks correspondence.
In actual applications, it is simply simple for the theme and corresponding message queue that are created according to message sender Comprising subject name, other attributes that the queue that the person that is directed to message subscribing creates is included can be with only including theme The queue of title is merged.For example, the theme included in the queue that message sender is created is " .abc.cn ", the subject Title is not present on MQ servers, then just create a new theme with the entitled subject name, and creates simultaneously with being somebody's turn to do What is used in subject name identical queue, the queue request to create sent for message subscribing person is also entitled The queue of " .abc.cn ", in addition also includes message attributes, such as text message, then the attribute just is added into title In queue for " .abc.cn ".
Step 203, the preset attribute for obtaining subscription message queue;The preset attribute include type of message, message format, Message table type, message sender title, message sink priority one or more therein.
In the embodiment of the present invention, after subscriber is connected on MQ servers, want what is subscribed to according to subscriber itself Message, sends configuration file of the specific message attributes to MQ servers for message queue and is configured, message therein Attribute includes type of message, message format, message table type, message sender title, message sink priority one kind therein Or it is a variety of.For example, message subscribing person A needs to receive the text message sent by message sender B, and keyword is included in message " AOA ", then according to the preset attribute, MQ server administrators will change the corresponding queue configuration file of its storage.
Step 204, the configuration file according to each subscription message queue of preset attribute configuration correspondence.
In the embodiment of the present invention, when receive subscriber for need subscribe to message attribute, and want connection team The configuration file for the attribute modification correspondence queue that column name, first MQ server administrators are formulated according to subscriber, secondly should Queue is set up with above-mentioned subscriber and is connected, so that message subscribing person receives the message needed from the queue.
In actual applications, the configuration file power of amendment can be changed or possessed to configuration file by MQ keepers The subscriber of limit is modified, and the embodiment of the present invention is not any limitation as to this.
Step 205 and message sender determine presetting message form.
In the embodiment of the present invention, before message sender sends new message to MQ servers, first have to service with MQ Device specifies a rule for being directed to message, it is generally the case that the rule is the restriction for message format, and message format is depended on The ability of MQ server process message, MQ servers only receive manageable message format.
In actual applications, the above-mentioned rule formulated for message is not limited only to message format, can also be other message Attribute, can specifically be formulated, the embodiment of the present invention is not any limitation as to this according to the demand of service.
Whether step 206, supervisory messages receiving port receive new message.
In the embodiment of the present invention, message sender can constantly connect MQ servers and send new message, be serviced for MQ Whether device end, the periodic supervisory messages receiving port of meeting receives new message, the new information received is carried out further Processing.
If step 207, receiving new message, the message obtained with the message of presetting message form same format belongs to Property.
In the embodiment of the present invention, if finding to receive new message by supervisory messages receiving port, then disappear with regard to extracting The message attributes that each message queue attribute is directed in content are ceased, and the message of matching is sent in corresponding message queue.Example Such as, after the message that theme is " .abc.cn " is received, read and include the message queue of the subject name, detect queue A, The subject name is all included in B, M, K queue, then further extract message attributes preset in queue A, B, M, K respectively, And identical attribute is also extracted in the message received, if the attribute extracted in queue A is message keyword " ccc ", that Just it is being same in the message of " .abc.cn " to extract keyword " ccc " comprising theme.
Step 208, by the message attributes of the message received and it is described it is each subscribe to message queue preset attribute enter Row is matched one by one.
In the embodiment of the present invention, according to the description of step 207, when same in the message for comprising theme being " .abc.cn " Extract keyword " ccc ", and extraction keyword " ccc " success in some message, then just send the messages to team Arrange in A.
In actual applications, message attributes preset in all queues can be extracted, and is divided based on these attributes The message content newly received is extracted in analysis, if message attributes and the attributes match success extracted in the message newly received, then Just the message of matching is sent to corresponding queue.Certainly, the order of processing message is not limited to foregoing description, with reference to specific feelings Condition can be configured, and the embodiment of the present invention is not any limitation as to this.
If step 209, the match is successful, the message distribution of matching is subscribed into message queue to corresponding.
In the embodiment of the present invention, according to the description of step 207, if being received by the discovery of supervisory messages receiving port new Message, and based on the message attributes extracted in message queue attribute, corresponding message category is extracted in new message content Property, such as when the same keyword " ccc " for extracting correspondence message queue A in some message for comprising theme being " .abc.cn ", So just send the messages in queue A.
In embodiments of the present invention, the preset attribute for subscribing to message queue is obtained;Whether supervisory messages receiving port receives To new message;If receiving new message, the message attributes with the message of presetting message form same format are obtained;Receive Message subject request to create;Message subject is created, and creates message queue corresponding with the message subject;Subscribed to according to described The preset attribute of message queue, message queue is subscribed to by the message distribution of matching to corresponding, the person that realizes message subscribing according to from Body actively sets the purpose for the attribute for subscribing to message to the demand for receiving message, and message distribution services device passes through preset message The content of new information of the attribute to receiving is matched according to queue message attribute, and the message of matching is sent to corresponding Message queue, improves the efficiency of Message Processing on the premise of not increase Message Processing cost.
Embodiment three
Reference picture 3, shows a kind of structured flowchart of message distribution device embodiment of the application, can specifically include such as Lower module:
The message distribution device 300, including:Preset attribute module 301, for configuring the default of each subscription message queue Attribute;Presetting message format module 302, for determining presetting message form with message sender;Message reception module 303, is used In the message for receiving message sender transmission;Message distribution module 304, for the default category according to the subscription message queue Property, the message distribution of matching is subscribed into message queue to corresponding.
The interactive relation between the function of each module and each module is discussed in detail separately below.
Shown in reference picture 4, the message distribution device 400, including:Preset attribute module 401, disappears for configuring each subscription Cease the preset attribute of queue;
Optionally, preset attribute module 401, is specifically included:
Preset attribute acquisition submodule, the preset attribute of message queue is subscribed to for obtaining;The preset attribute includes disappearing Cease type, message format, message table type, message sender title, message sink priority one or more therein;
Submodule is configured, for configuring each configuration file for subscribing to message queue of correspondence according to the preset attribute.
Optionally, preset attribute module 401, before, in addition to:
Theme request to create receiving module 405, for receiving message subject request to create;
Message subject creation module 406, disappears for creating message subject, and creating subscription corresponding with the message subject Cease queue.
Presetting message format module 402, for determining presetting message form with message sender;
Message reception module 403, the message for receiving message sender transmission;Optionally, message reception module 403, Specifically include:Submodule 4031 is monitored, new message whether is received for supervisory messages receiving port;Message attributes obtain son Module 4032, if for receiving new message, obtaining the message attributes with the message of presetting message form same format.
Message distribution module 404, for according to it is described subscription message queue preset attribute, by the message distribution of matching extremely It is corresponding to subscribe to message queue.Optionally, message distribution module 404, is specifically included:Match messages submodule 4041, for inciting somebody to action The message attributes of the message received are matched one by one with each preset attribute for subscribing to message queue;Message distribution Submodule 4042, if for the match is successful, the message distribution of matching is subscribed into message queue to corresponding.
In embodiments of the present invention, the preset attribute for subscribing to message queue is obtained;Whether supervisory messages receiving port receives To new message;If receiving new message, the message attributes with the message of presetting message form same format are obtained;Receive Message subject request to create;Message subject is created, and creates message queue corresponding with the message subject;Subscribed to according to described The preset attribute of message queue, message queue is subscribed to by the message distribution of matching to corresponding, the person that realizes message subscribing according to from Body actively sets the purpose for the attribute for subscribing to message to the demand for receiving message, and message distribution services device passes through preset message The content of new information of the attribute to receiving is matched according to queue message attribute, and the message of matching is sent to corresponding Message queue, improves the efficiency of Message Processing on the premise of not increase Message Processing cost.
Reference picture 5, shows a kind of structured flowchart of message distributing system embodiment of the application, specifically includes:
Message sending end 501, for new information to be sent to Distributor;
Message subscribing end 502, for receiving dispatch messages from message distribution services device;
Message distribution services device 503, for receiving message from message sending end, message content is entered with message queue attribute Row matching, and matching message is sent to message subscribing end.
For device embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, it is related Part illustrates referring to the part of embodiment of the method.
Each embodiment in this specification is described by the way of progressive, what each embodiment was stressed be all with Between the difference of other embodiment, each embodiment identical similar part mutually referring to.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present application can be provided as method, device or calculate Machine program product.Therefore, the embodiment of the present application can using complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the embodiment of the present application can use it is one or more wherein include computer can With in the computer-usable storage medium (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
In a typical configuration, the computer equipment includes one or more processors (CPU), input/output Interface, network interface and internal memory.Internal memory potentially includes the volatile memory in computer-readable medium, random access memory The form such as device (RAM) and/or Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is to calculate The example of machine computer-readable recording medium.Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be with Realize that information is stored by any method or technique.Information can be computer-readable instruction, data structure, the module of program or Other data.The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), Electrically Erasable Read Only Memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc are read-only Memory (CD-ROM), digital versatile disc (DVD) or other optical storages, magnetic cassette tape, tape magnetic rigid disk storage or Other magnetic storage apparatus or any other non-transmission medium, the information that can be accessed by a computing device available for storage.According to Herein defines, and computer-readable medium does not include the computer readable media (transitory media) of non-standing, such as The data-signal and carrier wave of modulation.
The embodiment of the present application is with reference to according to the method for the embodiment of the present application, terminal device (system) and computer program The flow chart and/or block diagram of product is described.It should be understood that can be by computer program instructions implementation process figure and/or block diagram In each flow and/or square frame and the flow in flow chart and/or block diagram and/or the combination of square frame.These can be provided Computer program instructions are set to all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is to produce a machine so that held by the processor of computer or other programmable data processing terminal equipments Capable instruction is produced for realizing in one flow of flow chart or multiple flows and/or one square frame of block diagram or multiple square frames The device for the function of specifying.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing terminal equipments In the computer-readable memory worked in a specific way so that the instruction being stored in the computer-readable memory produces bag The manufacture of command device is included, the command device is realized in one flow of flow chart or multiple flows and/or one side of block diagram The function of being specified in frame or multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing terminal equipments so that Series of operation steps is performed on computer or other programmable terminal equipments to produce computer implemented processing, so that The instruction performed on computer or other programmable terminal equipments is provided for realizing in one flow of flow chart or multiple flows And/or specified in one square frame of block diagram or multiple square frames function the step of.
Although having been described for the preferred embodiment of the embodiment of the present application, those skilled in the art once know base This creative concept, then can make other change and modification to these embodiments.So, appended claims are intended to be construed to Including preferred embodiment and fall into having altered and changing for the embodiment of the present application scope.
Finally, in addition it is also necessary to explanation, herein, such as first and second or the like relational terms be used merely to by One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operation Between there is any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant meaning Covering including for nonexcludability, so that process, method, article or terminal device including a series of key elements are not only wrapped Those key elements, but also other key elements including being not expressly set out are included, or also include being this process, method, article Or the intrinsic key element of terminal device.In the absence of more restrictions, by wanting that sentence "including a ..." is limited Element, it is not excluded that also there is other identical element in the process including the key element, method, article or terminal device.
Weight mask method and a kind of weight annotation equipment of lexical item above to a kind of lexical item provided herein, enter Go and be discussed in detail, specific case used herein is set forth to the principle and embodiment of the application, the above is implemented The explanation of example is only intended to help and understands the present processes and its core concept;Simultaneously for the general technology people of this area Member, according to the thought of the application, will change in specific embodiments and applications, in summary, this explanation Book content should not be construed as the limitation to the application.

Claims (10)

1. a kind of message distributing method, it is characterised in that including:
Each preset attribute for subscribing to message queue of configuration;
Presetting message form is determined with message sender;
Receive the message that message sender is sent;
According to the preset attribute of the subscription message queue, the message distribution of matching is subscribed into message queue to corresponding.
2. according to the method described in claim 1, it is characterised in that the preset attribute according to the subscription message queue, The step of by the message distribution of matching to corresponding subscription message queue, including:
The message attributes of the message received are matched one by one with each preset attribute for subscribing to message queue;
If the match is successful, the message distribution of matching is subscribed into message queue to corresponding.
3. according to the method described in claim 1, it is characterised in that the step of each preset attribute for subscribing to message queue of configuration Suddenly, including:
Obtain the preset attribute for subscribing to message queue;
It is preferential that the preset attribute includes type of message, message format, message table type, message sender title, message sink Level one or more therein;
Each configuration file for subscribing to message queue of correspondence is configured according to the preset attribute.
4. according to the method described in claim 1, it is characterised in that described the step of receive the message that message sender is sent, Including:
Whether supervisory messages receiving port receives new message;
If receiving new message, the message attributes with the message of presetting message form same format are obtained.
5. according to the method described in claim 1, it is characterised in that in each preset attribute for subscribing to message queue of the configuration Before step, in addition to:
Receive message subject request to create;
Message subject is created, and creates subscription message queue corresponding with the message subject.
6. a kind of message distribution device, it is characterised in that including:
Preset attribute module, the preset attribute for configuring each subscription message queue;
Presetting message format module, for determining presetting message form with message sender;
Message reception module, the message for receiving message sender transmission;
Message distribution module, for the preset attribute according to the subscription message queue, by the message distribution of matching to corresponding Subscribe to message queue.
7. device according to claim 6, it is characterised in that the message distribution module, including:
Match messages submodule, for described each the message attributes of the message received to be subscribed into the default of message queue Attribute is matched one by one;
Message distribution submodule, if for the match is successful, the message distribution of matching is subscribed into message queue to corresponding.
8. device according to claim 6, it is characterised in that the preset attribute module, including:
Preset attribute acquisition submodule, the preset attribute of message queue is subscribed to for obtaining;The preset attribute includes message class Type, message format, message table type, message sender title, message sink priority one or more therein;
Submodule is configured, for configuring each configuration file for subscribing to message queue of correspondence according to the preset attribute.
9. device according to claim 6, it is characterised in that the message reception module, including:
Submodule is monitored, new message whether is received for supervisory messages receiving port;
Message attributes acquisition submodule, if for receiving new message, acquisition disappears with presetting message form same format The message attributes of breath.
10. device according to claim 6, it is characterised in that also include:
Theme request to create receiving module, for receiving message subject request to create;
Message subject creation module, for creating message subject, and creates subscription message queue corresponding with the message subject.
CN201710516647.3A 2017-06-29 2017-06-29 A kind of message distributing method and device Pending CN107332787A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710516647.3A CN107332787A (en) 2017-06-29 2017-06-29 A kind of message distributing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710516647.3A CN107332787A (en) 2017-06-29 2017-06-29 A kind of message distributing method and device

Publications (1)

Publication Number Publication Date
CN107332787A true CN107332787A (en) 2017-11-07

Family

ID=60199164

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710516647.3A Pending CN107332787A (en) 2017-06-29 2017-06-29 A kind of message distributing method and device

Country Status (1)

Country Link
CN (1) CN107332787A (en)

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108021358A (en) * 2017-12-15 2018-05-11 无线生活(杭州)信息科技有限公司 A kind of data processing method and device
CN108449410A (en) * 2018-03-19 2018-08-24 深信服科技股份有限公司 Information management method, system and relevant apparatus in a kind of cloud platform
CN108572877A (en) * 2018-05-10 2018-09-25 厦门南讯软件科技有限公司 A kind of concurrent message processing method of feature based grouping
CN108667899A (en) * 2018-03-29 2018-10-16 挂号网(杭州)科技有限公司 Multiple terminals message synchronization and isolation instant communication method and system
CN109088933A (en) * 2018-08-21 2018-12-25 中国平安人寿保险股份有限公司 High-volume list transfer approach, acquisition methods and corresponding device, electronic equipment
CN109462634A (en) * 2018-09-25 2019-03-12 郑州云海信息技术有限公司 Message treatment method, device and equipment in a kind of distributed system
CN109547327A (en) * 2018-11-01 2019-03-29 苏州达家迎信息技术有限公司 A kind of method for sending information, device, storage medium and equipment
CN109672605A (en) * 2018-09-26 2019-04-23 深圳壹账通智能科技有限公司 Mail distribution method, apparatus, equipment and readable storage medium storing program for executing
CN110224933A (en) * 2019-06-18 2019-09-10 成都品果科技有限公司 A kind of message distributing system
CN110708247A (en) * 2019-09-27 2020-01-17 浙江大搜车软件技术有限公司 Message routing method, message routing device, computer equipment and storage medium
CN110875935A (en) * 2018-08-30 2020-03-10 阿里巴巴集团控股有限公司 Message publishing, processing and subscribing method, device and system
CN111008087A (en) * 2019-12-25 2020-04-14 上海众源网络有限公司 Message processing method and device
CN111327696A (en) * 2020-02-17 2020-06-23 北京奇艺世纪科技有限公司 Data processing method and system
CN111371889A (en) * 2020-03-03 2020-07-03 广州致远电子有限公司 Message processing method and device, Internet of things system and storage medium
CN111654555A (en) * 2020-08-10 2020-09-11 南京云联数科科技有限公司 Method, electronic device and storage medium for message distribution
CN111741041A (en) * 2019-07-10 2020-10-02 北京京东尚科信息技术有限公司 Message processing method and device, electronic equipment and computer readable medium
CN111949418A (en) * 2020-07-10 2020-11-17 北京思特奇信息技术股份有限公司 Subscription message processing method and device
CN112203103A (en) * 2020-09-28 2021-01-08 北京字节跳动网络技术有限公司 Message processing method and device, electronic equipment and computer readable storage medium
CN112311825A (en) * 2019-07-29 2021-02-02 浙江宇视科技有限公司 Message pushing method and device, pushing server and readable storage medium
CN112468566A (en) * 2020-11-20 2021-03-09 银盛支付服务股份有限公司 Cache updating method and system based on Message Queue Message broadcasting mode
CN112671933A (en) * 2021-02-23 2021-04-16 浙江中控技术股份有限公司 Data processing method and system
WO2021135255A1 (en) * 2019-12-31 2021-07-08 深圳云天励飞技术股份有限公司 Message queue-based method for managing row and column permissions, and related device
CN113965628A (en) * 2020-12-03 2022-01-21 广州三叠纪元智能科技有限公司 Message scheduling method, server and storage medium
CN113961379A (en) * 2021-12-22 2022-01-21 零犀(北京)科技有限公司 Message processing method and device based on man-machine conversation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100637933B1 (en) * 2005-10-04 2006-10-24 한국전자통신연구원 Packet forwarding method and apparatus in router of subscriber access network
CN102142971A (en) * 2010-01-29 2011-08-03 新奥特(北京)视频技术有限公司 Monitoring system and monitoring method for realizing subscription-collection mechanism
CN104951546A (en) * 2015-06-23 2015-09-30 网易传媒科技(北京)有限公司 Method and device for subscribing for messages in instant messaging software
CN106095789A (en) * 2016-05-26 2016-11-09 努比亚技术有限公司 A kind of message subscribing managing device and method
CN106230922A (en) * 2016-07-28 2016-12-14 上海斐讯数据通信技术有限公司 A kind of news subscribing method, message production unit and message reception units

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100637933B1 (en) * 2005-10-04 2006-10-24 한국전자통신연구원 Packet forwarding method and apparatus in router of subscriber access network
CN102142971A (en) * 2010-01-29 2011-08-03 新奥特(北京)视频技术有限公司 Monitoring system and monitoring method for realizing subscription-collection mechanism
CN104951546A (en) * 2015-06-23 2015-09-30 网易传媒科技(北京)有限公司 Method and device for subscribing for messages in instant messaging software
CN106095789A (en) * 2016-05-26 2016-11-09 努比亚技术有限公司 A kind of message subscribing managing device and method
CN106230922A (en) * 2016-07-28 2016-12-14 上海斐讯数据通信技术有限公司 A kind of news subscribing method, message production unit and message reception units

Cited By (39)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108021358A (en) * 2017-12-15 2018-05-11 无线生活(杭州)信息科技有限公司 A kind of data processing method and device
CN108449410B (en) * 2018-03-19 2022-03-22 深信服科技股份有限公司 Message management method, system and related device in cloud platform
CN108449410A (en) * 2018-03-19 2018-08-24 深信服科技股份有限公司 Information management method, system and relevant apparatus in a kind of cloud platform
CN108667899A (en) * 2018-03-29 2018-10-16 挂号网(杭州)科技有限公司 Multiple terminals message synchronization and isolation instant communication method and system
CN108667899B (en) * 2018-03-29 2021-04-20 挂号网(杭州)科技有限公司 Multi-terminal message synchronization and isolation instant messaging method and system
CN108572877A (en) * 2018-05-10 2018-09-25 厦门南讯软件科技有限公司 A kind of concurrent message processing method of feature based grouping
CN109088933A (en) * 2018-08-21 2018-12-25 中国平安人寿保险股份有限公司 High-volume list transfer approach, acquisition methods and corresponding device, electronic equipment
CN109088933B (en) * 2018-08-21 2023-07-21 中国平安人寿保险股份有限公司 Large-batch list transmission method, large-batch list acquisition method, corresponding device and electronic equipment
CN110875935A (en) * 2018-08-30 2020-03-10 阿里巴巴集团控股有限公司 Message publishing, processing and subscribing method, device and system
CN109462634A (en) * 2018-09-25 2019-03-12 郑州云海信息技术有限公司 Message treatment method, device and equipment in a kind of distributed system
CN109672605A (en) * 2018-09-26 2019-04-23 深圳壹账通智能科技有限公司 Mail distribution method, apparatus, equipment and readable storage medium storing program for executing
CN109547327A (en) * 2018-11-01 2019-03-29 苏州达家迎信息技术有限公司 A kind of method for sending information, device, storage medium and equipment
CN109547327B (en) * 2018-11-01 2021-08-03 苏州达家迎信息技术有限公司 Information sending method, device, storage medium and equipment
CN110224933A (en) * 2019-06-18 2019-09-10 成都品果科技有限公司 A kind of message distributing system
CN111741041B (en) * 2019-07-10 2023-05-12 北京京东尚科信息技术有限公司 Message processing method and device, electronic equipment and computer readable medium
CN111741041A (en) * 2019-07-10 2020-10-02 北京京东尚科信息技术有限公司 Message processing method and device, electronic equipment and computer readable medium
CN112311825A (en) * 2019-07-29 2021-02-02 浙江宇视科技有限公司 Message pushing method and device, pushing server and readable storage medium
CN112311825B (en) * 2019-07-29 2023-05-19 浙江宇视科技有限公司 Message pushing method and device, pushing server and readable storage medium
CN110708247B (en) * 2019-09-27 2022-03-22 浙江大搜车软件技术有限公司 Message routing method, message routing device, computer equipment and storage medium
CN110708247A (en) * 2019-09-27 2020-01-17 浙江大搜车软件技术有限公司 Message routing method, message routing device, computer equipment and storage medium
CN111008087B (en) * 2019-12-25 2024-03-15 上海众源网络有限公司 Message processing method and device
CN111008087A (en) * 2019-12-25 2020-04-14 上海众源网络有限公司 Message processing method and device
WO2021135255A1 (en) * 2019-12-31 2021-07-08 深圳云天励飞技术股份有限公司 Message queue-based method for managing row and column permissions, and related device
CN111327696A (en) * 2020-02-17 2020-06-23 北京奇艺世纪科技有限公司 Data processing method and system
CN111327696B (en) * 2020-02-17 2022-04-26 北京奇艺世纪科技有限公司 Data processing method and system
CN111371889A (en) * 2020-03-03 2020-07-03 广州致远电子有限公司 Message processing method and device, Internet of things system and storage medium
CN111949418A (en) * 2020-07-10 2020-11-17 北京思特奇信息技术股份有限公司 Subscription message processing method and device
CN111949418B (en) * 2020-07-10 2023-10-24 北京思特奇信息技术股份有限公司 Subscription message processing method and device
CN111654555A (en) * 2020-08-10 2020-09-11 南京云联数科科技有限公司 Method, electronic device and storage medium for message distribution
CN111654555B (en) * 2020-08-10 2021-12-03 南京云联数科科技有限公司 Method, electronic device and storage medium for message distribution
CN112203103A (en) * 2020-09-28 2021-01-08 北京字节跳动网络技术有限公司 Message processing method and device, electronic equipment and computer readable storage medium
CN112203103B (en) * 2020-09-28 2023-05-02 北京字节跳动网络技术有限公司 Message processing method, device, electronic equipment and computer readable storage medium
CN112468566A (en) * 2020-11-20 2021-03-09 银盛支付服务股份有限公司 Cache updating method and system based on Message Queue Message broadcasting mode
CN112468566B (en) * 2020-11-20 2023-11-24 银盛支付服务股份有限公司 Cache updating method and system based on Message Queue Message broadcasting mode
CN113965628A (en) * 2020-12-03 2022-01-21 广州三叠纪元智能科技有限公司 Message scheduling method, server and storage medium
CN112671933B (en) * 2021-02-23 2022-04-26 浙江中控技术股份有限公司 Data processing method and system
CN112671933A (en) * 2021-02-23 2021-04-16 浙江中控技术股份有限公司 Data processing method and system
CN113961379B (en) * 2021-12-22 2022-04-12 零犀(北京)科技有限公司 Message processing method and device based on man-machine conversation
CN113961379A (en) * 2021-12-22 2022-01-21 零犀(北京)科技有限公司 Message processing method and device based on man-machine conversation

Similar Documents

Publication Publication Date Title
CN107332787A (en) A kind of message distributing method and device
US11936609B2 (en) System and method for enabling real-time eventing
KR102161681B1 (en) Device identifier dependent operation processing of packet based data communication
US10440114B2 (en) Cloud storage methods and systems
EP3404542A1 (en) Data pipeline architecture for analytics processing stack
CN106888218A (en) Message treatment method, device, client and service end
US20180084085A1 (en) Cross platform device virtualization for an iot system
JP2019511775A (en) Techniques for messaging bot rich communication
CN106973075B (en) Share comment method and system, domain name code-transferring method, client and server
CN106131213A (en) A kind of service management and system
WO2017167121A1 (en) Method and device for determining and applying association relationship between application programs
CN107979525A (en) A kind of red packet distribution method, equipment and medium
CN103368921A (en) Distributed user modeling system and method for intelligent device
CN104717647B (en) Professional ability method for authenticating, equipment and system
CN109688047B (en) Message adaptation method, device and storage medium based on XML
CN108124007A (en) The method and apparatus of message data real-time Transmission
JP2014505299A (en) Method and apparatus for processing microweb log messages
CN109033404A (en) Daily record data processing method, device and system
US11882154B2 (en) Template representation of security resources
US10327138B2 (en) Systems and methods for providing services
CN104142975A (en) Microblog information promotion method, device and system
CN107517188A (en) A kind of data processing method and device based on Android system
CN113687958A (en) Data processing method, system, computer device and storage medium
CN112929257A (en) Multi-scenario message sending method, device, server and storage medium
CN106408490A (en) Active work order processing method and active work order processing apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20171107

RJ01 Rejection of invention patent application after publication