A method, apparatus, equipment and medium for delivery pre-processing

By preprocessing the bond transaction settlement and clearing system, transaction information with the same settlement date and custodian bank is grouped to generate messages, and contract identifiers and version numbers are compared, the problems of message redundancy and omissions in the database are solved, and the efficiency and accuracy of settlement and clearing are improved.

CN119784499BActive Publication Date: 2026-01-06CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411933001.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2026-01-06
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

In existing technologies, bond transaction settlement and clearing systems require the generation of a separate message for each transaction, resulting in redundant message data in the database. This increases the risk of missing messages and consequently increases the likelihood of errors in settlement and clearing tasks.

Method used

By grouping transaction information with the same settlement date and the same custodian bank, corresponding cash and bond settlement messages are generated. Before saving to the database, the contract identification information and version number are checked to ensure the uniqueness and consistency of the data and reduce the generation of duplicate messages.

Benefits of technology

This effectively reduces the number of messages in the database, lowers the risk of missing messages in the system, improves the efficiency and accuracy of settlement and clearing, and avoids problems such as duplicate sending and data redundancy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784499B_ABST
    Figure CN119784499B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of financial technology, and in particular to a delivery preprocessing method and device, equipment and a medium. First transaction information with the same delivery date and the same custodian bank is taken as a first transaction information group; a corresponding first cash delivery message is generated based on each first transaction information group; second transaction information with the same delivery date and the same custodian bank is taken as a second transaction information group; a corresponding first bond delivery message is generated based on each second transaction information group; and the first cash delivery message and the first bond delivery message, and contract identification information, are correspondingly stored in a database. According to the same delivery date and the same custodian bank, each piece of first transaction information of cash is grouped, each piece of second transaction information of bonds is grouped, and one message is generated based on the data of each group, so that the number of messages in the database is greatly reduced, the risk of missing messages obtained by the system is reduced, and the risk of delivery clearing tasks is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of financial technology, and in particular to a method, apparatus, equipment and medium for delivery preprocessing. Background Technology

[0002] For bond trading in the financial market, existing systems retrieve the corresponding settlement and clearing task messages from the database during settlement and clearing, and then use these messages for clearing. However, in current technology, a separate message needs to be generated for each transaction, resulting in redundant message data in the database and increasing the risk of settlement and clearing tasks failing due to missing messages. Therefore, this traditional settlement and clearing system urgently needs optimization and upgrading to reduce the risks associated with settlement and clearing tasks. Summary of the Invention

[0003] This application provides a method, apparatus, device, and medium for settlement preprocessing, which solves the problem that generating a message for each transaction leads to redundant message data in the database and increases the risk of settlement and clearing tasks failing due to missing messages in the system.

[0004] In a first aspect, this application provides a method for delivery preprocessing, the method comprising:

[0005] Obtain the contract to be settled for any account, extract the contract identification information of the contract, and the first transaction information of each cash and the second transaction information of each bond in the contract;

[0006] The first transaction information with the same settlement date and the same custodian bank is grouped into a first transaction information group; a corresponding first cash settlement message is generated based on each first transaction information group.

[0007] Secondary transaction information with the same settlement date and the same custodian bank is grouped into secondary transaction information groups; a corresponding primary bond settlement message is generated based on each secondary transaction information group.

[0008] The first cash settlement message and the first bond settlement message, along with the contract identification information, are saved to the database.

[0009] In one possible implementation, before saving the first cash settlement message and the first bond settlement message, along with the contract identification information, to the database, the method further includes:

[0010] Determine whether the database contains a message corresponding to the contract identification information. If not, perform the process of saving the first cash settlement message, the first bond settlement message, and the corresponding contract identification information to the database.

[0011] In one possible implementation, if the database stores a message corresponding to the contract identifier information, the method further includes:

[0012] If the database contains a message identical to either the first cash settlement message or the first bond settlement message, then discard the identical message in the first cash settlement message and the first bond settlement message.

[0013] Saving the first cash settlement message and the first bond settlement message, along with the contract identification information, to the database includes:

[0014] The undiscarded messages in the first cash settlement message and the first bond settlement message, along with the contract identification information, are saved to the database. The undiscarded messages are then used to replace the previously saved messages in the database that are different from the first cash settlement message and the first bond settlement message.

[0015] In one possible implementation, the process of determining whether the database contains a message identical to the first cash settlement message or the first bond settlement message includes:

[0016] Extract the first version number and transaction element information contained in the first settlement message; generate a first key based on the transaction element information;

[0017] Determine whether the database contains a second version number and a second key that correspond to the first version number and the first key of a second delivery message.

[0018] In one possible implementation, the information on the cash transaction elements includes at least one of the following: counterparty, cash settlement date, clearing currency, first custodian bank, clearing amount, and first transaction type.

[0019] In one possible implementation, the information on the bond trading elements includes at least one of the following: bond face value, second type of transaction, counterparty, clearing currency, second custodian bank, bond settlement date, bond code, and bond quantity.

[0020] In one possible implementation, before saving the first cash settlement message and the first bond settlement message, along with the contract identification information, to the database, the method further includes:

[0021] Determine whether the settlement dates carried in the first cash settlement message and the first bond settlement message are consistent;

[0022] If so, then proceed with the process of saving the first cash settlement message, the first bond settlement message, and the contract identification information to the database.

[0023] In one possible implementation, the method further includes:

[0024] If the settlement dates carried in the first cash settlement message and the first bond settlement message are inconsistent, then the first cash settlement message and the contract identification information are saved to the database accordingly, and the first bond settlement message and the contract identification information are saved to the database accordingly.

[0025] In one possible implementation, generating a corresponding first cash settlement message based on each first transaction information group includes:

[0026] Extract the target payment type for settlement processing in the contract; wherein, the target payment type includes one of large-amount local currency payment, overseas local currency payment, and foreign currency payment;

[0027] Obtain the target transaction type corresponding to each first transaction information group; wherein, the target transaction type includes a receiving transaction or a payment transaction;

[0028] Based on the pre-saved correspondence between payment type and transaction type and cash message template, determine the target payment type and the target transaction type, and the corresponding target cash message template.

[0029] Based on each first transaction information group and the target cash message template, a corresponding first cash settlement message is generated.

[0030] In one possible implementation, generating a corresponding first bond settlement message based on each second transaction information group includes:

[0031] Based on each second transaction information group and a pre-saved bond message template, a corresponding first bond settlement message is generated.

[0032] Secondly, this application provides an apparatus for delivery pre-processing, the apparatus comprising:

[0033] The acquisition module is used to acquire the contracts to be settled for any account, extract the contract identification information of the contract, and the first transaction information of each cash and the second transaction information of each bond in the contract;

[0034] The processing module is used to group first transaction information with the same settlement date and the same custodian bank into a first transaction information group; generate a corresponding first cash settlement message based on each first transaction information group; group second transaction information with the same settlement date and the same custodian bank into a second transaction information group; generate a corresponding first bond settlement message based on each second transaction information group; and save the first cash settlement message, the first bond settlement message, and the contract identification information to the database.

[0035] In one possible implementation, the device further includes a determination module;

[0036] The judgment module is used to determine whether the database contains a message corresponding to the contract identification information before saving the first cash settlement message, the first bond settlement message, and the contract identification information to the database.

[0037] The processing module is further configured to, if not, perform the process of saving the first cash settlement message and the first bond settlement message, as well as the contract identification information, to the database.

[0038] In one possible implementation, the processing module is further configured to discard identical messages in the first cash settlement message and the first bond settlement message if the database contains such messages; saving the first cash settlement message, the first bond settlement message, and the contract identification information to the database includes: saving the messages in the first cash settlement message and the first bond settlement message that were not discarded, along with the contract identification information, to the database, and replacing previously stored messages in the database that are different from the first cash settlement message and the first bond settlement message with the messages that were not discarded.

[0039] In one possible implementation, the processing module is specifically used to extract information about a first version number and transaction elements contained in the first settlement message; and to generate a first key based on the information about the transaction elements.

[0040] The judgment module is specifically used to determine whether there exists a second version number and a second key of the second delivery message in the database that correspond to the same as the first version number and the first key.

[0041] In one possible implementation, the information on the cash transaction elements includes at least one of the following: counterparty, cash settlement date, clearing currency, first custodian bank, clearing amount, and first transaction type.

[0042] In one possible implementation, the information on the bond trading elements includes at least one of the following: bond face value, second type of transaction, counterparty, clearing currency, second custodian bank, bond settlement date, bond code, and bond quantity.

[0043] In one possible implementation, the judgment module is further configured to determine whether the settlement dates carried in the first cash settlement message and the first bond settlement message are consistent before the first cash settlement message and the first bond settlement message, as well as the contract identification information, are saved to the database.

[0044] The processing module is further configured to, if so, perform the subsequent process of saving the first cash settlement message and the first bond settlement message, as well as the contract identification information, to the database.

[0045] In one possible implementation, the processing module is further configured to, if the settlement dates carried in the first cash settlement message and the first bond settlement message are inconsistent, save the first cash settlement message and the contract identification information to the database accordingly, and save the first bond settlement message and the contract identification information to the database accordingly.

[0046] In one possible implementation, the acquisition module is specifically used to extract the target payment type for settlement processing in the contract; wherein the target payment type includes one of large-amount local currency payment, overseas local currency payment, and foreign currency payment; and to acquire the target transaction type corresponding to each first transaction information group; wherein the target transaction type includes a receiving transaction or a payment transaction.

[0047] The processing module is specifically used to determine the target cash message template corresponding to the target payment type and the target transaction type based on the pre-saved correspondence between payment type and transaction type and cash message template; and to generate a corresponding first cash settlement message based on each first transaction information group and the target cash message template.

[0048] In one possible implementation, the processing module is specifically used to generate a corresponding first bond settlement message based on each second transaction information group and a pre-saved bond message template.

[0049] Thirdly, this application provides an electronic device that includes at least a processor and a memory, wherein the processor is configured to implement the method as described in any of the first aspects when executing a computer program stored in the memory.

[0050] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method as described in any of the first aspects.

[0051] 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 as described in any of the first aspects.

[0052] In this embodiment, through preprocessing, first transaction information with the same settlement date and the same custodian bank is grouped into a first transaction information group; a corresponding first cash settlement message is generated based on each first transaction information group; second transaction information with the same settlement date and the same custodian bank is grouped into a second transaction information group; a corresponding first bond settlement message is generated based on each second transaction information group; and the first cash settlement message, the first bond settlement message, and the contract identification information are saved to the database. Grouping the first cash transaction information and the second bond transaction information according to the same settlement date and the same custodian bank, and generating a message based on each group, greatly reduces the number of messages in the database, lowers the risk of message omissions in the system, and thus reduces the risk of settlement and clearing tasks. Furthermore, saving the first cash settlement message, the first bond settlement message, and the contract identification information to the database allows for simultaneous retrieval of both cash and bond settlement messages during settlement and clearing, which is more convenient and faster than only allowing settlement and clearing of cash or bonds. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 This application provides a schematic diagram of a delivery preprocessing procedure.

[0055] Figure 2 A simplified schematic diagram illustrating the message storage process in the case of a newly added contract, provided as an embodiment of this application;

[0056] Figure 3 A simplified schematic diagram illustrating the process of storing messages for modifying a contract when the contract is stored in a database, as provided in an embodiment of this application.

[0057] Figure 4 A schematic diagram illustrating a specific process for determining whether a second cash settlement message identical to a first cash settlement message exists in the database, provided for the implementation of this application;

[0058] Figure 5 A schematic diagram illustrating a specific process for determining whether a second bond settlement message identical to a first bond settlement message exists in the database, provided for the implementation of this application;

[0059] Figure 6A schematic diagram illustrating a specific process of associated delivery messages provided in an embodiment of this application;

[0060] Figure 7 A schematic diagram illustrating the specific process of generating a first cash settlement message in an embodiment of this application;

[0061] Figure 8 A schematic diagram illustrating the specific process of generating a first bond settlement message in an embodiment of this application;

[0062] Figure 9 A schematic diagram illustrating the specific process of selecting a template for a first cash settlement message and generating a corresponding message, provided for an embodiment of this application;

[0063] Figure 10 A schematic diagram illustrating a set of pre-saved templates provided in an embodiment of this application;

[0064] Figure 11 A schematic diagram illustrating the process of comparing a new version of planned cash flow with an old version, provided for an embodiment of this application;

[0065] Figure 12 A schematic diagram of a delivery pre-processing apparatus provided in an embodiment of this application;

[0066] Figure 13 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of this application clearer, a further detailed description of this application will be provided below with reference to the accompanying drawings. Obviously, the embodiments described in this application are merely some embodiments, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0068] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.

[0069] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.

[0070] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.

[0071] 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.

[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0073] 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.

[0074] The acquisition, transmission, storage, and use of data in this application all comply with the requirements of relevant national laws and regulations.

[0075] Before introducing the delivery preprocessing method provided in the embodiments of this application, for ease of understanding, some terms involved in the embodiments of this application will be explained below.

[0076] Clearing path: refers to the bond transaction path, indicating the route by which the trading parties transfer the bonds to the counterparty.

[0077] Spot bond trading involves paying funds to receive bonds or receiving funds to pay bonds.

[0078] Bond repurchase is the exchange of funds for bonds, with the bonds being exchanged for funds again upon maturity in the future.

[0079] Bond lending involves exchanging bonds for bonds and paying borrowing fees.

[0080] This application proposes a method, apparatus, device, and medium for settlement preprocessing. Through preprocessing, first transaction information with the same settlement date and the same custodian bank is grouped into a first transaction information group; a corresponding first cash settlement message is generated based on each first transaction information group; second transaction information with the same settlement date and the same custodian bank is grouped into a second transaction information group; a corresponding first bond settlement message is generated based on each second transaction information group; the first cash settlement message and the first bond settlement message, along with contract identification information, are saved to a database. By grouping the first cash transaction information and the second bond transaction information according to the same settlement date and the same custodian bank, and generating a message based on each group, the number of messages in the database is greatly reduced, lowering the risk of message omissions in the system and thus reducing the risk of settlement and clearing tasks. In addition, by storing the first cash settlement message and the first bond settlement message, along with the contract identification information, in the database, both cash settlement messages and bond settlement messages can be obtained simultaneously during settlement and clearing. This is more convenient and faster than the previous method, which only allowed settlement and clearing of cash or bonds.

[0081] Example 1:

[0082] Figure 1 This application provides a schematic diagram of a delivery preprocessing procedure, as shown in the embodiment of the present application. Figure 1 As shown, the process includes the following steps:

[0083] S101: Obtain the contract to be settled for any account, extract the contract identification information of the contract, and the first transaction information of each cash and the second transaction information of each bond in the contract.

[0084] The delivery preprocessing method provided in this application is applied to an electronic device, which may be a computer (PC), server, etc.

[0085] An account is a document opened by a customer at a bank to handle daily transfer settlements, cash receipts and payments, and other related business.

[0086] Contracts pending settlement can be of different types, such as spot bond trading, bond lending, and bond repurchase agreements.

[0087] Contracts awaiting settlement include contract identification information and transaction information. The contract identification information can be a contract code or contract number. The transaction information includes the transaction scenario, contract number, planned flow number, counterparty, transaction date, settlement date, bond code, bond quantity, planned bond flow type, settlement currency, settlement amount, planned cash flow type, custodian bank, and other transaction details. A single contract may contain multiple cash transactions and multiple bond transactions. This can be understood as the combination of multiple cash transactions under the same contract forming a planned cash flow, and the combination of multiple bond transactions under the same contract forming a planned bond flow.

[0088] Once a contract for settlement is obtained for any account, the transaction information within the contract is used to obtain the first transaction information for each cash transaction and the second transaction information for each bond transaction. The first transaction information for each cash transaction includes the transaction scenario, planned flow number, counterparty, transaction date, settlement date, settlement amount, settlement currency, planned cash flow type, and custodian bank. The second transaction information for each bond transaction includes the transaction scenario, planned flow number, counterparty, transaction date, settlement date, bond code, bond quantity, planned bond flow type, and custodian bank. The transaction scenarios include cash flow from bond trading, bond flow from bond trading, bond repurchase - beginning-of-period cash flow, bond repurchase - beginning-of-period bond flow, bond repurchase - ending-of-period cash flow, bond repurchase - ending-of-period bond flow, bond lending - beginning-of-period target, bond lending - beginning-of-period collateral, bond lending - ending-of-period target, bond lending - ending-of-period collateral, etc.; the planned cash flow types include principal, interest, and borrowing fees; the planned bond flow types include pledged freezing, pledged unfreezing, first transaction, and maturity transaction.

[0089] S102: Take the first transaction information with the same settlement date and the same custodian bank as the first transaction information group; generate the corresponding first cash settlement message based on each first transaction information group.

[0090] For each cash transaction in the contract, the first transaction information of cash transactions with the same settlement date and the same custodian bank is grouped together as a first transaction information group. In other words, the first transaction information of each cash transaction in the planned cash flow is grouped according to the settlement date and custodian bank to determine multiple settlement cash flows, i.e., multiple first transaction information groups.

[0091] Each contract has at least one first transaction information group. Each first transaction information group is input into a pre-set cash message template to generate a corresponding first cash settlement message. Therefore, there is at least one first cash settlement message in the same contract. Each first cash settlement message contains at least one cash transaction information.

[0092] S103: Take the second transaction information with the same delivery date and the same custodian bank as the second transaction information group; generate the corresponding first bond delivery message based on each second transaction information group.

[0093] For each bond in the contract, the second transaction information is grouped together for bonds with the same settlement date and the same custodian bank, forming a single bond transaction information group. In other words, the second transaction information for each bond in the planned bond flow is grouped according to the settlement date and custodian bank to determine multiple sets of settlement bond flows, i.e., multiple sets of second transaction information groups.

[0094] Each contract has at least one first transaction information group. Each first transaction information group is input into a pre-set bond message template to generate a corresponding first bond settlement message. Therefore, each contract has at least one first bond settlement message. Each first bond settlement message contains at least one bond's first transaction information. The transaction information group includes the contract number, settlement flow number, counterparty, settlement date, settlement currency, settlement amount, settlement cash flow type, bond code, bond quantity, and settlement bond flow type, among other transaction information.

[0095] S104: Save the first cash settlement message and the first bond settlement message, along with the corresponding contract identification information, to the database.

[0096] The first cash settlement message and the first bond settlement message, along with the contract identification information, are saved to the database. Specifically, this can be divided into saving the contract identification information and the first cash settlement message as a set of correspondences to the database, saving the contract identification information and the first bond settlement message as a set of correspondences to the database, and saving the contract identification information, the first cash settlement message, and the first bond settlement message as a set of correspondences to the database.

[0097] After obtaining the contracts to be settled, clearing instructions are generated according to the registration. The clearing tasks include clearing tasks for planned cash flows and clearing tasks for planned bond flows. The clearing instructions include clearing instructions for settlement cash flows and clearing instructions for settlement bond flows. That is, based on the first transaction information for each cash transaction and the second transaction information for each bond transaction in the contract, clearing instructions for settlement cash flows and settlement bond flows are generated for settlement. Based on these clearing instructions, a first cash settlement message and a first bond settlement message are generated respectively. The first cash settlement message contains information from the first transaction information group, and the first bond settlement message contains information from the second transaction information group.

[0098] Figure 2 This application provides a simplified schematic diagram illustrating the message storage process in the case of a newly added contract, as shown in the embodiments of this application. Figure 2 As shown, after a new contract is added, liquidation instructions are generated based on the registered liquidation tasks. Liquidation tasks include liquidation tasks for planned cash flows and liquidation tasks for planned bond flows. Liquidation instructions include liquidation instructions for settlement cash flows and liquidation instructions for settlement bond flows. Different liquidation paths are associated with different liquidation tasks. Settlement cash flows and settlement bond flows are then processed together.

[0099] For new additions, the cash flow and bond flow of the batches that need to be settled will be linked. During settlement, the cash flow and bond flow of the corresponding batch of the contract can be quickly located. In other words, when the first cash settlement message and the first bond settlement message are saved, the corresponding first cash settlement message and the first bond settlement message are saved in a set of data.

[0100] In this embodiment, through preprocessing, first transaction information with the same settlement date and the same custodian bank is grouped into a first transaction information group; a corresponding first cash settlement message is generated based on each first transaction information group; second transaction information with the same settlement date and the same custodian bank is grouped into a second transaction information group; a corresponding first bond settlement message is generated based on each second transaction information group; and the first cash settlement message, the first bond settlement message, and the contract identification information are saved to the database. Grouping the first cash transaction information and the second bond transaction information according to the same settlement date and the same custodian bank, and generating a message based on each group, greatly reduces the number of messages in the database, lowers the risk of message omissions in the system, and thus reduces the risk of settlement and clearing tasks. Furthermore, saving the first cash settlement message, the first bond settlement message, and the contract identification information to the database allows for simultaneous retrieval of both cash and bond settlement messages during settlement and clearing, which is more convenient and faster than only allowing settlement and clearing of cash or bonds.

[0101] Example 2:

[0102] To avoid data redundancy in the database, this embodiment of the application checks whether the relevant information for the contract already exists in the database before saving the first cash settlement message, the first bond settlement message, and the contract identification information to the database, thus preventing duplicate data. Specifically, it determines whether the database contains the message corresponding to the contract identification information; if not, it proceeds to save the first cash settlement message, the first bond settlement message, and the contract identification information to the database.

[0103] Before saving the first cash settlement message and the first bond settlement message, along with the corresponding contract identification information, to the database, it is determined whether the database already contains the cash settlement message or the bond settlement message corresponding to the contract identification information. If neither is present, it proves that the database does not contain the message corresponding to the contract identification information. In this case, the first cash settlement message and the first bond settlement message generated in step 102, along with the corresponding contract identification information, can be directly saved to the database.

[0104] In one possible implementation, before saving the first cash settlement message and the first bond settlement message, along with the contract identification information, to the database, it can be determined whether the database contains the contract identification information. If not, it means that the contract is a new contract and the database does not contain information about the contract. In this case, the first cash settlement message and the first bond settlement message generated in step 102, along with the contract identification information, can be saved to the database.

[0105] Figure 3 A simplified schematic diagram illustrating the process of storing messages for contract modification when the contract is stored in a database, as provided in this application embodiment. Figure 5 As shown, after modifying the contract access, the generated settlement tasks include settlement tasks for planned cash flows and settlement tasks for planned bond flows, each associated with a different settlement path. Comparing the old and new settlement tasks, for changed planned cash flows or planned bond flows, the old settlement cash flows or settlement bond flows are first invalidated. Then, new settlement cash flows or settlement bond flows are generated based on the modified contract information, and the association processing of settlement cash flows and settlement bond flows is re-performed. Subsequent settlement is processed according to the newly associated settlement flows. In other words, before saving the first cash settlement message and the first bond settlement message, along with the corresponding contract identification information, to the database, the first cash settlement message and the first bond settlement message in a single record in the database must be deleted, and the newly generated first cash settlement message or first bond settlement message is saved in a set of data.

[0106] In the application embodiment, by determining whether the database contains the message corresponding to the contract identification information, if not, the first cash settlement message and the first bond settlement message, along with the corresponding contract identification information, are saved to the database, thereby ensuring the integrity of the data in the database.

[0107] Example 3:

[0108] Based on the above embodiments, this embodiment provides an explanation of the situation where the database contains messages corresponding to contract identifier information.

[0109] If the database stores messages corresponding to contract identifier information, the method further includes:

[0110] If the database contains a message identical to either the first cash settlement message or the first bond settlement message, then discard the identical message from the first cash settlement message or the first bond settlement message.

[0111] The first cash settlement message and the first bond settlement message, along with the corresponding contract identification information, are saved to the database, including:

[0112] The undiscarded messages in the first cash settlement message and the first bond settlement message, along with the corresponding contract identification information, are saved to the database. The undiscarded messages are then used to replace the previously saved messages in the database that are different from the first cash settlement message and the first bond settlement message.

[0113] Based on the contract identification information, retrieve all messages stored in the database, including all corresponding second cash settlement messages and second bond settlement messages.

[0114] In one possible implementation, the first cash settlement message may be compared with all messages in the obtained database to determine whether the database contains a message identical to the first cash settlement message; the first bond settlement message may be compared with all messages in the obtained database to determine whether the database contains a message identical to the first bond settlement message.

[0115] In one possible implementation, the first cash settlement message can be compared with all second cash settlement messages to determine whether the database contains a second cash settlement message that is identical to the first cash settlement message; the first bond settlement message can be compared with all second bond settlement messages to determine whether the database contains a second bond settlement message that is identical to the first bond settlement message.

[0116] If a second cash settlement message exists that is identical to the first cash settlement message, the first cash settlement message shall be discarded; if a second bond settlement message exists that is identical to the first bond settlement message, the first bond settlement message shall be discarded.

[0117] The undiscarded messages in the first cash settlement message and the first bond settlement message, along with the corresponding contract identification information, are saved to the database. The undiscarded messages are then used to replace the previously saved messages in the database that are different from the first cash settlement message and the first bond settlement message.

[0118] In this application, transaction information groups are input into a message template, and a first settlement message is generated accordingly. Therefore, if the transaction information in a certain transaction information group remains unchanged, the generated first settlement message is the same as the second settlement message already saved in the database; if the transaction information in a certain transaction information group changes, the generated first settlement message is different from the second settlement message already saved in the database.

[0119] For example, contract A is marked with a version number in the database. The initial version number of contract A is 1, and the initial version contains messages 1, 2, and 3. If the transaction information in the transaction information group corresponding to message 2 changes, but the transaction information in the transaction information groups corresponding to messages 1 and 3 remains unchanged, a new version of contract A is obtained. The new version number of contract A is 2, and the corresponding generated messages are messages a, b, and c. Since only the transaction information in the transaction information group corresponding to message 2 changes, message 1 of contract A with version number 1 and message a of contract A with version number 2 are the same message; message 3 of contract A with version number 1 and message c of contract A with version number 2 are the same message; at this time, messages a and c of contract A with version number 2 can be discarded. Since message 2 of contract A with version number 1 and message b of contract A with version number 2 are different messages, message 2 of contract A with version number 2 is replaced with message b of contract A with version number 2. Furthermore, after the message content replacement, the version number of contract A in the database is changed to 2. In other words, the information of messages 1 and 3 of contract A with version number 1 is retained, message 2 of contract A with version number 2 is replaced with message b of contract A with version number 2, and the version number of contract A in the database is changed to 2.

[0120] In this embodiment of the application, by determining whether the message corresponding to the contract identification information stored in the database is the same as any first cash settlement message and any first bond settlement message, if it is stored, the identical messages in the first cash settlement message and the first bond settlement message are discarded, and the messages in the first cash settlement message and the first bond settlement message that are not discarded, along with the contract identification information, are saved to the database. The messages that are not discarded are used to replace the messages previously stored in the database that are different from the first cash settlement message and the first bond settlement message, thereby avoiding redundancy of data in the database.

[0121] Furthermore, it should be noted that when sending settlement messages in the financial sector, the system sends newly generated settlement messages from the database to the corresponding custodian banks. For example, if messages A and B are generated for the same contract, the system will send both messages to the corresponding custodian banks. If a previously sent message C exists in the database, and a newly generated message contains the same message C, replacing the previously sent message C in the database will cause the system to resend message C. This application, however, discards newly generated identical messages while retaining existing identical messages in the database. This avoids the problem of duplicate transmission of previously sent identical messages and reduces the risk of settlement and clearing tasks.

[0122] Example 4:

[0123] This application provides a detailed explanation of the process for determining whether a message identical to the first cash settlement message or the first bond settlement message exists in the database.

[0124] Extract the first version number and transaction element information contained in the first settlement message; generate the first key based on the transaction element information.

[0125] The first settlement message refers to the first cash settlement message or the first bond settlement message.

[0126] The first version number refers to the numerical value recorded for the version of the contract, such as version number 1, version number 2, etc. All messages generated from transaction information of a contract with the same version number have the same version number; for example, all messages generated from transaction information of a contract with version number 1 have the same version number 1. In this application, each modification to the data of the original version contract is considered the generation of a new version, and the version number of that contract is incremented by 1 accordingly. The information of the transaction elements refers to key transaction information such as the delivery date, bond type, and bond quantity.

[0127] The information for cash transactions includes at least one of the following: counterparty, cash settlement date, clearing currency, first custodian bank, clearing amount, and first transaction type. The information for bond transactions includes at least one of the following: bond face value, second transaction type, counterparty, clearing currency, second custodian bank, bond settlement date, bond code, and bond quantity.

[0128] The first transaction type refers to planned cash flow types, such as principal, interest, and borrowing fees. The second transaction type refers to planned bond flow types, such as pledged freezes, pledged unfreezings, initial transactions, and maturity transactions. The first and second custodian banks can be the same or different. The settlement dates for cash and bonds can be the same or different.

[0129] To facilitate understanding, examples of possible scenarios arising from specific modifications to different contract types are provided. For instance, a bond lending contract might have transaction information in contract version 1 stating "Loan A accrues interest, Loan B matures, underlying asset: x units of bond a, collateral: y units of bond b." However, before Loan B, the contract is modified to "Loan C changes collateral to m units of bond b." In this case, the initial transaction and pledged freezing data for Loan A are retained, the matured transaction and loan interest data for Loan B are retained, and the pledged and unfrozen y units of bond b for Loan B become invalid. Correspondingly, the pledged and unfrozen y units of bond b for Loan C, the pledged and unfrozen m units of bond b for Loan C, and the pledged and unfrozen m units of bond b for Loan B are also invalidated.

[0130] For example, in a non-open-ended outright repurchase agreement, a bond contract with contract version number 1 might have transaction information stating "A starts accruing interest, B matures, collateralized with b bonds q units." Before B, the contract is modified to "C changes the collateral to b bonds w units." In this case, the initial transaction and pledged freezing data for A are retained, the matured transaction and loan interest data for B are retained, and the pledged and unfrozen b bonds q units for B become invalid. Correspondingly, the pledged and unfrozen b bonds q units, w units, and w units of b bonds for C and B are also released. After C and before B, the contract is modified again to "Transaction D changes collateral to b bonds e units." In this case, all transaction information before C is retained, the unchanging planned cash flows in the contract are also retained, the pledged and unfrozen b bonds w units for B become invalid, the pledged and pledged b bonds w units for C have passed the settlement date, and the pledged and unfrozen b bonds e units for B are released.

[0131] In other words, based on the modified planned cash flow or planned bond flow transaction information, the corresponding delivery cash flow and delivery bond flow are obtained. That is, when the first or second transaction information is modified, the first or second transaction information group will also be modified accordingly; if the first or second transaction information remains unchanged, the first or second transaction information group will continue to be retained. The corresponding message is generated based on the modified first or second transaction information group.

[0132] If the first settlement message is a first cash settlement message, then the first version number and cash transaction element information of each cash transaction contained in the first cash settlement message are extracted, and a first key corresponding to the first cash settlement message is generated based on a preset encryption algorithm. At the same time, the first version number corresponding to the first cash settlement message is obtained.

[0133] If the first settlement message is a first bond settlement message, then the first version number and bond transaction element information of each bond contained in the first bond settlement message are extracted, and a first key corresponding to the first bond settlement message is generated based on a preset encryption algorithm. At the same time, the first version number corresponding to the first bond settlement message is obtained.

[0134] Determine in the database whether the second version number and second key of the second delivery message correspond to the same as the first version number and first key.

[0135] The second settlement message refers to the second cash settlement message and the second bond settlement message that have been saved in the database. The second version number refers to the version number corresponding to the contract that has been saved in the database.

[0136] The second key includes the key corresponding to the second cash settlement message and the key corresponding to the second bond settlement message. Specifically, the second key corresponding to the second cash settlement message is generated based on information from each cash transaction element in the second cash settlement message, using a preset encryption algorithm; similarly, the second key corresponding to the second bond settlement message is generated based on information from each bond transaction element in the second bond settlement message, using a preset encryption algorithm.

[0137] Obtain the second version number and second key corresponding to the second settlement message.

[0138] Figure 4 A schematic diagram illustrating a specific process for determining whether a second cash settlement message identical to a first cash settlement message exists in the database, as provided in this application, is shown below. Figure 4 As shown, the process includes the following steps:

[0139] S401: Compare the first key of the first cash settlement message with the second key of all the second cash settlement messages to determine whether there is a second key in the database that is the same as the first key.

[0140] If not, execute S402; if yes, execute S403.

[0141] Based on the information of each cash transaction element in the first cash settlement message, a first key corresponding to the first cash settlement message is generated based on a preset encryption algorithm. Based on the information of each cash transaction element in the second cash settlement message, a second key corresponding to the second cash settlement message is generated based on a preset encryption algorithm. It is then determined whether a second key identical to the first key exists in the database.

[0142] S402: If there is no second key that is the same as the first key, then the first cash settlement message and the second cash settlement message in the database are different.

[0143] S403: If a second key exists that is the same as the first key, then determine whether the second version number of the second cash settlement message is consistent with the first version number of the first cash settlement message.

[0144] If yes, then execute S404; otherwise, execute S405.

[0145] S404: If the second version number is the same as the first version number, then the result is that the first cash settlement message and the second cash settlement message in the database are the same.

[0146] S405: If the second version number is inconsistent with the first version number, the result is that the first cash settlement message and the second cash settlement message in the database are different.

[0147] Figure 5 A schematic diagram illustrating the specific process for determining whether a second bond settlement message identical to a first bond settlement message exists in the database, as provided in this application, is shown below. Figure 5 As shown, the process includes the following steps:

[0148] S501: Compare the third key of the first bond settlement message with the fourth key of all second bond settlement messages to determine whether there is a fourth key in the database that is the same as the third key.

[0149] If not, execute S502; if yes, execute S503.

[0150] Based on the information of each bond transaction element in the first bond settlement message, a third key corresponding to the first bond settlement message is generated using a preset encryption algorithm. Based on the information of each bond transaction element in the second bond settlement message, a fourth key corresponding to the second bond settlement message is generated using a preset encryption algorithm. It is then determined whether a fourth key identical to the third key exists in the database.

[0151] S502: If there is no fourth key that is the same as the third key, then the first bond settlement message and the second bond settlement message in the database will be different.

[0152] S503: If a fourth key exists that is identical to the third key, then determine whether the second version number of the second bond settlement message is consistent with the first version number of the first bond settlement message.

[0153] If yes, then execute S504; otherwise, execute S505.

[0154] S504: If the second version number is the same as the first version number, then the result is that the first bond settlement message and the second bond settlement message in the database are the same.

[0155] S505: If the second version number is inconsistent with the first version number, the result is that the first bond settlement message and the second bond settlement message in the database are different.

[0156] In this embodiment, the system extracts the first version number and transaction element information contained in the first settlement message; generates a first key based on the transaction element information; and determines that a second settlement message exists in the database and that the second key is identical to the first key, and that the second version number of the second settlement message is identical to the first version number. This determines that the first settlement message and the second settlement message in the database are identical. This dual determination of whether identical messages exist in the database is more accurate, reduces errors in message identification, and ensures the accuracy of subsequent changes to messages in the database.

[0157] Example 5:

[0158] Before saving the first cash settlement message, the first bond settlement message, and the contract identification information to the database, this application embodiment also determines whether the settlement date of the first cash settlement message and the settlement time of the first bond settlement message are the same. If they are the same, the first cash settlement message and the first bond settlement message are then associated to facilitate data retrieval in the database. Figure 6 This application provides a schematic diagram illustrating a specific process for associating a delivery message, as shown in the embodiments of this application. Figure 6 As shown, the process includes the following steps:

[0159] S601: Determine whether the settlement dates carried in the first cash settlement message and the first bond settlement message are consistent.

[0160] If yes, then S602; if no, then S603.

[0161] The settlement date refers to the clearing date on which the buyer and seller respectively pay each other for the currency or bonds they purchased according to the contract. The first cash settlement message contains the specific settlement date of that transaction, i.e., the exact time when this cash transaction needs to be cleared. The first bond settlement message carries the specific settlement date of the bond transaction, i.e., the exact time when this bond transaction needs to be cleared.

[0162] S602: If the settlement dates carried in the first cash settlement message and the first bond settlement message are consistent, then proceed with the subsequent process of saving the first cash settlement message and the first bond settlement message, as well as the contract identification information, to the database.

[0163] The contract identification information, the first cash settlement message, and the first bond settlement message are saved as a group to the database.

[0164] S603: If the settlement dates carried in the first cash settlement message and the first bond settlement message are inconsistent, the first cash settlement message and the contract identification information shall be saved to the database accordingly, and the first bond settlement message and the contract identification information shall be saved to the database accordingly.

[0165] The contract identification information and the first cash settlement message are saved as a group to the database, and the contract identification information and the first bond settlement message are saved as a group to the database.

[0166] In one possible implementation, by analyzing different types of contracts, for settlement flows that are settled and cleared on the same day, such as spot bond trading and non-price-for-bond repurchase agreements, it is only necessary to associate and save them based on the opposite direction of payment and receipt; for bond lending, it is necessary to associate and save the underlying bond and lending fees. In addition, for price-for-bond repurchase agreements, a grouping concept is added. Each time a bond is exchanged or the price is changed, the group number is incremented by 1. With multiple operations, the group number increases sequentially. That is, as indicated in the above embodiment, each time the contract is modified, the contract version number is incremented by 1.

[0167] Considering that bond contract access involves multi-threaded concurrent processing, the settlement cash flow may be generated first, or the settlement bond flow may be generated first. In other words, when generating the first cash settlement message and the first bond settlement message, the first cash settlement message may be generated first, or the first bond settlement message may be generated first. Since the situation may differ for different contract types, it is necessary to consider which occurs first during processing. Based on the above analysis, the associated preprocessing flow can be divided into two parts: the flow when the first cash settlement message is generated first, and the flow when the first bond settlement message is generated first.

[0168] Figure 7 A schematic diagram illustrating the specific process of generating a first cash settlement message in an embodiment of this application is provided, as follows: Figure 7 As shown, the system reads the list of first cash settlement messages; queries the first bond settlement message under the same contract; if the settlement date of the first cash settlement message and the settlement date of the first bond settlement message are the same day, then the first bond settlement message of the bond lending contract is associated with the first cash settlement message; the first cash settlement message of the contract with the same version number but different payment type for the price-for-bond swap is associated with the first bond settlement message; and the first cash settlement message of the contract without the price-for-bond swap but different payment type is associated with the first bond settlement message, and saved to the database. If the settlement date of the first cash settlement message and the settlement date of the first bond settlement message are the same day, then the existing association is removed, and saved to the database.

[0169] Figure 8 This application provides a schematic diagram illustrating the specific process of generating a first bond settlement message in an embodiment of the present application. Figure 8 As shown, the system reads the list of first bond settlement messages; queries the first cash settlement message under the same contract; if the settlement date of the first cash settlement message and the settlement date of the first bond settlement message are the same day, then the first cash settlement message with the same version number but different payment type for the contract of price-for-bond exchange is associated with the first bond settlement message, and the first cash settlement message with the different payment type for the contract of non-price-for-bond exchange is associated with the first bond settlement message and saved to the database. If the settlement date of the first cash settlement message and the settlement date of the first bond settlement message are the same day, then the existing association is removed and saved to the database.

[0170] In this embodiment, by determining whether the settlement date of the first cash settlement message and the settlement date of the first bond settlement message are the same day, the corresponding associations of the first cash settlement message and the first bond settlement message on the same day are saved, making it easier to find data in the database. Furthermore, the technical solution based on this application can meet the needs of all types of bond products in the financial market and is easily expandable. After processing, subsequent clearing processes no longer need to focus on the types of different products, but only on the planned cash flow, planned bond flow, and the relationship between the first cash settlement message and the first bond settlement message. This not only has no impact on the process of non-bond products (foreign exchange, interbank lending, precious metals), but also allows for registration only by cash flow and bond flow, simplifying user operations; and when sending clearing messages, determining whether there is a relationship to send different clearing messages is faster.

[0171] Example 7:

[0172] To make the message generation more accurate, this application embodiment sets up different templates to generate corresponding messages. Figure 9 This application provides a schematic diagram illustrating the specific process of selecting a template for a first cash settlement message and generating a corresponding message, as shown in the embodiments of this application. Figure 9 As shown, the process includes the following steps:

[0173] S901: Target payment type for delivery processing in the extraction contract; wherein, the target payment type includes one of the following: large local currency payment, overseas local currency payment, and foreign currency payment.

[0174] Payment type in settlement refers to the payment method used during settlement and clearing. Depending on the payment method, payment types are categorized as large-value local currency payments (CNAPS), offshore local currency payments (CIPS), foreign currency payments, etc.

[0175] The contract contains a target payment type for settlement, which can be any of the payment types mentioned above. For example, the target payment type for contract B is a large local currency payment.

[0176] S902: Obtain the target transaction type corresponding to each first transaction information group; wherein, the target transaction type includes a receiving transaction or a payment transaction.

[0177] The target transaction type includes either a receipt transaction or a payment transaction. The target transaction type for each first transaction information group is determined based on the sign of the clearing amount. When the clearing amount in the first transaction information group is positive, it is a receipt transaction; when the clearing amount in the first transaction information group is negative, it is a payment transaction.

[0178] S903: Based on the pre-saved correspondence between payment type and transaction type and cash message template, determine the target payment type and target transaction type, and the corresponding target cash message template.

[0179] Figure 10 A schematic diagram of a pre-saved set of multiple templates provided in an embodiment of this application, such as... Figure 10 As shown, multiple templates for payment types such as CNAPS, CIPS, SWIFT-MT, and SWIFT-ISO are pre-saved. Different message generation templates are set for each transaction type corresponding to each payment type.

[0180] S904: Generate the corresponding first cash settlement message based on each first transaction information group and target cash message template.

[0181] The first cash settlement message contains all the data in the first transaction information group, contract identification information, sending and receiving system code, message type code and other field information.

[0182] In this embodiment, the target payment type and target transaction type are determined based on the pre-saved correspondence between payment type and transaction type and cash message template. The corresponding target cash message template is then generated based on this template and each first transaction information group, resulting in a corresponding first cash settlement message. Different templates are set according to different payment types and transaction types. The generated first cash settlement message can directly identify the payment type and transaction type, making it intuitively distinguishable and facilitating the sending of different collection messages during clearing and recovery.

[0183] Example 8:

[0184] Based on each second transaction information group and a pre-saved bond message template, a corresponding first bond settlement message is generated.

[0185] This application embodiment also sets a corresponding bond message template for the generation of the first bond message, thereby making the generated first bond settlement message more uniform and intuitive.

[0186] Example 9:

[0187] This application may also choose to directly compare the new transaction information of the contract with the old transaction information to determine the final transaction information, and generate the first cash settlement message and the first bond settlement message based on the determined final transaction information.

[0188] A planned cash flow is a combination of multiple cash transaction information under the same contract. There is at least one planned cash flow under the same contract, namely the first transaction information group.

[0189] Using planned cash flow as an example, this article explains the process of comparing new and old transaction information. Figure 11 This application provides a schematic diagram illustrating the process of comparing a new version of planned cash flow with an old version of planned cash flow in an embodiment of the present application. Figure 11 As shown, the process includes:

[0190] S1101: For new contracts, determine whether the old version of the planned cash flow corresponding to the contract exists in the database.

[0191] If yes, then execute S1102; otherwise, execute S1109.

[0192] The new version of the planned cash flow consists of the transaction information of newly entered contracts; the old version of the planned cash flow consists of the transaction information of the contract that has been saved in the database.

[0193] S1102: If the database contains the old version of the planned cash flow corresponding to the contract, then the version number of the new version of the planned cash flow and the version number of the old version of the planned cash flow are determined by the version number of the contract.

[0194] If the database contains the old version of the planned cash flow corresponding to the contract, it indicates that the contract has been modified. In this case, the version number of the new planned cash flow is different from that of the old planned cash flow.

[0195] S1103: Loop through each new version of the planned cash flow, generate a key Key1 for the new version of the planned cash flow based on the main transaction information, and save the transaction data and key Key1 for each planned cash flow in a Map list.

[0196] S1104: Loop through each old version of the planned cash flow and generate the key Key2 for the old version of the planned cash flow based on the main transaction information.

[0197] S1105: For each old version of the planned cash flow key Key2, determine whether the old version key Key2 exists in the new version of the planned cash flow Map list.

[0198] If yes, then execute S1106; otherwise, execute S1108.

[0199] S1106: Determine whether the version number of the new planned cash flow corresponding to key Key1 is the same as the version number of the old planned cash flow corresponding to key Key2.

[0200] If yes, then execute S1107; otherwise, execute S1108.

[0201] S1107: Determine the transaction information for the old version of the planned cash flow as the final transaction information.

[0202] S1108: Determine the transaction information for the new version of the planned cash flow and the transaction information for the old version of the planned cash flow as the final transaction information.

[0203] S1109: If the old version of the planned cash flow corresponding to the contract does not exist in the database, then the transaction information of the new version of the planned cash flow is determined as the final transaction information.

[0204] If the database contains the old version of the planned cash flow corresponding to the contract, it indicates that the contract is new.

[0205] Example 10:

[0206] Based on the same inventive concept and the above embodiments, this application provides a delivery pre-processing apparatus, see reference. Figure 12 , Figure 12 The diagram illustrates a delivery pre-processing apparatus according to some embodiments, the apparatus comprising:

[0207] The acquisition module 1201 is used to acquire the contract to be settled for any account, extract the contract identification information of the contract, and the first transaction information of each cash and the second transaction information of each bond in the contract;

[0208] The processing module 1202 is used to group first transaction information with the same settlement date and the same custodian bank into a first transaction information group; generate a corresponding first cash settlement message based on each first transaction information group; group second transaction information with the same settlement date and the same custodian bank into a second transaction information group; generate a corresponding first bond settlement message based on each second transaction information group; and save the first cash settlement message, the first bond settlement message, and the contract identification information to the database.

[0209] In one possible implementation, the device further includes a determination module 1203;

[0210] The judgment module 1203 is used to determine whether the database contains a message corresponding to the contract identification information before saving the first cash settlement message, the first bond settlement message, and the contract identification information to the database.

[0211] The processing module 1202 is further configured to, if not, perform the process of saving the first cash settlement message and the first bond settlement message, as well as the contract identification information, to the database.

[0212] In one possible implementation, the processing module 1202 is further configured to discard identical messages in the first cash settlement message and the first bond settlement message if the database contains a message identical to either the first cash settlement message or the first bond settlement message; saving the first cash settlement message and the first bond settlement message, along with the contract identification information, to the database includes: saving the messages in the first cash settlement message and the first bond settlement message that were not discarded, along with the contract identification information, to the database, and replacing the messages in the database that were not identical to the first cash settlement message and the first bond settlement message with the messages that were not discarded.

[0213] In one possible implementation, the processing module 1202 is specifically used to extract the first version number and transaction element information contained in the first settlement message; and generate a first key based on the transaction element information.

[0214] The judgment module 1203 is specifically used to determine whether there exists a second version number and a second key of a second delivery message in the database that correspond to the same as the first version number and the first key.

[0215] In one possible implementation, the information on the cash transaction elements includes at least one of the following: counterparty, cash settlement date, clearing currency, first custodian bank, clearing amount, and first transaction type.

[0216] In one possible implementation, the information on the bond trading elements includes at least one of the following: bond face value, second type of transaction, counterparty, clearing currency, second custodian bank, bond settlement date, bond code, and bond quantity.

[0217] In one possible implementation, the judgment module 1203 is further configured to determine whether the settlement dates carried in the first cash settlement message and the first bond settlement message are consistent before saving the first cash settlement message, the first bond settlement message, and the contract identification information to the database.

[0218] The processing module 1202 is further configured to, if so, perform the subsequent process of saving the first cash settlement message and the first bond settlement message, as well as the contract identification information, to the database.

[0219] In one possible implementation, the processing module 1202 is further configured to, if the settlement dates carried in the first cash settlement message and the first bond settlement message are inconsistent, save the first cash settlement message and the contract identification information to the database accordingly, and save the first bond settlement message and the contract identification information to the database accordingly.

[0220] In one possible implementation, the acquisition module 1201 is specifically used to extract the target payment type for settlement processing in the contract; wherein, the target payment type includes one of large-amount local currency payment, overseas local currency payment, and foreign currency payment; and to acquire the target transaction type corresponding to each first transaction information group; wherein, the target transaction type includes a receiving transaction or a paying transaction;

[0221] The processing module 1202 is specifically used to determine the target cash message template corresponding to the target payment type and the target transaction type based on the pre-saved correspondence between the payment type and transaction type and the cash message template; and to generate a corresponding first cash settlement message based on each first transaction information group and the target cash message template.

[0222] In one possible implementation, the processing module 1202 is specifically used to generate a corresponding first bond settlement message based on each second transaction information group and a pre-saved bond message template.

[0223] Example 11:

[0224] Based on the same inventive concept, and building upon the above embodiments, this application also provides an electronic device that can perform the functions of the delivery pre-processing device discussed above. Please refer to [link to relevant documentation]. Figure 13 , Figure 13 The diagram illustrates the structure of an electronic device according to some embodiments. The electronic device includes a processor 1301, a communication interface 1302, a memory 1303, and a communication bus 1304, wherein the processor 1301, the communication interface 1302, and the memory 1303 communicate with each other through the communication bus 1304.

[0225] The memory 1303 stores a computer program. When the program is executed by the processor 1301, the processor 1301 performs the following steps:

[0226] Obtain the contract to be settled for any account, extract the contract identification information of the contract, and the first transaction information of each cash and the second transaction information of each bond in the contract;

[0227] First transaction information with the same settlement date and the same custodian bank is grouped into a first transaction information group; a corresponding first cash settlement message is generated based on each first transaction information group; second transaction information with the same settlement date and the same custodian bank is grouped into a second transaction information group; a corresponding first bond settlement message is generated based on each second transaction information group; the first cash settlement message and the first bond settlement message, as well as the contract identification information, are saved to the database.

[0228] In one possible implementation, the processor 1301 is further configured to determine whether the database contains a message corresponding to the contract identification information before saving the first cash settlement message, the first bond settlement message, and the contract identification information to the database; if not, perform the process of saving the first cash settlement message, the first bond settlement message, and the contract identification information to the database.

[0229] In one possible implementation, the processor 1301 is further configured to discard identical messages in the first cash settlement message and the first bond settlement message if the database contains a message identical to either the first cash settlement message or the first bond settlement message; saving the first cash settlement message, the first bond settlement message, and the contract identification information to the database includes: saving the messages in the first cash settlement message and the first bond settlement message that were not discarded, along with the contract identification information, to the database, and replacing previously stored messages in the database that are different from the first cash settlement message and the first bond settlement message with the messages that were not discarded.

[0230] In one possible implementation, the processor 1301 is specifically configured to extract the first version number and transaction element information contained in the first settlement message; generate a first key based on the transaction element information; and determine whether there exists a second version number and second key of a second settlement message in the database that correspond to the same as the first version number and first key.

[0231] In one possible implementation, the information on the cash transaction elements includes at least one of the following: counterparty, cash settlement date, clearing currency, first custodian bank, clearing amount, and first transaction type.

[0232] In one possible implementation, the information on the bond trading elements includes at least one of the following: bond face value, second type of transaction, counterparty, clearing currency, second custodian bank, bond settlement date, bond code, and bond quantity.

[0233] In one possible implementation, the processor 1301 is further configured to determine whether the settlement dates carried in the first cash settlement message and the first bond settlement message are consistent before saving the first cash settlement message and the first bond settlement message, as well as the contract identification information, to the database; if so, then proceed with the subsequent process of saving the first cash settlement message and the first bond settlement message, as well as the contract identification information, to the database.

[0234] In one possible implementation, the processor 1301 is further configured to, if the settlement dates carried in the first cash settlement message and the first bond settlement message are inconsistent, save the first cash settlement message and the contract identification information to the database accordingly, and save the first bond settlement message and the contract identification information to the database accordingly.

[0235] In one possible implementation, the processor 1301 is specifically used to extract the target payment type for settlement processing in the contract; wherein the target payment type includes one of large-amount local currency payment, overseas local currency payment, and foreign currency payment; and to obtain the target transaction type corresponding to each first transaction information group; wherein the target transaction type includes a receiving transaction or a paying transaction.

[0236] Based on the pre-saved correspondence between payment type and transaction type and cash message template, determine the target payment type and the target transaction type, and the corresponding target cash message template; based on each first transaction information group and the target cash message template, generate the corresponding first cash settlement message.

[0237] In one possible implementation, the processor 1301 is specifically used to generate a corresponding first bond settlement message based on each second transaction information group and a pre-saved bond message template.

[0238] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.

[0239] Communication interface 1302 is used for communication between the above-mentioned electronic device and other devices.

[0240] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0241] The processors mentioned above can be general-purpose processors, including central processing units, network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0242] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program. The computer program includes program instructions, which, when executed by a computer, cause the computer to perform the following steps:

[0243] Obtain the contract to be settled for any account, extract the contract identification information of the contract, and the first transaction information of each cash and the second transaction information of each bond in the contract;

[0244] The first transaction information with the same settlement date and the same custodian bank is grouped into a first transaction information group; a corresponding first cash settlement message is generated based on each first transaction information group.

[0245] Secondary transaction information with the same settlement date and the same custodian bank is grouped into secondary transaction information groups; a corresponding primary bond settlement message is generated based on each secondary transaction information group.

[0246] The first cash settlement message and the first bond settlement message, along with the contract identification information, are saved to the database.

[0247] In one possible implementation, before saving the first cash settlement message and the first bond settlement message, along with the contract identification information, to the database, the method further includes:

[0248] Determine whether the database contains a message corresponding to the contract identification information. If not, perform the process of saving the first cash settlement message, the first bond settlement message, and the corresponding contract identification information to the database.

[0249] In one possible implementation, if the database stores a message corresponding to the contract identifier information, the method further includes:

[0250] If the database contains a message identical to either the first cash settlement message or the first bond settlement message, then discard the identical message in the first cash settlement message and the first bond settlement message.

[0251] Saving the first cash settlement message and the first bond settlement message, along with the contract identification information, to the database includes:

[0252] The undiscarded messages in the first cash settlement message and the first bond settlement message, along with the contract identification information, are saved to the database. The undiscarded messages are then used to replace the previously saved messages in the database that are different from the first cash settlement message and the first bond settlement message.

[0253] In one possible implementation, the process of determining whether the database contains a message identical to the first cash settlement message or the first bond settlement message includes:

[0254] Extract the first version number and transaction element information contained in the first settlement message; generate a first key based on the transaction element information;

[0255] Determine whether the database contains a second version number and a second key that correspond to the first version number and the first key of a second delivery message.

[0256] In one possible implementation, the information on the cash transaction elements includes at least one of the following: counterparty, cash settlement date, clearing currency, first custodian bank, clearing amount, and first transaction type.

[0257] In one possible implementation, the information on the bond trading elements includes at least one of the following: bond face value, second type of transaction, counterparty, clearing currency, second custodian bank, bond settlement date, bond code, and bond quantity.

[0258] In one possible implementation, before saving the first cash settlement message and the first bond settlement message, along with the contract identification information, to the database, the method further includes:

[0259] Determine whether the settlement dates carried in the first cash settlement message and the first bond settlement message are consistent;

[0260] If so, then proceed with the process of saving the first cash settlement message, the first bond settlement message, and the contract identification information to the database.

[0261] In one possible implementation, the method further includes:

[0262] If the settlement dates carried in the first cash settlement message and the first bond settlement message are inconsistent, then the first cash settlement message and the contract identification information are saved to the database accordingly, and the first bond settlement message and the contract identification information are saved to the database accordingly.

[0263] In one possible implementation, generating a corresponding first cash settlement message based on each first transaction information group includes:

[0264] Extract the target payment type for settlement processing in the contract; wherein, the target payment type includes one of large-amount local currency payment, overseas local currency payment, and foreign currency payment;

[0265] Obtain the target transaction type corresponding to each first transaction information group; wherein, the target transaction type includes a receiving transaction or a payment transaction;

[0266] Based on the pre-saved correspondence between payment type and transaction type and cash message template, determine the target payment type and the target transaction type, and the corresponding target cash message template.

[0267] Based on each first transaction information group and the target cash message template, a corresponding first cash settlement message is generated.

[0268] In one possible implementation, generating a corresponding first bond settlement message based on each second transaction information group includes:

[0269] Based on each second transaction information group and a pre-saved bond message template, a corresponding first bond settlement message is generated.

[0270] The aforementioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in the electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), optical storage such as CDs, DVDs, BDs, HVDs, etc., and semiconductor storage such as ROMs, EPROMs, and EEPROMs.

[0271] 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 delivery preprocessing methods discussed above. Since the principle of the above-described computer program product in solving the problem is similar to that of the delivery preprocessing 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.

[0272] 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.

[0273] 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. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0274] 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.

[0275] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed 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.

[0276] 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 method of settlement pre-processing, characterized by, The method comprises: obtaining a contract to be settled corresponding to any account, extracting contract identification information of the contract, and first transaction information of each cash and second transaction information of each bond in the contract; the first transaction information of the same settlement date and the same custodian bank is taken as a first transaction information group; based on each first transaction information group, a corresponding first cash settlement message is generated; the second transaction information of the same settlement date and the same custodian bank is taken as a second transaction information group; based on each second transaction information group, a corresponding first bond settlement message is generated; the first cash settlement message and the first bond settlement message, and the contract identification information are correspondingly saved to the database; Before the first cash settlement message and the first bond settlement message, and the contract identification information are correspondingly saved to the database, the method further comprises: determining whether the database has saved the message corresponding to the contract identification information, if not, the process of saving the first cash settlement message and the first bond settlement message, and the contract identification information to the database is carried out; if the database has saved any one of the first cash settlement message and the first bond settlement message, the same message in the first cash settlement message and the first bond settlement message is discarded; the first cash settlement message and the first bond settlement message, and the contract identification information are correspondingly saved to the database, which comprises: the first cash settlement message and the first bond settlement message, and the contract identification information are correspondingly saved to the database, and the non-discarded message is used to replace the message saved in the database before which is different from the first cash settlement message and the first bond settlement message; Before the first cash settlement message and the first bond settlement message, and the contract identification information are correspondingly saved to the database, the method further comprises: determining whether the settlement date carried in the first cash settlement message and the first bond settlement message is consistent; if yes, the process of subsequently saving the first cash settlement message and the first bond settlement message, and the contract identification information to the database is carried out; if the settlement date carried in the first cash settlement message and the first bond settlement message is inconsistent, the first cash settlement message and the contract identification information are correspondingly saved to the database, and the first bond settlement message and the contract identification information are correspondingly saved to the database.

2. The method of claim 1, wherein, The process of determining whether the database has the same message as the first cash settlement message or the first bond settlement message comprises: extracting the first version number and the transaction element information contained in the first settlement message; generating a first key based on the transaction element information; determining whether the second version number and the second key of the second settlement message in the database are the same as the first version number and the first key.

3. The method of claim 2, wherein, The transaction element information of the cash includes at least one of the transaction counterpart, the settlement date of the cash, the clearing currency, the first custodian bank, the clearing amount and the first transaction type.

4. The method of claim 2, wherein, The information of the transaction element of the bond includes at least one of a bond face value, a second transaction type, a counterparty, a settlement currency, a second custodian, a bond settlement date, a bond code, and a bond quantity.

5. The method of claim 1, wherein, Based on each first transaction information group, a corresponding first cash settlement message is generated. Extracting a target payment type of the delivery processing in the contract; wherein the target payment type includes one of a large domestic currency payment, an overseas domestic currency payment, and a foreign currency payment; Obtaining a target transaction type corresponding to each first transaction information group; wherein the target transaction type includes a collection transaction or a payment transaction; According to a pre-stored correspondence between a payment type and a transaction type and a cash message template, determining a target cash message template corresponding to the target payment type and the target transaction type; Based on each first transaction information group and the target cash message template, a corresponding first cash settlement message is generated.

6. The method of claim 1, wherein, Based on each second transaction information group, a corresponding first bond settlement message is generated. Based on each second transaction information group and a pre-stored bond message template, a corresponding first bond settlement message is generated.

7. An apparatus for settlement pre-processing, characterized by The device comprises: An obtaining module is configured to obtain a contract to be processed for delivery corresponding to any account, extract contract identification information of the contract, and first transaction information of each cash and second transaction information of each bond in the contract; A processing module is configured to group first transaction information of the same settlement date and the same custodian as a first transaction information group, generate a corresponding first cash settlement message based on each first transaction information group, group second transaction information of the same settlement date and the same custodian as a second transaction information group, generate a corresponding first bond settlement message based on each second transaction information group, and save the first cash settlement message and the first bond settlement message and the contract identification information to a database correspondingly; The device further comprises a judging module; The judging module is configured to judge whether a message corresponding to the contract identification information is saved in the database before the first cash settlement message and the first bond settlement message and the contract identification information are saved to the database correspondingly; The processing module is further configured to perform the process of saving the first cash settlement message and the first bond settlement message and the contract identification information to the database if not; The processing module is further configured to discard the same message in the first cash settlement message and the first bond settlement message if the database saves any same message as the first cash settlement message and the first bond settlement message, and save the first cash settlement message and the first bond settlement message and the contract identification information to the database correspondingly, which comprises saving the non-discarded message in the first cash settlement message and the first bond settlement message and the contract identification information to the database, and replacing the previously saved message different from the first cash settlement message and the first bond settlement message in the database with the non-discarded message. The judgment module is further configured to judge whether the delivery dates carried in the first cash delivery message and the first bond delivery message are consistent before the first cash delivery message, the first bond delivery message, and the contract identification information are saved into the database correspondingly. The processing module is further configured to, if yes, perform a subsequent process of saving the first cash delivery message, the first bond delivery message, and the contract identification information into the database correspondingly. The processing module is further configured to, if the delivery dates carried in the first cash delivery message and the first bond delivery message are inconsistent, save the first cash delivery message and the contract identification information into the database correspondingly, and save the first bond delivery message and the contract identification information into the database correspondingly.

8. The apparatus of claim 7, wherein, The processing module is specifically configured to extract a first version number and transaction element information included in the first delivery message; and generate a first key based on the transaction element information. The judgment module is specifically configured to judge whether a second version number and a second key of a second delivery message in the database correspond to the first version number and the first key.

9. The apparatus of claim 8, wherein, The transaction element information of the cash includes at least one of a counterparty, a delivery date of the cash, a clearing currency, a first custodian bank, a clearing amount, and a first transaction type.

10. The apparatus of claim 8, wherein, The transaction element information of the bond includes at least one of a bond face value, a second transaction type, a counterparty, a clearing currency, a second custodian bank, a delivery date of the bond, a bond code, and a bond quantity.

11. The apparatus of claim 7, wherein, The obtaining module is specifically configured to extract a target payment type of delivery processing in the contract; and obtain a target transaction type corresponding to each first transaction information group; wherein the target payment type includes one of a large domestic currency payment, an overseas domestic currency payment, and a foreign currency payment; and the target transaction type includes a collection transaction or a payment transaction. The processing module is specifically configured to determine a target cash message template corresponding to the target payment type and the target transaction type according to a pre-stored correspondence between payment types and transaction types and cash message templates; and generate a corresponding first cash delivery message based on each first transaction information group and the target cash message template.

12. The apparatus of claim 7, wherein, The processing module is specifically configured to generate a corresponding first bond delivery message based on each second transaction information group and a pre-stored bond message template.

13. An electronic device, comprising: The memory is configured to store program instructions. The processor is configured to invoke the program instructions stored in the memory, and execute the method in any one of claims 1-6 according to the obtained program instructions. The computer program product includes computer program codes, which, when executed on a computer, cause the computer to execute the method in any one of claims 1-6.

14. A computer-readable storage medium, characterized in that, The computer program product includes computer program codes, which, when executed on a computer, cause the computer to execute the method in any one of claims 1-6.

15. A computer program product, characterised in that, ​

Citation Information

Patent Citations

  • Method and device for processing bond position data

    CN118898511A

  • Automatic financial instrument transaction system

    WO2009089358A2