CN111935658B - Method and system for solving congestion in message interaction - Google Patents
Method and system for solving congestion in message interaction Download PDFInfo
- Publication number
- CN111935658B CN111935658B CN202010687685.7A CN202010687685A CN111935658B CN 111935658 B CN111935658 B CN 111935658B CN 202010687685 A CN202010687685 A CN 202010687685A CN 111935658 B CN111935658 B CN 111935658B
- Authority
- CN
- China
- Prior art keywords
- processing queue
- congestion
- service processing
- message
- service
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/24—Accounting or billing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/04—Arrangements for maintaining operational condition
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/0289—Congestion control
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Telephonic Communication Services (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a method and a system for solving congestion in message interaction, which are suitable for frequently connected message interaction scenes and comprise the following steps: detecting the queuing number of the messages in the service processing queue, and judging whether the queuing number of the messages reaches a first threshold value; and when the queuing number reaches a first threshold value, moving part of messages in the service processing queue into the congestion processing queue until the queuing number of the service processing queue reaches a second threshold value, and recovering normal processing. The invention can successfully eliminate the response delay condition of the whole process caused by the delay of certain message processing in the online charging, thereby greatly improving the use perception of users.
Description
Technical Field
The invention relates to the technical field of online charging of operators, in particular to a method and a system for solving congestion in message interaction, which are suitable for frequently-connected message interaction scenes.
Background
In the online charging process defined by 3GPP, a charging request initiated by a network element must be put through for a user to use after receiving a message returned by a service system.
In the above-mentioned continuously interactive message processing process, a response exception for one charging request often occurs, and the request processing for the response exception is slow, which may cause the subsequent waiting requests to wait all in turn, and further cause the subsequent waiting service request to time out.
A vicious circle is formed due to congestion in the message interaction process, and a plurality of service requests are influenced, so that the user perception is influenced.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a method and a system for solving congestion in message interaction.
The invention discloses a method for solving congestion in message interaction, which comprises the following steps:
detecting the message queuing number in a service processing queue;
and when the queuing number reaches a first threshold value, moving part of messages in the service processing queue into a congestion processing queue until the queuing number of the service processing queue reaches a second threshold value.
As a further improvement of the invention, the method also comprises the following steps:
receiving a charging request message initiated by a network element through a service receiving thread;
and sequentially putting the charging request messages into the service processing queue according to the sequence of the receiving time.
As a further improvement of the invention, the method also comprises the following steps: creating a congestion processing thread;
processing the message in the service processing queue by the service processing thread;
and processing the message in the congestion processing queue by the congestion processing thread.
As a further refinement of the invention, the first threshold value is greater than the second threshold value.
As a further improvement of the present invention,
when the queuing number of the service processing queue reaches a first threshold value, sequentially moving the messages in the service processing queue into the congestion processing queue according to the sequence;
and when the queuing number of the service processing queue reaches a second threshold value, stopping moving the message in the service processing queue into the congestion processing queue.
The invention also discloses a system for solving the congestion in the message interaction, which comprises the following steps:
the service receiving thread is used for receiving the charging request messages initiated by the network element and sequentially putting the charging request messages into a service processing queue according to the sequence of receiving time;
the service processing thread is used for processing the messages in the service processing queue;
further comprising:
the creating module is used for creating a congestion processing thread;
the detection judging module is used for detecting the message queuing number in the service processing queue; when the queuing number reaches a first threshold value, moving part of messages in the service processing queue into a congestion processing queue until the queuing number of the service processing queue reaches a second threshold value;
and the congestion processing thread is used for processing the messages in the congestion processing queue.
As a further refinement of the invention, the first threshold value is greater than the second threshold value.
As a further improvement of the present invention,
when the queuing number of the service processing queue reaches a first threshold value, sequentially moving the messages in the service processing queue into the congestion processing queue according to the sequence;
and when the queuing number of the service processing queue reaches a second threshold value, stopping moving the message in the service processing queue into the congestion processing queue.
Compared with the prior art, the invention has the beneficial effects that:
the invention can successfully eliminate the response delay condition of the whole process caused by the delay of certain message processing in the online charging, thereby greatly improving the use perception of users.
Drawings
FIG. 1 is a flowchart illustrating a method for resolving congestion in message interactions according to an embodiment of the present invention;
fig. 2 is a block diagram of a system for resolving congestion in message interactions according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
The invention is described in further detail below with reference to the attached drawing figures:
the existing message interaction method comprises the following steps:
step 1, a service receiving thread receives charging request messages initiated by different network elements;
step 2, the service receiving thread puts the charging request message into the service processing queue in sequence according to the sequence of the receiving time; wherein, the data are put into a service processing queue according to the sequence so as to facilitate the first-come first-served processing;
step 3, the service processing thread processes the messages in sequence according to the sequence of the service processing queue; and after the processing is finished, returning a message to the user through the network element for use.
In the existing message interaction method, if the response of the previous request is abnormal, the subsequent requests in the service processing queue need to be suspended; if the congestion occurs in the service processing queue after a certain time, the subsequent service requests are affected, and the perception of the user corresponding to the request is affected.
In order to solve the above problem, the present invention provides a method for solving congestion in message interaction, which establishes a high and low water threshold, i.e. a first threshold and a second threshold, above a main service processing thread; and triggering a congestion processing mechanism when the queuing number reaches a first threshold value, and recovering normal processing until the queuing number reaches a second threshold value. Based on the method, a vicious circle formed by congestion is solved, a plurality of service requests are influenced, and therefore user perception is influenced.
Specifically, the method comprises the following steps:
as shown in fig. 1, the present invention provides a method for solving congestion in message interaction, including:
s1, the service receiving thread receives the charging request message initiated by different network elements;
s2, the service receiving thread puts the charging request message into the service processing queue according to the sequence of the receiving time; wherein, the data are put into a service processing queue according to the sequence so as to facilitate the first-come first-served processing;
s3, detecting the message queuing number in the service processing queue, and judging whether the message queuing number reaches a first threshold value; wherein the content of the first and second substances,
detecting the message queuing number in the service processing queue through a counting variable;
the first threshold is larger than the second threshold, and the first threshold and the second threshold are designed according to the actual service condition;
s4, when the queue number reaches the first threshold, triggering the congestion processing mechanism, namely moving part of the messages in the service processing queue into the congestion processing queue, and jumping to S6;
one preferred way to move in as a message is:
when the queuing number of the service processing queue reaches a first threshold value, sequentially moving the messages in the service processing queue into the congestion processing queue according to the sequence;
s5, when the queue number of the service processing queue does not reach the first threshold value, the congestion processing mechanism is not triggered, which indicates that the congestion does not occur in the service processing queue; at this time, the service processing thread normally processes the message in the service processing queue, that is: the service processing thread processes the messages in sequence according to the sequence of the service processing queue; and after the processing is finished, returning a message to the user through the network element for use.
S6, continuously detecting the queuing number of the messages in the service processing queue, and judging whether the queuing number of the service processing queue reaches a second threshold value; wherein the first threshold is greater than the second threshold;
s7, when the queuing number of the service processing queue reaches the second threshold value, it indicates that the message in the service processing queue can be processed normally by the service processing thread; at this time, stopping moving the message in the service processing queue into the congestion processing queue;
s8, when the queuing number of the service processing queue does not reach the second threshold value, continuing to detect the message queuing number of the service processing queue until the second threshold value is reached; thereby ensuring that the subsequent service request processing is not overtime any more.
S9, the service processing thread processes the message in the service processing queue, and the congestion processing thread processes the message in the congestion processing queue; wherein the content of the first and second substances,
the message processing mode of the congestion processing thread is consistent with that of the service processing thread, and the congestion processing thread does not have time limit requirements on service processing;
as shown in fig. 2, the present invention provides a system for solving congestion in message interaction, comprising: the system comprises a service receiving thread, a service processing thread, a creating module, a detection judging module and a congestion processing thread; wherein the content of the first and second substances,
the creating module is used for creating a congestion processing thread;
a service receiving thread used for realizing S1-S2 of the method;
the detection judgment module is used for matching with the service processing queue and the congestion processing queue to realize S3-S4 and S6-S8 of the method;
a business processing thread for implementing S5 and S9 of the above method;
a congestion handling thread for implementing S9 of the above method.
The invention has the advantages that:
the invention can successfully eliminate the response delay condition of the whole process caused by the delay of certain message processing in the online charging, thereby greatly improving the use perception of users.
Example (b):
based on the method, the invention is used in the online charging system of a certain mobile province, and the message waiting time delay is reduced from 90% to 20%.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (5)
1. A method for resolving congestion in message interactions, comprising:
receiving a charging request message initiated by a network element through a service receiving thread;
the charging request messages are sequentially put into a service processing queue according to the sequence of receiving time;
detecting the queuing number of the messages in the service processing queue, and judging whether the queuing number of the messages reaches a first threshold value;
when the queuing number reaches a first threshold value, sequentially moving the messages in the service processing queue into a congestion processing queue according to the sequence;
when the queuing number of the service processing queue reaches a second threshold value, stopping moving the message in the service processing queue into the congestion processing queue; wherein the first threshold is greater than a second threshold.
2. The method of claim 1, further comprising: creating a congestion processing thread;
processing the message in the service processing queue by the service processing thread;
and processing the message in the congestion processing queue by the congestion processing thread.
3. A system for resolving congestion in message interactions, for implementing the method of claim 1 or 2, comprising:
the service receiving thread is used for receiving the charging request messages initiated by the network element and sequentially putting the charging request messages into a service processing queue according to the sequence of receiving time;
the service processing thread is used for processing the messages in the service processing queue;
it is characterized by also comprising:
the creating module is used for creating a congestion processing thread;
the detection and judgment module is used for detecting the message queuing number in the service processing queue and judging whether the message queuing number reaches a first threshold value; when the queuing number reaches a first threshold value, moving part of messages in the service processing queue into a congestion processing queue until the queuing number of the service processing queue reaches a second threshold value;
and the congestion processing thread is used for processing the messages in the congestion processing queue.
4. The system of claim 3, wherein the first threshold is greater than the second threshold.
5. The system of claim 3,
when the queuing number of the service processing queue reaches a first threshold value, sequentially moving the messages in the service processing queue into the congestion processing queue according to the sequence;
and when the queuing number of the service processing queue reaches a second threshold value, stopping moving the message in the service processing queue into the congestion processing queue.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010687685.7A CN111935658B (en) | 2020-07-16 | 2020-07-16 | Method and system for solving congestion in message interaction |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010687685.7A CN111935658B (en) | 2020-07-16 | 2020-07-16 | Method and system for solving congestion in message interaction |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111935658A CN111935658A (en) | 2020-11-13 |
CN111935658B true CN111935658B (en) | 2022-01-18 |
Family
ID=73314122
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010687685.7A Active CN111935658B (en) | 2020-07-16 | 2020-07-16 | Method and system for solving congestion in message interaction |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111935658B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102541659A (en) * | 2011-12-30 | 2012-07-04 | 重庆新媒农信科技有限公司 | Method and device for processing of server service requests |
CN103222242A (en) * | 2010-11-18 | 2013-07-24 | 思科技术公司 | Dynamic flow redistribution for head line blocking avoidance |
CN108574645A (en) * | 2017-03-14 | 2018-09-25 | 华为技术有限公司 | A kind of array dispatching method and device |
CN110808922A (en) * | 2019-10-29 | 2020-02-18 | 北京大米科技有限公司 | Message processing method and device, storage medium and electronic equipment |
-
2020
- 2020-07-16 CN CN202010687685.7A patent/CN111935658B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103222242A (en) * | 2010-11-18 | 2013-07-24 | 思科技术公司 | Dynamic flow redistribution for head line blocking avoidance |
CN102541659A (en) * | 2011-12-30 | 2012-07-04 | 重庆新媒农信科技有限公司 | Method and device for processing of server service requests |
CN108574645A (en) * | 2017-03-14 | 2018-09-25 | 华为技术有限公司 | A kind of array dispatching method and device |
CN110808922A (en) * | 2019-10-29 | 2020-02-18 | 北京大米科技有限公司 | Message processing method and device, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN111935658A (en) | 2020-11-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106326137B (en) | Memory optimization method and device and user equipment | |
CN109936613B (en) | Disaster recovery method and device applied to server | |
EP2985695A1 (en) | Method and device for setting application program state | |
US20170149969A1 (en) | Electronic communication routing based data accuracy | |
CN107615250B (en) | Application-oriented processing method and device and intelligent terminal | |
CN111488135A (en) | Current limiting method and device for high-concurrency system, storage medium and equipment | |
CN107302493B (en) | Message processing method, message processing device and intelligent terminal | |
CN106973003B (en) | Group message notification method, client, electronic device and server | |
CN107872446B (en) | Communication account management method and device and server | |
CN111935658B (en) | Method and system for solving congestion in message interaction | |
EP3287929B1 (en) | Virus scanning method and virus scanning apparatus | |
CN111740999B (en) | DDOS attack identification method, system and related device | |
CN111949421B (en) | SDK calling method, device, electronic equipment and computer readable storage medium | |
CN114826774B (en) | Log request control method, server side and system for terminal equipment | |
KR102464688B1 (en) | Method and apparatus for detrmining event level of monitoring result | |
CN108810829B (en) | Multimedia message interception processing method and device | |
CN110557324B (en) | Unread IM message processing method and device | |
CN113938473A (en) | Automatic Mock method, device, equipment and storage medium based on flow | |
CN110874277B (en) | Electronic red packet processing method, electronic red packet processing device and mobile terminal | |
CN109284188B (en) | Buffer array maintenance method, device, terminal and readable medium | |
CN108388797B (en) | Intrusion detection method and device and electronic equipment | |
CN115589577B (en) | Communication service access management method and device, electronic equipment and storage medium | |
CN115118782A (en) | Data control method and device, electronic equipment and computer readable storage medium | |
CN113765864B (en) | Service request processing method and device | |
CN115550261A (en) | Flow control parameter adjusting method and device, electronic equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |