Message notification system and message notification method for government affair service

By introducing Kafka cluster and message consumption processing module into the government service system, using the API interface to obtain data in real time and using message queue caching, the real-time processing and efficient push of large-traffic message notifications are solved, and the system stability and user experience are improved.

CN119402461APending Publication Date: 2025-02-07DIGITAL HUNAN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411563431.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

When existing government service systems handle large traffic message notifications, it is difficult to achieve real-time notification and efficient processing, resulting in increased system pressure or even crashes.

Method used

A message notification system for government services is designed, using Kafka cluster and message consumption processing module, obtaining business data in real time through the API interface, and using Kafka's message queue to cache the data to cope with large traffic.

Benefits of technology

Real-time processing and efficient push of large-traffic message notifications is realized, which reduces system pressure, avoids the risk of crashes, and improves user experience and service efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402461A_ABST
    Figure CN119402461A_ABST
Patent Text Reader

Abstract

A government affair service message notification system comprises a message consumption processing module and a Kafka cluster. A plurality of Topics are established in the Kafka cluster to store service data transmitted by each service unit through an API (Application Program Interface); and after the consumer consumes the business data stored in the Topic through the message consumption processing module, the message consumption processing module feeds back a result to the Topic and pushes a result notification to the corresponding APP. According to the invention, the API interface is exposed to each business unit, so that when the data of each business unit is changed, the API interface can be called in real time to obtain the business data; meanwhile, when traffic is pushed suddenly, a Kafka message queue is erected after message access and before formal processing, and is used for caching data to deal with large traffic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a message notification system, and in particular to a message notification system and a message notification method capable of coping with large-volume government service. Background Art

[0002] With the development and widespread application of information technology, government departments at all levels and related business units have established corresponding government service systems, allowing the public to conveniently handle the services they need through the Internet, greatly improving service efficiency.

[0003] With the development of mobile Internet, government services of government departments at all levels have gradually shifted from traditional PC terminals to mobile terminals, so comprehensive government service APPs have emerged. Mobile government service APPs integrate a large number of services from government departments at all levels and related business units, serving as a "mobile portal website" to further improve service levels and efficiency. However, due to the diversity of services, it is difficult for users to obtain the progress and status of matters in a timely manner, so that a large number of people have to actively pay attention to the status of matters at all times, which has a great impact on user experience. There is still room for improvement in service levels.

[0004] The existing problem is that, from a business perspective, users cannot be notified in time when they handle related matters or when their personal information changes; from a technical perspective, even if real-time notifications can be achieved, the system needs to connect to a large amount of data from multiple systems of governments and departments at all levels. As more systems are connected, the pressure on the system server gradually increases, and even causes the system to crash. Therefore, there is an urgent need for a technical means to solve the real-time and large-scale data message notification system. Summary of the invention

[0005] The technical problem to be solved by the present invention is to overcome the deficiencies of the prior art and provide a message notification system and a message notification method for government services that can cope with large flows.

[0006] To solve the above technical problems, the technical solution proposed in the present invention is: a message notification system for government services, including a message consumption processing module and a Kafka cluster; multiple Topics are established in the Kafka cluster to store business data transmitted by various business units through an API interface; after the consumer consumes the business data stored in the Topic through the message consumption processing module, the message consumption processing module feeds back the result to the Topic and pushes the result notification to the corresponding APP.

[0007] In the above-mentioned government service message notification system, preferably, a message timing processing module is set in the message consumption processing module, and the message timing processing module pushes the unpushed result notifications stored in the Topic to the corresponding APP at a preset time point.

[0008] In the above-mentioned government service message notification system, preferably, a message timing processing module is set in the message consumption processing module, and the message timing processing module pushes the unconsumed business data stored in the Topic to the corresponding consumers at a preset time point.

[0009] In the above-mentioned government service message notification system, preferably, the message timing processing module pushes the business data exchanged by each business unit to the corresponding consumer, and pushes the consumer's processing results to the corresponding APP.

[0010] In the above-mentioned government service message notification system, preferably, the business data exchanged by each business unit is first synchronized to MySQL, and the message timing processing module pushes the business data in MySQL to the corresponding consumer at a preset time point, and pushes the consumer's processing results to the corresponding APP.

[0011] A method for notifying government service messages; comprising the following steps: 1) Expose the API interface to each business unit. When its data changes, the API interface can be called in real time to store the business data in the Topic of the corresponding business unit in the Kafka cluster; or the business data of each business unit can be synchronized to MySQL through data exchange; 2) Consumers process Topic's business data through the message consumption processing module, and the message consumption processing module feeds back the processing results to the Topic and pushes the result notification to the corresponding APP; or the message timing processing module pushes the business data in MySQL exchanged by each business unit to the corresponding consumer, and pushes the consumer's processing results to the corresponding APP; 3) The message timing processing module pushes the unconsumed business data stored in the Topic to the corresponding consumers at the preset time point; at the same time, the message timing processing module pushes the business data exchanged by each business unit to the corresponding consumers, and pushes the consumer's processing results to the corresponding APP.

[0012] Compared with the prior art, the advantages of the present invention are: in the present invention, by exposing the API interface to each business unit, when its data changes, the API interface can be called in real time to obtain business data; at the same time, when there is a burst of push traffic, a Kafka message queue is set up after the message is accessed and before it is formally processed to cache the data to cope with large traffic. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1Flow chart of the message notification system for government services of the present invention DETAILED DESCRIPTION

[0014] In order to facilitate the understanding of the present invention, the present invention will be described more comprehensively and carefully in combination with preferred embodiments below, but the protection scope of the present invention is not limited to the following specific embodiments.

[0015] It should be noted that when an element is described as being "fixed, fixed, connected or connected to" another element, it can be directly fixed, fixed, connected or connected to the other element, or it can be indirectly fixed, fixed, connected or connected to the other element through other intermediate connectors.

[0016] Unless otherwise defined, all the professional terms used below have the same meanings as those generally understood by those skilled in the art. The professional terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the scope of protection of the present invention.

[0017] The present invention provides Figure 1 The message notification system of a government service shown in the figure includes a message consumption processing module and a Kafka cluster; multiple Topics are established in the Kafka cluster to store the business data transmitted by each business unit through the API interface; after the consumer consumes the business data stored in the Topic through the message consumption processing module, the message consumption processing module feeds the result back to the Topic and pushes the result notification to the corresponding APP. Each business unit can establish one or more Topics in the Kafka cluster, and each Topic corresponds to a business type. Multiple partitions can be set up in the Topic to accommodate multiple consumers to process business data through the message consumption processing module.

[0018] In the present invention, a message timing processing module is set in the message consumption processing module, and the message timing processing module pushes the unpushed result notifications stored in the Topic to the corresponding APP at a preset time point. The message timing processing module pushes the unconsumed business data stored in the Topic to the corresponding consumer at a preset time point.

[0019] In the present invention, when certain business scenarios are not suitable for API access, the business data exchanged by each business unit is first synchronized to MySQL. The message timing processing module pushes the business data in MySQL to the corresponding consumer at a preset time point, and pushes the consumer's processing results to the corresponding APP.

[0020] The present invention also provides a method for notifying a government service message, comprising the following steps: 1) Expose the API interface to each business unit. When its data changes, the API interface can be called in real time to store the business data in the Topic of the corresponding business unit in the Kafka cluster; or the business data of each business unit can be synchronized to MySQL through data exchange; 2) Consumers process Topic's business data through the message consumption processing module, and the message consumption processing module feeds back the processing results to the Topic and pushes the result notification to the corresponding APP; or the message timing processing module pushes the business data in MySQL exchanged by each business unit to the corresponding consumer, and pushes the consumer's processing results to the corresponding APP; 3) The message timing processing module pushes the unconsumed business data stored in the Topic to the corresponding consumers at the preset time point; at the same time, the message timing processing module pushes the business data exchanged by each business unit to the corresponding consumers, and pushes the consumer's processing results to the corresponding APP. Example

[0021] The message notification system of the government service of this embodiment is used for social security. First, an API service is created, which encapsulates the API interface and exposes it to various message providers so that they can receive messages when there are changes in the messages. Then, we build a Kafka cluster, where all messages generated by the API service can be stored. Kafka plays a role in traffic peak reduction. For information on social security and medical insurance consumption, when users use medical insurance cards to make purchases, the medical insurance system will send the consumption information to a specified Topic in Kafka through the API service. The information sent may include user name, ID number, consumption amount, time, business type, etc. The structured data is serialized into JSON before sending.

[0022] Then, the consumer processes the business data of the Topic through the message consumption processing module, and the message consumption processing module feeds back the processing results to the Topic and pushes the result notification to the corresponding APP.

[0023] In this embodiment, the Topic includes three partitions, so that three consumers can actually consume the Topic, which can maximize the processing speed and send the information to the user.

[0024] When some business scenarios are not suitable for API access, the business data exchanged by each business unit is first synchronized to MySQL. The message timing processing module pushes the business data in MySQL to the corresponding consumers at the preset time point, and pushes the consumer's processing results to the corresponding APP.

[0025] In the present invention, by exposing the API interface to each business unit, when its data changes, the API interface can be called in real time to obtain business data; at the same time, when there is a burst of push traffic, a Kafka message queue is set up after the message is received and before it is formally processed to cache the data to cope with large traffic.

Claims

1. A message notification system for government services, characterized in that: It includes a message consumption processing module and a Kafka cluster; multiple Topics are established in the Kafka cluster to store business data transmitted by various business units through the API interface; after the consumer consumes the business data stored in the Topic through the message consumption processing module, the message consumption processing module feeds back the result to the Topic and pushes the result notification to the corresponding APP.

2. The message notification system for government services according to claim 1, characterized in that: A message timing processing module is set in the message consumption processing module, and the message timing processing module pushes the unpushed result notifications stored in the Topic to the corresponding APP at a preset time point.

3. The message notification system for government services according to claim 1, characterized in that: A message timing processing module is set in the message consumption processing module, and the message timing processing module pushes the unconsumed business data stored in the Topic to the corresponding consumer at a preset time point.

4. The message notification system for government services according to claim 2 or 3, characterized in that: The message timing processing module pushes the business data exchanged by each business unit to the corresponding consumer, and pushes the consumer's processing results to the corresponding APP.

5. The message notification system for government services according to claim 4 is characterized in that: The business data exchanged by each business unit is first synchronized to MySQL. The message timing processing module pushes the business data in MySQL to the corresponding consumers at a preset time point, and pushes the consumer's processing results to the corresponding APP.

6. A method for notifying government service messages; comprising the following steps: 1) Expose the API interface to each business unit. When its data changes, the API interface can be called in real time to store the business data in the Topic of the corresponding business unit in the Kafka cluster; or the business data of each business unit can be synchronized to MySQL through data exchange; 2) Consumers process the business data of the Topic through the message consumption processing module, and the message consumption processing module feeds back the processing results to the Topic and pushes the result notification to the corresponding APP; Or the message timing processing module pushes the business data in MySQL exchanged by each business unit to the corresponding consumer, and pushes the consumer's processing results to the corresponding APP; 3) The message timing processing module pushes the unconsumed business data stored in the Topic to the corresponding consumers at the preset time point; at the same time, the message timing processing module pushes the business data exchanged by each business unit to the corresponding consumers, and pushes the consumer's processing results to the corresponding APP.