CN111246406A - Short message sending method, system, storage medium and terminal equipment - Google Patents

Short message sending method, system, storage medium and terminal equipment Download PDF

Info

Publication number
CN111246406A
CN111246406A CN202010018613.3A CN202010018613A CN111246406A CN 111246406 A CN111246406 A CN 111246406A CN 202010018613 A CN202010018613 A CN 202010018613A CN 111246406 A CN111246406 A CN 111246406A
Authority
CN
China
Prior art keywords
short message
channel
target
sending
field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010018613.3A
Other languages
Chinese (zh)
Inventor
艾明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202010018613.3A priority Critical patent/CN111246406A/en
Publication of CN111246406A publication Critical patent/CN111246406A/en
Pending legal-status Critical Current

Links

Images

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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/18Information format or content conversion, e.g. adaptation by the network of the transmitted or received information for the purpose of wireless delivery to users or terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the technical field of computers, in particular to a short message sending method, a short message sending system, a storage medium and terminal equipment. Acquiring interface documents corresponding to each short message channel, and respectively configuring channel information corresponding to each short message channel according to each interface document, wherein the channel information comprises a request method corresponding to the short message channel and a corresponding relation between a channel field in the short message channel and a system source field; when a short message sending request of a user is received, determining a target short message channel from short message channels according to the short message sending request, and determining a target user and source field content corresponding to the short message sending request; converting the system source field into a target channel field corresponding to a target short message channel according to the corresponding relation, and determining the source field content corresponding to the system source field as the target field content corresponding to the target channel field; and acquiring a target request method corresponding to the target short message channel, and sending the short message to a target user by using the target request method and the target field content.

Description

Short message sending method, system, storage medium and terminal equipment
Technical Field
The invention relates to the technical field of computers, in particular to a short message sending method, a short message sending system, a computer readable storage medium and terminal equipment.
Background
With the development and needs of enterprises, the enterprises often need to send short messages frequently, and if the short messages need to be sent through different external short message channels, the enterprises often need to be connected with different external short message channels so as to send a large amount of short messages through multiple short message channels. In the prior art, the interface protocol of each short message channel is generally analyzed, and then processing codes corresponding to each short message channel are respectively customized and developed to send short messages through each short message channel. Because enterprises need to be connected with a plurality of short message channels, and the interface protocols of the short message channels are different, the method respectively customizes and develops the processing codes corresponding to the short message channels according to the interface protocols, so that the method for respectively sending short messages according to the processing codes has the problems of poor universality and low sending efficiency.
Disclosure of Invention
The embodiment of the invention provides a short message sending method, a short message sending system, a computer readable storage medium and terminal equipment, which can carry out uniform short message sending processing on different short message channels so as to improve the universality and the efficiency of short message sending.
In a first aspect of the embodiments of the present invention, a short message sending method is provided, including:
acquiring interface documents corresponding to each short message channel, and respectively configuring channel information corresponding to each short message channel according to each interface document, wherein the channel information comprises a request method corresponding to the short message channel and a corresponding relation between a channel field in the short message channel and a system source field;
when a short message sending request of a user is received, determining a target short message channel from the short message channels according to the short message sending request, and determining a target user and source field content corresponding to the short message sending request, wherein the source field content is field content corresponding to a system source field;
converting the system source field into a target channel field corresponding to the target short message channel according to the corresponding relation, and determining the source field content corresponding to the system source field as the target field content corresponding to the target channel field;
and acquiring a target request method corresponding to the target short message channel, and sending the short message to the target user by using the target request method and the target field content.
In a second aspect of the embodiments of the present invention, a short message sending system is provided, including:
the channel configuration module is used for acquiring interface documents corresponding to each short message channel and respectively configuring channel information corresponding to each short message channel according to each interface document, wherein the channel information comprises a request method corresponding to the short message channel and a corresponding relation between a channel field in the short message channel and a system source field;
the system comprises a user determining module, a system source field and a system control module, wherein the user determining module is used for determining a target short message channel from the short message channels according to a short message sending request when the short message sending request of a user is received, and determining a target user and source field content corresponding to the short message sending request, wherein the source field content is the field content corresponding to the system source field;
a field conversion module, configured to convert the system source field into a target channel field corresponding to the target short message channel according to the correspondence, and determine a source field content corresponding to the system source field as a target field content corresponding to the target channel field;
and the short message sending module is used for acquiring a target request method corresponding to the target short message channel and sending the short message to the target user by utilizing the target request method and the target field content.
In a third aspect of the embodiments of the present invention, a computer-readable storage medium is provided, where computer-readable instructions are stored, and when executed by a processor, the computer-readable instructions implement the steps of the short message sending method according to the first aspect.
In a fourth aspect of the embodiments of the present invention, there is provided a terminal device, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, where the processor executes the computer-readable instructions to implement the following steps:
acquiring interface documents corresponding to each short message channel, and respectively configuring channel information corresponding to each short message channel according to each interface document, wherein the channel information comprises a request method corresponding to the short message channel and a corresponding relation between a channel field in the short message channel and a system source field;
when a short message sending request of a user is received, determining a target short message channel from the short message channels according to the short message sending request, and determining a target user and source field content corresponding to the short message sending request, wherein the source field content is field content corresponding to a system source field;
converting the system source field into a target channel field corresponding to the target short message channel according to the corresponding relation, and determining the source field content corresponding to the system source field as the target field content corresponding to the target channel field;
and acquiring a target request method corresponding to the target short message channel, and sending the short message to the target user by using the target request method and the target field content.
According to the technical scheme, the embodiment of the invention has the following advantages:
in the embodiment of the invention, the channel information corresponding to each short message channel can be configured in advance according to each interface document corresponding to each short message channel, and the configured channel information comprises a request method corresponding to the short message channel and a corresponding relation between a channel field in the short message channel and a system source field. When the short message is sent, a target short message channel can be determined from the short message channels according to the short message sending request, the system source field can be converted into a target channel field corresponding to the target short message channel according to the target short message channel, and the source field content in the system source field input by a user can be determined as the target field content of the target channel field, so that the short message can be sent through a target request method corresponding to the target short message channel and the target field content. In the implementation of the invention, the field variables required in the short message sending are set to be configurable, so that the unified short message sending processing can be carried out aiming at different short message channels by developing unified processing codes, the universality and the sending efficiency of the short message sending can be improved, the universality of the processing codes can be improved, the code development can be reduced, the development workload and the development period can be reduced, and the development efficiency can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart of an embodiment of a method for sending a short message according to an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating that a short message sending method determines a target short message channel in an application scenario according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating a process result of analyzing a short message sending method in an application scenario according to an embodiment of the present invention;
fig. 4 is a schematic flow chart illustrating that a short message sending method in an embodiment of the present invention obtains receipt data in an application scenario;
fig. 5 is a structural diagram of an embodiment of a short message sending system according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a short message sending method, a system, a computer readable storage medium and terminal equipment, which are used for carrying out unified short message sending processing on different short message channels so as to improve the universality and the efficiency of short message sending.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a short message sending method, where the short message sending method includes:
step S101, acquiring interface documents corresponding to each short message channel, and respectively configuring channel information corresponding to each short message channel according to each interface document, wherein the channel information comprises a request method corresponding to the short message channel and a corresponding relation between a channel field in the short message channel and a system source field;
the execution subject of the embodiment of the invention can be a short message sending system. Before sending a short message, configuring a short message channel in the short message sending system, specifically, determining one or more short message channels to be docked by the short message sending system, and then obtaining interface documents corresponding to the short message channels from providers of the short message channels, respectively, where a provider refers to a company or organization providing short message sending service, each interface document may include one or more channel fields corresponding to the short message channel, where a channel field refers to a field defined in each short message channel, for example, interface document a may include multiple field channels such as "mobile", "msg", and "ex" corresponding to short message channel a (HY technology); for example, the interface document B may include a plurality of channel fields, such as "phone no", "text", and "id", corresponding to the short message channel B (QL technology).
Further, in order to enable the short message sending system to perform uniform short message sending processing, one or more system source fields may be predefined in the short message sending system in advance, for example, a plurality of system source fields such as "phonnum", "content", and "service _ id" may be predefined in the short message sending system in advance, where the number of the predefined system source fields may be determined comprehensively according to channel fields in each of the short message channels that are docked. Here, after acquiring the channel field corresponding to each short message channel and the predefined system source field in the short message sending system, the corresponding relationship between each channel field and the system source field may be configured, for example, the system source field "phonnum" may be configured to correspond to the channel field "mobile" in the short message channel a and to the channel field "phonen no" in the short message channel B, the system source field "content" may be configured to correspond to the channel field "msg" in the short message channel a and to the channel field "text" in the short message channel B, and the system source field "service _ id" may be configured to correspond to the channel field "ex" in the short message channel a and to the channel field "id" in the short message channel B, so as to obtain the corresponding relationship table as described in table 1, and the corresponding relationship table is stored in the short message sending system.
TABLE 1
Figure BDA0002359875070000051
Figure BDA0002359875070000061
In addition, each interface document may further include other information related to the short message channel, for example, the information may include a request method, a short message sending address, a receipt status address, a user uplink address, and the like corresponding to the short message channel, and data configuration may be performed on each short message channel in the short message sending system according to the information, so as to obtain a corresponding data configuration table, which is stored in the short message sending system, and each channel information may include a corresponding relationship table corresponding to each short message channel and information in the data configuration table. For example, in a specific application scenario, the data configuration table shown in table 2 may be configured according to other information in each interface document, and the data configuration table is stored in the short message sending system. The request method refers to a calling mode of an interface in a short message channel, and can be a Get calling mode or a Post calling mode; the short message sending address refers to an address adopted by an interface in a short message channel for sending short messages; the receipt status address is an address adopted by the short message sending system for returning a sending status to the short message sending system after the interface in the short message channel finishes sending the short message, and the user uplink address is an address adopted by the interface for returning a reply to the short message sender after the user receiving the short message replies the short message.
TABLE 2
Figure BDA0002359875070000062
Figure BDA0002359875070000071
In addition, the embodiment of the invention can also configure the field type, the field encryption mode, the field length and the like of each interface in each short message channel according to the field information included in each interface document, obtain a field configuration table and store the field configuration table in the short message sending system.
Further, after the channel information corresponding to each short message channel is respectively configured according to each interface document, the method may include: and storing the channel information in a Redis server of the system.
In the embodiment of the invention, after the channel information corresponding to each short message channel is configured, the configured channel information can be uniformly stored in the Redis server of the short message sending system, so that the Redis server can provide high-efficiency query performance for subsequent short message sending processing.
Step S102, when a short message sending request of a user is received, determining a target short message channel from the short message channels according to the short message sending request, and determining a target user and source field content corresponding to the short message sending request, wherein the source field content is field content corresponding to a system source field;
it can be understood that, when a user needs to send a short message, the user may send a short message sending request to the short message sending system, where the sent short message sending request may carry a source field content corresponding to a system source field, a target user receiving the short message, and a target short message channel selected by the user for sending the short message, where the target short message channel is one or more of a plurality of short message channels connected to the short message sending system, and the source field content may be a short message content that the user needs to send and is input by the user according to a requirement of the system source field, such as a content corresponding to a system source field content, and so on, if the short message channel is set as a drop-down selection mode for the user to input the target short message channel. After receiving the short message sending request of the user, the short message sending system can determine a target short message channel selected by the user in the short message channels, a system source field and source field content corresponding to the system source field according to the short message sending request.
Further, in the embodiment of the present invention, the channel information further includes a channel status corresponding to the short message channel, where the channel status includes an available status and a disabled status.
Here, when the short message channels are configured in the short message sending system, the channel state corresponding to each short message channel can be configured according to the current actual situation of each short message channel, for example, when the short message channel a is currently available, the channel state corresponding to the short message channel a can be configured to be an available state; for example, when the short message channel B is currently suspended from being used, the channel state corresponding to the short message channel B can be configured to be a disabled state, and the like. It can be understood that after the configuration of the channel state corresponding to each short message channel is completed, the channel state can be subsequently modified according to actual needs, for example, in a specific application scenario, when the short message sending system detects that the short message channel a is deleted or is set to a suspended state, the short message sending system can automatically change the channel state corresponding to the short message channel a from an available state to a disabled state.
As shown in fig. 2, in the embodiment of the present invention, the determining a target short message channel from the short message channels according to the short message sending request includes:
step S201, determining an initial short message channel corresponding to the short message sending request from the short message channels according to the short message sending request, and acquiring an initial channel state corresponding to the initial short message channel;
step S202, when the initial channel state is a forbidden state, acquiring a candidate short message channel of which the channel state is an available state in the short message channels;
and step S203, determining a target short message channel from the candidate short message channels with the channel state being an available state according to a preset determination mode.
As for the above steps S201 to S203, it can be understood that when a target short message channel selected by the user is determined from short message channels according to a short message sending request of the user, an initial short message channel selected by the user can be determined according to the short message sending request, the initial short message channel is one or more of a plurality of short message channels connected to the short message sending system, and an initial channel state corresponding to the initial short message channel can be obtained according to channel information corresponding to the initial short message channel in the short message sending system, where the initial channel state may be an available state or a forbidden state.
When the initial channel state corresponding to the initial short message channel is a forbidden state, the short message sending system can consider that the initial short message channel can not send short messages, and can automatically switch the short message channels. Specifically, the short message sending system can firstly acquire channel states corresponding to the short message channels according to channel information corresponding to the short message channels, then can find out all the short message channels with available channel states from the short message channels, and determine the found short message channels as candidate short message channels, if the candidate short message channels comprise a plurality of short message channels, can determine one or more target short message channels from the candidate short message channels according to a preset determination mode, for example, one or more target short message channels can be randomly selected from the candidate short message channels according to a random determination method to replace an initial short message channel selected by the user, or one or more target short message channels with low load capacity can be selected from the candidate short message channels through a load balancing strategy to replace the initial short message channel selected by the user, the influence on the short message sending function of the user is avoided, and the short message sending success rate of the user is improved.
The number of channels of the target short message channel selected by the short message sending system corresponds to the number of channels of the initial short message channel selected by the user. Here, when the channel status corresponding to the initial short message channel is available, the initial short message channel can be directly determined as the target short message channel corresponding to the short message sending request, so as to send the short message corresponding to the short message sending request. In addition, when the channel number of the candidate short message channels is the same as the channel number of the initial short message channel selected by the user, the target short message channel is determined without a preset determination mode, and all the candidate short message channels are directly determined as the target short message channels corresponding to the short message sending request.
It should be noted that, when the initial short message channel selected by the user is a disabled short message channel, the embodiment of the present invention may also directly reject the short message sending request of the user without automatically switching the short message channel, and may send a prompt message to the user that the selected short message channel cannot be used, so that the user may automatically reselect the short message channel according to the prompt message to ensure that the user knows the specific short message sending condition.
Step S103, converting the system source field into a target channel field corresponding to the target short message channel according to the corresponding relation, and determining the source field content corresponding to the system source field as the target field content corresponding to the target channel field;
in the embodiment of the invention, after a target short message channel, a target user and target field contents corresponding to the short message sending request are determined, channel information corresponding to the target short message channel can be obtained, so that the corresponding relation between each target channel field and a system source field in the target short message channel can be found out from the channel information, the system source field can be converted into the target channel field corresponding to the target short message channel according to the found corresponding relation, and simultaneously, the source field contents corresponding to each system source field can be endowed to the corresponding target channel field, so that each target channel field corresponding to the target short message channel and the target field contents corresponding to each target channel field can be obtained.
And step S104, acquiring a target request method corresponding to the target short message channel, and sending the short message to the target user by using the target request method and the target field content.
It can be understood that after the channel information corresponding to the target short message channel is obtained, the request method corresponding to the target short message channel can be obtained from the channel information, so that after the target channel fields corresponding to the target short message channel and the target field contents corresponding to the target channel fields are obtained, the request method and the corresponding target field contents can be called to send the short message to the determined target user, that is, the request method can be called to send the short message by using the corresponding target field contents as the input parameters of the request method.
Preferably, as shown in fig. 3, after sending the short message to the target user by using the target request method and the target field content, the method includes:
s301, acquiring a processing result returned by the target short message channel, and determining a data type corresponding to the processing result;
step S302, determining an analysis method corresponding to the processing result according to the data type;
step S303, analyzing the processing result into receipt data of a specified type by using the analysis method, and storing the receipt data in a preset database.
As for the above steps S301 to S303, it can be understood that when the short message is sent through each short message channel, each short message channel is often required to return a processing result after each short message is sent, and the short message sending system can analyze the processing result into each receipt data of the specified type, and store each receipt data in the preset database of the short message sending system, so as to facilitate subsequent checking and understanding of the short message sending condition of each short message channel. Because the types of the processing results returned by each short message channel are often different, the invention can implement the configuration of the analysis method according to the data type in advance to configure different analysis methods for the processing results of different data types, for example, the invention can configure the analysis method of cutting according to the separator (such as "|") and comma for the processing results of the character string type, namely, the processing results can be firstly cut into a character string array by the separator, and then the character string array can be cut by the comma to obtain the receipt data of the standardized data type set by the short message sending system and store the receipt data in the preset database of the short message sending system; if an analysis method for analyzing by using an org, dom4j, Document helper method in an open source toolkit dom4j can be configured for the processing result of the Xml data type, the processing result of the Xml data type can be converted into a Document tree structure, then a callbox node array in the Document tree structure can be extracted, elements in each callbox node array are traversed circularly, channel fields such as msg, ex, mobile and the like and specific field contents corresponding to the channel fields are extracted, finally, each channel field can be converted into a system source field corresponding to the short message sending system through the configured corresponding relation, the specific field contents corresponding to each channel field are endowed to the corresponding system source field, so that the processing result is analyzed into receipt data of the standardized data type set by the short message sending system and is stored in a preset database of the short message sending system; if the processing result of the json data type can be configured with an analysis method for analyzing by using an open-source json-format data analysis tool package fastjson, channel fields such as msg, ex and mobile and specific field contents corresponding to the channel fields can be read by the analysis tool package fastjson, and then each channel field can be converted into a corresponding system source field through the configured corresponding relation, and the specific field contents corresponding to each channel field are endowed to the corresponding system source field, so that the processing result is analyzed into receipt data of a standardized data type set by the short message sending system and is stored in a preset database of the short message sending system. Wherein the standardized data type is the specified type.
For example, in a specific application scenario, the processing result of the character string type returned by a certain short message channel is as follows: when the short message sending system is '0376421093101292,18930110668, DELIVRD |0376421093101292,18930110668, DELIVRD', the short message sending system can firstly cut the processing result according to the separator "|" to obtain a character string array '0376421093101292,18930110668, DELIVRD', and then cut the character string array through commas to obtain elements '0376421093101292', '18930110668' and 'DELIVRD' which are stored in a preset database of the short message sending system.
As another example, in another application scenario, the processing result of the Xml data type returned by a certain short message channel is as follows:
<?xml version="1.0"encoding="utf-8"?>
<returnsms>
<callbox>
<mobile>13918421942</mobile>
<ex>1212</ex>
<msg>Y</msg>
<receivetime>2019-04-10 22:12:11</receivetime>
</callbox>
......
</returnsms>
the SMS transmission system can firstly use org.dom.4j.documenthelper method in open source toolkit dom4j to convert the processing result of Xml data type into a documentary tree structure, then can extract the callbox node arrays in the documentary tree structure, and circularly traverse the elements in each callbox node array to extract the specific field content 13918421942 corresponding to the channel field mobile and mobile, the specific field content 1212 corresponding to the channel field ex and ex, and the specific field content Y corresponding to the channel field msg and msg, secondly can convert the channel field mobile into system source field phoneNum through the configured corresponding relationship, and endow the specific field content 13918421942 to the system source field phoneNum, at the same time convert the channel field ex into system source field servicejjd, and endow the specific field content to the system source field servicejjd, and the channel source field g into system source field servicejd, and endow to the system source content field provider, finally, the system source fields and the corresponding field contents can be stored in a preset database of the short message sending system.
Optionally, as shown in fig. 4, the parsing, by using the parsing method, the processing result into the receipt data of the specified type may include:
step S401, analyzing the processing result by using the analysis method, and acquiring analysis state information in the analysis process;
step S402, judging whether the analysis state information meets a preset condition;
step S403, if the analysis state information does not meet the preset condition, determining that the target short message channel is abnormal;
step S404, determining the abnormal type of the target short message channel according to the analysis state information, and sending early warning messages according to the early warning mode corresponding to the abnormal type;
step S405, if the analysis state information meets the preset condition, acquiring the receipt data of the specified type obtained by analysis.
As for the above steps S401 to S405, in the embodiment of the present invention, an early warning message may also be sent when the short message channel is abnormal, for example, the early warning message may be sent through an email or a short message. Specifically, the correspondence between the abnormality type and the warning message may be set in advance. When the processing result is analyzed by using the corresponding analysis method, analysis state information in the analysis process can be obtained, whether the target short message channel is abnormal or not can be judged according to whether the analysis state information meets a preset condition or not, namely when the analysis state information does not meet the preset condition, the target short message channel can be considered to be abnormal, at the moment, the short message sending system can obtain the abnormal type of the target short message channel according to the analysis state information, and can determine a corresponding early warning mode to send the early warning message according to the corresponding relation between the abnormal type and the early warning mode, and inform related responsible personnel of maintaining and modifying the channel information. Here, the exception type may include a field change, a field deletion, a field format change, and the like.
In addition, in the embodiment of the present invention, the short message sending system may further include a monitoring module for monitoring an anomaly, such as monitoring a network anomaly, an interface address change of a short message channel, a service response timeout of the short message channel, and the like, and determine a corresponding early warning mode to send an early warning message according to a monitored anomaly type of the anomaly.
In the embodiment of the invention, the channel information corresponding to each short message channel can be configured in advance according to each interface document corresponding to each short message channel, and the configured channel information comprises a request method corresponding to the short message channel and a corresponding relation between a channel field in the short message channel and a system source field. When the short message is sent, a target short message channel can be determined from the short message channels according to the short message sending request, the system source field can be converted into a target channel field corresponding to the target short message channel according to the target short message channel, and the source field content in the system source field input by a user can be determined as the target field content of the target channel field, so that the short message can be sent through a target request method corresponding to the target short message channel and the target field content. In the implementation of the invention, the field variables required in the short message sending are set to be configurable, so that the unified short message sending processing can be carried out aiming at different short message channels by developing unified processing codes, the universality and the sending efficiency of the short message sending can be improved, the universality of the processing codes can be improved, the code development can be reduced, the development workload and the development period can be reduced, and the development efficiency can be improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
The above mainly describes a method for sending a short message, and a system for sending a short message will be described in detail below.
As shown in fig. 5, an embodiment of the present invention provides a short message sending system, where the short message sending system includes:
a channel configuration module 501, configured to acquire interface documents corresponding to each short message channel, and configure channel information corresponding to each short message channel according to each interface document, where the channel information includes a request method corresponding to the short message channel and a correspondence between a channel field in the short message channel and a system source field;
a user determining module 502, configured to determine a target short message channel from the short message channels according to a short message sending request when receiving the short message sending request of a user, and determine a target user and source field content corresponding to the short message sending request, where the source field content is a field content corresponding to the system source field;
a field conversion module 503, configured to convert the system source field into a target channel field corresponding to the target short message channel according to the correspondence, and determine a source field content corresponding to the system source field as a target field content corresponding to the target channel field;
a short message sending module 504, configured to obtain a target request method corresponding to the target short message channel, and send a short message to the target user by using the target request method and the target field content.
Further, the channel information further comprises a channel state corresponding to the short message channel, wherein the channel state comprises an available state and a forbidden state;
the user determination module 502 includes:
a channel state acquisition unit, configured to determine an initial short message channel corresponding to the short message sending request from the short message channels according to the short message sending request, and acquire an initial channel state corresponding to the initial short message channel;
an available channel acquiring unit, configured to acquire, when the initial channel state is a disabled state, a candidate short message channel in which a channel state is an available state from among the short message channels;
and the short message channel switching unit is used for determining a target short message channel from the candidate short message channels with the channel states being available according to a preset determination mode.
Preferably, the short message channel switching unit is specifically configured to determine the target short message channel from candidate short message channels whose channel status is an available status through a load balancing policy.
Optionally, the short message sending system further includes:
the processing result acquisition module is used for acquiring the processing result returned by the target short message channel and determining the data type corresponding to the processing result;
the analysis method determining module is used for determining an analysis method corresponding to the processing result according to the data type;
and the receipt data storage module is used for analyzing the processing result into receipt data of a specified type by using the analysis method and storing the receipt data in a preset database.
Further, the receipt data saving module includes:
the analysis state acquisition unit is used for analyzing the processing result by using the analysis method and acquiring analysis state information in the analysis process;
the analysis state judgment unit is used for judging whether the analysis state information meets a preset condition or not;
a channel abnormity determining unit, configured to determine that the target short message channel is abnormal if the analysis state information does not meet the preset condition;
the early warning message sending unit is used for determining the abnormal type of the target short message channel according to the analysis state information and sending an early warning message according to an early warning mode corresponding to the abnormal type;
and the receipt data acquisition unit is used for acquiring the receipt data of the specified type obtained by analysis if the analysis state information meets the preset condition.
Preferably, each interface document comprises a short message sending address and a receipt status address corresponding to each short message channel, wherein the short message sending address is an address adopted by an interface in the short message channel for sending a short message, and the receipt status address is an address adopted by the interface in the short message channel for returning to a sending status after the interface in the short message channel finishes sending the short message;
correspondingly, the channel information also comprises a short message sending address and a receipt status address corresponding to the short message channel.
Optionally, the short message sending system further includes:
and the channel information storage module is used for storing each piece of channel information in a Redis server of the system.
Fig. 6 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 6, the terminal device 6 of this embodiment includes: a processor 60, a memory 61, and computer readable instructions 62, such as a text messaging program, stored in the memory 61 and executable on the processor 60. The processor 60 executes the computer readable instructions 62 to implement the steps in the above-mentioned embodiments of sending short messages, such as the steps S101 to S104 shown in fig. 1. Alternatively, the processor 60, when executing the computer readable instructions 62, implements the functions of the modules/units in the system embodiments, such as the functions of the modules 501 to 504 shown in fig. 5.
Illustratively, the computer readable instructions 62 may be partitioned into one or more modules/units that are stored in the memory 61 and executed by the processor 60 to implement the present invention. The one or more modules/units may be a series of computer-readable instruction segments capable of performing specific functions, which are used to describe the execution process of the computer-readable instructions 62 in the terminal device 6.
The terminal device 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 60, a memory 61. Those skilled in the art will appreciate that fig. 6 is merely an example of a terminal device 6 and does not constitute a limitation of terminal device 6 and may include more or fewer components than shown, or some components may be combined, or different components, for example, the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 60 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used for storing the computer readable instructions and other programs and data required by the terminal device. The memory 61 may also be used to temporarily store data that has been output or is to be output.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. 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.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A short message sending method is characterized by comprising the following steps:
acquiring interface documents corresponding to each short message channel, and respectively configuring channel information corresponding to each short message channel according to each interface document, wherein the channel information comprises a request method corresponding to the short message channel and a corresponding relation between a channel field in the short message channel and a system source field;
when a short message sending request of a user is received, determining a target short message channel from the short message channels according to the short message sending request, and determining a target user and source field content corresponding to the short message sending request, wherein the source field content is field content corresponding to a system source field;
converting the system source field into a target channel field corresponding to the target short message channel according to the corresponding relation, and determining the source field content corresponding to the system source field as the target field content corresponding to the target channel field;
and acquiring a target request method corresponding to the target short message channel, and sending the short message to the target user by using the target request method and the target field content.
2. The method for sending short message service of claim 1, wherein the channel information further includes a channel status corresponding to the short message channel, wherein the channel status includes an available status and a disabled status;
the determining a target short message channel from the short message channels according to the short message sending request comprises the following steps:
determining an initial short message channel corresponding to the short message sending request from the short message channels according to the short message sending request, and acquiring an initial channel state corresponding to the initial short message channel;
when the initial channel state is a forbidden state, acquiring a candidate short message channel of which the channel state is an available state in the short message channels;
and determining a target short message channel from the candidate short message channels with the channel states being available according to a preset determination mode.
3. The method for sending short messages according to claim 2, wherein the determining a target short message channel from the candidate short message channels whose channel status is available according to a preset determination mode includes:
and determining the target short message channel from the candidate short message channels with the channel states being available states through a load balancing strategy.
4. The method for sending short messages according to claim 1, after sending short messages to the target users by using the target request method and the target field content, comprising:
acquiring a processing result returned by the target short message channel, and determining a data type corresponding to the processing result;
determining an analysis method corresponding to the processing result according to the data type;
and analyzing the processing result into receipt data of a specified type by using the analysis method, and storing the receipt data in a preset database.
5. The short message sending method as claimed in claim 4, wherein the parsing the processing result into the receipt data of the designated type by using the parsing method comprises:
analyzing the processing result by using the analysis method, and acquiring analysis state information in the analysis process;
judging whether the analysis state information meets a preset condition or not;
if the analysis state information does not meet the preset condition, determining that the target short message channel is abnormal;
determining the abnormal type of the target short message channel according to the analysis state information, and sending early warning messages according to the early warning mode corresponding to the abnormal type;
and if the analysis state information meets the preset condition, acquiring the receipt data of the specified type obtained by analysis.
6. The short message sending method according to claim 1, wherein each interface document includes a short message sending address and a receipt status address corresponding to each short message channel, wherein the short message sending address is an address used by an interface in the short message channel to send a short message, and the receipt status address is an address used by the interface in the short message channel to return to a sending status after the interface in the short message channel completes sending the short message;
correspondingly, the channel information also comprises a short message sending address and a receipt status address corresponding to the short message channel.
7. The short message sending method according to any one of claims 1 to 6, wherein after channel information corresponding to each short message channel is respectively configured according to each interface document, the method includes:
and storing the channel information in a Redis server of the system.
8. A short message sending system is characterized by comprising:
the channel configuration module is used for acquiring interface documents corresponding to each short message channel and respectively configuring channel information corresponding to each short message channel according to each interface document, wherein the channel information comprises a request method corresponding to the short message channel and a corresponding relation between a channel field in the short message channel and a system source field;
the system comprises a user determining module, a system source field and a system control module, wherein the user determining module is used for determining a target short message channel from the short message channels according to a short message sending request when the short message sending request of a user is received, and determining a target user and source field content corresponding to the short message sending request, wherein the source field content is the field content corresponding to the system source field;
a field conversion module, configured to convert the system source field into a target channel field corresponding to the target short message channel according to the correspondence, and determine a source field content corresponding to the system source field as a target field content corresponding to the target channel field;
and the short message sending module is used for acquiring a target request method corresponding to the target short message channel and sending the short message to the target user by utilizing the target request method and the target field content.
9. A computer readable storage medium storing computer readable instructions, wherein the computer readable instructions, when executed by a processor, implement the steps of the method for sending short messages according to any one of claims 1 to 7.
10. A terminal device comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, wherein the processor when executing the computer readable instructions performs the steps of:
acquiring interface documents corresponding to each short message channel, and respectively configuring channel information corresponding to each short message channel according to each interface document, wherein the channel information comprises a request method corresponding to the short message channel and a corresponding relation between a channel field in the short message channel and a system source field;
when a short message sending request of a user is received, determining a target short message channel from the short message channels according to the short message sending request, and determining a target user and source field content corresponding to the short message sending request, wherein the source field content is field content corresponding to a system source field;
converting the system source field into a target channel field corresponding to the target short message channel according to the corresponding relation, and determining the source field content corresponding to the system source field as the target field content corresponding to the target channel field;
and acquiring a target request method corresponding to the target short message channel, and sending the short message to the target user by using the target request method and the target field content.
CN202010018613.3A 2020-01-08 2020-01-08 Short message sending method, system, storage medium and terminal equipment Pending CN111246406A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010018613.3A CN111246406A (en) 2020-01-08 2020-01-08 Short message sending method, system, storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010018613.3A CN111246406A (en) 2020-01-08 2020-01-08 Short message sending method, system, storage medium and terminal equipment

Publications (1)

Publication Number Publication Date
CN111246406A true CN111246406A (en) 2020-06-05

Family

ID=70876068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010018613.3A Pending CN111246406A (en) 2020-01-08 2020-01-08 Short message sending method, system, storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN111246406A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901298A (en) * 2020-06-22 2020-11-06 北京天融信网络安全技术有限公司 Method and device for determining cloud short message platform during SSLVPN authentication and electronic equipment
CN112615961A (en) * 2020-12-25 2021-04-06 珠海格力电器股份有限公司 Method and device for processing short message sending request
CN112672295A (en) * 2020-12-26 2021-04-16 中国农业银行股份有限公司 Message sending method and device, electronic equipment and storage medium
CN113259862A (en) * 2021-06-23 2021-08-13 易纳购科技(北京)有限公司 Short message centralized forwarding system and method
CN114979308A (en) * 2022-05-11 2022-08-30 北京沃东天骏信息技术有限公司 Message processing method and device
CN117202117A (en) * 2023-09-18 2023-12-08 广州市玄武无线科技股份有限公司 System and method for fusing and degrading short message channel

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109168135A (en) * 2018-11-09 2019-01-08 上海银赛计算机科技有限公司 Selection method, device, SMS platform and the storage medium of short message sendaisle
CN110519711A (en) * 2019-06-26 2019-11-29 中国移动通信集团江西有限公司 A kind of information push method, device, storage medium and server
CN110601952A (en) * 2018-06-12 2019-12-20 北京京东尚科信息技术有限公司 Multi-channel message notification sending method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110601952A (en) * 2018-06-12 2019-12-20 北京京东尚科信息技术有限公司 Multi-channel message notification sending method and device
CN109168135A (en) * 2018-11-09 2019-01-08 上海银赛计算机科技有限公司 Selection method, device, SMS platform and the storage medium of short message sendaisle
CN110519711A (en) * 2019-06-26 2019-11-29 中国移动通信集团江西有限公司 A kind of information push method, device, storage medium and server

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901298A (en) * 2020-06-22 2020-11-06 北京天融信网络安全技术有限公司 Method and device for determining cloud short message platform during SSLVPN authentication and electronic equipment
CN112615961A (en) * 2020-12-25 2021-04-06 珠海格力电器股份有限公司 Method and device for processing short message sending request
CN112672295A (en) * 2020-12-26 2021-04-16 中国农业银行股份有限公司 Message sending method and device, electronic equipment and storage medium
CN112672295B (en) * 2020-12-26 2021-10-26 中国农业银行股份有限公司 Message sending method and device, electronic equipment and storage medium
CN113259862A (en) * 2021-06-23 2021-08-13 易纳购科技(北京)有限公司 Short message centralized forwarding system and method
CN113259862B (en) * 2021-06-23 2021-11-09 易纳购科技(北京)有限公司 Short message centralized forwarding system and method
CN114979308A (en) * 2022-05-11 2022-08-30 北京沃东天骏信息技术有限公司 Message processing method and device
CN114979308B (en) * 2022-05-11 2024-04-16 北京沃东天骏信息技术有限公司 Message processing method and device
CN117202117A (en) * 2023-09-18 2023-12-08 广州市玄武无线科技股份有限公司 System and method for fusing and degrading short message channel
CN117202117B (en) * 2023-09-18 2024-04-16 广州市玄武无线科技股份有限公司 System and method for fusing and degrading short message channel

Similar Documents

Publication Publication Date Title
CN111246406A (en) Short message sending method, system, storage medium and terminal equipment
EP3396905B1 (en) Method and device for securely sending a message
US10187272B2 (en) Interface management service entity, function service entity, and element management method
US20200351190A1 (en) Virtual Probes
CN112311600A (en) Strategy suggestion generation method and device based on network data analysis
US20200358828A1 (en) Securely managing network connections
US10123190B2 (en) System and method for testing a CoAP server
CN111130828B (en) Intelligent network distribution method and device and terminal equipment
CN110716912B (en) SQL performance detection method and server
CA3065729A1 (en) Business rules processing framework
CN103997509A (en) Service oriented architecture-based service processing method and apparatus
CN110930110B (en) Distributed flow monitoring method and device, storage medium and electronic equipment
CN117130979A (en) Service resource migration method and device and electronic equipment
EP4044033A1 (en) Method and apparatus for acquiring data
CN107707492B (en) Method and device for reporting and issuing message
CN113438093A (en) Alarm method, device and equipment
CN110569673A (en) Data file processing method, device, equipment and storage medium
CN108288135B (en) System compatibility method and device, computer readable storage medium and electronic equipment
CN110928572A (en) Interface calling and service system separation method, system and computer equipment
CN112448932A (en) Message processing method and device
CN118316887B (en) Flow surge elimination method and device for mass-sending information
EP4075731A1 (en) Data management method and apparatus, and device, computer-readable storage medium, and system
CN117528431B (en) Data monitoring method and device of communication platform and terminal equipment
US20230289354A1 (en) Endpoint scan and profile generation
CN114500641B (en) Message communication method, device and readable 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
AD01 Patent right deemed abandoned
AD01 Patent right deemed abandoned

Effective date of abandoning: 20240105