Detailed Description
The embodiment of the application provides a method, a device and a system for sending an automatic fusing message.
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
As shown in fig. 1, which is an overall flowchart of a message sending method in the prior art, steps of counting the number of messages, determining whether to send messages, and the like are all processed in a message processing system, so that a problem of low message sending efficiency is caused.
The above prior art specifically includes that a service system initiates a message sending request to a message processing system, and performs pre-check, blacklist check, and the like on the message sending request in the message processing system, where the blacklist check is to determine whether a message (channel + service information) sent this time belongs to a blacklist, and if it is indicated in the blacklist that such service information sent through the channel exceeds a threshold value, it has already influenced a user. After passing the blacklist verification, it needs to be determined whether the message to be sent and the previous sending record affect the user, that is, the query of the number of sent messages and the verification of the number are described in the figure; if the number of the sent messages passes the verification, calling the gateway to send the messages of this time; and finally, recording the message sent this time in the accounting system, namely adding 1 to the message sent record in the accounting system.
Fig. 2 is a flowchart of an automatically fusing message sending method according to an embodiment of the present application, where the flowchart describes a work flow in a message processing apparatus, and compared with the prior art, the message processing apparatus in the present application does not perform the steps of querying, verifying, accounting, and the like on a sent message, and only implements the determination on whether to send a message by verifying a blacklist, thereby simplifying the message sending flow, and completing the purpose of controlling message sending by operating the blacklist through an accounting system, thereby reducing the disturbance on the same type of messages of a user, and avoiding the problem of blocking a notification channel of the user due to sending a large number of messages to the user through the same notification channel.
Specifically, step 201 is to receive a message sending request and obtain the characteristics in the message sending request.
And step 202, carrying out blacklist verification according to the characteristics.
Step 203, after passing the blacklist verification, sending the corresponding message, and generating a log of the message sent this time according to the characteristics.
As an embodiment of the present application, the sending a message request at least includes:
channel and service information of the message are sent;
or, target user and service information of the sending message.
The channel for sending the message comprises a mobile phone number, a mail address, a client and the like of a target user, wherein the mobile phone number is used for sending a short message to the user, the mail address is used for sending a mail to the user, and the client is used for sending a notification message to the client of the user, for example, sending a message of successful payment to a pay client of an intelligent terminal of the user.
The service information includes service type, and may also include information such as service message content, where the service message content is, for example, "your XXXX order payment is successful", "your XXX order transfer is successful", the service type may be, for example, a payment success (or failure) message, a transfer success (or failure) message, a notification message that goods have been delivered, and the like, and the service information may be determined in a corresponding form through a channel, for example, when the channel is a mobile phone number, the service information may include only simple text information, and when the channel is an email address, the service information may include multimedia content such as text, pictures, and the like.
As an embodiment of the present application, when the request for sending a message includes a target user and service information, obtaining the characteristics in the request for sending a message further includes analyzing and obtaining a channel for sending a message according to the information of the target user.
The method includes the steps that when a request for sending a message does not include a channel, a target user needs to be included, as a user may have multiple communication channels, including a mobile phone number, a mail address, a client terminal and the like, the specific channel used for sending the message can be selected according to multiple conditions, for example, if most login operations of the user are performed on a client side of a mobile phone, a notification message can be selected to be sent in the client side mode, if the user browses commodities and the like are completed through a computer, a mobile phone short message mode or a mail mode can be selected for sending the message, and only the user (the target user) needs to be indicated to be sent the message.
As an embodiment of the present application, performing blacklist checking according to the feature further includes determining whether the feature exists in the blacklist, and if so, not sending the message.
The characteristics include at least channel and traffic type, and may also include time information of the sent message.
As an embodiment of the present application, the log includes at least a channel and a service type of the message.
The log may further include time information of the message to be sent, and the log may be stored locally in the message processing apparatus.
The channel may be in the form of an alphabetic character string or a numeric character string, or may also be a character string formed by mixing letters and numbers, and the service information may be a service type code, which may identify a service type and convert it into specific text information when being sent to a user.
Through the method of the embodiment of the application, the message sent to the user can be logically controlled, if the sent message is in the blacklist, the message is not sent, and the message disturbance to the user is avoided; and the processing speed of the message processing system for sending the message is improved.
Fig. 3 is a flowchart of an automatically fused message sending method according to an embodiment of the present application, where the flowchart mainly describes a workflow of an accounting system, and the method achieves the purpose of improving message sending efficiency by processing a log separately from a message processing device, and the method in the accounting system and the method according to the embodiment shown in fig. 2 perform a function of controlling message sending to avoid sending too many messages of the same service type to a user through the same channel.
Specifically, step 301 is comprised of synchronizing the logs of the message processing apparatus.
And step 302, accumulating the number of the messages with the same characteristics according to the log.
Step 303, determining whether the number exceeds a number threshold, and if so, adding the feature into a blacklist.
As an embodiment of the present application, the characteristics include at least a channel and a service type of the message to be transmitted.
As an embodiment of the present application, the characteristic further includes time information of the transmitted message.
As an embodiment of the present application, the determining whether the number exceeds a predetermined threshold further includes determining whether the number exceeds a number threshold within a certain time, and if so, adding the feature to a blacklist.
If the number of the same service messages sent to the user through the same channel in a period of time exceeds a certain threshold value, the situation is considered to be interference to the user, for example, if the number of messages which are sent to the user successfully for payment in a mobile phone short message mode in 1 minute exceeds 10, the situation is considered to be interference to the user, and if the number of messages which are sent to the user successfully for payment in a mobile phone short message mode in 1 hour exceeds 10, the situation is considered not to be interference to the user.
As an embodiment of the present application, the method further includes determining time information of the feature in the blacklist, and deleting the feature from the blacklist if an interval between the time information and the current time exceeds a time threshold.
When the service information sent through a certain channel does not appear in a period of time, the blacklist is updated constantly, which indicates that the service information sent through the channel subsequently does not form interference to the user, and therefore, the information should be allowed to be sent continuously, rather than being shielded for ever.
By the method of the embodiment, the log of the sent message can be recorded in an asynchronous mode, and the log is analyzed and the blacklist is updated in the accounting system independent of the message processing device, so that the blacklist only needs to be judged when the message processing device sends the message, and the message sending processing efficiency of the message processing system is improved.
Fig. 4 is a schematic structural diagram of an automatic fusing message processing apparatus according to an embodiment of the present invention, where the apparatus may be implemented by using a logic circuit or a dedicated chip (e.g., FPGA), or implemented by using an existing high-performance computer, where some of the functional units may be implemented by a single hardware device, or several functional units may be implemented by one or more hardware devices, which specifically includes:
a receiving unit 401, configured to receive a message sending request and obtain a feature in the message sending request.
A checking unit 402, configured to perform blacklist checking according to the characteristic.
And the processing unit 403 is configured to send a corresponding message after passing the blacklist verification, and generate a log of the message sent this time according to the characteristics.
As an embodiment of the present application, the sending a message request at least includes:
channel and service information of the message are sent;
or, target user and service information of the sending message.
As an embodiment of the present application, the receiving unit is further configured to analyze a channel through which the message is sent according to the target user information.
As an embodiment of the present application, the checking unit is further configured to determine whether the feature exists in the blacklist, and if so, not send the message.
Fig. 5 is a schematic structural diagram of an automatic fusing accounting apparatus according to an embodiment of the present invention, where the apparatus may be implemented by using a logic circuit or a dedicated chip (e.g., FPGA), or by using an existing high-performance computer, where some of the functional units may be implemented by a single hardware device, or several functional units may be implemented by one or more hardware devices, and specifically includes:
a synchronization unit 501 for synchronizing the logs of the message processing apparatus.
A calculating unit 502, configured to accumulate the number of messages with the same characteristics according to the log.
The processing unit 503 is configured to determine whether the number exceeds a number threshold, and if so, add the feature to a blacklist.
As an embodiment of the present application, the characteristics include at least a channel and a service type of the message to be transmitted.
As an embodiment of the present application, the characteristic further includes time information of the transmitted message.
As an embodiment of the present application, the processing unit is further configured to determine whether the number exceeds a number threshold within a certain time, and if so, add the feature to a blacklist.
As an embodiment of the present application, the apparatus further includes an updating unit 504, which determines time information of the feature in the blacklist, and deletes the feature from the blacklist if an interval between the time information and the current time exceeds a time threshold.
Fig. 6 is a schematic structural diagram of an automatic fusing message processing system according to an embodiment of the present application, in which the message processing apparatus and the accounting apparatus in the embodiments shown in fig. 4 and fig. 5 are included, where:
the message processing device 601 is configured to receive a message sending request, obtain a feature in the message sending request, perform blacklist verification according to the feature, send a corresponding message after passing the blacklist verification, and generate a log of the message sending according to the feature;
and the accounting device 602 is configured to synchronize the logs of the message processing device, determine whether the number exceeds a number threshold according to the number of messages with the same characteristics accumulated in the logs, and add the characteristics to a blacklist if the number exceeds the number threshold.
The system in this embodiment may have each functional unit in the above-mentioned apparatus or additional functional units, which are not described herein again.
Fig. 7 is a specific flowchart of a message processing system with automatic fusing in processing a message according to an embodiment of the present application, in which the message processing apparatus and the accounting apparatus may be implemented by one or several computers, or may be formed by a dedicated chip, and a log, a blacklist, and the like included in the message processing apparatus and the accounting apparatus may be implemented by a database, and may be located in any location, for example, the log and the message processing apparatus are located in the same computer, or are separately located in different computers.
Specifically, in this figure, step 701 is included, and the service system makes a request for sending a message to the message processing apparatus.
In this step, the service system may be, for example, a payment transaction system, or a money transfer system, or a collection system, which is exemplified in this embodiment by the payment transaction system, and a message sending request sent by the payment transaction system at least includes user information and a service type, where the service type indicates which service the message to be sent belongs to, such as a payment completion message, a payment failure message, a transfer completion message, a transfer failure message, and the like, and may further include service message content, such as a user ID + a payment completion message + a certain payment completion message, or include a sending channel + a service type + service message content, such as a mobile phone number and a certain payment completion message.
The message sending request may specifically include some parameters required for sending user information (channel) + service type coding + assembling message content. The message processing device acquires a message template corresponding to the service type code according to the service type code, replaces some replaceable variables in the template with the parameter content transmitted by the user, and assembles the message content which is finally sent to the user.
Step 702, the message processing apparatus performs pre-check on the message sending request.
In this step, it is mainly verified whether the format of the message sending request meets the requirements, for example, whether the format of the user ID is correct, whether the format of a certain payment completion message is correct, whether the service type of the message sending request exists, and the like.
Step 703, obtaining the characteristics in the message sending request.
In this step, if the request for sending a message is a user ID and a payment completion message (service type), the user ID needs to be extracted from the request, and an appropriate sending channel is matched according to the user ID, for example, 2 channels for sending a message, namely a mobile phone number and a mail address, are stored in the user information, one of the channels is selected as a channel for sending a message according to the preference of the user or according to channels for sending history messages, in this example, the mobile phone number is selected as a channel for sending a message, and the characteristics at least include a channel for sending a message (mobile phone number) and a payment completion message.
If the message sending request comprises a message sending channel and a service type, the characteristics in the message sending request are directly obtained, and the characteristics at least comprise the message sending channel (mobile phone number) and the payment completion message.
Step 704, performing blacklist check on the features.
The blacklist in this step includes a plurality of features, the features in the received message sending request are compared with the features in the blacklist, if the features are the same, the verification of the blacklist fails, otherwise, the verification of the blacklist passes, if the verification fails, the payment completion message is not sent, and in this embodiment, the payment completion message can be sent after the verification of the blacklist.
Step 705, the message processing apparatus invokes a communication apparatus such as a gateway to send a payment completion message in a specified channel, and generates a log of the message sent this time.
In this step, the communication device such as the gateway and the message processing device may be integrated with each other or may be independent from each other, and the present invention is not limited thereto.
The log for generating the message to be sent at this time at least includes the channel and the service type of the message to be sent at this time, where the service type is, for example, a payment success message, a transfer failure message, a seller delivery message, and the like.
The log may be stored in the message processing device.
The message processing flow in the message processing apparatus is thus ended.
The accounting means synchronizes the log in said message handling means, step 706.
In this step, the accounting device periodically reads the log of the message processing device and performs accounting processing locally, where the accounting processing refers to the following work such as analysis and calculation.
In step 707, the number of logs having the same characteristic is calculated.
In this step, the accounting device accumulates the logs with the same channel and service type according to the recorded logs, and as shown in table 1 below, the logs are synchronized log tables, and the channel and service type of each message transmission are recorded in the table.
TABLE 1
In the table, the channels of the first log and the third log are the same as the service type, the channel of the fourth log is the same as the channel of the first log, but the service type is different, and 100 records are provided for accumulating the successful payment message sent by the mobile phone number short message mode through the data (not shown in the table) of other rows of the table.
At step 708, it is determined whether the calculated number is greater than a number threshold.
In this step, if the calculated amount is greater than the amount threshold, step 709 is entered, otherwise, the accounting process is ended.
In this example, the preset number threshold is 99, and according to the aforementioned calculated number of 100, it indicates that too many payment success messages are sent in the form of short messages of mobile phone numbers, which may cause interference to the user.
Step 709, record the feature in the blacklist.
The above features are the mobile phone number and the payment success message, and the feature is added into the blacklist. The blacklist can be saved in the message processing device or the accounting device.
As shown in fig. 8, which is a specific flowchart of an automatic fusing message processing system in an embodiment of the present application when processing a message, steps 801 to 805 in this embodiment are substantially the same as steps 701 to 705 in the embodiment shown in fig. 7, except that, when the message processing apparatus generates a log of a message sent this time in step 805, the log includes time information of the message sent in addition to a channel and a service type.
The accounting means synchronizes the log in said message handling means, step 806.
Step 807, calculate the number of logs with the same characteristics over a time range.
In this step, the number of logs having the same characteristics is calculated according to the time information of the message sent in the log and a preset time range, for example, the time range is 1 hour, and the number of logs having the same characteristics in 1 hour is calculated as 100.
Step 808, determining whether the calculated number is greater than a number threshold.
In this step, if the calculated amount exceeds the amount threshold, step 809 is entered, otherwise, the accounting process is ended.
Similar to the embodiment of fig. 7, the number threshold is 99, the number of logs with the same characteristics in 1 hour calculated in step 807 is 100, the judgment result exceeds the number threshold, and the process proceeds to step 809.
Step 809 records the feature in the blacklist.
In this step, the accounting device records time information for creating the feature when recording the feature, and in the step of the message processing device performing blacklist check, the message processing device filters out the expired feature according to the created time information, or performs the update of the blacklist through the following step 810. In this example, the blacklist is located in the message processing means.
In step 810, the accounting means calculates the length of time a feature exists in the blacklist and if a time threshold is exceeded, the feature is removed from the blacklist.
Specifically, the difference between the current time and the time information of the features in the blacklist is calculated in a preset period, if the difference exceeds a time threshold value, the features are deleted from the blacklist, and otherwise, the features in the blacklist are continuously reserved. That is, if a certain service information is not sent to the user through a certain channel for a while, the service information sent by the channel does not form a disturbance to the user, and then the service information sending in this way can be recovered.
By updating the blacklist, the behavior of sending the service message to the user can be controlled, so as to avoid causing interference to the user.
By the method and the device in the embodiment of the application, the efficiency of sending the service messages by the system can be greatly improved by separating the processes of message processing and blacklist updating, and the service messages are controlled not to cause harassment to users.
Improvements to a technology can clearly be distinguished between hardware improvements (e.g. improvements to the circuit structure of diodes, transistors, switches, etc.) and software improvements (improvements to the process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate a dedicated integrated circuit chip 2. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Language Description Language), traffic, pl (core unified Programming Language), HDCal, JHDL (Java Hardware Description Language), langue, Lola, HDL, laspam, hardbyscript Description Language (vhr Description Language), and the like, which are currently used by Hardware compiler-software (Hardware Description Language-software). It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory.
Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
While the present application has been described with examples, those of ordinary skill in the art will appreciate that there are numerous variations and permutations of the present application without departing from the spirit of the application, and it is intended that the appended claims encompass such variations and permutations without departing from the spirit of the application.