A method, device, electronic device and storage medium for sending messages through all channels
Through the multi-channel sending method of the message sending platform, the message sending file is parsed and encapsulated, and the sending channel is determined, which solves the problem of low message sending efficiency and high cost in the marketing business, achieves multi-channel sending capabilities and precise delivery, and improves marketing conversion Rate.
Patent Information
- Application Number
- CN202311297827.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-08
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2043-10-08
AI Technical Summary
In the marketing business, when faced with sending a large number of messages, the existing technology is inefficient. The cost of sending text messages is high and the effect is not obvious, which cannot meet the increasing business marketing needs.
Obtain the message sending file through the message sending platform, parse and encapsulate it into the message sending message body, determine the sending channel type according to the message type and terminal information, and call the corresponding message sending channel service to realize multi-channel message sending.
It realizes multi-channel message sending capabilities, reduces costs, improves efficiency, saves time, reduces duplication of work, supports flexible message sending content configuration and intelligent routing, improves the precise delivery of message content, and meets complex business needs. Improved marketing success conversion rate.
Smart Images

Figure CN117376300B
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method, device, electronic device and storage medium for sending messages through all channels. Background Art
[0002] With the rapid development of marketing business, due to business needs, more and more scenarios require frequent information interaction with users. Generally speaking, the bank can use the message platform to edit the message content through web operations, select the recipients and then send the message. However, when facing the need to send a large number of messages, editing and sending messages one by one obviously becomes a very complicated task. Moreover, in many scenarios, such as financial marketing, event notifications, etc., except for the different recipients of the messages, the text messages are the same. Editing and sending messages one by one is inefficient.
[0003] At present, the bank's batch file messages only support sending messages via SMS channels. However, the cost of sending SMS messages is high and the effect is not obvious. It does not significantly improve the successful conversion rate of marketing and cannot meet the increasing business marketing needs. Summary of the invention
[0004] In order to solve at least one technical problem existing in the above-mentioned related technologies, the embodiments of the present application provide a method, device, electronic device and storage medium for sending messages through all channels.
[0005] A first aspect of an embodiment of the present application provides a method for sending a message through all channels, the method comprising:
[0006] Obtain the message sending file through the message sending platform;
[0007] Send a file based on the message and determine the message type;
[0008] Parsing the message sending file, and reading and encapsulating the message sending file into a message sending message body;
[0009] Acquiring terminal information of a message receiving terminal according to the message sending message body;
[0010] Determine the message sending channel type according to the message type and the terminal information;
[0011] According to the message sending channel type, the message sending channel service is called to send the message sending content included in the message sending message body to the corresponding message receiving terminal.
[0012] In some embodiments, the method further comprises:
[0013] A message template is determined according to the message type, and the message sending content is rendered using the template.
[0014] In some embodiments, the message sending file is uploaded to the file server through various business systems, and the step of obtaining the message sending file through the message sending platform specifically includes:
[0015] Obtaining, by the file server, a mapping relationship suffix corresponding to the batch file format according to the batch file format of the message sending file, and changing the file suffix of the message sending file to the mapping relationship suffix;
[0016] The batch file mapping relationship configuration information is read through the message sending platform, and the message sending file corresponding to the mapping relationship suffix is downloaded from the file server.
[0017] In some embodiments, when executing the step of parsing the message sending file and reading and encapsulating the message sending file into a message sending message body, it also includes:
[0018] When parsing of the message sending file fails, an alarm message is generated, and the message sending file is transferred to an error file directory in the message sending platform.
[0019] In some embodiments, the step of determining a message template according to the message type and performing template rendering on the message sending content specifically includes:
[0020] Determine a message sending method according to the message type; the message sending method includes content direct sending and template sending;
[0021] When the message sending mode is direct sending of the content, no template rendering is performed on the message sending content;
[0022] When the message sending mode is the template sending, the message sending content is rendered according to the message template.
[0023] In some embodiments, the message sending channel types include at least a text message channel, an email channel, a variety of communication software channels, and a variety of application software channels.
[0024] In some embodiments, the step of parsing the message sending file and reading and encapsulating the message sending file into a message sending message body specifically includes:
[0025] Set the file encapsulation threshold;
[0026] Reading the message sending file, determining whether the message sending file contains terminal information corresponding to the message type, and when the message sending file does not contain the terminal information corresponding to the message type, completing the terminal information corresponding to the message type;
[0027] According to the file encapsulation threshold, encapsulating the read message sending file until the message sending file is completely read to obtain the message sending message body;
[0028] The message sending file that has been read is transferred to the successfully read file directory in the message sending platform.
[0029] A second aspect of an embodiment of the present application provides a message omni-channel sending device, comprising:
[0030] The first module is used to obtain a message sending file through a message sending platform;
[0031] The second module is used to send a file according to the message and determine the message type;
[0032] The third module is used to parse the message sending file and read and encapsulate the message sending file into a message sending message body;
[0033] The fourth module is used to obtain the terminal information of the message receiving terminal according to the message sending message body;
[0034] A fifth module is used to determine a message sending channel type according to the message type and the terminal information;
[0035] The sixth module is used to call the message sending channel service according to the message sending channel type, and send the message sending content included in the message sending message body to the corresponding message receiving terminal.
[0036] A third aspect of an embodiment of the present application proposes an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the omni-channel message sending method described in the first aspect is implemented.
[0037] A third aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium includes a computer program, and when the computer program is executed by a processor, the omni-channel message sending method described in the first aspect above is implemented.
[0038] The present application provides a method, device, electronic device and storage medium for sending messages through all channels. The method obtains a message sending file through a message sending platform, parses the message sending file, reads the message body encapsulated as a message sending message, determines the message sending channel type according to the message type and terminal information, calls the message sending channel service according to the message sending channel type, and sends the message sending content to the corresponding message receiving terminal. The present application can be applied to various business scenarios, realize multi-channel message sending capabilities, reduce costs and increase efficiency, improve message sending efficiency, save time and reduce duplication of work, realize more flexible message sending content configuration, support intelligent routing of message sending channels, improve the accurate delivery of message content, meet the complex business needs of users, and improve the successful conversion rate of marketing. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 This is a flow chart of a method for sending messages through all channels provided by an embodiment of the present application;
[0040] Figure 2 It is a schematic diagram of an interface for configuring batch file mapping relationships through a message sending platform in an embodiment of the present application;
[0041] Figure 3 It is a schematic diagram of the structure of the message sending body in the embodiment of the present application;
[0042] Figure 4 This is a flowchart of calling a message sending channel service in an embodiment of the present application;
[0043] Figure 5 It is a structural diagram of a message omni-channel sending device provided in an embodiment of the present application;
[0044] Figure 6 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0046] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0048] Reference Figure 1 , Figure 1 This is an optional flowchart of a method for sending messages through all channels provided in an embodiment of the present application. The method may include but is not limited to steps S101 to S106:
[0049] Step S101, obtaining a message sending file through a message sending platform;
[0050] Step S102, determining the message type according to the message sending file;
[0051] Step S103, parsing the message sending file, reading the message sending file and encapsulating it into a message sending message body;
[0052] Step S104, acquiring the terminal information of the message receiving terminal according to the message sending message body;
[0053] Step S105, determining the message sending channel type according to the message type and terminal information;
[0054] Step S106: according to the message sending channel type, the message sending channel service is called to send the message sending content contained in the message sending message body to the corresponding message receiving terminal.
[0055] In some embodiments, the message types may include SMS messages, WeChat messages, email messages, and notification messages of various applications, etc.
[0056] In some embodiments, the above-mentioned omni-channel message sending method further includes step S107:
[0057] Step S107, determining a message template according to the message type, and performing template rendering on the message content.
[0058] In some embodiments, step S101 may include but is not limited to steps S201 to S202:
[0059] Step S201, obtaining a mapping relationship suffix corresponding to the batch file format according to the batch file format of the message sending file through the file server, and changing the file suffix of the message sending file to the mapping relationship suffix;
[0060] Step S202: read batch file mapping relationship configuration information through the message sending platform, and download the message sending file corresponding to the above mapping relationship suffix from the file server.
[0061] In some embodiments, the message sending file is uploaded to the file server of the message sending platform through each business system. Specifically, in order to isolate the messages sent by different business systems to facilitate the message statistics and cost sharing of each subsequent business system, each business system can set the file upload path, batch file format and its corresponding file suffix in its own management function, generate a message sending file according to the batch file format and the message content file to be sent, and then upload the message sending file to the specified path in the file server according to the preset file upload path.
[0062] In step S201 of some embodiments, after the message sending file is uploaded, the file suffix is renamed by the file server to a mapping relationship suffix corresponding to the batch file format of the message sending file in the batch file mapping relationship.
[0063] In step S202 of some embodiments, the message sending platform reads the batch file mapping relationship configuration information through a scheduled task, and then downloads the message sending file corresponding to the specified mapping relationship suffix from the file server to the local specified directory. Optionally, if the above mapping relationship suffix is .tmp, then the batch message sending files with the suffix .tmp are downloaded.
[0064] The batch file mapping relationship configuration information is used to store and describe the batch file mapping relationship, including the mapping relationship suffixes corresponding to each batch file format. The message sending platform provides a batch file mapping relationship management function, which is used to add, delete, query and modify the batch file mapping relationship configuration information. Figure 2 , Figure 2 It is a schematic diagram of the interface for configuring batch file mapping relationships through a message sending platform in an embodiment of the present application.
[0065] Optionally, the field information of the database corresponding to the batch file mapping relationship configuration information is shown in the following table:
[0066]
[0067] Among them, SOURCE_DIR indicates the specified directory where the message sending file is uploaded to the file server, and TARGET_DIR indicates the specified directory where the successfully sent files are stored after the message sending channel service is called.
[0068] In some embodiments, step S103 may include but is not limited to steps S301 to S304:
[0069] Step S301, setting a file encapsulation threshold;
[0070] Step S302, reading the message sending file, determining whether the message sending file contains terminal information corresponding to the message type, and when the message sending file does not contain the terminal information corresponding to the message type, completing the terminal information corresponding to the message type;
[0071] Step S303, encapsulating the read message sending file according to the file encapsulation threshold until the message sending file is read completely to obtain the message sending message body;
[0072] Step S304, transferring the message sending file that has been read to the successfully read file directory in the message sending platform.
[0073] In some embodiments, the terminal information is a unique identifier of the message receiving terminal. For example, the SMS message type corresponds to a mobile phone number, the WeChat message type corresponds to an openId, and the email message type corresponds to an email address.
[0074] In step S302 of some embodiments, it is determined whether the terminal information of the message receiving terminal needs to be completed, the message type to be sent is queried according to the business type, and it is determined whether the terminal information of the corresponding message type is stored. If it is stored, the terminal information is automatically completed. If it is not stored, a manual input interface is provided, and the terminal information is completed in response to the result of the manual input.
[0075] In step S303 of some embodiments, after reading the message sending file, it is necessary to determine whether the content format of the message sending file conforms to the prescribed file format. If not, stop parsing the message sending file. When parsing the message sending file fails, generate an alarm message to remind relevant operation and maintenance personnel that the file parsing has failed, and transfer the message sending file to the error file directory in the message sending platform.
[0076] If the content format of the message sending file conforms to the prescribed file format, the message sending file is parsed and the file content is read. Optionally, the file encapsulation threshold is set to 100 lines, that is, after reading every 100 lines of file content, it is encapsulated into a consumer sending message body until the file content of the message sending file is read.
[0077] In some embodiments, in order to reduce the risk of message retransmission caused by service downtime, each time after reading 100 lines of message content, the line number of the parsed file will be saved in the corresponding database, and then when reading the parsed file, the starting line number will be obtained from the database. If it is not obtained, the reading and parsing will start from the file header. Each time a line of content is read, the content is split according to the separator "|" in the batch file format, and the content of each field is obtained. The message sending body formed by the 100 lines of file content parsed each time is grouped according to batch name, department number, and business type.
[0078] Reference Figure 3 , Figure 3 It is an optional structural diagram of the message sending body in the embodiment of the present application, wherein the department number and customer manager number are the basic data of the business system, mainly used for the subsequent statistical analysis of the message sending data; the batch name is a non-mandatory field, and the same batch name will be packaged as a batch for sending; the customer number, card number, WeChat openId, mobile phone number, email address, and app user ID are the user's terminal information, and different message types are sent and different terminal information is passed in, such as sending text messages, transmitting mobile phone numbers, sending emails, and transmitting email addresses; Scheduled time: the message sending platform supports scheduled message sending, and the time format is yyyyMMddHHmmss; Business type code: refers to a specific business scenario; the channel sending strategy and content rendering strategy can be configured in the business type; support multi-channel serial or parallel sending, support personalized message content template rendering; Message content: the actual message content sent.
[0079] In step S107 of some embodiments, a message sending mode is determined according to the message type, and the message sending modes include direct content sending and template sending.
[0080] When the message sending mode is direct content sending, the message sending content is not rendered by template; when the message sending mode is template sending, the message sending content is rendered by template according to the message template.
[0081] Specifically, when using the direct content messaging method, the messaging platform will not dynamically render the message content. This method is suitable for scenarios where the message content is not fixed, such as marketing messages. In this messaging method, the upstream business system directly determines the message content to be sent and the terminal that receives the message.
[0082] Template sending is suitable for scenarios where the template of the message content is fixed, such as SMS verification codes and account change messages. When using template sending, the message platform will replace the specified fields of the template according to the parameters passed in by the upstream business system to complete the rendering of the final message content. It also supports advanced features of smart routing and smart templates, such as account change messages. For transaction amounts greater than 100 yuan, SMS messages are sent, and for transaction amounts less than 100 yuan, WeChat messages are sent.
[0083] In the message sending body, the two message sending methods can be expressed in the following two forms:
[0084] Content direct delivery: content is used as the key, and the value is the direct delivery content;
[0085] Template sending: pass the corresponding parameter map, which is a JSON string of key-value, {"key1":"value1","key2":"value2"}.
[0086] In step S106 of some embodiments, the message sending channel types include at least SMS channels, email channels, multiple communication software channels, and multiple application software channels. According to the message type and terminal information, the message sending channel is selected, and the message sending interface of the message sending platform is called to send the actual message sending content contained in the message sending body to the corresponding message receiving terminal.
[0087] Reference Figure 4 , Figure 4 This is an optional flow chart for calling a message sending channel service in an embodiment of the present application, which includes the steps of:
[0088] Receive a message sending request;
[0089] Message template rendering;
[0090] Message channel selection; message channels include SMS channels, WeChat channels, email channels and various App channels;
[0091] Send the message channel to the message receiving terminal.
[0092] Reference Figure 5 , Figure 5 This is an optional structural diagram of a message omni-channel sending device provided in an embodiment of the present application, the device comprising:
[0093] The first module is used to obtain a message sending file through a message sending platform;
[0094] The second module is used to send a file according to the message and determine the message type;
[0095] The third module is used to parse the message sending file and read and encapsulate the message sending file into a message sending message body;
[0096] The fourth module is used to obtain the terminal information of the message receiving terminal according to the message sending message body;
[0097] The fifth module is used to determine the message sending channel type according to the message type and terminal information;
[0098] The sixth module is used to call the message sending channel service according to the message sending channel type, and send the message sending content included in the message sending message body to the corresponding message receiving terminal.
[0099] The specific implementation of the message omni-channel sending device is basically the same as the specific implementation of the above-mentioned message omni-channel sending method, and will not be repeated here.
[0100] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned omni-channel message sending method when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.
[0101] See also Figure 6 , Figure 6 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0102] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0103] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the message omni-channel sending method of the embodiment of this application;
[0104] Input / output interface 903, used to implement information input and output;
[0105] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0106] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0107] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0108] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned omni-channel message sending method is implemented.
[0109] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0110] The embodiment of the present application provides a method, device, electronic device and storage medium for sending messages through all channels, which obtains a message sending file through a message sending platform, parses the message sending file, reads the message body encapsulated as a message sending message, determines the message sending channel type according to the message type and terminal information, calls the message sending channel service according to the message sending channel type, and sends the message sending content to the corresponding message receiving terminal. The present application can be applied to various business scenarios, realize multi-channel message sending capabilities, reduce costs and increase efficiency, improve message sending efficiency, save time and reduce duplication of work, realize more flexible message sending content configuration, support intelligent routing of message sending channels, improve the accurate delivery of message content, meet the complex business needs of users, and improve the successful conversion rate of marketing.
[0111] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0112] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0113] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for sending messages through all channels. It is characterized in that include: Obtain the message sending file through the message sending platform; Send a file based on the message and determine the message type; Parsing the message sending file, and reading and encapsulating the message sending file into a message sending message body; Acquiring terminal information of a message receiving terminal according to the message sending message body; Determine the message sending channel type according to the message type and the terminal information; According to the message sending channel type, calling the message sending channel service, sending the message sending content contained in the message sending message body to the corresponding message receiving terminal; The method further comprises: Determine a message template according to the message type, and perform template rendering on the message sending content; The step of determining a message template according to the message type and performing template rendering on the message sending content specifically includes: Determine a message sending method according to the message type; the message sending method includes content direct sending and template sending; When the message sending mode is direct sending of the content, no template rendering is performed on the message sending content; When the message sending mode is the template sending, performing template rendering on the message sending content according to the message template; The message sending file is uploaded to the file server through each business system, and the step of obtaining the message sending file through the message sending platform specifically includes: Obtaining, by the file server, a mapping relationship suffix corresponding to the batch file format according to the batch file format of the message sending file, and changing the file suffix of the message sending file to the mapping relationship suffix; The batch file mapping relationship configuration information is read through the message sending platform, and the message sending file corresponding to the mapping relationship suffix is downloaded from the file server.
2. The message omni-channel sending method according to claim 1, It is characterized in that When executing the step of parsing the message sending file and reading and encapsulating the message sending file into a message sending message body, it also includes: When parsing of the message sending file fails, an alarm message is generated, and the message sending file is transferred to an error file directory in the message sending platform.
3. The message omni-channel sending method according to claim 1, It is characterized in that The message sending channel types include at least short message channels, email channels, multiple communication software channels, and multiple application software channels.
4. The method for sending messages through all channels according to claim 1, It is characterized in that The step of parsing the message sending file and reading and encapsulating the message sending file into a message sending message body specifically includes: Set the file encapsulation threshold; Reading the message sending file, determining whether the message sending file contains terminal information corresponding to the message type, and when the message sending file does not contain the terminal information corresponding to the message type, completing the terminal information corresponding to the message type; According to the file encapsulation threshold, encapsulating the read message sending file until the message sending file is completely read to obtain the message sending message body; The message sending file that has been read is transferred to the successfully read file directory in the message sending platform.
5. A message omni-channel sending device, It is characterized in that include: The first module is used to obtain a message sending file through a message sending platform; The message sending file is uploaded to the file server through each business system, and the step of obtaining the message sending file through the message sending platform specifically includes: Obtaining, by the file server, a mapping relationship suffix corresponding to the batch file format according to the batch file format of the message sending file, and changing the file suffix of the message sending file to the mapping relationship suffix; Reading batch file mapping relationship configuration information through the message sending platform, and downloading the message sending file corresponding to the mapping relationship suffix from the file server; The second module is used to send a file according to the message and determine the message type; The third module is used to parse the message sending file and read and encapsulate the message sending file into a message sending message body; The fourth module is used to obtain the terminal information of the message receiving terminal according to the message sending message body; A fifth module is used to determine a message sending channel type according to the message type and the terminal information; The sixth module is used to call the message sending channel service according to the message sending channel type, and send the message sending content included in the message sending message body to the corresponding message receiving terminal; The device also includes: Determine a message template according to the message type, and perform template rendering on the message sending content; The step of determining a message template according to the message type and performing template rendering on the message sending content specifically includes: Determine a message sending method according to the message type; the message sending method includes content direct sending and template sending; When the message sending mode is direct sending of the content, no template rendering is performed on the message sending content; When the message sending mode is the template sending, the message sending content is rendered according to the message template.
6. An electronic device, It is characterized in that The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the omni-channel message sending method according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, the computer-readable storage medium comprising a computer program, It is characterized in that When the computer program is executed by a processor, the omni-channel message sending method according to any one of claims 1 to 4 is implemented.
