CN108270662A - A kind of message distributing method, device and equipment - Google Patents
A kind of message distributing method, device and equipment Download PDFInfo
- Publication number
- CN108270662A CN108270662A CN201711433487.2A CN201711433487A CN108270662A CN 108270662 A CN108270662 A CN 108270662A CN 201711433487 A CN201711433487 A CN 201711433487A CN 108270662 A CN108270662 A CN 108270662A
- Authority
- CN
- China
- Prior art keywords
- message
- consumer
- issued
- service message
- attribute information
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/212—Monitoring or handling of messages using filtering or selective blocking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/31—Indexing; Data structures therefor; Storage structures
- G06F16/316—Indexing structures
- G06F16/322—Trees
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
- G06F16/374—Thesaurus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
Abstract
The embodiment of the present application discloses a kind of message distributing method, device and equipment, and this method is applied in Message Queuing system, the method includes:It is used to obtain service message to be issued in the first message channel of issuing service message from Message Queuing system;According to the business attribute information of service message to be issued and the consumption attribute information of each consumer of Message Queuing system, the first consumer of service message to be issued is determined;Service message to be issued is distributed in the corresponding second message channel of the first consumer, the first consumer is sent to by second message channel.The embodiment of the present application can filter out the service message needed for it for message consumer, save the process that full dose service message is read from first message channel, few partial service message in full dose service message is only needed due to many message consumers, so as to avoid the usage amount of network bandwidth, the utilization rate of network bandwidth is improved.
Description
Technical field
This application involves a kind of field of computer technology more particularly to message distributing method, device and equipment.
Background technology
Message queue (Message Queue) is a kind of soft project component, for operation system decoupling and asynchronous communication,
Handling capacity can be significantly improved by message queue.For the web site of hundreds of millions grades of message numbers, numerous subsystems, son should
With the demand for having consumption message, the application of message queue is very universal.
The common component part of message queue has the message producer, message channel, message consumer, and the message producer is real-time
Message is sequentially pushed to message channel by ground, and message consumer accesses network according to the demand of oneself, and can lead to from message
Different types of full dose message is consumed in road.
It is that difference is obtained from message channel however, when message consumer obtains service message from message channel every time
The full dose message of type, since the service message that each message consumer finally needs accounts for the ratio of message total amount in message channel
Very little, in this way, the data volume for being sent to the service message of message consumer can be caused larger, and most of service message therein
It is unwanted for some user, therefore, causes the huge waste of network bandwidth resources, it is unnecessary so as to cause
Network congestion, and generate larger delay.
Invention content
The purpose of the embodiment of the present application is to provide a kind of message distributing method, device and equipment, to solve in the prior art
Message distribution causes the problem of network bandwidth resources.
In order to solve the above technical problems, what the embodiment of the present application was realized in:
A kind of message distributing method provided by the embodiments of the present application, applied in Message Queuing system, the method includes:
Disappear from the Message Queuing system for obtaining business to be issued in the first message channel of issuing service message
Breath;
According to the business attribute information of the service message to be issued and each consumer of the Message Queuing system
Consumption attribute information, determine the first consumer of the service message to be issued;
The service message to be issued is distributed in the corresponding second message channel of first consumer, passes through institute
It states second message channel and is sent to first consumer.
Optionally, the business attribute information of the service message to be issued is included in topic word, keyword, user identifier
It is one or more, the consumption attribute information includes topic word, keyword, one or more in user identifier.
Optionally, the business attribute information of service message to be issued described in the basis and the Message Queuing system
The consumption attribute information of each consumer determines the first consumer of the service message to be issued, including:
According to the business attribute information of the service message to be issued, determine belonging to the service message to be issued
The corresponding message filtering classification of business item, the message filtering classification include sieving based on topic word screening, based on user identifier
Choosing;
According to the message filtering classification determined, by the service message to be issued with the message filtering classification phase
Information corresponding with the message filtering classification is compared in the business attribute information answered and the consumption attribute information, is determined
First consumer of the service message to be issued.
Optionally, the message filtering classification that the basis is determined will disappear in the service message to be issued with described
Information corresponding with the message filtering classification in the corresponding business attribute information of breath screening classification and the consumption attribute information
It is compared, determines the first consumer of the service message to be issued, including:
Business attribute information corresponding with the message filtering classification determined in service message to be issued described in acquisition
Set;
The set got is corresponding with the message filtering classification determined to the consumption attribute information as a whole
Information carry out intersection operation, determine the first consumer of the service message to be issued.
Optionally, if the consumption attribute information includes keyword,
The business attribute information of service message to be issued described in the basis and each of the Message Queuing system disappear
The consumption attribute information of the person of expense determines the first consumer of the service message to be issued, including:
According to the keyword quantity included in the consumption attribute information of each consumer, determine that the screening of keyword is calculated
Method, the filtering algorithm of the keyword include language built-in algorithm and the algorithm based on structure dictionary data tree structure;
Based on the filtering algorithm for the keyword determined, business attribute information and institute to the service message to be issued
The consumption attribute information for stating each consumer of Message Queuing system is compared, and determines the of the service message to be issued
One consumer.
Optionally, the keyword quantity included in the consumption attribute information according to each consumer determines to close
The filtering algorithm of keyword, including:
If the keyword quantity is less than the first predetermined threshold value, it is determined that the filtering algorithm of keyword is the built-in calculation of language
Method;
If the keyword quantity is more than the first predetermined threshold value, and less than the second predetermined threshold value, it is determined that keyword
Filtering algorithm is the algorithm based on structure dictionary data tree structure, wherein, it is default that second predetermined threshold value is more than described first
Threshold value.
Optionally, the method further includes:
Monitor the quantity of service message accumulated in the corresponding second message channel of first consumer;
If the quantity a predetermined level is exceeded threshold for the service message accumulated in the corresponding second message channel of the first consumer
Value, it is determined that first consumer is abnormal, and stores the service message of accumulation;
After first consumer restores normal, the business for continuing the accumulation for sending storage to first consumer disappears
Breath.
A kind of message distribution device provided by the embodiments of the present application, applied in Message Queuing system, described device includes:
Message capturing module, for being obtained in the first message channel of issuing service message from the Message Queuing system
Take service message to be issued;
Consumer's determining module, business attribute information and the message team for service message to be issued according to
The consumption attribute information of each consumer of row system determines the first consumer of the service message to be issued;
Distribution module, for the service message to be issued to be distributed to the corresponding second message of first consumer
In channel, first consumer is sent to by the second message channel.
Optionally, the business attribute information of the service message to be issued is included in topic word, keyword, user identifier
It is one or more, the consumption attribute information includes topic word, keyword, one or more in user identifier.
Optionally, consumer's determining module, including:
Classification determination unit is screened, for the business attribute information of service message to be issued according to, is determined described
The corresponding message filtering classification of business item belonging to service message to be issued, the message filtering classification are included based on topic
Word screening is screened based on user identifier;
First consumer's determination unit, for according to the message filtering classification determined, the business to be issued to be disappeared
In breath business attribute information corresponding with the message filtering classification and it is described consumption attribute information in the message filtering class
Not corresponding information is compared, and determines the first consumer of the service message to be issued.
Optionally, consumer's determination unit is sieved for obtaining in the service message to be issued with the message
Select the set of the corresponding business attribute information of classification;By the set got as a whole with it is described consumption attribute information in institute
It states the corresponding information of message filtering classification and carries out intersection operation, determine the first consumer of the service message to be issued.
Optionally, if the consumption attribute information includes keyword,
Consumer's determining module, including:
Algorithm determination unit, for the keyword quantity included in the consumption attribute information according to each consumer,
Determine the filtering algorithm of keyword, the filtering algorithm of the keyword includes language built-in algorithm and based on structure dictionary tree data
The algorithm of structure;
Second consumer's determination unit, for the filtering algorithm based on the keyword determined, to the industry to be issued
The consumption attribute information of the business attribute information for message of being engaged in and each consumer of the Message Queuing system are compared, and are determined
First consumer of the service message to be issued.
Optionally, the algorithm determination unit, if the quantity for the keyword is less than the first predetermined threshold value, really
The filtering algorithm for determining keyword is language built-in algorithm;If the quantity of the keyword is more than the first predetermined threshold value, and is less than
Second predetermined threshold value, it is determined that the filtering algorithm of keyword is the algorithm based on structure dictionary data tree structure, wherein, described the
Two predetermined threshold values are more than first predetermined threshold value.
Optionally, described device further includes:
Detection module, for monitoring the number of service message accumulated in the corresponding second message channel of first consumer
Amount;
Message storage module, if for the number of service message accumulated in the corresponding second message channel of the first consumer
Measure a predetermined level is exceeded threshold value, it is determined that first consumer is abnormal, and stores the service message of accumulation;
Sending module after working as the first consumer recovery normally, continues to send storage to first consumer
Accumulation service message.
A kind of message distribution equipment provided by the embodiments of the present application, the message distribution equipment include:
Processor;And
The memory of storage computer executable instructions is arranged to, the executable instruction makes the place when executed
Manage device:
It is used to obtain service message to be issued in the first message channel of issuing service message from Message Queuing system;
According to the business attribute information of the service message to be issued and each consumer of the Message Queuing system
Consumption attribute information, determine the first consumer of the service message to be issued;
The service message to be issued is distributed in the corresponding second message channel of first consumer, passes through institute
It states second message channel and is sent to first consumer.
By above technical solution provided by the embodiments of the present application as it can be seen that the embodiment of the present application is applied to Message Queuing system
In, obtain service message to be issued from the first message channel of Message Queuing system's issuing service message, and according to treating down
The business attribute information of the service message of hair and the consumption attribute information of each consumer of Message Queuing system, determine to wait to issue
Service message the first consumer, finally, service message to be issued is distributed to the corresponding second message of the first consumer
In channel, to be sent to the first consumer, in this way, can be disappeared by obtaining business to be issued from upstream messages queue system
Breath, and distributed components are set up in the downstream of Message Queuing system, to carry out refinement filtering to the business attribute information of service message,
The service message needed for it is filtered out for message consumer, saves the process that full dose service message is read from first message channel,
Few partial service message in full dose service message is only needed due to many message consumers, during message queue distribution
The utilization rate of network bandwidth can be improved to avoid the usage amount of network bandwidth, reduce the load of message channel equipment, save into
This.
Description of the drawings
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or it will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments described in application, for those of ordinary skill in the art, in the premise of not making the creative labor property
Under, it can also be obtained according to these attached drawings other attached drawings.
Fig. 1 is a kind of message distributing method embodiment of the application;
Fig. 2 is the application another kind message distributing method embodiment;
Fig. 3 is a kind of message distribution device embodiment of the application;
Fig. 4 is the application another kind message distribution apparatus embodiments.
Specific embodiment
The embodiment of the present application provides a kind of message distributing method, device and equipment.
In order to make those skilled in the art better understand the technical solutions in the application, below in conjunction with the application reality
The attached drawing in example is applied, the technical solution in the embodiment of the present application is clearly and completely described, it is clear that described implementation
Example is merely a part but not all of the embodiments of the present application.Based on the embodiment in the application, this field is common
Technical staff's all other embodiments obtained without creative efforts should all belong to the application protection
Range.
Embodiment one
As shown in Figure 1, the embodiment of the present application provides a kind of message distributing method, the executive agent of this method can be terminal
Equipment, the terminal device can such as personal computer equipment, can also such as mobile phone, tablet computer mobile terminal device, should
Terminal device can be the terminal device that user uses.This method can be used for recommending various types of information (such as text to user
Chapter, advertisement or application program etc.) etc. in processing.This method specifically may comprise steps of:
In step s 102, it waits to issue from Message Queuing system for obtaining in the first message channel of issuing service message
Service message.
Wherein, message queue can be in the transmission process of service message preserve service message container, message queue
Main purpose be to provide routing and ensure the transmission of service message, if send service message when recipient it is unavailable (such as from
Line etc.), message queue can retain the service message, and the recipient is given until the service message is delivered successfully.Message queue
System can collect service message, and the service message of collection is set to the system in message queue.Service message can be with
It is some public platform in the message that different network service generates, such as the microblogging of user's subscription, exists when in the public platform
During newer message, newer message can be sent to Message Queuing system, Message Queuing system can be by newer message
It is placed in message queue.
In force, message queue (Message Queue) is a kind of soft project component, for operation system decoupling and
Asynchronous communication can significantly improve handling capacity by message queue.For the web site of hundreds of millions grades of message numbers, numerous sons
System, son application have the demand of consumption message, and the application of message queue is very universal.The common composition portion of message queue
Dividing has the message producer, message channel (i.e. first message channel), message consumer, and the message producer will sequentially disappear in real time
Breath is pushed to first message channel, and message consumer accesses network, and can be from first message channel according to the demand of oneself
Consume different types of full dose message.However, message consumer every time from first message channel obtain service message when, be from
Different types of full dose message is obtained in first message channel, since the service message that each message consumer finally needs accounts for
The ratio very little of message total amount in one message channel, in this way, the data volume of the service message of message consumer can be caused to be sent to
It is larger, and most of service message therein be for some user it is unwanted, therefore so that the waste of resource,
For this purpose, the embodiment of the present application provides a kind of settling mode, i.e., distributed components are set up in the downstream of Message Queuing system, to distribute phase
The message answered gives corresponding message consumer, can specifically include the following contents:
When the message producer produces one or more service message, the service message produced can be sent to
In one message channel, first message channel includes multiple service messages for being sent to message consumer, moreover, multiple business
Message arranges in first message channel according to the sequencing of time, and the generated time of service message gets over apart from current time
Far, then service message is more forward in first message channel, and based on above-mentioned arrangement mode, one is formed in first message channel
Message queue.It (such as is had subscribed since a certain service message in message queue is usually destined to specified message consumer
The user of the service message), it therefore, can be before service message be sent to message consumer, it can be to message queue
In service message screened, determine the corresponding message consumer of each service message.When needs are sent out to message consumer
When sending service message, it can in batches be obtained from the first message channel of upstream messages queue system issuing service message and wait to issue
Service message.In practical applications, it is obtained in batches for from the first message channel of Message Queuing system's issuing service message
The processing of service message to be issued is taken, wherein, it can be by pre-set corresponding to obtain service message to be issued in batches
Interface is realized, i.e., obtains service message to be issued by pre-set interface bulk.
In step S104, according to the business attribute information of above-mentioned service message to be issued and above-mentioned Message Queuing system
Each consumer consumption attribute information, determine the first consumer of service message to be issued.
Wherein, business attribute information can be the information such as substantive characteristics or the feature of service message, for example, keyword and/
Or user identifier etc., keyword therein can be the words that the service message main contents can be embodied in service message,
In user identifier can be relevant information that user characterizes user identity, such as the name of user, account etc..Consume attribute letter
It can be the information such as substantive characteristics relevant with message consumer or feature to cease, such as topic word or user identifier, wherein if
Epigraph can be the relevant word of topic liked or liked with message consumer.In the embodiment of the present application, business attribute information
It may be the same or different with the consumption corresponding type of message of attribute information and the specific information content, for example, to be issued
The business attribute information of service message is entirely keyword, alternatively, in service message to be issued a part of business information industry
Business attribute information is keyword, and the business attribute information of another part is user identifier.For another example some or multiple consumers
Consumption attribute information for topic word, the consumption attribute information of remaining consumer is user identifier etc..
In force, service message can be that the service message sets corresponding business attribute information when issuing, such as crucial
Word and/or user identifier etc. in addition, each message consumer can also be provided with corresponding consumption attribute information, such as are talked about
Epigraph and/or user identifier etc..It is obtained after the service message issued by the processing of above-mentioned steps S102, it can be from waiting to issue
Each service message in extract its business attribute information, it is then possible to obtain the information consumption for being currently at presence
Person can extract consumption attribute information from the relevant information of above-mentioned message consumer.Each service message can be carried out
Screening can choose a service message from the service message to be issued that batch obtains, can be by the industry of the service message
Business attribute information is compared respectively with the consumption attribute information of above-mentioned message consumer, if the two is identical, shows that this disappears
Breath consumer has subscribed the service message, if the two is different, shows that the message consumer does not subscribe to the service message, really
After the corresponding message consumer of the fixed service message, next service message can be chosen again, then, then to the service message
Business attribute information and the consumption attribute information of each message consumer are compared, and determine the corresponding message of the service message
Consumer, by the above-mentioned means, the execution above process can be recycled, until the service message to be issued that batch obtains is all complete
Into above-mentioned screening process, the first consumer of service message to be issued is obtained.
In step s 106, service message to be issued is distributed in the corresponding second message channel of the first consumer,
First consumer is sent to by second message channel.
In force, it by the processing of above-mentioned steps S104, determines after the first consumer of the service message issued, it can
Think that different message consumers sets corresponding message channel, you can corresponding second message to be set to lead to for the first consumer
Road, it is then possible to the service message for determining the first consumer is issued in corresponding second message channel, in this way, batch obtains
The each that takes service message to be issued can be distributed in the corresponding second message channel of corresponding message consumer,
So as to which corresponding service message is sent to corresponding message consumer.
It should be noted that service message to be issued is distributed in the corresponding second message channel of the first consumer
Processing can be provided the first consumer corresponding second message channel, for example, MCQ servers or Redis by different servers
Server etc., you can corresponded to so that service message to be issued is distributed to the first consumer in MCQ servers or Redis servers
Second message channel in, to send it to the first consumer by MCQ servers or Redis servers.
Based on above-mentioned related content, above-mentioned first message channel is that the upstream of message distribution disappears during message distribution
The channel of queue system issuing service message is ceased, first message channel can also be known as upstream messages in practical applications and led to
Road, second message channel give corresponding information consumption for the downstream issuing service message of the message distribution during message distribution
Second message channel can also be known as downstream messages channel by the channel of person in practical applications.
The embodiment of the present application provides a kind of message distributing method, applied in Message Queuing system, from Message Queuing system
Service message to be issued is obtained in the first message channel of issuing service message, and according to the business of service message to be issued
The consumption attribute information of each consumer of attribute information and Message Queuing system determines that the first of service message to be issued disappears
Fei Zhe finally, service message to be issued is distributed in the corresponding second message channel of the first consumer, to be sent to first
Consumer, in this way, can be by obtaining service message to be issued from upstream messages queue system, and in Message Queuing system
Downstream set up distributed components, to carry out refinement filtering to the business attribute information of service message, filtered out for message consumer
Service message needed for it saves the process that full dose service message is read from first message channel, due to many message consumers
Only need few partial service message in full dose service message, message queue can be to avoid network bandwidth during distributing
Usage amount improves the utilization rate of network bandwidth, reduces the load of message channel equipment, cost-effective.
Embodiment two
As shown in Fig. 2, the embodiment of the present application provides a kind of message distributing method, this method can be by terminal device and service
Device performs jointly, wherein, the terminal device can such as personal computer equipment, can also such as mobile phone, tablet computer it is mobile
Terminal device, the terminal device can be the terminal device that user uses.The server can be independent server, can also
The server cluster being made of multiple servers moreover, the server can be the background server of certain application program, also may be used
To be the background server of certain website (such as shopping website).This method can be used for recommending various types of information to user
In processing such as (such as article, advertisement or application programs).This method specifically may comprise steps of:
In step S202, wait to issue from Message Queuing system for obtaining in the first message channel of issuing service message
Service message.
In force, can system initialization first be carried out to Message Queuing system, at this point, Message Queuing system can will be every
The screening conditions of each item setup are initialized in one business, it is then possible to disappear from Message Queuing system's issuing service
Service message to be issued is obtained in the first message channel of breath, wherein, from the first of Message Queuing system's issuing service message
The processing that service message to be issued is obtained in message channel is identical with the step content of step S102 in above-described embodiment one, from
The concrete processing procedure that service message to be issued is obtained in the first message channel of Message Queuing system's issuing service message can
With referring to the related content of above-mentioned steps S102, details are not described herein.
It can include a variety of different classes of attributes, such as topic word, use in view of the business attribute information of service message
Family mark and keyword etc. can include different processing modes, moreover, each business for different business attribute informations
Attribute information can also include a variety of different realization methods, and providing one kind respectively below for different business attribute informations can
The processing mode of choosing specifically may comprise steps of S204 and step S206 or step S208 and step S210.
In step S204, according to the business attribute information of service message to be issued, service message to be issued is determined
The corresponding message filtering classification of affiliated business item.
Wherein, which includes screening based on topic word screening, based on user identifier.Topic word therein can
To be the relevant word of topic liked or liked with message consumer, user identifier can be the phase that user characterizes user identity
Close information, such as the name of user, account etc..
In force, can be that the service message sets corresponding business category when the message producer produces a service message
Property information, if for example, the corresponding message filtering classification of business item belonging to certain service message is to be screened based on topic word,
Can be provided in the business attribute information of the service message characterize the business datum need topic word screen by way of carry out
It can include screening based on topic word in the information of message filtering, such as the business attribute information and one or more corresponding
A topic word, in this way, when getting the service message, the service message can be got from the service message to be passed through
The mode of topic word is screened.If service message to be issued includes multiple service messages, and wherein has multiple service messages
Belong to the message filtering classification screened based on topic word, for such situation, can by including specific topic
The difference of word and be distinguish, for example, the business attribute information of service message 1 can include based on topic word screen, it is therein
Topic word can include topic word A, topic word B and topic word C, and the business attribute information of service message 2 can be included based on words
Epigraph screening, topic word therein can include topic word A, topic word D and topic word C, it is seen then that two service messages belong to
It is screened based on topic word, is largely identical topic word in the topic word that the two includes, at this point it is possible to exist not by the two
With topic word (i.e. topic word B and topic word D) come distinguish the two.
Before message filtering is carried out, in order to improve the screening efficiency of message, can first treat the service message that issues into
Row pretreatment, specifically, can obtain each service message to be issued, it is right can to extract its from each service message
The business attribute information answered can gather obtained business attribute information, can store the industry in table form
Business attribute information, wherein, different business attribute informations can correspond to corresponding traffic item purpose mark.The embodiment of the present application
In, it is contemplated that topic word and user identifier are the important informations in message filtering, topic word and user identifier can be directed to, to industry
Business message is pre-processed, you can, can be by the topic of extraction to extract topic word from each service message to be issued
Word and the corresponding storage of corresponding traffic item purpose mark, it is then also possible to obtain the user identifier of whole message consumers.It can
To obtain whether the business item belonging to service message to be issued includes the business item screened based on topic word, if packet
Include, then can judge in batches in whole topic words of said extracted whether there is with the relevant service message of certain project, if deposited
Topic word screening can be then being carried out, if it does not exist, then the screening of other business attribute informations can be carried out.If treated down
Business item belonging to the service message of hair does not include the business item screened based on topic word, then can carry out other business categories
The screening of property information.
Furthermore it is also possible to extract user identifier from each service message to be issued, the user of extraction can be marked
Knowledge and the corresponding storage of corresponding traffic item purpose mark, it is then also possible to obtain the user identifier of whole message consumers.It can
To obtain whether the business item belonging to service message to be issued includes the business item screened based on user identifier, if packet
Include, then can judge in batches in whole user identifiers of said extracted whether there is with the relevant user identifier of certain project, if
In the presence of user identifier screening can then being carried out, if it does not exist, then the screening of other business attribute informations can be carried out.If
Business item belonging to service message to be issued does not include the business item screened based on user identifier, then can carry out other
The screening of business attribute information.
In step S206, according to the message filtering classification determined, it will be sieved in service message to be issued with the message
Information corresponding with the message filtering classification is selected in the corresponding business attribute information of classification and above-mentioned consumption attribute information to carry out pair
Than determining the first consumer of service message to be issued.
In force, if above-mentioned message filtering classification is to be screened based on topic word, business to be issued can be disappeared
With being based in the topic word corresponding business attribute information of screening and above-mentioned consumption attribute information with screening phase based on topic word in breath
The information answered is compared, you can with will be to be issued service message in the relevant business attribute information of topic word with consumption belong to
Property information in topic word it is relevant consumption attribute information compared, for example, the topic word phase in service message to be issued
The business attribute information of pass includes multiple topic words, can be respectively topic word AA, topic word BB and topic word CC, information consumption
1 corresponding topic word of person can be respectively topic word KK, topic word MM and topic word NN, 2 corresponding topic word of message consumer
Can be respectively topic word AA, topic word MM and topic word PP, 3 corresponding topic word of message consumer can be respectively topic word
AA, topic word BB and topic word CC, then by the topic word of above-mentioned service message to be issued respectively with message consumer 1, message
Consumer 2 and 3 corresponding topic word of message consumer are compared, and the topic word and message for obtaining service message to be issued disappear
3 corresponding topic word of the person of expense is identical, then the first consumer that can determine service message to be issued is message consumer 3.
The specific processing mode of above-mentioned steps S206 can be varied, a kind of optional processing mode presented below, tool
Body may comprise steps of one and step 2.
Step 1 obtains the set of business attribute information corresponding with message filtering classification in service message to be issued.
In force, any vacation can not be done to the quantity of service message screened based on topic word and user identifier first
If all business attribute informations can be stored into database (such as NoSQL databases), and calculate the business attribute information
Hash value.The lookup of business attribute information can be carried out using the advantage and hash value of memory type database.
Screening logic based on user identifier can remove inquiry database by the user identifier of service message, it is assumed that M
A message consumer, batch screen N service message, include 1 user identifier in every service message, in this way, based on using
The screening of family mark will carry out m*n*1 inquiry, and it is RTT (Round Trip Time, when round-trip to inquire extra cost every time
Between), then it takes back and forth as M*N*1*RTT.In order to reduce inquiry cost, the user identifier composition of N service message can be taken to close
Collection, obtains the set of business attribute information corresponding with message filtering classification in service message to be issued.
Step 2, by the set got as a whole with consuming information corresponding with message filtering classification in attribute information
Intersection operation is carried out, determines the first consumer of service message to be issued.
In force, for the screening based on user identifier, this is optimized in the embodiment of the present application, that is, takes N industry
Screening collection p1, the p2 of the intersection n and M message consumer in database of the user identifier composition for message of being engaged in ..., pM is carried out successively
Intersection operation, i.e. n ∩ p1n ∩ p2 ... n ∩ pM.Database pipeline can be utilized to perform m item orders, in this way, using only primary
RTT has just obtained set Ek=min (n, pk), the wherein k=1 ... M of user identifier that this batch of message needs screen, together respectively
When, risk that this processing mode is overflowed without memory.
Further determine that the processing of the first consumer of service message to be issued may refer in above-mentioned steps S206
Related content, details are not described herein.
For consume attribute information be keyword in the case of, can include a variety of different processing modes, presented below one
The optional processing mode of kind, specifically may comprise steps of S208 and step S210.
In step S208, according to the keyword quantity included in the consumption attribute information of each consumer, key is determined
The filtering algorithm of word, the filtering algorithm of the keyword include language built-in algorithm and the calculation based on structure dictionary data tree structure
Method, the consumption attribute information include keyword.
In force, it is contemplated that the quantity of keyword included in consumption attribute information is different, when being screened based on keyword,
The complexity of its screening process may be different, i.e., keyword is more, carry out needing to carry out keyword during the screening based on keyword
The number of comparison is more, can reduce message distribution efficiency in this way, for this purpose, can respectively be set according to the difference of keyword quantity
Different keyword filtering algorithms specifically, can pre-set the filtering algorithm of multiple and different keywords, such as in language
Algorithm and the algorithm based on structure dictionary data tree structure etc. are put, the selection of the filtering algorithm of keyword can be according to actual conditions
Setting.The filtering algorithm that different keywords can be directed to sets the amount threshold of different keywords, so as to according to every
Pass between the keyword quantity and the amount threshold of the keyword of above-mentioned setting that are included in the consumption attribute information of a consumer
System determines to need the filtering algorithm of keyword to be used.
Include language built-in algorithm and based on the calculation for building dictionary data tree structure for the filtering algorithm of the keyword
The situation of method, then the specific processing mode of above-mentioned steps S208 may comprise steps of one and step 2.
Step 1, if the quantity of above-mentioned keyword is less than the first predetermined threshold value, it is determined that the filtering algorithm of keyword is
Language built-in algorithm.
Wherein, the first predetermined threshold value may be set according to actual conditions, and specific such as 200 or 300.Language built-in algorithm can
To be the algorithm based on the matching relationship between spoken and written languages, you can be comparison or multiple right one by one between word
Than etc..
In force, it is contemplated that, can be direct only comprising less keyword in the consumption attribute information of message consumer
Whether matched using language built-in algorithm cycle criterion keyword, for example, keyword includes news and society, then it can be with keyword
" new " in " news " is matched respectively with each character in the business attribute information in service message, judges that the two is
It is no identical, if it is identical, then judge whether " news " in keyword " news " matches, if it does, then again to keyword " society
Meeting " carries out matching comparison in the manner described above, if it does not match, not can be determined that the service message and the message consumer not
Match.
Step 2, if the quantity of above-mentioned keyword is more than the first predetermined threshold value, and less than the second predetermined threshold value, it is determined that
The filtering algorithm of keyword is the algorithm based on structure dictionary data tree structure, wherein, it is default that the second predetermined threshold value is more than first
Threshold value.
Wherein, the second predetermined threshold value may be set according to actual conditions, and specific such as 1000 or 1500.Based on structure dictionary
The algorithm of data tree structure can be the algorithm of the progress Keywords matching of the dictionary data tree structure based on structure.Dictionary tree is again
Trie trees are can be referred to as, efficiency is higher, can be used for counting and a large amount of character string that sorts, advantage are to subtract to the maximum extent
Few meaningless character string comparison, dictionary tree can be carried using the common prefix of character string to reduce the expense of query time with reaching
Efficient purpose, the fundamental property of dictionary tree can include:Root node does not include character, in addition to root node, each node
Only include a character;From root node to some node, the Connection operator that passes through on path is exactly that the node is corresponding
Character string;The character string that all child nodes of each node include differs.
In force, in order to lower the screening time of information, the matching efficiency of keyword is improved, if it is decided that obtained pass
The quantity of keyword is more than the first predetermined threshold value, and less than the second predetermined threshold value, then can select to use based on structure dictionary tree number
Keyword screening is carried out according to the algorithm of structure.In addition, if the quantity of obtained keyword is more than the second predetermined threshold value, then it can be with
Keyword screening is carried out by way of above-mentioned cryptographic Hash.
In step S210, based on the filtering algorithm for the keyword determined, the business category of the service message issued is treated
The consumption attribute information of each consumer of property information and Message Queuing system is compared, and determines service message to be issued
First consumer.
In force, if it is determined that the keyword quantity gone out is less than the first predetermined threshold value, then using language built-in algorithm pair
The consumption attribute information of the business attribute information of service message to be issued and each consumer of Message Queuing system carry out pair
Than determining the first consumer of service message to be issued;If it is determined that keyword quantity be more than the first predetermined threshold value, and
Less than the second predetermined threshold value, then the business category of the service message issued is treated using the algorithm based on structure dictionary data tree structure
The consumption attribute information of each consumer of property information and Message Queuing system is compared, and determines service message to be issued
First consumer;If it is determined that keyword quantity be more than the second predetermined threshold value, then treated and issued by the way of cryptographic Hash
The business attribute information of service message and the consumption attribute information of each consumer of Message Queuing system compared, determine
First consumer of service message to be issued.
Further, it is also possible to the second message channel that service message has been issued through screening is monitored, when industry therein
When message of being engaged in accumulation reaches a certain amount of, it can alarm, specifically may refer to following step S212 and step S214.
In step S212, the quantity of service message accumulated in the corresponding second message channel of the first consumer is monitored.
In step S214, if the quantity of service message accumulated in the corresponding second message channel of the first consumer surpasses
Cross predetermined quantity threshold value, it is determined that the first consumer is abnormal, and stores the service message of accumulation.
Wherein, predetermined quantity threshold value may be set according to actual conditions, and specific such as 100,000 or 150,000.
In step S216, after the first consumer restores normal, continue the accumulation stored to the first consumer transmission
Service message.
In force, for example, when accumulation quantity reaches 100,000 service messages, it is believed that corresponding message consumer is different
Often, at this point it is possible to which service message is taken to land persistence strategy, which is dumped in relevant database, in case
When message consumer restores normal condition, continue to consume.
The embodiment of the present application provides a kind of message distributing method, applied in Message Queuing system, from Message Queuing system
Service message to be issued is obtained in the first message channel of issuing service message, and according to the business of service message to be issued
The consumption attribute information of each consumer of attribute information and Message Queuing system determines that the first of service message to be issued disappears
Fei Zhe finally, service message to be issued is distributed in the corresponding second message channel of the first consumer, to be sent to first
Consumer, in this way, can be by obtaining service message to be issued from upstream messages queue system, and in Message Queuing system
Downstream set up distributed components, to carry out refinement filtering to the business attribute information of service message, filtered out for message consumer
Service message needed for it saves the process that full dose service message is read from first message channel, due to many message consumers
Only need few partial service message in full dose service message, message queue can be to avoid network bandwidth during distributing
Usage amount improves the utilization rate of network bandwidth, reduces the load of message channel equipment, cost-effective.
Embodiment three
It is above message distributing method provided by the embodiments of the present application, based on same thinking, the embodiment of the present application also carries
For a kind of message distribution device, as shown in Figure 3.
The message distribution device is applied in Message Queuing system, and described device includes:Message capturing module 301, consumption
Person's determining module 302 and distribution module 303, wherein:
Message capturing module 301, for being used for the first message channel of issuing service message from the Message Queuing system
It is middle to obtain service message to be issued;
Consumer's determining module 302 for the business attribute information of service message to be issued according to and described disappears
The consumption attribute information of each consumer of queue system is ceased, determines the first consumer of the service message to be issued;
Distribution module 303, for the service message to be issued to be distributed to first consumer corresponding second
In message channel, first consumer is sent to by the second message channel.
In the embodiment of the present application, the business attribute information of the service message to be issued includes topic word, keyword, use
One or more in the mark of family, the consumption attribute information includes topic word, keyword, one kind in user identifier or more
Kind.
In the embodiment of the present application, consumer's determining module 302, including:
Classification determination unit is screened, for the business attribute information of service message to be issued according to, is determined described
The corresponding message filtering classification of business item belonging to service message to be issued, the message filtering classification are included based on topic
Word screening is screened based on user identifier;
First consumer's determination unit, for according to the message filtering classification determined, the business to be issued to be disappeared
In breath business attribute information corresponding with the message filtering classification and it is described consumption attribute information in the message filtering class
Not corresponding information is compared, and determines the first consumer of the service message to be issued.
In the embodiment of the present application, consumer's determination unit, for obtain in the service message to be issued with institute
State the set of the corresponding business attribute information of message filtering classification;The set got is believed as a whole with the consumption attribute
Information corresponding with the message filtering classification carries out intersection operation in breath, determines that the first of the service message to be issued disappears
Fei Zhe.
In the embodiment of the present application, if the consumption attribute information includes keyword,
Consumer's determining module 302, including:
Algorithm determination unit, for the keyword quantity included in the consumption attribute information according to each consumer,
Determine the filtering algorithm of keyword, the filtering algorithm of the keyword includes language built-in algorithm and based on structure dictionary tree data
The algorithm of structure;
Second consumer's determination unit, for the filtering algorithm based on the keyword determined, to the industry to be issued
The consumption attribute information of the business attribute information for message of being engaged in and each consumer of the Message Queuing system are compared, and are determined
First consumer of the service message to be issued.
In the embodiment of the present application, the algorithm determination unit, if the quantity for the keyword is default less than first
Threshold value, it is determined that the filtering algorithm of keyword is language built-in algorithm;If the quantity of the keyword is more than the first default threshold
Value, and less than the second predetermined threshold value, it is determined that the filtering algorithm of keyword is the algorithm based on structure dictionary data tree structure,
In, second predetermined threshold value is more than first predetermined threshold value.
In the embodiment of the present application, described device further includes:
Detection module, for monitoring the number of service message accumulated in the corresponding second message channel of first consumer
Amount;
Message storage module, if for the number of service message accumulated in the corresponding second message channel of the first consumer
Measure a predetermined level is exceeded threshold value, it is determined that first consumer is abnormal, and stores the service message of accumulation;
Sending module after working as the first consumer recovery normally, continues to send storage to first consumer
Accumulation service message.
The embodiment of the present application provides a kind of message distribution device, applied in Message Queuing system, from Message Queuing system
Service message to be issued is obtained in the first message channel of issuing service message, and according to the business of service message to be issued
The consumption attribute information of each consumer of attribute information and Message Queuing system determines that the first of service message to be issued disappears
Fei Zhe finally, service message to be issued is distributed in the corresponding second message channel of the first consumer, to be sent to first
Consumer, in this way, can be by obtaining service message to be issued from upstream messages queue system, and in Message Queuing system
Downstream set up distributed components, to carry out refinement filtering to the business attribute information of service message, filtered out for message consumer
Service message needed for it saves the process that full dose service message is read from first message channel, due to many message consumers
Only need few partial service message in full dose service message, message queue can be to avoid network bandwidth during distributing
Usage amount improves the utilization rate of network bandwidth, reduces the load of message channel equipment, cost-effective.
Example IV
It is above message distribution device provided by the embodiments of the present application, based on same thinking, the embodiment of the present application also carries
For a kind of message distribution equipment, as shown in Figure 4.
The message distribution equipment can be the terminal device that above-described embodiment provides.
Message distribution equipment can generate bigger difference due to configuration or performance are different, can include one or one with
On processor 401 and memory 402, one or more storage application programs or number can be stored in memory 402
According to.Wherein, memory 402 can be of short duration storage or persistent storage.One can be included by being stored in the application program of memory 402
A or more than one module (diagram is not shown), each module can include can to the series of computation machine in message discharge device
Execute instruction.Further, processor 401 could be provided as communicating with memory 402, performs and deposits in message distribution equipment
Series of computation machine executable instruction in reservoir 402.Message distribution equipment can also include one or more power supplys
403, one or more wired or wireless network interfaces 404, one or more input/output interfaces 405, one or
More than one keyboard 406.
Specifically in the present embodiment, message distribution equipment includes memory and one or more program,
In one either more than one program is stored in memory and one or more than one program can include one or one
With upper module, and each module can include to the series of computation machine executable instruction in message discharge device, and be configured
With by one either more than one processor perform that this or more than one program include can for carrying out following computer
Execute instruction:
Applied in Message Queuing system, including:
Disappear from the Message Queuing system for obtaining business to be issued in the first message channel of issuing service message
Breath;
According to the business attribute information of the service message to be issued and each consumer of the Message Queuing system
Consumption attribute information, determine the first consumer of the service message to be issued;
The service message to be issued is distributed in the corresponding second message channel of first consumer, passes through institute
It states second message channel and is sent to first consumer.
Optionally, the business attribute information of the service message to be issued is included in topic word, keyword, user identifier
It is one or more, the consumption attribute information includes topic word, keyword, one or more in user identifier.
Optionally, the business attribute information of service message to be issued described in the basis and the Message Queuing system
The consumption attribute information of each consumer determines the first consumer of the service message to be issued, including:
According to the business attribute information of the service message to be issued, determine belonging to the service message to be issued
The corresponding message filtering classification of business item, the message filtering classification include sieving based on topic word screening, based on user identifier
Choosing;
According to the message filtering classification determined, by the service message to be issued with the message filtering classification phase
Information corresponding with the message filtering classification is compared in the business attribute information answered and the consumption attribute information, is determined
First consumer of the service message to be issued.
Optionally, the message filtering classification that the basis is determined will disappear in the service message to be issued with described
Information corresponding with the message filtering classification in the corresponding business attribute information of breath screening classification and the consumption attribute information
It is compared, determines the first consumer of the service message to be issued, including:
Business attribute information corresponding with the message filtering classification determined in service message to be issued described in acquisition
Set;
The set got is corresponding with the message filtering classification determined to the consumption attribute information as a whole
Information carry out intersection operation, determine the first consumer of the service message to be issued.
Optionally, if the consumption attribute information includes keyword,
The business attribute information of service message to be issued described in the basis and each of the Message Queuing system disappear
The consumption attribute information of the person of expense determines the first consumer of the service message to be issued, including:
According to the keyword quantity included in the consumption attribute information of each consumer, determine that the screening of keyword is calculated
Method, the filtering algorithm of the keyword include language built-in algorithm and the algorithm based on structure dictionary data tree structure;
Based on the filtering algorithm for the keyword determined, business attribute information and institute to the service message to be issued
The consumption attribute information for stating each consumer of Message Queuing system is compared, and determines the of the service message to be issued
One consumer.
Optionally, the keyword quantity included in the consumption attribute information according to each consumer determines to close
The filtering algorithm of keyword, including:
If the keyword quantity is less than the first predetermined threshold value, it is determined that the filtering algorithm of keyword is the built-in calculation of language
Method;
If the keyword quantity is more than the first predetermined threshold value, and less than the second predetermined threshold value, it is determined that keyword
Filtering algorithm is the algorithm based on structure dictionary data tree structure, wherein, it is default that second predetermined threshold value is more than described first
Threshold value.
Optionally, the method further includes:
Monitor the quantity of service message accumulated in the corresponding second message channel of first consumer;
If the quantity a predetermined level is exceeded threshold for the service message accumulated in the corresponding second message channel of the first consumer
Value, it is determined that first consumer is abnormal, and stores the service message of accumulation;
After first consumer restores normal, the business for continuing the accumulation for sending storage to first consumer disappears
Breath.
The embodiment of the present application provides a kind of message distribution equipment, applied in Message Queuing system, from Message Queuing system
Service message to be issued is obtained in the first message channel of issuing service message, and according to the business of service message to be issued
The consumption attribute information of each consumer of attribute information and Message Queuing system determines that the first of service message to be issued disappears
Fei Zhe finally, service message to be issued is distributed in the corresponding second message channel of the first consumer, to be sent to first
Consumer, in this way, can be by obtaining service message to be issued from upstream messages queue system, and in Message Queuing system
Downstream set up distributed components, to carry out refinement filtering to the business attribute information of service message, filtered out for message consumer
Service message needed for it saves the process that full dose service message is read from first message channel, due to many message consumers
Only need few partial service message in full dose service message, message queue can be to avoid network bandwidth during distributing
Usage amount improves the utilization rate of network bandwidth, reduces the load of message channel equipment, cost-effective.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims
It is interior.In some cases, the action recorded in detail in the claims or step can be come according to different from the sequence in embodiment
It performs and still can realize desired result.In addition, the process described in the accompanying drawings not necessarily require show it is specific suitable
Sequence or consecutive order could realize desired result.In some embodiments, multitasking and parallel processing be also can
With or it may be advantageous.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example,
Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So
And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit.
Designer nearly all obtains corresponding hardware circuit by the way that improved method flow is programmed into hardware circuit.Cause
This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device
(Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate
Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer
Voluntarily programming a digital display circuit " integrated " on a piece of PLD, designs and make without asking chip maker
Dedicated IC chip.Moreover, nowadays, substitution manually makes IC chip, this programming is also used instead mostly " patrols
Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development,
And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language
(Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL
(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description
Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL
(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby
Hardware Description Language) etc., VHDL (Very-High-Speed are most generally used at present
Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also should
This understands, it is only necessary to method flow slightly programming in logic and is programmed into integrated circuit with above-mentioned several hardware description languages,
The hardware circuit for realizing the logical method flow can be readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing
The computer of computer readable program code (such as software or firmware) that device and storage can be performed by (micro-) processor can
Read medium, logic gate, switch, application-specific integrated circuit (Application Specific Integrated Circuit,
ASIC), the form of programmable logic controller (PLC) and embedded microcontroller, the example of controller include but not limited to following microcontroller
Device:ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, are deposited
Memory controller is also implemented as a part for the control logic of memory.It is also known in the art that in addition to
Pure computer readable program code mode is realized other than controller, can be made completely by the way that method and step is carried out programming in logic
Controller is obtained in the form of logic gate, switch, application-specific integrated circuit, programmable logic controller (PLC) and embedded microcontroller etc. to come in fact
Existing identical function.Therefore this controller is considered a kind of hardware component, and various to being used to implement for including in it
The device of function can also be considered as the structure in hardware component.Or even, the device for being used to implement various functions can be regarded
For either the software module of implementation method can be the structure in hardware component again.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by having the function of certain product.A kind of typical realization equipment is computer.Specifically, computer for example may be used
Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment
The combination of equipment.
For convenience of description, it is divided into various units during description apparatus above with function to describe respectively.Certainly, implementing this
The function of each unit is realized can in the same or multiple software and or hardware during specification one or more embodiment.
It should be understood by those skilled in the art that, the embodiment of this specification can be provided as method, system or computer journey
Sequence product.Therefore, complete hardware embodiment, complete software embodiment or knot can be used in this specification one or more embodiment
The form of embodiment in terms of conjunction software and hardware.Moreover, this specification one or more embodiment can be used at one or more
A computer-usable storage medium for wherein including computer usable program code (includes but not limited to magnetic disk storage, CD-
ROM, optical memory etc.) on the form of computer program product implemented.
The embodiment of this specification is with reference to the method, equipment (system) and computer program according to the embodiment of the present application
The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions
In each flow and/or block and flowchart and/or the block diagram in flow and/or box combination.These can be provided
Computer program instructions are to all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices
Processor is to generate a machine so that passes through the instruction that computer or the processor of other programmable data processing devices perform
Generate the work(for being used to implement and being specified in one flow of flow chart or multiple flows and/or one box of block diagram or multiple boxes
The device of energy.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction generation being stored in the computer-readable memory includes referring to
Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or
The function of being specified in multiple boxes.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps are performed on calculation machine or other programmable devices to generate computer implemented processing, so as in computer or
The instruction offer performed on other programmable devices is used to implement in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.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), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, CD-ROM read-only memory (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, the storage of tape magnetic rigid disk or other magnetic storage apparatus
Or any other non-transmission medium, available for storing the information that can be accessed by a computing device.It defines, calculates according to herein
Machine readable medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability
Comprising so that process, method, commodity or equipment including a series of elements are not only including those elements, but also wrap
Include other elements that are not explicitly listed or further include for this process, method, commodity or equipment it is intrinsic will
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that wanted including described
Also there are other identical elements in the process of element, method, commodity or equipment.
It will be understood by those skilled in the art that the embodiment of this specification can be provided as method, system or computer program production
Product.Therefore, this specification one or more embodiment can be used complete hardware embodiment, complete software embodiment or with reference to software
With the form of the embodiment of hardware aspect.Moreover, this specification one or more embodiment can be used in one or more wherein
The computer-usable storage medium for including computer usable program code (includes but not limited to magnetic disk storage, CD-ROM, light
Learn memory etc.) on the form of computer program product implemented.
This specification one or more embodiment can computer executable instructions it is general on
Described in hereafter, such as program module.Usually, program module includes performing particular task or realizes particular abstract data type
Routine, program, object, component, data structure etc..Can also put into practice in a distributed computing environment this specification one or
Multiple embodiments, in these distributed computing environment, by being performed by communication network and connected remote processing devices
Task.In a distributed computing environment, the local and remote computer that program module can be located at including storage device is deposited
In storage media.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment
Point just to refer each other, and the highlights of each of the examples are difference from other examples.Especially for system reality
For applying example, since it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method
Part explanation.
The foregoing is merely the embodiments of this specification, are not limited to the application.For people in the art
For member, the application can have various modifications and variations.All any modifications made within spirit herein and principle, etc.
With replacement, improvement etc., should be included within the scope of claims hereof.
Claims (15)
1. a kind of message distributing method, which is characterized in that applied in Message Queuing system, the method includes:
It is used to obtain service message to be issued in the first message channel of issuing service message from the Message Queuing system;
According to disappearing for each consumer of the business attribute information of the service message to be issued and the Message Queuing system
Take attribute information, determine the first consumer of the service message to be issued;
The service message to be issued is distributed in the corresponding second message channel of first consumer, passes through described
Two message channels are sent to first consumer.
2. the according to the method described in claim 1, it is characterized in that, business attribute information packet of the service message to be issued
Include it is one or more in topic word, keyword, user identifier, it is described consumption attribute information include topic word, keyword, user
It is one or more in mark.
3. method according to claim 1 or 2, which is characterized in that the industry of service message to be issued described in the basis
The consumption attribute information of each consumer of business attribute information and the Message Queuing system determines that the business to be issued disappears
First consumer of breath, including:
According to the business attribute information of the service message to be issued, the business belonging to the service message to be issued is determined
The corresponding message filtering classification of project, the message filtering classification include screening based on topic word screening, based on user identifier;
It, will be corresponding with the message filtering classification in the service message to be issued according to the message filtering classification determined
Information corresponding with the message filtering classification is compared in business attribute information and the consumption attribute information, is determined described
First consumer of service message to be issued.
4. according to the method described in claim 3, it is characterized in that, the message filtering classification that the basis is determined, will described in
In service message to be issued business attribute information corresponding with the message filtering classification and it is described consumption attribute information in
The corresponding information of message filtering classification is compared, and determines the first consumer of the service message to be issued, including:
The set of business attribute information corresponding with the message filtering classification determined in service message to be issued described in acquisition;
The set got is believed as a whole with corresponding with the message filtering classification determined in the consumption attribute information
Breath carries out intersection operation, determines the first consumer of the service message to be issued.
If 5. according to the method described in claim 2, it is characterized in that, it is described consumption attribute information include keyword,
The business attribute information of service message to be issued described in the basis and each consumer of the Message Queuing system
Consumption attribute information, determine the first consumer of the service message to be issued, including:
According to the keyword quantity included in the consumption attribute information of each consumer, the filtering algorithm of keyword is determined,
The filtering algorithm of the keyword includes language built-in algorithm and the algorithm based on structure dictionary data tree structure;
Based on the filtering algorithm for the keyword determined, business attribute information to the service message to be issued and described disappear
The consumption attribute information for ceasing each consumer of queue system is compared, and determines that the first of the service message to be issued disappears
Fei Zhe.
6. the according to the method described in claim 5, it is characterized in that, consumption attribute information according to each consumer
In the keyword quantity that includes, determine the filtering algorithm of keyword, including:
If the keyword quantity is less than the first predetermined threshold value, it is determined that the filtering algorithm of keyword is language built-in algorithm;
If the keyword quantity is more than the first predetermined threshold value, and less than the second predetermined threshold value, it is determined that the screening of keyword
Algorithm is the algorithm based on structure dictionary data tree structure, wherein, second predetermined threshold value is more than first predetermined threshold value.
7. according to the method described in claim 1, it is characterized in that, the method further includes:
Monitor the quantity of service message accumulated in the corresponding second message channel of first consumer;
If the quantity a predetermined level is exceeded threshold value for the service message accumulated in the corresponding second message channel of the first consumer,
Determine that first consumer is abnormal, and stores the service message of accumulation;
After first consumer restores normal, continue to send the service message of the accumulation of storage to first consumer.
8. a kind of message distribution device, which is characterized in that applied in Message Queuing system, described device includes:
Message capturing module, for being treated from the Message Queuing system for being obtained in the first message channel of issuing service message
The service message issued;
Consumer's determining module, business attribute information and the message queue system for service message to be issued according to
The consumption attribute information of each consumer of system determines the first consumer of the service message to be issued;
Distribution module, for the service message to be issued to be distributed to the corresponding second message channel of first consumer
In, first consumer is sent to by the second message channel.
9. device according to claim 8, which is characterized in that the business attribute information packet of the service message to be issued
Include it is one or more in topic word, keyword, user identifier, it is described consumption attribute information include topic word, keyword, user
It is one or more in mark.
10. device according to claim 8 or claim 9, which is characterized in that consumer's determining module, including:
Classification determination unit is screened, for the business attribute information of service message to be issued according to, determines described treat down
The corresponding message filtering classification of business item belonging to the service message of hair, the message filtering classification include sieving based on topic word
Choosing is screened based on user identifier;
First consumer's determination unit, will be in the service message be issued for the message filtering classification that basis is determined
Business attribute information corresponding with the message filtering classification and it is described consumption attribute information in the message filtering classification phase
The information answered is compared, and determines the first consumer of the service message to be issued.
11. device according to claim 10, which is characterized in that consumer's determination unit, for obtaining described treat
The set of business attribute information corresponding with the message filtering classification in the service message issued;Using the set got as
It is whole to carry out intersection operation with information corresponding with the message filtering classification in the consumption attribute information, determine described treat down
First consumer of the service message of hair.
12. device according to claim 8, which is characterized in that if the consumption attribute information includes keyword,
Consumer's determining module, including:
Algorithm determination unit for the keyword quantity included in the consumption attribute information according to each consumer, determines
The filtering algorithm of keyword, the filtering algorithm of the keyword include language built-in algorithm and based on structure dictionary data tree structure
Algorithm;
Second consumer's determination unit for the filtering algorithm based on the keyword determined, disappears to the business to be issued
The consumption attribute information of each consumer of the business attribute information of breath and the Message Queuing system is compared, and is determined described
First consumer of service message to be issued.
13. device according to claim 12, which is characterized in that the algorithm determination unit, if for the key
The quantity of word is less than the first predetermined threshold value, it is determined that the filtering algorithm of keyword is language built-in algorithm;If the keyword
Quantity be more than the first predetermined threshold value, and less than the second predetermined threshold value, it is determined that the filtering algorithm of keyword is based on structure word
The algorithm of allusion quotation data tree structure, wherein, second predetermined threshold value is more than first predetermined threshold value.
14. device according to claim 8, which is characterized in that described device further includes:
Detection module, for monitoring the quantity of service message accumulated in the corresponding second message channel of first consumer;
Message storage module, if the quantity of service message for being accumulated in the corresponding second message channel of the first consumer surpasses
Cross predetermined quantity threshold value, it is determined that first consumer is abnormal, and stores the service message of accumulation;
Sending module after working as the first consumer recovery normally, continues to send the heap of storage to first consumer
Long-pending service message.
15. a kind of message distribution equipment, the message distribution equipment includes:
Processor;And
The memory of storage computer executable instructions is arranged to, the executable instruction makes the processing when executed
Device:
It is used to obtain service message to be issued in the first message channel of issuing service message from Message Queuing system;
According to disappearing for each consumer of the business attribute information of the service message to be issued and the Message Queuing system
Take attribute information, determine the first consumer of the service message to be issued;
The service message to be issued is distributed in the corresponding second message channel of first consumer, passes through described
Two message channels are sent to first consumer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711433487.2A CN108270662A (en) | 2017-12-26 | 2017-12-26 | A kind of message distributing method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711433487.2A CN108270662A (en) | 2017-12-26 | 2017-12-26 | A kind of message distributing method, device and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108270662A true CN108270662A (en) | 2018-07-10 |
Family
ID=62772623
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711433487.2A Pending CN108270662A (en) | 2017-12-26 | 2017-12-26 | A kind of message distributing method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108270662A (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109783258A (en) * | 2019-02-21 | 2019-05-21 | 北京奇艺世纪科技有限公司 | A kind of message treatment method, device and server |
CN109918213A (en) * | 2019-02-21 | 2019-06-21 | 北京奇艺世纪科技有限公司 | A kind of message treatment method, device and server |
CN110489249A (en) * | 2019-08-23 | 2019-11-22 | 行吟信息科技(上海)有限公司 | A kind of processing method and system of message |
CN110740195A (en) * | 2019-11-20 | 2020-01-31 | 山东鲁能软件技术有限公司 | distributed system data synchronization method and system based on message engine |
CN111245872A (en) * | 2018-11-28 | 2020-06-05 | 北京亿阳信通科技有限公司 | Sequential message filtering and distributing platform and method |
CN111784329A (en) * | 2020-06-30 | 2020-10-16 | 京东数字科技控股有限公司 | Service data processing method and device, storage medium and electronic device |
CN113296977A (en) * | 2021-02-24 | 2021-08-24 | 阿里巴巴集团控股有限公司 | Message processing method and device |
CN114553962A (en) * | 2022-02-21 | 2022-05-27 | 重庆伏特猫科技有限公司 | Mobile equipment data processing method and system based on message queue |
CN115333685A (en) * | 2022-10-10 | 2022-11-11 | 永鼎行远(南京)信息科技有限公司 | Intelligent information allocation system based on big data |
CN115914120A (en) * | 2022-11-08 | 2023-04-04 | 湖南长银五八消费金融股份有限公司 | Message sending method, message sending device, computer equipment and computer readable storage medium |
CN116431688A (en) * | 2022-11-14 | 2023-07-14 | 北京远舢智能科技有限公司 | Data processing method and device, electronic equipment and storage medium |
CN116431688B (en) * | 2022-11-14 | 2024-05-03 | 北京远舢智能科技有限公司 | Data processing method and device, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104468819A (en) * | 2014-12-24 | 2015-03-25 | 福建江夏学院 | Message pushing system and method for internet of things |
CN105847447A (en) * | 2016-06-01 | 2016-08-10 | 腾讯科技(深圳)有限公司 | Message push method and device |
CN106790696A (en) * | 2017-02-21 | 2017-05-31 | 腾讯科技(深圳)有限公司 | A kind of method for message transmission and device |
-
2017
- 2017-12-26 CN CN201711433487.2A patent/CN108270662A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104468819A (en) * | 2014-12-24 | 2015-03-25 | 福建江夏学院 | Message pushing system and method for internet of things |
CN105847447A (en) * | 2016-06-01 | 2016-08-10 | 腾讯科技(深圳)有限公司 | Message push method and device |
CN106790696A (en) * | 2017-02-21 | 2017-05-31 | 腾讯科技(深圳)有限公司 | A kind of method for message transmission and device |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111245872B (en) * | 2018-11-28 | 2023-10-13 | 北京亿阳信通科技有限公司 | Sequential message filtering and distributing platform and method |
CN111245872A (en) * | 2018-11-28 | 2020-06-05 | 北京亿阳信通科技有限公司 | Sequential message filtering and distributing platform and method |
CN109783258B (en) * | 2019-02-21 | 2021-02-23 | 北京奇艺世纪科技有限公司 | Message processing method and device and server |
CN109918213A (en) * | 2019-02-21 | 2019-06-21 | 北京奇艺世纪科技有限公司 | A kind of message treatment method, device and server |
CN109783258A (en) * | 2019-02-21 | 2019-05-21 | 北京奇艺世纪科技有限公司 | A kind of message treatment method, device and server |
CN110489249B (en) * | 2019-08-23 | 2022-03-22 | 行吟信息科技(上海)有限公司 | Message processing method and system |
CN110489249A (en) * | 2019-08-23 | 2019-11-22 | 行吟信息科技(上海)有限公司 | A kind of processing method and system of message |
CN110740195B (en) * | 2019-11-20 | 2022-05-20 | 山东鲁能软件技术有限公司 | Distributed system data synchronization method and system based on message engine |
CN110740195A (en) * | 2019-11-20 | 2020-01-31 | 山东鲁能软件技术有限公司 | distributed system data synchronization method and system based on message engine |
CN111784329A (en) * | 2020-06-30 | 2020-10-16 | 京东数字科技控股有限公司 | Service data processing method and device, storage medium and electronic device |
CN111784329B (en) * | 2020-06-30 | 2024-04-05 | 京东科技控股股份有限公司 | Service data processing method and device, storage medium and electronic device |
CN113296977A (en) * | 2021-02-24 | 2021-08-24 | 阿里巴巴集团控股有限公司 | Message processing method and device |
CN114553962A (en) * | 2022-02-21 | 2022-05-27 | 重庆伏特猫科技有限公司 | Mobile equipment data processing method and system based on message queue |
CN115333685A (en) * | 2022-10-10 | 2022-11-11 | 永鼎行远(南京)信息科技有限公司 | Intelligent information allocation system based on big data |
CN115333685B (en) * | 2022-10-10 | 2023-02-28 | 永鼎行远(南京)信息科技有限公司 | Intelligent information allocation system based on big data |
CN115914120A (en) * | 2022-11-08 | 2023-04-04 | 湖南长银五八消费金融股份有限公司 | Message sending method, message sending device, computer equipment and computer readable storage medium |
CN115914120B (en) * | 2022-11-08 | 2024-04-02 | 湖南长银五八消费金融股份有限公司 | Message sending method, device, computer equipment and computer readable storage medium |
CN116431688A (en) * | 2022-11-14 | 2023-07-14 | 北京远舢智能科技有限公司 | Data processing method and device, electronic equipment and storage medium |
CN116431688B (en) * | 2022-11-14 | 2024-05-03 | 北京远舢智能科技有限公司 | Data processing method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108270662A (en) | A kind of message distributing method, device and equipment | |
CN107395665A (en) | A kind of block chain service handling and business common recognition method and device | |
CN110503206A (en) | A kind of prediction model update method, device, equipment and readable medium | |
CN107395659A (en) | A kind of method and device of service handling and common recognition | |
CN107450972A (en) | A kind of dispatching method, device and electronic equipment | |
CN107424069A (en) | A kind of generation method of air control feature, risk monitoring and control method and apparatus | |
CN110335115A (en) | A kind of service order processing method and processing device | |
CN108988866A (en) | Valid data compression and analysis as service | |
CN108334585A (en) | A kind of spiders method, apparatus and electronic equipment | |
CN108418851A (en) | Policy issue system, method, apparatus and equipment | |
CN110022227A (en) | Method for processing business, device, equipment and storage medium | |
CN107133248A (en) | The sorting technique and device of a kind of application program | |
CN107016039A (en) | The method and Database Systems of database write-in | |
CN107016045A (en) | A kind of method and device of paged data inquiry | |
CN110032358A (en) | A kind of application program generation method, device, equipment and system | |
CN108074024A (en) | Risk Identification Method, apparatus and system | |
CN111314063A (en) | Big data information management method, system and device based on Internet of things | |
CN108021610A (en) | Random walk, random walk method, apparatus and equipment based on distributed system | |
GB2601884A (en) | Intelligent chat channel processor | |
CN108259526A (en) | A kind of data transmission method and device | |
CN108427737A (en) | A kind of data clearing method, equipment and computer-readable medium | |
CN103475730A (en) | Method for selecting web services guided by user certainty degree in Cloud environment | |
CN107391564A (en) | Data transfer device, device and electronic equipment | |
CN105991416B (en) | A kind of message delivery method and messaging middleware | |
CN110389989A (en) | A kind of data processing method, device and equipment |
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: 20180710 |
|
RJ01 | Rejection of invention patent application after publication |