Message processing method and device, equipment and medium
By issuing broadcast notifications during the message information registration process, each supplementary node is allowed to supplement message information concurrently, and the problem of slow and low efficiency of message information registration in the existing technology is solved, and more efficient message information registration processing is achieved.
Patent Information
- Application Number
- CN202411725524.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-28
AI Technical Summary
In the process of registering packet information, the prior art has problems such as slow processing speed and low efficiency.
By generating a registration request for target message information registration and publishing broadcast information to pre-configured supplementary nodes, each supplementary node is allowed to replenish the message information concurrently, thereby completing the packet information registration.
It improves the processing speed and efficiency of packet information registration, and avoids the time-consuming process caused by serial calls in synchronous call return mode.
Smart Images

Figure CN119544799A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a message processing method, device, equipment and medium. Background Art
[0002] With the prosperity of financial technology and the deepening of financial reform, various financial institutions have started the transformation of intensive operation to improve operational efficiency. For the intensive operation project of bank investment and trading, the transaction links of various types of transactions (such as foreign exchange transactions, borrowing transactions, bond transactions, precious metal transactions, and derivative transactions) involve message interactions with different types of external systems, and also involve request interactions with multiple systems or components within the bank.
[0003] In the prior art, taking foreign exchange transactions as an example, in the construction of the bank's investment and financing intensive operation platform, after receiving the target transaction reached by the foreign exchange trading center, the intensive operation platform needs to perform transaction confirmation and fund settlement processing, and both transaction confirmation and fund settlement require corresponding message information registration. When executing transaction confirmation processing, the transaction confirmation module needs to match the message parameters of the transaction confirmation, generate the message registration request parameters, and call the message registration request application programming interface (Application Programming Interface, API) to process various message parameters, thereby obtaining a transaction confirmation message. However, in the process of processing various message parameters, a synchronous call return mode is usually adopted. This method uses a serial call data supplement logic. Since these calls are made in sequence, each call will block the caller until a response is obtained, and the next call can only be made after one call is completed. The entire processing process may be very time-consuming, resulting in low processing efficiency. The same problem also exists in other transaction types.
[0004] Therefore, in the process of registering message information, the prior art has the problems of slow processing speed and low efficiency. Summary of the invention
[0005] The embodiments of the present application provide a message processing method, apparatus, device and medium, which are used to solve the problems of slow processing speed and low efficiency in the process of message information registration in the prior art.
[0006] In a first aspect, the present application provides a message processing method, comprising:
[0007] Generate a registration request for target message information registration based on the message type of the target transaction to be processed and the current message task;
[0008] Based on the registration request, broadcast information of message information registration is issued to each supplementary node pre-configured for supplementing message information, so that each supplementary node performs the following operations after listening to the broadcast information: if it is determined that the message information supplementary configuration table contains the identification information of the supplementary node, the message information corresponding to the supplementary node is supplemented to the corresponding position of the message information table; wherein the message information supplementary configuration table is determined according to the message task and message type in the broadcast information;
[0009] If all the message information in the message information table are supplemented, it is determined that the target message information is successfully registered.
[0010] In some embodiments, before issuing broadcast information of message information registration to each supplementation node pre-configured for supplementing message information based on the registration request, the method further includes:
[0011] Performing a validity check on the input parameters of the registration request;
[0012] After determining that the verification is passed, the message information status of the message information table is updated to be supplemented.
[0013] In some embodiments, after publishing broadcast information of message information registration to each supplementary node pre-configured for supplementing message information 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 supplement schedule at preset time intervals;
[0016] Based on the message information supplementation progress table and the message information supplementation configuration table, determining the supplementation nodes for which message information supplementation has not been completed; the message information supplementation progress table is used to record the supplementation progress of each supplementation node;
[0017] A supplement request is sent to a supplement node that has not completed message information supplementation, so that the supplement node performs corresponding message information supplementation upon receiving the supplement request.
[0018] In some embodiments, determining the supplementation node for which message information supplementation has not been completed based on the message supplementation progress table and the message information supplementation configuration table includes:
[0019] Analyzing whether there is any identification information of the target supplement node in the message information supplement configuration table, which is not recorded in the message information supplement schedule table;
[0020] If so, the target supplementary node is determined as the supplementary node for which the message information supplement is not completed.
[0021] In some embodiments, after the supplementary node monitors the broadcast information and determines that the message information supplement configuration table contains the identification information of the supplementary node, before supplementing the message information corresponding to the supplementary node to the corresponding position of the message information table, the method further includes:
[0022] The message information supplement progress table is queried, and it is determined that the supplement progress of the supplement node is not recorded in the message information supplement progress table.
[0023] In some embodiments, after determining that the target message information is successfully registered, the method further includes:
[0024] The message information status of the message information table is updated to be waiting for group reporting.
[0025] In a second aspect, the present application provides a message processing device, the device comprising:
[0026] A generation module, used to generate a registration request for registering target message information based on the message type of the target transaction to be processed and the current message task;
[0027] A publishing module, used for publishing broadcast information of message information registration to each supplementary node pre-configured for supplementing message information based on the registration request, so that each supplementary node performs the following operations after listening to the broadcast information: if it is determined that the message information supplementary 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 of the message information table; wherein the message information supplementary 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 is successfully registered if all message information in the message information table are supplemented.
[0029] In some embodiments, before the publishing module publishes the broadcast information of the message information registration to each supplementing node pre-configured for supplementing the message information based on the registration request, the method further includes:
[0030] A verification module, used to verify the validity of input parameters of the registration request;
[0031] After determining that the verification is passed, the message information status of the message information table is updated to be supplemented.
[0032] In some embodiments, after the publishing module publishes the broadcast information of the message information registration to each supplementing node pre-configured for supplementing the message information based on the registration request, the method further includes:
[0033] A processing module, used for determining a message registration start time based on message information to be supplemented;
[0034] Based on the message registration start time, query the message information supplement schedule at preset time intervals;
[0035] Based on the message information supplementation progress table and the message information supplementation configuration table, determining the supplementation nodes for which message information supplementation has not been completed; the message information supplementation progress table is used to record the supplementation progress of each supplementation node;
[0036] A supplement request is sent to a supplement node that has not completed message information supplementation, so that the supplement node performs corresponding message information supplementation upon receiving the supplement request.
[0037] In some embodiments, the processing module is specifically used to:
[0038] Analyzing whether there is any identification information of the target supplement node in the message information supplement configuration table, which is not recorded in the message information supplement schedule table;
[0039] If so, the target supplementary node is determined as the supplementary node for which the message information supplement is not completed.
[0040] In some embodiments, after the supplementary node monitors the broadcast information and determines that the message information supplement configuration table contains the identification information of the supplementary node, before supplementing the message information corresponding to the supplementary node to the corresponding position of the message information table, the method further includes:
[0041] The message information supplement progress table is queried, and it is determined that the supplement progress of the supplement node is not recorded in the message information supplement progress table.
[0042] In some embodiments, after determining that the target message information is successfully registered, the determining module is further configured to:
[0043] The message information status of the message information table is updated to be waiting for group reporting.
[0044] In a third aspect, the present application provides an electronic device, including:
[0045] A memory for storing program instructions;
[0046] The processor is used to call the program instructions stored in the memory, and execute the steps included in any one of the methods in the first aspect according to the obtained program instructions.
[0047] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes any one of the methods described in the first aspect.
[0048] In a fifth aspect, the present application provides a computer program product, comprising: a computer program code, when the computer program code is run on a computer, the computer executes any one of the methods described in the first aspect.
[0049] In the embodiment of the present application, 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 information registration is issued to each supplementary node pre-configured for supplementing message information, so that each supplementary node performs the following operations after listening to the broadcast message: if it is determined that the message information supplement configuration table contains the identification information of the supplementary node, the message information corresponding to the supplementary node is supplemented to the corresponding position of the message information table; wherein the message information supplement configuration table is determined according to the message task and message type in the broadcast information; if all the message information in the message information table are supplemented, it is determined that the target message information registration is successful. In this way, in the process of message information registration, by issuing a broadcast notification, each supplementary node concurrently supplements the message information, thereby completing the message information registration, effectively improving the processing speed of message information registration and improving the processing efficiency.
[0050] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0052] Figure 1 A schematic diagram of a message processing process provided in an embodiment of the present application;
[0053] Figure 2 A schematic diagram of a framework of a message information registration process in the prior art provided in an embodiment of the present application;
[0054] Figure 3A schematic diagram of a message information registration process provided in an embodiment of the present application;
[0055] Figure 4 A schematic diagram of the structure of a message processing device provided in an embodiment of the present application;
[0056] Figure 5 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0058] The terms "first" and "second" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in the present application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
[0059] The term "module" refers to any known or later 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 is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. 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, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0061] In the technical solution of this application, the acquisition, transmission, storage, and use of data are in compliance with the requirements of relevant national laws and regulations.
[0062] Before introducing the message processing method provided in the embodiment of the present application, in order to facilitate understanding, the technical background of the embodiment of the present application is first introduced in detail below.
[0063] With the prosperity of financial technology and the deepening of financial reform, various financial institutions have started the transformation of intensive operation to improve operational efficiency. For the intensive operation project of bank investment and trading, the transaction links of various types of transactions (such as foreign exchange transactions, borrowing transactions, bond transactions, precious metal transactions, and derivative transactions) involve message interactions with different types of external systems, and also involve request interactions with multiple systems or components within the bank.
[0064] In the prior art, taking foreign exchange transactions as an example, in the construction of the bank's investment and financing intensive operation platform, after receiving the target transaction reached by the foreign exchange trading center, the intensive operation platform needs to perform transaction confirmation and fund settlement processing, and both transaction confirmation and fund settlement require corresponding message information registration. When executing transaction confirmation processing, the transaction confirmation module needs to match the message parameters of the transaction confirmation, generate the message registration request parameters, and call the message registration request application programming interface (Application Programming Interface, API) to process various message parameters, thereby obtaining a transaction confirmation message. However, in the process of processing various message parameters, a synchronous call return mode is usually adopted. This method uses a serial call data supplement logic. Since these calls are made in sequence, each call will block the caller until a response is obtained, and the next call can only be made after one call is completed. The entire processing process may be very time-consuming, resulting in low processing efficiency. The same problem also exists in other transaction types.
[0065] Therefore, in the process of registering message information, the prior art has the problems of slow processing speed and low efficiency.
[0066] In view of this, in order to improve the processing speed and processing efficiency of message information registration, the embodiments of the present application propose a message processing method, device, equipment and medium. Some preferred embodiments of the present application are described below in conjunction with the drawings of the specification.
[0067] Figure 1 A schematic diagram of a message processing process provided for an embodiment of the present application, the process includes the following steps.
[0068] In step 101, a registration request for registering target message information 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 the embodiment of the present application is applied to an electronic device, which may be a personal computer (PC), a server, etc. deployed in an operation system, wherein the operation system may be an intensive operation platform. Intensive operation refers to an operation mode in which financial institutions improve operational efficiency, reduce costs, and enhance competitiveness by integrating resources, optimizing processes, and improving technical means.
[0070] In an embodiment of the present 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 opponent, where the target transaction can be different transaction types such as foreign exchange transactions, repo transactions, bond transactions, precious metal transactions, derivative transactions, etc.
[0071] In specific implementation, different transaction types involve different message tasks. For example, taking foreign currency fund lending transactions as an example, according to different message task types, they can be divided into transaction confirmation tasks, delivery confirmation tasks, clearing tasks and debt collection tasks:
[0072] 1) Transaction confirmation tasks (such as transaction date, interest value date, transaction period, interest rate, interest payment frequency, etc.);
[0073] 2) Delivery confirmation task (confirmation of elements before fund delivery, such as payment amount, payment date, bank number of the receiving account, account number, etc.);
[0074] 3) Clearing tasks (including payment and collection);
[0075] 4) Collection tasks (if the interest payment amount is found to be wrong, send a collection report);
[0076] In specific implementation, each message task corresponds to multiple message types. For example, the message type corresponding to the transaction confirmation task can be: International Funds Clearing System (Society for Worldwide Interbank FinancialTelecommunication, SWIFT) MT103 customer remittance confirmation message, SWIFT MT202 interbank funds transfer confirmation message, SWIFT MT300 foreign exchange trading confirmation message, SWIFT MT320 fixed loan or deposit confirmation message, etc.; the message type corresponding to the delivery confirmation task can be: SWIFT MT535 securities delivery confirmation message, SWIFT MT202 COV interbank funds transfer delivery confirmation message, etc.; the message type corresponding to the clearing task can be: SWIFT MT202 interbank funds transfer clearing confirmation message, SWIFT MT535 securities delivery clearing confirmation message, etc.; the message type corresponding to the collection task can be: SWIFT MT910 message (used for account reconciliation, confirming the account entry status, and can be used to confirm whether the collection is successful), SWIFT MT199 message (used to send collection request or collection notice), etc.
[0077] Taking the target transaction to be processed as a foreign exchange fund lending transaction as an example, when the electronic device in the operation system receives the foreign exchange fund lending transaction (transaction elements are: currency: USD, time limit: 1 year, interest payment frequency: every 3 months, fixed interest rate: 4.8%, principal repayment upon maturity), the message type is determined to be a SWIFT MT320 message, and according to the message task processing flow, it can be determined that the first message task to be performed is the transaction confirmation task, and then a registration request for target message information registration is generated according to the message type, message task and other transaction elements (such as currency, term, interest rate and other detailed information), that is, a registration request for SWIFT MT320 transaction confirmation message registration is generated.
[0078] In specific implementation, after the transaction confirmation is completed, the business personnel will authorize the clearing of the funds delivery flow, and then register the SWIFT MT210 funds settlement message, send it to the account bank, and receive the US dollar funds from the counterparty; when the transaction duration time node enters 3 months, the initiating bank needs to make the first interest payment, register the SWIFT MT320 delivery confirmation message, send it to the counterparty and the counterparty completes the delivery confirmation; after the confirmation is completed, the business personnel will authorize the clearing of the funds delivery flow, register the SWIFT MT202 funds settlement message, and send it to the account bank, and the account bank will transfer the first interest payment funds to the counterparty.
[0079] In step 102, based on the registration request, broadcast information of message information registration is published to each supplementary node pre-configured for message information supplementation, so that each supplementary node performs the following operations 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, the message information corresponding to the supplementary node is supplemented to the corresponding position of 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.
[0080] In specific implementation, before publishing the broadcast information of message information registration to each pre-configured supplementary node for message information supplement based on the registration request, the registration request can also be checked for input parameter legitimacy. This step is to ensure that all necessary input parameters exist and are in the correct format, such as checking whether required fields exist (such as transaction ID, amount, counterparty ID, settlement date, etc.), verifying the data type and format of the field (such as the amount must be numeric and greater than 0, the date format is correct, etc.), checking business rules (such as the amount cannot be negative, the transaction ID must be unique, etc.), and after confirming that the verification is passed, the message information status of the message information table is updated to be supplemented, wherein the message information table is used to supplement the message information, and updating the message information status of the message information table to be supplemented is to subsequently query the supplement status of the message information table whose message information status is to be supplemented.
[0081] In specific implementation, different message types correspond to different message information registration contents. For example, still taking foreign exchange lending transactions as an example, the message information registration contents corresponding to message types under different message tasks are shown in Table 1.
[0082] Table 1
[0083]
[0084]
[0085] In specific implementation, multiple supplementary nodes can be set 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. For example, for each message information registration content shown in Table 1, 10 supplementary nodes can be set, namely supplementary node 1 to supplementary node 10, wherein supplementary node 1 is used to perform legality verification of input parameters, supplementary node 2 is used to supplement foreign currency fund lending transaction information, supplementary node 3 is used to supplement fund delivery information, and so on. Supplementary node 10 is used to supplement anti-money laundering parameter information.
[0086] In actual applications, since the validity of the input parameters needs to be checked before publishing the broadcast information of the message information registration, it is also possible to not set up a supplementary node for the validity check of the input parameters. In this way, the validity check of the input parameters can be performed directly before the broadcast information is released. For those that fail the check, the subsequent message information registration process cannot be carried out, which further improves the processing speed of the message information registration and saves resources.
[0087] In specific implementation, after setting each supplementary node, a corresponding message information supplementary configuration table may be configured according to each message type, wherein the message information supplementary configuration table configures the supplementary nodes required for each message type during message information registration.
[0088] For example, taking the MT320 transaction confirmation message shown in Table 1, supplementary node 1 is used to supplement foreign currency funds borrowing transaction information as an example. The supplementary nodes required to be used in 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 go into details about this.
[0089] In specific implementation, after determining that the legitimacy check of the input parameters of the registration request has passed, the broadcast information of the message information registration can be published to each pre-configured supplementary node, wherein the broadcast information at least includes the message information number, SWIFTMT320 message type, message task and other information, and each supplementary node monitors the broadcast information in real time. When each supplementary node monitors the broadcast information, it performs the following operations: query the corresponding message information supplement configuration table according to the message task and message type in the broadcast information, that is, query the message information supplement configuration table 1 of the SWIFT MT320 transaction confirmation message; if it is determined that the message information supplement configuration table 1 contains the identification information of its own supplementary node, the message information corresponding to the supplementary node is supplemented to the corresponding position of the message information table.
[0090] For example, supplementary node 1 queries message information supplementary configuration table 1 and determines that message information supplementary configuration table 1 contains supplementary node 1, then supplementary node 1 determines that the foreign currency funds borrowing transaction information needs to be supplemented to the SWIFT MT320 transaction confirmation message. If supplementary node 2 queries message information supplementary configuration table 1 and determines that message information supplementary configuration table 1 does not contain supplementary node 2, then supplementary node 2 determines that the funds delivery information does not need to be supplemented to the SWIFT MT320 transaction confirmation message.
[0091] In specific implementation, when supplementary node 1 determines that it is necessary to supplement the foreign currency funds borrowing and lending transaction information to the SWIFT MT320 transaction confirmation message, the query interface of the transaction management can be called according to the message information number to obtain the borrowing and lending transaction information; and the transaction information such as product category, subcategory, transaction date, borrowing currency, interest date, borrowing amount, etc. can be added to the corresponding position of the message information table.
[0092] In specific implementation, when the same supplementary node receives multiple broadcast messages, the received multiple broadcast messages may be sorted according to the receiving time, and placed in the processing queue of the supplementary node in sequence, and then the broadcast messages are processed in sequence.
[0093] For example, when supplementary node 1 is processing broadcast information A, it receives two broadcast messages, namely broadcast information B and broadcast information C, and the receiving time of broadcast information B is earlier than the receiving time of broadcast information C. If sorted by receiving time, broadcast information B will be processed first, that is, after supplementary node 1 processes broadcast information A, it processes broadcast information B and then broadcast information C.
[0094] In actual applications, in order to avoid situations such as the supplementary node not receiving the broadcast information, resulting in incomplete message information registration, and to ensure the integrity of the message information registration, based on the above-mentioned embodiments, in the embodiments of the present application, after publishing the broadcast information of the message information registration to each supplementary node pre-configured for message information supplementation based on the registration request, it is also possible 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 supplement schedule at preset time intervals; based on the message information supplement schedule and the message information supplement configuration table, determine the supplementary nodes that have not completed the message information supplement; send a supplement request to the supplementary node that has not completed the message information supplement, so that the supplementary node performs the corresponding message information supplement when receiving the supplement request.
[0095] During specific implementation, the message information status can be queried for message information to be supplemented, the message registration start time can be determined, and then according to the message registration start time, according to a preset time interval, such as a preset time interval of 10s, the message information supplement schedule can be queried, wherein the message information supplement schedule is used to record the supplement progress of each supplement node, and each supplement node can register the supplement progress of the message information supplement schedule after completing the corresponding message information supplement. For example, the message information supplement schedule can record the identification information of the supplement node, the supplement completion information and the progress registration time, etc. Afterwards, the supplement node that has not completed the message information supplement can be determined according to the message information supplement schedule and the message information supplement configuration table. During specific implementation, it can be analyzed whether there is any identification information of the target supplement node in the message information supplement configuration table that is not recorded in the message information supplement schedule; if so, the target supplement node is determined as the supplement node that has not completed the message information supplement, and finally, a supplement request is sent to the supplement node that has not completed the message information supplement, so that the supplement node performs the corresponding message information supplement when receiving the supplement request.
[0096] In this way, every time the preset time interval is reached, it can be determined whether there is a supplementary node that has not completed the message information supplement according to the message information supplement schedule and the message information supplement configuration table, wherein the supplementary node that has not completed the message information supplement may not complete the message information supplement because the supplementary node has not received the broadcast information, or it may be that the supplementary node is currently processing other supplementary tasks and has not had time to supplement the message information. At this time, in order to avoid the supplementary node that has not completed the message information supplement from being unable to supplement the information normally, a supplement request can be sent to the supplementary node that has not completed the message information supplement, so that the supplementary node performs the corresponding message information supplement when receiving the supplement request. In this way, the integrity of the message information registration can be improved.
[0097] In the specific implementation, it is not avoided that the supplementary node repeatedly supplements the same message information. After monitoring the broadcast information and determining that the message information supplement configuration table contains the identification information of the supplementary node, the message information supplement progress table can be queried to determine whether the supplementary progress of the supplementary node has been recorded in the message information supplement progress table. If it has been recorded, the message information will no longer be supplemented. If it has not been recorded, the message information corresponding to the supplementary node will be supplemented to the corresponding position of the message information table.
[0098] In specific implementation, after the supplementary node listens to the broadcast information and determines that the message information supplement configuration table contains the identification information of the supplementary node, the supplementary node may have completed the corresponding message information supplement according to the supplementary request. Therefore, repeated supplementation is no longer required, which is conducive to saving supplementary node resources and further improving processing efficiency.
[0099] In step 103, if each item of message information in the message information table has been supplemented, it is determined that the target message information is successfully registered.
[0100] During specific implementation, after determining that the target message information has been successfully registered, the message information status of the message information table can also be updated to pending group reporting. After being updated to the pending group reporting status, the process of determining the supplementary node for supplementing the incomplete message information will not be executed according to the preset time interval. After being updated to the pending group reporting status, it is convenient to start the subsequent processing flow of the message, that is, to perform group reporting processing of the message.
[0101] In the embodiment of the present application, 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 information registration is issued to each supplementary node pre-configured for supplementing message information, so that each supplementary node performs the following operations after listening to the broadcast message: if it is determined that the message information supplement configuration table contains the identification information of the supplementary node, the message information corresponding to the supplementary node is supplemented to the corresponding position of the message information table; wherein the message information supplement configuration table is determined according to the message task and message type in the broadcast information; if all the message information in the message information table are supplemented, it is determined that the target message information registration is successful. In this way, in the process of message information registration, by issuing a broadcast notification, each supplementary node concurrently supplements the message information, thereby completing the message information registration, effectively improving the processing speed of message information registration and improving the processing efficiency.
[0102] The following takes the registration process of the SWIFT MT320 foreign exchange funds borrowing and lending transaction confirmation message as an example to introduce the message processing method proposed in this application in detail.
[0103] Figure 2 A framework diagram of a message information registration process in the prior art provided for an embodiment of the present application, wherein the message information registration process is divided into three parts, namely, transaction access processing, transaction confirmation processing and message information registration processing. The above three parts are introduced in detail below.
[0104] Transaction access processing: The centralized operation platform receives foreign currency fund lending transactions, and the transaction elements are: currency: USD, time limit: 1 year, interest payment frequency: every 3 months (quarterly interest payment), fixed interest rate: 4.8%, and principal repayment upon maturity.
[0105] Transaction confirmation processing: Transaction confirmation processing: Match the transaction confirmation parameters of the incoming transaction, obtain the matching result as the SWIFT MT320 transaction confirmation message, organize the SWIFT MT320 message registration request input, and generate a registration request for the SWIFT MT320 message information registration.
[0106] Message information registration processing: Call the message registration request API. After receiving the registration request, the message registration request API completes the following processing:
[0107] 1) Check the legality of the input parameters. If the check passes, the foreign currency fund lending transaction information will be supplemented.
[0108] 2) Supplement foreign currency fund lending transaction information: query transaction management data
[0109] 3) Supplement your own clearing information: Query your own clearing information parameters
[0110] 4) Supplement counterparty information: Query counterparty parameters
[0111] 5) Supplement the unique identification of SWIFT message: Generate the unique identification number of SWIFT
[0112] 6) Supplement message template information: query message template parameters and data acquisition rule parameters
[0113] 7). Supplement the message sending and receiving bank information: fill in the sending and receiving bank information
[0114] 8) Register the message information into the database and return the registration result.
[0115] Depend on Figure 2 It can be seen that the prior art adopts a synchronous call return mode, which calls the message registration API for synchronous processing and returns the result. This method serially calls the data supplement logic, and multiple data need to be queried during the process. The processing speed is slow, and different message types have different data processing logics, many nested branches, and poor readability. When a new business message is registered, the processing logic needs to be analyzed for impact. When the modification points are not fully considered, there is a risk of introducing problems. When new processing branches are added, it cannot be guaranteed that the message registration processing that has been put into production will not be affected, and the scalability is also relatively poor.
[0116] Figure 3 A framework diagram of a message information registration process provided for an embodiment of the present application, wherein, according to the three parts of the message information registration process, transaction access processing, transaction confirmation processing and message information registration processing are respectively introduced in detail below.
[0117] Transaction access processing: The centralized operation platform receives foreign currency fund lending transactions, and the transaction elements are: currency: USD, time limit: 1 year, interest payment frequency: every 3 months (quarterly interest payment), fixed interest rate: 4.8%, and principal repayment upon maturity.
[0118] Transaction confirmation processing: Transaction confirmation processing: Match the transaction confirmation parameters of the incoming transaction, obtain the matching result as the SWIFT MT320 transaction confirmation message, organize the SWIFT MT320 message registration request input, and generate a registration request for the SWIFT MT320 message information registration.
[0119] Message information registration processing: Call the message registration request API. After receiving the registration request, the message registration request API completes the following processing:
[0120] First, the validity of the input parameters is checked. If the check passes, the message information is registered and the message information status of the message information table is updated to be supplemented.
[0121] Then, based on the registration request, the broadcast information of the message information registration is issued to each supplementary node pre-configured for supplementing the message information, wherein the broadcast information at least includes the message information number, SWIFT MT320 message type, message task and other information, and is Figure 3 It can be seen that each supplementary node can receive broadcast information. At this time, when each supplementary node monitors the broadcast information, it performs the following operations: query the corresponding message information supplementary configuration table according to the message task and message type in the broadcast information, that is, query the message information supplementary configuration table of the SWIFT MT320 transaction confirmation message, wherein the message information supplementary configuration table is configured with the supplementary nodes required for the message information registration process of 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 supplemented to the corresponding position of the message information table.
[0122] For example, Supplementary Node 1: used to supplement foreign currency fund borrowing and lending transaction information. After listening to the broadcast information, the SWIFT MT320 message information supplement configuration table can be read from the Redis cache or database to determine whether the current supplementary node needs to be processed, that is, to determine whether the message information supplement configuration table contains the identification information of Supplementary Node 1. If it does, the query interface of the transaction management is called according to the message information number to obtain the borrowing and lending transaction information; and the product category, subcategory, transaction date, borrowing currency, interest date, borrowing amount and other transaction information are supplemented to the corresponding position of the message information table. After the supplement is completed, the supplement progress can also be registered in the message information supplement progress table, for example, the identification information of the supplementary node, the supplement completion information and the progress registration time can be registered.
[0123] By analogy, after other supplementary nodes complete the message information supplementation of the corresponding items, they also register the supplementation progress in the message information supplementation progress table. This application will not go into details about the supplementation process of other supplementary nodes.
[0124] Next, when it is determined that all the message information in the message information table has been supplemented, it is determined that the SWIFT MT320 foreign exchange funds borrowing and lending transaction confirmation message registration is successful. For example, according to the message information supplement schedule table and the message information supplement configuration table, if it is determined that all the supplement nodes in the message information supplement configuration table have completed the supplement progress registration in the message information supplement schedule table, it is determined that all the message information in the message information table has been supplemented. Afterwards, after determining that the registration is successful, the message information status of the message information table is updated to pending report, so as to start the subsequent processing flow of the message.
[0125] Finally, in order to avoid incomplete registration of message information, a re-supplement mechanism is also set up, that is, based on the message information to be supplemented, the message registration start time is determined; based on the message registration start time, at a preset time interval, such as 10s, the message information supplement schedule is queried, and based on the message information supplement schedule and the message information supplement configuration table, the supplement node that has not completed the message information supplement is determined; for example, it is analyzed whether there is any identification information of the target supplement node in the message information supplement configuration table that has not been recorded in the message information supplement schedule; if so, the target supplement node is determined as the supplement node that has not completed the message information supplement, and then a supplement request is sent to the supplement node that has not completed the message information supplement, so that the supplement node performs the corresponding message information supplement when receiving the supplement request.
[0126] In the embodiment of the present application, when registering message information, message information supplement is processed concurrently by publishing broadcast information, which can greatly improve processing efficiency. When registering message information, different supplementary nodes can be inherited or expanded, and the configuration of the supplementary nodes can be quickly completed through the message information supplement configuration table. The readability and scalability are good. 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 the previous message information registration, which further improves development efficiency.
[0127] Based on the same inventive concept, the present application embodiment provides a message processing device, please refer to Figure 4 , the device comprises:
[0128] A generating module 401 is used to generate a registration request for registering target message information based on the message type of the target transaction to be processed and the current message task;
[0129] The publishing module 402 is used to publish the broadcast information of the message information registration to each supplementary node pre-configured for supplementing the message information based on the registration request, so that each of the supplementary nodes performs the following operations after listening to the broadcast information: if it is determined that the message information supplement configuration table contains the identification information of the supplementary node, the message information corresponding to the supplementary node is supplemented to the corresponding position of the message information table; wherein the message information supplement configuration table is determined according to the message task and the message type in the broadcast information;
[0130] The determination module 403 is used to determine that the target message information is successfully registered if all message information in the message information table are supplemented.
[0131] In some embodiments, before the publishing module 402 publishes the broadcast information of the message information registration to each supplementary node pre-configured for supplementing the message information based on the registration request, the method further includes:
[0132] Verification module 404, used to verify the validity of input parameters of the registration request;
[0133] After determining that the verification is passed, the message information status of the message information table is updated to be supplemented.
[0134] In some embodiments, after the publishing module 402 publishes the broadcast information of the message information registration to each supplementing node pre-configured for supplementing the message information based on the registration request, the method further includes:
[0135] Processing module 405, used to determine the message registration start time based on the message information to be supplemented;
[0136] Based on the message registration start time, query the message information supplement schedule at preset time intervals;
[0137] Based on the message information supplementation progress table and the message information supplementation configuration table, determining the supplementation nodes for which message information supplementation has not been completed; the message information supplementation progress table is used to record the supplementation progress of each supplementation node;
[0138] A supplement request is sent to a supplement node that has not completed message information supplementation, so that the supplement node performs corresponding message information supplementation upon receiving the supplement request.
[0139] In some embodiments, the processing module 405 is specifically used to:
[0140] Analyzing whether there is any identification information of the target supplement node in the message information supplement configuration table, which is not recorded in the message information supplement schedule table;
[0141] If so, the target supplementary node is determined as the supplementary node for which the message information supplement is not completed.
[0142] In some embodiments, after the supplementary node monitors the broadcast information and determines that the message information supplement configuration table contains the identification information of the supplementary node, before supplementing the message information corresponding to the supplementary node to the corresponding position of the message information table, the method further includes:
[0143] The message information supplement progress table is queried, and it is determined that the supplement progress of the supplement node is not recorded in the message information supplement progress table.
[0144] In some embodiments, after determining that the target message information is successfully registered, the determining module 403 is further configured to:
[0145] The message information status of the message information table is updated to be waiting for group reporting.
[0146] Based on the same inventive concept, the embodiment of the present application provides an electronic device, which can implement the message processing function discussed above, please refer to Figure 5 , the device includes a memory 501 , one or more processors 502 , and a bus 503 .
[0147] The memory 501 is used to store computer programs executed by the processor 501. The memory 501 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0148] The memory 501 may be a volatile memory, such as a random-access memory (RAM); the memory 501 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 501 may be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 501 may be a combination of the above memories.
[0149] The processor 502 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 502 is used to implement the message processing method in the above embodiment when calling the computer program stored in the memory 502 .
[0150] The specific connection medium between the memory 501 and the processor 502 is not limited in the embodiment of the present application. Figure 5 In the embodiment, the memory 501 and the processor 502 are connected via a bus 503. The bus 503 is connected to the processor 502 via a bus 503. Figure 5 The connections between other components are shown in bold lines, and are not intended to be limiting. Bus 503 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0151] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, and a computer program product includes: a computer program code, when the computer program code is run on a computer, the computer executes any of the message processing methods discussed above. Since the principle of solving the problem by the above-mentioned computer-readable storage medium is similar to that of the message processing method, the implementation of the above-mentioned computer-readable storage medium can refer to the implementation of the method, and the repeated parts will not be repeated.
[0152] Based on the same inventive concept, the embodiment of the present application also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes any of the message processing methods discussed above. Since the principle of solving the problem by the above computer program product is similar to that of the message processing method, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.
[0153] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0154] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0155] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0156] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of user-operated steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0157] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A message processing method, characterized in that: include: Generate a registration request for target message information registration based on the message type of the target transaction to be processed and the current message task; Based on the registration request, broadcast information of message information registration is issued to each supplementary node pre-configured for supplementing message information, so that each supplementary node performs the following operations after listening to the broadcast information: if it is determined that the message information supplementary configuration table contains the identification information of the supplementary node, the message information corresponding to the supplementary node is supplemented to the corresponding position of the message information table; wherein the message information supplementary configuration table is determined according to the message task and message type in the broadcast information; If all the message information in the message information table are supplemented, it is determined that the target message information is successfully registered.
2. The method according to claim 1, characterized in that Before issuing broadcast information of message information registration to each supplementary node pre-configured for supplementing message information based on the registration request, the method further includes: Performing a validity check on the input parameters of the registration request; After determining that the verification is passed, the message information status of the message information table is updated to be supplemented.
3. The method according to claim 2, characterized in that After issuing broadcast information of message information registration to each supplementary node pre-configured for supplementing message information 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 supplement schedule at preset time intervals; Based on the message information supplementation progress table and the message information supplementation configuration table, determining the supplementation nodes for which message information supplementation has not been completed; the message information supplementation progress table is used to record the supplementation progress of each supplementation node; A supplement request is sent to a supplement node that has not completed message information supplementation, so that the supplement node performs corresponding message information supplementation upon receiving the supplement request.
4. The method according to claim 3, characterized in that The determining, based on the message supplementation schedule and the message information supplementation configuration table, a supplementation node for which message information supplementation has not been completed, comprises: Analyzing whether there is any identification information of the target supplement node in the message information supplement configuration table, which is not recorded in the message information supplement schedule table; If so, the target supplementary node is determined as the supplementary node for which the message information supplement is not completed.
5. The method according to claim 3, characterized in that After the supplementary node monitors the broadcast information and determines that the message information supplement configuration table contains the identification information of the supplementary node, before supplementing the message information corresponding to the supplementary node to the corresponding position of the message information table, the method further includes: The message information supplement progress table is queried, and it is determined that the supplement progress of the supplement node is not recorded in the message information supplement progress table.
6. The method according to any one of claims 1 to 5, characterized in that: After determining that the target message information is successfully registered, the method further includes: The message information status of the message information table is updated to be waiting for group reporting.
7. A message processing device, characterized in that: include: A generation module, used to generate a registration request for registering target message information based on the message type of the target transaction to be processed and the current message task; A publishing module, used for publishing broadcast information of message information registration to each supplementary node pre-configured for supplementing message information based on the registration request, so that each supplementary node performs the following operations after listening to the broadcast information: if it is determined that the message information supplementary 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 of the message information table; wherein the message information supplementary 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 is successfully registered if all message information in the message information table are supplemented.
8. The device according to claim 7, characterized in that Before the publishing module publishes the broadcast information of the message information registration to each supplementary node pre-configured for supplementing the message information based on the registration request, the method further includes: A verification module, used to verify the legitimacy of input parameters of the registration request; After determining that the verification is passed, the message information status of the message information table is updated to be supplemented.
9. The device according to claim 8, characterized in that After the publishing module publishes the broadcast information of the message information registration to each supplementary node pre-configured for supplementing the message information based on the registration request, the method further includes: A processing module, used for determining a message registration start time based on message information to be supplemented; Based on the message registration start time, query the message information supplement schedule at preset time intervals; Based on the message information supplementation progress table and the message information supplementation configuration table, determining the supplementation nodes for which message information supplementation has not been completed; the message information supplementation progress table is used to record the supplementation progress of each supplementation node; A supplement request is sent to a supplement node that has not completed message information supplementation, so that the supplement node performs corresponding message information supplementation upon receiving the supplement request.
10. The device according to claim 9, characterized in that The processing module is specifically used for: Analyzing whether there is any identification information of the target supplement node in the message information supplement configuration table, which is not recorded in the message information supplement schedule table; If so, the target supplementary node is determined as the supplementary node for which the message information supplement is not completed.
11. The device according to claim 9, characterized in that After the supplementary node monitors the broadcast information and determines that the message information supplement configuration table contains the identification information of the supplementary node, before supplementing the message information corresponding to the supplementary node to the corresponding position of the message information table, the method further includes: The message information supplement progress table is queried, and it is determined that the supplement progress of the supplement node is not recorded in the message information supplement progress table.
12. The device according to any one of claims 7 to 11, characterized in that: After determining that the target message information is successfully registered, the determining module is further used to: The message information status of the message information table is updated to be waiting for group reporting.
13. An electronic device, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the steps included in any one of claims 1-6 according to the obtained program instructions.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method according to any one of claims 1 to 6.
15. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Communication method and device, and storage medium
CN116615920A
Transaction method based on smart contract, POS machine and transaction system
CN117011052A
Transaction broadcasting method, and device and storage medium
WO2021196768A1