Message sending method, system and device and computer readable storage medium

By determining the target transmission channel based on preset transmission information and sending messages using the target channel sender, the problem of insufficient scalability and flexibility of message transmission in the prior art is solved, and efficient and flexible message transmission is achieved.

CN119584064APending Publication Date: 2025-03-07SUZHOU WANDIANZHANG NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411858827.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the existing technology, in scenarios such as planning store inspections, the scalability and flexibility of message transmission are poor, and a large number of judgment processes are required to encapsulate and send messages.

Method used

By obtaining the target message to be sent and determining the target sending channel of the target message based on the preset sending information, a pre-generated target channel sender is obtained, and the target message is sent according to the target channel sender.

Benefits of technology

It improves the determination efficiency and message sending efficiency of the target sending channel, enhances the scalability and flexibility of message sending, and facilitates the adjustment of preset sending information and channel sender to meet different needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119584064A_ABST
    Figure CN119584064A_ABST
Patent Text Reader

Abstract

The invention discloses a message sending method, system and device and a computer readable storage medium, and relates to the technical field of communication, and the method comprises the steps: obtaining a to-be-sent target message; according to preset sending information, a target sending channel of the target message is determined, and the preset sending information comprises information for setting a corresponding sending channel for the message; obtaining a pre-generated target channel sender corresponding to the target sending channel; and sending the target message according to the target channel sender. According to the message sending method and device, the process of determining the sending channel through judgment does not exist, the determining efficiency of the target sending channel is improved, the target message can be directly sent according to the target channel sender only by obtaining the target channel sender, the process of sending the message through judgment does not exist, and the message sending efficiency is improved; besides, the message sending mode can be adjusted only by adjusting the preset sending information and the channel sender, and the expansibility and the flexibility of message sending are high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and more specifically, to a message sending method, system, device and computer-readable storage medium. Background Art

[0002] Currently, in scenarios such as planned store inspections, the generated messages need to be sent to the receiving end. However, due to the diversity of messages, a large number of judgment processes are required to encapsulate and send the messages, resulting in poor scalability and flexibility in message sending.

[0003] In summary, how to improve the scalability and flexibility of message sending is a problem that currently needs to be solved urgently by those skilled in the art. Summary of the invention

[0004] The purpose of the present application is to provide a message sending method, which can solve the technical problem of how to improve the scalability and flexibility of message sending to a certain extent. The present application also provides a message sending system, an electronic device and a computer-readable storage medium.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] A message sending method, comprising:

[0007] Get the target message to be sent;

[0008] Determining a target sending channel of the target message according to preset sending information, wherein the preset sending information includes information for setting a corresponding sending channel for the message;

[0009] Acquire a pre-generated target channel sender corresponding to the target sending channel;

[0010] The target message is sent according to the target channel sender.

[0011] Preferably, determining the target sending channel of the target message according to the preset sending information includes:

[0012] Get the initial channel sender corresponding to each type of message that has been generated;

[0013] Determine the target sending information corresponding to the target message in the preset sending information;

[0014] In the initial channel sender, the initial channel sender corresponding to the target sending information is determined as the target channel sender.

[0015] Preferably, generating an initial channel transmitter includes:

[0016] Get the target interface that implements the message sending function;

[0017] Generate a public template parent class that implements the target interface;

[0018] Get the information of the initial sending channel;

[0019] The common template parent class is adjusted according to the information of the initial sending channel to obtain an initial channel sender.

[0020] Preferably, generating a common template parent class that implements the target interface includes:

[0021] Obtain the defined message body parent class, wherein the message body parent class includes information on whether to send asynchronously, whether to synchronize messages, identification information, use case information, and message processing information;

[0022] The message body parent class is template generated according to the target interface to obtain a common template parent class that implements the target interface.

[0023] Preferably, determining the target sending channel of the target message according to the preset sending information includes:

[0024] Determine the target sending channel of the target message according to the preset sending information, wherein the target sending channel includes a parameter verification method, a message body splicing method, a log recording method, a message sending method and a sending result processing method;

[0025] The sending of the target message according to the target channel sender includes:

[0026] Performing parameter verification on the target message according to the parameter verification method, and if the verification passes, splicing the target message according to the message body splicing method;

[0027] Generate log information corresponding to the target message according to the log recording method;

[0028] Sending the spliced ​​target message according to the message sending method;

[0029] After the target message is sent by the target channel sender, the method further includes:

[0030] Obtaining the sending result of the target message;

[0031] The sending result is processed according to the sending result processing method.

[0032] Preferably, determining the target sending channel of the target message according to the preset sending information includes:

[0033] According to the preset sending information, the target sending channel of the target message is determined, and the target sending channel includes one or more of an application software sending channel, a text message sending channel, a web page sending channel, a telephone sending channel, and an email sending channel.

[0034] Preferably, determining the target sending channel of the target message according to the preset sending information includes:

[0035] Determining a target sending channel of the target message according to preset sending information, wherein the target sending channel includes a plurality of sending channels arranged in sequence;

[0036] The sending of the target message according to the target channel sender includes:

[0037] Starting from the first sending channel among the target sending channels, the sending channels that are not used among the target sending channels are selected in sequence to send the target message.

[0038] A message sending system, comprising:

[0039] A first acquisition module, used to acquire a target message to be sent;

[0040] A first determining module, configured to determine a target sending channel of the target message according to preset sending information, wherein the preset sending information includes information for setting a corresponding sending channel for the message;

[0041] A second acquisition module is used to acquire a pre-generated target channel sender corresponding to the target sending channel;

[0042] The first sending module is used to send the target message according to the target channel sender.

[0043] An electronic device, comprising:

[0044] Memory for storing computer programs;

[0045] A processor is used to implement the steps of any of the message sending methods described above when executing the computer program.

[0046] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the message sending methods described above are implemented.

[0047] The present application provides a message sending method, which includes obtaining a target message to be sent; determining a target sending channel of the target message according to preset sending information, wherein the preset sending information includes information about setting a corresponding sending channel for the message; obtaining a pre-generated target channel transmitter corresponding to the target sending channel; and sending the target message according to the target channel transmitter. The preset sending information in the present application records the information about the corresponding sending channel set for the message, that is, the information about which message is sent by which channel. In this way, after obtaining the target message, the corresponding target sending channel can be directly determined according to the preset sending information, and there is no process of determining the sending channel by judgment, which improves the determination efficiency of the target sending channel. Moreover, only the pre-generated target channel transmitter corresponding to the target sending channel is obtained, and the target message can be directly sent according to the target channel transmitter, and there is no process of sending the message by judgment, which improves the message sending efficiency. In addition, only the preset sending information and the channel transmitter need to be adjusted, and the message sending method can be adjusted, and the scalability and flexibility of the message sending are both high. The present application provides a message sending system, an electronic device, and a computer-readable storage medium, which also solve the corresponding technical problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0049] Figure 1 A flowchart of a message sending method provided in an embodiment of the present application;

[0050] Figure 2 A schematic diagram of the structure of a message sending system provided in an embodiment of the present application;

[0051] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0052] Figure 4 Another structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0054] See also Figure 1 , Figure 1 A flowchart of a message sending method provided in an embodiment of the present application.

[0055] A message sending method provided in an embodiment of the present application may include the following steps:

[0056] Step S101: Obtain the target message to be sent.

[0057] In actual applications, the target message to be sent can be obtained first. The type and content of the target message can be flexibly determined according to the application scenario. For example, the target message can be an image message or text message obtained after an inspection of a store, or it can be a message generated by the message sender under user operation.

[0058] Step S102: determining a target sending channel of a target message according to preset sending information, wherein the preset sending information includes information for setting a corresponding sending channel for the message.

[0059] Step S103: Acquire a pre-generated target channel sender corresponding to the target sending channel.

[0060] Step S104: Send the target message according to the target channel sender.

[0061] In actual applications, the sending channels corresponding to various types of messages can be set with the help of preset sending information. The sending channel refers to the channel required for message transmission, so as to directly determine the target sending channel corresponding to the target message, and the channel sender corresponding to each channel can be set. The channel sender refers to the sender that sends the message according to the corresponding channel, so as to send the message with the help of the channel sender. In other words, after obtaining the target message, the target sending channel of the target message can be determined according to the preset sending information, the pre-generated target channel sender corresponding to the target sending channel can be obtained, and the target message can be sent according to the target channel sender.

[0062] In a specific application scenario, in the process of determining the target sending channel of the target message according to the preset sending information, the initial channel senders corresponding to the various types of messages that have been generated can be obtained; in the preset sending information, the target sending information corresponding to the target message is determined; in the initial channel senders, the initial channel sender corresponding to the target sending information is determined as the target channel sender.

[0063] In specific application scenarios, considering that the principles of message sending for various channels are the same, but the specific implementation processes are different, a public template parent class with a sending function can be generated in advance, and then the public template parent class can be adjusted according to the specific channel to quickly generate the corresponding channel sender. That is, in the process of generating the initial channel sender, the target interface that implements the message sending function can be obtained, such as abstracting the message sending function into a target interface; generating a public template parent class that implements the target interface; obtaining the information of the initial sending channel, and the types of the initial sending channel and the target sending channel can be flexibly determined according to actual needs, such as the initial sending channel and the target sending channel can include application software sending One or more of the sending channels such as the initial sending channel, SMS sending channel, web page sending channel, telephone sending channel, email sending channel, and internal company sending channel; adjust the public template parent class according to the information of the initial sending channel to obtain the initial channel sender. In this process, the public target parent class can define the standard link process for message sending, including but not limited to parameter verification, message body assembly, logging, message sending, and sending result processing. Adjusting the public template parent class according to the information of the initial sending channel can be a customized adjustment of the link process in the public template parent class, and with the help of message body splicing, the message body subclass can be used to further define the various attributes or input parameters in the sending channel. In other words, the present application uses the public template parent class to highly abstract and standardize the common functions between different channels, realize the general template of functional logic, ensure the simplicity, unity, and consistency of the code, and the functions of each channel are personalized through the extension of the public template parent class to achieve differentiated business needs.

[0064] In specific application scenarios, in the process of generating a public template parent class that implements the target interface, the defined message body parent class can be obtained. The message body parent class includes information on whether it is sent asynchronously or not, whether the message is synchronized or not, identification information, use case information, message processing information, etc. The identification information may include store ID, enterprise ID, etc. The use case information may include rule ID, message source, user list, etc. The message processing information may include message title, message content, task deadline, whether it is a pending message, whether it is an executor, message type, inspection type, execution type, review details, review jump, etc.; the message body parent class is template generated according to the target interface to obtain the public template parent class that implements the target interface.

[0065] In a specific application scenario, in the process of determining the target sending channel of the target message according to the preset sending information, the target sending channel of the target message can be determined according to the preset sending information, and each sending channel in the target sending channel includes a parameter verification method, a message body splicing method, a log recording method, a message sending method and a sending result processing method; accordingly, in the process of sending the target message according to the target channel sender, the target message can be parameter-verified according to the parameter verification method, and the parameter verification method can be flexibly determined according to the application scenario. If the verification passes, the target message is spliced ​​according to the message body splicing method to ensure the correctness of the message through the parameter verification method, and log information corresponding to the target message is generated according to the log recording method, so as to record the message sending process with the help of the log information, so as to facilitate the subsequent tracing of the message sending process, and then the spliced ​​target message can be sent according to the message sending method; and after sending the target message according to the target channel sender, the sending result of the target message can also be obtained, and the sending result can be processed according to the sending result processing method.

[0066] In actual applications, there may be only one target sending channel, in which case only a single target channel sender is needed to send the target message. However, there may also be multiple target sending channels, in which case multiple target channel senders need to be used to send the target message. In order to avoid the need to introduce a judgment process due to competition among multiple target channel senders, the order of use of channel senders can be predefined, that is, in the process of determining the target sending channel of the target message according to the preset sending information, the target sending channel of the target message can be determined according to the preset sending information, and the target sending channel includes multiple sending channels arranged in order of priority; accordingly, in the process of sending the target message according to the target channel sender, the target sending channel can be selected from the first sending channel in the target sending channel and the sending channels that are not used in the target sending channel can be selected in sequence to send the target message. For ease of understanding, assuming that the target sending channel includes an application software sending channel, a text message sending channel, and a web page sending channel arranged in order of priority, in the process of sending the target message, the target message needs to be sent according to the application software sending channel first, then according to the text message sending channel, and finally according to the web page sending channel.

[0067] It should be noted that the user can adjust the preset sending information and channel sender so that the message sending process meets the user's needs. During this process, the user may be required to register in advance. When the user needs to adjust the preset sending information and / or channel sender, the user may be prompted to enter the registration information to verify whether the information entered by the user is correct. If correct, the preset sending information and / or channel sender will be displayed, and the user's adjustment information on the preset sending information and / or channel sender will be received. This adjustment information may include addition, deletion, change, etc. The preset sending information and / or channel sender is adjusted according to the adjustment information, such as deleting the sending channel corresponding to a message in the preset sending information, or adding a certain type of channel sender, etc.

[0068] The present application provides a message sending method, which includes obtaining a target message to be sent; determining a target sending channel of the target message according to preset sending information, wherein the preset sending information includes information for setting a corresponding sending channel for the message; obtaining a pre-generated target channel transmitter corresponding to the target sending channel; and sending the target message according to the target channel transmitter. The preset sending information in the present application records the information of the corresponding sending channel set for the message, that is, the information of which message is sent by which channel. In this way, after obtaining the target message, the corresponding target sending channel can be directly determined according to the preset sending information, and there is no process of determining the sending channel by judgment, which improves the efficiency of determining the target sending channel. Moreover, only the pre-generated target channel transmitter corresponding to the target sending channel needs to be obtained, and the target message can be directly sent according to the target channel transmitter, and there is no process of sending the message by judgment, which improves the efficiency of message sending. In addition, the message sending method can be adjusted by adjusting the preset sending information and the channel transmitter, and the scalability and flexibility of message sending are both high.

[0069] See also Figure 2 , Figure 2 A structural diagram of a message sending system provided in an embodiment of the present application.

[0070] A message sending system provided in an embodiment of the present application may include:

[0071] A first acquisition module 101 is used to acquire a target message to be sent;

[0072] A first determining module 102, configured to determine a target sending channel of a target message according to preset sending information, wherein the preset sending information includes information for setting a corresponding sending channel for the message;

[0073] The second acquisition module 103 is used to acquire a pre-generated target channel sender corresponding to the target sending channel;

[0074] The first sending module 104 is used to send the target message according to the target channel sender.

[0075] In a message sending system provided in an embodiment of the present application, the first determination module may include:

[0076] A first acquisition unit is used to acquire initial channel senders corresponding to various types of messages that have been generated;

[0077] A first determining unit, configured to determine target sending information corresponding to a target message in preset sending information;

[0078] The second determining unit is used to determine, among the initial channel transmitters, the initial channel transmitter corresponding to the target transmission information as the target channel transmitter.

[0079] A message sending system provided by an embodiment of the present application, wherein a first acquisition unit is used to: acquire a target interface that implements a message sending function; generate a common template parent class that implements the target interface; acquire information of an initial sending channel; and adjust the common template parent class according to the information of the initial sending channel to obtain an initial channel sender.

[0080] A message sending system provided by an embodiment of the present application, wherein a first acquisition unit is used to: obtain a defined message body parent class, the message body parent class including information on whether the message is sent asynchronously, whether the message is synchronized, identification information, use case information, and message processing information; perform template generation on the message body parent class according to a target interface to obtain a common template parent class that implements the target interface.

[0081] In a message sending system provided in an embodiment of the present application, the first determination module may include:

[0082] A third determining unit is used to determine a target sending channel of the target message according to preset sending information, where the target sending channel includes a parameter verification method, a message body splicing method, a log recording method, a message sending method, and a sending result processing method;

[0083] The first sending module may include:

[0084] A first verification unit, configured to perform parameter verification on a target message according to a parameter verification method, and if the verification passes, splicing the target message according to a message body splicing method;

[0085] A first generating unit, configured to generate log information corresponding to a target message according to a log recording method;

[0086] A first sending unit, configured to send the spliced ​​target message according to a message sending mode;

[0087] It may also include:

[0088] A third acquisition module is used to acquire a sending result of the target message after the first sending module sends the target message according to the target channel sender;

[0089] The first processing module is used to process the sending result according to the sending result processing method.

[0090] In a message sending system provided in an embodiment of the present application, the first determination module may include:

[0091] The fourth determination unit is used to determine the target sending channel of the target message according to the preset sending information, and the target sending channel includes one or more of the application software sending channel, the SMS sending channel, the web page sending channel, the telephone sending channel, and the email sending channel.

[0092] In a message sending system provided in an embodiment of the present application, the first determination module may include:

[0093] A fifth determining unit, configured to determine a target sending channel of the target message according to preset sending information, wherein the target sending channel includes a plurality of sending channels arranged in a sequential order;

[0094] The first sending module may include:

[0095] The second sending unit is used to start from the first sending channel in the target sending channel and sequentially select the sending channels that are not used in the target sending channel to send the target message.

[0096] The present application also provides an electronic device and a computer-readable storage medium, both of which have the corresponding effects of the message sending method provided in the embodiment of the present application. Figure 3 , Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0097] An electronic device provided in an embodiment of the present application includes a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the steps of the message sending method described in any of the above embodiments are implemented.

[0098] See also Figure 4, another electronic device provided in the embodiment of the present application may also include: an input port 203 connected to the processor 202, for transmitting commands input from the outside to the processor 202; a display unit 204 connected to the processor 202, for displaying the processing results of the processor 202 to the outside; a communication module 205 connected to the processor 202, for realizing communication between the electronic device and the outside. The display unit 204 can be a display panel, a laser scanning display, etc.; the communication method adopted by the communication module 205 includes but is not limited to mobile high-definition link technology (Mobile High-Definition Link, MHL), Universal Serial Bus (Universal Serial Bus, USB), High-Definition Multimedia Interface (High-DefinitionMultimedia Interface, HDMI), wireless connection: wireless fidelity technology (WIreless Fidelity, WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE802.11s.

[0099] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the message sending method described in any of the above embodiments are implemented.

[0100] The computer-readable storage medium involved in this application includes random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs (Compact Disc Read-Only Memory), or any other form of storage medium known in the technical field.

[0101] For the description of the relevant parts of a message sending system, electronic device, and computer-readable storage medium provided in the embodiments of the present application, please refer to the detailed description of the corresponding parts in a message sending method provided in the embodiments of the present application, which will not be repeated here. In addition, the parts of the above-mentioned technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.

[0102] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0103] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A message sending method, characterized in that: include: Get the target message to be sent; Determining a target sending channel of the target message according to preset sending information, wherein the preset sending information includes information for setting a corresponding sending channel for the message; Acquire a pre-generated target channel sender corresponding to the target sending channel; The target message is sent according to the target channel sender.

2. The method according to claim 1, characterized in that: The step of determining a target sending channel of the target message according to preset sending information includes: Get the initial channel sender corresponding to each type of message that has been generated; Determine the target sending information corresponding to the target message in the preset sending information; In the initial channel sender, the initial channel sender corresponding to the target sending information is determined as the target channel sender.

3. The method according to claim 2, characterized in that Generate the initial channel sender, including: Get the target interface that implements the message sending function; Generate a public template parent class that implements the target interface; Get the information of the initial sending channel; The common template parent class is adjusted according to the information of the initial sending channel to obtain an initial channel sender.

4. The method according to claim 3, characterized in that: The generating of a common template parent class that implements the target interface includes: Obtain the defined message body parent class, wherein the message body parent class includes information on whether to send asynchronously, whether to synchronize messages, identification information, use case information, and message processing information; The message body parent class is template generated according to the target interface to obtain a common template parent class that implements the target interface.

5. The method according to claim 1, characterized in that: The step of determining a target sending channel of the target message according to preset sending information includes: Determine the target sending channel of the target message according to the preset sending information, wherein the target sending channel includes a parameter verification method, a message body splicing method, a log recording method, a message sending method and a sending result processing method; The sending of the target message according to the target channel sender includes: Performing parameter verification on the target message according to the parameter verification method, and if the verification passes, splicing the target message according to the message body splicing method; Generate log information corresponding to the target message according to the log recording method; Sending the spliced ​​target message according to the message sending method; After the target message is sent by the target channel sender, the method further includes: Obtaining the sending result of the target message; The sending result is processed according to the sending result processing method.

6. The method according to claim 1, characterized in that The step of determining a target sending channel of the target message according to preset sending information includes: According to the preset sending information, the target sending channel of the target message is determined, and the target sending channel includes one or more of an application software sending channel, a text message sending channel, a web page sending channel, a telephone sending channel, and an email sending channel.

7. The method according to claim 1, characterized in that The step of determining a target sending channel of the target message according to preset sending information includes: Determining a target sending channel of the target message according to preset sending information, wherein the target sending channel includes a plurality of sending channels arranged in sequence; The sending of the target message according to the target channel sender includes: Starting from the first sending channel among the target sending channels, the sending channels that are not used among the target sending channels are selected in sequence to send the target message.

8. A message sending system, characterized in that: include: A first acquisition module, used to acquire a target message to be sent; A first determining module, configured to determine a target sending channel of the target message according to preset sending information, wherein the preset sending information includes information for setting a corresponding sending channel for the message; A second acquisition module is used to acquire a pre-generated target channel sender corresponding to the target sending channel; The first sending module is used to send the target message according to the target channel sender.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the message sending method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the message sending method according to any one of claims 1 to 7 are implemented.