CN105812284A - High-reliability and high-stability message sending method - Google Patents

High-reliability and high-stability message sending method Download PDF

Info

Publication number
CN105812284A
CN105812284A CN201610131212.2A CN201610131212A CN105812284A CN 105812284 A CN105812284 A CN 105812284A CN 201610131212 A CN201610131212 A CN 201610131212A CN 105812284 A CN105812284 A CN 105812284A
Authority
CN
China
Prior art keywords
message
sending
enters
stability
queue
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610131212.2A
Other languages
Chinese (zh)
Inventor
彭云平
王剑青
王军勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Changxing Software Co Ltd
Original Assignee
Shanghai Changxing Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Changxing Software Co Ltd filed Critical Shanghai Changxing Software Co Ltd
Priority to CN201610131212.2A priority Critical patent/CN105812284A/en
Publication of CN105812284A publication Critical patent/CN105812284A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end
    • H04L1/1887Scheduling and prioritising arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/56Queue scheduling implementing delay-aware scheduling
    • H04L47/564Attaching a deadline to packets, e.g. earliest due date first

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention provides a high-reliability and high-stability message sending method. The method includes the following steps that: step 1, the sending valid time and priority of a message are set; step 2, a unique identifier is generated for the message; step 3, the message enters a sending queue; step 4, the message is extracted from the sending queue; step 5, whether the sending time of the message exceeds the sending valid time is judged; step 6, the message is sent online; step 7, whether the message is sent successfully is judged, if the message is sent successfully, the message enters a success queue, otherwise, the method enters step 8; and step 8, the number of the times of the failed sending of the message is calculated, if the message is sent unsuccessfully repeatedly for a plurality of times, the message enters a sending abnormal state, whether the number of times for which the message enters the sending abnormal state exceeds a predetermined number of times is judged, if the number of the times for which the message enters the sending abnormal state exceeds the predetermined number of times, the message enters an error queue, otherwise, the number of the times of the failed sending of the message is recorded, and then, the message enters a sending queue again, and the method enters the step 4. With the high-reliability and high-stability message sending method of the invention adopted, message state tracking is realized, so that the problem of low reliability can be solved.

Description

The message method of high reliability and stability
Technical field
The present invention relates to the message method of a kind of high reliability and stability, belong to network engineering field.
Background technology
Server disappears and regulating the respiration smoothly for feeling pulse center real-time response and to answer stable operation for a long time be the previous difficult problem of order on a large scale, particular problem such as: 1. whether client have received message, and messenger service business cannot confirm;2., when inadequate resource, server dynamically adds equally loaded;3. server disappears on a large scale and sends simultaneously;4. large-scale concurrent breath center rings in real time;5. server answers stable operation for a long time.
Summary of the invention
It is an object of the invention to provide the message method of a kind of high reliability and stability, to solve the problems referred to above.
Present invention employs following technical scheme:
The message method of a kind of high reliability and stability, it is characterised in that comprise the steps:
Step one: send effective time and priority for message sets;
Step 2: message is generated unique mark;System log (SYSLOG) uniquely identifies and message content;
Step 3: message enters transmit queue;
Step 4: extract message from transmit queue;
Step 5: judge whether the time that message sends exceedes transmission effective time;If it is judged that for being that then message enters unsuccessfully, if the judgment is No, then enter step 6;
Step 6: message sends online, now message enters queue in transmission;
Step 7: judge whether the message in step 6 sends successfully;If result is "Yes", message enters success queue;If the result is negative, then step 8 is entered;
Step 8: comprise the steps: in step 8
Calculating message and send failed number of times, if continuous several times sends unsuccessfully, then message enters and sends abnormality;
Calculate message and enter the number of times sending abnormality;
Judge to enter whether the number of times sending abnormality exceedes pre-determined number, if judged result is "Yes", then message enters error queue, namely unsuccessfully queue is sent, if judged result is "No", then Minute book bar message sends failed number of times, and then message re-enters into queue in transmission, again carry out step 4, this message is transmitted.
Further, the message method of the high reliability of the present invention and stability, it is also possible to have a feature in that in step one, the priority of single message is higher than the priority of pocket transmission news.
Further, the message method of the high reliability of the present invention and stability, it is also possible to have a feature in that wherein, after message sends, starts to follow the tracks of message status, it is determined that when and whether need to retransmit.
Further, the message method of the high reliability of the present invention and stability, it is also possible to have a feature in that wherein, after message enters and sends abnormality, priority can decline, lower than the priority sending information first.
Further, the message method of the high reliability of the present invention and stability, it is also possible to have a feature in that in step 7, it is judged that message is to send successful condition to be: after sending message, receive the confirmation data of receipt, it is determined that for sending successfully.
Further, the message method of the high reliability of the present invention and stability, it is also possible to have a feature in that in step 8, message enters after sending unsuccessfully queue, it is possible to confession user inquires about and resends, or confession manager manually resends.
Further, the message method of the high reliability of the present invention and stability, it is also possible to have a feature in that, when the consumption of internal memory arrives predetermined threshold, message can stop sending.
Further, the message method of the high reliability of the present invention and stability, it is also possible to having a feature in that wherein, predetermined threshold takes from value within the scope of 1~100M.
Further, the message method of the high reliability of the present invention and stability, it is also possible to have a feature in that wherein, when message transmission delay exceedes the scheduled time late, reduces the information number in transmit queue.
Further, the message method of the high reliability of the present invention and stability, it is also possible to having a feature in that wherein, the scheduled time carries out value in the scope of 1~100s.
The beneficial effect of the invention
The message of the present invention sends the complete monitoring of service, greatly concurrently transships defence, and server dynamically adds equally loaded, and message status tracking, acknowledgment of your inquiry and repeating transmission solve integrity problem.Message prioritization rank solves real time problems with anticipating the message needing to send;Do not use the strategy concurrently locked to substantially increase the handling capacity of system as far as possible.
Accompanying drawing explanation
Fig. 1 is the flow chart of the message method of the high reliability of the present invention and stability.
Detailed description of the invention
Following description the specific embodiment of the present invention.
The high reliability of the present invention and the message method of stability, comprise the steps:
As it is shown in figure 1, the workflow of the message method of high reliability and stability is as follows:
Step 101: for message sets effective time and priority;Effective time and priority level are determined by user;
Message starts to follow the tracks of message status after sending, it is determined that when and whether need to retransmit.
Step 102: start to send message;
Step 103: message is generated unique mark;System log (SYSLOG) uniquely identifies and message content is to transmit queue;
Step 104: message enters transmit queue;
Step 105: extract message from transmit queue;
Step 106: judge whether the time that message sends exceedes the transmission effective time that user specifies, if it is judged that then enter step 111 for result "Yes", if it is determined as no, then enter step 107;Send effective time to set according to the demand of user, for instance close car door information, be less than 1s, and such as advertising message, it is possible to it is set to several days or some months.
Step 107: message sends online, now message enters queue in transmission;
Step 108: judge whether the message in step 107 sends successfully;If result is "Yes", message enters success queue;If the result is negative, then step 109 is entered;
Step 109: comprise the steps: in step 109
Step 109a: calculate message and send failed number of times, if continuous several times sends unsuccessfully, then message enters and sends abnormality;The number of times continuously transmitting failure can be set as required, is set to 4 times in the present embodiment.
Step 109b, calculates message and enters the number of times sending abnormality.Judging to enter whether the number of times sending abnormality exceedes pre-determined number, if judged result is "Yes", then message enters error queue, namely sends unsuccessfully queue.If judged result is "No", then entering step 110, Minute book bar message sends failed number of times, and then message re-enters into queue in transmission, again carries out step 105, this message is transmitted.In the present embodiment, enter the pre-determined number sending abnormality and be set to 10 times, in other embodiments, it is possible to need to be set to other number of times according to transmission.
Hereinafter the method for the present invention is described further:
1. message status is followed the tracks of, and retransmits, and message status confirms
1.1 message generate unique mark, and are determined that valid period and service priority are other by user, and system log (SYSLOG) uniquely identifies and message content is to transmit queue, if the user while line, background system sends message.
Message starts to follow the tracks of message status after sending, it is determined that when and whether need to retransmit.
After 1.2 transmission message, receive the confirmation data of receipt, it is determined that for sending successfully, if continuously transmitting 4 times but not receiving receipt, then enter and send abnormality.Entering the message sending abnormality, priority can decline, lower than the priority of the information sent first.
If continuous 10 times enter status of fail, or exceed transmission valid period data enter send unsuccessfully queue.
1.3 judge to send successfully or send failed retransmission logic
The number of times sending unsuccessfully queue according to DB, more than 10 times or exceed transmission valid period data be judged as sending unsuccessfully, entrance send unsuccessfully queue.
Retransmission logic: resend time point, if being transmitted across but not entering into and send unsuccessfully queue, or user is not transmitted across online, it is necessary to resend.
Entering after sending unsuccessfully queue, user can inquire about and resend, or is manually resend by manager.
2. priority level processes, and message policies controller processes, and API (application programming interface) regulation single message has precedence over mass-sending.Currently transmitted high-priority message, is directly entered transmit queue.Mass-sending arranges in the present embodiment each minute and sends 10 (can configure).
3. concurrently transship greatly defence
The consumption of internal memory has arrived certain limit, and message will stop sending, and only writes database file preservation.In the present embodiment, the consumption of internal memory is defined as 2M, and in other embodiments, memory consumption according to the configuration of server, can select between 1M~100M.
In another case, if process message transmission delay excessive late, for instance when assembly average was more than 10 seconds, it is judged that excessive for offered load, then this transmit queue number can reduce.Time delay can carry out value within the scope of 1~100s.
Message sends the complete monitoring of service, greatly concurrently transships defence, and server dynamically adds equally loaded, and message status tracking, acknowledgment of your inquiry and repeating transmission solve integrity problem;Message prioritization rank solves real time problems with anticipating the message needing to send;Do not use the strategy concurrently locked to substantially increase the handling capacity of system as far as possible.

Claims (10)

1. the message method of a high reliability and stability, it is characterised in that comprise the steps:
Step one: send effective time and priority for message sets;
Step 2: message is generated unique mark;System log (SYSLOG) uniquely identifies and message content;
Step 3: message enters transmit queue;
Step 4: extract message from transmit queue;
Step 5: judge whether the time that message sends exceedes described transmission effective time;If it is judged that for being that then message enters unsuccessfully, if the judgment is No, then enter step 6;
Step 6: message sends online, now message enters queue in transmission;
Step 7: judge whether the message in step 6 sends successfully, if result is "Yes", message enters success queue, if the result is negative, then enters step 8;
Step 8: comprise the steps: in step 8
Calculating message and send failed number of times, if continuous several times sends unsuccessfully, then message enters and sends abnormality;
Calculate message and enter the number of times sending abnormality;
Judge to enter whether the number of times sending abnormality exceedes pre-determined number, if judged result is "Yes", then message enters error queue, namely unsuccessfully queue is sent, if judged result is "No", then Minute book bar message sends failed number of times, and then message re-enters into queue in transmission, again carry out step 4, this message is transmitted.
2. the message method of high reliability as claimed in claim 1 and stability, it is characterised in that:
In step one, the priority of single message is higher than the priority of pocket transmission news.
3. the message method of high reliability as claimed in claim 1 and stability, it is characterised in that:
Wherein, after message sends, start to follow the tracks of message status, it is determined that when and whether need to retransmit.
4. the message method of high reliability as claimed in claim 1 and stability, it is characterised in that:
Wherein, after message enters described transmission abnormality, priority can decline, lower than the priority sending information first.
5. the message method of high reliability as claimed in claim 1 and stability, it is characterised in that:
In step 7, it is judged that message is to send successful condition to be: after sending message, receive the confirmation data of receipt, it is determined that for sending successfully.
6. the message method of high reliability as claimed in claim 1 and stability, it is characterised in that:
In step 8, message enters after sending unsuccessfully queue, it is possible to inquires about for user and resends, or manually resends for manager.
7. the message method of high reliability as claimed in claim 1 and stability, it is characterised in that:
When the consumption of internal memory arrives predetermined threshold, message can stop sending.
8. the message method of high reliability as claimed in claim 7 and stability, it is characterised in that:
Wherein, described predetermined threshold takes from value within the scope of 1~100M.
9. the message method of high reliability as claimed in claim 1 and stability, it is characterised in that:
Wherein, when message transmission delay exceedes the scheduled time late, reduce the information number in transmit queue.
10. the message method of high reliability as claimed in claim 9 and stability, it is characterised in that:
Wherein, the described scheduled time carries out value in the scope of 1~100s.
CN201610131212.2A 2016-03-08 2016-03-08 High-reliability and high-stability message sending method Pending CN105812284A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610131212.2A CN105812284A (en) 2016-03-08 2016-03-08 High-reliability and high-stability message sending method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610131212.2A CN105812284A (en) 2016-03-08 2016-03-08 High-reliability and high-stability message sending method

Publications (1)

Publication Number Publication Date
CN105812284A true CN105812284A (en) 2016-07-27

Family

ID=56467812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610131212.2A Pending CN105812284A (en) 2016-03-08 2016-03-08 High-reliability and high-stability message sending method

Country Status (1)

Country Link
CN (1) CN105812284A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109298957A (en) * 2018-10-18 2019-02-01 大唐网络有限公司 A kind of information management method with high reliability for supporting to regularly send
CN110247808A (en) * 2019-06-27 2019-09-17 深圳前海微众银行股份有限公司 Method for sending information, device, equipment and readable storage medium storing program for executing

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1741551A (en) * 2004-08-23 2006-03-01 华为技术有限公司 Automatic reply realizing method for mobile network short message
CN1747565A (en) * 2004-09-10 2006-03-15 华为技术有限公司 Message delivering method
CN102958101A (en) * 2012-12-03 2013-03-06 李俊 Method for avoiding wireless channel congestion on wireless communication terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1741551A (en) * 2004-08-23 2006-03-01 华为技术有限公司 Automatic reply realizing method for mobile network short message
CN1747565A (en) * 2004-09-10 2006-03-15 华为技术有限公司 Message delivering method
CN102958101A (en) * 2012-12-03 2013-03-06 李俊 Method for avoiding wireless channel congestion on wireless communication terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109298957A (en) * 2018-10-18 2019-02-01 大唐网络有限公司 A kind of information management method with high reliability for supporting to regularly send
CN110247808A (en) * 2019-06-27 2019-09-17 深圳前海微众银行股份有限公司 Method for sending information, device, equipment and readable storage medium storing program for executing
CN110247808B (en) * 2019-06-27 2024-04-09 深圳前海微众银行股份有限公司 Information transmission method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US7921215B2 (en) Method and apparatus for optimizing and prioritizing the creation of a large number of VPN tunnels
CN109561159B (en) Data processing method and system based on Websocket long connection
CN110808948B (en) Remote procedure calling method, device and system
CN108668364B (en) A kind of method and device for exempting from scheduled transmission
Feng et al. Age-optimal transmission of rateless codes in an erasure channel
Hu et al. Throughput analysis of low-latency IoT systems with QoS constraints and finite blocklength codes
CN112437001B (en) Method and device for guaranteeing reliable delivery and consumption of messages
CN113098985B (en) Session management method and scheduling server
CN109450908A (en) Communication means based on distributed message
CN103684707A (en) Server-side and user-side message transmission processing method, message transmission method and message transmission system
WO2023185353A1 (en) Data transmission method, electronic device, and storage medium
CN105812284A (en) High-reliability and high-stability message sending method
CN107508916B (en) Server link management method for intelligent robot
US8391307B2 (en) Method for handling communications over a non-permanent communication link
CN110012051A (en) Notify method for pushing, device, terminal device, server and system
CN103841193A (en) Information pushing method and system
CN105634931B (en) Message service processing method and instant communication server
CN112636876A (en) Opportunistic packet retransmission
CN106506660B (en) A kind of online request processing method, server and system
CN106850153B (en) Data retransmission method and system
CN104348711A (en) Apparatus and method for receiving messages
CN106453635B (en) Information push method and device
CN109089281A (en) A kind of cluster communication method, terminal device and storage medium
Guo et al. Matching while learning: Wireless scheduling for age of information optimization at the edge
CN114466321A (en) Message sending method and device, electronic equipment and storage medium

Legal Events

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

Application publication date: 20160727