CN115474165B - Self-monitoring dynamic adjustment method and system for short message service - Google Patents

Self-monitoring dynamic adjustment method and system for short message service Download PDF

Info

Publication number
CN115474165B
CN115474165B CN202110567126.7A CN202110567126A CN115474165B CN 115474165 B CN115474165 B CN 115474165B CN 202110567126 A CN202110567126 A CN 202110567126A CN 115474165 B CN115474165 B CN 115474165B
Authority
CN
China
Prior art keywords
change rate
data
short message
downlink
uplink
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
Application number
CN202110567126.7A
Other languages
Chinese (zh)
Other versions
CN115474165A (en
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.)
China Mobile Communications Group Co Ltd
China Mobile Financial Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Financial Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Financial Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110567126.7A priority Critical patent/CN115474165B/en
Publication of CN115474165A publication Critical patent/CN115474165A/en
Application granted granted Critical
Publication of CN115474165B publication Critical patent/CN115474165B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/50Service provisioning or reconfiguring

Landscapes

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

Abstract

The embodiment of the invention provides a self-monitoring dynamic adjustment method and a self-monitoring dynamic adjustment system for short message service, wherein the method comprises the following steps: collecting real-time Socket channel data of short message service according to a preset dimension; calculating the change rate in real time based on the collected Socket channel data; and dynamically adjusting the Socket channel based on the change rate. According to the self-monitoring dynamic adjustment method for the short message service, monitoring and dynamic adjustment functions are added to a sending and receiving server of the short message, data acquisition is carried out according to a certain dimension, and the change rate is calculated in real time according to the acquired data quantity; the Socket channel is managed and dynamically adjusted according to the change rate, so that the method has a better real-time adjustment effect, is accurate and efficient, can realize dynamic and automatic capacity expansion and contraction of the short message, avoids manual processing, and reduces the influence on the service; and the added short message monitoring statistics and dynamic adjustment functions are separated from the existing other functions and are not mutually interfered.

Description

Self-monitoring dynamic adjustment method and system for short message service
Technical Field
The invention relates to the field of short message service processing, in particular to a self-monitoring dynamic adjustment method and system for short message service.
Background
In the mobile point mall service, the short message channel is a main service channel and is also one of important differences of the transaction links in distinguishing other main current commercial platforms. In the short message use of the main stream e-commerce platform, the short message mainly bears the auxiliary effects of reminding, informing and the like, and in the use of the mobile point store, the short message channel is also a main exchange channel of the point store except the auxiliary effects of reminding, informing and the like, and the total channel ratio of the short message exchange order can reach 45% -50%.
The short message function of the current integral mall system realizes the uplink and downlink functions of the short message to the dream network gateway. Because the number of Socket channels of the gateway of the dream network is limited, and the channels exceeding the upper limit cannot be established, the current scheme is developed in a micro-service mode, and a fixed Socket channel is established when each service is started.
According to the current technical scheme, the number of channels is fixed relatively to each service. Because the business of the point mall is user-oriented, the mall has a plurality of marketing activities, and has a great promotion effect on the access amount of users, the activities are generally held by the point mall, so the predictability is strong, the capacity expansion and the processing can be finished in advance, but according to the current situation, a plurality of activities are brought by provincial companies or professional companies and are not reported and recorded, the change of the business amount cannot be predicted, short message congestion easily occurs at the moment, the delay of sending and receiving the short message is caused, the user experience is influenced, and the business is further influenced.
Disclosure of Invention
The invention provides a self-monitoring dynamic adjustment method and a self-monitoring dynamic adjustment system for a short message service, which are used for solving the technical defects in the prior art.
The invention provides a self-monitoring dynamic adjustment method for short message service, comprising the following steps:
Collecting real-time Socket channel data of short message service according to a preset dimension;
calculating the change rate in real time based on the collected Socket channel data;
and dynamically adjusting the Socket channel based on the change rate.
According to the self-monitoring dynamic adjustment method for the short message service provided by the invention, after the real-time Socket channel data of the short message service is collected according to the preset dimension, the method further comprises the following steps:
and storing the collected Socket channel data into a Redis, wherein only the Socket channel data in the latest preset time period is stored in the Redis.
According to the self-monitoring dynamic adjustment method for the short message service provided by the invention, the step of collecting the real-time Socket channel data of the short message service according to the preset dimension comprises the following steps:
And acquiring uplink data and downlink data of each Socket channel in real time according to a preset dimension, wherein the uplink data comprises short message uplink data of a user and status report data of a short message sent by the user, and the downlink data comprises short message sending data.
According to the self-monitoring dynamic adjustment method for short message service provided by the invention, the real-time calculation of the change rate based on the collected Socket channel data comprises the following steps:
Based on the uplink data, calculating the uplink change rate of the latest continuous N times in real time, wherein the uplink change rate of the latest continuous N times is the change rate between the latest continuous N times and the latest uplink data in the previous period respectively;
and calculating the downlink change rate of the latest continuous N times in real time based on the downlink data, wherein the downlink change rate of the latest continuous N times is the change rate between the latest continuous N times and the latest downlink data in the previous period respectively.
According to the self-monitoring dynamic adjustment method for the short message service provided by the invention, based on the change rate, the dynamic adjustment of the Socket channel comprises the following steps:
judging the up-to-date continuous N times of up-to-date change rate whether the average value of (2) is within a preset proportion range;
If yes, adjusting the number of Socket uplink channels within a preset uplink channel number range based on the average value of the latest continuous N uplink change rates; and
Judging whether the average value of the latest continuous N downlink change rates is within a preset proportion range or not;
If yes, adjusting the number of Socket downlink channels within a preset downlink channel number range based on the average value of the change rate of the latest continuous N times; wherein N is a positive integer.
According to the self-monitoring dynamic adjustment method for short message service provided by the invention, after the dynamic adjustment of the Socket channel is performed based on the change rate, the method further comprises the following steps:
Based on the adjusted Socket uplink channel number, adjusting related short message uplink processing threads;
And adjusting related short message downlink processing threads based on the adjusted Socket downlink channel number.
The invention also provides a self-monitoring dynamic adjustment system for the short message service, which comprises the following steps:
The short message uplink and downlink monitoring module is used for collecting real-time Socket channel data of the short message service according to a preset dimension;
the change rate determining module is used for calculating the change rate in real time based on the collected Socket channel data;
and the dynamic regulation and control module is used for dynamically regulating the Socket channel based on the change rate.
The invention provides a self-monitoring dynamic adjustment system for short message service, which comprises:
the storage module is used for storing the acquired Socket channel data into a Redis, wherein only the Socket channel data in the latest preset time period is stored in the Redis.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the steps of the self-monitoring dynamic adjustment method of the short message service are realized when the processor executes the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the self-monitoring dynamic adjustment method for a short message service as described in any one of the above.
According to the self-monitoring dynamic adjustment method for the short message service, monitoring and dynamic adjustment functions are added to a sending and receiving server of the short message, data acquisition is carried out according to a certain dimension, and the change rate is calculated in real time according to the acquired data quantity; the Socket channel is managed and dynamically adjusted according to the change rate, when the traffic volume is increased suddenly, the Socket channel is increased dynamically according to the monitoring data, and when the traffic volume is reduced, the Socket channel is adjusted dynamically downwards according to the monitoring data, so that the method has a better real-time adjustment effect, is accurate and efficient, can realize the dynamic automatic capacity expansion and contraction of the short message, avoids manual processing, and reduces the influence on the service; and the added short message monitoring statistics and dynamic adjustment functions are separated from the existing other functions and are not mutually interfered.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for self-monitoring dynamic adjustment of a sms according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a self-monitoring dynamic adjustment system for SMS according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The embodiment of the invention discloses a self-monitoring dynamic adjustment method for short message service, which is shown in fig. 1 and comprises the following steps:
S1, acquiring real-time Socket channel data of a short message service according to a preset dimension;
In S1, the Socket channel is a network communication channel for performing bidirectional communication between application processes on different hosts in the network. The Socket channel data comprises uplink data and downlink data of each Socket channel. The preset dimension may be set to collect data every 5 seconds.
S2, calculating the change rate in real time based on the collected Socket channel data;
In S2, the uplink data and the downlink data of each Socket channel are changed in real time, so that the change rate needs to be calculated in real time.
And S3, dynamically adjusting the Socket channel based on the change rate.
And S3, dynamically adjusting a Socket channel and a processing thread according to the counted change rate and the monitoring data to meet the dynamic expansion and contraction capacity caused by the traffic. And carrying out the management and dynamic adjustment of the Socket channel according to the change rate, carrying out the dynamic increase of the Socket channel according to the monitoring data when the traffic volume is increased sharply, and carrying out the dynamic downward adjustment of the Socket channel according to the monitoring data when the traffic volume is lower.
According to the embodiment of the invention, a monitoring and dynamic adjusting function is added to a short message sending and receiving server, data acquisition is carried out according to a certain dimension, and the change rate is calculated in real time according to the acquired data quantity; the Socket channel is managed and dynamically adjusted according to the change rate, when the traffic volume is increased suddenly, the Socket channel is increased dynamically according to the monitoring data, and when the traffic volume is reduced, the Socket channel is adjusted dynamically downwards according to the monitoring data, so that the method has a better real-time adjustment effect, is accurate and efficient, can realize the dynamic automatic capacity expansion and contraction of the short message, avoids manual processing, and reduces the influence on the service; and the added short message monitoring statistics and dynamic adjustment functions are separated from the existing other functions and are not mutually interfered.
Further, after the collecting the real-time Socket channel data of the short message service according to the preset dimension, the method further includes:
and storing the collected Socket channel data into a Redis, wherein only the Socket channel data in the latest preset time period is stored in the Redis. The preset time period is typically set to 30 minutes. Redis (Remote Dictionary Server), a remote dictionary service, is an open source log-type, key-Value database written in ANSI C language, supporting network, memory-based and persistent, and providing API in multiple languages. Only storing data for nearly 30 minutes can reduce the data volume, has small occupied capacity requirement on Redis, and improves the efficiency.
According to the self-monitoring dynamic adjustment method for the short message service provided by the invention, the step of collecting the real-time Socket channel data of the short message service according to the preset dimension comprises the following steps:
And acquiring uplink data and downlink data of each Socket channel in real time according to a preset dimension, wherein the uplink data comprises short message uplink data of a user and status report data of a short message sent by the user, and the downlink data comprises short message sending data.
And a short message uplink and downlink monitoring and dynamic regulation and control are added on the short message service module, and the two waiting threads are dynamically regulated to realize the dynamic regulation of a Socket channel and a processing thread so as to meet the dynamic expansion and contraction capacity caused by the traffic.
According to the self-monitoring dynamic adjustment method for short message service provided by the invention, the real-time calculation of the change rate based on the collected Socket channel data comprises the following steps:
Based on the uplink data, calculating the uplink change rate of the latest continuous N times in real time, wherein the uplink change rate of the latest continuous N times is the change rate between the latest continuous N times and the latest uplink data in the previous period respectively;
and calculating the downlink change rate of the latest continuous N times in real time based on the downlink data, wherein the downlink change rate of the latest continuous N times is the change rate between the latest continuous N times and the latest downlink data in the previous period respectively.
According to the self-monitoring dynamic adjustment method for the short message service provided by the invention, based on the change rate, the dynamic adjustment of the Socket channel comprises the following steps:
judging the up-to-date continuous N times of up-to-date change rate whether the average value of (2) is within a preset proportion range;
The preset ratio range is more than 5% or less than-5%, that is, the change rate exceeds 5%, and the average change rate of the uplink change rate in each period is generally more than 5%.
The continuous N uplink change rate means that the uplink data collected each time in N times is compared with the uplink data of the last time in the previous period, and the calculated change rate may be increased or decreased, if the calculated change rate is increased, the calculated change rate is a positive value, and if the calculated change rate is decreased, the calculated change rate is a negative value. One period contains up data of N times, preferably 10 times, and the average value of 10 times is more instructive for expansion and contraction.
If yes, adjusting the number of Socket uplink channels within a preset uplink channel number range based on the average value of the latest continuous N uplink change rates; and
Judging whether the average value of the latest continuous N downlink change rates is within a preset proportion range or not;
Similarly, the preset ratio range is greater than 5% or less than-5%, that is, the change rate exceeds 5%, and the average change rate of the downlink change rate in each period is generally greater than 5%. The continuous downlink change rate of N times means that the downlink data collected each time in N times is compared with the latest downlink data in the previous period, and the calculated change rate may be increased or decreased, if the calculated change rate is increased, the calculated change rate is positive, and if the calculated change rate is decreased, the calculated change rate is negative. One period contains N times of downlink data, N is preferably 10 times, and the average value of 10 times is more instructive for expansion and contraction.
If yes, adjusting the number of Socket downlink channels within a preset downlink channel number range based on the average value of the change rate of the latest continuous N times; wherein N is a positive integer.
The Socket channel number can be updated in real time according to the capacity expansion or capacity reduction of the Socket channel number according to the change rate of the latest cycle of each Socket thread data acquired every second.
According to the self-monitoring dynamic adjustment method for short message service provided by the invention, after the dynamic adjustment of the Socket channel is performed based on the change rate, the method further comprises the following steps:
Based on the adjusted Socket uplink channel number, adjusting related short message uplink processing threads;
and adjusting related short message downlink processing threads based on the adjusted Socket downlink channel number. The adjustment of the related short message uplink processing thread and the adjustment of the related short message downlink processing thread can be synchronously performed, can be independently performed, can be performed by adjusting only the uplink processing thread or the downlink processing thread, and can be performed in real time after the dynamic adjustment of the Socket channel. And only after the dynamic adjustment of the Socket channel is carried out, the relevant short message uplink processing thread and/or the relevant short message downlink processing thread are/is adjusted, and if the Socket channel is not adjusted, the short message uplink processing thread and/or the relevant short message downlink processing thread are/is not adjusted.
When the capacity of the Socket channel is required to be expanded, the number of threads can be updated in real time according to the uplink and downlink processing threads of the related short messages which are expanded by 1.5 times of the quantity of the Socket, and the uplink and downlink processing threads are the same as the growth proportion of the Socket.
To further describe the method in detail, in one embodiment, the statistical monitoring and dynamic process flows are as follows:
1. after the service is started, two waiting threads are started simultaneously: and (5) carrying out statistics monitoring and dynamic adjustment on the uplink and downlink of the short message.
2. The short message uplink and downlink statistics monitoring is used for data acquisition, uplink data and downlink data are acquired every 1 second, the acquisition object is the existing Socket channel data, the data are stored in the Redis after the acquisition is completed, the Redis only holds the data in the last 30 minutes, and other data do not need to be reserved.
(1) Collecting uplink data: the uplink data mainly comprises the short message uplink data of the user and the state report data of the short message sent by the user, and the data quantity per second of each Socket is mainly collected;
(2) And (3) collecting downlink data: the downlink data are all short message sending data, and the data amount per second of each Socket is mainly collected.
Dynamic regulation refers to adjusting Socket channels and processing thread numbers according to collected data to realize dynamic expansion and contraction. And the dynamic adjustment module expands the capacity according to the latest cycle, namely the latest continuous 10 times of increment average value, if the continuous 10 times of increment average value exceeds 5%, the capacity expansion is required to be carried out on the Socket thread data acquired per second. For example, if the average value of the increment of the uplink data for 10 consecutive times is 10%, the expansion ratio of the uplink data is 10%, for example, the current number of 100 channels increases by 10%, and the expansion ratio increases to 110 channels. If the average value of the increment of the downlink data for 10 continuous times is 8%, the expansion ratio of the downlink data is 8%. For example, there are 100 channels, the proportion is reduced by 8%, and then the proportion is reduced to 92 channels.
Specifically, the data of each channel acquired every 5 seconds can be added to calculate the uplink or downlink data quantity of the short message in the second, and the data is written into the Redis. Total data saved for the last 30 minutes in Redis;
And (3) calculating the increasing proportion of the upstream and downstream of the short message for the first 10 times every 5 seconds by the Socket monitoring waiting thread, and if the changing rate of the upstream data or the downstream data for 10 times continuously exceeds 5%, determining that the capacity-expanding channel of the upstream data or the downstream data is required, and increasing the capacity-expanding proportion according to the average value of the increasing quantity for 10 times continuously until the increasing quantity of the Socket reaches the upper limit. And (3) injection: the total number of the common short message channels is 200, and the number of the short message downlink channels is far higher than the number of the short message uplink channels, so that uplink and downlink restrictions are performed when the number of the channels is allocated, and the total number of the short message downlink channels is generally greater than the number of the uplink channels, so that the total number of the short message uplink channels is up to 40, and the total number of the short message downlink channels is up to 160.
The change rates of the uplink data and the downlink data are respectively judged, and whether the respective Socket channels need to be adjusted or not is also determined based on the respective change rates, and the uplink data and the downlink data are simultaneously and respectively and independently monitored, judged and adjusted.
The dynamic adjustment module needs to expand the capacity of the Socket channel and simultaneously needs to expand the uplink and downlink processing threads of the related short messages according to 1.5 times of the capacity of the Socket, and the uplink and downlink processing threads are the same as the growth proportion of the Socket. When Socket monitoring waiting thread expands Socket, it needs to expand the processing sites of short message up and short message down, thread processing rule: every Socket channel is expanded, namely 1.5 processing threads (rounded up) are added, and the number of the threads depends on the number of Socket channels. When the traffic is reduced, the method adopts the mode of equal-proportion capacity reduction operation.
The embodiment of the invention discloses a self-monitoring dynamic adjustment system for short message service, which is shown in fig. 2 and comprises the following steps:
The short message uplink and downlink monitoring module 10 is used for collecting real-time Socket channel data of short message service according to a preset dimension;
the change rate determining module 20 is configured to calculate a change rate in real time based on the collected Socket channel data;
And the dynamic regulation and control module 30 is used for dynamically regulating the Socket channel based on the change rate.
The invention provides a self-monitoring dynamic adjustment system for short message service, which comprises:
the storage module is used for storing the acquired Socket channel data into a Redis, wherein only the Socket channel data in the latest preset time period is stored in the Redis.
Further, the sms uplink and downlink monitoring module 10 is specifically configured to:
And acquiring uplink data and downlink data of each Socket channel in real time according to a preset dimension, wherein the uplink data comprises short message uplink data of a user and status report data of a short message sent by the user, and the downlink data comprises short message sending data.
According to the self-monitoring dynamic adjustment system for short message service provided by the invention, the change rate determining module 20 is specifically configured to:
Based on the uplink data, calculating the uplink change rate of the latest continuous N times in real time, wherein the uplink change rate of the latest continuous N times is the change rate between the latest continuous N times and the latest uplink data in the previous period respectively;
and calculating the downlink change rate of the latest continuous N times in real time based on the downlink data, wherein the downlink change rate of the latest continuous N times is the change rate between the latest continuous N times and the latest downlink data in the previous period respectively.
Judging the up-to-date continuous N times of up-to-date change rate whether the average value of (2) is within a preset proportion range;
The preset ratio range is more than 5% or less than-5%, that is, the change rate exceeds 5%, and the average change rate of the uplink change rate in each period is generally more than 5%.
The continuous N uplink change rate means that the uplink data collected each time in N times is compared with the uplink data of the last time in the previous period, and the calculated change rate may be increased or decreased, if the calculated change rate is increased, the calculated change rate is a positive value, and if the calculated change rate is decreased, the calculated change rate is a negative value. One period contains up data of N times, preferably 10 times, and the average value of 10 times is more instructive for expansion and contraction.
If yes, adjusting the number of Socket uplink channels within a preset uplink channel number range based on the average value of the latest continuous N uplink change rates; and
Judging whether the average value of the latest continuous N downlink change rates is within a preset proportion range or not;
Similarly, the preset ratio range is greater than 5% or less than-5%, that is, the change rate exceeds 5%, and the average change rate of the downlink change rate in each period is generally greater than 5%. The continuous downlink change rate of N times means that the downlink data collected each time in N times is compared with the latest downlink data in the previous period, and the calculated change rate may be increased or decreased, if the calculated change rate is increased, the calculated change rate is positive, and if the calculated change rate is decreased, the calculated change rate is negative. One period contains N times of downlink data, N is preferably 10 times, and the average value of 10 times is more instructive for expansion and contraction.
If yes, adjusting the number of Socket downlink channels within a preset downlink channel number range based on the average value of the change rate of the latest continuous N times; wherein N is a positive integer.
The Socket channel number can be updated in real time according to the capacity expansion or capacity reduction of the Socket channel number according to the change rate of the latest cycle of each Socket thread data acquired every second.
According to the self-monitoring dynamic regulation system for the short message service, the dynamic regulation module is specifically used for:
judging the up-to-date continuous N times of up-to-date change rate whether the average value of (2) is within a preset proportion range;
If yes, adjusting the number of Socket uplink channels within a preset uplink channel number range based on the average value of the latest continuous N uplink change rates; and
Judging whether the average value of the latest continuous N downlink change rates is within a preset proportion range or not;
If yes, adjusting the number of Socket downlink channels within a preset downlink channel number range based on the average value of the change rate of the latest continuous N times; wherein N is a positive integer.
Specifically, judging whether the average value of the up-to-date continuous N times of up-to-date change rates is within a preset proportion range;
The preset ratio range is more than 5% or less than-5%, that is, the change rate exceeds 5%, and the average change rate of the uplink change rate in each period is generally more than 5%.
The continuous N uplink change rate means that the uplink data collected each time in N times is compared with the uplink data of the last time in the previous period, and the calculated change rate may be increased or decreased, if the calculated change rate is increased, the calculated change rate is a positive value, and if the calculated change rate is decreased, the calculated change rate is a negative value. One period contains up data of N times, preferably 10 times, and the average value of 10 times is more instructive for expansion and contraction.
If yes, adjusting the number of Socket uplink channels within a preset uplink channel number range based on the average value of the latest continuous N uplink change rates; and
Judging whether the average value of the latest continuous N downlink change rates is within a preset proportion range or not;
Similarly, the preset ratio range is greater than 5% or less than-5%, that is, the change rate exceeds 5%, and the average change rate of the downlink change rate in each period is generally greater than 5%. The continuous downlink change rate of N times means that the downlink data collected each time in N times is compared with the latest downlink data in the previous period, and the calculated change rate may be increased or decreased, if the calculated change rate is increased, the calculated change rate is positive, and if the calculated change rate is decreased, the calculated change rate is negative. One period contains N times of downlink data, N is preferably 10 times, and the average value of 10 times is more instructive for expansion and contraction.
If yes, adjusting the number of Socket downlink channels within a preset downlink channel number range based on the average value of the change rate of the latest continuous N times; wherein N is a positive integer.
The Socket channel number can be updated in real time according to the capacity expansion or capacity reduction of the Socket channel number according to the change rate of the latest cycle of each Socket thread data acquired every second.
The self-monitoring dynamic regulation system for the short message service provided by the invention further comprises a processing thread regulation module, wherein the processing thread regulation module is used for:
Based on the adjusted Socket uplink channel number, adjusting related short message uplink processing threads;
And/or adjusting the related short message downlink processing thread based on the adjusted Socket downlink channel number.
And adjusting related short message downlink processing threads based on the adjusted Socket downlink channel number. The adjustment of the related short message uplink processing thread and the adjustment of the related short message downlink processing thread can be synchronously performed, can be independently performed, can be performed by adjusting only the uplink processing thread or the downlink processing thread, and can be performed in real time after the dynamic adjustment of the Socket channel. And only after the dynamic adjustment of the Socket channel is carried out, the relevant short message uplink processing thread and/or the relevant short message downlink processing thread are/is adjusted, and if the Socket channel is not adjusted, the short message uplink processing thread and/or the relevant short message downlink processing thread are/is not adjusted.
Fig. 3 illustrates a physical schematic diagram of an electronic device, which may include: processor 310, communication interface (Communications Interface) 320, memory 330 and communication bus 340, wherein processor 310, communication interface 320 and memory 330 communicate with each other via communication bus 340. The processor 310 may invoke logic instructions in the memory 330 to perform a method for self-monitoring dynamic adjustment of short message service, the method comprising:
S1, acquiring real-time Socket channel data of a short message service according to a preset dimension;
s2, calculating the change rate in real time based on the collected Socket channel data;
and S3, dynamically adjusting the Socket channel based on the change rate.
Further, the logic instructions in the memory described above may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, are capable of performing a method of self-monitoring dynamic adjustment of a short message service, the method comprising:
S1, acquiring real-time Socket channel data of a short message service according to a preset dimension;
s2, calculating the change rate in real time based on the collected Socket channel data;
and S3, dynamically adjusting the Socket channel based on the change rate.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform a method for self-monitoring dynamic adjustment of a short message service, the method comprising:
S1, acquiring real-time Socket channel data of a short message service according to a preset dimension;
s2, calculating the change rate in real time based on the collected Socket channel data;
and S3, dynamically adjusting the Socket channel based on the change rate.
The system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (5)

1. A self-monitoring dynamic adjustment method for short message service is characterized by comprising the following steps:
collecting real-time Socket channel data of short message service according to a preset dimension; the Socket channel is a network communication channel for carrying out bidirectional communication between application processes on different hosts in a network;
calculating the change rate in real time based on the collected Socket channel data;
Based on the change rate, dynamically adjusting a Socket channel;
the collecting the real-time Socket channel data of the short message service according to the preset dimension comprises the following steps:
Collecting uplink data and downlink data of each Socket channel in real time according to preset dimensions, wherein the uplink data comprise short message uplink data of a user and state report data of a short message sent by the user, and the downlink data comprise short message sending data;
Based on the collected Socket channel data, the real-time calculation of the change rate comprises the following steps:
Based on the uplink data, calculating the uplink change rate of the latest continuous N times in real time, wherein the uplink change rate of the latest continuous N times is the change rate between the latest continuous N times and the latest uplink data in the previous period respectively;
calculating the latest continuous N times of downlink change rate in real time based on the downlink data, wherein the latest continuous N times of downlink change rate is the change rate between the latest continuous N times of downlink data and the latest one time of downlink data in the previous period respectively;
based on the change rate, performing dynamic adjustment of the Socket channel includes:
judging the up-to-date continuous N times of up-to-date change rate whether the average value of (2) is within a preset proportion range;
If yes, adjusting the number of Socket uplink channels within a preset uplink channel number range based on the average value of the latest continuous N uplink change rates; and
Judging whether the average value of the latest continuous N downlink change rates is within a preset proportion range or not;
If yes, adjusting the number of Socket downlink channels within a preset downlink channel number range based on the average value of the change rate of the latest continuous N times; wherein, N is a positive integer;
Wherein the preset dimension is set to collect data once every 5 seconds; the preset proportion range is more than 5% or less than-5%;
after the real-time Socket channel data of the short message service are collected according to the preset dimension, the method further comprises the following steps:
Storing the collected Socket channel data into a Redis, wherein only the Socket channel data in the latest preset time period is stored in the Redis; the preset time period is set to 30 minutes.
2. The method for dynamically adjusting self-monitoring of a short message service according to claim 1, wherein the dynamically adjusting a Socket channel based on the rate of change further comprises:
Based on the adjusted Socket uplink channel number, adjusting related short message uplink processing threads;
And adjusting related short message downlink processing threads based on the adjusted Socket downlink channel number.
3. A self-monitoring dynamic adjustment system for short message service, comprising:
the short message uplink and downlink monitoring module is used for collecting real-time Socket channel data of the short message service according to a preset dimension; the Socket channel is a network communication channel for carrying out bidirectional communication between application processes on different hosts in a network;
the change rate determining module is used for calculating the change rate in real time based on the collected Socket channel data;
The dynamic regulation and control module is used for dynamically regulating the Socket channel based on the change rate;
The short message uplink and downlink monitoring module is specifically used for:
Collecting uplink data and downlink data of each Socket channel in real time according to preset dimensions, wherein the uplink data comprise short message uplink data of a user and state report data of a short message sent by the user, and the downlink data comprise short message sending data;
The change rate determining module is specifically configured to:
Based on the uplink data, calculating the uplink change rate of the latest continuous N times in real time, wherein the uplink change rate of the latest continuous N times is the change rate between the latest continuous N times and the latest uplink data in the previous period respectively;
calculating the latest continuous N times of downlink change rate in real time based on the downlink data, wherein the latest continuous N times of downlink change rate is the change rate between the latest continuous N times of downlink data and the latest one time of downlink data in the previous period respectively;
judging the up-to-date continuous N times of up-to-date change rate whether the average value of (2) is within a preset proportion range;
If yes, adjusting the number of Socket uplink channels within a preset uplink channel number range based on the average value of the latest continuous N uplink change rates; and
Judging whether the average value of the latest continuous N downlink change rates is within a preset proportion range or not;
If yes, adjusting the number of Socket downlink channels within a preset downlink channel number range based on the average value of the change rate of the latest continuous N times; wherein, N is a positive integer;
Wherein the preset dimension is set to collect data once every 5 seconds; the preset proportion range is more than 5% or less than-5%;
the dynamic adjustment system includes:
The storage module is used for storing the acquired Socket channel data into a Redis, wherein only the Socket channel data in the latest preset time period is stored in the Redis; the preset time period is set to 30 minutes.
4. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the self-monitoring dynamic adjustment method for short message service according to any one of claims 1 to 2 when executing the program.
5. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the steps of the self-monitoring dynamic adjustment method of short message service according to any of claims 1 to 2.
CN202110567126.7A 2021-05-24 2021-05-24 Self-monitoring dynamic adjustment method and system for short message service Active CN115474165B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110567126.7A CN115474165B (en) 2021-05-24 2021-05-24 Self-monitoring dynamic adjustment method and system for short message service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110567126.7A CN115474165B (en) 2021-05-24 2021-05-24 Self-monitoring dynamic adjustment method and system for short message service

Publications (2)

Publication Number Publication Date
CN115474165A CN115474165A (en) 2022-12-13
CN115474165B true CN115474165B (en) 2024-05-07

Family

ID=84363486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110567126.7A Active CN115474165B (en) 2021-05-24 2021-05-24 Self-monitoring dynamic adjustment method and system for short message service

Country Status (1)

Country Link
CN (1) CN115474165B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2808444A1 (en) * 2010-09-23 2012-03-29 Research In Motion Limited System and method for dynamic coordination of radio resources usage in a wireless network environment
CN106227605A (en) * 2016-07-26 2016-12-14 北京北森云计算股份有限公司 The dynamic micro services expansion method of a kind of multilingual cloud compiling and device
CN108200544A (en) * 2018-03-02 2018-06-22 北京国电通网络技术有限公司 Short message delivery method and SMS platform
CN108770017A (en) * 2018-05-23 2018-11-06 南京欣网通信科技股份有限公司 A kind of radio resource method for dynamically balancing and system, computer program
CN108845910A (en) * 2018-05-31 2018-11-20 康键信息技术(深圳)有限公司 Monitoring method, device and the storage medium of extensive micro services system
CN109766058A (en) * 2019-01-08 2019-05-17 郑州云海信息技术有限公司 Worker thread dynamic adjusting method, device, equipment and storage medium
CN110058939A (en) * 2018-12-27 2019-07-26 阿里巴巴集团控股有限公司 System Expansion method, device and equipment
WO2020073661A1 (en) * 2018-10-11 2020-04-16 平安科技(深圳)有限公司 Dynamic code synchronization process capacity expansion method, dynamic code generator, and storage medium
CN111328033A (en) * 2020-03-10 2020-06-23 北京思特奇信息技术股份有限公司 Short message load transmission method and system
CN111459761A (en) * 2020-04-01 2020-07-28 广州虎牙科技有限公司 Redis configuration method, device, storage medium and equipment
CN112261596A (en) * 2020-09-30 2021-01-22 汉海信息技术(上海)有限公司 Short message channel resource allocation method, device, equipment and storage medium
CN112291104A (en) * 2020-12-30 2021-01-29 望海康信(北京)科技股份公司 Micro-service automatic scaling system, method and corresponding equipment and storage medium
CN112351392A (en) * 2020-10-27 2021-02-09 北京聚通达科技股份有限公司 Cloud communication short message service platform

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2808444A1 (en) * 2010-09-23 2012-03-29 Research In Motion Limited System and method for dynamic coordination of radio resources usage in a wireless network environment
CN106227605A (en) * 2016-07-26 2016-12-14 北京北森云计算股份有限公司 The dynamic micro services expansion method of a kind of multilingual cloud compiling and device
CN108200544A (en) * 2018-03-02 2018-06-22 北京国电通网络技术有限公司 Short message delivery method and SMS platform
CN108770017A (en) * 2018-05-23 2018-11-06 南京欣网通信科技股份有限公司 A kind of radio resource method for dynamically balancing and system, computer program
CN108845910A (en) * 2018-05-31 2018-11-20 康键信息技术(深圳)有限公司 Monitoring method, device and the storage medium of extensive micro services system
WO2020073661A1 (en) * 2018-10-11 2020-04-16 平安科技(深圳)有限公司 Dynamic code synchronization process capacity expansion method, dynamic code generator, and storage medium
CN110058939A (en) * 2018-12-27 2019-07-26 阿里巴巴集团控股有限公司 System Expansion method, device and equipment
CN109766058A (en) * 2019-01-08 2019-05-17 郑州云海信息技术有限公司 Worker thread dynamic adjusting method, device, equipment and storage medium
CN111328033A (en) * 2020-03-10 2020-06-23 北京思特奇信息技术股份有限公司 Short message load transmission method and system
CN111459761A (en) * 2020-04-01 2020-07-28 广州虎牙科技有限公司 Redis configuration method, device, storage medium and equipment
CN112261596A (en) * 2020-09-30 2021-01-22 汉海信息技术(上海)有限公司 Short message channel resource allocation method, device, equipment and storage medium
CN112351392A (en) * 2020-10-27 2021-02-09 北京聚通达科技股份有限公司 Cloud communication short message service platform
CN112291104A (en) * 2020-12-30 2021-01-29 望海康信(北京)科技股份公司 Micro-service automatic scaling system, method and corresponding equipment and storage medium

Also Published As

Publication number Publication date
CN115474165A (en) 2022-12-13

Similar Documents

Publication Publication Date Title
CN108770017B (en) Dynamic equalization method and system for wireless resources
CN111600967B (en) Access pressure-based load balancing system among block chain nodes
CN109787915B (en) Flow control method and device for network access, electronic equipment and storage medium
CN108632863B (en) Traffic early warning method and device and server
CN111147395B (en) Network resource adjusting method and device
WO2021218873A1 (en) Network resource pre-allocation method, apparatus, and system, and medium
CN108449232B (en) Network speed self-adaptive control method
CN110830964B (en) Information scheduling method, internet of things platform and computer readable storage medium
CN110677854A (en) Method, apparatus, device and medium for carrier frequency capacity adjustment
WO2017054422A1 (en) Method and device for managing cell peak time segment and self-organizing network cell
CN1205777C (en) Method for accessing communication medium
CN106576321A (en) Method and system for exchanging data with a mobile communication network using at least one group of cloned subscriber identity modules
CN111277640A (en) User request processing method, device, system, computer equipment and storage medium
CN115474165B (en) Self-monitoring dynamic adjustment method and system for short message service
CN113395671B (en) Message pushing rate adjusting method and device and server
CN107248959B (en) Flow optimization method and device
CN108271160B (en) Network resource optimization method and device
CN111262783B (en) Dynamic routing method and device
CN106817710B (en) Method and device for positioning network problem
CN106793093B (en) Service processing method and device
CN112001563A (en) Method and device for managing phone bill amount, electronic equipment and storage medium
CN110868304B (en) PCC strategy issuing method and system
CN109996224B (en) Optimization method, system, equipment and storage medium for tracking area code TAC boundary
CN106961398B (en) Bandwidth control method and device of distributed file system
CN111210045A (en) Shutdown instruction sending optimization method

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