A message processing method, apparatus, device and medium
By generating registration requests and broadcasting information to supplementary nodes within the bank's centralized investment and financing operation platform, concurrent supplementation of message information is achieved, solving the problems of slow processing speed and low efficiency in existing technologies, and improving the processing efficiency of transaction confirmation and fund clearing.
Patent Information
- Application Number
- CN202411725524.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2044-11-28
AI Technical Summary
Existing technologies are slow and inefficient in the process of registering message information, especially in the centralized operation platform of banks for investment and financing. The synchronous call return mode is used for transaction confirmation and fund clearing, which leads to low processing efficiency.
By generating registration requests and broadcasting information to pre-configured supplementary nodes, each supplementary node concurrently supplements message information. The message information supplementation configuration table and supplementation progress table are used to ensure information integrity and efficiency, and a concurrent processing mode is adopted to replace serial calls.
It improves the processing speed and efficiency of message registration, reduces processing time, enhances the scalability and readability of the system, and avoids resource waste.
Smart Images

Figure CN119544799B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a message processing method, apparatus, device, and medium. Background Technology
[0002] With the booming development of fintech and the deepening of financial reforms, financial institutions are embarking on a transformation towards centralized operations to improve operational efficiency. For centralized investment and trading operations projects in banks, various transaction types (such as foreign exchange trading, interbank lending, bond trading, precious metals trading, and derivatives trading) involve message exchanges with different types of external systems, as well as request interactions with multiple internal systems or components.
[0003] In existing technologies, taking foreign exchange trading as an example, when banks build their integrated investment and financing operation platforms, after receiving a target transaction from the foreign exchange trading center, the integrated operation platform needs to perform transaction confirmation and fund clearing. Both transaction confirmation and fund clearing require registration of corresponding message information. When executing transaction confirmation processing, the transaction confirmation module needs to match the message parameters of the transaction confirmation, generate message registration request parameters, and then call the message registration request application programming interface (API) to process various message parameters, thereby obtaining the transaction confirmation message. However, the synchronous call return mode is usually used in the process of processing various message parameters. This method uses serial call data supplementation logic. Since these calls are performed sequentially, each call will block the caller until a response is received, and the next call can only be performed after one call is completed. The entire process may be very time-consuming, resulting in low processing efficiency. Other transaction types also have the same problem.
[0004] Therefore, existing technologies suffer from slow processing speed and low efficiency during message registration. Summary of the Invention
[0005] This application provides a message processing method, apparatus, device, and medium to address the problem of slow processing speed and low efficiency in the prior art during message information registration.
[0006] Firstly, this application provides a message processing method, including:
[0007] Based on the message type of the target transaction to be processed and the current message task, a registration request for the target message information registration is generated;
[0008] Based on the registration request, a broadcast message for message information registration is published to each pre-configured supplementary node used for message information supplementation. Upon hearing the broadcast message, each supplementary node performs the following operation: if it determines that the message information supplementation configuration table contains the identifier information of the supplementary node, it supplements the message information corresponding to the supplementary node to the corresponding position in the message information table; wherein, the message information supplementation configuration table is determined based on the message task and message type in the broadcast message.
[0009] If all message information in the message information table is completed, then the target message information is confirmed to have been successfully registered.
[0010] In some embodiments, before broadcasting the message information registration information to each pre-configured supplementary node for message information supplementation based on the registration request, the method further includes:
[0011] The registration request is validated for the validity of its input parameters.
[0012] After the verification is confirmed to be successful, the message information status in the message information table is updated to "to be supplemented".
[0013] In some embodiments, after broadcasting message information registration information to each pre-configured supplementary node for message information supplementation based on the registration request, the method further includes:
[0014] Based on the message information to be supplemented, determine the message registration start time;
[0015] Based on the message registration start time, query the message information supplementation progress table at preset time intervals;
[0016] Based on the message information supplementation progress table and the message information supplementation configuration table, supplementation nodes that have not completed message information supplementation are identified; the message information supplementation progress table is used to record the supplementation progress of each supplementation node.
[0017] A supplementation request is sent to the supplementation node that has not completed the supplementation of message information, so that the supplementation node can supplement the corresponding message information when it receives the supplementation request.
[0018] In some embodiments, determining the supplementation nodes that have not completed message information supplementation based on the message supplementation progress table and the message information supplementation configuration table includes:
[0019] Analyze whether the message information supplementation configuration table contains the identification information of any target supplementation node, and whether it is not recorded in the message information supplementation progress table;
[0020] If it exists, the target supplementary node is determined as the supplementary node for which message information has not been supplemented.
[0021] In some embodiments, before the supplementary node supplements the corresponding message information of the supplementary node to the corresponding position in the message information table after listening to the broadcast information and determining that the message information supplementation configuration table contains the identification information of the supplementary node, the method further includes:
[0022] The message information supplementation progress table is queried, and it is determined that the supplementation progress of the supplementation node is not recorded in the message information supplementation progress table.
[0023] In some embodiments, after determining that the target message information has been successfully registered, the method further includes:
[0024] Update the message information status in the message information table to pending grouping.
[0025] Secondly, this application provides a message processing apparatus, the apparatus comprising:
[0026] The generation module is used to generate a registration request for the registration of target message information based on the message type of the target transaction to be processed and the current message task;
[0027] The publishing module is used to publish broadcast information about message information registration to each pre-configured supplementary node for message information supplementation based on the registration request, so that each supplementary node, after listening to the broadcast information, performs the following operation: if it is determined that the message information supplementation configuration table contains the identification information of the supplementary node, then the message information corresponding to the supplementary node is supplemented to the corresponding position in the message information table; wherein, the message information supplementation configuration table is determined according to the message task and message type in the broadcast information;
[0028] The determination module is used to determine that the target message information has been successfully registered if all message information in the message information table has been completed.
[0029] In some embodiments, before the publishing module publishes broadcast information for message information registration to each pre-configured supplementary node for message information supplementation based on the registration request, the method further includes:
[0030] The verification module is used to verify the legality of the input parameters of the registration request;
[0031] After the verification is confirmed to be successful, the message information status in the message information table is updated to "to be supplemented".
[0032] In some embodiments, after the publishing module publishes broadcast information for message information registration to each pre-configured supplementary node for message information supplementation based on the registration request, the method further includes:
[0033] The processing module is used to determine the message registration start time based on the message information to be supplemented;
[0034] Based on the message registration start time, query the message information supplementation progress table at preset time intervals;
[0035] Based on the message information supplementation progress table and the message information supplementation configuration table, supplementation nodes that have not completed message information supplementation are identified; the message information supplementation progress table is used to record the supplementation progress of each supplementation node.
[0036] A supplementation request is sent to the supplementation node that has not completed the supplementation of message information, so that the supplementation node can supplement the corresponding message information when it receives the supplementation request.
[0037] In some embodiments, the processing module is specifically used for:
[0038] Analyze whether the message information supplementation configuration table contains the identification information of any target supplementation node, and whether it is not recorded in the message information supplementation progress table;
[0039] If it exists, the target supplementary node is determined as the supplementary node for which message information has not been supplemented.
[0040] In some embodiments, before the supplementary node supplements the corresponding message information of the supplementary node to the corresponding position in the message information table after listening to the broadcast information and determining that the message information supplementation configuration table contains the identification information of the supplementary node, the method further includes:
[0041] The message information supplementation progress table is queried, and it is determined that the supplementation progress of the supplementation node is not recorded in the message information supplementation progress table.
[0042] In some embodiments, after determining that the target message information has been successfully registered, the determining module is further configured to:
[0043] Update the message information status in the message information table to pending grouping.
[0044] Thirdly, this application provides an electronic device, comprising:
[0045] Memory, used to store program instructions;
[0046] A processor is configured to invoke program instructions stored in the memory and execute the steps of the method described in any one of the first aspects according to the obtained program instructions.
[0047] Fourthly, this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method described in any one of the first aspects.
[0048] Fifthly, this application provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of the first aspects.
[0049] In this embodiment, a registration request for target message information registration is generated based on the message type of the target transaction to be processed and the current message task. Based on the registration request, a broadcast message for message information registration is published to each pre-configured supplementary node used for message information supplementation. Upon receiving the broadcast message, each supplementary node performs the following operations: if it is determined that the message information supplementation configuration table contains the identifier information of the supplementary node, the message information corresponding to the supplementary node is added to the corresponding position in the message information table; wherein, the message information supplementation configuration table is determined based on the message task and message type in the broadcast message; if all message information in the message information table is completed, the target message information registration is determined to be successful. Thus, during the message information registration process, by publishing a broadcast notification, each supplementary node concurrently performs message information supplementation, thereby completing the message information registration, effectively improving the processing speed and efficiency of message information registration.
[0050] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0051] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0052] Figure 1 This application provides a schematic diagram of a message processing procedure as an embodiment of the present application.
[0053] Figure 2 A schematic diagram illustrating the framework of a prior art message information registration process provided for embodiments of this application;
[0054] Figure 3A schematic diagram illustrating a message information registration process provided in an embodiment of this application;
[0055] Figure 4 This is a schematic diagram of the structure of a message processing device provided in an embodiment of this application;
[0056] Figure 5 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0058] The terms "first" and "second" in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. The term "multiple" in this application can mean at least two, for example, two, three, or more, and the embodiments of this application do not impose limitations.
[0059] The term "module" refers to any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0060] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These embodiments should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description. It should be noted that in the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solutions of this application, and do not imply that the applicant has already used or necessarily used such solutions.
[0061] The acquisition, transmission, storage, and use of data in this application all comply with the requirements of relevant national laws and regulations.
[0062] Before introducing the message processing method provided in the embodiments of this application, for ease of understanding, the technical background of the embodiments of this application will be described in detail below.
[0063] With the booming development of fintech and the deepening of financial reforms, financial institutions are embarking on a transformation towards centralized operations to improve operational efficiency. For centralized investment and trading operations projects in banks, various transaction types (such as foreign exchange trading, interbank lending, bond trading, precious metals trading, and derivatives trading) involve message exchanges with different types of external systems, as well as request interactions with multiple internal systems or components.
[0064] In existing technologies, taking foreign exchange trading as an example, when banks build their integrated investment and financing operation platforms, after receiving a target transaction from the foreign exchange trading center, the integrated operation platform needs to perform transaction confirmation and fund clearing. Both transaction confirmation and fund clearing require registration of corresponding message information. When executing transaction confirmation processing, the transaction confirmation module needs to match the message parameters of the transaction confirmation, generate message registration request parameters, and then call the message registration request application programming interface (API) to process various message parameters, thereby obtaining the transaction confirmation message. However, the synchronous call return mode is usually used in the process of processing various message parameters. This method uses serial call data supplementation logic. Since these calls are performed sequentially, each call will block the caller until a response is received, and the next call can only be performed after one call is completed. The entire process may be very time-consuming, resulting in low processing efficiency. Other transaction types also have the same problem.
[0065] Therefore, existing technologies suffer from slow processing speed and low efficiency during message registration.
[0066] In view of this, in order to improve the processing speed and efficiency of message information registration, embodiments of this application propose a message processing method, apparatus, device, and medium. Some preferred embodiments of this application will be described below with reference to the accompanying drawings.
[0067] Figure 1 This is a schematic diagram of a message processing process provided in an embodiment of this application. The process includes the following steps.
[0068] In step 101, a registration request for target message information registration is generated based on the message type of the target transaction to be processed and the current message task.
[0069] The message processing method provided in this application is applied to electronic devices, which may be personal computers (PCs), servers, etc., deployed in an operating system. The operating system may be an integrated operating platform. Integrated operation refers to an operating model in which financial institutions improve operational efficiency, reduce costs, and enhance competitiveness by integrating resources, optimizing processes, and improving technical means.
[0070] In this embodiment of the application, when an electronic device in the operating system receives a target transaction to be processed, it will register the message information according to the corresponding message type and the current message task, and send it to the counterparty. The target transaction can be different types of transactions such as foreign exchange transactions, interbank lending transactions, bond transactions, precious metal transactions, and derivative transactions.
[0071] In practice, different transaction types involve different message tasks. For example, in foreign currency lending transactions, based on different message task types, tasks can be categorized as transaction confirmation tasks, settlement confirmation tasks, clearing tasks, and collection tasks.
[0072] 1) Transaction confirmation tasks (such as transaction date, value date, transaction period, interest rate, interest payment frequency, etc.);
[0073] 2) Settlement confirmation task (confirmation of key elements before fund settlement, such as payment amount, payment date, bank code of the receiving account, account number, etc.);
[0074] 3) Settlement tasks (including payments and receipts);
[0075] 4) Collection task (if an error is found in the interest payment amount, send a collection response message);
[0076] In practice, each message task corresponds to multiple message types. For example, the message types corresponding to a transaction confirmation task could be: SWIFT MT103 customer remittance confirmation message, SWIFT MT202 interbank fund transfer confirmation message, SWIFT MT300 foreign exchange trading confirmation message, SWIFT MT320 fixed deposit or loan confirmation message, etc.; the message types corresponding to a settlement confirmation task could be: SWIFT MT535 securities settlement confirmation message, SWIFT MT202 COV interbank fund transfer settlement confirmation message, etc.; the message types corresponding to a clearing task could be: SWIFT MT202 interbank fund transfer clearing confirmation message, SWIFT MT535 securities settlement clearing confirmation message, etc.; and the message types corresponding to a recovery task could be: SWIFT MT910 message (used for account statements to confirm account deposits and can be used to confirm whether recovery was successful), SWIFT... MT199 messages (used to send collection requests or collection notices), etc.
[0077] Taking a foreign exchange lending transaction as an example, when the electronic device in the operating system receives the foreign exchange lending transaction (transaction elements: currency: USD, term: 1 year, interest payment frequency: every 3 months, fixed interest rate: 4.8%, principal repayment at maturity), it determines that the message type is a SWIFT MT320 message. According to the message task processing flow, the first message task to be performed is the transaction confirmation task. Then, based on the message type, message task, and other transaction elements (such as currency, term, interest rate, and other detailed information), a registration request for target message information registration is generated, that is, a registration request for SWIFT MT320 transaction confirmation message registration is generated.
[0078] In practice, after transaction confirmation, the business personnel authorize the settlement of funds, then register a SWIFT MT210 settlement message and send it to the account bank to receive USD funds from the counterparty. When the transaction period reaches three months, the initiating bank needs to make the first interest payment, register a SWIFT MT320 settlement confirmation message, and send it to the counterparty to complete the settlement confirmation. After confirmation, the business personnel authorize the settlement of funds, register a SWIFT MT202 settlement message, and send it to the account bank, which then transfers the first interest payment to the counterparty.
[0079] In step 102, based on the registration request, a broadcast message for message information registration is published to each pre-configured supplementary node used for message information supplementation, so that each supplementary node performs the following operation after listening to the broadcast message: if it is determined that the message information supplementation configuration table contains the identification information of the supplementary node, then the message information corresponding to the supplementary node is supplemented to the corresponding position in the message information table; wherein, the message information supplementation configuration table is determined according to the message task and message type in the broadcast message.
[0080] In practice, before broadcasting the message information registration information to each pre-configured supplementary node for message information supplementation based on the registration request, the registration request can also be validated for the validity of input parameters. This step is to ensure that all necessary input parameters exist and are in the correct format. For example, it checks whether required fields exist (such as transaction ID, amount, counterparty ID, settlement date, etc.), verifies the data type and format of fields (such as the amount must be numeric and greater than 0, the date format must be correct, etc.), and checks business rules (such as the amount cannot be negative, the transaction ID must be unique, etc.). After confirming that the validation is successful, the message information status of the message information table is updated to "to be supplemented". The message information table is used to supplement message information. Updating the message information status of the message information table to "to be supplemented" is for the purpose of subsequent supplementation status queries for message information tables with a status of "to be supplemented".
[0081] In practice, the message information registration content varies depending on the message type. For example, taking foreign exchange lending transactions as an example, the message information registration content corresponding to the message type under different message tasks is shown in Table 1.
[0082] Table 1
[0083]
[0084] In practice, multiple supplementary nodes can be set up according to each message type and the message information registration content corresponding to the message type. Each supplementary node is used to supplement one message information. As shown in Table 1, for each message information registration content, 10 supplementary nodes can be set up, namely supplementary node 1 to supplementary node 10. Among them, supplementary node 1 is used to perform input parameter legality verification, supplementary node 2 is used to supplement foreign currency fund lending transaction information, supplementary node 3 is used to supplement fund settlement information, and so on. Supplementary node 10 is used to supplement anti-money laundering parameter information.
[0085] In practical applications, since the broadcast information for message registration needs to undergo input parameter validity verification before it can be published, a supplementary node for input parameter validity verification can be omitted. This allows input parameter validity verification to be performed directly before the broadcast information is published. For those that fail the verification, the subsequent message registration process cannot proceed, further improving the processing speed of message registration and saving resources.
[0086] In practice, after setting up each supplementary node, a corresponding message information supplementary configuration table can be configured according to each message type. The message information supplementary configuration table configures the supplementary nodes that each message type needs to use during the message information registration process.
[0087] For example, taking the MT320 transaction confirmation message shown in Table 1 as an example, where supplementary node 1 is for supplementing foreign currency interbank lending transaction information, the supplementary nodes required for the message information registration process of the MT320 transaction confirmation message are supplementary node 1, supplementary node 3, supplementary node 4, supplementary node 5, supplementary node 6, and supplementary node 8. Therefore, supplementary node 1, supplementary node 3, supplementary node 4, supplementary node 5, supplementary node 6, and supplementary node 8 are configured in the message information supplementary configuration table of the MT320 transaction confirmation message, and so on. This application will not elaborate further on this.
[0088] In practice, after verifying the validity of the registration request input parameters, a broadcast message for message information registration can be published to each pre-configured supplementary node. The broadcast message must include at least the message information number, SWIFT MT320 message type, message task, and other information. Each supplementary node listens to the broadcast message in real time. When each supplementary node hears the broadcast message, it performs the following operations: it queries the corresponding message information supplementary configuration table based on the message task and message type in the broadcast message, that is, it queries the message information supplementary configuration table 1 for SWIFT MT320 transaction confirmation messages. If it is determined that the message information supplementary configuration table 1 contains the identification information of its own supplementary node, then the message information corresponding to the supplementary node is added to the corresponding position in the message information table.
[0089] For example, if Supplement Node 1 queries the message information supplement configuration table 1 and determines that Supplement Node 1 is included in the message information supplement configuration table 1, then Supplement Node 1 determines that it needs to supplement the SWIFT MT320 transaction confirmation message with foreign currency interbank lending transaction information. If Supplement Node 2 queries the message information supplement configuration table 1 and determines that Supplement Node 2 is not included in the message information supplement configuration table 1, then Supplement Node 2 determines that it does not need to supplement the SWIFT MT320 transaction confirmation message with fund settlement information.
[0090] In practice, when Supplement Node 1 determines that it needs to supplement the SWIFT MT320 transaction confirmation message with foreign currency interbank lending transaction information, it can call the transaction management query interface according to the message information number to obtain the interbank lending transaction information; and supplement the transaction information such as product category, sub-category, transaction date, interbank lending currency, interest accrual date, and interbank lending amount to the corresponding position in the message information table.
[0091] In practice, when the same supplementary node receives multiple broadcast messages, the received broadcast messages can be sorted according to the reception time and placed into the processing queue of the supplementary node in sequence, and then the broadcast messages can be processed in sequence.
[0092] For example, when supplementary node 1 is processing broadcast information A, it receives two broadcast information in succession, namely broadcast information B and broadcast information C. Broadcast information B was received earlier than broadcast information C. If sorted according to the reception time, broadcast information B will be processed first. That is, after supplementary node 1 finishes processing broadcast information A, broadcast information B will be processed, and then broadcast information C will be processed.
[0093] In practical applications, to avoid situations where supplementary nodes fail to receive broadcast information, resulting in incomplete message information registration, and to ensure the integrity of message information registration, based on the above embodiments, in this application embodiment, after broadcasting message information registration to each pre-configured supplementary node for message information supplementation based on the registration request, the message registration start time can be determined based on the message information to be supplemented; the message information supplementation progress table can be queried according to a preset time interval based on the message registration start time; the supplementary nodes that have not completed message information supplementation can be identified based on the message information supplementation progress table and the message information supplementation configuration table; and a supplementation request can be sent to the supplementary nodes that have not completed message information supplementation, so that the supplementary nodes can supplement the corresponding message information upon receiving the supplementation request.
[0094] In practice, the system can query message information with a status of "to be supplemented" to determine the message registration start time. Then, based on the message registration start time, it queries the message information supplementation progress table at preset time intervals, such as 10 seconds. This progress table records the supplementation progress of each supplementation node. After each supplementation node completes its corresponding message information supplementation, it can register its progress in the progress table. For example, the progress table can record the node's identifier, completion information, and progress registration time. Then, based on the progress table and the configuration table, the system can identify supplementation nodes that have not completed message information supplementation. Specifically, it can analyze whether any target supplementation node's identifier is not recorded in the progress table. If so, the target supplementation node is identified as the supplementation node that has not completed message information supplementation. Finally, a supplementation request is sent to the supplementation node that has not completed message information supplementation, so that it can supplement the corresponding message information upon receiving the request.
[0095] In this way, at each preset time interval, the system can determine whether there are any supplementary nodes that have not completed message information supplementation, based on the message information supplementation progress table and the message information supplementation configuration table. The reason why a supplementary node has not completed message information supplementation may be that the supplementary node has not received the broadcast information, or it may be that the supplementary node is currently processing other supplementation tasks and has not yet had time to supplement the message information. In this case, in order to prevent the supplementary node that has not completed message information supplementation from being unable to supplement the information normally, a supplementation request can be sent to the supplementary node that has not completed message information supplementation, so that the supplementary node can supplement the corresponding message information upon receiving the supplementation request. This can improve the integrity of message information registration.
[0096] In practice, to avoid duplicate supplementation of the same message information by the supplementary node, after listening to the broadcast information and confirming that the message information supplementation configuration table contains the identification information of the supplementary node, the message information supplementation progress table can be queried to determine whether the supplementation progress of the supplementary node has been recorded in the message information supplementation progress table. If it has been recorded, the message information will not be supplemented again. If it has not been recorded, the message information corresponding to the supplementary node will be supplemented to the corresponding position in the message information table.
[0097] In practice, once the supplementary node detects the broadcast information and determines that the supplementary information configuration table contains the identification information of the supplementary node, the supplementary node may have already completed the corresponding supplementary information according to the supplementary request. Therefore, there is no need to perform repeated supplementation, which helps to save supplementary node resources and further improve processing efficiency.
[0098] In step 103, if all message information in the message information table has been completed, the target message information is confirmed to have been successfully registered.
[0099] In practice, after confirming that the target message information has been successfully registered, the message information status in the message information table can be updated to pending group reporting. After being updated to pending group reporting, the process of determining the supplementary node for incomplete message information supplementation will not be executed at the preset time interval. Moreover, after being updated to pending group reporting, it is convenient to start the subsequent processing flow of the message, that is, to perform message group reporting processing.
[0100] In this embodiment, a registration request for target message information registration is generated based on the message type of the target transaction to be processed and the current message task. Based on the registration request, a broadcast message for message information registration is published to each pre-configured supplementary node used for message information supplementation. Upon receiving the broadcast message, each supplementary node performs the following operations: if it is determined that the message information supplementation configuration table contains the identifier information of the supplementary node, the message information corresponding to the supplementary node is added to the corresponding position in the message information table; wherein, the message information supplementation configuration table is determined based on the message task and message type in the broadcast message; if all message information in the message information table is completed, the target message information registration is determined to be successful. Thus, during the message information registration process, by publishing a broadcast notification, each supplementary node concurrently performs message information supplementation, thereby completing the message information registration, effectively improving the processing speed and efficiency of message information registration.
[0101] The following section uses the registration process of the SWIFT MT320 foreign exchange lending transaction confirmation message as an example to provide a detailed introduction to the message processing method proposed in this application.
[0102] Figure 2 This application provides a schematic diagram of the framework of a prior art message information registration process, which is divided into three parts: transaction access processing, transaction confirmation processing, and message information registration processing. The above three parts are described in detail below.
[0103] Transaction access processing: The centralized operation platform receives foreign currency lending transactions. The transaction elements are: currency: USD, term: 1 year, interest payment frequency: every 3 months (quarterly interest payment), fixed interest rate: 4.8%, principal is repaid at maturity.
[0104] Transaction confirmation processing: The transaction confirmation process matches the transaction confirmation parameters of the incoming transactions, obtains the matching result as a SWIFT MT320 transaction confirmation message, organizes the input parameters of the SWIFT MT320 message registration request, and generates a registration request for SWIFT MT320 message information registration.
[0105] Message registration processing: The message registration request API is invoked. After receiving the registration request, the message registration request API performs the following processing:
[0106] 1) Verify the legality of the input parameters. If the verification passes, supplement the foreign currency interbank lending transaction information.
[0107] 2) Supplement foreign currency interbank lending transaction information: Query transaction management data
[0108] 3) Supplement your own liquidation information: Query your own liquidation information parameters
[0109] 4) Supplement counterparty information: Query counterparty parameters
[0110] 5) Supplementing the unique identifier for the SWIFT message: Generating a unique SWIFT identifier number.
[0111] 6) Supplement message template information: Query message template parameters and data retrieval rule parameters.
[0112] 7) Fill in the information of the sending and receiving banks: Fill in the information of the sending and receiving banks.
[0113] 8) Register the message information into the database and return the registration result.
[0114] Depend on Figure 2 It is known that the existing technology uses a synchronous call return mode, which processes the message registration API synchronously and returns the result. This method serially calls the data supplementation logic, which requires querying multiple types of data, resulting in slow processing speed. In addition, different message types have different data processing logic, resulting in many nested branches and poor readability. When a new business message is registered, the impact analysis of the processing logic is required. If the modification points are not fully considered, there is a risk of introducing problems. Furthermore, when a new processing branch is added, it cannot be guaranteed that it will not affect the message registration processing that has been put into production, and the scalability is also relatively poor.
[0115] Figure 3 This is a schematic diagram of a message information registration process provided in an embodiment of this application. The transaction access processing, transaction confirmation processing, and message information registration processing are described in detail below according to the three parts of the message information registration process.
[0116] Transaction access processing: The centralized operation platform receives foreign currency lending transactions. The transaction elements are: currency: USD, term: 1 year, interest payment frequency: every 3 months (quarterly interest payment), fixed interest rate: 4.8%, principal is repaid at maturity.
[0117] Transaction confirmation processing: The transaction confirmation process matches the transaction confirmation parameters of the incoming transactions, obtains the matching result as a SWIFT MT320 transaction confirmation message, organizes the input parameters of the SWIFT MT320 message registration request, and generates a registration request for SWIFT MT320 message information registration.
[0118] Message registration processing: The message registration request API is invoked. After receiving the registration request, the message registration request API performs the following processing:
[0119] First, the legality of the input parameters is verified. If the verification passes, the message information is registered and the message information status in the message information table is updated to "to be supplemented".
[0120] Then, based on the registration request, a broadcast message for message information registration is published to each pre-configured supplementary node used for message information supplementation. This broadcast message includes at least the message information number, SWIFT MT320 message type, and message task information. Figure 3 It can be seen that each supplementary node can receive broadcast information. When each supplementary node hears the broadcast information, it performs the following operations: it queries the corresponding message information supplementary configuration table according to the message task and message type in the broadcast information, that is, it queries the message information supplementary configuration table of SWIFT MT320 transaction confirmation message. The message information supplementary configuration table configures the supplementary nodes required for message information registration for each message type. If it is determined that the message information supplementary configuration table contains the identification information of its own supplementary node, the message information corresponding to the supplementary node is added to the corresponding position in the message information table.
[0121] For example, Supplement Node 1 is used to supplement foreign currency lending transaction information. After listening to the broadcast information, it can read the SWIFT MT320 message information supplementation configuration table from the Redis cache or database to determine whether the current supplement node needs to be processed. That is, it determines whether the message information supplementation configuration table contains the identification information of Supplement Node 1. If it does, it calls the transaction management query interface according to the message information number to obtain the lending transaction information; and supplements the transaction information such as product category, sub-category, transaction day, lending currency, interest accrual date, and lending amount to the corresponding positions in the message information table. After the supplementation is completed, the supplementation progress can also be registered in the message information supplementation progress table, such as registering the identification information of the supplement node, the supplementation completion information, and the progress registration time.
[0122] Similarly, after other supplementary nodes complete the supplementation of the corresponding message information, they also register the supplementation progress in the message information supplementation progress table. The supplementation process of other supplementary nodes will not be described in detail in this application.
[0123] Next, once it is confirmed that all message information in the message information table has been completed, the SWIFT MT320 foreign exchange lending transaction confirmation message registration is confirmed to be successful. For example, according to the message information completion progress table and the message information completion configuration table, if it is confirmed that each completion node in the message information completion configuration table has completed the completion progress registration in the message information completion progress table, then it is confirmed that all message information in the message information table has been completed. After that, after confirming successful registration, the message information status in the message information table is updated to pending message grouping in order to start the subsequent message processing process.
[0124] Finally, to avoid incomplete message registration, a re-supplementation mechanism is set up. This involves determining the message registration start time based on the message information to be supplemented; then, based on the start time, querying the message information supplementation progress table at preset time intervals, such as 10 seconds; and finally, identifying supplementary nodes that have not completed message information supplementation based on the progress table and the configuration table. For example, analyzing whether any target supplementary node's identifier information exists in the configuration table but is not recorded in the progress table. If it does, the target supplementary node is identified as a supplementary node that has not completed message information supplementation, and a supplementation request is sent to this node so that it can supplement the corresponding message information upon receiving the request.
[0125] In this embodiment of the application, during message information registration, message information supplementation is processed concurrently by publishing broadcast information, which can significantly improve processing efficiency. During message information registration, different supplementary nodes can be inherited or extended, and the configuration of supplementary nodes can be quickly completed through the message information supplementation configuration table. It has good readability and scalability. New business messages can complete message information registration through configuration without affecting the existing message information registration processing. There is no need to perform regression testing on previous message information registrations, further improving development efficiency.
[0126] Based on the same inventive concept, embodiments of this application provide a message processing apparatus, please refer to... Figure 4 The device includes:
[0127] The generation module 401 is used to generate a registration request for the registration of target message information based on the message type of the target transaction to be processed and the current message task.
[0128] The publishing module 402 is used to publish broadcast information for message information registration to each pre-configured supplementary node for message information supplementation based on the registration request, so that each supplementary node performs the following operation after listening to the broadcast information: if it is determined that the message information supplementation configuration table contains the identification information of the supplementary node, then the message information corresponding to the supplementary node is supplemented to the corresponding position in the message information table; wherein, the message information supplementation configuration table is determined according to the message task and message type in the broadcast information;
[0129] The determination module 403 is used to determine that the target message information has been successfully registered if all message information in the message information table has been completed.
[0130] In some embodiments, before the publishing module 402 publishes broadcast information for message information registration to each pre-configured supplementary node for message information supplementation based on the registration request, the method further includes:
[0131] The verification module 404 is used to verify the legality of the input parameters of the registration request;
[0132] After the verification is confirmed to be successful, the message information status in the message information table is updated to "to be supplemented".
[0133] In some embodiments, after the publishing module 402 publishes broadcast information for message information registration to each pre-configured supplementary node for message information supplementation based on the registration request, the method further includes:
[0134] Processing module 405 is used to determine the message registration start time based on the message information to be supplemented;
[0135] Based on the message registration start time, query the message information supplementation progress table at preset time intervals;
[0136] Based on the message information supplementation progress table and the message information supplementation configuration table, supplementation nodes that have not completed message information supplementation are identified; the message information supplementation progress table is used to record the supplementation progress of each supplementation node.
[0137] A supplementation request is sent to the supplementation node that has not completed the supplementation of message information, so that the supplementation node can supplement the corresponding message information when it receives the supplementation request.
[0138] In some embodiments, the processing module 405 is specifically used for:
[0139] Analyze whether the message information supplementation configuration table contains the identification information of any target supplementation node, and whether it is not recorded in the message information supplementation progress table;
[0140] If it exists, the target supplementary node is determined as the supplementary node for which message information has not been supplemented.
[0141] In some embodiments, before the supplementary node supplements the corresponding message information of the supplementary node to the corresponding position in the message information table after listening to the broadcast information and determining that the message information supplementation configuration table contains the identification information of the supplementary node, the method further includes:
[0142] The message information supplementation progress table is queried, and it is determined that the supplementation progress of the supplementation node is not recorded in the message information supplementation progress table.
[0143] In some embodiments, after determining that the target message information has been successfully registered, the determining module 403 is further configured to:
[0144] Update the message information status in the message information table to pending grouping.
[0145] Based on the same inventive concept, this application provides an electronic device that can perform the message processing function described above. Please refer to... Figure 5 The device includes a memory 501, one or more processors 502, and a bus 503.
[0146] The memory 501 is used to store computer programs executed by the processor 502. The memory 501 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and programs required to run instant messaging functions, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0147] Memory 501 may be volatile memory, such as random-access memory (RAM); memory 501 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 501 may be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 501 may be a combination of the above-mentioned memories.
[0148] The processor 502 may include one or more central processing units (CPUs) or digital processing units, etc. The processor 502 is used to implement the message processing method in the above embodiments when it calls the computer program stored in the memory 501.
[0149] This application embodiment does not limit the specific connection medium between the memory 501 and the processor 502 described above. This application embodiment... Figure 5 The memory 501 and the processor 502 are connected via a bus 503, and the bus 503 is in Figure 5 The connections between other components are shown in thick lines only and are not intended to be limiting. The 503 bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0150] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium. The computer program product includes computer program code, which, when executed on a computer, causes the computer to perform any of the message processing methods described above. Since the principle by which the computer-readable storage medium solves the problem is similar to that of the message processing method, the implementation of the computer-readable storage medium can be found in the implementation of the method; repeated details will not be elaborated further.
[0151] Based on the same inventive concept, this application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to execute any of the message processing methods described above. Since the principle by which the above-described computer program product solves the problem is similar to that of the message processing method, the implementation of the above-described computer program product can be referred to the implementation of the method, and repeated details will not be described again.
[0152] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0153] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0154] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0155] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of user-operated steps to be executed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0156] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A message processing method, characterized in that, include: Based on the message type of the target transaction to be processed and the current message task, a registration request for the target message information registration is generated; Based on the registration request, a broadcast message for message information registration is published to each pre-configured supplementary node used for message information supplementation. Upon hearing the broadcast message, each supplementary node performs the following operation: if it determines that the message information supplementation configuration table contains the identifier information of the supplementary node, it supplements the message information corresponding to the supplementary node to the corresponding position in the message information table; wherein, the message information supplementation configuration table is determined based on the message task and message type in the broadcast message. If all message information in the message information table is completed, then the target message information is confirmed to have been successfully registered.
2. The method as described in claim 1, characterized in that, Before broadcasting the message information registration information to each pre-configured supplementary node for message information supplementation based on the registration request, the method further includes: The registration request is validated for the validity of its input parameters. After the verification is confirmed to be successful, the message information status in the message information table is updated to "to be supplemented".
3. The method as described in claim 2, characterized in that, After broadcasting the message information registration information to each pre-configured supplementary node for message information supplementation based on the registration request, the method further includes: Based on the message information to be supplemented, determine the message registration start time; Based on the message registration start time, query the message information supplementation progress table at preset time intervals; Based on the message information supplementation progress table and the message information supplementation configuration table, supplementation nodes that have not completed message information supplementation are identified; the message information supplementation progress table is used to record the supplementation progress of each supplementation node. A supplementation request is sent to the supplementation node that has not completed the supplementation of message information, so that the supplementation node can supplement the corresponding message information when it receives the supplementation request.
4. The method as described in claim 3, characterized in that, The step of determining the supplementation nodes that have not completed message information supplementation based on the message information supplementation progress table and the message information supplementation configuration table includes: Analyze whether the message information supplementation configuration table contains the identification information of any target supplementation node, and whether it is not recorded in the message information supplementation progress table; If it exists, the target supplementary node is determined as the supplementary node for which message information has not been supplemented.
5. The method as described in claim 3, characterized in that, Before the supplementary node supplements the corresponding message information to the corresponding position in the message information table after it detects the broadcast information and determines that the message information supplementary configuration table contains the identification information of the supplementary node, the method further includes: The message information supplementation progress table is queried, and it is determined that the supplementation progress of the supplementation node is not recorded in the message information supplementation progress table.
6. The method according to any one of claims 1 to 5, characterized in that, After confirming that the target message information has been successfully registered, the process also includes: Update the message information status in the message information table to pending grouping.
7. A message processing apparatus, characterized in that, include: The generation module is used to generate a registration request for the registration of target message information based on the message type of the target transaction to be processed and the current message task; The publishing module is used to publish broadcast information about message information registration to each pre-configured supplementary node for message information supplementation based on the registration request, so that each supplementary node, after listening to the broadcast information, performs the following operation: if it is determined that the message information supplementation configuration table contains the identification information of the supplementary node, then the message information corresponding to the supplementary node is supplemented to the corresponding position in the message information table; wherein, the message information supplementation configuration table is determined according to the message task and message type in the broadcast information; The determination module is used to determine that the target message information has been successfully registered if all message information in the message information table has been completed.
8. The apparatus as claimed in claim 7, characterized in that, Before the publishing module publishes the broadcast information of message information registration to each pre-configured supplementary node for supplementing message information based on the registration request, the method further includes: The verification module is used to verify the legality of the input parameters of the registration request; After the verification is confirmed to be successful, the message information status in the message information table is updated to "to be supplemented".
9. The apparatus as claimed in claim 8, characterized in that, After the publishing module publishes the message information registration broadcast information to each pre-configured supplementary node for message information supplementation based on the registration request, the method further includes: The processing module is used to determine the message registration start time based on the message information to be supplemented; Based on the message registration start time, query the message information supplementation progress table at preset time intervals; Based on the message information supplementation progress table and the message information supplementation configuration table, supplementation nodes that have not completed message information supplementation are identified; the message information supplementation progress table is used to record the supplementation progress of each supplementation node. A supplementation request is sent to the supplementation node that has not completed the supplementation of message information, so that the supplementation node can supplement the corresponding message information when it receives the supplementation request.
10. The apparatus as claimed in claim 9, characterized in that, The processing module is specifically used for: Analyze whether the message information supplementation configuration table contains the identification information of any target supplementation node, and whether it is not recorded in the message information supplementation progress table; If it exists, the target supplementary node is determined as the supplementary node for which message information has not been supplemented.
11. The apparatus as claimed in claim 9, characterized in that, Before the supplementary node supplements the corresponding message information to the corresponding position in the message information table after it detects the broadcast information and determines that the message information supplementary configuration table contains the identification information of the supplementary node, the method further includes: The message information supplementation progress table is queried, and it is determined that the supplementation progress of the supplementation node is not recorded in the message information supplementation progress table.
12. The apparatus according to any one of claims 7 to 11, characterized in that, After determining that the target message information has been successfully registered, the determining module is further configured to: Update the message information status in the message information table to pending grouping.
13. An electronic device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method according to any one of claims 1-6 in accordance with the obtained program instructions.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a computer, cause the computer to perform the method as described in any one of claims 1-6.
15. A computer program product, characterized in that, The computer program product includes: computer program code, which, when run on a computer, causes the computer to perform the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Transaction method based on smart contract, POS machine and transaction system
CN117011052A
Transaction broadcasting method, and device and storage medium
WO2021196768A1