Delivery pretreatment method, device, equipment and medium
By generating and saving delivery messages for bond transactions in groups, the problems of redundant and omissions in databases in the prior art are solved, and more efficient and accurate delivery and clearing are achieved.
Patent Information
- Application Number
- CN202411933001.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-26
AI Technical Summary
In the process of delivery and clearing of bond transactions, each transaction needs to generate a message when generating a message, resulting in complex message data in the database, increasing the risk of missing messages in the system and causing errors in delivery and clearing tasks.
By obtaining the contract to be processed for delivery corresponding to the account, extracting the contract identification information and transaction information of the contract, grouping to generate cash and bond delivery messages from the same delivery date and the custodian bank, and saving them to the database.
It reduces the number of messages in the database, reduces the risk of missing messages in the system to obtain messages, thereby reducing the risk of delivery and clearing tasks, and improving the efficiency and accuracy of delivery and clearing.
Smart Images

Figure CN119784499A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology, and in particular to a method, device, equipment and medium for delivery preprocessing. Background Art
[0002] For bond transactions in the financial market, when the existing system performs delivery and settlement, the system obtains the message corresponding to the delivery and settlement task in the database and performs settlement through the message. However, when generating a message in the prior art, a message needs to be generated for each transaction, which makes the message data in the database redundant and increases the risk of delivery and settlement task errors due to system omissions. Therefore, this traditional delivery and settlement system urgently needs to be optimized and upgraded to reduce the risk of delivery and settlement tasks. Summary of the invention
[0003] The embodiments of the present application provide a method, apparatus, device and medium for settlement preprocessing, which are used to solve the problem that a message needs to be generated for each transaction, resulting in redundant message data in the database and increasing the risk of settlement and settlement task errors due to system omission of messages.
[0004] In a first aspect, the present application provides a method for delivery preprocessing, the method comprising:
[0005] Obtain the contract to be delivered corresponding to 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] Taking the first transaction information of the same delivery date and the same custodian bank as the first transaction information group; generating a corresponding first cash delivery message based on each first transaction information group;
[0007] The second transaction information of the same delivery date and the same custodian bank is used as a second transaction information group; based on each second transaction information group, a corresponding first bond delivery message is generated;
[0008] The first cash settlement message, the first bond settlement message, and the contract identification information are correspondingly saved in a database.
[0009] In a possible implementation manner, before the first cash settlement message, the first bond settlement message, and the contract identification information are correspondingly saved in a database, the method further includes:
[0010] Determine whether a message corresponding to the contract identification information is stored in the database; if not, save the first cash settlement message and the first bond settlement message, as well as the contract identification information, to the database.
[0011] In a possible implementation manner, if a message corresponding to the contract identification information is stored in the database, the method further includes:
[0012] If the database stores a message identical to either the first cash delivery message or the first bond delivery message, discarding the identical message in the first cash delivery message or the first bond delivery message;
[0013] The step of correspondingly saving the first cash settlement message, the first bond settlement message, and the contract identification information to a database includes:
[0014] The messages that are not discarded in the first cash settlement message and the first bond settlement message and the contract identification information are correspondingly saved in a database, and the messages that are not discarded are used to replace the messages that are previously saved in the database and are different from the first cash settlement message and the first bond settlement message.
[0015] In a possible implementation manner, the process of determining whether there is a message in the database that is identical to the first cash settlement message or the first bond settlement message includes:
[0016] Extracting the first version number and transaction element information contained in the first delivery message; generating a first key based on the transaction element information;
[0017] Determine whether there exists in the database a second version number and a second key of a second delivery message that are the same as the first version number and the first key.
[0018] In a possible implementation, the information of cash transaction elements includes at least one of a transaction counterparty, a cash delivery date, a clearing currency, a first custodian bank, a clearing amount, and a first transaction type.
[0019] In a possible implementation, the information of the bond transaction elements includes at least one of the bond face value, the second transaction type, the transaction counterparty, the clearing currency, the second custodian bank, the bond delivery date, the bond code and the bond quantity.
[0020] In a possible implementation manner, before the first cash settlement message, the first bond settlement message, and the contract identification information are correspondingly saved in a database, the method further includes:
[0021] Determining whether the delivery date carried in the first cash delivery message and the first bond delivery message is consistent;
[0022] If so, a subsequent process is performed to save the first cash settlement message, the first bond settlement message, and the contract identification information correspondingly to the database.
[0023] In a possible implementation, the method further includes:
[0024] If the delivery dates carried in the first cash delivery message and the first bond delivery message are inconsistent, the first cash delivery message and the contract identification information are saved in the database accordingly, and the first bond delivery message and the contract identification information are saved in the database accordingly.
[0025] In a possible implementation, based on each first transaction information group, generating a corresponding first cash settlement message includes:
[0026] Extract the target payment type for the settlement process in the contract; wherein the target payment type includes one of large amount of local currency payment, overseas local currency payment, and foreign currency payment;
[0027] Acquire a target transaction type corresponding to each first transaction information group; wherein the target transaction type includes a collection transaction or a payment transaction;
[0028] Determine the target cash message template corresponding to the target payment type and the target transaction type according to the pre-saved correspondence between the payment type and the transaction type and the 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 a possible implementation, based on each second transaction information group, generating a corresponding first bond delivery message includes:
[0031] Based on each second transaction information group and a pre-saved bond message template, a corresponding first bond delivery message is generated.
[0032] In a second aspect, the present application provides a delivery preprocessing device, the device comprising:
[0033] An acquisition module, used to acquire a contract to be delivered corresponding to 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] A processing module is used to treat the first transaction information of the same delivery date and the same custodian bank as a first transaction information group; generate a corresponding first cash delivery message based on each first transaction information group; treat the second transaction information of the same delivery date and the same custodian bank as a second transaction information group; generate a corresponding first bond delivery message based on each second transaction information group; and save the first cash delivery message, the first bond delivery message, and the contract identification information in a database accordingly.
[0035] In a possible implementation manner, the device further includes a judgment module;
[0036] The judgment module is used to judge whether a message corresponding to the contract identification information is stored in the database before the first cash delivery message and the first bond delivery message and the contract identification information are correspondingly stored in the database;
[0037] The processing module is also used to, if not, save the first cash settlement message, the first bond settlement message, and the contract identification information correspondingly to the database.
[0038] In a possible implementation, the processing module is also used to discard the identical message between the first cash delivery message and the first bond delivery message if the database stores therein a message identical to either the first cash delivery message or the first bond delivery message; saving the first cash delivery message, the first bond delivery message, and the contract identification information correspondingly to the database includes: saving the non-discarded messages between the first cash delivery message and the first bond delivery message and the contract identification information correspondingly to the database, and using the non-discarded messages to replace the messages previously stored in the database that are different from the first cash delivery message and the first bond delivery message.
[0039] In a possible implementation, the processing module is specifically configured to extract the first version number and transaction element information contained in the first delivery message; and generate a first key based on the transaction element information;
[0040] The judgment module is specifically used to judge whether there exists in the database a second version number and a second key of a second delivery message which are the same as the first version number and the first key.
[0041] In a possible implementation, the information of cash transaction elements includes at least one of a transaction counterparty, a cash delivery date, a clearing currency, a first custodian bank, a clearing amount, and a first transaction type.
[0042] In a possible implementation, the information of the bond transaction elements includes at least one of the bond face value, the second transaction type, the transaction counterparty, the clearing currency, the second custodian bank, the bond delivery date, the bond code and the bond quantity.
[0043] In a possible implementation manner, 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 and the contract identification information are correspondingly saved in the database;
[0044] The processing module is further used to, if yes, perform a subsequent process of saving the first cash settlement message, the first bond settlement message, and the contract identification information correspondingly to the database.
[0045] In a possible implementation, the processing module is further used to save the first cash delivery message and the contract identification information correspondingly to the database, and save the first bond delivery message and the contract identification information correspondingly to the database if the delivery dates carried in the first cash delivery message and the first bond delivery message are inconsistent.
[0046] In a possible implementation, the acquisition module is specifically used to extract the target payment type of the delivery 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; obtain the target transaction type corresponding to each first transaction information group; wherein the target transaction type includes a collection transaction or a payment transaction;
[0047] The processing module is specifically used to determine the target payment type and the target transaction type, and the corresponding target cash message template according to the pre-saved correspondence between the payment type and the transaction type and the cash message template; and generate a corresponding first cash settlement message based on each first transaction information group and the target cash message template.
[0048] In a possible implementation, the processing module is specifically configured to generate a corresponding first bond delivery message based on each second transaction information group and a pre-saved bond message template.
[0049] In a third aspect, the present application provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement any method described in the first aspect when executing a computer program stored in the memory.
[0050] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements any method as described in the first aspect.
[0051] In a fifth aspect, the present application provides a computer program product, comprising: a computer program code, when the computer program code is run on a computer, the computer executes any method as described in the first aspect.
[0052] In the embodiment of the present application, by preprocessing, the first transaction information of the same delivery date and the same custodian bank is used as the first transaction information group; based on each first transaction information group, a corresponding first cash delivery message is generated; the second transaction information of the same delivery date and the same custodian bank is used as the second transaction information group; based on each second transaction information group, a corresponding first bond delivery message is generated; the first cash delivery message and the first bond delivery message, as well as the contract identification information are correspondingly saved to the database. According to the same delivery date and the same custodian bank, the first transaction information of each cash is grouped, and the second transaction information of each bond is grouped, and a message is generated based on the data of each group, which greatly reduces the number of messages in the database, reduces the risk of missing messages obtained by the system, and thus reduces the risk of delivery and settlement tasks. In addition, the first cash delivery message and the first bond delivery message and the contract identification information are correspondingly saved to the database. When performing delivery and settlement, the cash delivery message and the bond delivery message can be directly obtained at the same time for delivery and settlement, which is more convenient and quicker than only being able to deliver and settle cash or bonds. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0054] Figure 1 A schematic diagram of a delivery preprocessing process provided in an embodiment of the present application;
[0055] Figure 2 A schematic diagram of a simplified process of storing messages when a new contract is added provided in an embodiment of the present application;
[0056] Figure 3 A schematic diagram of a simplified process for storing a message for modifying a contract when the contract is stored in a database provided in an embodiment of the present application;
[0057] Figure 4 A schematic diagram of a specific process for determining whether there is a second cash delivery message that is identical to a first cash delivery message in a database provided for the implementation of the present application;
[0058] Figure 5 A schematic diagram of a specific process for determining whether there is a second bond delivery message in a database that is the same as the first bond delivery message provided for the implementation of the present application;
[0059] Figure 6A schematic diagram of a specific process of delivery message association provided in an embodiment of the present application;
[0060] Figure 7 A schematic diagram of a specific process in which a first cash settlement message is generated according to an embodiment of the present application;
[0061] Figure 8 A schematic diagram of a specific process in which a first bond delivery message is generated according to an embodiment of the present application;
[0062] Fig. 9 A schematic diagram of a specific process of selecting a template for a first cash delivery message and generating a corresponding message provided in an embodiment of the present application;
[0063] Fig.10 A schematic diagram of multiple pre-saved templates provided in an embodiment of the present application;
[0064] Fig.11 A schematic diagram of a process of comparing a new version of the planned cash flow with an old version of the planned cash flow provided in an embodiment of the present application;
[0065] Fig.12 A schematic diagram of a delivery preprocessing device provided in an embodiment of the present application;
[0066] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solutions and advantages of this application clearer, this application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the embodiments described in this application are only part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0068] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0069] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.
[0070] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0071] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0073] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0074] In the technical solution of this application, the acquisition, transmission, storage, and use of data are in compliance with the requirements of relevant national laws and regulations.
[0075] Before introducing the delivery preprocessing method provided in the embodiment of the present application, in order to facilitate understanding, some terms involved in the embodiment of the present application are first explained below.
[0076] Clearing path: refers to the bond trading path, indicating the path by which the trading party remits the bonds to the counterparty.
[0077] Spot bond trading is paying funds to receive bonds or receiving funds to pay bonds.
[0078] Bond repurchase is to exchange funds for bonds, and then exchange the bonds for funds when they mature in the future.
[0079] Bond lending involves exchanging bonds for bonds and paying the borrowing fee.
[0080] The embodiments of the present application propose a method, device, equipment and medium for delivery preprocessing. Through preprocessing, the first transaction information with the same delivery date and the same custodian bank is used as the first transaction information group; based on each first transaction information group, a corresponding first cash delivery message is generated; the second transaction information with the same delivery date and the same custodian bank is used as the second transaction information group; based on each second transaction information group, a corresponding first bond delivery message is generated; the first cash delivery message and the first bond delivery message, as well as the contract identification information are correspondingly saved to the database. The first transaction information of each cash is grouped according to the same delivery date and the same custodian bank, and the second transaction information of each bond is grouped, and a message is generated based on the data of each group, which greatly reduces the number of messages in the database, reduces the risk of missing messages obtained by the system, and thus reduces the risk of delivery and settlement tasks. In addition, the first cash delivery message, the first bond delivery message and the contract identification information are correspondingly saved in the database. When performing delivery and settlement, the cash delivery message and the bond delivery message can be directly obtained at the same time for delivery and settlement. Compared with only being able to perform delivery and settlement of cash or bonds, it is more convenient and quicker.
[0081] Embodiment 1:
[0082] Figure 1 A schematic diagram of a delivery preprocessing process provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the process includes the following steps:
[0083] S101: Obtain a contract to be settled corresponding to 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] A delivery preprocessing method provided in an embodiment of the present application is applied to an electronic device, which may be a computer (Personal Computer, PC), a server, etc.
[0085] An account refers to the vehicle opened by a customer in a bank for handling daily transfer settlement, cash collection and payment, and other businesses.
[0086] The contracts to be settled may be different types of contracts such as spot bond trading, bond lending, bond repurchase, etc.
[0087] The contract to be settled includes the contract identification information and the transaction information of the contract, wherein the contract identification information may be the contract code or contract number. The transaction information of the contract includes the transaction scenario, contract number, planned flow number, counterparty, transaction date, settlement date, bond code, bond quantity, planned bond flow type, clearing currency, clearing amount, planned cash flow type, custodian bank and other transaction information. The same contract contains multiple cash transaction information and multiple bond transaction information, which can also be understood as the combination of multiple cash transaction information under the same contract is the planned cash flow, and the combination of multiple bond transaction information under the same contract is the planned bond flow.
[0088] After obtaining the contract to be delivered corresponding to any account, obtain the first transaction information of each cash and the second transaction information of each bond contained in the transaction information of the contract. Among them, the first transaction information of each cash includes transaction scenario, planned flow number, counterparty, transaction date, delivery date, settlement amount, settlement currency, planned cash flow type, custodian bank and other transaction information; the second transaction information of each bond includes transaction scenario, planned flow number, counterparty, transaction date, delivery date, bond code, bond quantity, planned bond flow type, custodian bank and other transaction information. Among them, the transaction scenarios include cash flow of bond buying and selling, bond flow of bond buying and selling, bond repurchase-beginning-cash flow, bond repurchase-beginning-bond flow, bond repurchase-end-cash flow, bond repurchase-end-bond flow, bond lending-beginning-subject, bond lending-beginning-mortgage bonds, bond lending-end-subject, bond lending-end-mortgage bonds and other transaction scenarios; planned cash flow types include principal, interest, borrowing fees and other types; planned bond flow types include pledge freezing, pledge thawing, first transaction, maturity transaction and other types.
[0089] S102: taking the first transaction information of the same delivery date and the same custodian bank as the first transaction information group; and generating a corresponding first cash delivery message based on each first transaction information group.
[0090] For each cash first transaction information in the contract, the first transaction information of each cash with the same delivery date and the same custodian bank is regarded as a cash transaction information group, i.e., the first transaction information group. In other words, the first transaction information of each cash in the planned cash flow is grouped according to the delivery date and the custodian bank to determine multiple groups of delivery cash flows, i.e., multiple groups of first transaction information groups are determined.
[0091] There is at least one first transaction information group in the same contract. Each first transaction information group is input into a pre-set cash message template to generate a corresponding first cash delivery message. Therefore, there is at least one first cash delivery message in the same contract. Each first cash delivery message contains at least one first cash transaction information.
[0092] S103: taking the second transaction information with the same delivery date and the same custodian bank as the second transaction information group; and generating a corresponding first bond delivery message based on each second transaction information group.
[0093] For the second transaction information of each bond in the contract, the second transaction information of each bond with the same delivery date and the same custodian bank is grouped as a bond transaction information group, i.e., the second transaction information group. In other words, the second transaction information of each bond in the planned bond flow is grouped according to the delivery date and the custodian bank to determine multiple groups of delivery bond flows, i.e., multiple groups of second transaction information groups are determined.
[0094] There is at least one first transaction information group in the same contract. Each first transaction information group is input into the pre-set bond message template to generate the corresponding first bond delivery message. Therefore, there is at least one first bond delivery message in the same contract. Each first bond delivery message contains at least one first transaction information of a bond. The transaction information group includes transaction information such as contract number, delivery flow number, counterparty, delivery date, settlement currency, settlement amount, delivery cash flow type, bond code, bond quantity, delivery bond flow type, etc.
[0095] S104: The first cash settlement message, the first bond settlement message, and the contract identification information are correspondingly saved in a database.
[0096] The first cash delivery message, the first bond delivery message, and the contract identification information are saved in correspondence to the database. Specifically, the contract identification information and the first cash delivery message are saved in the database as a set of correspondence, the contract identification information and the first bond delivery message are saved in the database as a set of correspondence, and the contract identification information, the first cash delivery message, and the first bond delivery message are saved in the database as a set of correspondence.
[0097] After obtaining the contract to be delivered, a clearing instruction is generated according to the registration. The clearing task includes the clearing task of the planned cash flow and the clearing task of the planned bond flow. The clearing instruction includes the clearing instruction of the delivery cash flow and the clearing instruction of the delivery bond flow. That is to say, according to the first transaction information of each cash and the second transaction information of each bond in the contract, the clearing instruction of the delivery cash flow and the clearing instruction of the delivery bond flow for delivery and clearing are generated. According to the clearing instruction of the delivery cash flow and the clearing instruction of the delivery bond flow, the first cash delivery message and the first bond delivery message are generated respectively. Among them, the first cash delivery message contains the information of the first transaction information group, and the first bond delivery message contains the information of the second transaction information group.
[0098] Figure 2 A schematic diagram of a simplified process of storing messages when a contract is newly added is provided in an embodiment of the present application, such as Figure 2 As shown in the figure, after the new contract is connected, a clearing instruction is generated according to the registered clearing task. The clearing task includes the clearing task of the planned cash flow and the clearing task of the planned bond flow. The clearing instruction includes the clearing instruction of the delivery cash flow and the clearing instruction of the delivery bond flow. Different clearing paths are associated with different clearing tasks. The delivery cash flow and the delivery bond flow are associated for processing.
[0099] For new additions, the cash flows and bond flows of the batches that need to be cleared are associated, so that the cash flows and bond flows of the batches corresponding to the contract can be quickly located during clearing. That is to say, when the first cash settlement message and the first bond delivery message are saved, the corresponding first cash settlement message and the first bond delivery message are saved in a group of data.
[0100] In the embodiment of the present application, by preprocessing, the first transaction information of the same delivery date and the same custodian bank is used as the first transaction information group; based on each first transaction information group, a corresponding first cash delivery message is generated; the second transaction information of the same delivery date and the same custodian bank is used as the second transaction information group; based on each second transaction information group, a corresponding first bond delivery message is generated; the first cash delivery message and the first bond delivery message, as well as the contract identification information are correspondingly saved to the database. According to the same delivery date and the same custodian bank, the first transaction information of each cash is grouped, and the second transaction information of each bond is grouped, and a message is generated based on the data of each group, which greatly reduces the number of messages in the database, reduces the risk of missing messages obtained by the system, and thus reduces the risk of delivery and settlement tasks. In addition, the first cash delivery message and the first bond delivery message and the contract identification information are correspondingly saved to the database. When performing delivery and settlement, the cash delivery message and the bond delivery message can be directly obtained at the same time for delivery and settlement, which is more convenient and quicker than only being able to deliver and settle cash or bonds.
[0101] Embodiment 2:
[0102] In order to avoid the problem of redundant data in the database, before the first cash delivery message and the first bond delivery message, as well as the corresponding contract identification information are saved in the database, the embodiment of the present application also determines whether the data in the database already contains the relevant information of the contract, so as to prevent the occurrence of duplicate data. The specific implementation method is: determining whether the message corresponding to the contract identification information is saved in the database, and if not, performing the process of saving the first cash delivery message and the first bond delivery message, as well as the corresponding contract identification information in the database.
[0103] Before saving the first cash settlement message and the first bond settlement message, and the corresponding contract identification information to the database, determine whether the database has saved a cash settlement message or a bond settlement message corresponding to the contract identification information. If not, it proves that the message corresponding to the contract identification information does not exist in the database. At this time, the first cash settlement message and the first bond settlement message generated in step 102, and the corresponding contract identification information can be directly saved to the database.
[0104] In a possible implementation, before the first cash settlement message and the first bond settlement message, and the corresponding contract identification information are saved in the database, it can be determined whether the database contains the contract identification information. If not, it means that the contract is a newly added contract and the information of the contract does not exist in the database. In this case, the first cash settlement message and the first bond settlement message generated in step 102, and the corresponding contract identification information can be saved in the database.
[0105] Figure 3 A schematic diagram of a simplified process for storing a message for modifying a contract when the contract is stored in a database provided in an embodiment of the present application, such as Figure 5 As shown, after the contract access is modified, the liquidation tasks generated include the liquidation tasks of the planned cash flow and the liquidation tasks of the planned bond flow, and different liquidation paths are associated according to different liquidation tasks. The new and old liquidation tasks are compared. For the changed planned cash flow or planned bond flow, the old delivery cash flow or delivery bond flow will be invalidated first, and then a new delivery cash flow or delivery bond flow will be generated according to the modified contract information, and the association processing operation of the delivery cash flow and the delivery bond flow will be re-performed. In subsequent liquidations, the liquidation processing will be performed according to the newly associated delivery flow. In other words, before the first cash delivery message and the first bond delivery message, as well as the corresponding contract identification information are saved in the database, it is necessary to first delete the first cash delivery message and the first bond delivery message in one data in the database, and save the newly generated first cash delivery message or first bond delivery message in a group of data.
[0106] In the application embodiment, it is determined whether a message corresponding to the contract identification information is saved in the database. If not, the first cash settlement message and the first bond settlement message, as well as the contract identification information are saved in the database accordingly, thereby ensuring the integrity of the data in the database.
[0107] Embodiment 3:
[0108] Based on the above embodiment, this embodiment explains the situation of determining whether a message corresponding to the contract identification information is stored in the database.
[0109] If a message corresponding to the contract identification information is stored in the database, the method further includes:
[0110] If the database stores a message identical to either the first cash settlement message or the first bond settlement message, the identical message in the first cash settlement message or the first bond settlement message is discarded.
[0111] The first cash settlement message, the first bond settlement message, and the contract identification information are correspondingly saved in the database, including:
[0112] The messages that are not discarded in the first cash delivery message and the first bond delivery message and the contract identification information are correspondingly saved in the database, and the messages that are not discarded are used to replace the messages that are previously saved in the database that are different from the first cash delivery message and the first bond delivery message.
[0113] According to the contract identification information, all messages saved in the database are acquired, including all second cash delivery messages and second bond delivery messages corresponding to the contract identification information.
[0114] In a possible implementation, the first cash delivery message may be compared with all messages in the database to determine whether the database contains a message identical to the first cash delivery message; the first bond delivery message may be compared with all messages in the database to determine whether the database contains a message identical to the first bond delivery message.
[0115] In one possible implementation, the first cash delivery message may be compared with all second cash delivery messages to determine whether the database contains a second cash delivery message that is identical to the first cash delivery message; the first bond delivery message may be compared with all second bond delivery messages to determine whether the database contains a second bond delivery message that is identical to the first bond delivery message.
[0116] If there is a second cash delivery message that is identical to the first cash delivery message, the first cash delivery message is discarded; if there is a second bond delivery message that is identical to the first bond delivery message, the first bond delivery message is discarded.
[0117] The messages that are not discarded in the first cash delivery message and the first bond delivery message and the contract identification information are correspondingly saved in the database, and the messages that are not discarded are used to replace the messages that are previously saved in the database that are different from the first cash delivery message and the first bond delivery message.
[0118] In the present application, a transaction information group is input into a message template, and a first delivery message is generated accordingly. Therefore, if the transaction information in a transaction information group has not changed, the first delivery message generated accordingly is the same as the second delivery message saved in the database; if the transaction information in a transaction information group has changed, the first delivery message generated accordingly is different from the second delivery message 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. The initial version contains message 1, message 2, and message 3. If the transaction information in the transaction information group corresponding to message 2 changes, and the transaction information in the transaction information group corresponding to message 1 and message 3 does not change, a new version of contract A is obtained. The new version number of contract A is 2, and the corresponding messages generated are message a, message b, and message c. Since only the transaction information in the transaction information group corresponding to message 2 has changed, 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, message a and message c of contract A with version number 2 can be discarded. If 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 1 is replaced with message b of contract A with version number 2. In addition, after the message content is replaced, the version number of contract A in the database is changed to 2. In other words, the information of message 1 and message 3 of contract with version number 1 is retained, message 2 of contract with version number 1 is replaced with message b of contract with version number 2, and the version number of contract A in the database is changed to 2.
[0120] In an embodiment of the present application, it is determined whether the message corresponding to the contract identification information stored in the database is the same as any first cash delivery message and any first bond delivery message. If so, the identical messages in the first cash delivery message and the first bond delivery message are discarded, and the messages not discarded in the first cash delivery message and the first bond delivery message and the corresponding contract identification information are saved in the database, and the messages not discarded are used to replace the messages previously saved in the database that are different from the first cash delivery message and the first bond delivery message, thereby avoiding redundancy of data in the database.
[0121] In addition, it should be noted that when sending a delivery message in the financial field, the system will send the newly generated delivery message in the database to the corresponding custodian bank. For example, if message A and message B are newly generated for the same contract, the system will send message A and message B to the corresponding custodian bank. If there is a message C that has been sent in the database, and the newly generated message contains the same message C, if the same message C that has been sent in the database is replaced, the system will send message C again. However, this application adopts the method of discarding the newly generated identical message and retaining the identical message already in the database. For some identical messages that have been sent, the problem of repeated sending can be avoided, reducing the risk of delivery and settlement tasks.
[0122] Embodiment 4:
[0123] The embodiment of the present application fully explains the process of determining whether there is a message in the database that is identical to the first cash settlement message or the first bond settlement message.
[0124] Extracting the first version number and transaction element information contained in the first delivery message; and generating a first key based on the transaction element information.
[0125] The first delivery message refers to the first cash delivery message or the first bond delivery message.
[0126] The first version number refers to the value of the contract version record, for example, version number 1, version number 2, etc. All messages generated by the transaction information of the contract with the same version number have the same version number. For example, all messages generated by the transaction information of the contract with version number 1 have a version number of 1. In this application, each modification of the data of the original version of the contract is regarded as the generation of a new version, and the version number of the contract is increased by 1 accordingly. The information of the transaction elements refers to the main transaction information such as the delivery date, bond type, and bond quantity.
[0127] The information of cash transaction elements includes at least one of the counterparty, cash delivery date, clearing currency, first custodian bank, clearing amount and first transaction type. The information of bond transaction elements includes at least one of the bond face value, second transaction type, counterparty, clearing currency, second custodian bank, bond delivery date, bond code and bond quantity.
[0128] The first transaction type refers to the planned cash flow type, such as principal, interest, borrowing fees, etc. The second transaction type refers to the planned bond flow type, such as pledge freeze, pledge thawing, first transaction, maturity transaction, etc. The first custodian bank and the second custodian bank can be the same or different. The cash delivery date and the bond delivery date can be the same or different.
[0129] For ease of understanding, examples are given of possible situations that may arise from specific modifications to different contract types. For example, a bond contract for bond lending may have a contract version number 1 with some transaction information such as "borrowing No. A to start interest, No. B to mature, x shares of target a bond, y shares of mortgage b bond", and before No. B, the contract was modified, and the modification content was "No. C replaces the mortgage bond with m shares of b bond". In this case, the first transaction and pledge freeze data of No. A will continue to be retained, the mature transaction and loan interest data of No. B will continue to be retained, and the pledge unfreeze of y shares of b bonds of No. B will become invalid. Correspondingly, the pledge unfreeze of y shares of b bonds of No. C, the pledge unfreeze of m shares of b bonds of No. C, and the pledge unfreeze of m shares of b bonds of No. B.
[0130] For another example, for a bond contract for a non-open buyout bond repo, there may be a part of the transaction information with the contract version number 1, which is "A starts to accrue interest, B expires, and b bonds q shares are pledged". Before B, the contract was modified, and the modification content is "C changes the pledged bonds to b bonds w shares". At this time, the first transaction and pledge freezing data of A continue to be retained, the expired transaction and loan interest data of B continue to be retained, and the pledged unfreezing of b bonds q shares of B is invalid. Correspondingly, C pledges unfreeze b bonds q shares, C pledges unfreeze b bonds w shares, and B pledges unfreeze b bonds w shares. After C and before B, the contract was modified again, and the modification content is "D transaction changes to mortgage b bonds e shares". At this time, all transaction information before C continues to be retained, all planned cash flows that have not changed in the contract continue to be retained, B pledges unfreeze b bonds w shares are invalid, C pledges b bonds w shares have passed the delivery date, and B pledges unfreeze b bonds e shares.
[0131] That is to say, the corresponding delivery cash flow and delivery bond flow are obtained according to the modified transaction information of the planned cash flow or planned bond flow. That is, when the first transaction information or the second transaction information is modified, the first transaction information group or the second transaction information group will also be modified accordingly; if the first transaction information or the second transaction information has not changed, the first transaction information group or the second transaction information group will continue to be retained. The corresponding message is generated according to the modified first transaction information group or the second transaction information group.
[0132] If the first delivery message is a first cash delivery message, extract the first version number of each cash transaction information and cash transaction element information contained in the first cash delivery message, generate a first key corresponding to the first cash delivery message based on a preset encryption algorithm, and simultaneously obtain the first version number corresponding to the first cash delivery message.
[0133] If the first delivery message is the first bond delivery message, extract the first version number of the transaction information of each bond and the information of the bond transaction elements contained in the first bond delivery message, generate the first key corresponding to the first bond delivery message based on the preset encryption algorithm, and obtain the first version number corresponding to the first bond delivery message at the same time.
[0134] Determine whether there exists in the database a second version number and a second key of the second delivery message that are the same as the first version number and the first key.
[0135] The second delivery message refers to the second cash delivery message and the second bond delivery message stored in the database. The second version number refers to the version number corresponding to the contract stored in the database.
[0136] The second key includes a key corresponding to the second cash delivery message and a key corresponding to the second bond delivery message. The second key corresponding to the second cash delivery message is generated based on the information of each cash transaction element in the second cash delivery message and based on a preset encryption algorithm; the second key corresponding to the second bond delivery message is generated based on the information of each bond transaction element in the second bond delivery message and based on a preset encryption algorithm.
[0137] Obtain a second version number and a second key corresponding to the second delivery message.
[0138] Figure 4 A schematic diagram of a specific process for determining whether there is a second cash delivery message in a database that is the same as the first cash delivery message provided for the implementation of the present application, such as Figure 4 As shown, the process includes the following steps:
[0139] S401: Compare the first key of the first cash delivery message with the second keys of all second cash delivery messages to determine whether there is a second key identical to the first key in the database.
[0140] If not, execute S402; if so, execute S403.
[0141] Based on the information of each cash transaction element in the first cash delivery message, a first key corresponding to the first cash delivery message is generated based on a preset encryption algorithm. Based on the information of each cash transaction element in the second cash delivery message, a second key corresponding to the second cash delivery message is generated based on a preset encryption algorithm. It is determined whether there is a second key that is the same as the first key in the database.
[0142] S402: If there is no second key identical to the first key, a result is obtained that the first cash delivery message is different from the second cash delivery message in the database.
[0143] S403: If there is a second key that is the same as the first key, determine whether the second version number of the second cash delivery message is consistent with the first version number of the first cash delivery message.
[0144] If yes, execute S404; if no, execute S405.
[0145] S404: If the second version number is consistent with the first version number, a result is obtained that the first cash settlement message is the same as the second cash settlement message in the database.
[0146] S405: If the second version number is inconsistent with the first version number, a result is obtained that the first cash settlement message and the second cash settlement message in the database are different.
[0147] Figure 5 A schematic diagram of a specific process for determining whether there is a second bond delivery message in a database that is the same as the first bond delivery message provided for the implementation of this application, such as Figure 5 As shown, the process includes the following steps:
[0148] S501: Compare the third key of the first bond delivery message with the fourth keys of all second bond delivery messages to determine whether there is a fourth key identical to the third key in the database.
[0149] If not, execute S502; if so, execute S503.
[0150] Based on the information of each bond transaction element in the first bond delivery message, a third key corresponding to the first bond delivery message is generated based on a preset encryption algorithm. Based on the information of each bond transaction element in the second bond delivery message, a fourth key corresponding to the second bond delivery message is generated based on a preset encryption algorithm. It is determined whether there is a fourth key that is the same as the third key in the database.
[0151] S502: If there is no fourth key that is the same as the third key, a result is obtained that the first bond delivery message is different from the second bond delivery message in the database.
[0152] S503: If there is a fourth key that is the same as the third key, determine whether the second version number of the second bond delivery message is consistent with the first version number of the first bond delivery message.
[0153] If yes, execute S504; if no, execute S505.
[0154] S504: If the second version number is consistent with the first version number, then the result obtained is that the first bond delivery message is the same as the second bond delivery message in the database.
[0155] S505: If the second version number is inconsistent with the first version number, a result is obtained that the first bond delivery message and the second bond delivery message in the database are different.
[0156] In the embodiment of the present application, by extracting the first version number and transaction element information contained in the first delivery message; generating the first key based on the transaction element information; determining that there is a second delivery message in the database and the second key is the same as the first key and determining that the second version number of the second delivery message is the same as the first version number, it is determined that the first delivery message is the same as the second delivery message in the database. In this way, it is more accurate to double-judge whether there are identical messages in the database, reduce the occurrence of errors in message identification, and ensure the accuracy of subsequent changes to messages in the database.
[0157] Embodiment 5:
[0158] Before the embodiment of the present application saves the first cash delivery message, the first bond delivery message, and the corresponding contract identification information to the database, it is also determined whether the delivery date of the first cash delivery message and the delivery time of the first bond delivery message are the same. If they are the same, the first cash delivery message and the first bond delivery message are associated to facilitate the search for data in the database. Figure 6 A schematic diagram of a specific process of delivery message association provided in an embodiment of the present application, such as Figure 6 As shown, the process includes the following steps:
[0159] S601: Determine whether the delivery date carried in the first cash delivery message and the first bond delivery message is consistent.
[0160] If yes, go to S602; if no, go to S603.
[0161] The delivery date refers to the settlement date when the buyer and seller pay the other party for the currency or bonds purchased in accordance with the contract. The first cash delivery message contains the specific delivery date of the transaction information, that is, the specific time when the cash needs to be settled. The first bond delivery message carries the specific delivery date of the bond containing the transaction information, that is, the specific time when the bonds need to be settled.
[0162] S602: If the delivery dates carried in the first cash delivery message and the first bond delivery message are consistent, then a subsequent process of saving the first cash delivery message and the first bond delivery message, as well as the contract identification information, to a database accordingly is performed.
[0163] The contract identification information, the first cash settlement message and the first bond settlement message are saved as a group in a database.
[0164] S603: If the delivery dates carried in the first cash delivery message and the first bond delivery message are inconsistent, the first cash delivery message and the contract identification information are correspondingly saved in the database, and the first bond delivery message and the contract identification information are correspondingly saved in the database.
[0165] The contract identification information and the first cash settlement message are saved as a group in the database, and the contract identification information and the first bond settlement message are saved as a group in the database.
[0166] In a possible implementation, by analyzing different types of contracts, for the delivery flows that are delivered and cleared on the same day, for example, for spot bond trading and bond repurchases without price changes, it is only necessary to associate and save according to the opposite direction of payment and receipt; for bond lending, it is necessary to associate and save the underlying bonds and lending fees. In addition, for bond repurchases with price changes, a grouping concept is added. For each bond change or price change, the group number increases by 1. For multiple operations, the group number increases in sequence. That is, the above embodiment points out that the version number of the contract increases by 1 each time the contract is modified.
[0167] Considering that bond contract access is multi-threaded concurrent processing, it is possible that the delivery cash flow is generated first, or the delivery bond flow is generated first. That is to say, when the first cash delivery message and the first bond delivery message are generated, it is possible that the first cash delivery message is generated first, or the first bond delivery message is generated first. Because different contract types may have different situations, it is necessary to consider which one is generated first when processing. Based on the above analysis, the association preprocessing process can be divided into: the process when the first cash delivery message is generated first and the process when the first bond delivery message is generated first.
[0168] Figure 7 A schematic diagram of a specific process in which a first cash settlement message is generated in an embodiment of the present application is provided, such as Figure 7 As shown, read the first cash delivery message list; query the first bond delivery message under the same contract; if the delivery date of the first cash delivery message and the delivery date of the first bond delivery message are the same day; then the first bond delivery message of the bond lending contract is associated with the first cash delivery message, the first cash delivery message of the contract with the same version number and inconsistent payment type of the price change and bond swap contract is associated with the first bond delivery message, and the first cash delivery message of the contract with inconsistent payment type of the non-price change and bond swap contract is associated with the first bond delivery message, and saved to the database. If the delivery date of the first cash delivery message and the delivery date of the first bond delivery message are the same day, the existing association is released and saved to the database.
[0169] Figure 8 A schematic diagram of a specific process in which a first bond delivery message is generated in an embodiment of the present application is shown as follows: Figure 8 As shown, read the first bond delivery message list; query the first cash delivery message under the same contract; if the delivery date of the first cash delivery message and the delivery date of the first bond delivery message are the same day; then the first cash delivery message with the same version number of the contract for price change and inconsistent payment type is associated with the first bond delivery message, and the first cash delivery message with inconsistent payment type of the contract for non-price change and exchange is associated with the first bond delivery message, and saved to the database. If the delivery date of the first cash delivery message and the delivery date of the first bond delivery message are the same day, the existing association is released and saved to the database.
[0170] In an embodiment of the present application, by judging whether the delivery date of the first cash delivery message and the delivery date of the first bond delivery message are the same day, the first cash delivery message and the first bond delivery message of the same day are correspondingly associated and saved, so as to facilitate the search for data in the database. In addition, the technical solution based on the present application can meet the needs of all types of bond products in the financial market and is easy to expand. After processing, the subsequent clearing process no longer needs to pay attention to the types of different products, but only needs to pay attention to the planned capital flow, planned bond flow and the relationship between the first cash delivery message and the first bond delivery message. It not only has no effect on the process of non-bond products (foreign exchange, borrowing, precious metals), but also can be registered only according to the capital flow and bond flow, which is convenient for users to use; and when sending a clearing message, it is faster to send different clearing messages by judging whether there is an association.
[0171] Embodiment 7:
[0172] In order to make the generation of messages more accurate, the embodiments of the present application set different templates to generate corresponding messages. Fig. 9 A schematic diagram of a specific process of selecting a template for a first cash delivery message and generating a corresponding message provided in an embodiment of the present application, such as Fig. 9 As shown, the process includes the following steps:
[0173] S901: Extract the target payment type for the settlement process in the contract; the target payment type includes one of large amount of local currency payment, overseas local currency payment, and foreign currency payment.
[0174] The payment type of settlement processing refers to the payment method used in settlement settlement. According to the different payment methods, the payment type is divided into large amount local currency payment CNAPS, overseas local currency payment CIPS, foreign currency payment, etc.
[0175] The contract contains the target payment type for the settlement process, which is any of the above payment types. For example, the target payment type of contract B is a large amount of local currency payment.
[0176] S902: Obtain a target transaction type corresponding to each first transaction information group; wherein the target transaction type includes a collection transaction or a payment transaction.
[0177] The target transaction type includes a collection transaction or a payment transaction. The target transaction type of the first transaction information group is determined based on whether the clearing amount in each first transaction information group is positive or negative. When the clearing amount in the first transaction information group is positive, it is a collection transaction; when the clearing amount in the first transaction information group is negative, it is a payment transaction.
[0178] S903: Determine the target payment type and target transaction type, and the corresponding target cash message template according to the pre-saved correspondence between the payment type and transaction type and the cash message template.
[0179] Fig.10 A schematic diagram of a plurality of pre-saved templates provided in an embodiment of the present application, such as Fig.10 As shown, multiple templates for payment types such as CNAPS, CIPS, SWIFT-MT and SWIFT-ISO are pre-stored. Different message generation templates are set for transaction types corresponding to each payment type.
[0180] S904: Based on each first transaction information group and the target cash message template, generate a corresponding first cash settlement message.
[0181] The first cash settlement message contains all the data in the first transaction information group, contract identification information, message transceiver system code, message type code and other field information.
[0182] In the embodiment of the present application, the target payment type and the target transaction type are determined according to the correspondence between the pre-saved payment type and the transaction type and the cash message template, and the corresponding target cash message template is generated based on the template and each first transaction information group is generated to generate the corresponding first cash delivery message. Different templates are set according to different payment types and transaction types, and the generated first cash delivery message can directly determine the payment type and transaction type of the first cash delivery message, so that the generated first cash delivery message can be intuitively distinguished, which is convenient for clearing and collecting payments to send different collection messages through the message.
[0183] Embodiment 8:
[0184] Based on each second transaction information group and a pre-saved bond message template, a corresponding first bond delivery message is generated.
[0185] The embodiment of the present application also sets a corresponding bond message template for the generation of the first bond message, so that the generated first bond delivery message is more unified and intuitive.
[0186] Embodiment 9:
[0187] The present 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 delivery message and the first bond delivery message based on the determined final transaction information.
[0188] The 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, that is, the first transaction information group.
[0189] Using planned cash flow as an example, the process of comparing new transaction information with old transaction information is explained. Fig.11 A schematic diagram of a process of comparing a new version of the planned cash flow with an old version of the planned cash flow provided in an embodiment of the present application is shown in FIG. Fig.11 As shown, the process includes:
[0190] S1101: For a new contract, determine whether there is an old version of the planned cash flow corresponding to the contract in the database.
[0191] If yes, execute S1102; if no, execute S1109.
[0192] The new version of the planned cash flow is the planned cash flow composed of the transaction information of the newly input contract; the old version of the planned cash flow is the planned cash flow composed of the transaction information of the contract saved in the database.
[0193] S1102: If an old version of the planned cash flow corresponding to the contract exists in the database, 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 an 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 version of the planned cash flow is different from the version number of the old version of the planned cash flow.
[0195] S1103: loop through each new version of planned cash flow, generate the key Key1 of the new version of planned cash flow according to the main transaction information, and save the transaction data of each planned cash flow and the key Key1 in the Map list.
[0196] S1104: loop through each old version of planned cash flow and generate the key Key2 of the old version of planned cash flow according to the main transaction information.
[0197] S1105: For each key Key2 of the old version planned cash flow, determine whether the old version key Key2 exists in the new version planned cash flow Map list.
[0198] If yes, execute S1106; if no, execute S1108.
[0199] S1106: Determine whether the version number of the new version of the planned cash flow corresponding to the key Key1 is the same as the version number of the old version of the planned cash flow corresponding to the key Key2.
[0200] If yes, execute S1107; if no, execute S1108.
[0201] S1107: Determine the transaction information of the old version of the planned cash flow as the final transaction information.
[0202] S1108: Determine the transaction information of the new version of the planned cash flow and the transaction information of the old version of the planned cash flow as final transaction information.
[0203] S1109: If the old version of the planned cash flow corresponding to the contract does not exist in the database, the transaction information of the new version of the planned cash flow is determined to be the final transaction information.
[0204] If an old version of the planned cash flow corresponding to the contract exists in the database, it means that the contract is newly added.
[0205] Embodiment 10:
[0206] Based on the same inventive concept, on the basis of the above embodiments, the present application provides a delivery preprocessing device, see Fig.12 , Fig.12 A schematic diagram of a delivery preprocessing device provided in some embodiments is shown, the device comprising:
[0207] The acquisition module 1201 is used to acquire the contract to be delivered corresponding to 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] Processing module 1202 is used to take the first transaction information of the same delivery date and the same custodian bank as the first transaction information group; generate a corresponding first cash delivery message based on each first transaction information group; take the second transaction information of the same delivery date and the same custodian bank as the second transaction information group; generate a corresponding first bond delivery message based on each second transaction information group; and save the first cash delivery message and the first bond delivery message, as well as the contract identification information correspondingly to the database.
[0209] In a possible implementation manner, the device further includes a determination module 1203;
[0210] The judgment module 1203 is used to judge whether a message corresponding to the contract identification information is stored in the database before the first cash settlement message and the first bond settlement message and the contract identification information are correspondingly stored in the database;
[0211] The processing module 1202 is further configured to, if not, perform a process of saving the first cash settlement message, the first bond settlement message, and the contract identification information correspondingly to a database.
[0212] In a possible implementation, the processing module 1202 is also used to discard the identical message in the first cash delivery message and the first bond delivery message if the database stores therein a message identical to either the first cash delivery message or the first bond delivery message; saving the first cash delivery message and the first bond delivery message, and the contract identification information correspondingly to the database includes: saving the non-discarded messages in the first cash delivery message and the first bond delivery message, and the contract identification information correspondingly to the database, and using the non-discarded messages to replace the messages previously stored in the database that are different from the first cash delivery message and the first bond delivery message.
[0213] In a possible implementation, the processing module 1202 is specifically configured to extract the first version number and transaction element information contained in the first delivery message; and generate a first key based on the transaction element information;
[0214] The judgment module 1203 is specifically used to judge whether there exists in the database a second version number and a second key of a second delivery message which are the same as the first version number and the first key.
[0215] In a possible implementation, the information of cash transaction elements includes at least one of a transaction counterparty, a cash delivery date, a clearing currency, a first custodian bank, a clearing amount, and a first transaction type.
[0216] In a possible implementation, the information of the bond transaction elements includes at least one of the bond face value, the second transaction type, the transaction counterparty, the clearing currency, the second custodian bank, the bond delivery date, the bond code and the bond quantity.
[0217] In a possible implementation manner, the judgment module 1203 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 and the contract identification information are correspondingly saved in the database;
[0218] The processing module 1202 is further configured to perform a subsequent process of saving the first cash settlement message, the first bond settlement message, and the contract identification information correspondingly to a database if yes.
[0219] In a possible implementation, the processing module 1202 is further used to save the first cash delivery message and the contract identification information correspondingly to the database, and save the first bond delivery message and the contract identification information correspondingly to the database if the delivery dates carried in the first cash delivery message and the first bond delivery message are inconsistent.
[0220] In a possible implementation, the acquisition module 1201 is specifically used to extract the target payment type of the delivery 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; obtain the target transaction type corresponding to each first transaction information group; wherein the target transaction type includes a collection transaction or a payment transaction;
[0221] The processing module 1202 is specifically used to determine the target payment type and the target transaction type, and the corresponding target cash message template according to the pre-saved correspondence between the payment type and the transaction type and the cash message template; and generate a corresponding first cash settlement message based on each first transaction information group and the target cash message template.
[0222] In a possible implementation, the processing module 1202 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.
[0223] Embodiment 11:
[0224] Based on the same inventive concept, on the basis of the above embodiments, the present application embodiment further provides an electronic device, which can realize the functions of the delivery preprocessing device discussed above, please refer to Fig.13 , Fig.13 A schematic diagram of the structure of an electronic device provided in some embodiments is shown, the electronic device comprising: 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 delivered corresponding to 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] The first transaction information with the same delivery date and the same custodian bank is taken as the first transaction information group; based on each first transaction information group, a corresponding first cash delivery message is generated; the second transaction information with the same delivery date and the same custodian bank is taken as the second transaction information group; based on each second transaction information group, a corresponding first bond delivery message is generated; the first cash delivery message, the first bond delivery message, and the contract identification information are correspondingly saved in the database.
[0228] In a possible implementation, the processor 1301 is further used to determine whether a message corresponding to the contract identification information is saved in the database before saving the first cash settlement message, the first bond settlement message, and the contract identification information corresponding to the database; if not, performing a process of saving the first cash settlement message, the first bond settlement message, and the contract identification information corresponding to the database.
[0229] In a possible implementation, the processor 1301 is further used to discard the identical message in the first cash delivery message and the first bond delivery message if the database stores therein a message identical to either the first cash delivery message or the first bond delivery message; saving the first cash delivery message and the first bond delivery message, and the contract identification information correspondingly to the database includes: saving the non-discarded messages in the first cash delivery message and the first bond delivery message, and the contract identification information correspondingly to the database, and replacing the messages previously stored in the database that are different from the first cash delivery message and the first bond delivery message with the non-discarded messages.
[0230] In one possible implementation, the processor 1301 is specifically used to extract the first version number and transaction element information contained in the first delivery message; generate a first key based on the transaction element information; and determine whether there is a second version number and a second key of a second delivery message in the database that are the same as the first version number and the first key.
[0231] In a possible implementation, the information of cash transaction elements includes at least one of a transaction counterparty, a cash delivery date, a clearing currency, a first custodian bank, a clearing amount, and a first transaction type.
[0232] In a possible implementation, the information of the bond transaction elements includes at least one of the bond face value, the second transaction type, the transaction counterparty, the clearing currency, the second custodian bank, the bond delivery date, the bond code and the bond quantity.
[0233] In a possible implementation, the processor 1301 is further used to determine whether the delivery dates carried in the first cash delivery message and the first bond delivery message, and the contract identification information are consistent before saving the first cash delivery message, the first bond delivery message, and the contract identification information correspondingly to the database; if so, performing a subsequent process of saving the first cash delivery message, the first bond delivery message, and the contract identification information correspondingly to the database.
[0234] In a possible implementation, the processor 1301 is further used to save the first cash delivery message and the contract identification information correspondingly to the database, and save the first bond delivery message and the contract identification information correspondingly to the database if the delivery dates carried in the first cash delivery message and the first bond delivery message are inconsistent.
[0235] In a possible implementation, the processor 1301 is specifically configured to extract a target payment type for the settlement processing in the contract; wherein the target payment type includes one of a large amount of local currency payment, an overseas local currency payment, and a foreign currency payment; obtain a target transaction type corresponding to each first transaction information group; wherein the target transaction type includes a collection transaction or a payment transaction;
[0236] According to the correspondence between the pre-saved payment type and transaction type and the cash message template, the target payment type and the target transaction type and the corresponding target cash message template are determined; based on each first transaction information group and the target cash message template, a corresponding first cash settlement message is generated.
[0237] In a possible implementation manner, the processor 1301 is specifically configured to generate a corresponding first bond delivery message based on each second transaction information group and a pre-saved bond message template.
[0238] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0239] The communication interface 1302 is used for communication between the above electronic device and other devices.
[0240] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0241] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0242] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the following steps:
[0243] Obtain the contract to be delivered corresponding to 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] Taking the first transaction information of the same delivery date and the same custodian bank as the first transaction information group; generating a corresponding first cash delivery message based on each first transaction information group;
[0245] The second transaction information of the same delivery date and the same custodian bank is used as a second transaction information group; based on each second transaction information group, a corresponding first bond delivery message is generated;
[0246] The first cash settlement message, the first bond settlement message, and the contract identification information are correspondingly saved in a database.
[0247] In a possible implementation manner, before the first cash settlement message, the first bond settlement message, and the contract identification information are correspondingly saved in a database, the method further includes:
[0248] Determine whether a message corresponding to the contract identification information is stored in the database; if not, save the first cash settlement message and the first bond settlement message, as well as the contract identification information, to the database.
[0249] In a possible implementation manner, if a message corresponding to the contract identification information is stored in the database, the method further includes:
[0250] If the database stores a message identical to either the first cash delivery message or the first bond delivery message, discarding the identical message in the first cash delivery message or the first bond delivery message;
[0251] The step of correspondingly saving the first cash settlement message, the first bond settlement message, and the contract identification information to a database includes:
[0252] The messages that are not discarded in the first cash settlement message and the first bond settlement message and the contract identification information are correspondingly saved in a database, and the messages that are not discarded are used to replace the messages that are previously saved in the database and are different from the first cash settlement message and the first bond settlement message.
[0253] In a possible implementation manner, the process of determining whether there is a message in the database that is identical to the first cash settlement message or the first bond settlement message includes:
[0254] Extracting the first version number and transaction element information contained in the first delivery message; generating a first key based on the transaction element information;
[0255] Determine whether there exists in the database a second version number and a second key of a second delivery message that are the same as the first version number and the first key.
[0256] In a possible implementation, the information of cash transaction elements includes at least one of a transaction counterparty, a cash delivery date, a clearing currency, a first custodian bank, a clearing amount, and a first transaction type.
[0257] In a possible implementation, the information of the bond transaction elements includes at least one of the bond face value, the second transaction type, the transaction counterparty, the clearing currency, the second custodian bank, the bond delivery date, the bond code and the bond quantity.
[0258] In a possible implementation manner, before the first cash settlement message, the first bond settlement message, and the contract identification information are correspondingly saved in a database, the method further includes:
[0259] Determining whether the delivery date carried in the first cash delivery message and the first bond delivery message is consistent;
[0260] If so, a subsequent process is performed to save the first cash settlement message, the first bond settlement message, and the contract identification information correspondingly to the database.
[0261] In a possible implementation, the method further includes:
[0262] If the delivery dates carried in the first cash delivery message and the first bond delivery message are inconsistent, the first cash delivery message and the contract identification information are saved in the database accordingly, and the first bond delivery message and the contract identification information are saved in the database accordingly.
[0263] In a possible implementation, based on each first transaction information group, generating a corresponding first cash settlement message includes:
[0264] Extract the target payment type for the settlement process in the contract; wherein the target payment type includes one of large amount of local currency payment, overseas local currency payment, and foreign currency payment;
[0265] Acquire a target transaction type corresponding to each first transaction information group; wherein the target transaction type includes a collection transaction or a payment transaction;
[0266] Determine the target cash message template corresponding to the target payment type and the target transaction type according to the pre-saved correspondence between the payment type and the transaction type and the 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 a possible implementation, based on each second transaction information group, generating a corresponding first bond delivery message includes:
[0269] Based on each second transaction information group and a pre-saved bond message template, a corresponding first bond delivery message is generated.
[0270] The above-mentioned 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), etc., optical storage such as CD, DVD, BD, HVD, etc., and semiconductor storage such as ROM, EPROM, EEPROM.
[0271] Based on the same inventive concept, the embodiment of the present application further provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes any of the delivery preprocessing methods discussed above. Since the principle of solving the problem by the above computer program product is similar to that of the delivery preprocessing method, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.
[0272] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0273] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0274] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0275] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0276] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A delivery preprocessing method, characterized in that: The method comprises: Obtain the contract to be delivered corresponding to 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; Taking the first transaction information of the same delivery date and the same custodian bank as the first transaction information group; generating a corresponding first cash delivery message based on each first transaction information group; The second transaction information of the same delivery date and the same custodian bank is used as a second transaction information group; based on each second transaction information group, a corresponding first bond delivery message is generated; The first cash settlement message, the first bond settlement message, and the contract identification information are correspondingly saved in a database.
2. The method according to claim 1, characterized in that Before the first cash settlement message, the first bond settlement message, and the contract identification information are correspondingly saved in a database, the method further includes: Determine whether a message corresponding to the contract identification information is stored in the database; if not, save the first cash settlement message and the first bond settlement message, as well as the contract identification information, to the database.
3. The method according to claim 2, characterized in that If a message corresponding to the contract identification information is stored in the database, the method further includes: If the database stores a message identical to either the first cash delivery message or the first bond delivery message, discarding the identical message in the first cash delivery message or the first bond delivery message; The step of correspondingly saving the first cash settlement message, the first bond settlement message, and the contract identification information to a database includes: The messages that are not discarded in the first cash settlement message and the first bond settlement message and the contract identification information are correspondingly saved in a database, and the messages that are not discarded are used to replace the messages that are previously saved in the database and are different from the first cash settlement message and the first bond settlement message.
4. The method according to claim 3, characterized in that The process of determining whether there is a message in the database that is identical to the first cash settlement message or the first bond settlement message includes: Extracting the first version number and transaction element information contained in the first delivery message; generating a first key based on the transaction element information; Determine whether there exists in the database a second version number and a second key of a second delivery message that are the same as the first version number and the first key.
5. The method according to claim 4, characterized in that The information of cash transaction elements includes at least one of the counterparty, cash delivery date, clearing currency, first custodian bank, clearing amount and first transaction type.
6. The method according to claim 4, characterized in that The information of the transaction elements of the bond includes at least one of the bond face value, the second transaction type, the transaction counterparty, the clearing currency, the second custodian bank, the bond delivery date, the bond code and the bond quantity.
7. The method according to claim 1, characterized in that Before the first cash settlement message, the first bond settlement message, and the contract identification information are correspondingly saved in a database, the method further includes: Determining whether the delivery date carried in the first cash delivery message and the first bond delivery message is consistent; If so, a subsequent process is performed to save the first cash settlement message, the first bond settlement message, and the contract identification information correspondingly to the database.
8. The method according to claim 7, characterized in that The method further comprises: If the delivery dates carried in the first cash delivery message and the first bond delivery message are inconsistent, the first cash delivery message and the contract identification information are saved in the database accordingly, and the first bond delivery message and the contract identification information are saved in the database accordingly.
9. The method according to claim 1, characterized in that: Based on each first transaction information group, generating a corresponding first cash settlement message includes: Extract the target payment type for the settlement process in the contract; wherein the target payment type includes one of large amount of local currency payment, overseas local currency payment, and foreign currency payment; Acquire a target transaction type corresponding to each first transaction information group; wherein the target transaction type includes a collection transaction or a payment transaction; Determine the target cash message template corresponding to the target payment type and the target transaction type according to the pre-saved correspondence between the payment type and the transaction type and the cash message template; Based on each first transaction information group and the target cash message template, a corresponding first cash settlement message is generated.
10. The method according to claim 1, characterized in that Based on each second transaction information group, generating a corresponding first bond delivery message includes: Based on each second transaction information group and a pre-saved bond message template, a corresponding first bond delivery message is generated.
11. A delivery preprocessing device, characterized in that: The device comprises: An acquisition module, used to acquire a contract to be delivered corresponding to 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; A processing module is used to treat the first transaction information of the same delivery date and the same custodian bank as a first transaction information group; generate a corresponding first cash delivery message based on each first transaction information group; treat the second transaction information of the same delivery date and the same custodian bank as a second transaction information group; generate a corresponding first bond delivery message based on each second transaction information group; and save the first cash delivery message, the first bond delivery message, and the contract identification information in a database accordingly.
12. The device according to claim 11, characterized in that The device also includes a judgment module; The judgment module is used to judge whether a message corresponding to the contract identification information is stored in the database before the first cash delivery message and the first bond delivery message and the contract identification information are correspondingly stored in the database; The processing module is also used to, if not, save the first cash settlement message, the first bond settlement message, and the contract identification information correspondingly to the database.
13. The device according to claim 12, characterized in that The processing module is further configured to discard the same message as either the first cash settlement message or the first bond settlement message if the database stores the same message as either the first cash settlement message or the first bond settlement message; Saving the first cash delivery message, the first bond delivery message, and the contract identification information correspondingly to the database includes: saving the undiscarded messages in the first cash delivery message and the first bond delivery message and the contract identification information correspondingly to the database, and using the undiscarded messages to replace the messages previously saved in the database that are different from the first cash delivery message and the first bond delivery message.
14. The device according to claim 13, characterized in that The processing module is specifically configured to extract the first version number and transaction element information contained in the first delivery message; and generate a first key based on the transaction element information; The judgment module is specifically used to judge whether there exists in the database a second version number and a second key of a second delivery message which are the same as the first version number and the first key.
15. The device according to claim 14, characterized in that The information of cash transaction elements includes at least one of the counterparty, cash delivery date, clearing currency, first custodian bank, clearing amount and first transaction type.
16. The device according to claim 14, characterized in that The information of the transaction elements of the bond includes at least one of the bond face value, the second transaction type, the transaction counterparty, the clearing currency, the second custodian bank, the bond delivery date, the bond code and the bond quantity.
17. The device according to claim 11, characterized in that 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 and the contract identification information are correspondingly saved in the database; The processing module is further configured to, if yes, perform a subsequent process of saving the first cash settlement message, the first bond settlement message, and the contract identification information correspondingly to a database.
18. The device according to claim 17, characterized in that The processing module is also used to save the first cash settlement message and the contract identification information correspondingly to the database, and save the first bond delivery message and the contract identification information correspondingly to the database if the delivery dates carried in the first cash settlement message and the first bond delivery message are inconsistent.
19. The device according to claim 11, characterized in that The acquisition module is specifically used to extract the target payment type of the delivery 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; obtain the target transaction type corresponding to each first transaction information group; wherein the target transaction type includes a collection transaction or a payment transaction; The processing module is specifically used to determine the target payment type and the target transaction type, and the corresponding target cash message template according to the pre-saved correspondence between the payment type and the transaction type and the cash message template; and generate a corresponding first cash settlement message based on each first transaction information group and the target cash message template.
20. The device according to claim 11, characterized in that The processing module is specifically used to generate a corresponding first bond delivery message based on each second transaction information group and a pre-saved bond message template.
21. An electronic device, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the method according to any one of claims 1 to 10 according to the obtained program instructions.
22. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method according to any one of claims 1 to 10.
23. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Clearing and settlement method and device for bond transaction
CN114493615A
Method and device for processing bond position data
CN118898511A
Netting settlement system and method therefor, and computer program
JP2002352171A
Automatic financial instrument transaction system
WO2009089358A2