Method, apparatus, device and computer readable medium for transmitting service information

By using the Canal component and Kafka cluster to listen to MySQL database logs in the banking system, combined with flag processing of the business message database and subscription service verification, the problems of delay and resource consumption in the transmission of banking business information were solved, and efficient and real-time information transmission was achieved.

CN119728631BActive Publication Date: 2025-12-16CCB FINTECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411937062.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-12-16
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

Existing technologies face problems of processing delays and high resource consumption when sending business information, making it difficult to achieve real-time and efficient information transmission, especially in banking operations.

Method used

The Canal component is used to monitor MySQL database logs, send business notification messages to the Kafka cluster, and store them in the database log table of the business message database. The message processing status is marked by flags, unprocessed messages are filtered, and the subscription service is called to verify the subscription relationship. Business information is sent according to the processing status and subscription relationship.

Benefits of technology

It reduces the resource consumption of the bank's database, improves information processing speed and real-time performance, and ensures the reliability and scalability of messages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728631B_ABST
    Figure CN119728631B_ABST
Patent Text Reader

Abstract

The application discloses a method, device and equipment for sending service information and a computer readable medium, and relates to the technical field of big data. A specific embodiment of the method comprises the following steps: a Canal component is used to listen to a MySQL database log, and a service notification message of a bank system is sent to a Kafka cluster; the service notification message of the Kafka cluster is stored in a database flow table of a service message database, and a flag bit of the service notification message is identified; the service notification message of the database flow table is scanned according to the flag bit, and the service notification message that has not been processed in the database flow table is screened out; after the interface of a signing service is called to successfully verify the signing relationship of the service notification message that has not been processed, the processing state of the service notification message that has not been processed is updated; the user identifier and the service information are acquired according to the processing state, the processing state is updated after the service message is constructed, and the service information is sent according to the processing state and the signing relationship. The embodiment can reduce resource occupation and improve processing speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of big data technology, and in particular to a method, apparatus, device, and computer-readable medium for transmitting business information. Background Technology

[0002] With the rapid growth of banking business and users' high demand for real-time account information, business information has become an important channel for users to learn about account changes. Users hope to know about account changes as early as possible to facilitate subsequent transaction processes and reduce the risk of their accounts being fraudulently used.

[0003] In the process of realizing this invention, the inventors discovered at least the following problems in the prior art:

[0004] Sending business information faces challenges such as processing delays and high resource consumption. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method, apparatus, device, and computer-readable medium for sending service information, which can reduce resource consumption and improve processing speed.

[0006] To achieve the above objectives, according to one aspect of the present invention, a method for sending service information is provided, comprising:

[0007] The Canal component is used to monitor MySQL database logs and send the monitored business notification messages from the banking system to a Kafka cluster. The business notification messages from the Kafka cluster are stored in a database transaction table of the business message database, and a flag bit of the business notification message is marked in the database transaction table of the business message database so as to process the business notification messages according to the database transaction table.

[0008] Scan the business notification messages in the database transaction table of the business message database according to the flag bit, filter out the unprocessed business notification messages in the database transaction table, and update the processing status of the unprocessed business notification messages after successfully verifying the contract relationship of the unprocessed business notification messages by calling the interface of the contract service.

[0009] According to the processing status of the business notification message, obtain the user identifier and business information from the business notification message in the database transaction table, construct the business message and update the processing status, and send the business information based on the processing status and the contract relationship of the business message according to the database transaction table.

[0010] The process involves using the Canal component to monitor MySQL database logs and send the monitored business notification messages from the banking system to a Kafka cluster. The business notification messages from the Kafka cluster are then stored in a database transaction table within the business message database. A flag is added to the database transaction table to identify the business notification messages, and these messages are processed according to the database transaction table. This includes:

[0011] The Canal component is used to monitor MySQL database logs and send the monitored business notification messages from the banking system to the Kafka cluster. The business notification messages from the Kafka cluster are stored in the database transaction table of the business message database based on the user identifier. The business notification messages from the banking system include transaction behaviors in which account funds have changed.

[0012] In the database transaction table of the business message database, the flag indicating that the business notification message is not processed is set to "not processed" so that the business notification message is processed according to the database transaction table.

[0013] The process involves using the Canal component to monitor MySQL database logs and send the monitored business notification messages from the banking system to a Kafka cluster. The business notification messages from the Kafka cluster are then stored in a database transaction table within the business message database. A flag is added to the database transaction table to identify the business notification messages, and these messages are processed according to the database transaction table. This includes:

[0014] The Canal component is used to monitor MySQL database logs and send the monitored business notification messages from the banking system to the Kafka cluster. The business notification messages from the Kafka cluster are stored in the database transaction table of the business message database based on the business identifier. The business notification messages from the banking system include transaction behaviors in which account funds have changed.

[0015] In the database transaction table of the business message database, the flag indicating that the business notification message is not processed is set to "not processed" so that the business notification message is processed according to the database transaction table.

[0016] The process of scanning the business notification messages in the database transaction table of the business message database according to the flag bit, filtering out unprocessed business notification messages in the database transaction table, and updating the processing status of the unprocessed business notification messages after successfully verifying the subscription relationship of the unprocessed business notification messages by calling the subscription service interface includes:

[0017] The scanning period in the scanning conditions is determined based on the number of business notification messages corresponding to the flag bits in the database transaction table of the business message database. The business notification messages in the database transaction table of the business message database are scanned according to the scanning period and the flag bits, and unprocessed business notification messages in the database transaction table are filtered out.

[0018] If the user identifier in the unprocessed business notification message is used to obtain the contract contact information from the contract relationship database, the interface of the contract service is called to successfully verify the contract relationship of the unprocessed business notification message and update the processing status of the unprocessed business notification message.

[0019] The step of scanning the business notification messages in the database transaction table of the business message database according to the flag bit, filtering out unprocessed business notification messages in the database transaction table, and updating the processing status of the unprocessed business notification messages after successfully verifying the subscription relationship of the unprocessed business notification messages by calling the subscription service interface includes:

[0020] The scanning period in the scanning conditions is determined based on the business identifier of the business notification message in the database transaction table of the business message database. The business notification messages in the database transaction table of the business message database are scanned according to the flag bit according to the scanning period, and unprocessed business notification messages in the database transaction table are filtered out.

[0021] If the user identifier in the unprocessed business notification message is used to obtain the contract contact information from the contract relationship database, the interface of the contract service is called to successfully verify the contract relationship of the unprocessed business notification message and update the processing status of the unprocessed business notification message.

[0022] The process of obtaining the user identifier and business information from the business notification message in the database transaction table according to the processing status of the business notification message, constructing a business message and updating the processing status, and sending the business information based on the processing status and the subscription relationship of the business message according to the database transaction table includes:

[0023] Based on the processing status of the business notification message, retrieve the sending user identifier, receiving user identifier, and business information from the business notification message in the database transaction table to construct a business message and update the processing status;

[0024] The business information is sent based on the processing status of the business message and the contractual relationship of the business message, using a database transaction table.

[0025] The step of sending the business information based on the processing status of the business message and the contractual relationship of the business message using a database transaction table includes:

[0026] If the processing status of the business message meets the sending conditions and the contractual relationship of the business message is within the validity period, then the business information is sent based on the database transaction table according to the contractual relationship of the business message.

[0027] According to a second aspect of the present invention, an apparatus for transmitting service information is provided, comprising:

[0028] The receiving module is used to listen to the MySQL database logs using the Canal component and send the business notification messages from the banking system to the Kafka cluster. It stores the business notification messages from the Kafka cluster in the database transaction table of the business message database and marks the flag bit of the business notification message in the database transaction table of the business message database so as to process the business notification messages according to the database transaction table.

[0029] The filtering module is used to scan the business notification messages in the database transaction table of the business message database according to the flag bit, filter out the unprocessed business notification messages in the database transaction table, and call the interface of the subscription service to successfully verify the subscription relationship of the unprocessed business notification messages and update the processing status of the unprocessed business notification messages.

[0030] The sending module is used to obtain the user identifier and business information in the business notification message from the database transaction table according to the processing status of the business notification message, construct the business message and update the processing status, and send the business information based on the contract relationship in the database transaction table according to the processing status and the business message.

[0031] According to a third aspect of the present invention, an electronic device for transmitting service information is provided, comprising:

[0032] One or more processors;

[0033] Storage device for storing one or more programs.

[0034] When the one or more programs are executed by the one or more processors, the one or more processors perform the methods described above.

[0035] According to a fourth aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method as described above.

[0036] According to a fifth aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method as described above in the embodiments of the present invention.

[0037] One embodiment of the above invention has the following advantages or beneficial effects: The Canal component is used to monitor MySQL database logs and send the monitored business notification messages from the banking system to a Kafka cluster. The business notification messages from the Kafka cluster are stored in a database transaction table of the business message database. A flag is set in the database transaction table of the business message database to mark the business notification messages, so that the business notification messages are processed according to the database transaction table. The business notification messages in the database transaction table of the business message database are scanned according to the flag, and unprocessed business notification messages are filtered out. The interface of the subscription service is called to successfully verify the subscription relationship of the unprocessed business notification messages and update the processing status of the unprocessed business notification messages. Based on the processing status of the business notification messages, the user identifier and business information in the business notification messages in the database transaction table are obtained to construct business messages, and the processing status is updated. The business information is sent based on the processing status and the subscription relationship of the business messages according to the database transaction table. The use of the Kafka cluster and the business message database reduces the resource consumption of the banking database, and the processing speed can be improved by using flags and processing status.

[0038] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description

[0039] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:

[0040] Figure 1 This is a schematic diagram of the main process of a method for sending service information according to an embodiment of the present invention;

[0041] Figure 2 This is a schematic diagram illustrating the process of storing business notification messages from a Kafka cluster to a business message database using user identifiers, according to an embodiment of the present invention.

[0042] Figure 3 This is a schematic diagram illustrating the process of storing business notification messages from a Kafka cluster to a business message database using a business identifier, according to an embodiment of the present invention.

[0043] Figure 4 This is a schematic diagram illustrating the process of successfully verifying the subscription relationship of an unprocessed business notification message by calling the interface of the subscription service according to an embodiment of the present invention;

[0044] Figure 5 This is a schematic diagram of the process for determining the scanning cycle based on the service identifier according to an embodiment of the present invention;

[0045] Figure 6 This is a flowchart illustrating the process of sending service information based on the processing status according to an embodiment of the present invention;

[0046] Figure 7 This is a schematic diagram of the main structure of a device for sending service information according to an embodiment of the present invention;

[0047] Figure 8 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;

[0048] Figure 9 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation

[0049] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description. The acquisition, storage, use, and processing of data in the technical solutions of this application all comply with relevant national laws and regulations.

[0050] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.

[0051] Currently, the following methods can be used to send business information.

[0052] Method 1: Synchronous triggering.

[0053] When an account changes, the accounting system directly triggers a notification mechanism, simultaneously sending the change information to the notification system. Upon receiving the change information, the notification system immediately generates business information and sends it to the user.

[0054] High coupling: The bank's accounting system and notification system are tightly coupled. A failure in one system could affect the normal operation of the other. Different message sending channels have different traffic capacity. Using synchronous sending requires waiting for successful delivery before subsequent operations can proceed, resulting in a lengthy transaction process. Furthermore, message push is only one branch of the transfer process; even if message delivery fails, it should not affect the transfer transaction itself, causing it to be rolled back.

[0055] Poor scalability: As the number of users increases and business becomes more complex, the system is difficult to scale horizontally or vertically.

[0056] High resource consumption: During peak periods, the system needs to process a large number of account change information and notification sending requests simultaneously, which can easily lead to resource shortages.

[0057] Method 2: Polling.

[0058] The system proactively initiates query requests to the bank's accounting system at regular intervals or according to a preset frequency to obtain the latest account change information. The retrieved account change information is then processed and generated into business information, which is sent to the corresponding users.

[0059] Poor real-time performance: Since queries are performed periodically or at frequency, true real-time notifications are not possible.

[0060] Resource waste: Frequent queries can lead to resource waste when account changes are infrequent.

[0061] High system load: In addition to handling accounting transactions, the accounting system also needs to handle frequent queries from the notification system. When the query frequency is high or the number of users is large, the system needs to process a large number of query requests, which can easily lead to a slowdown in system response.

[0062] Method 3: Message Queue.

[0063] When an account changes, the accounting system sends the change information to a message queue. The notification system retrieves the change information from the message queue, generates business information, and sends it to the user.

[0064] Traffic control at each level needs to be considered: Although message queues are used to decouple the accounting and notification systems, message backlog and delayed processing can still occur if the notification system's processing speed cannot keep up with the message queue's generation speed. Message queues are typically memory caches; if the server restarts for any reason, the content stored in memory will be lost.

[0065] In summary, sending business information faces challenges such as processing latency and high resource consumption.

[0066] To address the issues of processing delays and high resource consumption in sending service information, the following technical solutions from the embodiments of the present invention can be adopted.

[0067] See Figure 1 , Figure 1 This is a schematic diagram of the main flow of a method for sending business information according to an embodiment of the present invention. A Kafka cluster is used to implement asynchronous processing of business notification messages, and the business notification messages are stored in a business message database. Figure 1 As shown in Figure 100, the specific steps include:

[0068] S101. Use the Canal component to listen to the MySQL database logs and send the business notification messages from the banking system to the Kafka cluster. Store the business notification messages from the Kafka cluster in the database log table of the business message database, and mark the business notification messages with a flag in the business message database.

[0069] In embodiments of the present invention, the Canal component is used to monitor MySQL database logs and send the monitored business notification messages from the banking system to a Kafka cluster, where the business notification messages are stored. Using a Kafka cluster to receive business notification messages improves reliability, performance, and scalability.

[0070] The Canal component is primarily used for real-time data monitoring. As an example, MySQL database logs include MySQL's binlog. Kafka is suitable for real-time data streaming and analysis in banking operations, benefiting transaction processing and risk management.

[0071] Store business notification messages from the Kafka cluster in a database log table to the business message database. Store these messages in a separate business message database to ensure that increasing message volume does not impact processing speed. As an example, the business message database could be a relational database like MySQL or Oracle. Alternatively, it could be a non-relational database like MongoDB or Redis.

[0072] To accurately determine the processing status of business notification messages, a flag is used to identify the message in the business message database. As an example, the flag includes "processed" and "unprocessed."

[0073] See Figure 2 That is, 200. Figure 2 This is a schematic diagram illustrating the process of storing business notification messages from a Kafka cluster to a business message database using user identifiers, according to an embodiment of the present invention. Specifically, it includes the following steps:

[0074] S201. Use the Canal component to listen to the MySQL database logs and send the monitored business notification messages from the banking system to the Kafka cluster. Store the business notification messages from the Kafka cluster in the database transaction table of the business message database based on the user identifier. The business notification messages from the banking system include transaction behaviors in which account funds have changed.

[0075] In one embodiment of the present invention, the Canal component is used to monitor MySQL database logs to obtain business notification messages from the banking system. Of course, if the banking system actively pushes business notification messages, monitoring MySQL database logs using the Canal component can also retrieve these messages.

[0076] Bank system notifications include transaction information related to changes in account funds. These transactions include, but are not limited to, one or more of the following: fund transfers in, fund transfers out, spending, investing, bill payments, loan repayments, borrowing, wealth management, salary payments, and scheduled deductions.

[0077] Based on the user identifier in the business notification message, the Kafka cluster stores the business notification messages in a database transaction table within the business message database. The business message database uses a database transaction table to store the business notification messages.

[0078] Given the massive volume of business notification messages, to improve the speed of message retrieval, business notification messages are stored in database transaction tables based on the user identifier within them. As an example, by taking the modulo of the user identifier, business notification messages with a modulo value of 1 are stored in database transaction table 1, those with a modulo value of 2 are stored in database transaction table 2, and so on. This significantly reduces the database storage pressure on any single table as the number of transaction tables increases.

[0079] S202. In the database transaction table of the business message database, the flag indicating that the business notification message has not been processed is set to unprocessed, so that the business notification message is processed according to the database transaction table.

[0080] The database transaction table in the business message database stores multiple business notification messages. Along with storing these messages, a flag indicating that a business notification message is unprocessed is also set. For example, the flag for a business notification message is set to 0, where 0 represents unprocessed and 1 represents processed.

[0081] Database transaction tables allow for batch processing of business notification messages at the table level, meeting the business needs of banking operations.

[0082] exist Figure 2 In this embodiment, a database transaction table is used to store business notification messages in the business message database using a business identifier. This makes the database storage operation simple and fast, avoiding becoming a performance bottleneck.

[0083] See Figure 3 That is, 300. Figure 3 This is a schematic diagram illustrating the process of storing business notification messages from a Kafka cluster to a business message database using a business identifier, according to an embodiment of the present invention. Specifically, it includes the following steps:

[0084] S301. Use the Canal component to listen to the MySQL database logs and send the monitored business notification messages from the banking system to the Kafka cluster. Store the business notification messages from the Kafka cluster in the database transaction table of the business message database based on the business identifier. The business notification messages from the banking system include transaction behaviors in which account funds have changed.

[0085] In embodiments of the present invention, the business notification messages of the banking system include transaction behaviors involving changes in account funds. The Canal component is used to monitor MySQL database logs and send the monitored business notification messages from the banking system to a Kafka cluster. Based on the business identifier, the business notification messages from the Kafka cluster are stored in a database transaction table within the business message database.

[0086] It is understandable that business notification messages stored in the same database transaction table have the same business identifier; that is, the database transaction table stores business notification messages for the same business. As an example, database transaction table 1 stores business notification messages for money transfer transactions; database transaction table 2 stores business notification messages for online transactions.

[0087] Storing business notification messages for the same business in a database transaction table can help improve the processing efficiency of handling the same business.

[0088] S302. In the database transaction table of the business message database, the flag indicating that the business notification message has not been processed is set to unprocessed, so that the business notification message is processed according to the database transaction table.

[0089] In the database transaction log table of the business message database, the flag indicating a business notification message is set to "unprocessed". This flag allows for timely tracking of the processing status of business notification messages, ensuring they are processed according to the database transaction log table.

[0090] exist Figure 3 In one embodiment, business notification messages are stored in a database transaction table according to their business identifiers, which facilitates batch processing of business notification messages that implement the same business.

[0091] S102. Scan the business notification messages in the database transaction table of the business message database according to the flag bit, filter out the unprocessed business notification messages in the database transaction table, and after successfully verifying the contract relationship of the unprocessed business notification messages by calling the interface of the contract service, update the processing status of the unprocessed business notification messages.

[0092] In embodiments of the present invention, business notification messages in the database transaction table of the business message database can be scanned according to flag bits to filter out unprocessed business notification messages in the database transaction table. Then, after successfully verifying the subscription relationship of the unprocessed business notification messages by calling the subscription service interface, the processing status of the unprocessed business notification messages is updated. As an example, the subscription service interface is called based on the user identifier to verify the subscription relationship of the unprocessed business notification messages.

[0093] See Figure 4 That is, 400. Figure 4 This is a flowchart illustrating the process of successfully verifying the subscription relationship of an unprocessed business notification message by calling the interface of the subscription service according to an embodiment of the present invention. Specifically, it includes the following steps:

[0094] S401. Determine the scan cycle in the scan conditions based on the number of business notification messages corresponding to the flag bits in the database transaction table of the business message database. Scan the business notification messages in the database transaction table of the business message database according to the scan cycle and the flag bits, and filter out the unprocessed business notification messages in the database transaction table.

[0095] In embodiments of the present invention, the database transaction table includes processed business notification messages and unprocessed business notification messages. Scanning conditions can be used to scan the business notification messages in the database transaction table of the business message database to filter out unprocessed business notification messages.

[0096] Specifically, the scan period in the scan conditions is determined based on the number of business notification messages corresponding to the flag bits in the database transaction table of the business message database. As an example, the larger the number of business notification messages corresponding to the flag bits, the shorter the scan period in the scan conditions. For instance, if the number of business notification messages is greater than 100,000 but less than 1 million, the scan period in the scan conditions is 5 minutes; if the number of business notification messages is greater than 1 million but less than 10 million, the scan period in the scan conditions is 3 minutes.

[0097] According to the scanning cycle, the business notification messages in the database transaction table of the business message database are scanned based on the flag bits, and unprocessed business notification messages are filtered out.

[0098] S402. If the user identifier in the unprocessed business notification message is used to obtain the contract contact information from the contract relationship database, the interface of the contract service is called to successfully verify the contract relationship of the unprocessed business notification message and update the processing status of the unprocessed business notification message.

[0099] In embodiments of the present invention, the contract relationship database stores the correspondence between user identifiers and contract contact information. If the interface for the contract service is invoked based on the user identifier in the unprocessed business notification message and successfully retrieves the contract contact information from the contract relationship database, the contract relationship of the unprocessed business notification message is successfully verified.

[0100] If the interface for calling the contract service based on the user identifier in the unprocessed business notification message fails to retrieve the contract contact information from the contract relationship database, then the verification of the contract relationship in the unprocessed business notification message will fail.

[0101] In embodiments of the present invention, the processing status of a business notification message is used to indicate its processing status. As an example, after successfully verifying the subscription relationship of an unprocessed business notification message by calling the subscription service interface, the processing status of the unprocessed business notification message is updated to: verification successful.

[0102] exist Figure 4 In this embodiment, the scanning period in the scanning conditions is used to filter out unprocessed service notification messages, and then the subscription relationship of the service notification messages is verified.

[0103] See Figure 5 That is, 500. Figure 5 This is a schematic diagram illustrating the process of determining the scanning cycle based on the service identifier according to an embodiment of the present invention. Specifically, it includes the following steps:

[0104] S501. Determine the scan cycle in the scan conditions based on the business identifier of the business notification message in the database transaction table of the business message database. Scan the business notification messages in the database transaction table of the business message database according to the scan cycle and the flag bit, and filter out the unprocessed business notification messages in the database transaction table.

[0105] In embodiments of the present invention, different services have different timeliness requirements for processing service notification messages. As an example, money transfer and online shopping services have high timeliness requirements; as another example, automatic deduction of water and electricity bills have low timeliness requirements.

[0106] Therefore, the scan period in the scan conditions is determined based on the business identifier of the business notification message in the database transaction table of the business message database. As an example, if the business identifier includes a money transfer business identifier or an online shopping business identifier, then the scan period in the scan conditions is determined to be 3 minutes. As another example, if the business identifier includes an automatic water bill deduction identifier or an automatic electricity bill deduction identifier, then the scan period in the scan conditions is determined to be 24 hours.

[0107] Once the scan cycle in the scan conditions is determined, the business notification messages in the database transaction table of the business message database are scanned according to the scan cycle and the flag bits, and unprocessed business notification messages are filtered out.

[0108] S502. Based on the user identifier in the unprocessed business notification message, retrieve the contract contact information from the contract relationship database. Then, call the interface of the contract service to successfully verify the contract relationship of the unprocessed business notification message and update the processing status of the unprocessed business notification message.

[0109] After retrieving the contract contact information from the contract relationship database based on the user identifier in the unprocessed business notification message, the interface of the contract service is called to successfully verify the contract relationship of the unprocessed business notification message, and the processing status of the unprocessed business notification message is updated to: verification successful.

[0110] exist Figure 5 In this embodiment, the scanning period is determined according to the service identifier of the service notification message, and the load on the service message data is reduced when the notification meets the service implementation requirements.

[0111] S103. Obtain the user identifier and business information from the business notification message in the database transaction table according to the processing status of the business notification message, construct the business message and update the processing status, and send the business information based on the database transaction table according to the processing status and the contract relationship of the business message.

[0112] In an embodiment of the present invention, the processing status of the business notification message is as follows: If verification is successful, the user identifier and business information in the business notification message from the database transaction table are obtained, and then the business message is constructed and the processing status is updated. The processing status is updated to: Business message constructed. Business information can be sent based on the database transaction table according to the processing status and the subscription relationship of the business message. This enables the sending of business information according to the database transaction table.

[0113] See Figure 6 That is, 600. Figure 6 This is a flowchart illustrating the process of sending business information based on the processing status and the subscription relationship of the business message according to an embodiment of the present invention. Specifically, it includes the following steps:

[0114] S601. Based on the processing status of the business notification message, obtain the sending user identifier, receiving user identifier, and business information from the business notification message in the database transaction table to construct a business message and update the processing status.

[0115] In an embodiment of the present invention, the processing status of the service notification message is as follows: if the verification is successful, the sending user identifier, receiving user identifier, and service information are obtained from the service notification message to construct a service message, and the processing status of the service message is updated to: the service message has been constructed.

[0116] As an example, the receiving user identifier includes: the sending user identifier includes: the sending username and sending user account identifier 1234; the receiving username and receiving user account identifier 5678; the business information includes: transfer of 100 yuan. The business message is constructed as follows: Zhang San's debit card ending in 1234 transfers 100 yuan to Li Si's debit card ending in 5678.

[0117] S602. Send business information based on the database transaction table according to the processing status of the business message and the contractual relationship of the business message.

[0118] In an embodiment of the present invention, when the processing status of the business message is: the business message has been constructed, the business information can be sent based on the database transaction table according to the contract relationship of the business message.

[0119] In one embodiment of the present invention, if the processing status of the business message meets the sending conditions and the subscription relationship of the business message is within the validity period, then the business information is sent based on the subscription relationship of the business message and the database transaction table. As an example, the sending conditions include that the business message has been constructed.

[0120] The contractual relationships for business messages are based on database transaction tables that include preset contractual contact methods. As an example, contractual contact methods include: mobile device identifier, email identifier, and social media account.

[0121] As an example, business information can be sent via a message sending task. After sending the business information, the processing status is updated to: Sent.

[0122] exist Figure 6 In one embodiment, a business message is constructed using the sending user identifier, the receiving user identifier, and business information, and then the business message is sent to remind the user according to the processing status.

[0123] In the embodiments of the present invention described above, the Canal component is used to monitor MySQL database logs and send the monitored business notification messages from the banking system to a Kafka cluster. The business notification messages from the Kafka cluster are stored in a database transaction table of the business message database. A flag is set in the database transaction table of the business message database to identify the business notification messages and process them according to the transaction table. The business notification messages in the database transaction table of the business message database are scanned according to the flag, and unprocessed business notification messages are filtered out. The interface of the subscription service is called to successfully verify the subscription relationship of the unprocessed business notification messages and update their processing status. Based on the processing status of the business notification messages, the user identifier and business information from the business notification messages in the database transaction table are obtained to construct a business message, and the processing status is updated. The business information is then sent based on the processing status and the subscription relationship of the business messages, according to the database transaction table. The use of the Kafka cluster and the business message database reduces the resource consumption of the banking database by not blocking the main thread, and improves processing speed by using flags and processing status.

[0124] See Figure 7 , Figure 7 This is a schematic diagram of the main structure of a device for sending service information according to an embodiment of the present invention. The device for sending service information can implement a method for sending service information, such as... Figure 7 As shown in Figure 700, the device for sending service information specifically includes:

[0125] The receiving module 701 is used to listen to the MySQL database logs using the Canal component and send the business notification messages of the bank system being listened to to the Kafka cluster. It stores the business notification messages of the Kafka cluster in the database flow table of the business message database and marks the flag bit of the business notification message in the database flow table of the business message database so as to process the business notification messages according to the database flow table.

[0126] The filtering module 702 is used to scan the business notification messages in the database transaction table of the business message database according to the flag bit, filter out the unprocessed business notification messages in the database transaction table, and call the interface of the subscription service to successfully verify the subscription relationship of the unprocessed business notification messages and update the processing status of the unprocessed business notification messages.

[0127] The sending module 703 is used to obtain the user identifier and business information in the business notification message in the database transaction table according to the processing status of the business notification message, construct the business message and update the processing status, and send the business information based on the database transaction table according to the processing status and the contract relationship of the business message.

[0128] In one embodiment of the present invention, the receiving module 701 is specifically used to use the Canal component to listen to the MySQL database logs and send the listened bank system business notification messages to the Kafka cluster, and store the Kafka cluster business notification messages in the database transaction table of the business message database based on the user identifier. The bank system business notification messages include transaction behaviors in which the account has changed funds.

[0129] In the database transaction table of the business message database, the flag indicating that the business notification message is not processed is set to "not processed" so that the business notification message is processed according to the database transaction table.

[0130] In one embodiment of the present invention, the receiving module 701 is specifically used to use the Canal component to listen to the MySQL database logs and send the listened bank system business notification messages to the Kafka cluster, and store the Kafka cluster business notification messages in the database transaction table of the business message database based on the business identifier. The bank system business notification messages include transaction behaviors in which the account has changed funds.

[0131] In the database transaction table of the business message database, the flag indicating that the business notification message is not processed is set to "not processed" so that the business notification message is processed according to the database transaction table.

[0132] In one embodiment of the present invention, the filtering module 702 is specifically used to determine the scanning period in the scanning conditions based on the number of business notification messages corresponding to the flag bits in the database transaction table of the business message database, and to scan the business notification messages in the database transaction table of the business message database according to the scanning period and the flag bits, thereby filtering out unprocessed business notification messages in the database transaction table.

[0133] If the user identifier in the unprocessed business notification message is used to obtain the contract contact information from the contract relationship database, the interface of the contract service is called to successfully verify the contract relationship of the unprocessed business notification message and update the processing status of the unprocessed business notification message.

[0134] In one embodiment of the present invention, the filtering module 702 is specifically used to determine the scanning period in the scanning conditions based on the business identifier of the business notification message in the database transaction table of the business message database, scan the business notification messages in the database transaction table of the business message database according to the flag bit according to the scanning period, and filter out the unprocessed business notification messages in the database transaction table.

[0135] If the user identifier in the unprocessed business notification message is used to obtain the contract contact information from the contract relationship database, the interface of the contract service is called to successfully verify the contract relationship of the unprocessed business notification message and update the processing status of the unprocessed business notification message.

[0136] In one embodiment of the present invention, the sending module 703 is specifically used to obtain the sending user identifier, receiving user identifier and business information in the business notification message in the database transaction table according to the processing status of the business notification message to construct a business message and update the processing status.

[0137] The business information is sent based on the processing status of the business message and the contractual relationship of the business message, using a database transaction table.

[0138] In one embodiment of the present invention, the sending module 703 is specifically used to verify that the processing status of the business message meets the sending conditions, and if the subscription relationship of the business message is within the validity period based on the database transaction table, then the business information is sent based on the subscription relationship of the business message based on the database transaction table.

[0139] Figure 8 An exemplary system architecture 800 is shown, in which a method or apparatus for sending service information can be applied according to embodiments of the present invention.

[0140] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, and 803, a network 804, and a server 805. Network 804 serves as the medium for providing communication links between terminal devices 801, 802, and 803 and server 805. Network 804 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0141] Users can use terminal devices 801, 802, and 803 to interact with server 805 via network 804 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0142] Terminal devices 801, 802, and 803 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0143] Server 805 can be a server providing various services, such as a backend management server supporting shopping websites browsed by users using terminal devices 801, 802, and 803 (for example only). The backend management server can analyze and process data such as received product information query requests, and feed back the processing results (such as target push information and product information - for example only) to the terminal devices.

[0144] It should be noted that the method for sending service information provided in the embodiments of the present invention is generally executed by server 805, and correspondingly, the device for sending service information is generally located in server 805.

[0145] It should be understood that Figure 8 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0146] A computing program product according to an embodiment of the present invention includes a computer program, which, when executed by a processor, implements the method for sending service information provided in an embodiment of the present invention.

[0147] The following is for reference. Figure 9 It shows a schematic diagram of the structure of a computer system 900 suitable for implementing a terminal device of the present invention. Figure 9 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0148] like Figure 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 902 or programs loaded from storage section 908 into random access memory (RAM) 903. The RAM 903 also stores various programs and data required for the operation of the system 900. The CPU 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0149] The following components are connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. A removable medium 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 910 as needed so that computer programs read from it can be installed into storage section 908 as needed.

[0150] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable medium 911. When the computer program is executed by central processing unit (CPU) 901, it performs the functions defined above in the system of this invention.

[0151] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0152] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0153] The modules described in the embodiments of the present invention can be implemented in software or hardware. The described modules can also be housed in a processor; for example, a processor can be described as including a receiving module, a filtering module, and a sending module. The names of these modules do not necessarily limit the module itself. For example, the receiving module can also be described as "using the Canal component to listen to MySQL database logs and send the monitored business notification messages from the banking system to a Kafka cluster, storing the business notification messages from the Kafka cluster in a database transaction table of the business message database, and identifying a flag bit of the business notification message in the database transaction table of the business message database to process the business notification messages according to the database transaction table."

[0154] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include:

[0155] The Canal component is used to monitor MySQL database logs and send the monitored business notification messages from the banking system to a Kafka cluster. The business notification messages from the Kafka cluster are stored in a database transaction table of the business message database, and a flag bit of the business notification message is marked in the database transaction table of the business message database so as to process the business notification messages according to the database transaction table.

[0156] Scan the business notification messages in the database transaction table of the business message database according to the flag bit, filter out the unprocessed business notification messages in the database transaction table, and call the interface of the subscription service to successfully verify the subscription relationship of the unprocessed business notification messages and update the processing status of the unprocessed business notification messages.

[0157] According to the processing status of the business notification message, obtain the user identifier and business information from the business notification message in the database transaction table, construct the business message and update the processing status, and send the business information based on the processing status and the contract relationship of the business message according to the database transaction table.

[0158] According to the technical solution of this invention, the Canal component is used to monitor MySQL database logs and send the monitored business notification messages from the banking system to a Kafka cluster. The business notification messages from the Kafka cluster are stored in a database transaction table of the business message database. A flag bit is used to identify the business notification messages in the database transaction table of the business message database for processing. The business notification messages in the database transaction table of the business message database are scanned according to the flag bit, and unprocessed business notification messages are filtered out. The interface of the subscription service is called to successfully verify the subscription relationship of the unprocessed business notification messages and update their processing status. Based on the processing status of the business notification messages, the user identifier and business information from the business notification messages in the database transaction table are obtained to construct a business message, and the processing status is updated. The business information is then sent based on the processing status and the subscription relationship of the business messages according to the database transaction table. The use of the Kafka cluster and the business message database reduces the resource consumption of the banking database, and the use of flag bits and processing status improves processing speed.

[0159] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

[0160] It should be noted that the collection, analysis, use, transmission, and storage of user personal information involved in the technical solution of this invention all comply with relevant laws and regulations, are used for legitimate and reasonable purposes, and are not shared, disclosed, or sold outside of these legitimate uses, and are subject to supervision and management by regulatory authorities. Necessary measures should be taken to prevent unauthorized access to such personal information data, ensure that personnel authorized to access personal information data comply with relevant laws and regulations, and ensure the security of user personal information. Once this user personal information data is no longer needed, the risk should be minimized by restricting or even prohibiting data collection and / or deleting the data.

[0161] When applicable, including in certain relevant applications, data deidentification is used to protect user privacy, such as by removing specific identifiers (e.g., date of birth), controlling the amount or specificity of stored data (e.g., collecting location data at the city level rather than at the specific address level), controlling how data is stored, and / or other methods of deidentification.

Claims

1. A method for sending service information, characterized in that, include: The Canal component is used to monitor MySQL database logs and send the monitored business notification messages from the banking system to a Kafka cluster. The business notification messages from the Kafka cluster are stored in a database transaction table of the business message database, and a flag bit of the business notification message is marked in the database transaction table of the business message database so as to process the business notification messages according to the database transaction table. The scanning period in the scanning conditions is determined based on the number of business notification messages corresponding to the flag bits in the database transaction table of the business message database, or the scanning period in the scanning conditions is determined based on the business identifier of the business notification messages in the database transaction table of the business message database. The business notification messages in the database transaction table of the business message database are scanned according to the scanning period and the flag bits. Unprocessed business notification messages in the database transaction table are filtered out, and the processing status of the unprocessed business notification messages is updated after the subscription service interface is successfully verified. According to the processing status of the business notification message, obtain the user identifier and business information from the business notification message in the database transaction table, construct the business message and update the processing status, and send the business information based on the processing status and the contract relationship of the business message according to the database transaction table.

2. The method for sending service information according to claim 1, characterized in that, The process involves using the Canal component to monitor MySQL database logs and send the monitored business notification messages from the banking system to a Kafka cluster. The business notification messages from the Kafka cluster are then stored in a database transaction table within the business message database. A flag is added to the database transaction table to identify the business notification messages, and these messages are processed according to the database transaction table. This includes: The Canal component is used to monitor MySQL database logs and send the monitored business notification messages from the banking system to the Kafka cluster. The business notification messages from the Kafka cluster are stored in the database transaction table of the business message database based on the user identifier. The business notification messages from the banking system include transaction behaviors in which account funds have changed. In the database transaction table of the business message database, the flag indicating that the business notification message is not processed is set to "not processed" so that the business notification message is processed according to the database transaction table.

3. The method for sending service information according to claim 1, characterized in that, The process involves using the Canal component to monitor MySQL database logs and send the monitored business notification messages from the banking system to a Kafka cluster. The business notification messages from the Kafka cluster are then stored in a database transaction table within the business message database. A flag is added to the database transaction table to identify the business notification messages, and these messages are processed according to the database transaction table. This includes: The Canal component is used to monitor MySQL database logs and send the monitored business notification messages from the banking system to the Kafka cluster. The business notification messages from the Kafka cluster are stored in the database transaction table of the business message database based on the business identifier. The business notification messages from the banking system include transaction behaviors in which account funds have changed. In the database transaction table of the business message database, the flag indicating that the business notification message is not processed is set to "not processed" so that the business notification message is processed according to the database transaction table.

4. The method for sending service information according to any one of claims 1 to 3, characterized in that, The process of scanning the business notification messages in the database transaction table of the business message database according to the scan cycle and the flag bit, filtering out unprocessed business notification messages in the database transaction table, and updating the processing status of the unprocessed business notification messages after successfully verifying the subscription relationship of the unprocessed business notification messages by calling the subscription service interface includes: According to the scanning cycle and the flag bit, the business notification messages in the database transaction table of the business message database are scanned, and unprocessed business notification messages in the database transaction table are filtered out. If the user identifier in the unprocessed business notification message is used to obtain the contract contact information from the contract relationship database, the interface of the contract service is called to successfully verify the contract relationship of the unprocessed business notification message and update the processing status of the unprocessed business notification message.

5. The method for sending service information according to claim 1, characterized in that, The process of obtaining the user identifier and business information from the business notification message in the database transaction table according to the processing status of the business notification message, constructing a business message and updating the processing status, and sending the business information based on the processing status and the subscription relationship of the business message according to the database transaction table includes: Based on the processing status of the business notification message, retrieve the sending user identifier, receiving user identifier, and business information from the business notification message in the database transaction table to construct a business message and update the processing status; The business information is sent based on the processing status of the business message and the contractual relationship of the business message, using a database transaction table.

6. The method for sending service information according to claim 5, characterized in that, The step of sending the business information based on the processing status of the business message and the contractual relationship of the business message using a database transaction table includes: If the processing status of the business message meets the sending conditions and the contractual relationship of the business message is within the validity period, then the business information is sent based on the database transaction table according to the contractual relationship of the business message.

7. An apparatus for transmitting service information, characterized in that, include: The receiving module is used to listen to the MySQL database logs using the Canal component and send the business notification messages from the banking system to the Kafka cluster. It stores the business notification messages from the Kafka cluster in the database transaction table of the business message database and marks the flag bit of the business notification message in the database transaction table of the business message database so as to process the business notification messages according to the database transaction table. The filtering module is used to determine the scanning period in the scanning conditions based on the number of business notification messages corresponding to the flag bits in the database transaction table of the business message database, or to determine the scanning period in the scanning conditions based on the business identifier of the business notification messages in the database transaction table of the business message database, scan the business notification messages in the database transaction table of the business message database according to the scanning period and the flag bits, filter out the unprocessed business notification messages in the database transaction table, and call the interface of the subscription service to successfully verify the subscription relationship of the unprocessed business notification messages and update the processing status of the unprocessed business notification messages; The sending module is used to obtain the user identifier and business information in the business notification message from the database transaction table according to the processing status of the business notification message, construct the business message and update the processing status, and send the business information based on the database transaction table according to the processing status and the contract relationship of the business message.

8. An electronic device for transmitting service information, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-6.

9. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Signing method and device, electronic equipment and computer readable medium

    CN114169863A

  • Business report generation method and device, equipment and storage medium

    CN119127875A