CN111124661B - Method and system for sending short message based on active resource release of java thread pool - Google Patents

Method and system for sending short message based on active resource release of java thread pool Download PDF

Info

Publication number
CN111124661B
CN111124661B CN201910964070.1A CN201910964070A CN111124661B CN 111124661 B CN111124661 B CN 111124661B CN 201910964070 A CN201910964070 A CN 201910964070A CN 111124661 B CN111124661 B CN 111124661B
Authority
CN
China
Prior art keywords
short message
port
sending request
resident process
condition
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
CN201910964070.1A
Other languages
Chinese (zh)
Other versions
CN111124661A (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

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 method and a system for sending a short message based on active release of resources of a java thread pool, and belongs to the technical field of process monitoring of a short message sending program. The short message sending method comprises the following steps: judging whether a short message sending request is received or not; judging whether a short message port corresponding to the short message sending request exists in a short message port configuration table of a system under the condition that the short message sending request is received; 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 short message port is judged to be configured with the resident process, releasing the resident process and reconfiguring a new resident process. The short message sending method and the system can timely clear the process for monitoring the short message in the system, thereby ensuring the stable operation of the system.

Description

Method and system for sending short message based on active resource release of java thread pool
Technical Field
The invention relates to the technical field of process monitoring of a short message sending program, in particular to a method and a system for sending a short message based on active resource release of a java thread pool.
Background
With the development of the internet age, the direct sending of short messages to the mobile phones of users through the network end has become a common way for enterprises to promote business. In the prior art, in order to monitor the status of a sent short message, the system starts a process to monitor it while sending a short message each time. The method can cause that a large number of processes are difficult to release, so that the waste of server resources is caused, the server load is serious, the system is slow to operate, and the user experience is seriously affected.
Disclosure of Invention
The invention aims to provide a method and a system for sending a short message based on active release of resources of a java thread pool, which can timely clear the process for monitoring the short message in the system, thereby ensuring the stable operation of the system.
In order to achieve the above object, an embodiment of the present invention provides a method for sending a short message based on active resource release of a java thread pool, where the method for sending a short message includes:
judging whether a short message sending request is received or not;
judging whether a short message port corresponding to the short message sending request exists in a short message port configuration table of a system under the condition that the short message sending request is received;
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 short message port is judged to be configured with the resident process, releasing the resident process and reconfiguring a new resident process.
Optionally, the method for sending the short message further includes:
receiving a feedback signal for indicating successful sending of the short message under the condition that the resident process is configured;
and closing the resident process corresponding to the feedback signal under the condition that the feedback signal is received.
Optionally, the method for sending the short message further includes:
and under the condition that the short message port configuration table does not contain the short message port corresponding to the short message sending request, configuring a resident process of the short message sending request and the short message port, and adding the short message port into the short message port configuration table to update the short message port configuration table.
Optionally, the method for sending the short message further includes:
and under the condition that the resident process is not configured on the short message port, configuring the resident process of the short message sending request.
On the other hand, the invention also provides a SMS transmission system based on active resource release of the java thread pool, which comprises:
the short message processing center comprises:
the uplink service module is used for receiving the short message sending request and sending out a short message;
the downlink service module is used for receiving verification information fed back by a user and a short message number corresponding to the verification information;
a resident program module for:
judging whether a short message sending request is received or not;
judging whether a short message port corresponding to the short message sending request exists in a short message port configuration table of a system under the condition that the short message sending request is received;
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;
releasing the resident process and reconfiguring a new resident process under the condition that the short message port is judged to be configured with the 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 that the verification message fed back by the user is received, a feedback signal for indicating that the short message is successfully sent is sent to the resident program module;
the resident program module is further configured to close a resident process corresponding to the feedback signal when the feedback signal is received.
Optionally, the resident program module is further configured to:
and under the condition that the short message port configuration table does not have the short message port corresponding to the short message sending request, 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 on 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 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 information 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 also provides a storage medium storing instructions for being read by a machine to cause the machine to perform the short message sending method as set forth in any one of the above.
According to the technical scheme, the SMS transmission method and the system based on the active release of the resources of the Java thread pool, which are provided by the invention, are used for inquiring whether the current SMS transmission request is configured with the SMS port or not when the SMS transmission request is received each time, further determining whether the SMS transmission request is configured with the resident process or not under the condition that the SMS port is configured with the SMS port, closing the resident process and configuring the new resident process under the condition that the resident process is configured with the resident process, and solving the technical problem that the system configures a plurality of resident processes for the same SMS transmission request, thereby causing the waste of system resources.
Additional features and advantages of embodiments of the invention will be set forth in the detailed description which follows.
Drawings
The accompanying drawings are included to provide a further understanding of 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, without limitation, the embodiments of the invention. In the drawings:
FIG. 1 is a flow chart of a method for sending a SMS based on active resource release of a java thread pool according to one embodiment of the present invention;
fig. 2 is a block diagram of a sms message transmission system based on active release of resources from a java thread pool according to an embodiment of the present invention.
Detailed Description
The following describes specific embodiments of the present invention in detail with reference to the drawings. It should be understood that the detailed description and specific examples, while indicating and illustrating the invention, are not intended to limit the invention.
In the embodiments of the present invention, unless otherwise indicated, terms of orientation such as "upper, lower, top, bottom" are used generally with respect to the orientation shown in the drawings or with respect to the positional relationship of the various components with respect to one another in the vertical, vertical or gravitational directions.
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 a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those 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 within the scope of protection claimed in the present invention.
Fig. 1 is a flowchart of a method for sending a short message based on active resource release of 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 request for sending a short message is received.
In step S11, if a short message sending request is received, it is determined whether a short message port corresponding to the short message sending request exists in a short message port configuration table of the system. The short message port configuration table may include a short message port configured by the system when receiving a short message sending request each time.
In step S12, under the condition that 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 is indicated 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 yet, so that the system may configure the 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 the short message port corresponding to the short message sending request exists in the short message port configuration table, it is indicated that the short message sending request has configured the short message port, and then it may be further determined whether the resident process has been configured in the short message port.
In step S14, if it is determined that the resident process is not configured in the short message port, the resident process of the short message sending request is configured.
In step S15, when it is determined that the resident process has been configured in the short message port, it is indicated that the resident process has been configured in the short message port, and if the new resident process is directly configured without closing the original resident process, the waste of system resources is caused, thereby reducing the operation 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, after the resident process is configured, the system may receive a feedback signal for indicating that the short message is successfully sent; under the condition that the feedback signal is received, the resident process corresponding to the feedback signal is closed, so that when the work of sending the short message is completed, the system can close the resident process for monitoring the sending of the short message in time, and the waste of system resources is avoided.
On the other hand, the invention also provides a SMS transmission system based on active resource release of the java thread pool, as shown in fig. 2, the SMS transmission system can comprise a SMS 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 sms message sending request and send a sms message.
The downlink service module 13 may be configured to receive a verification message fed back by the user and a short message number corresponding to the verification message.
The resident program module 20 may be used to perform the short message sending method as shown in fig. 1. Specifically, the resident program module 20 may be configured to determine whether a sms send request is received; 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 the short message sending request is received; 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; releasing the resident process and reconfiguring a new resident process under the condition that the short message port is judged to be configured with the 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 when it determines that the short message port corresponding to the short message sending request does not exist in the short message port configuration table, 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. The resident program module 20 may also configure a resident process of the sms sending request and send the sms sending request to the upstream service module 11 when determining that the sms port is not configured with a resident process.
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 sms is sent successfully to the resident program module 20 when receiving the verification message fed back by the user; accordingly, the resident program module 20 may be further configured to close the resident process corresponding to the feedback signal when the feedback signal is received.
In this embodiment, since the sms message sent by the uplink service module 20 is sent in a coded form, the sms message processing center 10 may further include a multimedia message center 12 in order to make the sms 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 form for sending to the user; simultaneously receiving a message fed back by a user and analyzing corresponding verification information and a 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 also provides a storage medium, where instructions may be stored, where the instructions may be used to be read by a machine to cause the machine to perform a method for sending a short message as described above.
According to the technical scheme, the SMS transmission method and the system based on the active release of the resources of the Java thread pool, which are provided by the invention, are used for inquiring whether the current SMS transmission request is configured with the SMS port or not when the SMS transmission request is received each time, further determining whether the SMS transmission request is configured with the resident process or not under the condition that the SMS port is configured with the SMS port, closing the resident process and configuring the new resident process under the condition that the resident process is configured with the resident process, and solving the technical problem that the system configures a plurality of resident processes for the same SMS transmission request, thereby causing the waste of system resources.
The optional embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the embodiments of the present invention are not limited to the specific details of the foregoing embodiments, and various simple modifications may be made to the technical solutions of the embodiments of the present invention within the scope of the technical concept of the embodiments of the present invention, and all the simple modifications belong to the protection scope of the embodiments of the present invention.
In addition, the specific features described in the above embodiments may be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the various possible combinations of embodiments of the invention are not described in detail.
Those skilled in the art will appreciate that all or part of the steps in implementing the methods of the embodiments described above may be implemented by a program stored in a storage medium, including instructions for causing a (which may be a single-chip microcomputer, a chip or the like) or processor (processor) to perform all or part of the steps of the methods of the embodiments described herein. And the aforementioned storage medium includes: a U-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 addition, any combination of the various embodiments of the present invention may be made between the various embodiments, and should also be regarded as disclosed in the embodiments of the present invention as long as it does not deviate from the idea of the embodiments of the present invention.

Claims (8)

1. A SMS transmission method based on active release of resources of a java thread pool is characterized by comprising the following steps:
judging whether a short message sending request is received or not;
judging whether a short message port corresponding to the short message sending request exists in a short message port configuration table of a system under the condition that the short message sending request is received;
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;
releasing the resident process and reconfiguring a new resident process under the condition that the short message port is judged to be configured with the resident process;
the short message sending method further comprises the following steps:
receiving a feedback signal for indicating successful sending of the short message under the condition that the resident process is configured;
and closing the resident process corresponding to the feedback signal under the condition that the feedback signal is received.
2. The short message sending method according to claim 1, wherein the short message sending method further comprises:
and under the condition that the short message port configuration table does not contain the short message port corresponding to the short message sending request, configuring a resident process of the short message sending request and the short message port, and adding the short message port into the short message port configuration table to update the short message port configuration table.
3. The short message sending method according to claim 1, wherein the short message sending method further comprises:
and under the condition that the resident process is not configured on the short message port, configuring the resident process of the short message sending request.
4. A SMS transmission system based on active release of resources of a java thread pool is characterized in that the SMS transmission system comprises:
the short message processing center comprises:
the uplink service module is used for receiving the short message sending request and sending out a short message;
the downlink service module is used for receiving verification information fed back by a user and a short message number corresponding to the verification information;
a resident program module for:
judging whether a short message sending request is received or not;
judging whether a short message port corresponding to the short message sending request exists in a short message port configuration table of a system under the condition that the short message sending request is received;
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;
releasing the resident process and reconfiguring a new resident process under the condition that the short message port is judged to be configured with the resident process;
the short message sending request is sent to the uplink service module;
the downlink service module is further configured to:
under the condition that the verification message fed back by the user is received, a feedback signal for indicating that the short message is successfully sent is sent to the resident program module;
the resident program module is further configured to close a resident process corresponding to the feedback signal when the feedback signal is received.
5. The short message sending system of claim 4, wherein the resident program module is further configured to:
and under the condition that the short message port configuration table does not have the short message port corresponding to the short message sending request, 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.
6. The short message sending system of claim 4, wherein the resident program module is further configured to:
and under the condition that the resident process is not configured on 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.
7. The short message sending system of claim 4, wherein the short message 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 information 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.
8. A storage medium storing instructions for reading by a machine to cause the machine to perform the short message sending method of any one of claims 1 to 3.
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 CN111124661A (en) 2020-05-08
CN111124661B true 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 (9)

* 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
CN109582447A (en) * 2018-10-15 2019-04-05 中盈优创资讯科技有限公司 Computational resource allocation method, task processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3435615B1 (en) * 2016-03-28 2021-04-14 Huawei Technologies Co., Ltd. Network service implementation method, service controller, and communication system

Patent Citations (9)

* 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
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.《ASE '18: Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering》.2018,29-40. *
徐乐 ; 赵荣辉 ; .基于WEB服务的短信发送平台设计实现.数字技术与应用.2016,(第09期),203-204. *

Also Published As

Publication number Publication date
CN111124661A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN103068070B (en) A kind of machinery of consultation of protocol version, mobile terminal, base station and communication system
CN110536282B (en) Event notification method and device
CN101925133A (en) Be used to improve the method and apparatus of the performance of wireless communication system
US20080227445A1 (en) Paging scheme
MX2012000221A (en) Method, system and device for implementing machine-to-machine service.
CN110519825B (en) Routing strategy processing method, device, related equipment and storage medium
CN114915508B (en) Apparatus, method and computer program for network device
CN100488302C (en) Data recording system and method
CN104936282A (en) Method and device for registering converged communication service
CN106031287A (en) Random access method, terminal and base station
CN103874058A (en) Short message processing method and short message center
CN107666664B (en) Method, device, equipment and storage medium for machine-card binding
EP4324125A1 (en) Apparatus, method and computer program for managing a request for cognitive network functions and/or machine learning models
CN102111900A (en) Method and system for establishing radio resource control (RRC) connection and mobile terminal
CN112188475B (en) Method, USIM, computer device and medium for dynamically managing service control
CN111124661B (en) Method and system for sending short message based on active resource release of java thread pool
CN109874301B (en) Communication method, device and system
WO2021227844A1 (en) Method and device for determining and indicating access parameter, apparatus, and medium
CN113448744B (en) Application program selection method and device
CN112448932B (en) Message processing method and device
CN1499880B (en) Method for storing short message service in mobile communication terminal
CN115334456A (en) Method and device for group paging
WO2017186271A1 (en) Method and managing module for managing voice data generated by a call managing system
CN113630732A (en) Converged communication method, terminal, system and storage medium
US12127089B2 (en) Event notification method, apparatus and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant