Method, device and equipment for sending service information and computer readable medium
By using Canal components and Kafka clusters in the banking system, listening to MySQL database logs and processing business notification messages, the problems of processing delay and high resource usage when sending business information are solved, and more efficient information transmission is achieved.
Patent Information
- Application Number
- CN202411937062.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-26
AI Technical Summary
The prior art faces the problems of processing delays and high resource utilization when sending service information.
By using the Canal component to listen to the MySQL database log, the business notification message of the banking system is sent to the Kafka cluster, stored in the database flow table of the business message database, and the business notification message is processed according to the flag bit.
Reduce the resource occupation of bank databases, improve processing speed, and ensure the timely transmission of business information.
Smart Images

Figure CN119728631A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a method, device, equipment and computer-readable medium for sending business information. Background Art
[0002] With the rapid growth of banking business and users' high requirements for real-time account information, business information has become an important channel for users to learn about account changes. Users hope to know account change information as early as possible to carry out subsequent transaction processes and reduce the risk of their accounts being stolen.
[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0004] Sending business information faces challenges such as processing delays and high resource usage. 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 business information, which can reduce resource occupation and improve processing speed.
[0006] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for sending service information is provided, including:
[0007] Use the Canal component to monitor the MySQL database log and send the monitored business notification message of the banking system to the Kafka cluster, store the business notification message of the Kafka cluster in the database flow table of the business message database, and mark the flag of the business notification message in the database flow table of the business message database to process the business notification message according to the database flow table;
[0008] Scan the business notification messages in the database flow table of the business message database according to the flag bit, filter out the unprocessed business notification messages in the database flow table, and call the interface of the contract service to successfully verify the contract relationship of the unprocessed business notification message and then update the processing status of the unprocessed business notification message;
[0009] According to the processing status of the business notification message, the user identifier and business information in the business notification message in the database flow table are obtained, the processing status is updated after the business message is constructed, and the business information is sent based on the database flow table according to the processing status and the contract relationship of the business message.
[0010] The method of using the Canal component to monitor the MySQL database log and send the monitored business notification message of the bank system to the Kafka cluster, storing the business notification message of the Kafka cluster in the database flow table of the business message database, and marking the flag of the business notification message in the database flow table of the business message database to process the business notification message according to the database flow table includes:
[0011] Use the Canal component to monitor the MySQL database log and send the monitored business notification message of the bank system to the Kafka cluster, and store the business notification message of the Kafka cluster in the database flow table in the business message database based on the user identifier. The business notification message of the bank system includes the transaction behavior of the fund change in the account;
[0012] In the database flow table in the service message database, the flag bit indicating the service notification message is unprocessed, so that the service notification message is processed according to the database flow table.
[0013] The method of using the Canal component to monitor the MySQL database log and send the monitored business notification message of the bank system to the Kafka cluster, storing the business notification message of the Kafka cluster in the database flow table of the business message database, and marking the flag of the business notification message in the database flow table of the business message database to process the business notification message according to the database flow table includes:
[0014] Use the Canal component to monitor the MySQL database log and send the monitored business notification message of the bank system to the Kafka cluster, and store the business notification message of the Kafka cluster in the database flow table in the business message database based on the business identifier. The business notification message of the bank system includes the transaction behavior of the fund change in the account;
[0015] In the database flow table in the service message database, the flag bit indicating the service notification message is unprocessed, so that the service notification message is processed according to the database flow table.
[0016] The step of scanning the business notification messages in the database flow table of the business message database according to the flag bit, screening out the unprocessed business notification messages in the database flow table, and calling the interface of the contract service to successfully verify the contract relationship of the unprocessed business notification messages and then updating the processing status of the unprocessed business notification messages includes:
[0017] Determine the scanning period in the scanning condition according to the number of business notification messages corresponding to the flag bit in the database flow table of the business message database, scan the business notification messages in the database flow 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 flow table;
[0018] Based on the user identifier in the unprocessed service notification message, the contract contact information is obtained in the contract relationship database, and the contract service interface is called to successfully verify the contract relationship of the unprocessed service notification message, and the processing status of the unprocessed service notification message is updated.
[0019] The step of scanning the business notification messages in the database flow table of the business message database according to the flag bit, screening out unprocessed business notification messages in the database flow table, and calling the interface of the contract service to successfully verify the contract relationship of the unprocessed business notification message and then updating the processing status of the unprocessed business notification message includes:
[0020] Determine the scanning period in the scanning condition according to the service identifier of the service notification message in the database flow table in the service message database, scan the service notification message in the database flow table in the service message database according to the flag bit according to the scanning period, and filter out the unprocessed service notification message in the database flow table;
[0021] Based on the user identifier in the unprocessed service notification message, the contract contact information is obtained in the contract relationship database, and the contract service interface is called to successfully verify the contract relationship of the unprocessed service notification message, and the processing status of the unprocessed service notification message is updated.
[0022] The method of obtaining the user identifier and the business information in the business notification message in the database flow table according to the processing status of the business notification message, updating the processing status after constructing the business message, and sending the business information based on the database flow table according to the processing status and the contract relationship of the business message includes:
[0023] According to the processing status of the business notification message, the sending user ID, the receiving user ID and the business information in the business notification message in the database flow table are obtained to construct a business message to update the processing status;
[0024] The business information is sent based on a database flow table according to the processing status of the business message and the contract relationship of the business message.
[0025] The sending of the business information based on a database flow table according to the processing status of the business message and the contract relationship of the business message includes:
[0026] It is verified that the processing status of the business message meets the sending conditions and the contract relationship of the business message is within the validity period, and then the business information is sent based on the database flow table according to the contract relationship of the business message.
[0027] According to a second aspect of an embodiment of the present invention, there is provided a device for sending service information, including:
[0028] A receiving module is used to monitor the MySQL database log using the Canal component and send the monitored business notification message of the banking system to the Kafka cluster, store the business notification message of the Kafka cluster in the database flow table of the business message database, and mark the flag of the business notification message in the database flow table of the business message database to process the business notification message according to the database flow table;
[0029] A screening module is used to scan the business notification messages in the database flow table of the business message database according to the flag bit, screen out the unprocessed business notification messages in the database flow table, and 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;
[0030] The sending module is used to obtain the user identifier and business information in the business notification message in the database flow table according to the processing status of the business notification message, update the processing status after constructing the business message, and send the business information based on the database flow table according to the processing status and the contract relationship of the business message.
[0031] According to a third aspect of an embodiment of the present invention, there is provided an electronic device for sending service information, including:
[0032] one or more processors;
[0033] a 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 implement the above method.
[0035] According to a fourth aspect of an embodiment of the present invention, there is provided a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the method as described above is implemented.
[0036] According to a fifth aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the program is executed by a processor, the method as described above provided by an embodiment of the present invention is implemented.
[0037] One embodiment of the above invention has the following advantages or beneficial effects: using the Canal component to monitor the MySQL database log and send the monitored business notification message of the bank system to the Kafka cluster, storing the business notification message of the Kafka cluster to the database flow table of the business message database, and marking the flag of the business notification message in the database flow table in the business message database to process the business notification message according to the database flow table; scanning the business notification message in the database flow table of the business message database according to the flag, screening out the unprocessed business notification message in the database flow table, and calling the interface of the contract service to successfully verify the contract relationship of the unprocessed business notification message to update the processing status of the unprocessed business notification message; obtaining the user identification and business information in the business notification message in the database flow table according to the processing status of the business notification message, constructing the business message and then updating the processing status, and sending the business information based on the database flow table according to the processing status and the contract relationship of the business message. The use of the Kafka cluster and the business message database reduces the resource occupation of the bank database, and can improve the processing speed according to the flag and processing status.
[0038] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0040] Figure 1 is a schematic diagram of the main flow of a method for sending service information according to an embodiment of the present invention;
[0041] Figure 2 It is a schematic diagram of a process of using a user identifier to store a business notification message of a Kafka cluster to a business message database according to an embodiment of the present invention;
[0042] Figure 3 It is a schematic diagram of a process of using a business identifier to store a business notification message of a Kafka cluster to a business message database according to an embodiment of the present invention;
[0043] Figure 4 It is a schematic diagram of a process of successfully verifying the contract relationship of an unprocessed service notification message by calling a contract service interface according to an embodiment of the present invention;
[0044] Figure 5 is a schematic diagram of a process for determining a scanning period based on a service identifier according to an embodiment of the present invention;
[0045] Figure 6 is a schematic diagram of a process of processing status and sending service information according to an embodiment of the present invention;
[0046] Figure 7 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 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0048] Fig. 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0049] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description. The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0050] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use 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 the notification mechanism and sends the change information to the notification system synchronously. After 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. Once one of the systems fails, it may affect the normal operation of the other system. The traffic carrying capacity of the message sending channels is different. If the synchronous sending method is used, it is necessary to wait for the successful sending result before subsequent operations can be performed, and the transaction process is long. In addition, message push is only a branch of the transfer business. Even if the message sending fails, it should not affect the failure of the transfer transaction and cause the transfer transaction to roll back.
[0055] Poor scalability: With the increase in the number of users and the complexity of business, it is difficult for the system to expand horizontally or vertically.
[0056] High resource usage: During peak hours, the system needs to process a large number of account change information and notification sending requests at the same time, which can easily lead to resource shortages.
[0057] Method 2: Polling.
[0058] Regularly or according to a preset frequency, the bank actively initiates a query request to the bank's account system to obtain the latest account change information. The queried account change information is then sorted and generated into business information and sent to the corresponding users.
[0059] Poor real-time performance: Since the query is performed on a scheduled or frequency basis, true real-time notification is not possible.
[0060] Waste of resources: When account changes are infrequent, frequent queries will lead to waste of resources.
[0061] High system pressure: In addition to carrying accounting transactions, the accounting system also needs to carry 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 slow system response.
[0062] Method 3: Message queue.
[0063] When an account changes, the accounting system sends the change information to the message queue. The notification system takes the change information from the message queue, generates business information and sends it to the user.
[0064] Flow control at all levels needs to be considered: Although message queues are used to decouple the accounting system and the notification system, if the notification system processing speed cannot keep up with the message queue generation speed, it will still cause message accumulation and delayed processing. Message queues are usually memory caches. If the server is restarted for some reason, the content stored in the memory will be lost.
[0065] In summary, sending business information faces challenges such as processing delays and high resource usage.
[0066] In order to solve the problems of processing delay and high resource occupancy in sending service information, the following technical solutions in the embodiments of the present invention may be adopted.
[0067] See also Figure 1 , Figure 1 1 is a schematic diagram of the main flow of a method for sending business information according to an embodiment of the present invention, which uses a Kafka cluster to implement asynchronous processing of business notification messages and stores business notification messages in a business message database. Figure 1 As shown in 100, the following steps are specifically included:
[0068] S101. Use the Canal component to monitor the MySQL database log and send the monitored business notification message of the bank system to the Kafka cluster, store the business notification message of the Kafka cluster in the database flow table of the business message database, and mark the flag of the business notification message in the business message database.
[0069] In an embodiment of the present invention, the Canal component is used to monitor the MySQL database log and send the monitored business notification message of the bank system to the Kafka cluster, and the business notification message of the Kafka cluster is stored. Using the Kafka cluster to receive the business notification message is conducive to improving reliability, performance and scalability.
[0070] The Canal component is mainly used to implement real-time monitoring of data. As an example, MySQL database logs include: MySQL binlog. Kafka is suitable for real-time data stream transmission and analysis in banking business. It is conducive to transaction processing and risk management in banking business.
[0071] Store the business notification messages of the Kafka cluster in the database flow table of the business message database. Store the business notification messages in a separate business message database to ensure that the processing speed will not be affected as the business notification messages increase. As an example, the business message database includes a relational database Mysql or Oracle. As another example, the business message database includes a non-relational database MongoDB or Redis.
[0072] In order to accurately know the processing status of the service notification message, a flag of the service notification message is marked in the service message database. As an example, the flag includes processed and unprocessed.
[0073] See also Figure 2 That is 200, Figure 2 This is a flow chart of using a user identifier to store a service notification message of a Kafka cluster to a service message database according to an embodiment of the present invention. Specifically, the following steps are included:
[0074] S201. Use the Canal component to monitor the MySQL database log and send the monitored business notification messages of the bank system to the Kafka cluster. Store the business notification messages of the Kafka cluster in the database flow table in the business message database based on the user identifier. The business notification messages of the bank system include transaction behaviors of fund changes in the account.
[0075] In one embodiment of the present invention, the Canal component is used to monitor the MySQL database log to obtain the business notification message of the banking system. Of course, in the case where the banking system actively pushes the business notification message, the Canal component is used to monitor the MySQL database log to obtain the business notification message of the banking system.
[0076] The business notification messages of the banking system include transaction behaviors of fund changes in accounts. Transaction behaviors of fund changes include but are not limited to one or more of the following: fund transfer in, fund transfer out, consumption, investment, payment, repayment, loan, financial management, salary delivery and scheduled deduction.
[0077] Based on the user ID in the business notification message, the business notification message of the Kafka cluster is stored in the database flow table in the business message database. The business message database uses the database flow table to store business notification messages.
[0078] Considering the huge number of business notification messages, in order to improve the speed of retrieving business notification messages, the business notification messages are stored in the database flow table based on the user ID in the business notification message. As an example, according to the user ID, the business notification message with a modulus value of 1 is stored in the database flow table 1, and the business notification message with a modulus value of 2 is stored in the database flow table 2, and so on. As the number of database flow tables increases, the database storage pressure of a single table is greatly reduced.
[0079] S202: In the database flow table in the business message database, a flag bit indicating that the business notification message is unprocessed is set so as to process the business notification message according to the database flow table.
[0080] The database flow table in the business message database stores multiple business notification messages. When storing the business notification messages, a flag bit that identifies the business notification messages as unprocessed is used. As an example, the flag bit that identifies the business notification messages is 0, where 0 represents unprocessed and 1 represents processed.
[0081] Through the database flow table, business notification messages can be processed in batches in tables to meet the business needs of banking services.
[0082] exist Figure 2 In the embodiment, the business notification message is stored in the database flow table of the business message database using the business identifier. The database storage operation is simple and the processing is fast, avoiding becoming a performance bottleneck.
[0083] See also Figure 3 That is 300, Figure 3 This is a flow chart of using a business identifier to store a business notification message of a Kafka cluster to a business message database according to an embodiment of the present invention. Specifically, the following steps are included:
[0084] S301. Use the Canal component to monitor the MySQL database log and send the monitored business notification messages of the bank system to the Kafka cluster. Store the business notification messages of the Kafka cluster in the database flow table in the business message database based on the business identifier. The business notification messages of the bank system include transaction behaviors of fund changes in the account.
[0085] In an embodiment of the present invention, the business notification message of the bank system includes the transaction behavior of the fund change in the account. The Canal component is used to monitor the MySQL database log and send the monitored business notification message of the bank system to the Kafka cluster, and the business notification message of the Kafka cluster is stored in the database flow table in the business message database based on the business identifier.
[0086] It is understandable that the business notification messages stored in the same database flow table have the same business identifier, that is, the database flow table stores business notification messages of the same business. As an example, database flow table 1 stores business notification messages for transfer services; database flow table 2 stores business notification messages for network transaction services.
[0087] The database flow table stores business notification messages of the same business, which is conducive to improving the processing efficiency of the same business.
[0088] S302: In the database flow table in the business message database, a flag bit indicating that the business notification message is unprocessed is set so as to process the business notification message according to the database flow table.
[0089] In the database flow table in the business message database, the flag bit that identifies the business notification message is unprocessed. In this way, the processing status of the business notification message can be timely known through the flag bit, so as to process the business notification message according to the database flow table.
[0090] exist Figure 3 In the embodiment, the service notification message is stored in the database flow table according to the service identifier, so as to implement batch processing of service notification messages of the same service.
[0091] S102, scanning the business notification messages in the database flow table in the business message database according to the flag bit, filtering out the unprocessed business notification messages in the database flow table, and calling the interface of the contract service to successfully verify the contract relationship of the unprocessed business notification messages and then update the processing status of the unprocessed business notification messages.
[0092] In an embodiment of the present invention, the business notification messages of the database flow table in the business message database can be scanned according to the flag bit to filter out the unprocessed business notification messages in the database flow table. Then, after successfully verifying the contract relationship of the unprocessed business notification message by calling the interface of the contract service, the processing status of the unprocessed business notification message is updated. As an example, the interface of the contract service is called based on the user identifier to verify the contract relationship of the unprocessed business notification message.
[0093] See also Figure 4 That is 400, Figure 4 The flowchart of successfully verifying the contract relationship of the unprocessed service notification message by calling the contract service interface according to an embodiment of the present invention is shown in FIG. The flowchart specifically includes the following steps:
[0094] S401. Determine a scanning cycle in a scanning condition according to the number of business notification messages corresponding to a flag bit in a database flow table in a business message database, scan the business notification messages in the database flow table in the business message database according to the flag bit according to the scanning cycle, and filter out unprocessed business notification messages in the database flow table.
[0095] In an embodiment of the present invention, the database flow table includes processed service notification messages and unprocessed service notification messages. The service notification messages in the database flow table in the service message database can be scanned using a scanning condition to filter out the unprocessed service notification messages.
[0096] Specifically, the scanning period in the scanning condition is determined according to the number of business notification messages corresponding to the flag bit in the database flow table of the business message database. As an example, the larger the number of business notification messages corresponding to the flag bit, the shorter the scanning period in the scanning condition. For example, if the number of business notification messages is greater than 100,000 and less than 1 million, the scanning period in the scanning condition is 5 minutes; if the number of business notification messages is greater than 1 million and less than 10 million, the scanning period in the scanning condition is 3 minutes.
[0097] The business notification messages in the database flow table of the business message database are scanned according to the flag bit in the scanning cycle to filter out the unprocessed business notification messages.
[0098] S402: based on the user identifier in the unprocessed service notification message, the contract contact information is obtained from the contract relationship database, the contract service interface is called to successfully verify the contract relationship of the unprocessed service notification message, and the processing status of the unprocessed service notification message is updated.
[0099] In an embodiment of the present invention, the contract relationship database stores the correspondence between the user identifier and the contract contact information. Based on the user identifier in the unprocessed service notification message, the contract relationship of the unprocessed service notification message is successfully verified by calling the contract service interface to successfully obtain the contract contact information in the contract relationship database.
[0100] If the interface for calling the contract service based on the user identifier in the unprocessed business notification message fails to obtain the contract contact information in the contract relationship database, the verification of the contract relationship of the unprocessed business notification message fails.
[0101] In an embodiment of the present invention, the processing status of the service notification message is identified by the processing status of the service notification message. As an example, after successfully verifying the contract relationship of the unprocessed service notification message by calling the contract service interface, the processing status of the unprocessed service notification message is updated to: verification successful.
[0102] exist Figure 4 In the embodiment of the present invention, the scanning period in the scanning condition is used to filter out the unprocessed business notification messages, and then verify the contract relationship of the business notification messages.
[0103] See also Figure 5 That is 500, Figure 5 1 is a flow chart of determining a scanning period based on a service identifier according to an embodiment of the present invention. Specifically, the following steps are included:
[0104] S501. Determine a scan cycle in a scan condition according to a business identifier of a business notification message in a database flow table in a business message database, scan the business notification messages in the database flow table in the business message database according to a flag bit in the scan cycle, and filter out unprocessed business notification messages in the database flow table.
[0105] In the embodiment of the present invention, different services have different timeliness requirements for processing service notification messages. As an example, the timeliness requirements for transfer services and online shopping services are high; as another example, the timeliness requirements for automatic deduction of water charges and automatic deduction of electricity charges are low.
[0106] Then, the scanning period in the scanning condition is determined according to the service identifier of the service notification message in the database flow table in the service message database. As an example, if the service identifier includes a transfer service identifier or an online shopping service identifier, the scanning period in the scanning condition is determined to be 3 minutes. As another example, if the service identifier includes an automatic deduction of water charges identifier or an automatic deduction of electricity charges identifier, the scanning period in the scanning condition is determined to be 24 hours.
[0107] After the scanning cycle in the scanning condition is determined, the business notification messages of the database flow table in the business message database are scanned according to the flag bit according to the scanning cycle, and unprocessed business notification messages are screened out.
[0108] S502: based on the user identifier in the unprocessed service notification message, the contract contact information is obtained from the contract relationship database, the contract service interface is called to successfully verify the contract relationship of the unprocessed service notification message, and the processing status of the unprocessed service notification message is updated.
[0109] After obtaining the contract contact information in the contract relationship database according to the user ID in the unprocessed business notification message, the contract service interface 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 the embodiment, the scanning period is determined according to the service identifier of the service notification message, and the load of the service message data is reduced when the notification meets the service implementation requirements.
[0111] S103. Obtain the user identifier and business information in the business notification message in the database flow table according to the processing status of the business notification message, update the processing status after constructing the business message, and send the business information based on the database flow 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 service notification message is: if the verification is successful, the user identification and service information in the service notification message in the database flow table are obtained, and then the processing status is updated after the service message is constructed. The processing status is updated to: the service message has been constructed. The service information can be sent based on the database flow table according to the processing status and the contract relationship of the service message. In this way, the service information can be sent according to the database flow table.
[0113] See also Figure 6 That is 600, Figure 6 This is a flow chart of sending service information according to the processing status and the contract relationship of the service message according to an embodiment of the present invention. Specifically, it includes the following steps:
[0114] S601. According to the processing status of the service notification message, the sending user identifier, the receiving user identifier and the service information in the service notification message in the database flow table are obtained to construct a service message to update the processing status.
[0115] In an embodiment of the present invention, the processing status of the service notification message is: if 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, receiving user identification includes: sending user identification includes: sending user name and sending user account identification 1234; receiving user name and receiving user account identification 5678; business information includes: transfer 100 yuan. Construct business message: Zhang San's debit card with the last number 1234 transfers 100 yuan to Li Si's debit card with the last number 5678.
[0117] S602: Send business information based on the database flow table according to the processing status of the business message and the contract relationship of the business message.
[0118] In the embodiment of the present invention, when the processing state of the business message is: the business message has been constructed, the business information can be sent based on the database flow table according to the contract relationship of the business message.
[0119] In one embodiment of the present invention, if the processing status of the service message meets the sending condition and the contract relationship of the service message is within the validity period, the service information is sent based on the database flow table according to the contract relationship of the service message. As an example, the sending condition includes the constructed service message.
[0120] The contract relationship of the business message includes preset contract contact information based on the database flow table. As an example, the contract contact information includes: mobile terminal identification, email identification and social media account.
[0121] As an example, business information can be sent through the information sending task. After the business information is sent, the processing status is updated to: sent.
[0122] exist Figure 6 In the embodiment, a service message is constructed using the sending user identifier, the receiving user identifier and the service information, so as to send the service message according to the processing status to remind the user.
[0123] In the above embodiment of the present invention, the Canal component is used to monitor the MySQL database log and send the monitored business notification message of the bank system to the Kafka cluster, store the business notification message of the Kafka cluster to the database flow table of the business message database, and mark the flag of the business notification message in the database flow table in the business message database to process the business notification message according to the database flow table; scan the business notification message of the database flow table in the business message database according to the flag, filter out the unprocessed business notification message in the database flow table, and call the interface of the contract service to successfully verify the contract relationship of the unprocessed business notification message to update the processing status of the unprocessed business notification message; according to the processing status of the business notification message, obtain the user identification and business information in the business notification message in the database flow table, build the business message, and then update the processing status, and send the business information based on the database flow table according to the processing status and the contract relationship of the business message. The use of the Kafka cluster and the business message database does not block the main thread to reduce the resource occupation of the bank database, and can improve the processing speed according to the flag and processing status.
[0124] See also Figure 7 , Figure 7 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 700, the device for sending service information specifically includes:
[0125] The receiving module 701 is used to monitor the MySQL database log using the Canal component and send the monitored business notification message of the banking system to the Kafka cluster, store the business notification message of the Kafka cluster in the database flow table of the business message database, and mark the flag of the business notification message in the database flow table of the business message database to process the business notification message according to the database flow table;
[0126] A screening module 702 is used to scan the business notification messages in the database flow table of the business message database according to the flag bit, screen out the unprocessed business notification messages in the database flow table, and 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;
[0127] The sending module 703 is used to obtain the user identifier and business information in the business notification message in the database flow table according to the processing status of the business notification message, update the processing status after constructing the business message, and send the business information based on the database flow 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 monitor the MySQL database log using the Canal component and send the monitored business notification message of the bank system to the Kafka cluster, and store the business notification message of the Kafka cluster in the database flow table in the business message database based on the user identifier, wherein the business notification message of the bank system includes the transaction behavior of the fund change in the account;
[0129] In the database flow table in the service message database, the flag bit indicating the service notification message is unprocessed, so that the service notification message is processed according to the database flow table.
[0130] In one embodiment of the present invention, the receiving module 701 is specifically used to monitor the MySQL database log using the Canal component and send the monitored business notification message of the bank system to the Kafka cluster, and store the business notification message of the Kafka cluster in the database flow table in the business message database based on the business identifier, wherein the business notification message of the bank system includes the transaction behavior of the fund change in the account;
[0131] In the database flow table in the service message database, the flag bit indicating the service notification message is unprocessed, so that the service notification message is processed according to the database flow table.
[0132] In one embodiment of the present invention, the screening module 702 is specifically used to determine the scanning period in the scanning condition according to the number of business notification messages corresponding to the flag bit in the database flow table of the business message database, scan the business notification messages of the database flow table of the business message database according to the flag bit according to the scanning period, and screen out the unprocessed business notification messages in the database flow table;
[0133] Based on the user identifier in the unprocessed service notification message, the contract contact information is obtained in the contract relationship database, and the contract service interface is called to successfully verify the contract relationship of the unprocessed service notification message, and the processing status of the unprocessed service notification message is updated.
[0134] In one embodiment of the present invention, the screening module 702 is specifically used to determine the scanning period in the scanning condition according to the service identifier of the service notification message in the database flow table in the service message database, scan the service notification message in the database flow table in the service message database according to the flag bit according to the scanning period, and screen out the unprocessed service notification message in the database flow table;
[0135] Based on the user identifier in the unprocessed service notification message, the contract contact information is obtained in the contract relationship database, and the contract service interface is called to successfully verify the contract relationship of the unprocessed service notification message, and the processing status of the unprocessed service notification message is updated.
[0136] In one embodiment of the present invention, the sending module 703 is specifically used to obtain the sending user identifier, the receiving user identifier and the business information in the business notification message in the database flow table according to the processing status of the business notification message to construct a business message to update the processing status;
[0137] The business information is sent based on a database flow table according to the processing status of the business message and the contract relationship of the business message.
[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 the contract relationship of the business message is within the validity period based on the database flow table, and then the business information is sent based on the database flow table according to the contract relationship of the business message.
[0139] Figure 8 An exemplary system architecture 800 is shown to which the method for sending service information or the apparatus for sending service information according to the embodiments of the present invention can be applied.
[0140] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0141] Users can use terminal devices 801, 802, and 803 to interact with server 805 through 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 platform software, etc. (only examples).
[0142] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0143] The server 805 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 801, 802, and 803. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.
[0144] It should be noted that the method for sending business information provided in the embodiment of the present invention is generally executed by the server 805 , and accordingly, the device for sending business information is generally set in the server 805 .
[0145] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0146] A computer program product according to an embodiment of the present invention includes a computer program, and when the program is executed by a processor, the method for sending service information provided by the embodiment of the present invention is implemented.
[0147] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of a terminal device suitable for implementing an embodiment of the present invention. Fig. 9 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0148] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0149] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, 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, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.
[0150] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.
[0151] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0152] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0153] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor, for example, they may be described as: a processor including a receiving module, a screening module and a sending module. The names of these modules do not, in some cases, limit the modules themselves. For example, the receiving module may also be described as "used to monitor the MySQL database log using the Canal component and send the monitored business notification message of the bank system to the Kafka cluster, store the business notification message of the Kafka cluster in the database flow table of the business message database, and mark the flag of the business notification message in the database flow table of the business message database to process the business notification message according to the database flow table".
[0154] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:
[0155] Use the Canal component to monitor the MySQL database log and send the monitored business notification message of the banking system to the Kafka cluster, store the business notification message of the Kafka cluster in the database flow table of the business message database, and mark the flag of the business notification message in the database flow table of the business message database to process the business notification message according to the database flow table;
[0156] Scan the business notification messages in the database flow table of the business message database according to the flag bit, filter out the unprocessed business notification messages in the database flow table, and 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;
[0157] According to the processing status of the business notification message, the user identifier and business information in the business notification message in the database flow table are obtained, the processing status is updated after the business message is constructed, and the business information is sent based on the database flow table according to the processing status and the contract relationship of the business message.
[0158] According to the technical solution of the embodiment of the present invention, the Canal component is used to monitor the MySQL database log and send the monitored business notification message of the bank system to the Kafka cluster, store the business notification message of the Kafka cluster to the database flow table of the business message database, and mark the flag of the business notification message in the database flow table in the business message database to process the business notification message according to the database flow table; scan the business notification message in the database flow table of the business message database according to the flag, filter out the unprocessed business notification message in the database flow table, and call the interface of the contract service to successfully verify the contract relationship of the unprocessed business notification message to update the processing status of the unprocessed business notification message; according to the processing status of the business notification message, obtain the user identification and business information in the business notification message in the database flow table, construct the business message, and then update the processing status, and send the business information based on the database flow table according to the processing status and the contract relationship of the business message. The use of the Kafka cluster and the business message database reduces the resource occupation of the bank database, and can improve the processing speed according to the flag and processing status.
[0159] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0160] It should be noted that in the technical solution of the present invention, the collection, analysis, use, transmission, storage and other aspects of user personal information involved are in compliance with the provisions of relevant laws and regulations, are used for legal and reasonable purposes, are not shared, leaked or sold outside of these legal uses, and are subject to supervision and management by regulatory authorities. Necessary measures should be taken for user personal information to prevent illegal access to such personal information data, ensure that persons who have access to personal information data comply with the provisions of relevant laws and regulations, and ensure the security of user personal information. Once these user personal information data are no longer needed, the risks should be minimized by limiting or even prohibiting data collection and / or deleting data.
[0161] When applicable, including in certain relevant applications, protect user privacy by de-identifying data, such as by removing specific identifiers (e.g., date of birth, etc.) when applicable, controlling the amount or specificity of data stored (e.g., collecting location data at a city level rather than at a specific address level), controlling how data is stored, and / or other de-identification methods.
Claims
1. A method for sending business information, characterized in that: include: Use the Canal component to monitor the MySQL database log and send the monitored business notification message of the banking system to the Kafka cluster, store the business notification message of the Kafka cluster in the database flow table of the business message database, and mark the flag of the business notification message in the database flow table of the business message database to process the business notification message according to the database flow table; Scan the business notification messages in the database flow table of the business message database according to the flag bit, filter out the unprocessed business notification messages in the database flow table, and call the interface of the contract service to successfully verify the contract relationship of the unprocessed business notification message and then update the processing status of the unprocessed business notification message; According to the processing status of the business notification message, the user identifier and business information in the business notification message in the database flow table are obtained, the processing status is updated after the business message is constructed, and the business information is sent based on the database flow table according to the processing status and the contract relationship of the business message.
2. The method for sending business information according to claim 1, characterized in that: The method of using the Canal component to monitor the MySQL database log and send the monitored business notification message of the bank system to the Kafka cluster, storing the business notification message of the Kafka cluster in the database flow table of the business message database, and marking the flag of the business notification message in the database flow table of the business message database to process the business notification message according to the database flow table includes: Use the Canal component to monitor the MySQL database log and send the monitored business notification message of the bank system to the Kafka cluster, and store the business notification message of the Kafka cluster in the database flow table in the business message database based on the user identifier. The business notification message of the bank system includes the transaction behavior of the fund change in the account; In the database flow table in the service message database, the flag bit indicating the service notification message is unprocessed, so that the service notification message is processed according to the database flow table.
3. The method for sending business information according to claim 1, characterized in that: The method of using the Canal component to monitor the MySQL database log and send the monitored business notification message of the bank system to the Kafka cluster, storing the business notification message of the Kafka cluster in the database flow table of the business message database, and marking the flag of the business notification message in the database flow table of the business message database to process the business notification message according to the database flow table includes: Use the Canal component to monitor the MySQL database log and send the monitored business notification message of the bank system to the Kafka cluster, and store the business notification message of the Kafka cluster in the database flow table in the business message database based on the business identifier. The business notification message of the bank system includes the transaction behavior of the fund change in the account; In the database flow table in the service message database, the flag bit indicating the service notification message is unprocessed, so that the service notification message is processed according to the database flow table.
4. The method for sending service information according to any one of claims 1 to 3, characterized in that: The step of scanning the business notification messages in the database flow table of the business message database according to the flag bit, screening out the unprocessed business notification messages in the database flow table, and calling the interface of the contract service to successfully verify the contract relationship of the unprocessed business notification messages and then updating the processing status of the unprocessed business notification messages includes: Determine the scanning period in the scanning condition according to the number of business notification messages corresponding to the flag bit in the database flow table of the business message database, scan the business notification messages in the database flow 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 flow table; Based on the user identifier in the unprocessed service notification message, the contract contact information is obtained in the contract relationship database, and the contract service interface is called to successfully verify the contract relationship of the unprocessed service notification message, and the processing status of the unprocessed service notification message is updated.
5. The method for sending business information according to claim 3, characterized in that: The step of scanning the business notification messages in the database flow table of the business message database according to the flag bit, screening out unprocessed business notification messages in the database flow table, and calling the interface of the contract service to successfully verify the contract relationship of the unprocessed business notification message and then updating the processing status of the unprocessed business notification message includes: Determine the scanning period in the scanning condition according to the service identifier of the service notification message in the database flow table in the service message database, scan the service notification message in the database flow table in the service message database according to the flag bit according to the scanning period, and filter out the unprocessed service notification message in the database flow table; Based on the user identifier in the unprocessed service notification message, the contract contact information is obtained in the contract relationship database, and the contract service interface is called to successfully verify the contract relationship of the unprocessed service notification message, and the processing status of the unprocessed service notification message is updated.
6. The method for sending business information according to claim 1, characterized in that: The method of obtaining the user identifier and the business information in the business notification message in the database flow table according to the processing status of the business notification message, updating the processing status after constructing the business message, and sending the business information based on the database flow table according to the processing status and the contract relationship of the business message includes: According to the processing status of the business notification message, the sending user ID, the receiving user ID and the business information in the business notification message in the database flow table are obtained to construct a business message to update the processing status; The business information is sent based on a database flow table according to the processing status of the business message and the contract relationship of the business message.
7. The method for sending business information according to claim 6, characterized in that: The sending of the business information based on a database flow table according to the processing status of the business message and the contract relationship of the business message includes: It is verified that the processing status of the business message meets the sending conditions and the contract relationship of the business message is within the validity period, and then the business information is sent based on the database flow table according to the contract relationship of the business message.
8. A device for sending business information, characterized in that: include: A receiving module is used to monitor the MySQL database log using the Canal component and send the monitored business notification message of the banking system to the Kafka cluster, store the business notification message of the Kafka cluster in the database flow table of the business message database, and mark the flag of the business notification message in the database flow table of the business message database to process the business notification message according to the database flow table; A screening module is used to scan the business notification messages in the database flow table of the business message database according to the flag bit, screen out the unprocessed business notification messages in the database flow table, and 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; The sending module is used to obtain the user identifier and business information in the business notification message in the database flow table according to the processing status of the business notification message, update the processing status after constructing the business message, and send the business information based on the database flow table according to the processing status and the contract relationship of the business message.
9. An electronic device for sending business information, characterized in that: include: one or more processors; a 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 according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Contract signing processing method and system for transaction report
CN111736808A
Signing method and device, electronic equipment and computer readable medium
CN114169863A
Data processing method, device and equipment and readable storage medium
CN116796234A
Method, device and equipment for processing service request and computer readable medium
CN118520011A
Business processing method, device and equipment, computer readable storage medium and product
CN118840056A