Method, device and terminal for sending short message
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, and a terminal for sending a short message.
Background
At present, most mobile phones support group sending of short messages, so that users do not need to manually send the same short messages to multiple contacts one by one, and the method is convenient and fast. However, the current function of group sending short messages has a disadvantage that the content of the short messages sent to all the contacts by group is the same and is not called by the recipient. Particularly on holidays, people often greet with short messages and maintain the relationship between clients, and the like, because of numerous contacts, the greeting short message is usually sent by adopting the function of mass texting, but the content of the mass texting is uniform and has no pertinence, so that a receiver can guess that the short message is mass texting at a glance, and the blessing effect can be greatly discounted. For example, there is a blessing message with contents "wish you happy spring festival and he happy, and the message is sent to zhang san and lie xi respectively, so that according to the current way of sending the message in groups, the contents finally received by zhang san and lie xi are both" wish you happy spring festival and he happy ". Content is the same and lacks pertinence.
Disclosure of Invention
The embodiment of the invention provides a method, a device and a terminal for sending short messages, which are used for solving the problems that the content of the short messages sent in groups is the same and the pertinence is lacked when the existing short messages are sent in groups, and meeting the personalized requirements of users.
The embodiment of the invention provides a method for sending short messages, which comprises the following steps:
when a short message is sent, if a request for adding a nickname is received, determining the nickname of a contact from description fields of the contact receiving the short message, wherein the description fields at least comprise nickname fields, name fields and title fields;
and adding the determined nickname to the short message, and sending the short message added with the nickname to the contact.
The embodiment of the invention provides a device for sending short messages, which comprises:
the nickname determining module is used for determining the nickname of the contact from the description fields of the contact receiving the short message if a request for adding the nickname is received when the short message is sent, wherein the description fields at least comprise nickname fields, name fields and title fields;
and the information sending module is used for adding the determined nickname to the short message and sending the short message added with the nickname to the contact.
The terminal provided by the embodiment of the invention comprises the device for sending the short message.
The embodiment of the invention has the beneficial effects that:
the embodiment of the invention realizes the technical scheme that when a short message is sent, if a request for adding a nickname is received, the nickname of a contact person is determined from a description field of the contact person receiving the short message, the determined nickname is added to the short message, and the short message added with the nickname is sent to the currently traversed contact person, so that the personalized requirement of a user is met on one hand, and on the other hand, the nickname of a receiver is added to the short message sent in groups when the short message is sent in groups, so that the short message sent in groups has pertinence; in addition, the nickname of the contact can be determined from various fields (nickname field, name field, title field and the like), and the method is suitable for determining the nickname under various application scenes (nickname/no nickname, English/Chinese name field, specified keyword contained in the name field and the like). .
Drawings
Fig. 1 is a schematic flow chart of a method for sending a short message according to embodiment 1 of the present invention;
fig. 2 is a schematic flow chart of a method for mass texting according to embodiment 2 of the present invention;
fig. 3 is a schematic structural diagram of a device for sending a short message according to embodiment 3 of the present invention;
fig. 4 is a schematic structural diagram of a device for sending a short message according to embodiment 3 of the present invention;
fig. 5 is a schematic structural diagram of a device for sending a short message according to embodiment 3 of the present invention.
Detailed Description
The following describes in detail specific embodiments of a method, an apparatus, and a terminal for mass texting according to an embodiment of the present invention with reference to the accompanying drawings.
Example 1
The method for sending the short message provided by the embodiment of the invention, as shown in fig. 1, specifically comprises the following steps:
step 101, when sending a short message, if a request for adding a nickname is received, determining the nickname of a contact person receiving the short message from a description field of the contact person receiving the short message, wherein the description field at least comprises a nickname field, a name field and a title field;
and 102, adding the determined nickname to the short message, and sending the short message added with the nickname to a contact person receiving the short message.
Preferably, in this embodiment, the determining the nickname of the contact receiving the short message from the description field of the contact receiving the short message may include:
reading and determining whether a nickname field of a contact receiving the short message is empty;
when the nickname field of the contact receiving the short message is not empty, the information in the nickname field of the contact receiving the short message is used as the nickname of the contact receiving the short message;
when the nickname field of the contact receiving the short message is empty, reading and determining the character type of the information in the name field of the contact receiving the short message, when the determined character type is English, taking the information in the name field of the contact receiving the short message as the nickname of the contact receiving the short message, and when the determined character type is Chinese, determining the nickname of the contact receiving the short message from the name field and the title field of the contact receiving the short message according to a preset rule.
In this example, the title field may be a field describing information such as the title, the unit (work unit or learning unit), and the like of the contact receiving the short message.
It should be noted that, in the specific implementation of this example, when the character type of the information in the name field of the contact person receiving the short message is determined, the information in the name field of the contact person receiving the short message may be used as the nickname of the contact person receiving the short message when the character type is determined to be the first type (such as english), and the nickname of the contact person receiving the short message may be determined from the name field and the title field of the contact person receiving the short message according to a predetermined rule when the character type is determined to be the second type (such as chinese).
In this example, determining the nickname of the contact person receiving the short message from the name field and the title field of the contact person receiving the short message according to the predetermined rule may include:
reading and determining whether a first type of preset keywords exist in a name field of a contact person receiving the short message;
when the name field of the contact receiving the short message contains a preset first type keyword, processing the information in the name field of the contact receiving the short message according to a first rule and then using the processed information as a nickname of the contact receiving the short message;
when the name field of the contact receiving the short message does not contain the preset first type key words, reading and determining whether the title field of the contact receiving the short message is empty or not;
when the title field of the contact person receiving the short message is not empty, simplifying and combining the information in the name field and the information in the title field of the contact person receiving the short message, and taking the simplified and combined information as a nickname of the contact person receiving the short message;
and when the title field of the contact receiving the short message is empty, processing the information in the name field of the contact receiving the short message according to a second rule and then using the processed information as the nickname of the contact receiving the short message.
Preferably, in this example, the step of reading and determining whether the predetermined first type keyword exists in the name field of the contact person receiving the short message may be:
reading information in a name field of a contact person receiving the short message, matching the read information with each keyword in a pre-stored first type keyword list, and confirming that a preset first type keyword exists in the name field of the contact person receiving the short message when the keyword given in the first type keyword list exists in the read information.
Preferably, in this example, processing information in a name field of a contact receiving the short message according to the first rule, and then using the processed information as a nickname of the contact receiving the short message may include:
determining whether the name field of the contact receiving the short message contains a second type of key words;
when the name field of the contact receiving the short message contains the second type of key words, the second type of key words in the name field information of the contact receiving the short message are removed and used as the nickname of the contact receiving the short message;
and when the name field of the contact receiving the short message does not contain the second type of key words, taking the information in the name field of the contact receiving the short message as the nickname of the contact receiving the short message.
Preferably, in this example, determining whether the information in the name field of the contact receiving the short message includes the second type keyword may be:
reading information in a name field of a contact person receiving the short message, matching the read information with each keyword in a pre-stored second-type keyword list, and confirming that a preset second-type keyword exists in the name field of the contact person receiving the short message when the read information has the keyword given in the second-type keyword list.
Preferably, in this example, the simplifying and combining the information in the name field and the information in the title field of the contact person receiving the short message may include:
extracting a first character in a name field of a contact person receiving the short message;
searching a preset information simplification table to obtain simplified information corresponding to information in a title field of a contact receiving the short message;
and merging the first character with the searched simplified information.
Preferably, in this example, the nickname of the contact receiving the short message after processing the information in the name field of the contact receiving the short message according to the second rule may be:
and taking other information except the first character in the name field of the contact receiving the short message as the nickname of the contact receiving the short message. Or,
determining the number of characters of information in a name field of a contact receiving the short message;
and when the number of characters of the information in the name field of the contact person receiving the short message is not less than a first preset value or not more than a second preset value, taking the information in the name field of the contact person receiving the short message as the nickname of the contact person receiving the short message.
Preferably, in this embodiment, the adding the determined nickname to the short message may include: and directly adding the determined nickname to the starting position of the short message. Alternatively, words such as "respected" or "loved" are inserted in front of the determined nickname.
The embodiment of the invention automatically adds the nickname of the contact person receiving the short message into the short message when sending the short message, can meet the individual requirements of users, and adds the nickname of the received short message into the sent short message in the application scene of mass texting, thereby enabling the mass texting to have pertinence.
The example specifically determines the nickname of the contact of the received short message, and includes: when the nickname field of the contact exists, the information of the nickname field can be directly adopted as the nickname of the contact; when the nickname of the contact does not exist, if the information in the name field of the contact is English, the information in the name field can be directly used as the nickname of the contact; if the information in the name field of the contact is Chinese and the name field of the contact contains the first type of keywords (such as managers and the like), the information in the name field (such as Liu Xiao' er managers) can be directly used as the nickname of the contact; if the name field of the contact does not contain the first type of keywords and the title field is not empty, simplifying the information in the name field and the title field to obtain the nickname of the contact, wherein if the information in the name field is Zhang III and the information in the title field is engineer, the Zhang III can be simplified into Zhang III and the engineer can be simplified into a worker and then combined into Zhang I to be used as the nickname of the contact; if the name field of the contact does not contain the first type of keywords and the title field is empty, other information except the first character in the information in the name field can be used as the nickname of the contact, and if the information in the name field is 'Lisi', the 'thinking' can be used as the nickname of the contact. The nickname of the contact can be determined from various fields (nickname field, name field, title field and the like), and the method is suitable for determining the nickname under various application scenes (nickname/nickname-free, English/Chinese name field, specified keywords in the name field and the like).
Example 2
The method for sending short messages in a group is described in detail below with reference to an application scenario of sending short messages in a group, and as shown in fig. 2, the method for sending short messages in a group includes the following steps when the embodiment of the present invention is executed:
step 201, a user edits a short message to be sent in a group mode and determines a contact list for receiving the short message;
for example, the short message to be mass-sent edited by the user is "happy spring festival, happy family", 8 contacts receiving the short message, and the names are "three open", "Liquan", "lisa", "Liushi", "Dulala manager (company)", "brother", "Jike meaning", and "langan" in this order.
Step 202, when the mobile phone receives a command of group sending a short message sent by a user, traversing a contact list for receiving the short message, reading and determining whether a nickname field of a currently traversed contact is empty;
when the nickname field of the currently traversed contact is not empty, executing step 203;
when the nickname field of the currently traversed contact is empty, executing step 204;
in the specific implementation of this embodiment, the "intelligent call" button and the "recovery" button may be clicked on the call edit page of the group-sent short message, when the user clicks the "intelligent call button", the nickname of the contact receiving the short message is generated in the manner described in steps 202 to 210, and when the user clicks the "recovery" button, the generation process of the nickname is cancelled.
Step 203, the mobile phone takes the information in the nickname field of the currently traversed contact as the nickname of the currently traversed contact, and step 211 is executed;
for example, if the nickname field of the currently traversed contact "zhang san" is not empty and is "three", then "three" is directly used as the nickname of the currently traversed contact "zhang san".
Step 204, the mobile phone reads and determines the character type of the information in the name field of the currently traversed contact;
when the determined character type is english, go to step 205;
when the determined character type is Chinese, go to step 206;
step 205, the mobile phone takes the information in the name field of the currently traversed contact as the nickname of the currently traversed contact, and step 211 is executed;
for example, the nickname field of the currently traversed contact "lisa" is empty, and the information in the name field of the currently traversed contact "lisa" is "lisa", and the character type is english, at this time, "lisa" is directly used as the nickname of the currently traversed contact "lisa".
Step 206, the mobile phone reads and determines whether preset first-class keywords exist in the name field of the currently traversed contact;
when the preset first type keywords exist in the name field of the currently traversed contact, executing step 207;
when the preset first type keywords do not exist in the name field of the currently traversed contact, executing step 208;
in this example, reading and determining whether the predetermined first type keyword exists in the name field of the currently traversed contact may specifically be:
reading the information in the name field of the currently traversed contact, matching the read information with each keyword in a pre-stored first-class keyword list, and confirming that the preset first-class keyword exists in the name field of the currently traversed contact when the keyword given in the first-class keyword list exists in the read information.
In this example, the first-type keywords in the first-type keyword list may be keywords of a naming class, and specific contents may be as shown in table 1.
TABLE 1
|
|
|
|
Tai |
Mr. first |
Bo et al |
Bo et al |
Brother (a kind of toy) |
Sister for treatment of disease |
Brother |
Sister |
Jiu (a Chinese character) |
Gu (Chinese character of 'Gu') |
Grandpa |
Milk |
Brother |
Dong (Dong) |
Manager |
Aunt |
Tertiary amine |
Everywhere is grown |
Local leader |
Length of the neck |
Hall length |
Korea to Ke Long |
Country leader |
Ballast for children |
Sail long |
The city leader |
Conductor of a truck |
Master master |
Step 207, the mobile phone processes the information in the name field of the currently traversed contact according to a first rule to be used as a nickname of the currently traversed contact, and step 211 is executed;
in this example, the nickname of the currently traversed contact after processing the information in the name field of the currently traversed contact according to the first rule may be:
determining whether the name field of the currently traversed contact contains a second type of keyword;
when the name field of the currently traversed contact contains the second type of key words, the second type of key words in the information in the name field of the currently traversed contact are removed and used as the nickname of the currently traversed contact;
and when the name field of the currently traversed contact does not contain the second type of key words, taking the information in the name field of the currently traversed contact as the nickname of the currently traversed contact.
In this example, determining whether the name field of the currently traversed contact contains the second type keyword may be:
and reading the information in the name field of the currently traversed contact, matching the read information with each keyword in a pre-stored second-type keyword list, and confirming that the preset second-type keyword exists in the name field of the currently traversed contact when the keyword given in the second-type keyword list exists in the read information.
In this example, the keywords in the second type keyword class table may be information such as attribution, unit, number type identifier, and the like, and the specific content may be as shown in table 2.
TABLE 2
Unit of |
Move |
Are communicated |
Fixed telephone |
Mobile phone |
Company(s) |
Beijing |
Shanghai province |
For example, the name field of the currently traversed contact person "durala manager (company)" contains the first type keyword "manager" and the second type keyword "company", and the "durala manager" with the word of "company" in the contact name field removed is used as the nickname of the currently traversed contact person "durala manager (company)".
For example, if the name field of the currently traversed contact "di" contains the first type of keyword, but does not contain the second type of keyword, the "di" is directly used as the nickname of the currently traversed contact "di".
Step 208, the mobile phone reads and determines whether the title field of the currently traversed contact is empty;
when the title field of the currently traversed contact is not empty, executing step 209;
when the title field of the currently traversed contact is empty, executing step 210;
step 209, the mobile phone simplifies and combines the information in the name field and the information in the title field of the current traversal, takes the simplified and combined information as the nickname of the contact of the current traversal, and executes step 211;
in this example, the simplifying and combining the information in the name field and the information in the title field of the current traversal may include:
extracting a first character in a name field of a currently traversed contact; searching a preset information simplification table to obtain simplified information corresponding to the information in the title field of the currently traversed contact; and merging the first character with the searched simplified information.
In this example, the title field may be a field describing information such as the title, the unit (work unit or learning unit) and the like of the currently traversed contact, and the simplified information corresponding to the information in the title field may be as shown in table 3.
TABLE 3
Title |
For short |
President |
President |
Manager |
Manager |
Hunting head |
Hunting head |
Secretary |
Secretary |
Lawyer |
Lawyer |
Plaiting guide |
Plaiting guide |
Finance affairs |
Finance affairs |
VP |
General assembly |
CEO |
General assembly |
President |
General assembly |
Book-keeping book |
Book-keeping book |
Judge of law |
Judge of law |
Lawyer |
Lawyer |
Consultant |
Consultant |
Main pipe |
Main pipe |
Accountant |
Accountant |
Neglect of |
Neglect of |
Doctor |
Doctor |
Teacher's teacher |
Teacher |
Teacher |
Teacher |
Police officer |
Police officer |
Hunting head |
Hunting head |
Plan for planning |
Plan for planning |
Master and ren |
Master and ren |
Policeman |
Police officer |
Coach |
Coach |
Engineer(s) |
Worker's tool |
Person in charge |
General assembly |
Boss |
General assembly |
For example, if the title field of the currently traversed contact "lie four" is not empty and the content is "person in charge", the nickname obtained by simply combining the content "lie four" of the name field of the currently traversed contact and the content "person in charge" of the title field is "lie total".
Step 210, the mobile phone processes the information in the name field of the currently traversed contact according to a second rule to be used as a nickname of the currently traversed contact, and step 211 is executed;
in this example, the nickname of the currently traversed contact after processing the information in the name field of the currently traversed contact according to the second rule may be:
and taking other information except the first character in the name field of the current traversal as the nickname of the contact of the current traversal. Or,
determining the number of characters of information in a name field traversed currently;
and when the number of characters of the information in the name field of the current traversal is not less than a first preset value of characters or not more than a second preset value of characters, taking the information in the name field of the contact of the current traversal as the nickname of the contact of the current traversal.
In this example, the first predetermined value and the second predetermined value may be set manually or automatically by software, for example, the first predetermined value may be 4, the second predetermined value may be 2, and the like, and this example is not limited.
For example, if the title field of the currently traversed contact person "Liushi" is empty, "poems" other than the first character "Liushi" in the name field may be used as the nickname of the contact person "Liushi";
for example, if the title field of the currently traversed contact "meaning" is empty, the information "meaning" in the name field can be directly used as the nickname of the contact "meaning";
for example, if the title field of the currently traversed contact "lang" is empty, the information "lang" in the name field may be directly used as the nickname of the contact "lang".
And step 211, the mobile phone adds the determined nickname to the starting position of the short message, and sends the short message added with the nickname to the currently traversed contact.
When the short message ' happy spring festival and happy family ' is sent to the contact person in the contact person list in a group way, after the processing of the scheme, the short message sent to the contact person with three opening is ' three, happy spring festival and happy family ', the short message sent to the contact person with four is ' plum sum, happy spring festival and happy family ', the short message sent to the contact person with lisa is ' lisa, happy spring festival and happy family ', the short message sent to the contact person with Liu poet is ' poet, happy spring festival and happy family ', the short message sent to the contact person with Dula manager (company) is ' Dula manager, happy spring festival and happy family ', the short message sent to the contact person with brother is ' brother, happy spring festival and happy family ', the short message sent to the contact person with happy spring festival and happy family ' is ' Jike-happy spring festival, happy spring festival and happy family ', and the short message sent to the contact person with Jike-happy family is ' happy spring festival and happy family '.
When the embodiment of the invention sends the short message in group, the nickname of the contact person receiving the short message is automatically added into the short message sent in group, so that the short message sent in group has more pertinence.
In addition, when the nickname of the contact person receiving the mass-sent short message is specifically determined, the nickname of the contact person can be determined from various fields (nickname field, name field, title field and the like), and the method is suitable for determining the nickname under various application scenes (nickname/no nickname, English/Chinese name field, specified keyword and the like in the name field).
Example 3
Based on the same inventive concept, the embodiment of the invention also provides a device and a terminal for sending the short message, and as the principle of solving the problems of the device and the terminal is similar to the method for sending the short message, the implementation of the device and the terminal can refer to the implementation of the method, and repeated parts are not repeated.
As shown in fig. 3, the apparatus for sending a short message according to an embodiment of the present invention may include:
the nickname determining module 301 may be configured to, when sending a short message, determine, if a request for adding a nickname is received, a nickname of a contact receiving the short message from description fields of the contact receiving the short message, where the description fields at least include a nickname field, a name field, and a title field;
the information sending module 302 may be configured to add the determined nickname to the short message, and send the short message to which the nickname is added to the contact person receiving the short message.
Preferably, referring to fig. 4, the nickname determining module 301 may comprise:
the first determination unit 3011 may be configured to read and determine whether a nickname field of a contact receiving a short message is empty;
the first nickname determining unit 3012 may be configured to, when the nickname field of the contact receiving the short message is not empty, use information in the nickname field of the contact receiving the short message as the nickname of the contact receiving the short message;
the second determination unit 3013 may be configured to, when the nickname field of the contact receiving the short message is empty, read and determine a character type of information in the name field of the contact receiving the short message;
the second nickname determining unit 3014 may be configured to, when the determined character type is english, use information in a name field of a contact receiving the short message as a nickname of the contact receiving the short message;
the third nickname determining unit 3015 may be configured to determine, according to a predetermined rule, a nickname of a contact receiving the short message from a name field and a title field of the contact receiving the short message when the determined character type is chinese.
Preferably, referring to fig. 5, the third nickname determining unit 3015 may include:
the first judging subunit 30151 may be configured to read and determine whether a predetermined first type keyword exists in a name field of a contact receiving a short message;
the first nickname determining subunit 30152 may be configured to, when a predetermined first type of keyword exists in a name field of a contact receiving the short message, process information in the name field of the contact receiving the short message according to a first rule, and then use the processed information as a nickname of the contact receiving the short message;
the second judging subunit 30153 may be configured to, when the predetermined first type keyword does not exist in the name field of the contact receiving the short message, read and determine whether the title field of the contact receiving the short message is empty;
the second nickname determining subunit 30154 may be configured to, when the title field of the contact receiving the short message is not empty, simplify and combine information in the name field and information in the title field of the contact receiving the short message, and use the simplified and combined information as the nickname of the contact receiving the short message;
the third nickname determining subunit 30155 may be configured to, when the title field of the contact receiving the short message is empty, process the information in the name field of the contact receiving the short message according to the second rule, and then use the processed information as the nickname of the contact receiving the short message.
Preferably, the first determining subunit 30151 is configured to read information in a name field of a contact receiving a short message, match the read information with each keyword in a pre-stored first type keyword list, and when there is a keyword in the read information that is given in the first type keyword list, determine that there is a predetermined first type keyword in the name field of the contact receiving the short message.
Preferably, the first nickname determining subunit 30152 may be configured to determine whether a name field of a contact receiving the short message contains a second type of keyword; when the name field of the contact receiving the short message contains the second type of key words, the second type of key words in the name field information of the contact receiving the short message are removed and used as the nickname of the contact receiving the short message; and when the name field of the contact receiving the short message does not contain the second type of key words, taking the information in the name field of the contact receiving the short message as the nickname of the contact receiving the short message.
Preferably, the second judging subunit 30153 is configured to read information in a name field of a contact person receiving the short message, match the read information with each keyword in a pre-stored second-type keyword list, and when there is a keyword in the read information, determine that a predetermined second-type keyword exists in the name field of the contact person receiving the short message.
Preferably, the second nickname determining subunit 30154 may be configured to extract a first character in a name field of a contact receiving the short message; searching a preset information simplification table to obtain simplified information corresponding to information in a title field of a contact receiving the short message; and merging the first character with the searched simplified information.
Preferably, the third nickname determining subunit 30155 may be configured to use information other than the first character in the name field of the contact receiving the short message as the nickname of the contact receiving the short message, or may be configured to determine the number of characters of information in the name field of the contact receiving the short message; and when the number of characters of the information in the name field of the contact receiving the short message is not less than a first preset value or not more than a second preset value, taking the information in the name field of the contact receiving the short message as the nickname of the contact receiving the short message.
When the embodiment of the invention sends the short message, the nickname of the contact person receiving the short message is automatically added into the sent short message, so that the sent short message has more pertinence.
The embodiment of the invention also provides a terminal and the device for sending the short message. The terminal may be a mobile phone.
Through the above description of the embodiments, it is clear to those skilled in the art that the embodiments of the present invention may be implemented by hardware, or by software plus a necessary general hardware platform. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods according to the embodiments of the present invention.
Those skilled in the art will appreciate that the drawings are merely schematic representations of one preferred embodiment and that the blocks or flow diagrams in the drawings are not necessarily required to practice the present invention.
Those skilled in the art will appreciate that the modules in the devices in the embodiments may be distributed in the devices in the embodiments according to the description of the embodiments, and may be correspondingly changed in one or more devices different from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.