CN115065946B - Short message sending method, device, equipment and medium - Google Patents

Short message sending method, device, equipment and medium Download PDF

Info

Publication number
CN115065946B
CN115065946B CN202210753574.0A CN202210753574A CN115065946B CN 115065946 B CN115065946 B CN 115065946B CN 202210753574 A CN202210753574 A CN 202210753574A CN 115065946 B CN115065946 B CN 115065946B
Authority
CN
China
Prior art keywords
short message
sending
called number
preset
message
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
CN202210753574.0A
Other languages
Chinese (zh)
Other versions
CN115065946A (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.)
Beijing Feitian Jingwei Technology Co ltd
Original Assignee
Beijing Feitian Jingwei 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 Beijing Feitian Jingwei Technology Co ltd filed Critical Beijing Feitian Jingwei Technology Co ltd
Priority to CN202210753574.0A priority Critical patent/CN115065946B/en
Publication of CN115065946A publication Critical patent/CN115065946A/en
Application granted granted Critical
Publication of CN115065946B publication Critical patent/CN115065946B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0215Traffic management, e.g. flow control or congestion control based on user or device properties, e.g. MTC-capable devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • H04W8/24Transfer of terminal data

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application relates to a short message sending method, a device, equipment and a medium, wherein the method comprises the following steps: acquiring signaling data, and acquiring a calling number, a called number and an on-hook state according to the signaling data; judging whether the called number is in a preset number set or not; if the number is in the preset number set, determining a short message sending strategy according to the called number and the on-hook state, wherein the short message sending strategy is used for determining whether to send a short message to the calling number; if the short message sending strategy is to send a short message to the calling number, determining a default on-hook short message in a preset short message set according to the called number; determining a target message channel and a sending sequence according to the first priority of the calling number, the second priority of the called number and channel information of a plurality of message channels of the short message gateway; and sending the calling number, the called number, the target message channel, the sending sequence and the default on-hook short message to a short message gateway, wherein the short message gateway is used for sending the default on-hook short message to the calling number by using the target message channel according to the called number.

Description

Short message sending method, device, equipment and medium
Technical Field
The present application relates to the field of short message technology, and in particular, to a method, an apparatus, a device, and a medium for sending a short message.
Background
At present, in order to attract new customers and retain old customers for continuous consumption, a merchant often sends a short message to a customer to perform detailed text introduction on a product or service after the customer calls to consult the product or service, and the introduction of related products in the short message can improve the interest of the customer on the product and improve the potential consumption capability of the customer.
However, in the related art, after the call is over-hung, the merchant sends a short message to the customer, but because the number of called numbers with the on-hook short message service is more and more, and the channel is randomly selected when the short message channel is used for sending the on-hook short message, the situation that the short message is not sent in time or the short message is not sent to the calling user easily occurs.
Therefore, how to provide a solution to the above technical problem is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a short message sending method, a short message sending device, short message sending equipment and a short message sending medium, which are used for solving at least one technical problem.
The above object of the present invention is achieved by the following technical solutions:
in a first aspect, the present application provides a short message sending method, which adopts the following technical scheme:
a short message sending method comprises the following steps:
acquiring signaling data, and acquiring a calling number, a called number and an on-hook state according to the signaling data;
judging whether the called number is in a preset number set or not, wherein the preset number set comprises the called number which opens a short message service;
if the number is in the preset number set, determining a short message sending strategy according to the called number and the on-hook state, wherein the short message sending strategy is used for determining whether to send a short message to the calling number or not;
if the short message sending strategy is to send a short message to the calling number, determining a default on-hook short message in a preset short message set according to the called number, wherein the preset short message set comprises preset short messages corresponding to all preset called numbers in the preset number set;
determining a target message channel and a sending sequence according to the first priority of the calling number, the second priority of the called number and channel information of a plurality of message channels of the short message gateway; the sending sequence is the sending sequence of the default on-hook short message in the target message channel;
and sending the calling number, the called number, the target message channel, the sending sequence and the default on-hook short message to a short message gateway, wherein the short message gateway is used for sending the default on-hook short message to the calling number by using the target message channel according to the called number.
By adopting the technical scheme, the method obtains the calling number, the called number and the on-hook state by acquiring the signaling data, judges whether the called number opens the short message service according to the called number, determines whether to send the short message to the calling number according to the called number and the on-hook state if the called number opens the short message service, can combine the called number and the on-hook state to determine whether to send the short message to the calling number, can set a short message sending strategy according to the actual situation, effectively avoids a large number of invalid short messages from being sent by a merchant, determines a default on-hook short message from a preset number set according to the called number if determining to send the short message to the calling number, can determine a target message channel and a sending sequence for sending the default on-hook short message according to the sending sequence based on channel information of a plurality of message channels of a first priority gateway of the calling number and a second priority gateway of the called number, can select channels and send the default on-hook short message to the calling number according to the sending sequence, and reduces the condition that random channel selection causes short message sending failure or non-on-time short message sending failure in related technologies.
The present application may be further configured in a preferred example to: the channel information of each message channel includes: the channel quality, the current channel working state and a plurality of short message information to be sent of the message channel;
the determining a target message channel and a sending sequence according to the first priority of the calling number, the second priority of the called number and channel information of a plurality of message channels of the short message gateway comprises the following steps:
determining a target message channel according to the channel quality of a plurality of message channels of the short message gateway, the working state of the current channel and the second priority of the called number;
and determining the sending sequence of short messages to be sent of the default on-hook short messages of the calling number according to the first priority of the calling number and the information of a plurality of short messages to be sent of the current target message channel.
By adopting the technical scheme, a target message channel can be determined by utilizing the channel quality and the current channel working state of a plurality of message channels of the message gateway and the second priority of the called number, the target message channel can be ensured to normally transmit the short message, and then the transmission sequence of the short message to be transmitted of the default on-hook short message of the calling number is determined according to the first priority of the calling number and a plurality of short message information to be transmitted of the current target message channel, so that the transmission sequence of the default on-hook short message can be determined according to the first priority of the calling number, and all the short message information to be transmitted of the target message channel can be ensured to be transmitted according to the importance degree.
The present application may be further configured in a preferred example to: the obtaining signaling data and analyzing the signaling data to obtain a calling number, a called number and an on-hook state includes:
acquiring signaling data by using a socket communication principle, and acquiring a calling number, a called number and an on-hook state according to the signaling data;
putting the calling number, the called number and the on-hook state into a data pool, and asynchronously writing the calling number, the called number and the on-hook state into a database;
and extracting the calling number, the called number and the on-hook state from the database.
By adopting the technical scheme, the signaling data is obtained by utilizing the socket, the signaling data is analyzed to obtain the calling number, the called number and the on-hook state, the obtained calling number, the called number and the on-hook state are firstly put into the data pool, and then the calling number, the called number and the on-hook state are put into the database in an asynchronous mode. The method can acquire the signaling data quickly, and after the signaling data is analyzed, the method can improve the speed of writing the data into the database while ensuring that the calling number, the called number and the on-hook state data are all written into the database.
The application may be further configured in a preferred example to: the asynchronous writing of the calling number, the called number and the on-hook state in the data pool into a database comprises the following steps:
determining the customer category of a calling number according to the historical frequency of calling the called number by the calling number;
and asynchronously writing the calling number, the called number and the on-hook state in the data pool into a position corresponding to the client category in a database.
By adopting the technical scheme, the customer category of the calling number is determined according to the historical frequency of calling the called number by the calling number, and the calling number, the called number and the on-hook state in the data pool are stored in a grouping manner according to the customer category, so that a merchant can conveniently know the attention of customers with different calling numbers to the merchant, and old customers and new customers can be easily classified.
The application may be further configured in a preferred example to: the determining of the short message sending strategy according to the called number and the on-hook state comprises the following steps:
judging whether the condition of sending the short message is met or not according to the called number and the on-hook state;
if the condition of sending the short message is met, determining a short message sending function state according to the called number, wherein the short message sending function state comprises normal sending and pause sending;
if the short message sending function state is normal sending, determining a short message sending strategy according to the number information of the called number, wherein the number information of the called number comprises any one of the following items: the number of the remaining short messages, the sending time and the last sent short message information.
By adopting the technical scheme, whether the condition for sending the short message is met or not is judged according to the called number and the on-hook state, if the condition for sending the short message is met, the short message sending function state is determined according to the called number, and if the short message sending function state is normal sending, the short message sending strategy is determined according to the number information of the called number. Whether the short message can be sent to the calling number or not is subjected to a series of screening according to the called number and the on-hook state, so that a short message sending system is more complete.
The application may be further configured in a preferred example to:
the method for setting the preset short message corresponding to the preset called number comprises the following steps:
generating a preset short message according to the information of the calling number and a short message template corresponding to the preset called number;
and/or acquiring short message content corresponding to a preset called number input through a set account;
auditing the short message content to obtain a first auditing result;
performing permission verification on the set account to obtain a second verification result;
and when the first checking result indicates that the short message content does not comprise the non-compliance keyword, and the second checking result indicates that the set account number has the short message content setting authority of the preset called number, generating a preset short message according to the short message content.
By adopting the technical scheme, the preset short message can be set in various modes, and in an realizable mode, the preset short message can be formed through a preset short message template and the information of the calling number; in another implementation mode, the short message content input by the set account can be acquired, the short message content and the set account are checked, and the preset short message is generated according to the short message content after the check is passed. The preset short message is set in various modes, so that the requirement that the general short message can be generated quickly is met, and the requirement that the specific short message can be edited specially is met.
The application may be further configured in a preferred example to: the short message sending method further comprises the following steps:
judging whether the current date is a preset date or not;
if yes, determining a short message corresponding to the current date aiming at any first target called number, wherein the service of sending the short message on the preset date is opened by any first target called number;
determining a first target customer category from a plurality of customer categories of a first target called number, and sending all calling numbers, the first target called number and short messages corresponding to the current date in the first target customer category to a short message gateway;
and/or the presence of a gas in the atmosphere,
acquiring a preferential short message of a second target called number;
and determining a second target customer category from the plurality of customer categories of the second target called number, and sending all calling numbers, the second target called number and the preferential short message in the second target customer category to the short message gateway.
By adopting the technical scheme, the merchant can select the customer category to send the festival care short message and the discount short message, so that the customer can feel warm in the festival and keep the customer, meanwhile, the merchant can select the customer category to carry out the discount short message according to the actual condition of the customer, the old customer can be kept, the new customer can be expanded, and the customer consumption can be better promoted.
In a second aspect, the present application provides a short message sending apparatus, which adopts the following technical scheme:
a short message sending device comprises a short message sending module,
the system comprises an acquisition module, a transmission module and a processing module, wherein the acquisition module is used for acquiring signaling data and acquiring a calling number, a called number and an on-hook state according to the signaling data;
the judging module is used for judging whether the called number is in a preset number set or not, wherein the preset number set comprises the called number which opens the short message service;
the first determining module is used for determining a short message sending strategy according to the called number and the on-hook state when the number is in the preset number set, wherein the short message sending strategy is used for determining whether to send a short message to the calling number or not;
a second determining module, configured to determine a default on-hook short message in a preset short message set according to the called number when the short message sending policy is to send a short message to the calling number, where the preset short message set includes preset short messages corresponding to all preset called numbers in the preset number set;
the third determining module is used for determining a target message channel and a sending sequence according to the first priority of the calling number, the second priority of the called number and channel information of a plurality of message channels of the short message gateway; the sending sequence is the sending sequence of the default on-hook short message in the target message channel;
and the sending module is used for sending the calling number, the called number, the target message channel, the sending sequence and the default on-hook short message to a short message gateway, and the short message gateway is used for sending the default on-hook short message to the calling number by using the target message channel according to the called number.
In a third aspect, the present application provides an electronic device, which adopts the following technical solutions:
at least one processor;
a memory;
at least one application, wherein the at least one application is stored in the memory and configured to be executed by the at least one processor, the at least one application configured to: the above-described method is performed.
In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solutions:
a computer-readable storage medium, on which a computer program is stored which, when executed in a computer, causes the computer to carry out the method described above.
In summary, the present application includes at least one of the following beneficial technical effects:
1. the method comprises the steps of obtaining signaling data, obtaining a calling number, a called number and an on-hook state, judging whether a short message service is opened to the called number or not according to the called number, determining whether a short message is sent to the calling number or not according to the called number and the on-hook state if the short message service is opened to the called number, determining whether the short message is sent to the calling number or not by combining the called number and the on-hook state, setting a short message sending strategy according to actual conditions by a merchant, effectively avoiding the merchant from sending a large number of invalid short messages, determining a default on-hook short message from a preset number set according to the called number if the short message is sent to the calling number, then determining a target message channel for sending the default on-hook short message and a sending sequence based on channel information of a plurality of message channels of a first priority gateway of the calling number and a second priority gateway of the called number, selecting channels and sending the default on-hook short message to the calling number according to the short message sending sequence, and reducing the condition that short message sending fails or is not timely caused by selecting channels in related technologies.
Drawings
Fig. 1 is a schematic diagram of a system architecture for sending a short message according to an embodiment of the present application.
Fig. 2 is a flowchart illustrating a method for sending a short message according to an embodiment of the present disclosure.
Fig. 3 is a schematic structural diagram of a short message sending apparatus according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The present application is described in further detail below with reference to fig. 1 to 4.
The present embodiment is only for explaining the present application, and it is not limited to the present application, and those skilled in the art can make modifications of the present embodiment without inventive contribution as needed after reading the present specification, but all of them are protected by patent laws within the scope of the present application.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship, unless otherwise specified.
The on-hook short message means that when a client dials a certain fixed telephone of an enterprise by a mobile phone, after the call is finished, the called number is used for sending a short message preset by the enterprise to a calling user, and the content of the short message is preset by the enterprise and generally refers to enterprise introduction, product introduction, promotion information and the like.
However, the inventor finds that, in the related art, after the call is finished and the short message is hung, the merchant sends a short message to the customer, but because the number of called numbers with the hanging short message service is more and more, and a channel is randomly selected when the short message channel is used for sending the hanging short message, the situation that the short message is not sent in time or the short message is not sent to the calling user easily occurs. Therefore, it is an urgent technical problem for those skilled in the art to provide a method for sending short messages that reduces the short message sending time or the short message not being sent to the calling party.
In order to solve the above problems, an embodiment of the present application provides a short message sending method, where signaling data is obtained to obtain a calling number, a called number, and an on-hook state, and whether a short message service is enabled for the called number is judged according to the called number, if the called number enables the short message service, whether a short message is sent to the calling number is determined according to the called number and the on-hook state, whether a short message is sent to the calling number can be determined by combining the called number and the on-hook state, a short message sending policy can be set by a merchant according to actual conditions, a large number of invalid short messages are effectively avoided being sent by the merchant, if a short message is determined to be sent to the calling number, a default on-hook short message is determined from a preset number set according to the called number, then a target message channel and a sending sequence for sending the default on-hook short message can be determined based on channel information of a plurality of message channels of a first priority of the calling number and a second priority of the called number, and a channel selection failure or a random short message sending failure caused by a selection channel selection in a related technology is reduced.
For convenience of understanding, a system architecture applicable to a scheme corresponding to a short message sending method of the present application is introduced first, please refer to fig. 1, where fig. 1 is a schematic diagram of a system architecture applicable to a short message sending method provided in an embodiment of the present application, and includes: a ptsn (Public Switched Telephone Network) system, an electronic device and a short message gateway.
After the calling number calls the fixed number or the mobile phone number, the PSTN system generates signaling data and sends the signaling data to the electronic equipment;
the electronic equipment acquires the signaling data and obtains a calling number, a called number and an on-hook state according to the signaling data; judging whether the called number is in a preset number set or not, wherein the preset number set comprises the called number which opens the short message service; if the number is in the preset number set, determining a short message sending strategy according to the called number and the on-hook state, wherein the short message sending strategy is used for determining whether to send a short message to the calling number; if the short message sending strategy is to send a short message to a calling number, determining a default on-hook short message in a preset short message set according to a called number, wherein the preset short message set comprises preset short messages corresponding to all preset called numbers in the preset number set; determining a target message channel and a sending sequence according to the first priority of the calling number, the second priority of the called number and channel information of a plurality of message channels of the short message gateway; the sending sequence is the sending sequence of the default on-hook short message in the target message channel; sending the calling number, the called number, the target message channel, the sending sequence and the default on-hook short message to a short message gateway;
and the short message gateway sends the default on-hook short message to the calling number by using the target message channel according to the called number.
Specifically, please refer to fig. 2, fig. 2 is a schematic flow chart of a short message sending method provided in an embodiment of the present application, which is executed by an electronic device, where the electronic device may be a server or a terminal device, where the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud computing services. The terminal device may be a smart phone, a tablet computer, a notebook computer, a desktop computer, and the like, but is not limited thereto, the terminal device and the server may be directly or indirectly connected through a wired or wireless communication manner, and as shown in fig. 2, the method includes step S101, step S102, step S103, step S104, step S105, and step S106, where:
step S101: acquiring signaling data, and acquiring a calling number, a called number and an on-hook state according to the signaling data;
when a calling user calls a called user (fixed number/mobile phone number), and the calling is completed, signaling data sent by a PSTN system is obtained, the PSTN carries the calling number, the called number and an on-hook state, and certainly can also carry position information of the calling number, and then the signaling data is analyzed to obtain the calling number, the called number and the on-hook state.
Step S102: judging whether the called number is in a preset number set or not, wherein the preset number set comprises the called number which opens the short message service;
the electronic equipment is pre-stored with a preset number set formed by all called numbers for opening the automatic on-hook short message sending service, and the preset number set can be added, deleted and modified according to actual conditions.
In one implementation, the determining whether the called number is in the preset number set may include: and comparing the called numbers with all the called numbers in a preset number set one by one, wherein the storage sequence of all the called numbers in the preset number set is a random storage sequence.
In another implementation manner, the determining whether the called number is in the preset number set may include: the called numbers are matched with the called numbers in the preset number set, wherein the called numbers in the preset number set are stored according to the character digit classification form, for example, 0311, 010, 022 or 18, 15, 17, 13, 19 and the like are used as the first character digit category, and then the rest characters are used as one digit category according to any number according to the size, so that the comparison times can be greatly reduced, and the comparison efficiency is improved.
Of course, the comparison may be performed in other manners, and the method for determining whether the called number is in the preset number set is not limited in this embodiment.
If not, no operation is executed.
Step S103: if the number is in the preset number set, determining a short message sending strategy according to the called number and the on-hook state, wherein the short message sending strategy is used for determining whether to send a short message to the calling number;
in the embodiment of the application, if the called number is in the preset number set, it indicates that the called number opens the short message service, and meets the first condition of sending a short message to the calling number, and then determines whether to send the short message to the calling number by combining the obtained on-hook state of the calling number and the called number. The on-hook state can be divided into on-hook after connection and off-hook after non-connection, wherein the non-connection includes no signal, on-hook and no answer, the short message sending strategy can be set according to the needs of merchants, the short message sending strategy of each merchant may be different or the same, and the embodiment of the application is not limited any more. Specifically, in an implementation manner, the short message can be hung up after connection, and the short message is not hung up after disconnection; in another implementation, it can be set that the short message is sent both on-hook after connection and off-hook after disconnection.
Step S104: if the short message sending strategy is to send a short message to a calling number, determining a default on-hook short message in a preset short message set according to a called number, wherein the preset short message set comprises preset short messages corresponding to all preset called numbers in the preset number set;
and if the short message is determined to be sent to the calling number, determining a default on-hook short message from a preset number set according to the called number, and sending the default on-hook short message to the calling number through a short message gateway. The called number and the on-hook state are combined to determine whether to send the short message to the calling number, and a merchant can set a short message sending strategy according to actual conditions, so that the merchant is effectively prevented from sending a large amount of invalid short messages. In the embodiment of the application, whether the short message is sent to the calling number or not can be known according to the short message sending strategy, if the short message is determined to be sent to the calling number, all the preset short messages corresponding to the called number are selected from the preset short messages set according to the called number, wherein the number of the preset short messages corresponding to the called number can be one or more, the preset short messages can be set according to actual conditions, and the embodiment of the application is not limited.
In an implementation manner, when the number of the on-hook messages corresponding to the called number is 1, determining the default on-hook message in the preset message set according to the called number may include: and selecting default on-hook short messages from preset short messages corresponding to the called number, and sending the default on-hook short messages after the calling number and the called number hang up.
When a plurality of on-hook short messages corresponding to the called number and the service information of consultation can be obtained according to the signaling data, determining the default on-hook short message in the preset short message set according to the called number may include: and determining an on-hook short message set corresponding to the called number from the preset short message set, and then determining a default on-hook short message corresponding to the consulted service information from the on-hook short message set corresponding to the called number based on the consulted service information.
Step S105: determining a target message channel and a sending sequence according to the first priority of the calling number, the second priority of the called number and channel information of a plurality of message channels of the short message gateway; the sending sequence is the sending sequence of the default on-hook short message in the target message channel;
further, before the step S105 of sending the short message, the method may further include: acquiring channel information of a plurality of message channels of the short message gateway, wherein the channel information includes but is not limited to: the channel quality, the current channel working state and a plurality of short message information to be sent of the message channel. For the channel quality, in a possible case, the channel quality may be determined based on the delivery rate of the short message sent by the message channel within a set time period; in another possible case, the channel quality may be determined based on a delivery rate obtained after sending a set number of short messages of the message channel, and the higher the delivery rate is, the higher the channel quality is. Determining the working state of the message channel according to the number of short messages to be sent of the message channel and the short message sending speed of the message channel as the working state of the current channel; specifically, if the product of the number and the short message sending speed is greater than a preset threshold, it is determined that the working state of the channel is congested, otherwise, the working state is general, and the preset threshold can be set according to actual requirements.
The priority setting standard for the calling number and the priority setting standard for the called number can be set according to actual conditions. The step can determine the default channel for sending the on-hook short message and the sending sequence based on the priority of the calling number and the called number and the channel information of the message channel of the short message gateway, thereby reducing the condition that the short message sending fails easily caused by randomly selecting the channel for sending in the related technology.
Step S106: and sending the calling number, the called number, the target message channel, the sending sequence and the default on-hook short message to a short message gateway, wherein the short message gateway is used for sending the default on-hook short message to the calling number by using the target message channel according to the called number.
In the embodiment of the application, the short message gateway is mainly used for solving the problem of short message intercommunication between each network and each operator, and is a dynamic data exchange platform system provided for a user unit to receive and send short messages. The short message gateway can convert the information of the calling number, the called number and the default on-hook short message into a mobile phone short message, and the short message is sent in real time through the short message center.
It can be seen that, in the embodiment of the application, signaling data is obtained, a calling number, a called number, an on-hook state are obtained, whether a short message service is enabled for the called number is judged according to the called number, if the short message service is enabled for the called number, whether a short message is sent to the calling number is determined according to the called number and the on-hook state, whether the short message is sent to the calling number can be determined by combining the called number and the on-hook state, a short message sending strategy can be set by a merchant according to actual conditions, a large number of invalid short messages are effectively avoided being sent by the merchant, if the short message is sent to the calling number, a default on-hook short message is determined from a preset number set according to the called number, then a target message channel and a sending sequence for sending the default on-hook short message can be determined according to a sending sequence based on channel information of a plurality of message channels of a first priority gateway of the calling number and a second priority gateway of the called number, channel can be selected and then the default on-hook short message can be sent to the calling number according to the target message channel, and random selection or failure of sending short messages caused by channel selection in related technologies is reduced.
Specifically, the channel information of each message channel includes: the channel quality, the current channel working state and a plurality of short message information to be sent of the message channel; step S105 may include:
determining a target message channel according to the channel quality of a plurality of message channels of the short message gateway, the working state of the current channel and the second priority of the called number;
and determining the sending sequence of short messages to be sent of the default on-hook short messages of the calling number according to the first priority of the calling number and the information of a plurality of short messages to be sent of the current target message channel.
The plurality of message channels can be sequenced according to the channel quality and the current channel working state, and then a target message channel is determined from the sequenced message channels based on the second priority of the current called number. In one possible case, sorting the plurality of message channels according to channel quality and current channel operating state may include: determining the score of each message channel according to a set formula, and sequencing based on the score, wherein the set formula can comprise: y = ax1+ bx2, where y represents a score, a represents a weight corresponding to the channel quality, x1 represents data corresponding to the channel quality, b represents a weight corresponding to the current channel operating state, and x2 represents data corresponding to the current channel operating state. Data corresponding to channel quality and data corresponding to the current channel working state in the embodiment of the present application can be selected by a user according to actual requirements, and the embodiment of the present application is not limited, as long as the purpose of the embodiment of the present application can be achieved.
And then, a target message channel can be determined from the sequenced message channels according to the second priority of the called number, wherein after the sequencing, a corresponding relation between the second priority of each called number and the sequenced bit number of the message channels can be set, and then the target message channel is determined based on the corresponding relation. Of course, other ways are possible and the embodiments of the present application are not limited.
Each calling number is also set with corresponding priority, the setting rule is the same for all calling numbers, and can be determined based on the number service time of the calling number, or determined based on the marking information of all called numbers to the calling number, and the user can set according to the actual situation. And then, the sending sequence of short messages to be sent of the default on-hook short message of the calling number can be determined according to the first priority of the calling number and the information of a plurality of short messages to be sent of the current target message channel.
Therefore, according to the embodiment of the application, the channel quality and the current channel working state of the multiple message channels of the short message gateway and the second priority of the called number can be utilized to determine the target message channel, so that the target message channel can normally transmit the short message, and further, the transmission sequence of the short message to be transmitted of the default on-hook short message of the calling number is determined according to the first priority of the calling number and the multiple short message information to be transmitted of the current target message channel, so that the transmission sequence of the default on-hook short message can be determined according to the first priority of the calling number, and all the short message information to be transmitted of the target message channel can be transmitted according to the importance degree.
Further, in order to obtain the calling number, the called number, and the on-hook state quickly, in this embodiment of the application, the step S101 obtains signaling data, and obtains the calling number, the called number, and the on-hook state according to the signaling data, including:
acquiring signaling data by using a communication principle of a socket, and acquiring a calling number, a called number and an on-hook state according to the signaling data;
in the embodiment of the application, when a calling number and a called number are in a call, signaling data are acquired through a pstn system, after the call is finished, the electronic device can use a socket to receive the transmitted signaling data, the socket uses a long connection mode, namely, the two ends of the socket are kept connected for a long time, the long connection mode is used, when no signaling data is transmitted, a heartbeat message is sent to maintain the connection state, and the transmission speed is higher compared with that of a short connection mode. After the signaling data is obtained, the signaling data is analyzed, and a calling number, a called number and an on-hook state can be obtained.
Putting a calling number, a called number and an on-hook state into a data pool, and asynchronously writing the calling number, the called number and the on-hook state in the data pool into a database;
in the embodiment of the application, the calling number, the called number and the on-hook state are firstly put into the data pool, and then the data is written into the database in an asynchronous mode. Various information is firstly put into a data pool, so that the problem that partial signaling data is lost due to the fact that the speed of acquiring the signaling data is high but the speed of storing the signaling data into a database is low and the signaling data cannot be processed in time can be avoided. And the data is written into the database in an asynchronous mode, so that the database writing speed can be improved.
And extracting the calling number, the called number and the on-hook state from the database.
It can be seen that, in the embodiment of the present application, the signaling data is obtained by using the socket, and the signaling data is analyzed to obtain the calling number, the called number, and the on-hook state, the obtained calling number, the obtained called number, and the obtained on-hook state are first placed in the data pool, and then the calling number, the obtained called number, and the obtained on-hook state are placed in the database in an asynchronous manner. The method can acquire the signaling data quickly, and after the signaling data is analyzed, the method can improve the speed of writing the data into the database while ensuring that the calling number, the called number and the on-hook state data are all written into the database.
Further, in order to improve the short message sending system, in the embodiment of the present application, the determining a short message sending policy according to the called number and the on-hook state includes:
judging whether the condition of sending the short message is met or not according to the called number and the on-hook state;
in the embodiment of the application, the short message sending conditions set by different called numbers aiming at the on-hook state are different, and in one case, the conditions for sending the short message are met after the short message is connected and hung up and not connected and hung up. And the other condition is that the condition for sending the short message is met after the short message is connected and hung up, and the condition for sending the short message is not met after the short message is not connected and hung up. The short message sending condition can be set according to the actual situation, and the embodiment of the application is not limited.
If the condition of sending the short message is met, determining the short message sending function state according to the called number, wherein the short message sending function state comprises normal sending and suspended sending;
in the embodiment of the application, if the condition of sending the short message is not met, the short message is not sent to the calling number; if the condition of sending the short message is met, the short message sending function state of the called number is checked. After the merchant opens the short message sending function, the state of the short message sending function can be controlled according to the actual situation, and the short message can be controlled to be temporarily stopped to be sent. If the control short message is temporarily stopped, the merchant can control the short message to be normally sent at the later stage according to the actual condition.
If the short message sending function state is normal sending, judging whether the number of the remaining number exists according to the number information of the called number, and determining a short message sending strategy, wherein the number information of the called number comprises any one of the following items: the number of the remaining short messages, the sending time and the last sent short message information.
In the embodiment of the application, if the short message sending function state is the pause sending, the short message is not sent to the calling number.
In an implementation case, if the short message sending function status is normal sending, it may be determined whether there are remaining number of short messages to be sent for the called number, and when there is no remaining number, it is determined that the short message sending policy is not to send the short message to the calling number, and when there are remaining number, it is determined that the short message sending policy is to send the short message to the calling number. The merchant of the called number can set the number of short messages sent to the calling number within a period of time according to actual conditions, for example, the called number can send 300 short messages to the calling number in one month, and for example, the called number can send 3000 short messages to the calling number in one year. The number of the short messages set is reduced by one when the called number sends one short message to the calling number, and the difference between the number of the short messages set and the number of the short messages sent is the remaining number.
In an implementation case, if the short message sending function state is normal sending, it is determined whether the current time is within the sending time according to the sending time set by the called number, if so, it is determined that the short message can be sent, and if not, it is determined that the short message cannot be sent, and the sending time may be set according to the actual requirements of the user.
In an implementation case, if the short message sending function state is normal sending, the sending time is obtained according to the short message information sent last, a time difference value is determined according to the sending time and the current time, whether the time difference value is greater than a preset difference threshold value or not is determined, if the time difference value is greater than the preset difference threshold value, the short message can be sent, and if the time difference value is not greater than the preset difference threshold value, the short message cannot be sent, wherein the preset difference threshold value can be set according to an empirical value. Therefore, in the embodiment of the application, whether the condition for sending the short message is met or not is judged according to the called number and the on-hook state, if the condition for sending the short message is met, the short message sending function state is determined according to the called number, and if the short message sending function state is normal sending, the short message sending strategy is determined according to the number information of the called number. Whether the short message can be sent to the calling number or not is subjected to a series of screening according to the called number and the on-hook state, so that a short message sending system is more complete.
Further, in order to meet the requirement that a general short message can be generated quickly and a specific short message can be edited specially, in the embodiment of the present application, a method for setting a preset short message corresponding to a preset called number includes: generating a preset short message according to the information of the calling number and a short message template corresponding to the preset called number;
in the embodiment of the application, the short message template is pre-stored, and the preset short message is formed only by filling in the information of the calling number. If the preset short message is a short message for thanking the incoming call of the calling number, the related content of the thanking the incoming call can be set as a short message template, and the calling part of the preset short message can be filled by acquiring the information of the calling number to form the preset short message.
And/or acquiring short message content corresponding to a preset called number input through a set account;
auditing the short message content to obtain a first auditing result;
performing authority verification on the set account to obtain a second verification result;
and when the first checking result indicates that the short message content does not contain the non-compliant keywords and the second checking result indicates that the set account has the short message content setting authority of the preset called number, generating a preset short message according to the short message content.
In the embodiment of the application, a merchant can edit specific short message content according to a product or a service, and after the electronic device obtains the short message content edited by the merchant, the electronic device checks the short message content, wherein the checking of the short message content includes checking whether the short message content is compliant, a language or illegal vocabulary of personal attack is not included in the short message content, which can be regarded as the compliance of the short message content, checking whether the short message content has a formal problem, and checking whether the short message content lacks necessary information, for example, a detailed address is not given when the merchant address is introduced into the short message content, and for example, the name of the merchant sending the short message is not written clearly, and the embodiment of the application is not limited in which aspect of checking the short message content. And generating a preset short message according to the content of the short message after the verification is passed.
Specifically, the auditing the short message content to obtain a first auditing result includes: filtering keywords of the short message content, wherein the keyword filtering is used for checking whether the short message content contains the unqualified keywords to obtain a filtering result; in the embodiment of the application, after the input short message content is acquired, the short message content is subjected to keyword filtering, wherein the keywords comprise illegal words, sensitive words and special words, whether the short message content contains the keywords or not is judged, and a filtering result is obtained. If the filtering result contains the non-compliance keywords, determining that the first checking result is that the short message content contains the non-compliance keywords; and if the filtering result does not contain the non-compliance keywords, determining that the first examination result is that the short message content does not contain the non-compliance keywords. In the embodiment of the application, if the short message content contains the non-compliance keyword, the verification is not passed, and the merchant is prompted to modify the content. Therefore, in the embodiment of the application, the keywords are filtered for the input short message content, so as to ensure that the generated preset short messages are legal compliance.
The permission verification is performed on the set account to obtain a second verification result, which may include: and matching the set account with a legally set account of the called number stored in the electronic equipment, and after the matching is successful, determining that the second checking result is that the set account has the short message content setting authority of the preset called number, otherwise, the set account does not have the short message content setting authority of the preset called number.
Therefore, in the embodiment of the application, the preset short message can be set in various ways, and in an realizable way, the preset short message can be formed through a preset short message template and the information of the calling number; in another implementation manner, the preset short message can be generated according to the short message content after the verification is passed by acquiring the short message content input through the set account and verifying the short message content and the set account. The preset short message is set in various modes, so that the requirement that the general short message can be generated quickly is met, and the requirement that the specific short message can be edited specially is met.
Further, in order to learn the attention of customers with different calling numbers to the merchant, in the embodiment of the present application, the asynchronously writing the calling number, the called number, and the on-hook state in the data pool into the database includes:
determining the customer category of the calling number according to the historical frequency of calling the called number by the calling number;
in the embodiment of the application, the historical frequency of calling the called number by the calling number can be known through query, specifically, all calling information of calling the called number can be stored in one table, the table comprises the calling number, the call time and the historical frequency, wherein after each call is finished, the historical frequency is increased by one, and certainly, other information can be included, and related information can be stored in the table according to actual conditions. According to the historical frequency of calling the called number by the calling number, the calling number can be divided into different customer categories, the customer categories and the corresponding relation between the historical frequency and the customer categories can be set according to actual conditions, and the method is not limited. For example, the user categories are classified into a category I, a category II, a category III and a category IV, and when the historical frequency of calling the called number by the calling number is less than or equal to a first frequency, the calling number is classified into the category I; when the historical frequency of calling the called number by the calling number is greater than the first frequency and less than or equal to the second frequency, dividing the calling number into II classes; when the historical frequency of calling the called number by the calling number is greater than the second frequency and less than the third frequency, the calling number is divided into III types; and when the historical frequency of calling the called number by the calling number is greater than the third frequency and less than the fourth frequency, dividing the calling number into IV classes. The first frequency < the second frequency < the third frequency < the fourth frequency, and the attention of class I to class IV calling numbers in the customer category to called number merchants is gradually increased.
And asynchronously writing the calling number, the called number and the on-hook state in the data pool into a position corresponding to the client category in the database.
In the embodiment of the application, different storage positions are arranged in the database aiming at different client types, and the positions for storing the calling number, the called number and the on-hook state can be determined according to the client type of the calling number.
Therefore, in the embodiment of the application, the customer category of the calling number is determined according to the historical frequency of calling the called number by the calling number, and the calling number, the called number and the on-hook state in the data pool are stored in a grouping mode according to the customer category, so that a merchant can conveniently know the attention degree of customers with different calling numbers to the merchant, and old customers and new customers can be easily classified.
Further, in order to better promote customer consumption, in an embodiment of the present application, the short message sending method further includes:
judging whether the current date is a preset date or not;
in this embodiment of the application, the preset date may be a date of a festival of the lunar calendar or the solar calendar, the electronic device may obtain the current date, and by determining whether the current date is the preset date, it may be determined whether the current date is the festival.
If the date is preset, determining a short message corresponding to the current date aiming at any first target called number, wherein the service of sending the short message on the preset date is opened for any first target called number;
in the embodiment of the application, if the current date is festival, the short message corresponding to the current date is determined according to the called number of the service for sending the short message by opening the preset date. For example, if the current date is a denier, the called number which opens the service of sending a denier short message can be screened, and a denier holiday short message corresponding to the called number is confirmed.
Determining a first target customer category from a plurality of customer categories of the first target called number, and sending short messages corresponding to all calling numbers, the first target called number and the current date in the first target customer category to a short message gateway;
in the embodiment of the application, the first target called number stores the calling number in a plurality of customer categories, one or more types of the customer categories can be selected to be sent when the short message corresponding to the current date is sent, merchants can select which type or types of customers send the short message corresponding to the current date according to the actual situation, and the embodiment of the application is not limited.
And/or the presence of a gas in the gas,
acquiring a preferential short message of a second target called number;
in the embodiment of the application, the offer short message may include introduction of the offer activity, and certainly, the offer volume may also be issued, and the offer volume may be picked up by adding a link to the offer short message and clicking the link to jump to the offer volume picking-up interface.
And determining a second target customer category from the plurality of customer categories of the second target called number, and sending all calling numbers, the second target called number and the preferential short message in the second target customer category to the short message gateway.
In the embodiment of the application, the second target called number stores the calling number in a plurality of customer categories, one or more types of the customer categories can be selected to be sent when the preferential short message is sent, and merchants can select which type or types of customers send the preferential short message according to actual conditions, and the embodiment of the application is not limited.
Therefore, in the embodiment of the application, the merchant can select the customer category to send the festival care short message and the discount short message, so that the customer can feel warm in the festival and keep the customer, meanwhile, the merchant can select the customer category to carry out the discount short message according to the actual condition of the customer, the old customer can be kept, the new customer can be expanded, and the customer consumption can be better promoted.
The foregoing embodiment introduces a short message sending method from the perspective of a method flow, and the following embodiment introduces a short message sending apparatus from the perspective of a virtual module or a virtual unit, which is described in detail in the following embodiment.
An embodiment of the present application provides a short message sending apparatus 200, as shown in fig. 3, the short message sending apparatus 200 may specifically include:
an obtaining module 210, configured to obtain signaling data, and obtain a calling number, a called number, and an on-hook state according to the signaling data;
a determining module 220, configured to determine whether a called number is in a preset number set, where the preset number set includes a called number that opens a short message service;
a first determining module 230, configured to determine a short message sending policy according to a called number and an on-hook state when the number is in a preset number set, where the short message sending policy is used to determine whether to send a short message to a calling number;
a second determining module 240, configured to determine a default on-hook short message in a preset short message set according to a called number when the short message sending policy is to send a short message to a calling number, where the preset short message set includes preset short messages corresponding to all preset called numbers in the preset number set;
a third determining module 250, configured to determine a target message channel and a sending order according to the first priority of the calling number, the second priority of the called number, and channel information of multiple message channels of the short message gateway; the sending sequence is the sending sequence of the default on-hook short message in the target message channel;
the sending module 260 is configured to send the calling number, the called number, the target message channel, the sending order, and the default on-hook short message to the short message gateway, where the short message gateway is configured to send the default on-hook short message to the calling number by using the target message channel according to the called number.
Preferably, the channel information of each message channel includes: channel quality, current channel working state and a plurality of short message information to be sent of a message channel;
the third determining module 250 determines a target message channel and a sending sequence according to the first priority of the calling number, the second priority of the called number, and channel information of a plurality of message channels of the short message gateway, and is configured to:
determining a target message channel according to the channel quality of a plurality of message channels of the short message gateway, the working state of the current channel and the second priority of the called number;
and determining the sending sequence of short messages to be sent of the default on-hook short messages of the calling number according to the first priority of the calling number and the information of a plurality of short messages to be sent of the current target message channel.
Preferably, the obtaining module 210 is configured to, when performing obtaining of the signaling data and analyzing the signaling data to obtain the calling number, the called number, and the on-hook state:
acquiring signaling data by using a socket communication principle, and acquiring a calling number, a called number and an on-hook state according to the signaling data;
putting the calling number, the called number and the on-hook state into a data pool, and asynchronously writing the calling number, the called number and the on-hook state in the data pool into a database;
and extracting the calling number, the called number and the on-hook state from the database.
Preferably, when determining the short message sending policy according to the called number and the on-hook state, the first determining module 230 is configured to:
judging whether the condition of sending the short message is met or not according to the called number and the on-hook state;
if the condition of sending the short message is met, determining a short message sending function state according to the called number, wherein the short message sending function state comprises normal sending and pause sending;
if the short message sending function state is normal sending, judging whether the number of the remaining pieces is left according to the called number, and determining a short message sending strategy.
Preferably, when determining the short message sending policy according to the called number and the on-hook state, the first determining module 230 is configured to: judging whether the condition of sending the short message is met or not according to the called number and the on-hook state;
if the condition of sending the short message is met, determining a short message sending function state according to the called number, wherein the short message sending function state comprises normal sending and pause sending;
if the short message sending function state is normal sending, determining a short message sending strategy according to the number information of the called number, wherein the number information of the called number comprises any one of the following: the number of the remaining short messages, the sending time and the last sent short message information.
Preferably, the short message sending apparatus 200 further includes:
the first preset short message generating module is used for: generating a preset short message according to the information of the calling number and a short message template corresponding to the preset called number;
the second preset short message generating module is used for: and acquiring the input short message content, verifying the short message content, and generating a preset short message according to the short message content after the verification is passed.
Preferably, the second preset short message generating module is configured to, when executing to acquire the input short message content, perform an audit on the short message content, and generate the preset short message according to the short message content after the audit is passed, specifically:
acquiring short message content corresponding to a preset called number input through a set account;
auditing the short message content to obtain a first auditing result;
performing authority verification on the set account to obtain a second verification result;
and when the first checking result indicates that the short message content does not contain the non-compliant keywords and the second checking result indicates that the set account has the short message content setting authority of the preset called number, generating a preset short message according to the short message content.
Preferably, the short message sending apparatus 200 further includes:
a date short message sending module: used for judging whether the current date is a preset date or not;
if yes, determining a short message corresponding to the current date aiming at any first target called number, wherein the service of sending the short message on the preset date is opened by any first target called number;
determining a first target customer category from a plurality of customer categories of the first target called number, and sending short messages corresponding to all calling numbers, the first target called number and the current date in the first target customer category to a short message gateway;
a preference short message sending module: the preference short message is used for acquiring a second target called number;
and determining a second target customer category from the plurality of customer categories of the second target called number, and sending all calling numbers, the second target called number and the preferential short message in the second target customer category to the short message gateway.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the short message sending apparatus 200 described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
In an embodiment of the present application, an electronic device is provided, as shown in fig. 4, where the electronic device 300 shown in fig. 4 includes: a processor 301 and a memory 303. Wherein processor 301 is coupled to memory 303, such as via bus 302. Optionally, the electronic device 300 may also include a transceiver 304. It should be noted that the transceiver 304 is not limited to one in practical applications, and the structure of the electronic device 300 is not limited to the embodiment of the present application.
The Processor 301 may be a CPU (Central Processing Unit), a general-purpose Processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 301 may also be a combination of computing functions, e.g., comprising one or more microprocessors in combination, a DSP and a microprocessor in combination, or the like.
Bus 302 may include a path that transfers information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 302 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 4, but this does not represent only one bus or one type of bus.
The Memory 303 may be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these.
The memory 303 is used for storing application program codes for executing the scheme of the application, and the processor 301 controls the execution. The processor 301 is configured to execute application program code stored in the memory 303 to implement the aspects illustrated in the foregoing method embodiments.
Wherein, the electronic device includes but is not limited to: mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. But also a server, etc. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
The embodiment of the present application provides a computer readable storage medium, on which a computer program is stored, and when the computer program runs on a computer, the computer is enabled to execute the corresponding content in the foregoing method embodiment.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless otherwise indicated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present application, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations should also be regarded as the protection scope of the present application.

Claims (9)

1. A short message sending method is characterized by comprising the following steps:
acquiring signaling data, and acquiring a calling number, a called number and an on-hook state according to the signaling data;
judging whether the called number is in a preset number set or not, wherein the preset number set comprises the called number which opens a short message service;
if the number is in the preset number set, determining a short message sending strategy according to the called number and the on-hook state, wherein the short message sending strategy is used for determining whether to send a short message to the calling number or not;
if the short message sending strategy is to send a short message to the calling number, determining a default on-hook short message in a preset short message set according to the called number, wherein the preset short message set comprises preset short messages corresponding to all preset called numbers in the preset number set;
determining a target message channel and a sending sequence according to the first priority of the calling number, the second priority of the called number and channel information of a plurality of message channels of the short message gateway; the sending sequence is the sending sequence of the default on-hook short message in the target message channel;
sending the calling number, the called number, the target message channel, the sending sequence and the default on-hook short message to a short message gateway, wherein the short message gateway is used for sending the default on-hook short message to the calling number by using the target message channel according to the called number;
wherein, the channel information of each message channel comprises: the channel quality, the current channel working state and a plurality of short message information to be sent of the message channel;
the determining a target message channel and a sending sequence according to the first priority of the calling number, the second priority of the called number and channel information of a plurality of message channels of the short message gateway comprises the following steps:
determining a target message channel according to the channel quality of a plurality of message channels of the short message gateway, the current channel working state and the second priority of the called number;
and determining the sending sequence of short messages to be sent of the default on-hook short messages of the calling number according to the first priority of the calling number and the information of a plurality of short messages to be sent of the current target message channel.
2. The short message sending method of claim 1, wherein the obtaining signaling data and analyzing the signaling data to obtain a calling number, a called number, and an on-hook status comprises:
acquiring signaling data by using a socket communication principle, and acquiring a calling number, a called number and an on-hook state according to the signaling data;
putting the calling number, the called number and the on-hook state into a data pool, and asynchronously writing the calling number, the called number and the on-hook state in the data pool into a database;
and extracting the calling number, the called number and the on-hook state from the database.
3. The short message sending method of claim 2, wherein the asynchronously writing the calling number, the called number and the on-hook state in the data pool into the database comprises:
determining the customer category of a calling number according to the historical frequency of calling the called number by the calling number;
and asynchronously writing the calling number, the called number and the on-hook state in the data pool into a position corresponding to the client category in a database.
4. The short message sending method of claim 3, further comprising:
judging whether the current date is a preset date or not;
if yes, determining a short message corresponding to the current date aiming at any first target called number, wherein the service of sending the short message on the preset date is opened by any first target called number;
determining a first target customer category from a plurality of customer categories of the first target called number, and sending short messages corresponding to all calling numbers, the first target called number and the current date in the first target customer category to a short message gateway;
and/or the presence of a gas in the gas,
acquiring a preferential short message of a second target called number;
and determining a second target customer category from the plurality of customer categories of the second target called number, and sending all calling numbers, the second target called number and the preferential short message in the second target customer category to the short message gateway.
5. The method of claim 1, wherein determining a short message sending strategy according to the called number and the on-hook status comprises:
judging whether the condition of sending the short message is met or not according to the called number and the on-hook state;
if the condition of sending the short message is met, determining a short message sending function state according to the called number, wherein the short message sending function state comprises normal sending and suspended sending;
if the short message sending function state is normal sending, determining a short message sending strategy according to the number information of the called number, wherein the number information of the called number comprises any one of the following items: the number of the remaining short messages, the sending time and the last sent short message information.
6. The short message sending method according to any one of claims 1 to 5, wherein the method for setting the preset short message corresponding to the preset called number comprises the following steps:
generating a preset short message according to the information of the calling number and a short message template corresponding to the preset called number;
and/or acquiring short message content corresponding to a preset called number input through a set account;
auditing the short message content to obtain a first auditing result;
performing authority verification on the set account to obtain a second verification result;
and when the first checking result indicates that the short message content does not comprise the non-compliance keyword, and the second checking result indicates that the set account number has the short message content setting authority of the preset called number, generating a preset short message according to the short message content.
7. A short message sending device is characterized by comprising,
the acquiring module is used for acquiring the signaling data and acquiring a calling number, a called number and an on-hook state according to the signaling data;
the judging module is used for judging whether the called number is in a preset number set or not, wherein the preset number set comprises the called number which opens the short message service;
the first determining module is used for determining a short message sending strategy according to the called number and the on-hook state when the number is in the preset number set, wherein the short message sending strategy is used for determining whether to send a short message to the calling number or not;
a second determining module, configured to determine a default on-hook short message in a preset short message set according to the called number when the short message sending policy is to send a short message to the calling number, where the preset short message set includes preset short messages corresponding to all preset called numbers in the preset number set;
the third determining module is used for determining a target message channel and a sending sequence according to the first priority of the calling number, the second priority of the called number and channel information of a plurality of message channels of the short message gateway; the sending sequence is the sending sequence of the default on-hook short message in the target message channel;
the sending module is used for sending the calling number, the called number, the target message channel, the sending sequence and the default on-hook short message to a short message gateway, and the short message gateway is used for sending the default on-hook short message to the calling number by using the target message channel according to the called number;
wherein, the channel information of each message channel comprises: the channel quality, the current channel working state and a plurality of short message information to be sent of the message channel;
the third determining module is used for determining a target message channel and a sending sequence when executing channel information of a plurality of message channels according to the first priority of the calling number, the second priority of the called number and the short message gateway, and is used for:
determining a target message channel according to the channel quality of a plurality of message channels of the short message gateway, the current channel working state and the second priority of the called number;
and determining the sending sequence of short messages to be sent of the default on-hook short messages of the calling number according to the first priority of the calling number and the information of a plurality of short messages to be sent of the current target message channel.
8. An electronic device, comprising:
at least one processor;
a memory;
at least one application, wherein the at least one application is stored in the memory and configured to be executed by the at least one processor, the at least one application configured to: performing the method of any one of claims 1 to 6.
9. A computer-readable storage medium, having stored thereon a computer program, characterized in that, when the computer program is executed in a computer, it causes the computer to execute the method of any one of claims 1 to 6.
CN202210753574.0A 2022-06-29 2022-06-29 Short message sending method, device, equipment and medium Active CN115065946B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210753574.0A CN115065946B (en) 2022-06-29 2022-06-29 Short message sending method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210753574.0A CN115065946B (en) 2022-06-29 2022-06-29 Short message sending method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN115065946A CN115065946A (en) 2022-09-16
CN115065946B true CN115065946B (en) 2023-01-06

Family

ID=83205069

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210753574.0A Active CN115065946B (en) 2022-06-29 2022-06-29 Short message sending method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115065946B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917688A (en) * 2010-08-16 2010-12-15 候万春 Mobile phone, system and method supporting transmission of hang-up short message from called party to calling party

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102186154A (en) * 2011-06-02 2011-09-14 广东亿迅科技有限公司 Method and system for sending short messages
CN103002479B (en) * 2011-09-19 2015-05-20 北京洛神科技有限公司 Mobile network user communication quality monitoring system
CN103037331B (en) * 2011-10-10 2016-02-03 中国电信股份有限公司 Method and system, the hang-up short message server of hang-up short message is sent to calling terminal
CN105101128A (en) * 2014-05-05 2015-11-25 中国移动通信集团北京有限公司 On-hook express mail sending method and device
CN112637795B (en) * 2020-12-17 2023-09-19 中国联合网络通信集团有限公司 On-hook short message transmission method, server, terminal equipment, system and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917688A (en) * 2010-08-16 2010-12-15 候万春 Mobile phone, system and method supporting transmission of hang-up short message from called party to calling party

Also Published As

Publication number Publication date
CN115065946A (en) 2022-09-16

Similar Documents

Publication Publication Date Title
CN110337075A (en) A kind of short message sending method, device and electronic equipment based on APP type of service
US9832787B2 (en) Attention management
CN108616668B (en) Method for monitoring dialing task, electronic device and computer readable storage medium
CN114338793A (en) Message pushing method and device, electronic equipment and readable storage medium
CN109547322A (en) System prompt control method, device, computer and computer readable storage medium
CN114466348A (en) Communication method, device and equipment
CN110516049A (en) Service creation method, service creation device, computer equipment and computer readable storage medium
CN115065946B (en) Short message sending method, device, equipment and medium
US20230275997A1 (en) System and method for enhanced outbound campaign management
CN112286930A (en) Method, device, storage medium and electronic equipment for resource sharing of redis business side
CN111432358A (en) Short message sending method, system, medium and equipment
WO2022078397A1 (en) Communication method and apparatus, device, and storage medium
CN108377357A (en) A kind of Visualization Platform call method and device
CN106998386A (en) The method and its device, user terminal of a kind of newly-increased contact method
CN113890906A (en) Call forwarding method and device, electronic equipment and computer readable storage medium
CN114238585A (en) Query method and device based on 5G message, computer equipment and storage medium
CN108932283B (en) Customer information screening method, system, computer device and storage medium
CN111988473B (en) Voice communication call control method and device based on intelligent contract
CN112650763A (en) Configuration method of product quota, related equipment and storage medium
CN112583699A (en) Method, system, equipment and storage medium for automatic transmitting welcome language by departments
CN111818468A (en) Message processing method, system and related equipment
CN112015768A (en) Information matching method based on Rete algorithm and related products thereof
CN109461088A (en) A kind of point single method, apparatus, medium and electronic equipment for saving work order from damage
CN108513269B (en) Advertisement short message identification method, electronic device, computer equipment and storage medium
US20230110404A1 (en) System and method for centralized multichannel outbound call campaign management

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