CN111124661A - Short message sending method and system based on active resource release of java thread pool - Google Patents

Short message sending method and system based on active resource release of java thread pool Download PDF

Info

Publication number
CN111124661A
CN111124661A CN201910964070.1A CN201910964070A CN111124661A CN 111124661 A CN111124661 A CN 111124661A CN 201910964070 A CN201910964070 A CN 201910964070A CN 111124661 A CN111124661 A CN 111124661A
Authority
CN
China
Prior art keywords
short message
message sending
sending
condition
port
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.)
Granted
Application number
CN201910964070.1A
Other languages
Chinese (zh)
Other versions
CN111124661B (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.)
Hefei Finedo Information Technology Co ltd
Original Assignee
Hefei Finedo Information 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 Hefei Finedo Information Technology Co ltd filed Critical Hefei Finedo Information Technology Co ltd
Priority to CN201910964070.1A priority Critical patent/CN111124661B/en
Publication of CN111124661A publication Critical patent/CN111124661A/en
Application granted granted Critical
Publication of CN111124661B publication Critical patent/CN111124661B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5033Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering data affinity
    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides a short message sending method and a system based on active resource release of a java thread pool, belonging to the technical field of process monitoring of short message sending programs. The short message sending method comprises the following steps: judging whether a short message sending request is received or not; under the condition of receiving the short message sending request, judging whether a short message port corresponding to the short message sending request exists in a short message port configuration table of a system; judging whether the short message port is configured with a resident process or not under the condition that the short message port corresponding to the short message sending request exists in the short message port configuration table; and under the condition that the resident process is configured at the short message port, releasing the resident process and re-configuring a new resident process. The short message sending method and the system can clear the process for monitoring the short message in the system in time, thereby ensuring the stable operation of the system.

Description

Short message sending method and system based on active resource release of java thread pool
Technical Field
The invention relates to the technical field of process monitoring of short message sending programs, in particular to a short message sending method and a system based on active resource release of a java thread pool.
Background
With the development of the internet era, it has become a common way for enterprises to promote their businesses by directly sending short messages to users' mobile phones through network terminals. In the prior art, in order to monitor the status of the sent short message, the system starts a process to monitor the short message while sending it each time. The method can cause a large number of processes to be difficult to release, thereby causing waste of server resources, and more seriously causing serious server load and slow system operation, thereby seriously affecting user experience.
Disclosure of Invention
The invention aims to provide a short message sending method and a system for actively releasing resources based on a java thread pool.
In order to achieve the above object, an embodiment of the present invention provides a short message sending method for actively releasing resources based on a java thread pool, where the short message sending method includes:
judging whether a short message sending request is received or not;
under the condition of receiving the short message sending request, judging whether a short message port corresponding to the short message sending request exists in a short message port configuration table of a system;
judging whether the short message port is configured with a resident process or not under the condition that the short message port corresponding to the short message sending request exists in the short message port configuration table;
and under the condition that the resident process is configured at the short message port, releasing the resident process and re-configuring a new resident process.
Optionally, the short message sending method further includes:
receiving a feedback signal for indicating the success of sending the short message under the condition of configuring the resident process;
and under the condition of receiving the feedback signal, closing the resident process corresponding to the feedback signal.
Optionally, the short message sending method further includes:
and under the condition that the short message port corresponding to the short message sending request does not exist in the short message port configuration table, configuring a resident process and a short message port of the short message sending request, and adding the short message port into the short message port configuration table to update the short message port configuration table.
Optionally, the short message sending method further includes:
and configuring the resident process of the short message sending request under the condition of judging that the resident process is not configured at the short message port.
On the other hand, the invention also provides a short message sending system based on the java thread pool for actively releasing resources, and the short message sending system comprises:
the short message processing center comprises:
the uplink service module is used for receiving the short message sending request and sending a short message;
the downlink service module is used for receiving a verification message fed back by a user and a short message number corresponding to the verification message;
a resident program module configured to:
judging whether a short message sending request is received or not;
under the condition of receiving the short message sending request, judging whether a short message port corresponding to the short message sending request exists in a short message port configuration table of a system;
judging whether the short message port is configured with a resident process or not under the condition that the short message port corresponding to the short message sending request exists in the short message port configuration table;
under the condition that the resident process is configured at the short message port, releasing the resident process and re-configuring a new resident process;
and sending the short message sending request to the uplink service module.
Optionally, the downlink service module is further configured to:
under the condition of receiving the verification message fed back by the user, sending a feedback signal for indicating the success of sending the short message to the resident program module;
the resident program module is further used for closing the resident process corresponding to the feedback signal under the condition of receiving the feedback signal.
Optionally, the resident program module is further configured to:
and under the condition that the short message port corresponding to the short message sending request does not exist in the short message port configuration table, configuring a resident process and a short message port of the short message sending request, adding the short message port into the short message port configuration table to update the short message port configuration table, and sending the short message sending request to the uplink service module.
Optionally, the resident program module is further configured to:
and under the condition that the resident process is not configured at the short message port, configuring the resident process of the short message sending request and sending the short message sending request to the uplink service module.
Optionally, the short message processing center further includes a multimedia message center, configured to:
receiving a short message sent by the uplink service module and converting the short message into a multimedia form to be sent to the user;
receiving the message fed back by the user and analyzing corresponding verification information and short message codes;
and sending the verification information and the short message code to the downlink service module.
In another aspect, the present invention further provides a storage medium, where the storage medium stores instructions for being read by a machine to cause the machine to execute the method for sending short messages according to any one of the above descriptions.
Through the technical scheme, the short message sending method and the system for actively releasing resources based on the java thread pool provided by the invention inquire whether the current short message sending request is configured with the short message port or not when the short message sending request is received each time, further determine whether the short message sending request is configured with the resident process or not under the condition that the short message port is configured, close the resident process and configure a new resident process under the condition that the resident process is configured, and solve the technical problem that the system is wasted because the system is configured with a plurality of resident processes for the same short message sending request.
Additional features and advantages of embodiments of the invention will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the embodiments of the invention without limiting the embodiments of the invention. In the drawings:
fig. 1 is a flowchart of a short message sending method for actively releasing resources based on a java thread pool according to an embodiment of the present invention;
fig. 2 is a block diagram of a short message sending system for actively releasing resources based on a java thread pool according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating embodiments of the invention, are given by way of illustration and explanation only, not limitation.
In the embodiments of the present invention, unless otherwise specified, the use of directional terms such as "upper, lower, top, and bottom" is generally used with respect to the orientation shown in the drawings or the positional relationship of the components with respect to each other in the vertical, or gravitational direction.
In addition, if there is a description of "first", "second", etc. in the embodiments of the present invention, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between the various embodiments can be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not be within the protection scope of the present invention.
Fig. 1 is a flowchart illustrating a method for sending a short message based on an active release of resources by a java thread pool according to an embodiment of the present invention. In fig. 1, the short message sending method may include:
in step S10, it is determined whether a short message transmission request is received.
In step S11, when the short message sending request is received, it is determined whether there is a short message port corresponding to the short message sending request in the short message port configuration table of the system. The short message port configuration table may include a short message port configured when the system receives a short message sending request each time.
In step S12, when it is determined that the short message port corresponding to the short message sending request does not exist in the short message port configuration table, it indicates that the short message sending request is received for the first time, and the system has not configured the short message port for the short message sending request, the system may configure a resident process and the short message port of the short message sending request, and add the short message port to the short message port configuration table to update the short message port configuration table, so that the short message port can be identified when step S11 is executed next time.
In step S13, if there is a short message port corresponding to the short message sending request in the short message port configuration table, this indicates that the short message sending request has already configured the short message port, then it can be further determined whether the short message port has configured a resident process.
In step S14, if it is determined that the resident process is not configured in the sms port, the resident process of the sms transmission request is configured.
In step S15, if the short message port is determined to have been configured with the resident process, this indicates that the short message port has been configured with the resident process, and if the original resident process is not closed, a new resident process is directly configured, which may result in waste of system resources, thereby reducing the operating efficiency of the system. Thus, the resident process may be released and a new resident process reconfigured.
In addition, in this embodiment, in order to avoid that the resident process is configured completely, after the system has configured the resident process, the system may receive a feedback signal indicating that the short message is successfully sent; and under the condition of receiving the feedback signal, closing the resident process corresponding to the feedback signal, so that the system can close the resident process for monitoring the short message transmission in time when the short message transmission is completed, thereby avoiding the waste of system resources.
On the other hand, the present invention further provides a short message sending system for actively releasing resources based on the java thread pool, as shown in fig. 2, the short message sending system may include a short message processing center 10 and a resident program module 20. The short message processing center 10 may include an uplink service module 11 and a downlink service module 13.
The uplink service module 11 may be configured to receive a short message sending request and send a short message.
The downlink service module 13 may be configured to receive a verification message fed back by a user and a short message number corresponding to the verification message.
The resident program module 20 may be used to execute the sms sending method as shown in fig. 1. Specifically, the resident program module 20 may be configured to determine whether a short message sending request is received; under the condition of receiving a short message sending request, judging whether a short message port corresponding to the short message sending request exists in a short message port configuration table of the system; under the condition that a short message port corresponding to the short message sending request exists in the short message port configuration table, judging whether the short message port is configured with a resident process or not; under the condition that the resident process is configured at the short message port, releasing the resident process and re-configuring a new resident process; and sending the short message sending request to the uplink service module 11. Correspondingly, the resident program module 20 may also configure a resident process and a short message port of the short message sending request, add the short message port to the short message port configuration table to update the short message port configuration table, and send the short message sending request to the uplink service module 11, when it is determined that the short message port corresponding to the short message sending request does not exist in the short message port configuration table. The resident program module 20 may also configure the resident process of the short message sending request and send the short message sending request to the uplink service module 11, when determining that the resident process is not configured at the short message port.
In addition, in order to avoid excessive processes configured by the resident program module 20, the downlink service module 13 may also send a feedback signal for indicating that the short message is successfully sent to the resident program module 20 when receiving a verification message fed back by the user; accordingly, the resident program module 20 may be further configured to shut down the resident process corresponding to the feedback signal if the feedback signal is received.
In this embodiment, since the short message sent by the uplink service module 20 is sent in an encoded form, the short message processing center 10 may further include a multimedia message center 12 in order to make the short message received by the user in a multimedia form. The multimedia message center 12 may be configured to receive the short message sent by the uplink service module 11 and convert the short message into a multimedia format to send to the user; receiving the message fed back by the user and analyzing the corresponding verification information and the short message code; and finally, the verification information and the short message code are sent to the downlink service module 13.
In another aspect, the present invention further provides a storage medium, where the storage medium may store instructions, where the instructions may be used to be read by a machine to cause the machine to perform any of the methods for sending short messages as described above.
Through the technical scheme, the short message sending method and the system for actively releasing resources based on the java thread pool provided by the invention inquire whether the current short message sending request is configured with the short message port or not when the short message sending request is received each time, further determine whether the short message sending request is configured with the resident process or not under the condition that the short message port is configured, close the resident process and configure a new resident process under the condition that the resident process is configured, and solve the technical problem that the system is wasted because the system is configured with a plurality of resident processes for the same short message sending request.
Although the embodiments of the present invention have been described in detail with reference to the accompanying drawings, the embodiments of the present invention are not limited to the details of the above embodiments, and various simple modifications can be made to the technical solution of the embodiments of the present invention within the technical idea of the embodiments of the present invention, and the simple modifications all belong to the protection scope of the embodiments of the present invention.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, the embodiments of the present invention will not be described separately for the various possible combinations.
Those skilled in the art can understand that all or part of the steps in the method for implementing the above embodiments may be implemented by a program to instruct related hardware, where the program is stored in a storage medium and includes several instructions to enable a (may be a single chip, a chip, etc.) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In addition, various different embodiments of the present invention may be arbitrarily combined with each other, and the embodiments of the present invention should be considered as disclosed in the disclosure of the embodiments of the present invention as long as the embodiments do not depart from the spirit of the embodiments of the present invention.

Claims (10)

1. A short message sending method based on active resource release of a java thread pool is characterized by comprising the following steps:
judging whether a short message sending request is received or not;
under the condition of receiving the short message sending request, judging whether a short message port corresponding to the short message sending request exists in a short message port configuration table of a system;
judging whether the short message port is configured with a resident process or not under the condition that the short message port corresponding to the short message sending request exists in the short message port configuration table;
and under the condition that the resident process is configured at the short message port, releasing the resident process and re-configuring a new resident process.
2. The short message sending method of claim 1, wherein the short message sending method further comprises:
receiving a feedback signal for indicating the success of sending the short message under the condition of configuring the resident process;
and under the condition of receiving the feedback signal, closing the resident process corresponding to the feedback signal.
3. The short message sending method of claim 1, wherein the short message sending method further comprises:
and under the condition that the short message port corresponding to the short message sending request does not exist in the short message port configuration table, configuring a resident process and a short message port of the short message sending request, and adding the short message port into the short message port configuration table to update the short message port configuration table.
4. The short message sending method of claim 1, wherein the short message sending method further comprises:
and configuring the resident process of the short message sending request under the condition of judging that the resident process is not configured at the short message port.
5. A short message sending system based on active resource release of a java thread pool is characterized by comprising:
the short message processing center comprises:
the uplink service module is used for receiving the short message sending request and sending a short message;
the downlink service module is used for receiving a verification message fed back by a user and a short message number corresponding to the verification message;
a resident program module configured to:
judging whether a short message sending request is received or not;
under the condition of receiving the short message sending request, judging whether a short message port corresponding to the short message sending request exists in a short message port configuration table of a system;
judging whether the short message port is configured with a resident process or not under the condition that the short message port corresponding to the short message sending request exists in the short message port configuration table;
under the condition that the resident process is configured at the short message port, releasing the resident process and re-configuring a new resident process;
and sending the short message sending request to the uplink service module.
6. The SMS sending system of claim 5, wherein the downlink traffic module is further configured to:
under the condition of receiving the verification message fed back by the user, sending a feedback signal for indicating the success of sending the short message to the resident program module;
the resident program module is further used for closing the resident process corresponding to the feedback signal under the condition of receiving the feedback signal.
7. The SMS messaging system of claim 5, wherein the resident program module is further configured to:
and under the condition that the short message port corresponding to the short message sending request does not exist in the short message port configuration table, configuring a resident process and a short message port of the short message sending request, adding the short message port into the short message port configuration table to update the short message port configuration table, and sending the short message sending request to the uplink service module.
8. The SMS messaging system of claim 5, wherein the resident program module is further configured to:
and under the condition that the resident process is not configured at the short message port, configuring the resident process of the short message sending request and sending the short message sending request to the uplink service module.
9. The SMS sending system of claim 5, wherein the SMS processing center further comprises a multimedia message center for:
receiving a short message sent by the uplink service module and converting the short message into a multimedia form to be sent to the user;
receiving the message fed back by the user and analyzing corresponding verification information and short message codes;
and sending the verification information and the short message code to the downlink service module.
10. A storage medium storing instructions for reading by a machine to cause the machine to perform the method of sending short messages according to any one of claims 1 to 4.
CN201910964070.1A 2019-10-11 2019-10-11 Method and system for sending short message based on active resource release of java thread pool Active CN111124661B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910964070.1A CN111124661B (en) 2019-10-11 2019-10-11 Method and system for sending short message based on active resource release of java thread pool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910964070.1A CN111124661B (en) 2019-10-11 2019-10-11 Method and system for sending short message based on active resource release of java thread pool

Publications (2)

Publication Number Publication Date
CN111124661A true CN111124661A (en) 2020-05-08
CN111124661B CN111124661B (en) 2024-04-09

Family

ID=70495291

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910964070.1A Active CN111124661B (en) 2019-10-11 2019-10-11 Method and system for sending short message based on active resource release of java thread pool

Country Status (1)

Country Link
CN (1) CN111124661B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996854A (en) * 2006-12-22 2007-07-11 中国建设银行股份有限公司 Integrated processing system and method for the data exchange between different application systems
CN102333029A (en) * 2011-06-23 2012-01-25 北京新媒传信科技有限公司 Routing method in server cluster system
CN103761178A (en) * 2014-01-17 2014-04-30 北京奇虎科技有限公司 Method for realizing application uninstalling surveys
CN104915252A (en) * 2015-06-15 2015-09-16 上海斐讯数据通信技术有限公司 Process port management device and method
CN105592045A (en) * 2015-08-24 2016-05-18 杭州华三通信技术有限公司 Service connection method and device in distributed system
CN105975851A (en) * 2016-04-27 2016-09-28 北京金山安全软件有限公司 Process processing method and device
CN108418907A (en) * 2018-05-24 2018-08-17 新华三技术有限公司 IP address distribution method and device
CN108933994A (en) * 2018-07-19 2018-12-04 平安科技(深圳)有限公司 Short message distribution processing method, device, computer equipment and storage medium
US20190036793A1 (en) * 2016-03-28 2019-01-31 Huawei Technologies Co., Ltd. Network service implementation method, service controller, and communications system
CN109582447A (en) * 2018-10-15 2019-04-05 中盈优创资讯科技有限公司 Computational resource allocation method, task processing method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996854A (en) * 2006-12-22 2007-07-11 中国建设银行股份有限公司 Integrated processing system and method for the data exchange between different application systems
CN102333029A (en) * 2011-06-23 2012-01-25 北京新媒传信科技有限公司 Routing method in server cluster system
CN103761178A (en) * 2014-01-17 2014-04-30 北京奇虎科技有限公司 Method for realizing application uninstalling surveys
CN104915252A (en) * 2015-06-15 2015-09-16 上海斐讯数据通信技术有限公司 Process port management device and method
CN105592045A (en) * 2015-08-24 2016-05-18 杭州华三通信技术有限公司 Service connection method and device in distributed system
US20190036793A1 (en) * 2016-03-28 2019-01-31 Huawei Technologies Co., Ltd. Network service implementation method, service controller, and communications system
CN105975851A (en) * 2016-04-27 2016-09-28 北京金山安全软件有限公司 Process processing method and device
CN108418907A (en) * 2018-05-24 2018-08-17 新华三技术有限公司 IP address distribution method and device
CN108933994A (en) * 2018-07-19 2018-12-04 平安科技(深圳)有限公司 Short message distribution processing method, device, computer equipment and storage medium
CN109582447A (en) * 2018-10-15 2019-04-05 中盈优创资讯科技有限公司 Computational resource allocation method, task processing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LIANG BAO: "AutoConfig: automatic configuration tuning for distributed message systems", pages 29 - 40 *
徐乐;赵荣辉;: "基于WEB服务的短信发送平台设计实现", no. 09, pages 203 - 204 *

Also Published As

Publication number Publication date
CN111124661B (en) 2024-04-09

Similar Documents

Publication Publication Date Title
US11228951B2 (en) Session handling method and related device
EP3952367A1 (en) Event notification method and device, and storage medium
KR102591434B1 (en) Data processing methods and apparatus, electronic devices, terminal devices, and storage media
US20140187224A1 (en) Protocol version negotiation method, mobile terminal, base station and communications system
CN100421431C (en) Method for realizing instant message communication
CN104936282A (en) Method and device for registering converged communication service
US11956756B2 (en) Request processing method and corresponding entity
US10728189B2 (en) Method, device, storage medium and electronic device for sending multimedia-message
TWI275007B (en) Font data processing system and method
CN112188475B (en) Method, USIM, computer device and medium for dynamically managing service control
CN102111900A (en) Method and system for establishing radio resource control (RRC) connection and mobile terminal
CN106817689B (en) High-reliability data subscription and release method and system
WO2012065492A1 (en) Method for sending imsi and terminal
KR20040047099A (en) Multimedia Messaging Service Method, Multimedia Messaging System and Multimedia Wireless Communication Terminal Equipment
CN111124661B (en) Method and system for sending short message based on active resource release of java thread pool
WO2023016255A1 (en) Network function service authorization method and apparatus
CN114268929B (en) Service activation method and related equipment
US11751036B2 (en) Emergency rich communication services
CN102986173B (en) Method for setting message status and converged internet protocol message (CPM) traffic server
CN114915508A (en) Apparatus, method and computer program for network apparatus
WO2021227844A1 (en) Method and device for determining and indicating access parameter, apparatus, and medium
CN111698287B (en) Cloud mobile phone active application acquisition method, system and storage medium
CN116097691A (en) Service request handling
US20200359380A1 (en) Ynamic bandwidth allocation method and sdn controller using the method
WO2017186271A1 (en) Method and managing module for managing voice data generated by a call managing system

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