CN114222256A - Message sending method and device and electronic equipment - Google Patents
Message sending method and device and electronic equipment Download PDFInfo
- Publication number
- CN114222256A CN114222256A CN202111356242.0A CN202111356242A CN114222256A CN 114222256 A CN114222256 A CN 114222256A CN 202111356242 A CN202111356242 A CN 202111356242A CN 114222256 A CN114222256 A CN 114222256A
- Authority
- CN
- China
- Prior art keywords
- message
- target
- template
- information
- configuration
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000012795 verification Methods 0.000 claims description 19
- 230000004044 response Effects 0.000 claims description 18
- 238000012545 processing Methods 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 9
- 230000005540 biological transmission Effects 0.000 claims description 5
- 238000011161 development Methods 0.000 abstract description 14
- 230000008569 process Effects 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 7
- 230000008859 change Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 238000010606 normalization Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/12—Messaging; Mailboxes; Announcements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/02—Arrangements for optimising operational condition
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The disclosure provides a message sending method, a message sending device and electronic equipment, wherein the method comprises the following steps: configuring the configuration information of the message, checking the legality of the configuration information, if the check is passed, generating a configuration file according to the configuration information, responding to a received message sending request, reading a target message template and target server information related to the target message type code from the configuration file according to the target message type code indicated by the message sending request, generating a message according to the target message template and service data, and sending the message to a server indicated by the target server information so as to send the message to a user through the server. The configuration file is dynamically configured according to the configuration information of the message, so that the message can be generated quickly and efficiently, the problems of high development cost and low agility in the prior art are solved, and the experience and satisfaction of a user are improved.
Description
Technical Field
The present disclosure relates to the field of Mobile interconnection technologies, and in particular, to the fields of 5G (5th Generation Mobile Communication Technology, 5G for short) messages, Mobile terminals, and the like, and in particular, to a message sending method, an apparatus, and an electronic device.
Background
With the continuous development of internet technology, users are more accustomed to rich media communication by means of electronic devices such as mobile terminals. Traditional phones only have voice, traditional short messages only have text, and rich media includes various media forms such as text, voice, pictures, video, animation, expressions and the like. Therefore, the way of rich media communication is also continuously developing towards diversification. For example, RCS (Rich Communication Suite), RBM (Rich Business Messaging), and 5G message service have been proposed in the prior art.
However, in practical messaging applications, development costs and complexity are high, and agility is relatively low.
Disclosure of Invention
The disclosure provides a message sending method, a message sending device and electronic equipment, which are used for at least solving the problems of high development cost and low agility in the related technology. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, a message sending method is provided, including:
configuring configuration information of a message, wherein the configuration information comprises a message type code, and a message template and server information which are related to the message type code;
verifying the legality of the configuration information, and if the verification is passed, generating a configuration file according to the configuration information;
in response to receiving a message sending request, reading a target message template and target server information associated with a target message type code from the configuration file according to the target message type code indicated by the message sending request;
generating a message according to the target message template and the service data;
and sending the message to a server indicated by the target server information, so as to send the message to a user through the server.
Optionally, as a first possible implementation manner of the first aspect, the generating a message packet according to the target message template and the service data includes:
determining a plurality of fields to be filled according to the target message template;
reading a plurality of data elements from the service data;
filling the plurality of data elements to corresponding target fields in the plurality of fields to be filled to obtain a payload part;
generating a message header according to the target server information;
and generating the message according to the load part and the message header.
Optionally, as a second possible implementation manner of the first aspect, the message template is a text message template or a card message template.
Optionally, as a third possible implementation manner of the first aspect, in a case that the message template is the card message template, the configuration information of the configuration message includes:
configuring materials in the card message template, wherein the materials comprise at least one of pictures, videos, audios and texts;
and configuring control operation information of the material in the card message template, wherein the control operation information comprises monitored user operation and response events of the user operation.
Optionally, as a fourth possible implementation manner of the first aspect, the method further includes:
and if the verification fails, reconfiguring the configuration information of the message.
The message sending method provided by the disclosure comprises the steps of configuring the configuration information of the message, checking the legality of the configuration information, generating a configuration file according to the configuration information if the configuration information passes the checking, reading a target message template and target server information which are related to the target message type code from the configuration file according to the target message type code indicated by the message sending request in response to the received message sending request, generating a message according to the target message template and service data, and sending the message to a server indicated by the target server information so as to send the message to a user through the server. The configuration file is dynamically configured according to the configuration information of the message, so that the message can be generated quickly and efficiently, the problems of high development cost and low agility in the prior art are solved, and the experience and satisfaction of a user are improved.
According to a second aspect of the embodiments of the present disclosure, there is provided a message transmitting apparatus including:
the system comprises a configuration unit, a processing unit and a processing unit, wherein the configuration unit is used for configuring configuration information of a message, and the configuration information comprises a message type code, a message template related to the message type code and server information;
the verification unit is used for verifying the legality of the configuration information, and if the verification is passed, a configuration file is generated according to the configuration information;
the processing unit is used for responding to a received message sending request, reading a target message template and target server information related to a target message type code from the configuration file according to the target message type code indicated by the message sending request;
the execution unit is used for generating a message according to the target message template and the service data;
and the sending unit is used for sending the message to the server indicated by the target server information so as to send the message to the user through the server.
Optionally, as a first possible implementation manner of the second aspect, the execution unit is specifically configured to:
determining a plurality of fields to be filled according to the target message template;
reading a plurality of data elements from the service data;
filling the plurality of data elements to corresponding target fields in the plurality of fields to be filled to obtain a payload part;
generating a message header according to the target server information;
and generating the message according to the load part and the message header.
Optionally, as a second possible implementation manner of the second aspect, the message template is a text message template or a card message template.
Optionally, as a third possible implementation manner of the second aspect, in a case that the message template is the card message template, the configuration unit is specifically configured to:
configuring materials in the card message template, wherein the materials comprise at least one of pictures, videos, audios and texts;
and configuring control operation information of the material in the card message template, wherein the control operation information comprises monitored user operation and response events of the user operation.
Optionally, as a fourth possible implementation manner of the second aspect, the check unit is further configured to:
and if the verification fails, reconfiguring the configuration information of the message.
The message sending device provided by the disclosure is used for generating a configuration file according to the configuration information by configuring the configuration information of the message and checking the legality of the configuration information, and after reading a target message template and target server information associated with the target message type code from the configuration file according to the target message type code indicated by the message sending request in response to receiving the message sending request, generating a message according to the target message template and service data, so that the message is sent to a server indicated by the target server information, and the message is sent to a user through the server. The configuration file is dynamically configured according to the configuration information of the message, so that the message can be generated quickly and efficiently, the problems of high development cost and low agility in the prior art are solved, and the experience and satisfaction of a user are improved.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the messaging method of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the message sending method of the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the message sending method of the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects: the method has the advantages of being capable of generating the message rapidly and efficiently, simple and convenient to operate, low in development cost, easy to change configuration and high in agility, effectively improving the normalization of the message, reducing the error rate of the message, effectively improving the efficiency and accuracy of message sending, and improving the experience and satisfaction of users.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a flow chart illustrating a method of sending a message according to a first embodiment;
fig. 2 is a flow chart illustrating a method of sending a message according to a second embodiment;
fig. 3 is a flow diagram illustrating a method of sending a message according to an embodiment of the disclosure;
fig. 4 is a flow chart illustrating a method of sending a message according to a third embodiment;
FIG. 5 is a block diagram illustrating a messaging device in accordance with an exemplary embodiment;
fig. 6 is a block diagram illustrating an electronic device 600 for message transmission in accordance with an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a message transmission method according to a first embodiment.
The present embodiment is exemplified in that the message sending method is configured in a message sending apparatus, and the message sending apparatus can be applied to any electronic device, so that the electronic device can execute a message sending function.
As shown in fig. 1, the message transmitting method may include the steps of:
In this embodiment, the message may be any message that needs to be sent.
In this embodiment, the configuration information of the message may be configured by the developer, where the configuration information includes the message type code, and the message template and the server information associated with the message type code.
As a possible implementation manner, the developer may establish a binding relationship between the message template and the server information, and indicate the binding relationship between the message template and the server information through the message type code, so that the message template and the server information may be determined according to the message type code.
Optionally, the developer may define the message type code by itself, or the developer may select the message type code defined before itself according to the application scenario of message sending, and the like, which is not limited in this embodiment.
In this embodiment, the message template is a message template set according to a specified format transmittable by the server, that is, a fixed form of the message, and includes a text message template and a card message template.
As a possible implementation manner, when the configured message template is a text message template, a developer needs to configure reply text messages of different messages, for example, in an online shopping scenario, when a user inputs "find express," a reply text message that the user can perform a logistics message query through what service may be sent to the user, for example, the content of the reply text message may be "you can click" order center "to find a corresponding order and then query a logistics message.
As another possible implementation manner, when the configured message template is a card message template, the developer needs to configure the relevant information of the card message template, for example, in a sales order placing scenario, when the user completes payment order placing, the card message template is used to send the order placing information to the user, and then the content of the card message template may include one or more combinations of order status, order placing time, store name, warm prompt, and view details.
Optionally, the developer may define the message template by itself, or the developer may select a message template already defined by the development system, or the developer may use a message template that is previously defined by the developer, and the like, which is not limited in this embodiment.
Optionally, the developer may configure the server information by deploying the server-side code, or the developer may configure the server information by setting, and the like, which is not limited in this embodiment.
And 102, verifying the legality of the configuration information, and if the verification is passed, generating a configuration file according to the configuration information.
In this embodiment, after configuring the configuration information of the message, the developer needs to check the validity of the configuration information. And only under the condition that the verification is passed, generating a corresponding configuration file according to the configuration information.
Optionally, the developer may check the encoding specification of the message type code, for example, the functionality of the message type code may be checked according to whether the code is correct, whether dependence on a specific platform is avoided, whether a service requirement is met, and other aspects, the maintainability of the message type code may also be checked according to whether the code implementation has hierarchy, whether the code and the data are separated, whether configuration ambiguity is avoided, and other aspects, and the readability of the message type code may also be checked according to whether the code is blocked, whether a uniform naming method is provided, whether deep-level nesting is avoided, and the like, which is not limited in this embodiment.
Optionally, the developer may check the message template for data validity, for example, may check whether a date format in the message template is four years/two months/two dates, whether a mobile phone number is 16 digits, whether a display amount includes at most two decimal places, and the like, which is not limited in this embodiment.
Optionally, the developer may check the validity of the domain name of the server information, for example, may check whether the length and characters of the domain name of the server are legal, and the legal length of the domain name should be 1-63 characters, and the legal characters of the english domain name are a-z, 0-9, "-", where "-", cannot be at the beginning and end, and at the third and fourth character positions at the same time, the chinese domain name must contain at least one chinese character in addition to the legal characters of the english domain name, where the chinese character may be simplified or traditional.
Optionally, in some embodiments, if the check fails, the configuration information of the message is reconfigured.
In some embodiments, if the verification fails, the system information that fails to pass the verification may be thrown to prompt the developer that the configuration information is wrong.
In this embodiment, the configuration file obtained in the previous step may be loaded into a service system for use, so that when a message sending request is received, the service system may read, according to a target message type code indicated by the message sending request, a target message template and target server information associated with the target message type code from the configuration file.
As a possible implementation manner, after the configuration file is loaded into the service system and stored, the service system may analyze the configuration file, thereby obtaining the target message type code, and the message template and the server information associated therewith, and loading the target message type code into the memory. When receiving a message sending request, the service system can determine a target message template and target server information associated with a target message type code according to the target message type code indicated by the message sending request.
It should be understood that the message sending request needs to be able to indicate the target message type code, i.e. the target message type code can be obtained by the message sending request.
And 104, generating a message according to the target message template and the service data.
In this embodiment, the service system may generate a corresponding message according to the target message template and the service data. Optionally, based on the target message template and the service data, a part of fields in the target message template may be modified, so as to generate the message according to the message format specified by the server.
It should be understood that there are many message formats, and the message format should be consistent with the server-specified message format indicated by the target server information.
And 105, sending the message to a server indicated by the target server information, so as to send the message to a user through the server.
In this embodiment, the service system may determine, according to the target server information, a server that receives the message packet, so as to send the message packet to the server, thereby sending the message packet to the user through the server.
In summary, the configuration information of the message is configured and the validity of the configuration information is checked, if the check is passed, the configuration file is generated according to the configuration information, after the target message template and the target server information associated with the target message type code are read from the configuration file according to the target message type code indicated by the message sending request in response to the received message sending request, the message is generated according to the target message template and the service data, and the message is sent to the server indicated by the target server information, so that the message is sent to the user through the server. The configuration file is dynamically configured according to the configuration information of the message, so that the message can be generated quickly and efficiently, the operation is simple and convenient, the development cost is low, the configuration is easy to change, the agility is high, the normalization of the message is effectively improved, the error rate of the message is reduced, the efficiency and the accuracy of message sending are effectively improved, and the experience and the satisfaction of a user are improved.
To clearly illustrate the above embodiment, this embodiment provides another message sending method, and fig. 2 is a flowchart of a message sending method according to the second embodiment.
As shown in fig. 2, the message transmitting method may include the steps of:
In this embodiment, if the validity check of the configuration information fails, optionally, the developer may reconfigure all the configuration information of the message, that is, reconfigure the message type code and the associated message template and server information, or optionally, the developer may reconfigure a part of the configuration information that fails to pass the check, and so on, which is not limited in this embodiment.
For other execution processes of this step, reference may be made to the execution process of step 102 in the foregoing embodiment, which is not described herein again.
In this embodiment, a plurality of fields to be filled in may be determined according to the target message template. As a possible implementation manner, when the target message template is a text message template, the fields to be filled may be data related to business, for example, in an online shopping scenario, when a user inputs "find express", if the message sending content is "you can click on" order center "to find a corresponding order and then query a logistics message", the fields to be filled may be "order center" and "logistics message". When the configured message template is a card message template, the fields to be filled may be fields related to services in the card message template, for example, in a take-away ordering scenario, after the user completes payment ordering, the card message template is used to send ordering information to the user, and if the content of the card message template is "order state", "ordering time", "store name", "warm and fragrant prompt", the fields to be filled may be specific contents of "order state", "ordering time", "store name" and "warm and fragrant prompt", for example, "order state" may fill "accepted order", "ordering time" may fill time paid by the user, and the like, which is not specifically limited in this embodiment.
In this embodiment, according to the plurality of fields to be filled determined in the previous step, the corresponding plurality of data elements may be read from the service data, and then the read plurality of data elements may be filled into the corresponding target fields in the plurality of fields to be filled, so as to obtain the payload portion. The payload part is the payload constituting the message, and can be understood as the information content in the message. As a possible implementation manner, the data elements read from the service data may be filled into the corresponding target fields in the target message template by using the Freemarker technology.
in this embodiment, a header in accordance with the header format specified by the server indicated by the target server information may be generated according to the target server information.
It should be understood that there are many message formats, and the format of the message should be consistent with the message format specified by the server indicated by the target server information, that is, the header format of the message should be consistent with the header format specified by the server indicated by the target server information.
In this embodiment, a message packet may be generated according to the payload part and the header obtained in the above steps. Optionally, the entire payload portion and the header may be spliced to generate a message packet, or optionally, the payload portion may be grouped, and the header and each group may be spliced to generate a plurality of groups of message packets, and the like, which is not limited in this embodiment.
And step 208, sending the message to a server indicated by the target server information, so as to send the message to a user through the server.
It should be noted that the execution processes of steps 201, 203, and 208 may refer to the execution processes of embodiments 101, 103, and 105, which are not described herein again.
In summary, the configuration information of the message is configured, the validity of the configuration information is checked, if the configuration information passes the check, the configuration file is generated according to the configuration information, after the target message template and the target server information associated with the target message type code are read from the configuration file according to the target message type code indicated by the message sending request in response to the received message sending request, the message is generated according to the target message template, the target server information and the service data, and the message is sent to the server indicated by the target server information, so that the message is sent to the user through the server. The configuration file is dynamically configured according to the configuration information of the message, so that the message can be generated quickly and efficiently, the operation is simple and convenient, the development cost is low, the configuration is easy to change, the agility is high, the normalization of the message is effectively improved, the error rate of the message is reduced, the efficiency and the accuracy of message sending are effectively improved, and the experience and the satisfaction of a user are improved.
In order to more clearly illustrate the above embodiments, the description will now be made by way of example.
For example, as shown in fig. 3, the banking industry cooperates with the operator to launch the 5G messaging banking service, and directly contacts the 5G messaging user by connecting with a chat robot Chatbot provided by the operator to output the financial service capability of the bank. The 5G message is the upgrade of short message service, is a basic telecommunication service of an operator, is constructed based on GSMA RCS Universal Profile, and realizes the interaction of industrial messages by introducing MaaP (Messaging as a Platform) technology and Chatbot intelligent service.
Chatbot, a chat robot, can automatically or manually complete chat with an end user under the configuration of a Chatbot user, including functions of message sending, message receiving, message parsing, message processing, and the like. The result of Chatbot is a Chatbot dialog platform. Based on the Chatbot dialogue platform, various chatbots based on different service requirements can be built.
The method comprises the following concrete steps: the developers of the banking system configure the Chatbot essential information, materials and 5G message templates obtained from the operator application and the 5G message type code. The material refers to digital material required for content display in the 5G message, and includes pictures, audio, video and the like.
The 5G message template refers to a message pattern paradigm defined by 5G developers and sent to the operator. It should be understood that different message styles, and finally the message forms presented to the 5G message user are different, for example: text message templates, card message templates.
Both the material and the 5G message template and the 5G message type code can be customized by a developer of the banking system.
When configuring 5G message type code, a developer needs to establish a binding relationship between Chatbot and a 5G message template, so that in actual service operation, the corresponding Chatbot information and the corresponding message template are matched through the 5G message type code, and message assembly and sending are performed.
And then, verifying the configuration content, and checking the legality and the normativity. And if the verification is passed, generating a configuration file and transmitting the configuration file to the 5G message service system. The 5G message service system refers to a back-end system for processing 5G message related services by a bank. The 5G message service system loads and stores the configuration file, and when the transaction operation state takes effect, the 5G message service access facing the user can be realized.
The 5G message service system analyzes the configuration file before transaction operation to acquire information such as a 5G message type code, a 5G message template and the like, and loads the information into the memory. During transaction operation, namely when a message sending request of a user is received, a 5G message service system loads Chatbot related information, reads a corresponding Chatbot and a 5G message template from a configuration file according to a 5G message type code indicated by the message sending request, replaces reserved fields in the template with actual transaction service data through a Freemarker technology, assembles an XML (eXtensible Markup Language) format message specified by an operator, and finally sends the message to a Chatbot platform of the operator, so that the operator directly interacts with a 5G message user through the Chatbot, and finally the 5G message service is achieved. The XML format message can include Chatbot information, request address information, message type, message number, message body, and the like.
In summary, developers only need to perform relevant configuration operations, such as Chatbot basic information configuration, material configuration, 5G message template configuration, 5G message type coding configuration, and the like, to quickly interface with the 5G message service system, reuse the original service operation support capability, and use the 5G message service. Meanwhile, the dynamic modification of the Chatbot related configuration is supported, the operation is simple and convenient, the agility is high, and the development cost is low.
In order to clearly illustrate the configuration of the card message template, the present embodiment provides another message sending method, and fig. 4 is a flowchart illustrating a message sending method according to a third embodiment.
In the case that the message template is a card message template, the message template that the developer needs to configure may only be the card message template, so that the developer needs to configure the material in the card message template and the control operation information of the material, where the material includes at least one of a picture, a video, an audio, and a text.
The control operation information comprises monitored user operation and response events of the user operation. For example, the control operation information may be question and answer mode, page jump, acquisition position information, one-touch dialing, and the like. The question-answer mode is that the card message template provides some questions to the user, and when the user clicks the questions provided by the card message template, the corresponding answers are fed back to the user. The page jump is that the card message template provides some page links for the user to jump to, and when the user clicks the page link provided by the card message template, the user jumps to the corresponding page. The acquired position information is a control which is provided for the user to acquire the position information by the card message template, and when the user clicks the control, the corresponding position information is fed back to the user. The one-touch dialing is that the card message template provides a one-touch dialing control for a user, and when the user clicks the one-touch dialing control, the user jumps to a dialing page with a dialed number input. Therefore, the practicability of the card message template can be effectively improved, and the experience and satisfaction of a user are improved.
Optionally, the developer may define the card message template by himself, or the developer may select a defined card message template provided by the development system, or the developer may use a previously defined card message template of the developer, and the like, which is not limited in this embodiment.
For other execution processes of this step, reference may be made to the execution process of step 101 in the foregoing embodiment, which is not described herein again.
And 402, checking the validity of the configuration information, if the check is passed, generating a configuration file according to the configuration information, and if the check is not passed, reconfiguring the configuration information of the message.
And 404, generating a message according to the target message template and the service data.
It should be noted that the execution processes of steps 402 and 403 and 405 can refer to the execution processes of embodiments 202 and 103 and 105, which are not described herein again.
In summary, the configuration information of the message is configured and the validity of the configuration information is checked, if the check is passed, the configuration file is generated according to the configuration information, after the target message template and the target server information associated with the target message type code are read from the configuration file according to the target message type code indicated by the message sending request in response to the received message sending request, the message is generated according to the target message template and the service data, and the message is sent to the server indicated by the target server information, so that the message is sent to the user through the server. The configuration file is dynamically configured according to the configuration information of the message, so that the message can be generated quickly and efficiently, the operation is simple and convenient, the development cost is low, the configuration is easy to change, the agility is high, the normalization of the message is effectively improved, the error rate of the message is reduced, the efficiency and the accuracy of message sending are effectively improved, and the experience and the satisfaction of a user are improved.
In order to implement the above embodiments, the present invention further provides a message sending apparatus.
Fig. 5 is a schematic diagram illustrating a structure of a message transmitting apparatus according to an exemplary embodiment.
As shown in fig. 5, the message transmitting apparatus includes: configuration unit 51, verification unit 52, processing unit 53, execution unit 54, and transmission unit 55.
A configuration unit 51, configured to configure configuration information of a message, where the configuration information includes a message type code, and a message template and server information associated with the message type code;
in a possible implementation manner of the embodiment of the present disclosure, in a case that the message template is the card message template, the configuration unit is configured to: configuring materials in the card message template, wherein the materials comprise at least one of pictures, videos, audios and texts; and configuring control operation information of the material in the card message template, wherein the control operation information comprises monitored user operation and response events of the user operation.
The checking unit 52 is configured to check validity of the configuration information, and if the check is passed, generate a configuration file according to the configuration information;
in a possible implementation manner of the embodiment of the present disclosure, the verification unit is further configured to: and if the verification fails, reconfiguring the configuration information of the message.
The processing unit 53 is configured to, in response to receiving a message sending request, read a target message template and target server information associated with a target message type code from the configuration file according to the target message type code indicated by the message sending request;
an executing unit 54, configured to generate a message according to the target message template and the service data;
in a possible implementation manner of the embodiment of the present disclosure, the execution unit is configured to: determining a plurality of fields to be filled according to the target message template; reading a plurality of data elements from the service data; filling the plurality of data elements into corresponding target fields in the plurality of fields to obtain a payload part; generating a message header according to the target server information; and generating the message according to the load part and the message header.
A sending unit 55, configured to send the message to the server indicated by the target server information, so as to send the message to the user through the server.
It should be noted that the foregoing explanation on the message sending method embodiment is also applicable to the message sending apparatus of this embodiment, and details are not described here again.
The message sending device provided by the embodiment of the disclosure generates a configuration file according to the configuration information by configuring the configuration information of the message and checking the validity of the configuration information, and generates a message according to a target message template and service data after reading a target message template and target server information associated with a target message type code from the configuration file according to the target message type code indicated by the message sending request in response to receiving the message sending request, so as to send the message to a server indicated by the target server information and send the message to a user through the server. The configuration file is dynamically configured according to the configuration information of the message, so that the message can be generated quickly and efficiently, the operation is simple and convenient, the development cost is low, the configuration is easy to change, the agility is high, the normalization of the message is effectively improved, the error rate of the message is reduced, the efficiency and the accuracy of message sending are effectively improved, and the experience and the satisfaction of a user are improved.
To implement the above embodiments, the present disclosure also provides an electronic device, which may include at least one processor; and a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the message sending method according to any of the above embodiments of the present disclosure.
Fig. 6 is a block diagram illustrating an electronic device 600 for message transmission in accordance with an exemplary embodiment. As shown in fig. 6, the electronic device 600 may further include:
a memory 610 and a processor 620, a bus 630 connecting different components (including the memory 610 and the processor 620), the memory 610 stores computer programs, and when the processor 620 executes the programs, the access method according to the embodiment of the present disclosure is implemented.
A program/utility 680 having a set (at least one) of program modules 670 may be stored, for example, in memory 610, such program modules 670 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 670 generally perform the functions and/or methods of the embodiments described in this disclosure.
The electronic device 600 may also communicate with one or more external devices 690 (e.g., keyboard, pointing device, display 691, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interfaces 692. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 693. As shown, the network adapter 693 communicates with the other modules of the electronic device 600 over a bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processor 620 executes various functional applications and data processing by executing programs stored in the memory 610.
It should be noted that, for the implementation process and the technical principle of the electronic device of this embodiment, reference is made to the foregoing explanation of the message sending method of the embodiment of the present disclosure, and details are not described here again.
In an exemplary embodiment, a computer-readable storage medium comprising instructions, such as a memory comprising instructions, executable by a processor of an electronic device to perform a method set forth in any one of the embodiments described above is also provided. Alternatively, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, comprising a computer program, characterized in that the computer program, when executed by a processor, implements the method set forth in any of the above embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (13)
1. A method for sending a message, comprising:
configuring configuration information of a message, wherein the configuration information comprises a message type code, and a message template and server information which are related to the message type code;
verifying the legality of the configuration information, and if the verification is passed, generating a configuration file according to the configuration information;
in response to receiving a message sending request, reading a target message template and target server information associated with a target message type code from the configuration file according to the target message type code indicated by the message sending request;
generating a message according to the target message template and the service data;
and sending the message to a server indicated by the target server information, so as to send the message to a user through the server.
2. The method of claim 1, wherein generating a message packet according to the target message template and the service data comprises:
determining a plurality of fields to be filled according to the target message template;
reading a plurality of data elements from the service data;
filling the plurality of data elements to corresponding target fields in the plurality of fields to be filled to obtain a payload part;
generating a message header according to the target server information;
and generating the message according to the load part and the message header.
3. The method of claim 1, wherein the message template is a text message template or a card message template.
4. The method of claim 3, wherein in the case that the message template is the card message template, the configuration information of the configuration message comprises:
configuring materials in the card message template, wherein the materials comprise at least one of pictures, videos, audios and texts;
and configuring control operation information of the material in the card message template, wherein the control operation information comprises monitored user operation and response events of the user operation.
5. The method of claim 1, further comprising:
and if the verification fails, reconfiguring the configuration information of the message.
6. A message transmission apparatus, comprising:
the system comprises a configuration unit, a processing unit and a processing unit, wherein the configuration unit is used for configuring configuration information of a message, and the configuration information comprises a message type code, a message template related to the message type code and server information;
the verification unit is used for verifying the legality of the configuration information, and if the verification is passed, a configuration file is generated according to the configuration information;
the processing unit is used for responding to a received message sending request, reading a target message template and target server information related to a target message type code from the configuration file according to the target message type code indicated by the message sending request;
the execution unit is used for generating a message according to the target message template and the service data;
and the sending unit is used for sending the message to the server indicated by the target server information so as to send the message to the user through the server.
7. The apparatus according to claim 1, wherein the execution unit is specifically configured to:
determining a plurality of fields to be filled according to the target message template;
reading a plurality of data elements from the service data;
filling the plurality of data elements to corresponding target fields in the plurality of fields to be filled to obtain a payload part;
generating a message header according to the target server information;
and generating the message according to the load part and the message header.
8. The apparatus of claim 6, wherein the message template is a text message template or a card message template.
9. The apparatus according to claim 8, wherein, in a case where the message template is the card message template, the configuration unit is specifically configured to:
configuring materials in the card message template, wherein the materials comprise at least one of pictures, videos, audios and texts;
and configuring control operation information of the material in the card message template, wherein the control operation information comprises monitored user operation and response events of the user operation.
10. The apparatus of claim 6, wherein the verification unit is further configured to:
and if the verification fails, reconfiguring the configuration information of the message.
11. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the messaging method of any of claims 1 to 5.
12. A computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the method of any of claims 1-5.
13. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the message sending method of any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111356242.0A CN114222256B (en) | 2021-11-16 | 2021-11-16 | Message sending method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111356242.0A CN114222256B (en) | 2021-11-16 | 2021-11-16 | Message sending method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114222256A true CN114222256A (en) | 2022-03-22 |
CN114222256B CN114222256B (en) | 2023-10-20 |
Family
ID=80697303
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111356242.0A Active CN114222256B (en) | 2021-11-16 | 2021-11-16 | Message sending method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114222256B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115334462A (en) * | 2022-07-18 | 2022-11-11 | 中银金融科技有限公司 | Activity organization information processing method, system and storage medium based on 5G message |
CN115665673A (en) * | 2022-12-08 | 2023-01-31 | 北京烽火万家科技有限公司 | Method, system and product for supporting multi-party 5G message interaction |
CN116436936A (en) * | 2023-06-14 | 2023-07-14 | 之江实验室 | Data storage system, method, storage medium and electronic equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109450772A (en) * | 2018-09-26 | 2019-03-08 | 中国平安人寿保险股份有限公司 | A kind of message method, server and computer readable storage medium |
CN110519711A (en) * | 2019-06-26 | 2019-11-29 | 中国移动通信集团江西有限公司 | A kind of information push method, device, storage medium and server |
CN111967236A (en) * | 2020-07-30 | 2020-11-20 | 武汉联影医疗科技有限公司 | Message processing method and device, computer equipment and storage medium |
WO2020233014A1 (en) * | 2019-05-23 | 2020-11-26 | 平安科技(深圳)有限公司 | Message sending method and apparatus, and computer device and storage medium |
CN112788128A (en) * | 2020-12-31 | 2021-05-11 | 青岛海尔科技有限公司 | Business information pushing method and device, storage medium and electronic device |
US20210166286A1 (en) * | 2019-12-03 | 2021-06-03 | Visa International Service Association | Prototype message service |
CN113011969A (en) * | 2021-03-31 | 2021-06-22 | 建信金融科技有限责任公司 | Banking business processing method, device, medium and electronic equipment based on 5G message |
-
2021
- 2021-11-16 CN CN202111356242.0A patent/CN114222256B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109450772A (en) * | 2018-09-26 | 2019-03-08 | 中国平安人寿保险股份有限公司 | A kind of message method, server and computer readable storage medium |
WO2020233014A1 (en) * | 2019-05-23 | 2020-11-26 | 平安科技(深圳)有限公司 | Message sending method and apparatus, and computer device and storage medium |
CN110519711A (en) * | 2019-06-26 | 2019-11-29 | 中国移动通信集团江西有限公司 | A kind of information push method, device, storage medium and server |
US20210166286A1 (en) * | 2019-12-03 | 2021-06-03 | Visa International Service Association | Prototype message service |
CN111967236A (en) * | 2020-07-30 | 2020-11-20 | 武汉联影医疗科技有限公司 | Message processing method and device, computer equipment and storage medium |
CN112788128A (en) * | 2020-12-31 | 2021-05-11 | 青岛海尔科技有限公司 | Business information pushing method and device, storage medium and electronic device |
CN113011969A (en) * | 2021-03-31 | 2021-06-22 | 建信金融科技有限责任公司 | Banking business processing method, device, medium and electronic equipment based on 5G message |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115334462A (en) * | 2022-07-18 | 2022-11-11 | 中银金融科技有限公司 | Activity organization information processing method, system and storage medium based on 5G message |
CN115334462B (en) * | 2022-07-18 | 2024-04-09 | 中银金融科技有限公司 | Activity organization information processing method, system and storage medium based on 5G message |
CN115665673A (en) * | 2022-12-08 | 2023-01-31 | 北京烽火万家科技有限公司 | Method, system and product for supporting multi-party 5G message interaction |
CN116436936A (en) * | 2023-06-14 | 2023-07-14 | 之江实验室 | Data storage system, method, storage medium and electronic equipment |
CN116436936B (en) * | 2023-06-14 | 2023-08-18 | 之江实验室 | Data storage system, method, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN114222256B (en) | 2023-10-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108334387B (en) | Dynamic interface rendering method and device | |
CN114222256B (en) | Message sending method and device and electronic equipment | |
US7305679B2 (en) | Portal using model view controller | |
CN109542427B (en) | System customization method and device, electronic equipment and storage medium | |
CN113227976B (en) | Method, system, and computer readable medium for data conversion using representational state transfer (REST) Application Programming Interface (API) | |
CN109343980B (en) | Cloud copying and cloud pasting method, device, system, equipment and storage medium | |
CN109978629B (en) | Advertisement putting method and device, electronic equipment and storage medium | |
CN113434175B (en) | Data processing method, device, storage medium and equipment | |
CN103530338A (en) | Frame for carrying out page rendering on calculation equipment and page generation method | |
CN113127108A (en) | Service request processing method and device, storage medium and electronic equipment | |
CN115795211A (en) | Page display method, device, system, equipment and storage medium | |
CN110231965A (en) | A kind of cloud device, applied program processing method and electronic equipment | |
CN114244896A (en) | Message pushing method and device, electronic equipment and storage medium | |
US8065600B2 (en) | Systems and methods for defining web content navigation | |
US7197712B2 (en) | Server visualization and control | |
CN111324467B (en) | Business service calling method, device, equipment and storage medium | |
CN117749747A (en) | Message processing method, device, electronic equipment and system | |
US8555239B1 (en) | Mainframe-based web service development accelerator | |
CN113190229A (en) | Method and device for generating government affair page | |
CN112019596A (en) | Message pushing method and device based on message routing configuration and electronic equipment | |
CN115982257A (en) | Interface creation method and related device | |
CN112667441A (en) | Service module scheduling method, system and storage medium based on fault-tolerant function | |
CN112100187A (en) | Student learning data storage method and device based on VueJS | |
CN114095582A (en) | Interaction method and device based on public account and computer equipment | |
CN114997866B (en) | Service contract generation method, device, equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |