CN112102089A - Batch file processing method and system - Google Patents

Batch file processing method and system Download PDF

Info

Publication number
CN112102089A
CN112102089A CN202011030549.7A CN202011030549A CN112102089A CN 112102089 A CN112102089 A CN 112102089A CN 202011030549 A CN202011030549 A CN 202011030549A CN 112102089 A CN112102089 A CN 112102089A
Authority
CN
China
Prior art keywords
contract
receipt
message
updating
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011030549.7A
Other languages
Chinese (zh)
Other versions
CN112102089B (en
Inventor
唐松涛
尤见
黄鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202011030549.7A priority Critical patent/CN112102089B/en
Publication of CN112102089A publication Critical patent/CN112102089A/en
Application granted granted Critical
Publication of CN112102089B publication Critical patent/CN112102089B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a batch file processing method and a batch file processing system. The batch file processing method comprises the following steps: generating a contract and a receipt corresponding to the contract state according to an incoming message from an external transaction system; wherein the contract status includes a second contract identification; sending the contract corresponding to the second contract identification to an external contract compensation system so that the contract compensation system performs service compensation on the contract; receiving a contract after service compensation from a contract compensation system, and updating the contract state and the corresponding receipt of the contract after service compensation; and generating a receipt message according to the receipt and then sending the receipt message to the transaction system. The invention can control the post-transaction process and ensure the timeliness, the correctness and the accounting consistency of the transaction.

Description

Batch file processing method and system
Technical Field
The invention relates to the field of file processing, in particular to a batch file processing method and system.
Background
With the development of payment clearing technology, various innovative payment means continuously appear, great convenience is brought to the life of people, and meanwhile great challenges are brought to the stable operation and real-time response of a payment system. Real-time payment and batch payment are two main transaction processing modes of a payment system, and each mode has characteristics. The real-time payment transaction response speed is high, and the selectable payment service types are flexible and changeable. The batch payment supports batch file processing of the same type of payment service, and can process a large amount of payment data in a short time.
When the system processes the payment request file, the receipt and the acceptance file are interacted with the clearing mechanism in a quasi-real-time interaction mode in the daytime, and the receipt and the acceptance file are interacted with the clearing mechanism again in the quasi-real-time interaction mode after manual processing can be initiated to the transaction rejected by the system or an external system at any time. And clearing the clearing result file of the clearing organization at the end of the day, and performing consistency processing on the local transaction system and the external clearing system.
In the prior art, batch files are converted into single cluster processing. In banking IT practice, batch accounting file processing is often more important than the processing of other types of batch files. In order to ensure that batch accounting files are processed quickly and efficiently, transaction data in the files can be processed in a cluster concurrent mode (batch files are converted into single cluster processing): transaction data in the batch of financial documents are analyzed and loaded to a transaction detail table of the database, and an application server in the cluster processes the transaction detail table of the database by adopting a concurrency mechanism, so that the transaction processing time is shortened. And uniformly generating a result file after the transaction processing is completely finished and feeding back the result file.
The first prior art has a single transaction processing flow, cannot perform manual confirmation in the transaction processing process, and can know whether a transaction processing result is correct after all transaction processing is completed, because a batch processing result is confirmed once according to a transaction day, if a transaction error occurs in a T day or the transaction result is not expected, the result is confirmed in a T +1 day, and certain adverse effects are generated on the timeliness and the correctness of the transaction.
The second prior art is an optimistic locking mechanism based on processing state. The concurrent processing of multiple processes under a cluster needs to ensure the consistency of the application on the database operation and increase the content of the transaction data record processing state field. When multi-process concurrent processing is carried out, optimistic lock control is carried out on the content of the processing state field, transactional performance executed by database statements is utilized to ensure that transaction data can be accessed by a plurality of available processes at the same time, but can be successfully processed by only one process at the same time, and the concurrent processing performance of the program is improved.
Although the second system in the prior art can ensure the data consistency among transactions, a method for further controlling transaction flow is lacked. After the transaction detail data is processed, the subsequent process control of the transaction can not be carried out in a single processing state, and when a quasi-real-time mode is introduced to carry out receipt and acceptance file interaction with a clearing institution, the subsequent real-time interactive files are inconvenient to be matched.
Disclosure of Invention
The embodiment of the invention mainly aims to provide a batch file processing method and a batch file processing system, so as to control the post-transaction process and ensure the timeliness, the correctness and the accounting consistency of the transaction.
In order to achieve the above object, an embodiment of the present invention provides a batch file processing method, including:
generating a contract and a receipt corresponding to the contract state according to an incoming message from an external transaction system; wherein the contract status includes a second contract identification;
sending the contract corresponding to the second contract identification to an external contract compensation system so that the contract compensation system performs service compensation on the contract;
receiving a contract after service compensation from a contract compensation system, and updating the contract state and the corresponding receipt of the contract after service compensation;
and generating a receipt message according to the receipt and then sending the receipt message to the transaction system.
An embodiment of the present invention further provides a batch file processing system, including:
the contract unit is used for generating a contract and a receipt corresponding to the contract state according to an incoming message from an external transaction system; wherein the contract status includes a second contract identification;
the first sending unit is used for sending the contract corresponding to the second contract identification to an external contract compensation system so that the contract compensation system performs service compensation on the contract;
the contract compensation system comprises an updating unit, a contract compensation unit and a contract execution unit, wherein the updating unit is used for receiving a contract after service compensation from the contract compensation system and updating the contract state and the corresponding receipt of the contract after service compensation;
and the second sending unit is used for generating a receipt message according to the receipt and then sending the receipt message to the transaction system.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and runs on the processor, wherein the steps of the batch file processing method are realized when the processor executes the computer program.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, and the computer program realizes the steps of the batch file processing method when being executed by a processor.
The batch file processing method and the system of the embodiment of the invention firstly generate the contract and the receipt corresponding to the contract state according to the incoming message, then send the contract corresponding to the second contract identification to the contract compensation system, then update the contract state and the corresponding receipt of the contract according to the contract after service compensation, and finally generate the receipt message according to the receipt and send the receipt message to the transaction system, thereby controlling the post-transaction flow and ensuring the timeliness, the correctness and the financial consistency of the transaction.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method of processing a batch of files in an embodiment of the invention;
FIG. 2 is a schematic diagram of a batch file processing method according to an embodiment of the invention;
FIG. 3 is a flow chart of a method of batch file processing in another embodiment of the present invention;
FIG. 4 is a block diagram of a batch file processing system in an embodiment of the invention;
fig. 5 is a block diagram of a computer device in the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
In view of the fact that the timeliness and correctness of transactions in the prior art are poor and the subsequent real-time interactive files are inconvenient to match, the embodiment of the invention provides a batch file processing method to control the post-transaction process and ensure the timeliness, correctness and accounting consistency of transactions. The present invention will be described in detail below with reference to the accompanying drawings.
In the process of processing batch financial documents by multiple clusters simultaneously, in order to improve the timeliness and the accuracy of transactions and meet the requirements of quasi-real-time receipt and acceptance document interaction of a daytime external clearing system (transaction system), the invention provides a scheme capable of confirming transaction results and further compensating and correcting the transaction results for an external system under the condition of ensuring correct automatic document processing, so that the real-time interaction between other document contents and the external transaction system is not influenced when part of document contents are compensated by the transaction, and the interaction and consistency processing with the external system are ensured.
FIG. 1 is a flowchart of a batch file processing method according to an embodiment of the present invention. FIG. 2 is a diagram illustrating a batch file processing method according to an embodiment of the present invention. As shown in fig. 1-2, the batch file processing method includes:
s101: and generating a contract and a receipt corresponding to the contract state according to an incoming message from an external transaction system.
Wherein the contract status includes a first contract identification and a second contract identification; the first contract is identified as accepted and the second contract is identified as failed.
In specific implementation, a batch message register (message register), a batch message detail register and a batch receipt result temporary register (receipt register) are established. When an incoming message (xxxxxx.xml) is received, the content of the incoming message (transaction file) is inserted into a file processing table through a BDE (Borland Database Engine) post-issuance service, the content of the incoming message is loaded into a batch message register and a batch message detail register through the incoming file processing service, and the processing state of the incoming message in the batch message detail register is set to be processed. And then scanning the import record of which the message processing state is to be processed in the batch message detail registry through the import scanning service, and performing service processing after locking each scanned transaction (at the moment, the import message processing state is changed into processing), so as to generate a contract. The latter is an automatic processing program triggered after receiving the file transmitted by the external system, and can record the path and name of the file sent by the external system into the database.
When the bookkeeping is successful, the contract state is accepted, the generated contract number is recorded into the corresponding transaction data in the batch message detail register, and the corresponding receipt content (successful receipt) is updated into the batch message detail register and the temporary register of batch receipt results. When the accounting is failed, the contract state is changed into failure, the generated contract number is recorded into the corresponding transaction data in the batch message detail register, and the corresponding receipt content (failure receipt) is updated into the batch message detail register and the batch receipt result temporary register. In both cases the import message processing state in the batch message detail register is changed to process complete (all database actions described above are packaged as one transaction). And if the contract is abnormal, setting the processing state of the incoming message as processing failure.
S102: and sending the contract corresponding to the second contract identification to an external contract compensation system so that the contract compensation system performs service compensation on the contract.
Wherein the service compensation is manual compensation or compensation according to a preset rule.
S103: and receiving the contract after the service compensation from the contract compensation system, and updating the contract state and the corresponding receipt of the contract after the service compensation.
In specific implementation, when the service compensation is successful, the second contract identifier is updated to be the first contract identifier, and the corresponding failed receipt in the batch message detail register is updated to be the successful receipt.
S104: and generating a receipt message according to the receipt and then sending the receipt message to the transaction system.
In specific implementation, the current day receipt message processing state in the batch message detail register is scanned by the incoming receipt generation service every two hours to be the receipt transaction to be sent, the current day receipt message (xxxxxx.xml) is generated and transmitted to the transaction system through the BDE, and the receipt message processing state is changed into the sent receipt message processing state.
The execution subject of the batch file processing method shown in fig. 1 may be a computer. As can be seen from the process shown in fig. 1, the batch file processing method according to the embodiment of the present invention generates a contract and a receipt corresponding to a contract state according to an incoming message, then sends the contract corresponding to the second contract identifier to the contract compensation system, then updates the contract state and the corresponding receipt of the contract according to the contract after service compensation, and finally generates a receipt message according to the receipt and sends the receipt message to the transaction system.
FIG. 3 is a flow chart of a batch file processing method according to another embodiment of the invention. As shown in fig. 3, after executing S104, the method further includes:
s201: receiving a receipt clearing message from the transaction system.
In specific implementation, when a receipt clearing message (xxxxxx.xml) is received, the receipt clearing message is inserted into a file processing table, a receipt clearing result is loaded into a batch receipt result temporary register through a collection receipt clearing processing service, and the processing state of the receipt clearing message is set to be unprocessed. And updating the message processing state of each scanned record into processing by importing the receipt clearing scanning service, and updating a clearing result into a matched (sent) batch message detail register (initial state is INIT (initialization)) according to the unique identification number.
In one embodiment, before performing S201, the method further includes: receiving a receipt acceptance message from a transaction system; and when the receipt acceptance result in the receipt acceptance message is not accepted, updating the contract state corresponding to the receipt acceptance message into a second contract identifier.
In specific implementation, after receiving the incoming receipt acceptance message (xxxxxx.xml), the incoming receipt acceptance message is inserted into a file processing table, and the receipt processing result is updated into the batch message detail registry through the incoming receipt acceptance result processing service. And when the receipt acceptance result in the receipt acceptance message is not accepted, updating the contract state corresponding to the receipt acceptance message to be failed, and executing S102 to S104 again.
S202: updating the first contract identifier into a third contract identifier and updating the second contract identifier into a fourth contract identifier according to the receipt clearing result in the receipt clearing message; or
And updating the first contract identifier into a fourth contract identifier and updating the second contract identifier into a fifth contract identifier according to the receipt clearing result in the receipt clearing message.
In one embodiment, updating the first contract identifier to a third contract identifier and updating the second contract identifier to a fourth contract identifier according to the receipt clearing result in the receipt clearing message includes:
and when the receipt clearing result is successful, updating the first contract identification to be a third contract identification, and updating the second contract identification to be a fourth contract identification.
Wherein the third contract identification is successful and the fourth contract identification is unknown.
In specific implementation, for the transaction with successful clearing, if the contract state is accepted (the first contract identifier), the contract state is updated to be successful, and the receipt message processing state of the batch receipt result temporary register is updated to be processing completion. When the contract state is failed (second contract identification), updating the receipt message processing state of the batch receipt result temporary register to processing failure, updating the failure reason (such as the contract state is not matched with the receipt state) into the batch receipt result temporary register, updating the remittance state of the receiver of the contract to cleared, and setting the contract state in the contract table to be unknown. In both cases, the receipt message processing status in the batch message detail register is changed to general acknowledgement processed.
Updating the first contract identifier to a fourth contract identifier and updating the second contract identifier to a fifth contract identifier according to the receipt clearing result in the receipt clearing message comprises:
and when the receipt clearing result is failure, updating the first contract identification to be a fourth contract identification, and updating the second contract identification to be a fifth contract identification.
Wherein the fifth contract is identified as having failed.
In specific implementation, for the transaction which is not cleared successfully, if the contract state is failed (second contract identification), the contract state is updated to be failed, and the processing state of the receipt message in the receipt result temporary register is updated to be processing completion; when the contract state is accepted, updating the receipt message processing state of the batch receipt result temporary register to processing failure, updating the failure reason (such as the contract state is not matched with the receipt state) into the batch receipt result temporary register, updating the remittance state of the receiver of the contract to rejected, and setting the contract state in the contract table as unknown; and if the message processing state of the batch message detail register is processing failure (no contract is generated), updating the receipt message state of the batch receipt result temporary register to be processing failure, and updating a failure reason (no contract is generated) into the batch receipt result temporary register. The receipt message processing status in the batch message detail register is changed to general acknowledgement processed in all three cases.
S203: and sending the contract corresponding to the fourth contract identification to a contract compensation system so that the contract compensation system performs service compensation on the contract.
S204: and receiving the contract after the service compensation from the contract compensation system, and updating the contract state and the corresponding receipt of the contract after the service compensation.
Therefore, the invention can carry out service compensation processing on the transaction with the contract state of failure and invalidation. And after the service compensation is successful, the contract state is changed into accepted, and the corresponding receipt is changed from the failed receipt to the successful receipt.
In one embodiment, after executing S204, the method further includes: receiving a receipt revocation message from a transaction system; and when the receipt revocation message corresponds to the first contract identifier, updating the first contract identifier into a fifth contract identifier after conducting correction processing on the transaction corresponding to the receipt revocation message.
In specific implementation, when receiving the receipt revocation message, the receipt revocation message is inserted into the file processing table, the receipt revocation result is loaded into the batch receipt result temporary register through the incoming receipt revocation processing service, and the processing state of the receipt revocation message is set as unprocessed. And updating the message processing state of each scanned record into processing by importing a receipt revocation scanning service, and updating a revocation result into a matched batch message detail register (the initial state is INIT) according to the unique identification number (the receipt message processing state is INIT). If the contract state is accepted, the original transaction is corrected, the contract state is updated to be invalid after the contract state is successfully corrected, and the processing state of the receipt revocation message is set to be processed. If the contract state is failed or invalid, the state of the batch message detail register is updated to processing failure, the failure reason (withdrawal exception) is updated to the temporary register of the batch receipt result, the remittance state of the receiver of the contract is updated to withdrawn, the contract state in the contract table is set to unknown, and the processing state of the receipt withdrawal message in the batch message detail register is changed to abandoned.
The specific process of the embodiment of the invention is as follows:
1. and generating a contract and a receipt corresponding to the contract state according to an incoming message from an external transaction system.
2. And sending the contract corresponding to the second contract identification to an external contract compensation system so that the contract compensation system performs service compensation on the contract.
3. And receiving the contract after the service compensation from the contract compensation system, and updating the contract state and the corresponding receipt of the contract after the service compensation.
4. And generating a receipt message according to the receipt and then sending the receipt message to the transaction system.
5. And receiving a receipt acceptance message from the transaction system. And when the receipt acceptance result in the receipt acceptance message is not accepted, updating the contract state corresponding to the receipt acceptance message into a second contract identifier, and executing the steps 2 to 4.
6. Receiving a receipt clearing message from the transaction system. When the receipt clearing result is successful, updating the first contract identifier into a third contract identifier, and updating the second contract identifier into a fourth contract identifier; and when the receipt clearing result is failure, updating the first contract identification to be a fourth contract identification, and updating the second contract identification to be a fifth contract identification.
7. And sending the contract corresponding to the fourth contract identification to a contract compensation system so that the contract compensation system performs service compensation on the contract.
8. And receiving the contract after the service compensation from the contract compensation system, and updating the contract state and the corresponding receipt of the contract after the service compensation.
9. And receiving a receipt revocation message from the transaction system. And when the receipt revocation message corresponds to the first contract identifier, updating the first contract identifier into a fifth contract identifier after conducting correction processing on the transaction corresponding to the receipt revocation message.
In summary, after receiving the incoming message (batch file) sent by the transaction system, the invention loads the transaction detail content in the file into the batch message detail register of the database through the BDE. And scanning the initial detailed transaction in the batch message detailed register by using scanning service based on an optimistic lock mechanism, newly establishing contract information for each scanned detailed transaction, inserting the contract information into the contract register to perform transaction flow processing, and registering the batch message detailed register according to a processing result. And for the transaction which fails in verification and processing, service compensation processing can be carried out, and the receipt status of the corresponding batch message detail register is updated after the processing is successful. And adding a timing task, scanning the unpacked transactions of the batch message detail register regularly every two hours, and generating a receipt result file of the unpacked transactions and sending the receipt result file to a transaction system. After receiving the receipt acceptance message of the transaction system, sending and updating the receipt message processing state of the batch message detail register and the rejection reason of rejecting the transaction through the BDE; after receiving the receipt clearing message of the transaction system, sending the receipt clearing state of the batch message detail register through the BDE, and updating the contract state of the transaction according to the receipt clearing result. After receiving the receipt cancelling message of the transaction system, sending and updating the receipt processing state of the batch message detail register through the BDE, and correcting the successfully processed transaction. The invention can carry out pre-business compensation intervention processing on the final consistency of the transaction clearing result through real-time interaction of the batch processing result file, and ensure the accounting consistency of batch accounting transaction processing through tracking processing of the transaction processing state and the transaction clearing state.
In summary, the batch file processing method provided by the embodiment of the invention has the following beneficial effects:
1. through state control of transaction processing states and business compensation processing, batch accounting files can be processed quickly and correctly in a cluster environment.
2. By means of repeated interaction of receipt and processed files with the transaction system in the daytime and service compensation processing of the transaction which fails to be processed, timeliness and accuracy of transaction processing can be improved.
3. Through the control and processing of the daytime transaction state and the daily end clearing state, the accounting consistency of batch accounting file processing can be ensured.
Based on the same inventive concept, the embodiment of the invention also provides a batch file processing system, and as the problem solving principle of the system is similar to that of a batch file processing method, the implementation of the system can refer to the implementation of the method, and repeated parts are not described again.
FIG. 4 is a block diagram of a batch file processing system in an embodiment of the invention. As shown in fig. 4, the batch file processing system includes:
the contract unit is used for generating a contract and a receipt corresponding to the contract state according to an incoming message from an external transaction system; wherein the contract status includes a second contract identification;
the first sending unit is used for sending the contract corresponding to the second contract identification to an external contract compensation system so that the contract compensation system performs service compensation on the contract;
the contract compensation system comprises an updating unit, a contract compensation unit and a contract execution unit, wherein the updating unit is used for receiving a contract after service compensation from the contract compensation system and updating the contract state and the corresponding receipt of the contract after service compensation;
and the second sending unit is used for generating a receipt message according to the receipt and then sending the receipt message to the transaction system.
In one embodiment, the contract status further includes a first contract identification;
the batch file processing system further comprises:
the receiving unit is used for receiving the receipt clearing message from the transaction system;
the update unit is further configured to: updating the first contract identifier into a third contract identifier and updating the second contract identifier into a fourth contract identifier according to the receipt clearing result in the receipt clearing message; or updating the first contract identifier into a fourth contract identifier and updating the second contract identifier into a fifth contract identifier according to the receipt clearing result in the receipt clearing message; receiving a contract after service compensation from a contract compensation system, and updating the contract state and the corresponding receipt of the contract after service compensation;
the first sending unit is further configured to: and sending the contract corresponding to the fourth contract identification to a contract compensation system so that the contract compensation system performs service compensation on the contract.
In one embodiment, the receiving unit is further configured to: receiving a receipt acceptance message from a transaction system;
the update unit is further configured to: and when the receipt acceptance result in the receipt acceptance message is not accepted, updating the contract state corresponding to the receipt acceptance message into a second contract identifier.
In one embodiment, the update unit is specifically configured to:
when the receipt clearing result is successful, updating the first contract identifier into a third contract identifier, and updating the second contract identifier into a fourth contract identifier;
and when the receipt clearing result is failure, updating the first contract identification to be a fourth contract identification, and updating the second contract identification to be a fifth contract identification.
In one embodiment, the method further comprises the following steps:
the receiving unit is further configured to: receiving a receipt revocation message from a transaction system;
the update unit is further configured to: and when the receipt revocation message corresponds to the first contract identifier, updating the first contract identifier into a fifth contract identifier after conducting correction processing on the transaction corresponding to the receipt revocation message.
In summary, the batch file processing system of the embodiment of the present invention generates a contract and a receipt corresponding to a contract state according to the incoming message, then sends the contract corresponding to the second contract identifier to the contract compensation system, then updates the contract state and the corresponding receipt of the contract according to the contract after service compensation, and finally generates a receipt message according to the receipt and sends the receipt message to the transaction system, so that the post-transaction process can be controlled, and the timeliness, the accuracy and the financial consistency of the transaction are ensured.
The embodiment of the invention also provides a specific implementation mode of computer equipment, which can realize all the steps in the batch file processing method in the embodiment. Fig. 5 is a block diagram of a computer device in an embodiment of the present invention, and referring to fig. 5, the computer device specifically includes the following:
a processor (processor)501 and a memory (memory) 502.
The processor 501 is configured to call a computer program in the memory 502, and the processor implements all the steps in the batch file processing method in the above embodiments when executing the computer program, for example, the processor implements the following steps when executing the computer program:
generating a contract and a receipt corresponding to the contract state according to an incoming message from an external transaction system; wherein the contract status includes a second contract identification;
sending the contract corresponding to the second contract identification to an external contract compensation system so that the contract compensation system performs service compensation on the contract;
receiving a contract after service compensation from a contract compensation system, and updating the contract state and the corresponding receipt of the contract after service compensation;
and generating a receipt message according to the receipt and then sending the receipt message to the transaction system.
To sum up, the computer device of the embodiment of the present invention generates a contract and a receipt corresponding to a contract state according to the incoming message, then sends the contract corresponding to the second contract identifier to the contract compensation system, then updates the contract state of the contract and the corresponding receipt according to the contract after service compensation, and finally generates a receipt message according to the receipt and sends the receipt message to the transaction system, so that the post-transaction process can be controlled, and the timeliness, the accuracy and the financial consistency of the transaction are ensured.
An embodiment of the present invention further provides a computer-readable storage medium capable of implementing all the steps in the batch file processing method in the foregoing embodiment, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements all the steps in the batch file processing method in the foregoing embodiment, for example, when the processor executes the computer program, the processor implements the following steps:
generating a contract and a receipt corresponding to the contract state according to an incoming message from an external transaction system; wherein the contract status includes a second contract identification;
sending the contract corresponding to the second contract identification to an external contract compensation system so that the contract compensation system performs service compensation on the contract;
receiving a contract after service compensation from a contract compensation system, and updating the contract state and the corresponding receipt of the contract after service compensation;
and generating a receipt message according to the receipt and then sending the receipt message to the transaction system.
To sum up, the computer-readable storage medium of the embodiment of the present invention generates a contract and a receipt corresponding to a contract state according to the incoming message, then sends the contract corresponding to the second contract identifier to the contract compensation system, then updates the contract state and the corresponding receipt of the contract according to the contract after service compensation, and finally generates a receipt message according to the receipt and sends the receipt message to the transaction system, so that the post-transaction process can be controlled, and the timeliness, the correctness, and the accounting consistency of the transaction are ensured.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Those of skill in the art will further appreciate that the various illustrative logical blocks, units, and steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate the interchangeability of hardware and software, various illustrative components, elements, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design requirements of the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
The various illustrative logical blocks, or elements, or devices described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. For example, a storage medium may be coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC, which may be located in a user terminal. In the alternative, the processor and the storage medium may reside in different components in a user terminal.
In one or more exemplary designs, the functions described above in connection with the embodiments of the invention may be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media that facilitate transfer of a computer program from one place to another. Storage media may be any available media that can be accessed by a general purpose or special purpose computer. For example, such computer-readable media can include, but is not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to carry or store program code in the form of instructions or data structures and which can be read by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Additionally, any connection is properly termed a computer-readable medium, and, thus, is included if the software is transmitted from a website, server, or other remote source via a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wirelessly, e.g., infrared, radio, and microwave. Such discs (disk) and disks (disc) include compact disks, laser disks, optical disks, DVDs, floppy disks and blu-ray disks where disks usually reproduce data magnetically, while disks usually reproduce data optically with lasers. Combinations of the above may also be included in the computer-readable medium.

Claims (10)

1. A method for processing a batch of documents, comprising:
generating a contract and a receipt corresponding to the contract state according to an incoming message from an external transaction system; wherein the contract status comprises a second contract identification;
sending the contract corresponding to the second contract identification to an external contract compensation system so that the contract compensation system performs service compensation on the contract;
receiving a contract after service compensation from the contract compensation system, and updating the contract state and the corresponding receipt of the contract after service compensation;
and generating a receipt message according to the receipt and then sending the receipt message to the transaction system.
2. The batch file processing method of claim 1, wherein the contract state further includes a first contract identification;
after the receipt message is generated according to the receipt and then sent to the transaction system, the method further comprises the following steps:
receiving a receipt clearing message from the transaction system;
updating the first contract identifier into a third contract identifier and updating the second contract identifier into a fourth contract identifier according to a receipt clearing result in the receipt clearing message; or
Updating the first contract identifier into a fourth contract identifier and updating the second contract identifier into a fifth contract identifier according to a receipt clearing result in the receipt clearing message;
sending the contract corresponding to the fourth contract identification to the contract compensation system so that the contract compensation system performs service compensation on the contract;
and receiving the contract after the service compensation from the contract compensation system, and updating the contract state and the corresponding receipt of the contract after the service compensation.
3. The batch file processing method of claim 2, prior to receiving a receipt clearing message from the trading system, further comprising:
receiving a receipt acceptance message from the transaction system;
and when the receipt acceptance result in the receipt acceptance message is not accepted, updating the contract state corresponding to the receipt acceptance message into a second contract identifier.
4. The batch file processing method of claim 2, wherein:
updating the first contract identifier to a third contract identifier according to the receipt clearing result in the receipt clearing message, and updating the second contract identifier to a fourth contract identifier includes:
when the receipt clearing result is successful, updating the first contract identifier to the third contract identifier, and updating the second contract identifier to the fourth contract identifier;
updating the first contract identifier to a fourth contract identifier according to the receipt clearing result in the receipt clearing message, and updating the second contract identifier to a fifth contract identifier includes:
and when the receipt clearing result is failure, updating the first contract identifier as the fourth contract identifier, and updating the second contract identifier as the fifth contract identifier.
5. The batch file processing method of claim 2, further comprising:
receiving a receipt revocation message from the transaction system;
and when the receipt revocation message corresponds to a first contract identifier, updating the first contract identifier into the fifth contract identifier after conducting correction processing on the transaction corresponding to the receipt revocation message.
6. A batch file processing system, comprising:
the contract unit is used for generating a contract and a receipt corresponding to the contract state according to an incoming message from an external transaction system; wherein the contract status comprises a second contract identification;
the first sending unit is used for sending the contract corresponding to the second contract identification to an external contract compensation system so that the contract compensation system performs service compensation on the contract;
the contract compensation system comprises an updating unit, a contract compensation unit and a contract execution unit, wherein the updating unit is used for receiving a contract after service compensation from the contract compensation system and updating the contract state and the corresponding receipt of the contract after service compensation;
and the second sending unit is used for generating a receipt message according to the receipt and then sending the receipt message to the transaction system.
7. The batch file processing system of claim 6, wherein the contract state further includes a first contract identification;
the batch file processing system further comprises:
the receiving unit is used for receiving the receipt clearing message from the transaction system;
the update unit is further configured to: updating the first contract identifier into a third contract identifier and updating the second contract identifier into a fourth contract identifier according to a receipt clearing result in the receipt clearing message; or updating the first contract identifier into a fourth contract identifier and updating the second contract identifier into a fifth contract identifier according to the receipt clearing result in the receipt clearing message; receiving a contract after service compensation from the contract compensation system, and updating the contract state and the corresponding receipt of the contract after service compensation;
the first sending unit is further configured to: and sending the contract corresponding to the fourth contract identification to the contract compensation system so that the contract compensation system performs service compensation on the contract.
8. The batch document processing system of claim 7, wherein:
the receiving unit is further configured to: receiving a receipt acceptance message from the transaction system;
the update unit is further configured to: and when the receipt acceptance result in the receipt acceptance message is not accepted, updating the contract state corresponding to the receipt acceptance message into a second contract identifier.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and running on the processor, characterized in that the steps of the batch file processing method according to any one of claims 1 to 5 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the batch file processing method of any one of claims 1 to 5.
CN202011030549.7A 2020-09-27 2020-09-27 Batch file processing method and system Active CN112102089B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011030549.7A CN112102089B (en) 2020-09-27 2020-09-27 Batch file processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011030549.7A CN112102089B (en) 2020-09-27 2020-09-27 Batch file processing method and system

Publications (2)

Publication Number Publication Date
CN112102089A true CN112102089A (en) 2020-12-18
CN112102089B CN112102089B (en) 2024-04-16

Family

ID=73756321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011030549.7A Active CN112102089B (en) 2020-09-27 2020-09-27 Batch file processing method and system

Country Status (1)

Country Link
CN (1) CN112102089B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100138324A1 (en) * 2003-07-25 2010-06-03 Stoneeagle Services, Inc. Method of providing secure payment and transaction reconciliation
CN101782990A (en) * 2009-01-20 2010-07-21 深圳市雁联计算系统有限公司 Debit reversal business handling system and method in payment settlement integral business system
CN105338093A (en) * 2015-11-16 2016-02-17 中国建设银行股份有限公司 Data synchronizing method and system
US20200125391A1 (en) * 2018-10-23 2020-04-23 Samsung Sds Co., Ltd. Apparatus and method for batch processing for blockchain transactions
CN111259032A (en) * 2020-01-17 2020-06-09 中国建设银行股份有限公司 Service processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100138324A1 (en) * 2003-07-25 2010-06-03 Stoneeagle Services, Inc. Method of providing secure payment and transaction reconciliation
CN101782990A (en) * 2009-01-20 2010-07-21 深圳市雁联计算系统有限公司 Debit reversal business handling system and method in payment settlement integral business system
CN105338093A (en) * 2015-11-16 2016-02-17 中国建设银行股份有限公司 Data synchronizing method and system
US20200125391A1 (en) * 2018-10-23 2020-04-23 Samsung Sds Co., Ltd. Apparatus and method for batch processing for blockchain transactions
CN111259032A (en) * 2020-01-17 2020-06-09 中国建设银行股份有限公司 Service processing method and device

Also Published As

Publication number Publication date
CN112102089B (en) 2024-04-16

Similar Documents

Publication Publication Date Title
CN110603554B (en) Method and system for offline data transfer via machine-readable code
US10715331B2 (en) Method and system for providing validated, auditable, and immutable inputs to a smart contract
WO2019125664A1 (en) Method and system for outside guarantees for a blockchain transaction
CN111367628A (en) Distributed transaction processing method and device, message producer and consumer system
WO2013101468A1 (en) System and method for automated dispute resolution of credit data
CN110599330B (en) Bank universal anti-transaction device, method and system
CN113094362A (en) Method and device for reliably delivering and processing asynchronous message
CN110675247B (en) Unknown transaction processing method and system, peripheral system and core bank system
CN112907344A (en) Accounting data processing method and device, electronic equipment and storage medium
CN112069260A (en) Data storage and account checking method and system
CN112685391A (en) Service data migration method and device, computer equipment and storage medium
CN109583873B (en) Transaction communication method, server, POS machine and electronic equipment
CN107169767B (en) Transaction processing method and system
CN112102089B (en) Batch file processing method and system
US11947522B2 (en) Method and system for pruning blocks from blockchains for data retention and storage scalability purposes
US11943333B2 (en) Method and system for optimizing transaction flow for blockchain mining and confirmation
WO2023154203A1 (en) Method and system for transfer of ownership of nft (non-fungible token) upon refund transaction in payment network
CN110765148B (en) Service data processing method and device
CN112950384A (en) Processing system, method, computer equipment and storage medium based on cache technology
CN111144892A (en) Counter exchange rate checking method and device
US12034861B2 (en) Method and system of storing smart contract events
US20230198776A1 (en) Method and system of storing smart contract events
KR20240100350A (en) Method and system for pruning blocks from a blockchain for data retention and storage scalability purposes
CN115357591A (en) Mechanism merging information processing method and device
US20230068301A1 (en) Method and system for privately managed digital assets on an enterprise blockchain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant