CN106330766A - Message transmitting method and apparatus - Google Patents
Message transmitting method and apparatus Download PDFInfo
- Publication number
- CN106330766A CN106330766A CN201610673429.6A CN201610673429A CN106330766A CN 106330766 A CN106330766 A CN 106330766A CN 201610673429 A CN201610673429 A CN 201610673429A CN 106330766 A CN106330766 A CN 106330766A
- Authority
- CN
- China
- Prior art keywords
- message
- sent
- queue
- rotation queue
- sends
- 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
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/622—Queue service order
- H04L47/6225—Fixed service order, e.g. Round Robin
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/6295—Queue scheduling characterised by scheduling criteria using multiple queues, one for each individual QoS, connection, flow or priority
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention discloses a message transmitting method and apparatus. The method includes the following steps that: the number of messages stored in a second message circular queue is obtained; if the number of the messages stored in the second message circular queue does not exceed a first threshold value, messages to be transmitted stored in a first message circular queue are obtained and are stored in the second message circular queue; the messages to be transmitted in the second message circular queue are processed; and the processed messages to be transmitted are transmitted to a client. According to the message transmitting method and apparatus of the invention, a plurality of message circular queues store different messages, and therefore, the problems of frequent locking, memory allocation and release, which are caused by a condition that one queue buffering region is adopted, can be solved, the efficiency of message transmission can be improved, and system overhead can be reduced.
Description
Technical field
The present embodiments relate to software technology field, particularly relate to a kind of message method and device.
Background technology
Existing messaging systems typically uses a queue buffer to deposit the data fished for from notice storehouse, so
After the data of queue buffer are sent to the client of correspondence.The method realizes simple, but relief area is by using queue
Realize, to need in queue head releasing memory when data are sent completely at queue tail storage allocation when data arrive.If
System bearing bigger data stream, will be faced with the expense pressure that bigger internal memory operation causes.Meanwhile, at multi-thread environment
Under, carry out the data in queue processing to be faced with adding solution latching operation frequently, greatly affect the TPS of system.
Summary of the invention
The embodiment of the present invention provides a kind of message method and device, in order to improve the efficiency that message sends, reduces system
System expense.
A kind of message method that the embodiment of the present invention provides, including:
Determine the quantity of the message of the second Message Rotation Queue storage;
If the quantity of the message of described second Message Rotation Queue storage is not less than first threshold, then obtains the first message and follow
The message to be sent of ring queue storage, and store to described second Message Rotation Queue;
Message to be sent in described second Message Rotation Queue is processed, and will process after to be sent
Message sends to client.
Preferably, the message to be sent after processing sends after client, also includes:
If message to be sent described in described client feedback does not sends successfully, then do not send successful message deposit described
Store up to the 3rd Message Rotation Queue;
The successful message that do not sends in described 3rd Message Rotation Queue is sent to described client.
Preferably, by described 3rd Message Rotation Queue do not send successful message send to described client it
After, also include:
If the described transmission times of successful message that do not sends is more than Second Threshold, then do not send into described in notice server
The message of merit sends unsuccessfully.
Preferably, do not sending before successful message stores to the 3rd Message Rotation Queue by described, also including:
If the quantity not sending successful message in described 3rd Message Rotation Queue is more than the 3rd threshold value, then notify clothes
Message to be sent described in business device does not sends successfully, and does not sends out described in again fishing for from described server after a set time
Send successful message to described first Message Rotation Queue.
Preferably, also include:
Determine that store in described first Message Rotation Queue, the second Message Rotation Queue and the 3rd Message Rotation Queue disappears
Whether the total amount of breath is less than the 4th threshold value;
From described server, the most then fish for message to be sent;
The message to be sent fished for from server is sequentially stored the afterbody to described first Message Rotation Queue.
Preferably, also include:
If described client feedback message sends successfully, then message is sent successful state notifying to server, so that
The successful message of described transmission is not fished for.
Preferably, also include:
If the message to be sent of described first Message Rotation Queue storage is more than the 5th threshold value, will drag for from described server
The message taken abandons.
Correspondingly, the embodiment of the present invention additionally provides a kind of message dispensing device, including:
Determine unit, for determining the quantity of the message of the second Message Rotation Queue storage;
Acquiring unit, if for the quantity of message of described second Message Rotation Queue storage not less than first threshold, then
Obtain the message to be sent of the first Message Rotation Queue storage, and store to described second Message Rotation Queue;
Processing unit, for processing the message to be sent in described second Message Rotation Queue, and will process
Message to be sent afterwards sends to client.
Preferably, described processing unit is additionally operable to:
Message to be sent after processing sends after client, if to be sent described in described client feedback
Message do not send successfully, then do not send successful message store described to the 3rd Message Rotation Queue;
The successful message that do not sends in described 3rd Message Rotation Queue is sent to described client.
Preferably, described processing unit is additionally operable to:
The successful message that do not sends in described 3rd Message Rotation Queue is sent after described client, if described
The transmission times not sending successful message is more than Second Threshold, then do not send successful message described in notice server and send mistake
Lose.
Preferably, described processing unit is additionally operable to:
Do not sending before successful message stores to the 3rd Message Rotation Queue, if described 3rd message is followed by described
The quantity not sending successful message in ring queue is more than the 3rd threshold value, then message to be sent described in notice server is not sent out
Send successfully, and do not send successful message described in again fishing for from described server after a set time and disappear to described first
Breath round-robin queue.
Preferably, described determine unit, be additionally operable to determine described first Message Rotation Queue, the second Message Rotation Queue and
In 3rd Message Rotation Queue, whether the total amount of the message of storage is less than the 4th threshold value;
Described acquiring unit, if being additionally operable to described first Message Rotation Queue, the second Message Rotation Queue and the 3rd message
In round-robin queue, the total amount of the message of storage is less than the 4th threshold value, then fish for message to be sent from described server;And will
The message to be sent fished for from server sequentially stores the afterbody to described first Message Rotation Queue.
Preferably, described processing unit is additionally operable to:
If described client feedback message sends successfully, then message is sent successful state notifying to server, so that
The successful message of described transmission is not fished for.
Preferably, described processing unit is additionally operable to:
If the message to be sent of described first Message Rotation Queue storage is more than the 5th threshold value, will drag for from described server
The message taken abandons.
The embodiment of the present invention shows, is determined by the quantity of the message of the second Message Rotation Queue storage, if described second
The quantity of the message of Message Rotation Queue storage not less than first threshold, then obtains the to be sent of the first Message Rotation Queue storage
Message, and store to described second Message Rotation Queue, to the message to be sent in described second Message Rotation Queue
Process, and the message to be sent after processing sends to client.Stored respectively by multiple Message Rotation Queue
Different message, it is to avoid use a queue buffer to carry out the problem of memory allocation and release frequently, thus improve and disappear
Breath transmitting efficiency, reduces overhead.
Accompanying drawing explanation
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, in embodiment being described below required for make
Accompanying drawing briefly introduce, it should be apparent that, below describe in accompanying drawing be only some embodiments of the present invention, for this
From the point of view of the those of ordinary skill in field, on the premise of not paying creative work, it is also possible to obtain other according to these accompanying drawings
Accompanying drawing.
The structural representation of a kind of system architecture that Fig. 1 provides for the embodiment of the present invention;
The schematic flow sheet of a kind of message method that Fig. 2 provides for the embodiment of the present invention;
The schematic diagram of a kind of system deployment that Fig. 3 provides for the embodiment of the present invention;
The schematic flow sheet of a kind of message method that Fig. 4 provides for the embodiment of the present invention;
The schematic flow sheet of a kind of message method that Fig. 5 provides for the embodiment of the present invention;
The schematic flow sheet of a kind of message method that Fig. 6 provides for the embodiment of the present invention;
The structural representation of a kind of message dispensing device that Fig. 7 provides for the embodiment of the present invention.
Detailed description of the invention
In order to make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing the present invention made into
One step ground describes in detail, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole enforcement
Example.Based on the embodiment in the present invention, those of ordinary skill in the art are obtained under not making creative work premise
All other embodiments, broadly fall into the scope of protection of the invention.
What Fig. 1 was exemplary shows a kind of system architecture that the embodiment of the present invention provides, and this system architecture is applicable to run
A kind of message method provided in the embodiment of the present invention.This system architecture includes that server 101, client 102, message are dragged for
Fetching puts 103, Message Processing dispensing device 104 and message storing and forwarding device 105.This server 101 is used for providing to be sent
Message, message strainer 103 is for fishing for message and being stored in round-robin queue 1 from server, and Message Processing sends
Device 104 is stored in round-robin queue 2 for obtaining message to be sent from round-robin queue 1, and to the message in round-robin queue 2
Carrying out processing and sending to client 102, message storing and forwarding device 105 is used for sending Message Processing dispensing device 104 not
Send successful message.
Based on foregoing description, Fig. 2 shows the flow process that a kind of message that the embodiment of the present invention provides sends, and this flow process is permissible
Performed by message dispensing device.
As in figure 2 it is shown, the method flow process concrete steps include:
Step 201, determines the quantity of the message of the second Message Rotation Queue storage.
Step 202, if the quantity of message of described second Message Rotation Queue storage is not less than first threshold, then obtains the
The message to be sent of one Message Rotation Queue storage, and store to described second Message Rotation Queue.
Step 203, processes the message to be sent in described second Message Rotation Queue, and will process after
Message to be sent sends to client.
In embodiments of the present invention, before the message to be sent in the second Message Rotation Queue is processed, need
Determine the quantity of the message of the second Message Rotation Queue storage, if the quantity of the message of this second Message Rotation Queue storage is not
Exceed first threshold, it is possible to obtain the message to be sent of the first Message Rotation Queue storage, and to be sent by this acquisition
Message store to the second Message Rotation Queue, then to the message to be sent in this second Message Rotation Queue at
Reason, and the message to be sent after processing sends to client.Wherein, this first Message Rotation Queue can be above-mentioned figure
Round-robin queue 1 in 1, this second Message Rotation Queue can be the round-robin queue 2 in above-mentioned Fig. 1, and first threshold can foundation
Experience is set.
For example, above-mentioned Message Processing dispensing device obtains message from round-robin queue 1 and preserves to round-robin queue 2
In, this message is processed and sends simultaneously.Concrete, when round-robin queue 1 be sky, if round-robin queue 2 less than, then
The message obtained by the head of round-robin queue 1 preserves to round-robin queue 2, if round-robin queue 2 is the fullest, then continues inquiry circulation
Queue 2 is the fullest.When the message in round-robin queue 2 is processed, can be the renewal of inside field data, deformation etc.
Reason mode.Especially, now the message in round-robin queue 2 being carried out processes the message sink with round-robin queue 1 and keeps apart, nothing
Need to carry out adding solution latching operation.
Message to be sent after processing in above-mentioned steps 203 sends after client, if client feedback
This message to be sent does not sends successfully, then this is not sent successful message and store to the 3rd Message Rotation Queue, and will
3rd Message Rotation Queue does not sends successful message send to client.This message to be sent does not sends successfully permissible
It is expressed as sending unsuccessfully or sends time-out.If this client feedback message sends successfully, then message is sent successful state and leads to
Know to server, so that this message sent is not fished for.Stored by the 3rd Message Rotation Queue and do not send successfully
Message, can prevent because sending unsuccessfully or the problem of poor efficiency that overtime message overstocked causes data in relief area to process.
Further, the successful message that do not sends in the 3rd Message Rotation Queue is being sent after client, if
This transmission times not sending successful message is more than Second Threshold, then this does not sends the transmission mistake of successful message to notify server
Lose.This Second Threshold can empirically be configured, and the 3rd Message Rotation Queue can be the round-robin queue 3 in Fig. 1.
Concrete, when round-robin queue 3 is not empty, from round-robin queue 3, obtains message be transmitted, when message sends secondary
When number exceedes the number of times that configuration parameter specifies, more new information sends unsuccessfully to server, resends message the most exactly, until
Message transmission times exceedes the number of times that configuration parameter specifies.
Preferably, will not send before successful message stores to the 3rd Message Rotation Queue, if the 3rd disappears above-mentioned
The quantity not sending successful message in breath round-robin queue is not sent out more than the 3rd threshold value, the then message that notice server is to be sent
Send successfully, and from server, again fish for this after a set time do not send successful message to this first message loop team
Row, it is to avoid the information drop-out completely caused due to the 3rd Message Rotation Queue.
In order to enable to fish for message to be sent from server more accurately, in addition it is also necessary to determine above-mentioned first message loop team
In row, the second Message Rotation Queue and the 3rd Message Rotation Queue, whether the total amount of the message of storage is less than the 4th threshold value, if so,
Then fishing for message to be sent from server, otherwise, description messages total amount is too much, it is impossible to fish for new message to be sent.
After fishing for, the message to be sent fished for from server is sequentially stored the afterbody to the first Message Rotation Queue.
Further, when fishing for message to be sent from server, storage in some first Message Rotation Queue
Message number overfill to be sent, say, that if the message to be sent of above-mentioned first Message Rotation Queue storage is more than the 5th
Threshold value, then abandon the message fished for from server.5th threshold value is empirically arranged.
In order to preferably explain the embodiment of the present invention, come below in conjunction with Fig. 1, Fig. 3, Fig. 4, Fig. 5 and Fig. 6, describe this
The idiographic flow that in bright embodiment, message sends.
The structure of the system deployment that the embodiment of the present invention that what Fig. 3 was exemplary show is suitable for, disappearing in message strainer
Breath is fished for thread and is fished for message from server and store round-robin queue 1, and the Message Processing in Message Processing dispensing device sends
Thread obtains message from round-robin queue 1, and preserves to round-robin queue 2, processes the message in this round-robin queue 2,
Then sent to client by Internet.If message does not sends successfully, then preserving to round-robin queue 3, message stores
Message storage in retransmission unit forwards thread to be transmitted the message in round-robin queue 3.
Concrete, as shown in Figure 4, this flow process specifically includes the flow process performed by message strainer:
Step 401, obtains from configuration parameter and fishes for message trigger value n.
Step 402, it is judged that whether service runs, the most then proceed to step 403, if it is not, then proceed to step 408.
Step 403, it is judged that whether three round-robin queue's message total amounts are less than n, if then proceeding to step 404, if it is not, then weigh
New execution step 403.
Step 404, fishes for m bar message from server.
Step 405, it is judged that m whether more than 0, the most then proceeds to step 406, if it is not, then proceed to step 409.
Step 406, it is judged that round-robin queue 1 whether less than, the most then proceed to step 407, if it is not, then proceed to step 410.
Step 407, preserves message to round-robin queue 1.
Step 408, terminates service.
Step 409, thread dormancy.
Step 410, abandons message.
Above-mentioned message strainer major function is for obtaining message data from server and preserving to round-robin queue 1, tool
Body, message is fished for thread and is started, and reads configuration parameter, it is thus achieved that thread sheet length of one's sleep size, fishes for message trigger value size
Deng, then in the case of main service remains on, obtaining the residue message count of 3 round-robin queues respectively, its total amount is less than dragging for
When cancelling breath trigger value, trigger message and fish for action.Message is fished for from server, if fishing for less than message, then thread sleep
Step b is reentered after a period of time;If the message of fishing for, then message is sequentially inserted in round-robin queue 1.By message
When being saved in round-robin queue 1, if the round-robin queue 1 length notification message that is shorter or that fish for of configuration is more causes circulation
Queue 1 is packed with, then message abandoned.Owing in server, message status is not configured to success or failure, follow-up these disappear
Breath still can be fished for again, and therefore this operation can't cause message really to be lost.
Flow process performed by Message Processing dispensing device is as it is shown in figure 5, this flow process specifically includes:
Step 501, initiation message processes and sends thread.
Step 502, it is judged that whether service runs, the most then proceed to step 503, otherwise, proceed to step 511.
Step 503, it is judged that round-robin queue 1 is not the most empty, the most then proceed to step 504, if it is not, then proceed to step
512。
Step 504, it is judged that round-robin queue 2 whether less than, the most then proceed to step 505, if it is not, then re-execute step
504。
Step 505, the head from round-robin queue 1 obtains message the afterbody preserved to round-robin queue 2.
Step 506, processes the message of up-to-date acquisition.
Step 507, the message after processing sends to client.
Step 508, it is judged that message sends the most unsuccessful, the most then proceed to step 509, if it is not, then proceed to step 513.
Step 509, it is judged that in round-robin queue 3, whether unused length is more than 15%, the most then proceed to step 510, if it is not,
Then proceed to step 514.
Step 510, stores this message to round-robin queue 3.
Step 511, terminates.
Step 512, waits and is waken up or waits time-out.
Step 513, updates message delivery state to server.
Step 514, notice this message time of server update stamp is follow-up to fish for.
This Message Processing dispensing device major function is for obtaining message data and preserving to round-robin queue from round-robin queue 1
In 2, this message being processed and sent simultaneously, concrete, Message Processing sends thread and starts, and reads configuration parameter, it is thus achieved that
The parameter informations such as thread waiting-timeout timeslice size.In the case of main service remains on, if round-robin queue 1 is empty,
Then thread block continues after waiting and being waken up or wait time-out whether inquiry round-robin queue 1 is empty, when round-robin queue 1 is not empty
Time, if round-robin queue 2 less than, then the message that round-robin queue 1 head obtains is saved in round-robin queue 2.If circulation team
Row 2 are the fullest, then continue to inquire about round-robin queue 2 the fullest, process the message of up-to-date acquisition, such as inside field data more
Newly, deformation etc..Message after processing sends to client, if sending successfully, then updates message delivery state to service
Device, this message follow-up will no longer be fished for.If sending failed or overtime, if the unused curtailment of now round-robin queue 3
The 10% of total length, the most directly notifies server, sets this message and is again fished for after coming few minutes, thus avoid by
In the information drop-out that round-robin queue 3 completely causes.Otherwise, this message is stored to round-robin queue 3.
As shown in Figure 6, this flow process specifically includes flow process performed by message storing and forwarding device:
Step 601, obtains message from configuration parameter and sends number of attempt T.
Step 602, it is judged that whether service runs, the most then proceed to step 603, if it is not, then proceed to step 609.
Step 603, it is judged that round-robin queue 3 is not the most empty, the most then proceed to step 604, if it is not, then proceed to step
610。
Step 604, obtains message from round-robin queue 3 and processes, and make t=T.
Step 605, it is judged that t whether more than 0, the most then proceeds to step 606, if it is not, then proceed to step 611.
Step 606, the message after processing sends to client.
Step 607, it is judged that message sends the most unsuccessful, the most then proceed to step 608, if it is not, then proceed to step 612.
Step 608, makes t=t-1.
Step 609, terminates.
Step 610, waits and is waken up or waits time-out.
Step 611, updates message delivery state to server.
Step 612, updates message delivery state to server.
This message storing and forwarding device major function is to be delivered unsuccessfully by Message Processing dispensing device or overtime message is entered
Row storage forwards, concrete, and message storage forwards thread to start, and reads configuration parameter, it is thus achieved that message repeats the ginsengs such as transmission times
Number information.In the case of main service remains on, if round-robin queue 3 is empty, then thread block waits and is waken up or waits
Continue after time-out whether inquiry round-robin queue 3 is empty, when round-robin queue 3 is not empty, obtains Messages-Waiting from round-robin queue 3 and send out
Send.When message transmission times exceedes the number of times that configuration parameter specifies, more new information sends unsuccessfully to server, otherwise, will obtain
The message taken is transmitted.Repeat this process, until transmission times the most more new information sends unsuccessfully to server, or send into
After merit, more new information sends successfully to server.
The embodiment of the present invention shows, is determined by the quantity of the message of the second Message Rotation Queue storage, if described second
The quantity of the message of Message Rotation Queue storage not less than first threshold, then obtains the to be sent of the first Message Rotation Queue storage
Message, and store to described second Message Rotation Queue, to the message to be sent in described second Message Rotation Queue
Process, and the message to be sent after processing sends to client.Stored respectively by multiple Message Rotation Queue
Different message, it is to avoid use a queue buffer to carry out the problem of memory allocation and release frequently, thus improve and disappear
Breath transmitting efficiency, reduces overhead.
Based on identical technology design, Fig. 7 shows the structure of a kind of message dispensing device that the embodiment of the present invention provides,
This device can perform the flow process of message method.
As it is shown in fig. 7, this device specifically includes:
Determine unit 701, for determining the quantity of the message of the second Message Rotation Queue storage;
Acquiring unit 702, if for the quantity of message of described second Message Rotation Queue storage not less than first threshold,
Then obtain the message to be sent of the first Message Rotation Queue storage, and store to described second Message Rotation Queue;
Processing unit 703, for processing the message to be sent in described second Message Rotation Queue, and at general
Message to be sent after reason sends to client.
Preferably, described processing unit 703 is additionally operable to:
Message to be sent after processing sends after client, if to be sent described in described client feedback
Message do not send successfully, then do not send successful message store described to the 3rd Message Rotation Queue;
The successful message that do not sends in described 3rd Message Rotation Queue is sent to described client.
Preferably, described processing unit 703 is additionally operable to:
The successful message that do not sends in described 3rd Message Rotation Queue is sent after described client, if described
The transmission times not sending successful message is more than Second Threshold, then do not send successful message described in notice server and send mistake
Lose.
Preferably, described processing unit 703 is additionally operable to:
Do not sending before successful message stores to the 3rd Message Rotation Queue, if described 3rd message is followed by described
The quantity not sending successful message in ring queue is more than the 3rd threshold value, then message to be sent described in notice server is not sent out
Send successfully, and do not send successful message described in again fishing for from described server after a set time and disappear to described first
Breath round-robin queue.
Preferably, described determine unit 701, be additionally operable to determine described first Message Rotation Queue, the second message loop team
In row and the 3rd Message Rotation Queue, whether the total amount of the message of storage is less than the 4th threshold value;
Described acquiring unit 702, if being additionally operable to described first Message Rotation Queue, the second Message Rotation Queue and the 3rd disappears
In breath round-robin queue, the total amount of the message of storage is less than the 4th threshold value, then fish for message to be sent from described server;And
The message to be sent fished for from server is sequentially stored the afterbody to described first Message Rotation Queue.
Preferably, described processing unit 703 is additionally operable to:
If described client feedback message sends successfully, then message is sent successful state notifying to server, so that
The successful message of described transmission is not fished for.
Preferably, described processing unit 703 is additionally operable to:
If the message to be sent of described first Message Rotation Queue storage is more than the 5th threshold value, will drag for from described server
The message taken abandons.
The present invention is with reference to method, equipment (system) and the flow process of computer program according to embodiments of the present invention
Figure and/or block diagram describe.It should be understood that can the most first-class by computer program instructions flowchart and/or block diagram
Flow process in journey and/or square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
Instruction arrives the processor of general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce
A raw machine so that the instruction performed by the processor of computer or other programmable data processing device is produced for real
The device of the function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame now.
These computer program instructions may be alternatively stored in and computer or other programmable data processing device can be guided with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in this computer-readable memory produces and includes referring to
Make the manufacture of device, this command device realize at one flow process of flow chart or multiple flow process and/or one square frame of block diagram or
The function specified in multiple square frames.
These computer program instructions also can be loaded in computer or other programmable data processing device so that at meter
Perform sequence of operations step on calculation machine or other programmable devices to produce computer implemented process, thus at computer or
The instruction performed on other programmable devices provides for realizing at one flow process of flow chart or multiple flow process and/or block diagram one
The step of the function specified in individual square frame or multiple square frame.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know basic creation
Property concept, then can make other change and amendment to these embodiments.So, claims are intended to be construed to include excellent
Select embodiment and fall into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and the modification essence without deviating from the present invention to the present invention
God and scope.So, if these amendments of the present invention and modification belong to the scope of the claims in the present invention and equivalent technologies thereof
Within, then the present invention is also intended to comprise these change and modification.
Claims (14)
1. a message method, it is characterised in that including:
Determine the quantity of the message of the second Message Rotation Queue storage;
If the quantity of the message of described second Message Rotation Queue storage is not less than first threshold, then obtain the first message loop team
The message to be sent of row storage, and store to described second Message Rotation Queue;
Message to be sent in described second Message Rotation Queue is processed, and will process after message to be sent
Send to client.
2. the method for claim 1, it is characterised in that the message to be sent after processing sends to client
Afterwards, also include:
If message to be sent described in described client feedback does not sends successfully, then by described do not send successful message store to
In 3rd Message Rotation Queue;
The successful message that do not sends in described 3rd Message Rotation Queue is sent to described client.
3. method as claimed in claim 2, it is characterised in that by not sending successfully in described 3rd Message Rotation Queue
Message sends after described client, also includes:
If the described transmission times of successful message that do not sends is more than Second Threshold, then do not send successfully described in notice server
Message sends unsuccessfully.
4. method as claimed in claim 2, it is characterised in that do not sending successful message store described to the 3rd message
Before in round-robin queue, also include:
If the quantity not sending successful message in described 3rd Message Rotation Queue is more than the 3rd threshold value, then notify server
Described message to be sent does not sends successfully, and does not sends into described in again fishing for from described server after a set time
The message of merit is to described first Message Rotation Queue.
5. the method as described in any one of Claims 1-4, it is characterised in that also include:
Determine the message of storage in described first Message Rotation Queue, the second Message Rotation Queue and the 3rd Message Rotation Queue
Whether total amount is less than the 4th threshold value;
From described server, the most then fish for message to be sent;
The message to be sent fished for from server is sequentially stored the afterbody to described first Message Rotation Queue.
6. the method as described in any one of Claims 1-4, it is characterised in that also include:
If described client feedback message sends successfully, then message is sent successful state notifying to server, so that described
Send successful message not fished for.
7. the method as described in any one of Claims 1-4, it is characterised in that also include:
If the message to be sent of described first Message Rotation Queue storage is more than the 5th threshold value, by fish for from described server
Message abandons.
8. a message dispensing device, it is characterised in that including:
Determine unit, for determining the quantity of the message of the second Message Rotation Queue storage;
Acquiring unit, if for the quantity of message of described second Message Rotation Queue storage not less than first threshold, then obtaining
The message to be sent of the first Message Rotation Queue storage, and store to described second Message Rotation Queue;
Processing unit, for processing the message to be sent in described second Message Rotation Queue, and by after process
Message to be sent send to client.
9. device as claimed in claim 8, it is characterised in that described processing unit is additionally operable to:
Message to be sent after processing sends after client, if to be sent disappearing described in described client feedback
Breath does not sends successfully, then do not send successful message store described to the 3rd Message Rotation Queue;
The successful message that do not sends in described 3rd Message Rotation Queue is sent to described client.
10. device as claimed in claim 9, it is characterised in that described processing unit is additionally operable to:
The successful message that do not sends in described 3rd Message Rotation Queue is sent after described client, does not sends out if described
Send the transmission times of successful message more than Second Threshold, then do not send successful message described in notice server and send unsuccessfully.
11. devices as claimed in claim 9, it is characterised in that described processing unit is additionally operable to:
Do not sending before successful message stores to the 3rd Message Rotation Queue by described, if described 3rd message loop team
The quantity not sending successful message in row is more than the 3rd threshold value, then message to be sent described in notice server does not sends into
Merit, and do not send successful message described in again fishing for from described server after a set time and follow to described first message
Ring queue.
12. devices as described in any one of claim 9 to 11, it is characterised in that described determine unit, are additionally operable to determine described
In first Message Rotation Queue, the second Message Rotation Queue and the 3rd Message Rotation Queue, whether the total amount of the message of storage is less than
4th threshold value;
Described acquiring unit, if being additionally operable to described first Message Rotation Queue, the second Message Rotation Queue and the 3rd message loop
In queue, the total amount of the message of storage is less than the 4th threshold value, then fish for message to be sent from described server;And will be from clothes
The message to be sent fished in business device sequentially stores the afterbody to described first Message Rotation Queue.
13. devices as described in any one of claim 9 to 11, it is characterised in that described processing unit is additionally operable to:
If described client feedback message sends successfully, then message is sent successful state notifying to server, so that described
Send successful message not fished for.
14. devices as described in any one of claim 9 to 11, it is characterised in that described processing unit is additionally operable to:
If the message to be sent of described first Message Rotation Queue storage is more than the 5th threshold value, by fish for from described server
Message abandons.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610673429.6A CN106330766A (en) | 2016-08-16 | 2016-08-16 | Message transmitting method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610673429.6A CN106330766A (en) | 2016-08-16 | 2016-08-16 | Message transmitting method and apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106330766A true CN106330766A (en) | 2017-01-11 |
Family
ID=57740615
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610673429.6A Pending CN106330766A (en) | 2016-08-16 | 2016-08-16 | Message transmitting method and apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106330766A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107102582A (en) * | 2017-04-07 | 2017-08-29 | 深圳怡化电脑股份有限公司 | The synchronous method and device of a kind of subsystem command |
CN108228363A (en) * | 2017-12-22 | 2018-06-29 | 中国银联股份有限公司 | A kind of message method and device |
CN110113495A (en) * | 2019-05-10 | 2019-08-09 | 北京奇艺世纪科技有限公司 | Long-range control method, device, electronic equipment and the system of APP |
CN111338810A (en) * | 2018-12-19 | 2020-06-26 | 北京京东尚科信息技术有限公司 | Method and apparatus for storing information |
CN112100556A (en) * | 2020-08-25 | 2020-12-18 | 福建天泉教育科技有限公司 | Method and system for optimizing message pushing mode |
CN112532681A (en) * | 2020-10-16 | 2021-03-19 | 深圳市科漫达智能管理科技有限公司 | Parking lot software data exception handling method and device |
CN112764947A (en) * | 2021-01-15 | 2021-05-07 | 百果园技术(新加坡)有限公司 | Message data pulling method, device, equipment and storage medium |
CN116170385A (en) * | 2023-04-21 | 2023-05-26 | 四川汉科计算机信息技术有限公司 | Gateway information forwarding system, method, equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101997661A (en) * | 2009-08-14 | 2011-03-30 | 华为技术有限公司 | Data packet sending method, data packet acquiring method and device |
CN103428072A (en) * | 2012-05-23 | 2013-12-04 | 北京大学 | Persistent message publishing method and system |
CN103516580A (en) * | 2012-06-26 | 2014-01-15 | 北京大学 | Method of realizing message receiving and forwarding based on message queue and system thereof |
CN104936156A (en) * | 2015-06-25 | 2015-09-23 | 走遍世界(北京)信息技术有限公司 | Short message sending method and device |
-
2016
- 2016-08-16 CN CN201610673429.6A patent/CN106330766A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101997661A (en) * | 2009-08-14 | 2011-03-30 | 华为技术有限公司 | Data packet sending method, data packet acquiring method and device |
CN103428072A (en) * | 2012-05-23 | 2013-12-04 | 北京大学 | Persistent message publishing method and system |
CN103516580A (en) * | 2012-06-26 | 2014-01-15 | 北京大学 | Method of realizing message receiving and forwarding based on message queue and system thereof |
CN104936156A (en) * | 2015-06-25 | 2015-09-23 | 走遍世界(北京)信息技术有限公司 | Short message sending method and device |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107102582A (en) * | 2017-04-07 | 2017-08-29 | 深圳怡化电脑股份有限公司 | The synchronous method and device of a kind of subsystem command |
CN108228363A (en) * | 2017-12-22 | 2018-06-29 | 中国银联股份有限公司 | A kind of message method and device |
CN111338810A (en) * | 2018-12-19 | 2020-06-26 | 北京京东尚科信息技术有限公司 | Method and apparatus for storing information |
CN110113495A (en) * | 2019-05-10 | 2019-08-09 | 北京奇艺世纪科技有限公司 | Long-range control method, device, electronic equipment and the system of APP |
CN112100556A (en) * | 2020-08-25 | 2020-12-18 | 福建天泉教育科技有限公司 | Method and system for optimizing message pushing mode |
CN112532681A (en) * | 2020-10-16 | 2021-03-19 | 深圳市科漫达智能管理科技有限公司 | Parking lot software data exception handling method and device |
CN112764947A (en) * | 2021-01-15 | 2021-05-07 | 百果园技术(新加坡)有限公司 | Message data pulling method, device, equipment and storage medium |
CN112764947B (en) * | 2021-01-15 | 2023-12-26 | 百果园技术(新加坡)有限公司 | Message data pulling method, device, equipment and storage medium |
CN116170385A (en) * | 2023-04-21 | 2023-05-26 | 四川汉科计算机信息技术有限公司 | Gateway information forwarding system, method, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106330766A (en) | Message transmitting method and apparatus | |
CN109343941B (en) | Task processing method and device, electronic equipment and computer readable storage medium | |
US9705752B2 (en) | Reliably updating a messaging system | |
CN106503017A (en) | A kind of distributed reptile system task grasping system and method | |
CN101452399B (en) | Task secondary scheduling module and method | |
CN104092719A (en) | File transmission method, device and distributed cluster file system | |
US9288284B2 (en) | Managed event queue for independent clients | |
CN108089915B (en) | Method and system for business control processing based on message queue | |
CN102377685A (en) | Subscription message sending system and subscription message sending method | |
CN109756417A (en) | Offline message distribution method, server and storage medium | |
CN110611707B (en) | Task scheduling method and device | |
US20220417362A1 (en) | Object oriented call management | |
EP2995028B1 (en) | Tuple recovery | |
US10135944B2 (en) | Processing a unit of work | |
CN113238861A (en) | Task execution method and device | |
CN108063809B (en) | Machine equipment data acquisition method and acquisition system | |
CN111282263A (en) | Event message processing method and device, electronic equipment and readable storage medium | |
CN105024904A (en) | Message sending processing method | |
CN111767122A (en) | Distributed task scheduling management method and device | |
CN111597056A (en) | Distributed scheduling method, system, storage medium and device | |
CN109005465B (en) | Bullet screen message distribution method, device, equipment and storage medium | |
CN112395077A (en) | Resource control method, device and system | |
CN115718652A (en) | Method and device for controlling scheduling algorithm and visually monitoring | |
KR101639912B1 (en) | Event managing system of steel process middleware | |
US20140351703A1 (en) | Communication system, gui apparatus, and service apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170111 |
|
RJ01 | Rejection of invention patent application after publication |