CN116319645A - Message sending method, device, computer equipment and computer readable storage medium - Google Patents

Message sending method, device, computer equipment and computer readable storage medium Download PDF

Info

Publication number
CN116319645A
CN116319645A CN202310259709.2A CN202310259709A CN116319645A CN 116319645 A CN116319645 A CN 116319645A CN 202310259709 A CN202310259709 A CN 202310259709A CN 116319645 A CN116319645 A CN 116319645A
Authority
CN
China
Prior art keywords
message
variable
data
message sending
determining
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.)
Pending
Application number
CN202310259709.2A
Other languages
Chinese (zh)
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.)
Beijing Shuidi Technology Group Co ltd
Original Assignee
Beijing Shuidi Technology Group 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 Beijing Shuidi Technology Group Co ltd filed Critical Beijing Shuidi Technology Group Co ltd
Priority to CN202310259709.2A priority Critical patent/CN116319645A/en
Publication of CN116319645A publication Critical patent/CN116319645A/en
Pending legal-status Critical Current

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
    • H04L51/06Message adaptation to terminal or network requirements
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Signal Processing (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a message sending method, a device, computer equipment and a computer readable storage medium, which relate to the technical field of Internet, wherein messages of different task types adopt different message configuration templates to generate message files, and the messages of different task types can be subjected to flexible distribution processing, so that the generation of the files is realized through configuration, the workload of manual processing is reduced, the quality of the message files is ensured, the message sending efficiency is improved, and the waste of message resources is avoided. The method comprises the following steps: responding to a message sending request, determining a message sending task to be executed indicated by the message sending request, and acquiring a task type of the message sending task; determining a target shunting mode based on shunting configuration information corresponding to the task type; and generating a message file to be sent by utilizing the message configuration template associated with the target distribution mode, and sending the message file according to the target distribution mode.

Description

Message sending method, device, computer equipment and computer readable storage medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method, an apparatus, a computer device, and a computer readable storage medium for sending a message.
Background
With the continuous development of internet technology, public numbers, short messages, APP and the like have become the most important ties for enterprises to connect customers with products and services, and the enterprises can send messages to users to help the users to acquire the latest data information, so that traffic is brought.
In the related art, for different scenes, a worker needs to determine the active content or the service content in advance, and write a message document so that the message document is directly related to the active content or the service content. When the message file is determined, the staff can send the message file to the user in the forms of short message, in-application notification and the like by utilizing the message sending platform, so that the user can browse and refer to the message file.
In carrying out the present application, the applicant has found that the related art has at least the following problems:
most of the message documents are manually written by workers, the documents are required to be frequently written according to different scenes, the capability of the workers for writing the documents is uneven, the messages are easy to ignore by users after reaching, the message sending efficiency is low, and the waste of message resources is easy to cause.
Disclosure of Invention
In view of this, the present application provides a method, an apparatus, a computer device, and a computer readable storage medium for sending messages, which mainly aims to solve the problems that in the prior art, for different scenes, frequent writing of a document is required, the capability of writing of a document by a worker is uneven, the message is easy to be ignored by a user after reaching, the message sending efficiency is low, and the waste of message resources is easy to be caused.
According to a first aspect of the present application, there is provided a message sending method, the method comprising:
responding to a message sending request, determining a message sending task to be executed indicated by the message sending request, and acquiring a task type of the message sending task;
determining a target shunting mode based on shunting configuration information corresponding to the task type;
and generating a message file to be sent by utilizing the message configuration template associated with the target distribution mode, and sending the message file according to the target distribution mode.
Optionally, the determining the target splitting manner based on the splitting configuration information corresponding to the task type includes:
inquiring the distribution configuration information corresponding to the task type, and reading a distribution strategy indicated by the distribution configuration information;
When the distribution strategy indicates random distribution, a random function is obtained, distribution proportion is determined based on the random function, and the distribution proportion is used as the target distribution mode;
and when the distribution strategy indicates the distribution of the model, acquiring a preset algorithm model, and determining an optional distribution mode from a plurality of optional distribution modes as the target distribution mode based on the preset algorithm model.
Optionally, the determining the split ratio based on the random function includes:
running the random function, obtaining a current random value output by the random function, and determining a preset value interval;
if the current random value is within the preset value interval, taking the current random value as the shunt proportion;
and if the current random value is out of the preset value interval, rerun the random function to obtain a new random value, and comparing the new random value with the preset value interval until the random value in the preset value interval is obtained as the shunt proportion.
Optionally, the determining the target splitting manner in a plurality of optional splitting manners based on the preset algorithm model includes:
Determining the multiple selectable flow dividing modes, and respectively acquiring flow dividing information of each selectable flow dividing mode in the multiple selectable flow dividing modes to obtain multiple flow dividing information;
determining a requester for initiating the message sending request, and acquiring message conversion data of the requester;
inputting the plurality of shunt information and the message conversion data into the preset algorithm model, and obtaining the expected conversion rate corresponding to each shunt information output by the preset algorithm model;
and determining target shunting information with highest preset conversion rate from the plurality of shunting information, and taking the optional shunting mode indicated by the target shunting information as the target shunting mode.
Optionally, the generating the message file to be sent by using the message configuration template associated with the target distribution mode includes:
inquiring the message configuration template corresponding to the target distribution mode, and determining the user type and the document configuration rule in the message configuration template;
obtaining variable data corresponding to each variable placeholder in the at least one variable placeholder according to the at least one variable placeholder specified by the document configuration rule, and replacing each variable placeholder in the document configuration rule by adopting the corresponding variable data to obtain an initial message document;
And acquiring a user identifier according to the user type, and marking the initial message file by adopting the user identifier to obtain the message file to be sent.
Optionally, the obtaining variable data corresponding to each variable placeholder in the at least one variable placeholder according to the at least one variable placeholder specified by the document configuration rule includes:
reading the document configuration rule, and determining the at least one variable placeholder in the document configuration rule;
for each variable placeholder in the at least one variable placeholder, inquiring a variable type and a field identifier associated with the variable placeholder in the document configuration rule;
when the variable type indication is acquired in a database, inquiring the data indicated by the field identification in the database as variable data corresponding to the variable placeholder;
and when the variable type indicates reporting and acquiring, acquiring the replacement data transmitted by the access party initiating the message sending request, and taking the replacement data as variable data corresponding to the variable placeholder.
Optionally, the acquiring the replacement data incoming by the access party initiating the message sending request includes:
When the variable type indicates reporting acquisition, determining an access party initiating the message sending request, sending a data providing request to the access party, and receiving data returned by the access party based on the data providing request as the replacement data; or alternatively, the first and second heat exchangers may be,
and acquiring data carried by the message sending request, and taking the data as the replacement data.
According to a second aspect of the present application, there is provided a message sending apparatus, the apparatus comprising:
the acquisition module is used for responding to the message sending request, determining a message sending task to be executed indicated by the message sending request and acquiring the task type of the message sending task;
the determining module is used for determining a target shunting mode based on shunting configuration information corresponding to the task type;
and the sending module is used for generating a message file to be sent by utilizing the message configuration template associated with the target distribution mode and sending the message file according to the target distribution mode.
Optionally, the determining module is configured to query the split configuration information corresponding to the task type, and read a split policy indicated by the split configuration information; when the distribution strategy indicates random distribution, a random function is obtained, distribution proportion is determined based on the random function, and the distribution proportion is used as the target distribution mode; and when the distribution strategy indicates the distribution of the model, acquiring a preset algorithm model, and determining an optional distribution mode from a plurality of optional distribution modes as the target distribution mode based on the preset algorithm model.
Optionally, the determining module is configured to operate the random function, obtain a current random value output by the random function, and determine a preset value interval; if the current random value is within the preset value interval, taking the current random value as the shunt proportion; and if the current random value is out of the preset value interval, rerun the random function to obtain a new random value, and comparing the new random value with the preset value interval until the random value in the preset value interval is obtained as the shunt proportion.
Optionally, the determining module is configured to obtain a plurality of pieces of split information according to the split information of the mode; determining a requester for initiating the message sending request, and acquiring message conversion data of the requester; inputting the plurality of shunt information and the message conversion data into the preset algorithm model, and obtaining the expected conversion rate corresponding to each shunt information output by the preset algorithm model; and determining target shunting information with highest preset conversion rate from the plurality of shunting information, and taking the optional shunting mode indicated by the target shunting information as the target shunting mode.
Optionally, the sending module is configured to query the message configuration template corresponding to the target splitting manner, and determine a user type and a document configuration rule in the message configuration template; obtaining variable data corresponding to each variable placeholder in the at least one variable placeholder according to the at least one variable placeholder specified by the document configuration rule, and replacing each variable placeholder in the document configuration rule by adopting the corresponding variable data to obtain an initial message document; and acquiring a user identifier according to the user type, and marking the initial message file by adopting the user identifier to obtain the message file to be sent.
Optionally, the sending module is configured to read the document configuration rule, and determine the at least one variable placeholder in the document configuration rule; for each variable placeholder in the at least one variable placeholder, inquiring a variable type and a field identifier associated with the variable placeholder in the document configuration rule; when the variable type indication is acquired in a database, inquiring the data indicated by the field identification in the database as variable data corresponding to the variable placeholder; and when the variable type indicates reporting and acquiring, acquiring the replacement data transmitted by the access party initiating the message sending request, and taking the replacement data as variable data corresponding to the variable placeholder.
Optionally, the sending module is configured to determine, when the variable type indicates reporting acquisition, an access party that initiates the message sending request, send a data providing request to the access party, and receive, as the replacement data, data returned by the access party based on the data providing request; or, acquiring the data carried by the message sending request, and taking the data as the replacement data.
According to a third aspect of the present application there is provided a computer device comprising a memory storing a computer program and a processor implementing the steps of the method of any of the first aspects described above when the computer program is executed by the processor.
According to a fourth aspect of the present application there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of any of the first aspects described above.
By means of the technical scheme, the message sending method, the device, the computer equipment and the computer readable storage medium provided by the application respond to the message sending request, the message sending task to be executed indicated by the message sending request is determined, the task type of the message sending task is obtained, the target distribution mode is determined based on distribution configuration information corresponding to the task type, the message configuration template associated with the target distribution mode is utilized to generate the message file to be sent, the message file is sent according to the target distribution mode, the message of different task types adopts different message configuration templates to generate the message file, and flexible distribution processing can be carried out on the message of different task types, so that the generation of the file is realized through configuration, the workload of manual processing is reduced, the quality of the message file is ensured, the message sending efficiency is improved, and the message resource waste is avoided.
The foregoing description is only an overview of the technical solutions of the present application, and may be implemented according to the content of the specification in order to make the technical means of the present application more clearly understood, and in order to make the above-mentioned and other objects, features and advantages of the present application more clearly understood, the following detailed description of the present application will be given.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
fig. 1 shows a flow chart of a message sending method provided in an embodiment of the present application;
fig. 2A is a schematic flow chart of another message sending method according to an embodiment of the present application;
fig. 2B is a schematic diagram of a system architecture of a messaging system according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a message sending device according to an embodiment of the present application;
fig. 4 shows a schematic device structure of a computer device according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The embodiment of the application provides a message sending method, as shown in fig. 1, which comprises the following steps:
101. and responding to the message sending request, determining a message sending task to be executed indicated by the message sending request, and acquiring the task type of the message sending task.
The applicant has realized that in the internet field, the user is brought about to be transformed by a message such as a short message, a notification and the like, and many enterprises send various messages to the user every day, so that the traffic is transformed. How to design a supporting system for message touch is important for improving working efficiency of workers and bringing greater benefit to enterprises. Therefore, the message sending method is provided, the messages of different task types adopt different message configuration templates to generate the message file, and the messages of different task types can be subjected to flexible distribution processing, so that the generation of the file is realized through configuration, the workload of manual processing is reduced, the quality of the message file is ensured, the message sending efficiency is improved, and the waste of message resources is avoided.
The embodiment of the application can be applied to a message sending system, the message sending system provides an interface for an access party of message sending, and the access party can establish a data link with the message sending system through the interface, so that the function of the message sending system is used. The message sending system may provide a plurality of different types of tasks to the access party, which may specifically include a disposable task, a periodic task, an event type task, a manual task, an interface triggering task, and the like, and the access party may select which task type the access party wants to send a message. After determining the task type, the message sending system receives a message sending request of the access party, determines a message sending task to be executed indicated by the message sending request, wherein the message sending task is the task determined by the access party, and further the message sending system can acquire the task type of the message sending task, and then determines how to realize message distribution and how to realize document generation according to the task type.
102. And determining a target shunting mode based on shunting configuration information corresponding to the task type.
In this embodiment of the present application, each task type corresponds to split configuration information in a message sending system, where the split configuration information is used to indicate how to perform split sending on a message related to a task of the task type, where one message type may configure multiple splits, each split may use different splitting modes, and each split mode may separately perform setting of a message configuration template. Therefore, after the task type is determined, the message sending system can acquire the distribution configuration information corresponding to the task type, select a target distribution mode according to the distribution configuration information, and then generate a message document by adopting a message configuration template corresponding to the target distribution mode.
103. And generating a message file to be sent by utilizing a message configuration template associated with the target distribution mode, and sending the message file according to the target distribution mode.
In the embodiment of the present application, after the target splitting manner is determined, since each splitting manner may be set separately to the message configuration template, the message sending system may generate the message file to be sent by using the message configuration template associated with the target splitting manner, and send the message file according to the target splitting manner.
According to the method provided by the embodiment of the application, the message sending task to be executed indicated by the message sending request is determined in response to the message sending request, the task type of the message sending task is obtained, the target distribution mode is determined based on distribution configuration information corresponding to the task type, the message configuration template associated with the target distribution mode is utilized to generate the message file to be sent, the message files are sent according to the target distribution mode, the message files of different task types are generated by adopting different message configuration templates, and flexible distribution processing can be carried out on the message of different task types, so that the generation of the file is realized through configuration, the workload of manual processing is reduced, the quality of the message file is ensured, the message sending efficiency is improved, and the waste of message resources is avoided.
Further, as a refinement and extension of the foregoing embodiment, in order to fully describe a specific implementation procedure of the embodiment, the embodiment of the present application provides another message sending method, as shown in fig. 2A, where the method includes:
201. and responding to the message sending request, determining a message sending task to be executed indicated by the message sending request, and acquiring the task type of the message sending task.
The embodiment of the application can be applied to a message sending system, the message sending system provides an interface for an access party of message sending, and the access party can establish a data link with the message sending system through the interface, so that the function of the message sending system is used. The message sending system may provide a plurality of different types of tasks to the access party, which may specifically include a disposable task, a periodic task, an event type task, a manual task, an interface triggering task, and the like, and the access party may select which task type the access party wants to send a message. After determining the task type, the message sending system receives a message sending request of the access party, determines a message sending task to be executed indicated by the message sending request, wherein the message sending task is the task determined by the access party, and further the message sending system can acquire the task type of the message sending task, and then determines how to realize message distribution and how to realize document generation according to the task type.
The system architecture of the messaging system is described below: as shown in fig. 2B, the messaging system interfaces with the access party using an API (Application Program Interface ), and obtains information, data, etc. provided by the access party through the API; the messaging system includes a marketing layer and a base delivery layer. The marketing layer is divided into a task node, a shunt node and a document processing node; the task types included by the task node include a disposable task, a periodic task, an event type task, a manual task, an interface triggering type task and the like, and an access party can select which task type to send a message by itself; the shunting node is used for determining a shunting mode for sending the message, the shunting mode can be configured in advance, and the shunting mode can specifically comprise random shunting, model shunting and the like; the document processing node is used for generating a message document, the document processing node comprises a message configuration template, the message configuration template can realize configuration, and when the document processing node generates the message document, variable data for replacing a variable placeholder in the message configuration template can be obtained, and the specific variable data can comprise crowd pack data, SQL (Structured Query Language) data, event data, API transmission data and the like. The basic transmission layer has a routing function, and a data link exists between the basic transmission layer and the marketing layer, the message file generated by the marketing layer is transmitted to the basic transmission layer, and the basic transmission layer transmits the message file; the access party can configure a message sending channel in the basic sending layer in advance, so that after the marketing layer generates the message file, the basic sending layer can directly send the message file according to the appointed channel.
202. And determining a target shunting mode based on shunting configuration information corresponding to the task type.
In this embodiment of the present application, each task type corresponds to split configuration information in a message sending system, where the split configuration information is used to indicate how to perform split sending on a message related to a task of the task type, where one message type may configure multiple splits, each split may use different splitting modes, and each split mode may separately perform setting of a message configuration template. Therefore, after determining the task type, the message sending system may acquire the split configuration information corresponding to the task type, select a target split mode according to the split configuration information, and then generate a message file by using a message configuration template corresponding to the target split mode, and the following description is given to the determining process of the target split mode:
because each task type corresponds to the distribution configuration information in the message sending system, the message sending system can inquire the distribution configuration information corresponding to the task type and read the distribution strategy indicated by the distribution configuration information. The distribution strategy can comprise random distribution and model distribution, distribution proportion is required to be configured for different distribution in a random distribution mode, the sum of the respective proportion of all the distribution is 100%, a current random value can be obtained through a random function in practical application, the percentage starting value and the percentage ending value are accumulated one by one according to the configured different distribution, and whether the current random value can be used as the distribution proportion is judged. That is, when the splitting policy indicates random splitting, the message sending system may acquire a random function, determine the splitting ratio based on the random function, and use the splitting ratio as a target splitting manner, specifically, when determining the splitting ratio, the message sending system may operate the random function to acquire a current random value output by the random function, and since the splitting ratio needs to be kept between 0% and 100%, the message sending system may use 0% to 100% as a preset value interval, and determine whether the current random value of the random function data meets the preset value interval. If the current random value is within the preset value interval, the current random value is between 0% and 100%, and the current random value can be used as the split ratio, so that the message sending system takes the current random value as the split ratio; if the current random value is outside the preset value interval, the current random value is beyond 0% to 100%, and the current random value cannot be used as the split ratio, and the random value needs to be determined again. After the split ratio is determined, the split ratio can be used as a target split mode, and then the message sending operation is executed according to the split ratio.
The model splitting, i.e. AI (Artificial Intelligence ) splitting, is a mode of obtaining the optimal conversion type of the current user through a machine learning algorithm, each task type can establish a preset algorithm model, the task type can correspond to a plurality of optional splitting modes, the preset algorithm model automatically learns the splitting information of the optional splitting modes and the message conversion data of the requesting party as input, so that the message sending system takes the optional splitting mode with the highest expected conversion rate as the selected target splitting mode. That is, when the splitting strategy indicates the splitting of the model, the message sending system acquires a preset algorithm model, and determines an optional splitting mode from a plurality of optional splitting modes as a target splitting mode based on the preset algorithm model. Specifically, when determining the target splitting manner, the message sending system determines a plurality of optional splitting manners, obtains splitting information of each optional splitting manner in the plurality of optional splitting manners, determines a requester for initiating a message sending request, obtains message conversion data of the requester, inputs the plurality of splitting information and the message conversion data into a preset algorithm model, obtains expected conversion rate corresponding to each splitting information output by the preset algorithm model, determines target splitting information with highest preset conversion rate in the plurality of splitting information, and takes the optional splitting manner indicated by the target splitting information as the target splitting manner. The preset algorithm model corresponding to each task type can be established in advance, when the preset algorithm model is established, the optional streaming mode corresponding to the task type can be queried first, the information content which needs to be sent currently is determined to be used as message conversion data, different optional streaming modes are adopted to send the message conversion data, and the actual conversion rate of the message conversion data of the type when the message conversion data of the type is sent in different optional streaming modes is counted. And then taking all collected data as samples to train the model, obtaining a model capable of predicting the probability that the message conversion data is converted in different alternative flow dividing modes, and storing the model in association with the task type so as to directly use the model when the model needs to be divided in the follow-up process.
203. Inquiring a message configuration template corresponding to the target distribution mode, and determining the user type and the document configuration rule in the message configuration template.
In the embodiment of the present application, after the target splitting manner is determined, since each splitting manner may be set separately to the message configuration template, the message sending system may generate the message file to be sent by using the message configuration template associated with the target splitting manner, and send the message file according to the target splitting manner.
The message configuration template can be configured in advance, and mainly comprises a user type and a document configuration rule. The user type indicates which users the current message configuration template is applicable to, for example, the user type can be represented by user ID (Identity), mobile phone number, equipment number and the like; the document configuration rule is set to the preset document and the variable data, the variable data is mainly configured through the relation between the field identifiers and the variable placeholders, that is, the document configuration rule comprises some preset characters and also comprises some variable placeholders, the variable placeholders are required to be replaced at the back, and the variable placeholders are required to be obtained according to the field identifiers corresponding to the variable placeholders by adopting which data to replace the variable placeholders.
204. According to at least one variable placeholder specified by the document configuration rule, variable data corresponding to each variable placeholder in the at least one variable placeholder are obtained, and each variable placeholder in the document configuration rule is replaced by adopting the corresponding variable data, so that an initial message document is obtained.
In the embodiment of the application, after the document configuration rule is determined, some variable placeholders are specified in the document configuration rule, and the variable placeholders need to be replaced by some variable data, so that the message sending system can acquire variable data corresponding to each variable placeholder in the at least one variable placeholder according to the at least one variable placeholder specified by the document configuration rule, and replace each variable placeholder in the document configuration rule by the corresponding variable data to obtain the initial message document. The following describes the process of acquiring variable data corresponding to each variable placeholder:
first, the messaging system reads the document configuration rules in which at least one variable placeholder is determined. Then, for each of the at least one variable placeholder, the messaging system queries the variable placeholder for the variable type, field identification associated with the variable placeholder in the document configuration rules. The variable type is used for indicating the source of variable data, and can specifically indicate whether the variable data is acquired from a database or reported by an access party.
Specifically, when the variable type indicates that the variable data is acquired in the database, the message sending system needs to query and acquire the variable data by itself, so that the message sending system can query the database for the data indicated by the field identifier as the variable data corresponding to the variable placeholder. In the practical application process, for the data with large data volume, the message sending system can actually store and inquire through Hbase (an open source database) and elastic search (a search server), for example, crowd package data in the practical application can be obtained in the mode and used as variable data; for the unusual large-scale data, the message sending system can store the data through Hive (a data warehouse tool), and store the result in MySQL (relational database management system) after querying through SQL so that the message sending system directly queries in MySQL when determining that the variable type indicates to acquire in the database, for example, the SQL data in practical application can be acquired in this way and used as variable data.
When the variable type indicates reporting and acquiring, the variable data is required to be provided by the access party, so that the message sending system can acquire the replacement data transmitted by the access party initiating the message sending request, and the replacement data is used as variable data corresponding to the variable placeholder. In the practical application process, the replacement data can be obtained in different modes, and one is that the message sending system requests the access party to report, namely determines the access party initiating the message sending request, sends the data providing request to the access party, and receives the data returned by the access party based on the data providing request as the replacement data. For example, the messaging system can trigger the access party to report in the form of Kafka (distributed publish-subscribe messaging system) message, and the data transmitted to the system by the Web (network) side or the server side of the access party is used as variable data. The other is that the access party actively reports, namely, acquires the data carried by the message sending request, and takes the data as the replacement data. For example, when an access party initiates a message sending request, the access party can directly carry the desired variable data as alternative data in the message sending request through an interface with a message sending system, so that the message sending system directly takes the data provided by the access party through the interface as the variable data.
It should be noted that, in the actual application process, the message system may not acquire variable data by any method in the above processes, and in this case, the message system may directly use a default value corresponding to each variable placeholder as variable data to replace the corresponding variable placeholder, and the acquiring manner of the variable data is not specifically limited in this embodiment of the present application.
205. And according to the user type, acquiring a user identifier, and marking the initial message file by adopting the user identifier to obtain the message file to be sent.
In the embodiment of the application, after the initial message file is generated, because the user type indicates which users need to send the generated message file, the message sending system can acquire the user identification according to the user type, and label the initial message file by adopting the user identification to obtain the message file to be sent, so that the message can be sent purposefully.
206. And sending the message file according to the target distribution mode.
In the embodiment of the present application, since it is determined that the message is sent in the target offload mode before, after the message file is generated, the message sending system executes sending of the message file according to the message flow of the target offload mode.
Thus, through the technical scheme of the application, specific data required by the document variable can be obtained through a collocation and non-coding mode, so that development cost is reduced, and the working efficiency of operation sales personnel is improved; through the flexible distribution mode, conversion test can be flexibly carried out according to different service conversion test scene requirements, and the AI distribution mode is introduced, so that the conversion efficiency is intelligently improved.
According to the method provided by the embodiment of the application, the message sending task to be executed indicated by the message sending request is determined in response to the message sending request, the task type of the message sending task is obtained, the target distribution mode is determined based on distribution configuration information corresponding to the task type, the message configuration template associated with the target distribution mode is utilized to generate the message file to be sent, the message files are sent according to the target distribution mode, the message files of different task types are generated by adopting different message configuration templates, and flexible distribution processing can be carried out on the message of different task types, so that the generation of the file is realized through configuration, the workload of manual processing is reduced, the quality of the message file is ensured, the message sending efficiency is improved, and the waste of message resources is avoided.
Further, as a specific implementation of the method shown in fig. 1, an embodiment of the present application provides a message sending apparatus, as shown in fig. 3, where the apparatus includes: the device comprises an acquisition module 301, a determination module 302 and a sending module 303.
The acquiring module 301 is configured to determine, in response to a message sending request, a message sending task to be executed indicated by the message sending request, and acquire a task type of the message sending task;
the determining module 302 is configured to determine a target splitting manner based on splitting configuration information corresponding to the task type;
the sending module 303 is configured to generate a message file to be sent by using a message configuration template associated with the target distribution mode, and send the message file according to the target distribution mode.
In a specific application scenario, the determining module 302 is configured to query the split configuration information corresponding to the task type, and read a split policy indicated by the split configuration information; when the distribution strategy indicates random distribution, a random function is obtained, distribution proportion is determined based on the random function, and the distribution proportion is used as the target distribution mode; and when the distribution strategy indicates the distribution of the model, acquiring a preset algorithm model, and determining an optional distribution mode from a plurality of optional distribution modes as the target distribution mode based on the preset algorithm model.
In a specific application scenario, the determining module 302 is configured to operate the random function, obtain a current random value output by the random function, and determine a preset value interval; if the current random value is within the preset value interval, taking the current random value as the shunt proportion; and if the current random value is out of the preset value interval, rerun the random function to obtain a new random value, and comparing the new random value with the preset value interval until the random value in the preset value interval is obtained as the shunt proportion.
In a specific application scenario, the determining module 302 is configured to obtain a plurality of pieces of distribution information according to distribution information of a manner; determining a requester for initiating the message sending request, and acquiring message conversion data of the requester; inputting the plurality of shunt information and the message conversion data into the preset algorithm model, and obtaining the expected conversion rate corresponding to each shunt information output by the preset algorithm model; and determining target shunting information with highest preset conversion rate from the plurality of shunting information, and taking the optional shunting mode indicated by the target shunting information as the target shunting mode.
In a specific application scenario, the sending module 303 is configured to query the message configuration template corresponding to the target splitting manner, and determine a user type and a document configuration rule in the message configuration template; obtaining variable data corresponding to each variable placeholder in the at least one variable placeholder according to the at least one variable placeholder specified by the document configuration rule, and replacing each variable placeholder in the document configuration rule by adopting the corresponding variable data to obtain an initial message document; and acquiring a user identifier according to the user type, and marking the initial message file by adopting the user identifier to obtain the message file to be sent.
In a specific application scenario, the sending module 303 is configured to read the document configuration rule, and determine the at least one variable placeholder in the document configuration rule; for each variable placeholder in the at least one variable placeholder, inquiring a variable type and a field identifier associated with the variable placeholder in the document configuration rule; when the variable type indication is acquired in a database, inquiring the data indicated by the field identification in the database as variable data corresponding to the variable placeholder; and when the variable type indicates reporting and acquiring, acquiring the replacement data transmitted by the access party initiating the message sending request, and taking the replacement data as variable data corresponding to the variable placeholder.
In a specific application scenario, the sending module 303 is configured to determine, when the variable type indicates reporting and obtaining, an access party that initiates the message sending request, send a data providing request to the access party, and receive, as the replacement data, data returned by the access party based on the data providing request; or, acquiring the data carried by the message sending request, and taking the data as the replacement data.
The device provided by the embodiment of the application responds to the message sending request, determines the message sending task to be executed indicated by the message sending request, acquires the task type of the message sending task, determines the target distribution mode based on distribution configuration information corresponding to the task type, generates the message file to be sent by utilizing the message configuration template related to the target distribution mode, sends the message file according to the target distribution mode, generates the message file by adopting different message configuration templates for the messages of different task types, and can flexibly distribute the messages of different task types, so that the generation of the file is realized through configuration, the workload of manual processing is reduced, the quality of the message file is ensured, the message sending efficiency is improved, and the waste of message resources is avoided.
It should be noted that, for other corresponding descriptions of each functional unit related to the message sending apparatus provided in the embodiment of the present application, reference may be made to corresponding descriptions in fig. 1 and fig. 2A to fig. 2B, which are not repeated herein.
It should be noted that, user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.
In an exemplary embodiment, referring to fig. 4, there is also provided a computer device, which includes a bus, a processor, a memory, and a communication interface, and may further include an input-output interface and a display device, where each functional unit may perform communication with each other through the bus. The memory stores a computer program, and a processor executes the program stored in the memory to perform the message transmission method in the above embodiment.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the message sending method.
From the above description of the embodiments, it will be apparent to those skilled in the art that the present application may be implemented in hardware, or may be implemented by means of software plus necessary general hardware platforms. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.), and includes several instructions for causing a computer device (may be a personal computer, a server, or a network device, etc.) to perform the methods described in various implementation scenarios of the present application.
Those skilled in the art will appreciate that the drawings are merely schematic illustrations of one preferred implementation scenario, and that the modules or flows in the drawings are not necessarily required to practice the present application.
Those skilled in the art will appreciate that modules in an apparatus in an implementation scenario may be distributed in an apparatus in an implementation scenario according to an implementation scenario description, or that corresponding changes may be located in one or more apparatuses different from the implementation scenario. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The foregoing application serial numbers are merely for description, and do not represent advantages or disadvantages of the implementation scenario.
The foregoing disclosure is merely a few specific implementations of the present application, but the present application is not limited thereto and any variations that can be considered by a person skilled in the art shall fall within the protection scope of the present application.

Claims (10)

1. A method of transmitting a message, comprising:
responding to a message sending request, determining a message sending task to be executed indicated by the message sending request, and acquiring a task type of the message sending task;
determining a target shunting mode based on shunting configuration information corresponding to the task type;
And generating a message file to be sent by utilizing the message configuration template associated with the target distribution mode, and sending the message file according to the target distribution mode.
2. The method of claim 1, wherein determining the target splitting manner based on the splitting configuration information corresponding to the task type comprises:
inquiring the distribution configuration information corresponding to the task type, and reading a distribution strategy indicated by the distribution configuration information;
when the distribution strategy indicates random distribution, a random function is obtained, distribution proportion is determined based on the random function, and the distribution proportion is used as the target distribution mode;
and when the distribution strategy indicates the distribution of the model, acquiring a preset algorithm model, and determining an optional distribution mode from a plurality of optional distribution modes as the target distribution mode based on the preset algorithm model.
3. The method of claim 2, wherein the determining the split ratio based on the random function comprises:
running the random function, obtaining a current random value output by the random function, and determining a preset value interval;
If the current random value is within the preset value interval, taking the current random value as the shunt proportion;
and if the current random value is out of the preset value interval, rerun the random function to obtain a new random value, and comparing the new random value with the preset value interval until the random value in the preset value interval is obtained as the shunt proportion.
4. The method of claim 2, wherein determining the target split mode among a plurality of selectable split modes based on the preset algorithm model comprises:
determining the multiple selectable flow dividing modes, and respectively acquiring flow dividing information of each selectable flow dividing mode in the multiple selectable flow dividing modes to obtain multiple flow dividing information;
determining a requester for initiating the message sending request, and acquiring message conversion data of the requester;
inputting the plurality of shunt information and the message conversion data into the preset algorithm model, and obtaining the expected conversion rate corresponding to each shunt information output by the preset algorithm model;
and determining target shunting information with highest preset conversion rate from the plurality of shunting information, and taking the optional shunting mode indicated by the target shunting information as the target shunting mode.
5. The method of claim 1, wherein generating a message document to be sent using the message configuration template associated with the target offload mode comprises:
inquiring the message configuration template corresponding to the target distribution mode, and determining the user type and the document configuration rule in the message configuration template;
obtaining variable data corresponding to each variable placeholder in the at least one variable placeholder according to the at least one variable placeholder specified by the document configuration rule, and replacing each variable placeholder in the document configuration rule by adopting the corresponding variable data to obtain an initial message document;
and acquiring a user identifier according to the user type, and marking the initial message file by adopting the user identifier to obtain the message file to be sent.
6. The method of claim 5, wherein the obtaining variable data corresponding to each of the at least one variable placeholder according to the at least one variable placeholder specified by the document configuration rule comprises:
reading the document configuration rule, and determining the at least one variable placeholder in the document configuration rule;
For each variable placeholder in the at least one variable placeholder, inquiring a variable type and a field identifier associated with the variable placeholder in the document configuration rule;
when the variable type indication is acquired in a database, inquiring the data indicated by the field identification in the database as variable data corresponding to the variable placeholder;
and when the variable type indicates reporting and acquiring, acquiring the replacement data transmitted by the access party initiating the message sending request, and taking the replacement data as variable data corresponding to the variable placeholder.
7. The method of claim 6, wherein the obtaining the replacement data incoming by the access party that initiated the messaging request comprises:
when the variable type indicates reporting acquisition, determining an access party initiating the message sending request, sending a data providing request to the access party, and receiving data returned by the access party based on the data providing request as the replacement data; or alternatively, the first and second heat exchangers may be,
and acquiring data carried by the message sending request, and taking the data as the replacement data.
8. A message transmission apparatus, comprising:
The acquisition module is used for responding to the message sending request, determining a message sending task to be executed indicated by the message sending request and acquiring the task type of the message sending task;
the determining module is used for determining a target shunting mode based on shunting configuration information corresponding to the task type;
and the sending module is used for generating a message file to be sent by utilizing the message configuration template associated with the target distribution mode and sending the message file according to the target distribution mode.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202310259709.2A 2023-03-13 2023-03-13 Message sending method, device, computer equipment and computer readable storage medium Pending CN116319645A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310259709.2A CN116319645A (en) 2023-03-13 2023-03-13 Message sending method, device, computer equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310259709.2A CN116319645A (en) 2023-03-13 2023-03-13 Message sending method, device, computer equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116319645A true CN116319645A (en) 2023-06-23

Family

ID=86779364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310259709.2A Pending CN116319645A (en) 2023-03-13 2023-03-13 Message sending method, device, computer equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116319645A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107302597A (en) * 2017-08-17 2017-10-27 北京小度信息科技有限公司 Message official documents and correspondence method for pushing and device
CN114138432A (en) * 2021-11-17 2022-03-04 特赞(上海)信息科技有限公司 Task scheduling method and device for multi-application system, electronic equipment and storage medium
CN114238618A (en) * 2021-12-21 2022-03-25 掌阅科技股份有限公司 Information pushing method, electronic equipment and storage medium
WO2022088804A1 (en) * 2020-10-30 2022-05-05 深圳壹账通智能科技有限公司 Message pushing method and apparatus, and electronic device, and storage medium
CN115146645A (en) * 2021-03-29 2022-10-04 华为技术有限公司 Semantic parsing method and related equipment
CN115277835A (en) * 2022-08-01 2022-11-01 网易(杭州)网络有限公司 Information pushing method and device, storage medium and electronic equipment
CN115480937A (en) * 2022-09-09 2022-12-16 杭州数梦工场科技有限公司 Data processing method and device, electronic equipment and readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107302597A (en) * 2017-08-17 2017-10-27 北京小度信息科技有限公司 Message official documents and correspondence method for pushing and device
WO2022088804A1 (en) * 2020-10-30 2022-05-05 深圳壹账通智能科技有限公司 Message pushing method and apparatus, and electronic device, and storage medium
CN115146645A (en) * 2021-03-29 2022-10-04 华为技术有限公司 Semantic parsing method and related equipment
CN114138432A (en) * 2021-11-17 2022-03-04 特赞(上海)信息科技有限公司 Task scheduling method and device for multi-application system, electronic equipment and storage medium
CN114238618A (en) * 2021-12-21 2022-03-25 掌阅科技股份有限公司 Information pushing method, electronic equipment and storage medium
CN115277835A (en) * 2022-08-01 2022-11-01 网易(杭州)网络有限公司 Information pushing method and device, storage medium and electronic equipment
CN115480937A (en) * 2022-09-09 2022-12-16 杭州数梦工场科技有限公司 Data processing method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
EP2174434B1 (en) Unwired enterprise platform
CN102208991A (en) Blog processing method, device and system
CN102479223B (en) Data query method and system
CN102375837B (en) Data acquiring system and method
KR101182463B1 (en) Call group management using the session initiation protocol
CN101621541A (en) Method and apparatus for distributed application context-aware transaction processing
CN107844274B (en) Hardware resource management method, device and terminal based on super-fusion storage system
CN111090440B (en) Information processing method, system, device and storage medium
US20040073607A1 (en) Multimedia messaging system and method
CN110545232A (en) group message prompting method, group message prompting device, data processing method, data processing device, electronic equipment and storage equipment
CN114124861A (en) Message group sending method and device, computer equipment and storage medium
CN113434312A (en) Data blood relationship processing method and device
CN111460038A (en) Quasi-real-time data synchronization method and device
Krinkin et al. Architecture of a telecommunications network monitoring system based on a knowledge graph
CN105095405A (en) Data sharing and query system in laboratory
CN113626863A (en) Data processing method and device
CN112069409B (en) Method and device based on to-be-done recommendation information, computer system and storage medium
EP3998754A1 (en) Data distribution method, electronic device, and storage medium
CN104731660A (en) Data distribution method, device and system
CN114443940A (en) Message subscription method, device and equipment
CN111552719A (en) Data management method, device and system, big data platform and readable storage medium
CN116319645A (en) Message sending method, device, computer equipment and computer readable storage medium
CN112035760B (en) Task allocation method and computer equipment
KR20210050827A (en) An extraction-system using dispersion deep learning information analysis management based cloud and method of it
CN112685557A (en) Visualized information resource management method and device

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