Message notification system and method
By designing a message notification system in smart services, decoupling business scenarios and notification sending, and using message queues and message processing center modules, the problem of poor maintenance difficulty and scalability caused by the tight coupling of notification functions and business scenarios is solved, and efficient Flexible notification management improves the system's maintainability and user experience.
Patent Information
- Application Number
- CN202411361599.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-10
AI Technical Summary
The notification functions in existing smart services are closely coupled with specific business scenarios, resulting in duplicate code implementation, difficult maintenance, poor scalability, and the same notification method is implemented multiple times in different scenarios, resulting in increased code redundancy and maintenance risks.
A message notification system is designed to decouple business scenarios and notification sending through the protocol module, and uses message queues and message processing center modules to process and distribute notification requests, supports multiple notification channels, and provides automatic retry and asynchronous notification mechanisms. Implement modular and flexible notification management.
It improves the maintainability and scalability of the system, enhances the consistency and accuracy of notifications, supports multiple notification channels, ensures system responsiveness and user experience, and adapts to various business needs.
Smart Images

Figure CN119299416A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of message notification, and in particular relates to a message notification system and method. Background Art
[0002] In existing smart services, notification capabilities are mainly divided into two categories: verification notifications and informational notifications. Verification notifications are mainly used for user identity verification, such as SMS verification codes and email verification in scenarios such as password changes, password forgetting, and sensitive operations. Informational notifications are used in scenarios such as business alarms, transaction notifications, and notifications of results after important operations.
[0003] In smart services, notification functions are usually tightly coupled with specific business scenarios. This coupling results in multiple implementation codes for the same notification method within the system. For example, SMS verification code notifications, email verification notifications, etc. are repeatedly implemented in multiple business modules, increasing the complexity and maintenance difficulty of the system. In addition, when the notification function needs to be upgraded or modified, changes need to be made in multiple places, increasing the difficulty of maintenance and troubleshooting.
[0004] Moreover, the same notification method is implemented multiple times in different business scenarios, which will lead to code redundancy and difficulty in management. When the notification function needs to be modified, changes need to be made in multiple places, increasing the maintenance workload and the risk of errors. The system is difficult to adapt to new business needs or notification methods, limiting the scalability of the system. Summary of the invention
[0005] In view of the above problems, the present invention is proposed to provide a message notification system and method that overcome the above problems or at least partially solve the above problems.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] A message notification system, the system comprising:
[0008] The protocol module is used to decouple business scenarios from notification sending;
[0009] A logging module, used to log notification details;
[0010] The message processing center module is used to receive notification requests, process and distribute them;
[0011] Notification resending module, when notification sending fails, it will automatically retry sending notification.
[0012] Optionally, the business scenario is decoupled from notification sending through the Message Queuing Telemetry Transport protocol.
[0013] Optionally, when the business scenario generates a notification request, the request is sent to a message queue, and the notification component asynchronously obtains the notification request from the message queue and processes it.
[0014] Optionally, the detailed information includes order number, notification type, channel ID, channel account ID, notification business type, notification status, internal recipient ID, recipient information and notification content.
[0015] Optionally, the recipient information includes name, department, mobile phone number, email address and WeChat group.
[0016] Optionally, the message processing center module interacts with external services through SMS channels, email channels, and enterprise WeChat channels to send notifications.
[0017] Optionally, when a notification fails to be sent, the system administrator is also allowed to re-trigger the sending of the notification.
[0018] The present invention also provides a message notification method, which is based on the message notification system described in any one of the above, and comprises:
[0019] Generate business order number and trigger notification;
[0020] Perform data verification;
[0021] Get the channel and configuration information based on the business order number and prepare to send notifications;
[0022] Generate a notification order and record the details of the notification;
[0023] Store the notification request in the message queue;
[0024] The notification component monitors the message queue and obtains notification requests;
[0025] Call the channel to send notifications and process the sending results;
[0026] According to the result of sending the notification, record the notification result.
[0027] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0028] 1. The present invention can significantly improve the maintainability and scalability of the message notification system, reduce maintenance workload, and improve system stability and user experience. At the same time, by centrally managing the notification function, it can improve the consistency and accuracy of message sending and enhance user experience.
[0029] 2. The present invention builds an independent, centralized message processing center, which is responsible for the generation, processing and distribution of all notifications. The center is separated from the specific business logic to realize the modularization of the notification function. By defining clear interfaces and protocols, the business logic can easily trigger notifications without having to worry about the specific implementation details of the notifications.
[0030] 3. The present invention implements an asynchronous notification mechanism to ensure that the sending of notifications will not block business processes, improve the responsiveness and throughput of the system, support multiple notification channels (such as SMS, email, enterprise WeChat, DingTalk, etc.), and can be flexibly selected and configured according to business needs
[0031] 4. The present invention can be widely used in various business scenarios, including but not limited to e-commerce, financial services, internal corporate communications, etc.; and supports the addition of more types of notification messages and sending channels in the future to adapt to ever-changing business needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A schematic diagram of a message notification system provided in an embodiment of the present application;
[0033] Figure 2 A flowchart of a message notification method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0035] Embodiment 1:
[0036] See also Figure 1 , this embodiment provides a message notification system, including:
[0037] The protocol module is used to decouple business scenarios from notification sending. The business scenarios are decoupled from notification sending through the Message QueuingTelemetry Transport protocol.
[0038] When the business scenario generates a notification request, the request is sent to a message queue, and the notification component asynchronously obtains the notification request from the message queue and processes it.
[0039] The logging module is used to log the details of the notification.
[0040] The detailed information includes order number, notification type, channel ID, channel account ID, notification service type, notification status, internal recipient ID, recipient information and notification content. The recipient information includes name, department, mobile phone number, email address and WeChat group.
[0041] The message processing center module is used to receive notification requests and process and distribute them.
[0042] The message processing center module interacts with external services through SMS channels, email channels and enterprise WeChat channels to send notifications.
[0043] Notification resending module, when notification sending fails, it will automatically retry sending notification.
[0044] It also allows the system administrator to re-trigger the sending of notifications when the notification fails.
[0045] This embodiment can significantly improve the maintainability and scalability of the message notification system, reduce maintenance workload, and improve system stability and user experience. At the same time, by centrally managing the notification function, it can improve the consistency and accuracy of message sending and enhance user experience.
[0046] This embodiment builds an independent, centralized message processing center, which is responsible for the generation, processing and distribution of all notifications. The center is separated from the specific business logic to achieve modularization of the notification function. By defining clear interfaces and protocols, the business logic can easily trigger notifications without having to worry about the specific implementation details of the notifications.
[0047] This embodiment implements an asynchronous notification mechanism to ensure that the sending of notifications does not block business processes, improve the responsiveness and throughput of the system, support multiple notification channels (such as SMS, email, enterprise WeChat, DingTalk, etc.), and can be flexibly selected and configured according to business needs
[0048] This embodiment can be widely used in various business scenarios, including but not limited to e-commerce, financial services, internal corporate communications, etc.; and supports the addition of more types of notification messages and sending channels in the future to adapt to changing business needs.
[0049] Embodiment 2:
[0050] like Figure 2 As shown, Embodiment 2 discloses a message notification method, which is based on the above message notification system and includes the following steps:
[0051] S1. Generate a business order number and trigger a notification.
[0052] S2. Perform data verification on the business order number to ensure its validity.
[0053] S3. Get the channel and configuration information according to the business order number and prepare to send notification.
[0054] S4. Generate a notification order and record the detailed information of the notification.
[0055] S5. Store the notification request in the message queue to decouple the business scenario from notification sending.
[0056] S6. The notification component monitors the message queue and obtains the notification request.
[0057] S7. Call the channel to send the notification and process the sending result.
[0058] S8. Record the notification results based on the notification results, and support inquiries by the business party.
[0059] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A message notification system, characterized in that: The system comprises: The protocol module is used to decouple business scenarios from notification sending; A logging module, used to log notification details; The message processing center module is used to receive notification requests, process and distribute them; Notification resending module, when notification sending fails, it will automatically retry sending notification.
2. A message notification system as claimed in claim 1, characterized in that: The business scenario is decoupled from notification sending through the Message QueuingTelemetry Transport protocol.
3. A message notification system as claimed in claim 1, characterized in that: When the business scenario generates a notification request, the request is sent to a message queue, and the notification component asynchronously obtains the notification request from the message queue and processes it.
4. A message notification system as claimed in claim 1, characterized in that: The detailed information includes order number, notification type, channel ID, channel account ID, notification business type, notification status, internal recipient ID, recipient information and notification content.
5. A message notification system as claimed in claim 4, characterized in that: The recipient information includes name, department, mobile phone number, email address and WeChat group.
6. A message notification system as claimed in claim 1, characterized in that: The message processing center module interacts with external services through SMS channels, email channels and enterprise WeChat channels to send notifications.
7. A message notification system as claimed in claim 1, characterized in that: It also allows the system administrator to re-trigger the sending of notifications when the notification fails.
8. A message notification method, the method being based on a message notification system according to any one of claims 1 to 7, characterized in that: The method comprises: Generate business order number and trigger notification; Perform data verification; Get the channel and configuration information based on the business order number and prepare to send notifications; Generate a notification order and record the details of the notification; Store the notification request in the message queue; The notification component monitors the message queue and obtains notification requests; Call the channel to send notifications and process the sending results; According to the result of sending the notification, record the notification result.