CN115118688B - Method for sending message based on message template, storage medium and electronic equipment - Google Patents

Method for sending message based on message template, storage medium and electronic equipment Download PDF

Info

Publication number
CN115118688B
CN115118688B CN202211042328.0A CN202211042328A CN115118688B CN 115118688 B CN115118688 B CN 115118688B CN 202211042328 A CN202211042328 A CN 202211042328A CN 115118688 B CN115118688 B CN 115118688B
Authority
CN
China
Prior art keywords
character
character string
processed
message
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211042328.0A
Other languages
Chinese (zh)
Other versions
CN115118688A (en
Inventor
佟业新
刘宏伟
薄满辉
曲新奎
章秀静
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Travelsky Mobile Technology Co Ltd
Original Assignee
China Travelsky Mobile Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Travelsky Mobile Technology Co Ltd filed Critical China Travelsky Mobile Technology Co Ltd
Priority to CN202211042328.0A priority Critical patent/CN115118688B/en
Publication of CN115118688A publication Critical patent/CN115118688A/en
Application granted granted Critical
Publication of CN115118688B publication Critical patent/CN115118688B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings

Abstract

The invention provides a method, a storage medium and electronic equipment for sending messages based on a message template, wherein the method comprises the following steps: acquiring first configuration information input by a first user; the first configuration information comprises a message template identifier and a plurality of fields; each field includes field content; acquiring a message template corresponding to the message template identification; the message template comprises a character string to be processed; replacing each character string to be replaced in the character strings to be processed with corresponding field content to obtain a processed character string; acquiring second configuration information; the second configuration information is generated when the second user operates the message template; the second configuration information comprises a target channel identifier; determining a target sending channel according to the target channel identifier; the processed character string is used as a message to be sent; and sending the message to be sent through the target sending channel. Therefore, the efficiency of adjusting the second configuration information based on the requirement change of the second user is improved.

Description

Method for sending message based on message template, storage medium and electronic equipment
Technical Field
The present invention relates to the field of data processing, and in particular, to a method, a storage medium, and an electronic device for sending a message based on a message template.
Background
After the target user completes the transaction, the message system needs to perform active message pushing related to the transaction on the device of the target user, for example, after the target user orders a flight ticket, the message system pushes a boarding message to a mobile phone of the target user before the target user boards the airplane, and the like.
At present, after a message pushing condition is achieved, a message system can receive initial data, then process the initial data to obtain a message to be sent, and send the message to be sent to a target user, wherein the initial data needs to be generated by a first user and a second user in a matching manner, the second user puts forward a part of requirements on the message to be sent based on actual requirements, the first user edits initial data which can be processed by the message system according to requirements of the second user, and at this time, the second user does not have the capability of editing data which can be processed by the message system, and in combination with the fact, the first user can be a research and development person, and the second user can be a production person.
However, in the process of practical application, the second user may change the requirement according to the change of the actual requirement, and in order to meet the change of the requirement of the second user, the second user must inform the first user of the specific content of the adjustment and make a corresponding adjustment on the initial data by the first user, so that the efficiency of adjusting the initial data based on the change of the requirement of the second user is low.
Disclosure of Invention
Aiming at the technical problems, the technical scheme adopted by the invention is as follows:
according to an aspect of the present disclosure, there is provided a method for message transmission based on a message template, the method including:
acquiring first configuration information input by a first user; the first configuration information comprises a message template identifier and a plurality of fields; the message template identification is the identification of the corresponding message template, and each field comprises field content;
acquiring a message template corresponding to the message template identification; the message template comprises a character string to be processed, and the character string to be processed comprises a plurality of constant character strings and a plurality of character strings to be replaced; each character string to be replaced corresponds to one field one by one;
replacing each character string to be replaced in the character strings to be processed with corresponding field content to obtain a processed character string;
acquiring second configuration information; the second configuration information is generated when the second user operates the message template; the second configuration information includes a target channel identification; the second user is different from the first user;
determining a target sending channel from a plurality of candidate sending channels according to the target channel identification;
the processed character string is used as a message to be sent;
and sending the message to be sent through the target sending channel.
According to another aspect of the present disclosure, there is also provided a non-transitory computer readable storage medium having at least one instruction or at least one program stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the above method for message template-based message transmission.
According to another aspect of the present disclosure, there is also provided an electronic device comprising a processor and the non-transitory computer-readable storage medium described above.
The invention has at least the following beneficial effects:
based on first configuration information input by a first user and second configuration information acquired from a message template, message sending can be realized; the second configuration information in the message template is generated after the second user operates in the message template based on own requirements; if the requirement of the second user changes, the second user can directly adjust the second configuration information in the message template so as to adjust the message sending; compared with the existing method that after the requirement of the second user changes, the second user must inform the first user of the specific content of the adjustment, the first user performs corresponding adjustment on the second configuration information in the message template, the message sending is performed by adopting the scheme, the second user can directly adjust the second configuration information when the requirement changes, the first user does not need to pass through, and the efficiency of adjusting the second configuration information based on the requirement change of the second user is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for sending a message based on a message template according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
the embodiment of the invention provides a method for sending messages based on a message template, wherein the method can be completed by any one or any combination of the following items: a terminal, a server, or other devices with processing capability, which is not limited in this embodiment of the present invention.
Taking a server as an example, the embodiment of the present invention will describe a method for sending a message based on a message template with reference to a flow chart of a method for sending a message based on a message template shown in fig. 1.
The method comprises the following steps:
step S100, first configuration information input by a first user is obtained.
The first configuration information comprises a message template identifier and a plurality of fields; the message template identifier is an identifier of a corresponding message template, and each field comprises field content.
In a possible implementation manner, any field in the plurality of fields may be a field related to flight information, for example, any field in the plurality of fields may be a field corresponding to a name, a field corresponding to a flight departure place name, or a field corresponding to a flight landing place name, where the field content of the field corresponding to the name is a name, the field content of the field corresponding to the flight departure place name is a flight departure place name, and the field content of the field corresponding to the flight landing place name is a flight landing place name; the message template identifier is a unique identifier of the corresponding message template, such as an Identity document (unique code); the first user may store the first configuration information in the terminal in advance, and when a message needs to be sent to the target user, the first configuration information may be sent to the server through the terminal, and at this time, the server may receive the first configuration information. Wherein the first user may be a person with the ability to edit out data that the server may process; for example, the first user may be a developer.
And step S200, acquiring the message template corresponding to the message template identification.
The message template comprises a character string to be processed, wherein the character string to be processed comprises a plurality of constant character strings and a plurality of character strings to be replaced; each character string to be replaced corresponds to one field.
In a possible implementation manner, after receiving the first configuration information, the server may determine a message template identifier in the first configuration information, and then obtain a message template corresponding to the message template identifier from a preset database, where the preset database includes a plurality of message template identifiers, a message template corresponding to each message template identifier, and a correspondence between each message template identifier and a corresponding message template, and the message template is edited by the first user.
And step S300, replacing each character string to be replaced in the character strings to be processed with corresponding field content to obtain the processed character strings.
In a possible implementation manner, a configuration file may be stored in the server, where the configuration file is used to store a corresponding relationship between each field and a corresponding character string to be replaced; after the server obtains the message template, each character string to be replaced in the character strings to be processed can be replaced by corresponding field content according to the configuration file, and the processed character strings are obtained.
Step S400, second configuration information is acquired.
The second configuration information is generated when the second user operates the message template; the second configuration information includes a target channel identification; the second user is different from the first user.
In one possible implementation, the server may obtain the second configuration information from the message template based on an operation performed on the message template by the second user. Wherein the second user may be a person who does not have the ability to edit out data that the server may process; for example, the second user may be set as a production person.
And S500, determining a target sending channel from a plurality of candidate sending channels according to the target channel identifier.
In a possible implementation manner, the candidate sending channel is a channel capable of performing message transmission, for example, the candidate sending channel may be a channel for message transmission corresponding to an application program, an applet, or a short message; after the server obtains the target channel identifier, at least one candidate sending channel in the plurality of candidate sending channels can be used as the target sending channel according to the target channel identifier.
And step S600, taking the processed character string as a message to be sent.
In one possible embodiment, the message to be sent is the message content.
And step S700, sending the message to be sent through the target sending channel.
In a possible implementation manner, if one target transmission channel is determined, the message to be sent is sent through the target transmission channel, and if a plurality of target transmission channels are determined, the message to be sent is sent through each target transmission channel.
Therefore, based on the first configuration information input by the first user and the second configuration information acquired from the message template, message sending can be realized; the second configuration information in the message template is generated after the second user operates in the message template based on own requirements; if the requirement of the second user changes, the second user can directly adjust the second configuration information in the message template so as to adjust the message sending; compared with the existing method that after the requirement of the second user changes, the second user must inform the first user of the specific content of the adjustment, the first user performs corresponding adjustment on the second configuration information in the message template, the message sending is performed by adopting the scheme, the second user can directly adjust the second configuration information when the requirement changes, the first user does not need to pass through, and the efficiency of adjusting the second configuration information based on the requirement change of the second user is improved.
Optionally, the step S300 includes the following specific processing:
performing first processing on a first character in a character string to be processed;
the first process includes:
taking the character which is currently subjected to the first processing as a first character;
if the first character is a first type setting character, entering a second process; otherwise, entering a third process;
the second process includes:
determining a character next to a first character in a character string to be processed as a second character;
if the second character is the second type setting character, sequentially confirming whether the character behind the second character is the third type setting character or not character by character according to the character arrangement sequence in the character string to be processed until the character behind the second character is identified as the third type setting character, and determining the character as the third character;
acquiring a plurality of characters between the second character and the third character from the character string to be processed as a character string to be replaced according to the position information of the second character and the position information of the third character; the position information is the arrangement position information of the corresponding character in the character string to be processed;
storing the character string to be replaced into a preset list; arranging each character string stored in a preset list according to a stored time sequence;
determining whether the third character is the last character in the character string to be processed, and if so, performing first processing on a character next to the third character in the character string to be processed; otherwise, entering a fourth process;
the third process includes:
sequentially determining whether characters behind a first character are first-class set characters or not word by word according to the character arrangement sequence of the character string to be processed Fu Queren until the characters behind the first character are recognized, wherein the characters are the first-class set characters, and determining the characters as fourth characters;
according to the position information of the first character and the position information of the fourth character, taking the last character from the first character to the fourth character in the character string to be processed as a constant character string;
storing the constant character strings into a preset list;
determining whether the fourth character is the last character in the character string to be processed, if so, performing first processing on the fourth character in the character string to be processed; otherwise, entering a fourth process;
the fourth process includes:
replacing each character string to be replaced in the preset list with corresponding field content to obtain a replaced character string corresponding to each character string to be replaced;
and splicing each character string in the preset list according to the arrangement sequence to obtain the processed character string.
The first type setting character, the second type setting character and the third type setting character are all preset characters, for example, the first type setting character is set to "$", the second type setting character is set to "{", and the third type setting character is "}".
Therefore, the character strings stored in the preset list are divided into the constant character strings and the character strings to be replaced, only the characters to be replaced in the preset list are replaced during replacement, when a plurality of continuous characters in the constant character strings are the same as any character string to be replaced, the probability of mistaken replacement of the plurality of continuous characters in the constant character strings is low, and the accuracy of the processed character strings can be improved.
Optionally, each field further includes a field name, and the field name of each field is the same as the corresponding character string to be replaced; based on this, replacing each character string to be replaced in the preset list with the corresponding field content may include the following processing:
and replacing each character string to be replaced in the preset list with the field content corresponding to the same field name.
For example, any of several fields is "name: the name of the character string to be replaced is the name of the character string to be replaced, and the name of the character string to be replaced is replaced.
Optionally, the step S300 further includes the following processing: and if the second character is not the second type setting character, entering a third process.
In a possible implementation manner, the constant character string in the character string to be processed may have a first type of setting character, and if the character after the first type of setting character in the character string to be processed is not a second type of setting character, the first type of setting character may be recognized as a character in the constant character string, so that the possibility of recognizing at least part of the characters in the constant character string as a character string to be replaced may be reduced, and the accuracy of the character string to be replaced and the constant character string obtained from the character string to be processed may be improved.
Optionally, the foregoing sequentially and word by word according to the character arrangement order in the character string to be processed Fu Queren whether the character after the first character is the first type set character or not until the character after the first character is recognized as the character of the first type set character, and determining the character as the fourth character may specifically be as follows: and sequentially determining whether the characters after the first character is the first-class set character or not word by word according to the character arrangement sequence of the character string to be processed Fu Queren until the character after the first character is identified as the first-class set character or the character after the first character is the last character in the character string to be processed, and determining the character as the fourth character.
Optionally, the message template further includes a plurality of candidate channel identifiers; each candidate channel identifier has a corresponding candidate transmission channel;
the target channel identifier is generated when the second user performs selection operation on any candidate channel identifier, and the target channel identifier is the candidate channel identifier subjected to selection operation by the second user.
For example, the message template has an identifier representing the application program, an identifier representing the applet, and an identifier representing the short message, and if the second user selects the identifier representing the short message and the identifier representing the applet in the message template, both the identifier representing the short message and the identifier representing the applet are the target channel identifiers.
Optionally, the second configuration information further includes header data;
the method for using the processed character string as a message to be sent comprises the following steps:
and combining the processed character string with the header data to obtain a message to be sent.
In a possible implementation manner, the second user may fill in the header data in the message template, and the server may use the data obtained by combining the processed character string and the header data as the message to be sent. In addition, the second configuration information may further include a message profile, a message detail, and the like.
Optionally, the first configuration information further includes a user identifier;
sending a message to be sent through a target sending channel, comprising:
and according to the user identification, sending the message to be sent to the electronic equipment corresponding to the user identification through the target sending channel.
In one possible implementation, the electronic device may be an electronic device with a communication capability, such as a mobile phone or a tablet computer, and each user identifier has a corresponding electronic device identifier; the server may determine a corresponding electronic device identifier according to the user identifier in the first configuration information, and the electronic device identifier sends the message to be sent to the electronic device corresponding to the electronic device identifier through the target sending channel. In addition, the first configuration information may further include a home page short text of the application program, and the like.
Embodiments of the present invention also provide a non-transitory computer-readable storage medium, which may be disposed in an electronic device to store at least one instruction or at least one program for implementing a method of the method embodiments, where the at least one instruction or the at least one program is loaded into and executed by a processor to implement the method provided by the above embodiments.
Embodiments of the present invention also provide an electronic device comprising a processor and the aforementioned non-transitory computer-readable storage medium.
Embodiments of the present invention further provide a computer program product comprising program code means for causing an electronic device to carry out the steps of the method according to various exemplary embodiments of the invention described above when the program product is run on the electronic device.
Example 2:
the process of sending the message to be sent based on the first configuration information and the second configuration information may specifically be as follows:
the first configuration information and the second configuration information acquired by the server can be used as original data Q1, and after the original data Q1 is acquired, the original data Q1 can be processed through a data processing device to obtain a message to be sent;
the data processing device comprises a plurality of processing units pro connected in sequence 1 ,pro 2 ,pro 3 ,...,pro n (ii) a Wherein, pro i I =1,2,3,. The number of processing units n, n is the ith processing unit; pro in several processing units 1 The input data of each subsequent processing unit is the output data of the previous processing unit; the data structure of the input data of each processing unit is the same as that of the corresponding output data; pro 1 The input data of (1) is Q1, pro n The output data of the message sending module is a message to be sent; each processing unit has an execution parameter m; each processing unit is internally provided with a corresponding processing function;
if pro i Corresponding execution parameter m = a, then when pro i After obtaining the input data, pro i Obtained input data input pro i And pro is processed i As pro i The output data of (a);
if pro i Corresponding execution parameter m = b, then when pro i After obtaining the input data, pro i The obtained input data is directly taken as pro i The output data of (1).
In a possible embodiment, when a message to be pushed to the user needs to be generated, the server sends Q1 to the data processing apparatus, in this case, the server is the sender of Q1, and when Q1 is received by the data processing apparatus, Q1 is regarded as pro 1 The plurality of processing units may process the input data in sequence, and the last processing unit may obtain the message to be sent.
Therefore, if the execution parameter m = a corresponding to any processing unit, the input data of the processing unit is processed by the processing function in the processing unit to obtain the output data of the processing unit, and if the execution parameter m = b corresponding to any processing unit, the processing function in the processing unit does not process the input data but directly uses the input data of the processing unit as the output data; furthermore, for any processing unit, if the processing function of the processing unit is not wanted to process the input data, the execution parameter m corresponding to the processing unit can be directly set as b; if a data processing procedure is to be added between any two adjacent processing units, a processing unit can be added and connected between the two adjacent processing units, at this time, the output data of the previous processing unit of the added processing unit is the input data of the added processing unit, and the output data of the added processing unit is the input data of the next processing unit of the added processing unit; because the data structure of the input data of each processing unit is the same as the data structure of the output data corresponding to the processing unit, after the execution parameter m corresponding to any processing unit is set as b or the processing unit is added between any two processing units, the adjustment and test of the processing unit are not needed to match the output of the first processing unit and the input of the second processing unit in any two adjacent processing units, and the efficiency of adjusting a plurality of processing units processing original data based on actual requirements can be improved.
Optionally, the first x processing units in the data processing apparatus constitute a first processing sub-apparatus, the last y processing units in the data processing apparatus constitute a second processing sub-apparatus, and x + y = n; each processing unit in the first processing sub-device is a first unit, and each processing unit in the second processing sub-device is a second unit;
the first units in the first processing sub-device are respectively G 1 ,G 2 ,...,G x ,G f =(g 1f ,g 2f ) (ii) a x is the number of first units in the first processing sub-device, G f For the f-th first unit in the first processing sub-device, f =1,2 1f Is G f Execution judgment function of g 2f Is G f Each processing function in the first processing sub-device has a corresponding filtering condition; each first unit is provided with a unique corresponding error identification;
g 1f for in G f After receiving the input data, judging G f If the corresponding execution parameter m is a, if so, G f Is output to g 2f Otherwise, G will be f As input data of G f The output data of (1);
g 2f for determining whether or not input data satisfies g after the input data is obtained 2f If the corresponding filtering condition is met, deleting the input data and converting G f Returning the corresponding error identification to the sender of Q1, otherwise taking the input data as G f The output data of (1); the filtering priorities of the filtering conditions corresponding to the first units are sequentially reduced according to the arrangement sequence of the first units.
In one possible embodiment, when the data processing device receives Q1, Q1 is taken as G 1 Then, each first unit in the first processing sub-device processes the input data in sequence, wherein G in a plurality of first units f After receiving input data g 1f And g 2f The following processes may be performed, respectively:
g 1f at G f After receiving the input data, judging G f If the corresponding execution parameter m is a, if so, G f Is output to g 2f Otherwise, G f As input data of G f The output data of (1);
g 2f is G f Corresponding processing function, g 2f After obtaining the input data, determining whether the input data satisfies g 2f If the corresponding filtering condition is satisfied, deleting the input data, and converting G f Returning the corresponding error identification to the sender of Q1, otherwise taking the input data as G f The output data of (a);
in addition, the filtering priority of the filtering conditions corresponding to the plurality of first units is sequentially reduced according to the arrangement sequence of the first units, namely the more serious the result that the data meeting the filtering conditions is not filtered is, the more front the arrangement of the first units corresponding to the filtering conditions is in the plurality of first units;
for example, x =3, the user identifier of the user corresponding to Q1, g, may be included in Q1 21 The filtering condition of (b) may be that the data size, data content and/or data length of the input data meet a first preset requirement, g 22 The filtering condition of (c) may be that the integrity of the parameter in the input data reaches a second predetermined requirement, g 23 The filtering condition of (2) may be different from the data content of the input data corresponding to the same user within 10 minutes, so that the message size, the message content and/or the message length of the finally sent message meet the corresponding requirements, and the same user does not receive the same message within 10 minutes.
Wherein, the error flag can be set to number, symbol or English word, for example, the error flag is set to 0, at G f After the corresponding error flag is returned to the sender of Q1, the sender will store the first unit G f And the corresponding error flag 0.
Therefore, data which do not accord with preset requirements can be filtered out through the first processing sub-device, the quality of the pushed message can be improved, and specific problems of the data which do not accord with the preset requirements can be known according to the error identification obtained by the sender of the Q1, so that the Q1 can be checked conveniently.
Optionally, each first unit has a unique corresponding skip identifier and pass identifier; the error flag, skip flag, and pass flag are all different;
g 1f also for use in G f When the corresponding execution parameter m is not a, G is set f The corresponding skipping mark returns to the sender of Q1;
g 2f and for not satisfying g in the received input data 2f At corresponding filtration condition, G f The corresponding pass identification is returned to the sender of Q1.
In one possible embodiment, the skip flag and the pass flag may be set to a number, a symbol, an English word, or the like, for example, the skip flag is set to skip, the pass flag is set to 1, and G is set to f After the corresponding skip flag is returned to the sender of Q1, the sender will store G f And the corresponding skip flag skip, at G f After the corresponding identifier is returned to the sender of Q1, the sender stores G f And a corresponding pass identification 1.
Optionally, the first x processing units in the data processing apparatus constitute a first processing sub-apparatus, the last y processing units in the data processing apparatus constitute a second processing sub-apparatus, and x + y = n; each processing unit in the first processing sub-device is a first unit, and each processing unit in the second processing sub-device is a second unit;
the first units in the first processing sub-device are respectively G 1 ,G 2 ,...,G x ,G f =(g 1f ,g 2f ) (ii) a x is the number of first units in the first processing sub-device, G f For the f-th first unit in the first processing sub-device, f =1,2 1f Is G f Execution judgment function of g 2f Is G f Each processing function in the first processing sub-meansAll have corresponding filtering conditions; each first unit is provided with a unique corresponding error identification;
g 1f for in G f After receiving the input data, judging G f If the corresponding execution parameter m is a, if so, G f Is output to g 2f Otherwise, G will be f As input data of G f The output data of (1);
g 2f for determining whether or not input data satisfies g after the input data is obtained 2f If the corresponding filtering condition is satisfied, the input data is used as G f And G is f Returning the corresponding error identification to the sender of Q1, otherwise taking the input data as G f The output data of (1);
the data processing device further comprises a transmitting sub-device S connected between the first processing sub-device and the second processing sub-device 1
S 1 For receiving G x After the transmitted input data, G is determined 1 、G 2 Or G x And if the error identification is returned to the sender of the Q1, deleting the input data if the error identification is returned, otherwise, outputting the input data serving as output data to a first processing unit in the second processing sub-device.
In one possible embodiment, g 2f After obtaining the input data, it may be determined whether the input data satisfies g 2f If the corresponding filtering condition is satisfied, the input data is taken as G f And G is f Corresponding error identification is returned to the sender of Q1, if not, the input data is taken as G f The output data of (a); in the process of G 1 、G 2 .., and G x After the treatment of (2), at S 1 Received G x Output data of (2), i.e. S 1 When receiving input data, if the input function is input to S 1 In the corresponding processing function, the processing function can determine whether any first unit returns the error identifier to the sender of Q1, if so, the input data is deleted, and if not, the input data is processedIs S 1 The output data of (a) are output to a first processing unit in the second processing sub-means.
Therefore, even if Q1 cannot satisfy g 21 Corresponding to the filtering condition, the filtering result of each first unit can still be obtained once by processing the Q1 through the first processing sub-device, so that each preset requirement that the Q1 is not in conformity with can be known once, and the efficiency of checking the Q1 is improved.
Optionally, the data processing apparatus further comprises a pruning sub-apparatus;
the deletion sub-device is connected between the first processing sub-device and the second processing sub-device;
the prune sub-means is arranged to prune upon reception of G x Output data Q3= (Q) 1 ,q 2 ,q 3 ,...,q h ) Then, q is added 4 、q 5 A h Setting the sub data content in the data to zero to obtain the deleted data Q4= (p) 1 ,p 2 ,p 3 ,...,p h ) And outputting Q4 to the first processing unit in the second processing sub-device; wherein q is k The k-th sub data in the Q3 is the sub data, the sub data comprises a sub data name and sub data contents, k =1,2,3. q. q of 1 Is identified for the user, q 2 Is identified for a message template, q 3 Is a plurality of fields; p is a radical of k Is the kth sub-data in Q4.
In a possible embodiment, after each first unit in the first sub-processing device has been processed, G x The output data Q3 may be output to the puncturing sub-apparatus as input data to the puncturing sub-apparatus, and then the puncturing sub-apparatus may output Q 4 、q 5 A h Setting the sub data content in the data to zero to obtain the deleted data Q4= (p) 1 ,p 2 ,p 3 ,...,p h ) And outputting Q4 to a first one of the second processing sub-devices; wherein q is 4 、q 5 A h Each subdata in the data processing device can be subdata generated and stored in the processing process of a plurality of first units or can be carried when a sender of Q1 sends Q1 to the data processing deviceThe sub data of (1).
Therefore, the data structures of Q3 and Q4 are the same, but the data volume of Q4 is smaller than Q3, the processing pressure of the second processing sub-device can be reduced, and the computing resources of the second processing sub-device can be saved.
Optionally, a plurality of second units in the second processing sub-device are respectively H 1 ,H 2 ,...,H y ,H e =(h 1e ,h 2e ) (ii) a y is the number of second units in the second processing sub-device, H e For the e-th first unit in the first processing sub-device, e =1,2, ·, y; h is 1e Is H e Execution judgment function of h 2e Is H e The processing function of (1);
h 1e for in H e After receiving the input data, judging H e If the corresponding execution parameter m is a, H is carried out e Is output to h 2e Otherwise, will H e As input data of H e The output data of (1);
h 2e after the input data is obtained, the corresponding processing is carried out on the input data to obtain H e The output data of (1).
In one possible embodiment, each second unit has a corresponding process, and when the second processing sub-device receives input data, the input data is regarded as H 1 Then, each second unit in the second processing sub-device will perform corresponding processing in turn, wherein H in several second units e H after receiving input data 1e And h 2e The following processes may be performed, respectively:
h 1e at H e After receiving the input data, judging H e If the corresponding execution parameter m is a, H is carried out e Is output to h 2e Otherwise, will H e As input data of H e The output data of (1);
h 2e is H e Corresponding processing function, h 2e After receiving the input data, carrying out corresponding processing on the input data to obtain H e Output number ofAccordingly.
Optionally, h 21 For in h 21 After Q4 is obtained, p in Q4 is obtained 2 Corresponding message template M, and based on the above step S300, M and p 3 Combine to obtain H 1 The output data Q5; wherein Q5 is p in Q4 3 Replacement by p 3M The latter data, p 3M Replacing the character string to be processed in the message template with the processed character string in the replaced message template;
in a possible embodiment, the processing function h corresponding to the first second unit in the second processing sub-device 21 The following processing may be performed: at h 21 After Q4 is obtained, p in Q4 is obtained 2 Corresponding message template M, M and p 3 Combine to obtain H 1 The output data Q5.
Optionally, h 22 For in h 22 After Q5 is obtained, Q5 is saved to the target database, and Q5 is taken as H 2 The output data of (a); and the data in the target database is used for being provided for a user corresponding to the user identification for viewing.
In a possible implementation manner, Q5 may be saved to the target database, and the target database may be set as a database corresponding to a platform for pushing a message, for example, the target database is set as a database corresponding to an application program for pushing a message, the application program may determine a message to be sent according to Q5, and the user may log in the application program to actively view the message to be sent.
Optionally, p 1 The method comprises the steps of providing corresponding equipment type identification, wherein the equipment type identification is the only type identification of corresponding electronic equipment;
h 23 for in h 23 After Q5 was obtained, the following treatments were carried out:
according to p in Q5 1 The corresponding equipment type identification determines the message transmission mode of the message to be sent;
determining a corresponding target sending channel according to each target channel identifier in the Q5;
determining a message to be sent in Q5;
sending a message to be sent to the electronic equipment based on the determined message transmission mode and each target sending channel;
with Q5 as H 3 The output data of (2).
In one possible implementation, the device type identifier may be set as a brand identifier of a device such as a mobile phone or a computer on which the application program is installed.
h 23 For in h 23 Q5 is obtained and then processed as follows:
determination of p in Q5 1 If the brand mark is any one of the plurality of preset brand marks, the mode of a third party is used as a message transmission mode, and if the brand mark is not any one of the plurality of preset brand marks, the self-built mode is used as a message transmission mode; the third party may send a message through a manufacturer of the brand, and the self-established mode may be a mode in which a message may be directly sent to a device in which an application or an applet is installed by establishing a connection with the device.
And determining a corresponding target sending channel according to each target channel identifier in the Q5.
And determining the message to be sent in the Q5.
Sending a message to be sent to the electronic equipment based on the determined message transmission mode and the plurality of target sending channels; if the target sending channel is a channel corresponding to the short message, the message to be sent is directly sent to the electronic equipment as the short message without sending the message through a third party or a self-established mode. For example, if the determined message transmission mode is a self-established mode, and the determined target sending channels are channels corresponding to the short message and channels corresponding to the application program, the message to be sent is sent to the electronic device as a message of the application program in the self-established mode, and the message to be sent is directly sent to the electronic device as a short message.
Optionally, M includes at least one compensation channel identifier, and each compensation channel identifier is a unique identifier of a corresponding compensation transmission channel;
h 14 for in H 4 After Q5 is received, H is judged 4 If the corresponding execution parameter m is a and the message to be sent is not successfully sent to the electronic equipment based on the determined message transmission mode and the target sending channel, outputting Q5 to h if the message to be sent is not successfully sent, and otherwise, outputting the Q5 to h 24 Otherwise, taking Q5 as H 4 The output data of (a);
h 24 for in h 24 After Q5 is obtained, determining a message to be sent in Q5, and determining a corresponding compensation sending channel according to each compensation channel identifier in Q5;
according to p in Q5 1 The corresponding equipment type identification determines the message transmission mode of the message to be sent;
and sending the message to be sent to the electronic equipment based on the determined message transmission mode and each compensation sending channel.
In one possible embodiment, the compensation transmission channel can be set to a channel corresponding to an applet or a short message, etc., and thus at H 3 And under the condition that the message to be sent is not successfully sent to the electronic equipment, the message to be sent can be sent to the electronic equipment again, so that the possibility that the user corresponding to the user identification does not receive the message is reduced.
Although some specific embodiments of the present invention have been described in detail by way of illustration, it should be understood by those skilled in the art that the above illustration is only for the purpose of illustration and is not intended to limit the scope of the invention. It will also be appreciated by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.

Claims (9)

1. A method for message transmission based on a message template, the method comprising:
acquiring first configuration information input by a first user; the first configuration information comprises a message template identifier and a plurality of fields; the message template identification is the identification of the corresponding message template, and each field comprises field content;
acquiring a message template corresponding to the message template identification; the message template comprises a character string to be processed, and the character string to be processed comprises a plurality of constant character strings and a plurality of character strings to be replaced; each character string to be replaced corresponds to one field one by one;
replacing each character string to be replaced in the character strings to be processed with corresponding field content to obtain a processed character string;
acquiring second configuration information; the second configuration information is generated when a second user operates the message template; the second configuration information comprises a target channel identification; the second user is different from the first user;
determining a target sending channel from a plurality of candidate sending channels according to the target channel identification;
taking the processed character string as a message to be sent;
sending the message to be sent through the target sending channel;
replacing each character string to be replaced in the character strings to be processed with corresponding field content to obtain a processed character string, wherein the method comprises the following steps:
performing first processing on a first character in the character string to be processed;
the first processing includes:
taking the character which is currently subjected to the first processing as a first character;
if the first character is a first type setting character, entering a second process; otherwise, entering a third process;
the second processing includes:
determining a character next to the first character in the character string to be processed as a second character;
if the second character is the second type set character, sequentially confirming whether the character behind the second character is the third type set character or not character by character according to the character arrangement sequence in the character string to be processed until the character behind the second character is identified as the third type set character, and determining the character as the third character;
according to the position information of the second character and the position information of the third character, acquiring a plurality of characters between the second character and the third character from the character string to be processed to serve as a character string to be replaced; the position information is the arrangement position information of the corresponding character in the character string to be processed;
storing the character string to be replaced into a preset list; arranging each character string stored in the preset list according to a stored time sequence;
determining whether the third character is the last character in the character string to be processed, if so, performing the first processing on the next character of the third character in the character string to be processed; otherwise, entering a fourth process;
the third processing includes:
confirming whether the characters behind the first character are the first type set characters or not in sequence character by character according to the character arrangement sequence in the character string to be processed until the characters behind the first character are recognized as the first type set characters, and determining the characters as fourth characters;
according to the position information of the first character and the position information of the fourth character, taking the last character from the first character to the fourth character in the character string to be processed as a constant character string;
storing the constant character string into the preset list;
determining whether the fourth character is the last character in the character string to be processed, if so, performing the first processing on the fourth character in the character string to be processed; otherwise, entering the fourth processing;
the fourth processing includes:
replacing each character string to be replaced in the preset list with corresponding field content to obtain a replaced character string corresponding to each character string to be replaced;
and splicing each character string in the preset list according to the arrangement sequence to obtain the processed character string.
2. The method of claim 1, wherein each of the fields further comprises a field name, and the field name of each of the fields is the same as the corresponding string to be replaced;
replacing each character string to be replaced in the preset list with corresponding field content, including:
and replacing each character string to be replaced in the preset list with the field content corresponding to the same field name.
3. The method of claim 1, wherein the second processing further comprises:
and if the second character is not the second type setting character, entering the third processing.
4. The method according to claim 1, wherein said confirming whether the character after the first character is the first kind setting character or not is performed character by character according to the character arrangement sequence in the character string to be processed, until the character which is the first set character after the first character is recognized and is determined as a fourth character, the method comprises the following steps:
and sequentially confirming whether the characters after the first character are the first type set characters or not character by character according to the character arrangement sequence in the character string to be processed until the characters after the first character are recognized as the first type set characters or the characters after the first character are the last character in the character string to be processed, and determining the character as a fourth character.
5. The method of claim 1, wherein the message template further comprises a number of candidate channel identifiers; each candidate channel identifier has a corresponding candidate transmission channel;
the target channel identifier is generated when the second user performs selection operation on any candidate channel identifier, and the target channel identifier is a candidate channel identifier which is subjected to selection operation by the second user.
6. The method of claim 5, wherein the second configuration information further comprises header data;
the step of using the processed character string as a message to be sent includes:
and combining the processed character string with the header data to obtain a message to be sent.
7. The method of any of claims 1-6, wherein the first configuration information further comprises a user identification;
the sending the message to be sent through the target sending channel includes:
and sending the message to be sent to the electronic equipment corresponding to the user identification through the target sending channel according to the user identification.
8. A non-transitory computer readable storage medium having stored therein at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by a processor to implement the method of any one of claims 1-7.
9. An electronic device comprising a processor and the non-transitory computer readable storage medium of claim 8.
CN202211042328.0A 2022-08-29 2022-08-29 Method for sending message based on message template, storage medium and electronic equipment Active CN115118688B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211042328.0A CN115118688B (en) 2022-08-29 2022-08-29 Method for sending message based on message template, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211042328.0A CN115118688B (en) 2022-08-29 2022-08-29 Method for sending message based on message template, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN115118688A CN115118688A (en) 2022-09-27
CN115118688B true CN115118688B (en) 2022-11-04

Family

ID=83336047

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211042328.0A Active CN115118688B (en) 2022-08-29 2022-08-29 Method for sending message based on message template, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115118688B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110196635A (en) * 2019-04-28 2019-09-03 浙江大学 A kind of gesture input method based on wearable device
CN111327519A (en) * 2020-02-17 2020-06-23 北京四信数字技术有限公司 Method, device, equipment and storage medium for sending multi-channel message content
CN112306881A (en) * 2020-11-02 2021-02-02 平安普惠企业管理有限公司 Simulation data generation method, device, equipment and storage medium
CN113572680A (en) * 2021-07-30 2021-10-29 康键信息技术(深圳)有限公司 Template message sending method, device, equipment and storage medium
WO2022034266A1 (en) * 2019-12-07 2022-02-17 Capitolin Jean Louis Network by means of which a machine speaks the law by simulating, by continuous auto-application, the speech of the author of the legal instrument
CN114528574A (en) * 2022-02-18 2022-05-24 中国平安人寿保险股份有限公司 Data processing method, device, equipment and medium based on encryption algorithm

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113190509A (en) * 2021-05-27 2021-07-30 腾讯科技(深圳)有限公司 Animation processing method and device, electronic equipment and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110196635A (en) * 2019-04-28 2019-09-03 浙江大学 A kind of gesture input method based on wearable device
WO2022034266A1 (en) * 2019-12-07 2022-02-17 Capitolin Jean Louis Network by means of which a machine speaks the law by simulating, by continuous auto-application, the speech of the author of the legal instrument
CN111327519A (en) * 2020-02-17 2020-06-23 北京四信数字技术有限公司 Method, device, equipment and storage medium for sending multi-channel message content
CN112306881A (en) * 2020-11-02 2021-02-02 平安普惠企业管理有限公司 Simulation data generation method, device, equipment and storage medium
CN113572680A (en) * 2021-07-30 2021-10-29 康键信息技术(深圳)有限公司 Template message sending method, device, equipment and storage medium
CN114528574A (en) * 2022-02-18 2022-05-24 中国平安人寿保险股份有限公司 Data processing method, device, equipment and medium based on encryption algorithm

Also Published As

Publication number Publication date
CN115118688A (en) 2022-09-27

Similar Documents

Publication Publication Date Title
US6711542B2 (en) Method of identifying a language and of controlling a speech synthesis unit and a communication device
CN104301428B (en) A kind of method of data synchronization and server
CN112329418A (en) Parallel approval method, equipment and computer readable storage medium
CN111953517B (en) Method and system for realizing service rule hot loading
CN114969051A (en) Data processing method, device, storage medium and equipment
CN111464515A (en) Data conversion method, device, equipment and storage medium
CN114118047A (en) Report generation method, device, equipment and computer storage medium
CN115118688B (en) Method for sending message based on message template, storage medium and electronic equipment
CN110597706A (en) Method and device for testing application program interface data abnormity
CN116644035B (en) File batch warehousing method, device, equipment and storage medium
CN115134326B (en) Data processing device for generating messages to be sent
CN108629699B (en) Data uploading method, data uploading equipment, storage medium and device
CN115544132A (en) Data import method and system and electronic equipment
CN114817024A (en) Use case generation method and device, equipment and storage medium
CN114466387A (en) Method and device for updating configuration file of base station, storage medium and electronic device
CN113568682B (en) Rule data verification method, device, computer equipment and storage medium
CN114547006A (en) Data verification method and device, storage medium and electronic device
CN110929500B (en) File comparison method and related device
CN115563187B (en) Data conversion method, storage medium and electronic equipment
EP4198806A1 (en) Keyword data linking system and method thereof
CN113158692B (en) Semantic recognition-based multi-intention processing method, system, equipment and storage medium
CN109697662B (en) Business function implementation method and system applied to self-service terminal
CN111104439B (en) Stored data comparison method, stored data comparison device and storage medium
CN114697368A (en) Method and device for determining equipment control file, storage medium and electronic device
CN114022250A (en) Componentized drawing method, system, electronic equipment and computer readable 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