CN112099934A - Batch processing method, system, computer equipment and storage medium - Google Patents

Batch processing method, system, computer equipment and storage medium Download PDF

Info

Publication number
CN112099934A
CN112099934A CN202010999483.6A CN202010999483A CN112099934A CN 112099934 A CN112099934 A CN 112099934A CN 202010999483 A CN202010999483 A CN 202010999483A CN 112099934 A CN112099934 A CN 112099934A
Authority
CN
China
Prior art keywords
account
batch processing
online transaction
batch
transaction request
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.)
Pending
Application number
CN202010999483.6A
Other languages
Chinese (zh)
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 CN202010999483.6A priority Critical patent/CN112099934A/en
Publication of CN112099934A publication Critical patent/CN112099934A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence

Abstract

The utility model provides a batch processing method, system, computer equipment and storage medium, which belongs to the bank transaction processing field, wherein, the method comprises: setting accounts to be in a locking state in sequence according to the sequence of the accounts; carrying out batch processing on the account in the locking state; and after the account completes all batch processing, releasing the locking state of the account. The online transaction processing method has the advantages that the operation batch processing of the polling mode is carried out by taking the account as the granularity, so that the continuous online service providing during the batch period becomes possible, the service time of the online transaction stage is prolonged, and the system service capability is improved.

Description

Batch processing method, system, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of bank transaction processing, and in particular, to a batch processing method, system, computer device, and storage medium.
Background
The existing bank information system mainly processes various transaction requests initiated by customers through various channels during the day, and immediately returns results after processing, and the bank information system is in an online stage during the period. After the daytime service is finished, an accounting core system in the bank information system is switched into a batch processing stage, an external service interface is closed, and system operations of interest bearing, overdue processing, data summarization, report generation and the like of batch accounts are completed. The batch phase is not sensible to the customer, but during this time all accounts will complete the preset job in order. After all accounts complete job 1, job 2 is executed again, and so on until the job queue is empty, so before the job is completely completed, in order to prevent the new incoming transaction from interfering with the updating process and ensure the accuracy of data, the bank information system generally chooses to suspend providing service. This also results in the customer not being serviced during the batch phase, causing a service fault.
With the development of the internet and the increasing of the financial activities of residents, such a service method cannot provide satisfactory financial services for customers, and the liveness of the current financial market is increasing, so that financial products are in endless emergence, and such a service method cannot meet the innovative demand of the products.
The architecture design of the bank information system comprises a daily final batch processing module, and the design of the daily final batch processing module is mainly based on the following three reasons, firstly, a large number of transactions in banking business occur daily, and the addition of the daily final batch processing module can improve the automation degree of the system and the efficiency of the system; secondly, each row of customers or transaction in the row usually relates to an external bank, but the bank information system has low openness and is not easy to complete immediately, and the joint settlement requirements are usually processed by a daily final batch processing module in the batch period; thirdly, as the bank with special business needs to settle every day and summarize data, the jobs related to the generation of a large amount of data processing reports need to be processed at the end of the day.
In order to avoid batch operation error reporting caused by data change of online transaction and guarantee safe and accurate operation of batch operation, the system performs online stage and batch stage segmentation at appointed time points, but the design mode enables online service to be broken, customer experience is reduced, and the market demand for financial products designed based on the online service is not met.
In order to realize the service target of 7 x 24 hours, one scheme is a double information mode, namely a daytime mode and a night mode, wherein the daytime mode keeps a stable information operation mode, and the night mode can simulate information for preventing the influence on data updating and ensures that the customer data is accurate. The core of the method is the design and implementation of a night mode, a customer sees accurate information at night, the fact that a transaction possibly comes at any time needs to be considered, the system needs to recognize the state of the customer at any time, on one hand, batch processing cannot be influenced, and on the other hand, the service experience of the customer cannot be influenced. This solution has the following drawbacks: on one hand, the possibility of transaction initiation is too high to be covered completely; on the other hand, the data tables involved in the combined transaction can be dozens, which is very easy to cause the occurrence of miscounting and difficult to meet the requirement of strong consistency of the financial system.
Another solution is to design a double main gear. And locking the primary file during batch, completing the transaction and returning a result to a client by operating the secondary file, entering an account tracing stage by the system after batch completion, executing the transaction again on the basis of the primary file through transaction tracing to complete data alignment, and entering an online stage by the system after all accounts are traced. This solution has the following drawbacks: the problem that the system is static during batch is not solved fundamentally, the data sheet and the associated account related to single account reimbursement are processed to be complex enough, the online transaction quantity during batch is increased along with the increase of the activity of customers, the situations of account error and account omission and data inconsistency in the reimbursement process are also greatly increased, and the system safety is seriously threatened.
Disclosure of Invention
The method is used for solving the technical problems that account leakage, data inconsistency and complex calculation logic easily occur in the conventional implementation mode of uninterrupted service.
In order to solve the above technical problem, a first aspect herein provides a batch processing method comprising:
setting accounts to be in a locking state in sequence according to the sequence of the accounts;
carrying out batch processing on the account in the locking state;
and after the account completes all batch processing, releasing the locking state of the account.
In a further embodiment herein, sequentially setting account processing lock states in the order of accounts includes:
according to the distributed processing capacity of the computing cluster, the accounts are partitioned;
and sequentially setting accounts in each fragment to be in a locking state.
In a further embodiment of this document, before sequentially setting the account in each segment to be in the locked state, the method further includes: setting the fragment to be in a locking state;
the method further comprises the following steps: and after all the accounts in the fragments are subjected to batch processing, releasing the locking state of the fragments.
In a further embodiment herein, the batch processing method further comprises:
receiving an online transaction request;
judging whether the fragment where the online transaction request associated account is located is in a locked state;
and if the segment where the online transaction request associated account is located is in a locked state, waiting for the segment where the account associated with the online transaction request is located to respond to the online transaction request after the locked state of the segment is released.
In a further embodiment of the present disclosure, if the partition where the online transaction request associated account is located is not in the locked state, the account is separately divided into partitions, the partition account is preferentially batched, and the online transaction request is responded after the partition is unlocked.
In a further embodiment of this document, for each segment, if one of the accounts in the segment completes all the batch processing and releases the lock state, the method further includes:
judging whether all the batch processing is finished by all the accounts in the fragment;
if the judgment result is yes, performing batch processing on the account in the next fragment;
if the judgment result is negative, setting the next account in the fragment as a locking state.
In a further embodiment herein, before the batch processing of the account in the locked state, the method further includes:
and carrying out backup processing on the main file data of the account.
In a further embodiment herein, after unlocking the account, the method further includes:
and copying the backup primary file data of the account to a snapshot document.
In a further embodiment of the present invention, the locking status of the account is set by adding an account batch identifier to the master profile data of the account.
In a further embodiment of the present disclosure, after all the batch processing of the account is completed, the locking state of the account is released by updating the account batch identifier in the account master file data.
In further embodiments herein, the batch process comprises: interest improvement, fee collection, overdue processing and report generation.
In a further embodiment herein, the batch processing method further comprises:
receiving an online transaction request;
judging whether an account associated with the online transaction request is in a locked state;
if the online transaction request associated account is in the locking state, responding to the online transaction request after the account is unlocked;
and if the online transaction request associated account is not in the locked state, responding to the online transaction request.
A second aspect herein provides a batch processing system comprising:
the locking module is used for setting the account to be in a locking state;
the processing module is used for carrying out batch processing on the account in the locking state;
and the unlocking module is used for unlocking the locking state of the account after the account completes all batch processing.
A third aspect herein provides a computer apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the batch processing method of any of the preceding embodiments when executing the computer program.
A fourth aspect herein provides a computer readable storage medium storing an executable computer program which, when executed by a processor, implements the batch processing method of any one of the preceding embodiments.
The batch processing method, the batch processing system, the computer equipment and the storage medium can realize batch processing with an account as a center, change the design idea with operation as granularity, use the account as minimum processing granularity, improve the independence of the account, get rid of the dependence of the account on the operation completion degree, and accord with the current service concept with a client as the center. According to the method, the account is set to be in the locking state when the account is subjected to the operation batch processing in the polling mode by taking the account as the granularity, the account in the locking state is subjected to the batch processing, and after all batch processing of the account is completed, the locking state of the account is released, so that the continuous online service provision during the batch period becomes possible, the service time in the online transaction stage is prolonged, and the system service capacity is improved.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described 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 according to the drawings without creative efforts.
FIG. 1 illustrates a first flowchart of a batch process method of embodiments herein;
FIG. 2 is a schematic diagram illustrating a batch sequence according to embodiments herein;
FIG. 3 illustrates a second flowchart of a batch process method of embodiments herein;
FIG. 4 shows a third flowchart of a batch process method of embodiments herein;
FIG. 5 illustrates a fourth flow diagram of a batch processing method of embodiments herein;
FIG. 6 illustrates a fifth flow diagram of a batch processing method of embodiments herein;
FIG. 7 illustrates a first block diagram of a batch processing system according to embodiments herein;
FIG. 8 illustrates a second block diagram of a batch processing system according to embodiments herein;
FIG. 9 illustrates a third block diagram of a batch processing system according to embodiments herein;
FIG. 10 is a fourth block diagram of a batch processing system according to an embodiment herein;
FIG. 11 illustrates a fifth block diagram of a batch processing system according to embodiments herein;
FIG. 12 illustrates a sixth block diagram of the batch processing system according to embodiments herein;
FIG. 13 is a schematic diagram illustrating an online transaction processing type, according to an embodiment herein;
FIG. 14 shows a block diagram of a computer device according to an embodiment of the present disclosure.
Description of the symbols of the drawings:
710. a locking module;
720. a processing module;
730. an unlocking module;
740. an online processing module;
750. a monitoring module;
760. a backup module;
770. a snapshot module;
711. a slicing unit;
712. a locking unit;
1402. a computer device;
1404. a processor;
1406. a memory;
1408. a drive mechanism;
1410. an input/output module;
1412. an input device;
1414. an output device;
1416. a presentation device;
1418. a graphical user interface;
1420. a network interface;
1422. a communication link;
1424. a communication bus.
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 herein without making any creative effort, shall fall within the scope of protection.
The batch processing method and the batch processing system are suitable for financial systems such as banks, securities and the like, and the specific application scene is not limited in the text.
As shown in fig. 1 and fig. 2, fig. 1 shows a first flowchart of a batch processing method of the embodiment herein, and fig. 2 shows a schematic view of a batch processing sequence of the embodiment herein. The batch processing method can be realized by a daily final batch processing system, wherein the daily final batch processing refers to a financial system such as a bank, and the like, and completes daily final transaction of batch accounts before and after natural day (for example, batch processing is performed after the regulation of 18:00 every day), and can perform operations such as accounting processing, natural date switching, current-day report data generation and the like.
Specifically, the batch processing method comprises the following steps:
and step 110, setting the accounts to be in a locking state in sequence according to the sequence of the accounts.
When the method is implemented, the locking state of the account is set in a mode of adding the account batch identification in the account master file data. The master file data comprises a basic information table of an account, each piece of data in the table corresponds to account information, and the account information comprises: account number, customer number, certificate number, date of opening an account, product number, loan balance, remaining interest, recent transaction date, and the like. The account batch is identified as being in a batch and may be represented by one or a combination of letters, numbers, characters, symbols, and the like. For example, an account batch identification of X indicates that the account is in a locked state.
In this step, taking fig. 2 as an example, accounts 0001, 0002, 0003, 0004, 0005, …, and 000N are sequentially locked. In other words, after one account is batched, the next account is locked until all accounts are locked.
At step 120, the account in the locked state is batched, during which time no online transaction processing is performed.
The batch processing of the account in the step can be referred to as single batch running, which means that a batch processing program identical to batch processing is called to process and calculate the single account data. Taking the bank batch processing as an example, the calculation contents include but are not limited to interest improvement, fee collection, overdue processing and report generation. The content specifically included in the batch process depends on the processing business, and is not specifically limited herein. In specific implementation, a computing cluster mode can be adopted to perform parallel batch processing on each locked account.
In this step, taking fig. 2 as an example, for each locked account i (account i is one of accounts 0001...., account 000N), the interest bearing job, overdue processing job, charge processing job, etc. for the locked account i are sequentially started until the last job is completed, and the following step 130 is executed.
Step 130, after the accounts complete all batch processing, releasing the locking state of the accounts, returning to step 110, continuing to sort the accounts, setting the next account to be in the locking state, and executing the steps after step 110 until the last account in the sorting finishes batch processing.
Taking fig. 2 as an example, after the account 0001 completes all the batches, the locked state of the account 0001 is released, the account 0001 is continuously executed, the account 0001 is set to be in the locked state, and the batches are sequentially executed until the last account 000N in the sequence completes the batch. During the batch process, each account is locked only when the respective account performs the batch process, and the rest of the time is available for accepting and responding to online transaction requests.
When the method is implemented, the locking state of the account is released in a mode of updating the account batch identification in the account master file data. For example, the account batch identity is updated from the batch identity X to the release identity Y. The release flag Y indicates that the account has completed a batch process (e.g., an end-of-day transaction) and the locked state is released. After the batch runs, the fields in the master file data are updated, for example, after the interest bearing work is run, the account interest amount is changed, and the corresponding interest amount field in the master file data needs to be updated.
According to the embodiment, batch processing is converted from operation as a unit to account as a unit, so that the flexibility of the batch processing system at the end of a day is enhanced, and a wide space is provided for product innovation. The single account batch running design of the embodiment enables continuous online service provision during batch processing to be possible, the locking time of the accounts during batch processing is greatly shortened, the service duration of online transaction stages is prolonged, the system service capacity is improved, and due to the fact that operation batch processing is carried out according to the account as granularity, mutual influence does not exist among the accounts, and therefore the embodiment can reduce the probability of mistaken account and missed account.
In an embodiment herein, as shown in fig. 3, the batch processing method further includes an online processing procedure in addition to the batch processing procedures from step 110 to step 130, specifically, the online processing procedure includes:
at step 310, an online transaction request is received.
The online transaction request in this step includes, but is not limited to, a transfer request, a query request, a payment request, etc. which may be initiated by the customer through various channels including, but not limited to, a teller machine, a self-service terminal, an online bank, a POS machine, a counter, a transfer telephone, etc.
In step 320, it is determined whether the account associated with the online transaction request is in a locked state, if so, step 330 is performed, and if not, step 340 is performed.
In this step, it is determined whether the online transaction request-associated account is in a locked state by comparing the account batch identifier of the online transaction request-associated account with the predetermined identifier, for example, the predetermined identifier is X, and if the account batch identifier of the online transaction request-associated account is X, it indicates that the online transaction request-associated account is in the locked state.
Step 330, the online transaction request is responded after the account is unlocked. After the account is unlocked, the batch processing of the account is completed, and the batch processing of the account cannot be influenced if the online transaction request is responded.
Step 340, responding to the online transaction request. The account is not in the locked state, which means that the account is not batch processed, and the account batch processing process will not be affected if the online transaction request is responded. In specific implementation, in order to ensure the correctness of the data, the online transaction request-associated account is batch-processed, the online transaction request-associated account is locked to be in a locked state, the step 120 is returned to continue execution, and after the step 130 is executed, the online transaction request is responded.
The embodiment can combine the online mode and the batch processing mode, ensure the efficient and accurate execution of online transactions during batch processing, really realize 7-24-hour service, namely provide 24-hour uninterrupted service for customers, including the requests initiated by the customers through various channels and processing in time, and finally return results.
In one embodiment of the present disclosure, to fully utilize computing resources and improve batch processing efficiency, as shown in fig. 4, a batch processing method for transaction jobs includes:
and step 410, segmenting the account according to the distributed processing capacity of the computing cluster.
In this step, the distributed processing capability of the computing cluster is related to the architecture of the computing cluster, and the architecture of the computing cluster includes: computer system, processor thread. The computing cluster comprises a plurality of computer devices, the distributed processing capacity of the computing cluster can be determined by idle threads in the computers, each fragment at least comprises one account number and is processed by one computer device in the computing cluster, and during implementation, the fragments can be distributed to one computer device for processing or distributed to different computers for processing. Each fragment can be distinguished by a fragment ID, and specifically, the fragment ID can be represented by one or a combination of letters, numbers, characters, and the like.
In step 420, for each fragment, an account in the fragment is obtained, and the account is set to be in a locked state.
In this step, the fragments can be batched at the same time, for each fragment, the accounts in the fragment are sequentially set to be in a locking state, and the batch processing is performed, and after the accounts are unlocked, the next account in the fragment is locked until all accounts are batched.
According to the embodiment, computing resources can be fully utilized through the design of the account fragments, the distributed parallel processing capacity is improved, and the batch processing efficiency is improved.
Step 430, batch processing is performed on the accounts in the locked state.
And step 440, after all the batch processing of the account is completed, releasing the locking state of the account.
In specific implementation, for each fragment, if one account in the fragment completes all batch processing and releases the locking state, the method further includes:
step 450, determine whether all the accounts in the segment have completed all the batch processing. If yes, go to step 460. If the determination result is negative, step 470 is executed.
Step 460, perform batch processing or perform other batch processing on accounts in the next segment. The process of performing batch processing on accounts in the next segment is referred to as steps after step 420 and will not be described in detail here.
Step 470, setting the next account in the segment to be in a locked state, and continuing the processing according to the flow after step 430.
In a further embodiment herein, to avoid conflict during concurrent batch processing, as shown in fig. 5, the batch processing method further includes:
step 420-1, setting the fragment to be in a locked state.
This step is performed before the account in each segment is set to be in the locked state in step 420.
Step 460-1, after all the accounts in the segment are batched, releasing the locking state of the segment. This step is performed before step 460 or simultaneously with step 460, and the order of performing step 460 and step 460-1 is not limited herein.
In a further embodiment of the present invention, the batch processing method further includes an online processing procedure in addition to the batch processing procedures from step 410 to step 470, specifically, as shown in fig. 6, including:
at step 610, an online transaction request is received.
Step 620, determine whether the segment where the online transaction request associated account is located is in a locked state. If the segment where the online transaction request associated account is located is in the locked state, step 630 is executed. If the segment where the online transaction request associated account is not in the locked state, step 640 is executed.
Step 630, wait for the online transaction request to respond to the online transaction request after the segment of the account associated with the online transaction request is unlocked.
And step 640, dividing the account associated with the online transaction request into one fragment, preferentially performing batch processing on the account of the fragment, and responding to the online transaction request after the locking state of the fragment is released.
After the system receives the batch processing requests of all channels, the account in the locked state only needs to finish the request transaction after being unlocked; and for default non-batched unlocked accounts, directly generating fragments for batching, unlocking the fragments after the batching is finished, and continuously responding to the online transaction request. No batching refers herein to no batching.
Since the latest data after the batch processing is used when the online transaction request is responded during the batch processing, in order to respond the online transaction request as soon as possible and ensure the correctness of the transaction data, when the account is not batch processed and the online transaction request is received, the account is divided into one sub-slice separately and the batch processing is preferentially carried out.
In an embodiment of this document, to avoid that the original master file data is lost in the case of a batch processing error, before the batch processing is performed on the account in the locked state, the batch processing method according to any of the foregoing embodiments further includes:
and carrying out backup processing on the main file data of the account.
And after the account is batched and unlocked, deleting the backup active data in order to ensure the usability of the storage space.
In this step, the backup data and the original data may be stored in the same memory, or stored in different memories, and the storage location of the backup data is not limited herein.
In an embodiment of this document, in order to prepare data for other functions, after releasing the locked state of the account, the batch processing method according to any of the foregoing embodiments further includes:
and copying the backup primary file data of the account to a snapshot document.
The snapshot document in this step contains all data of the account at a certain time point, and the intermediate data can be temporarily stored through the snapshot document and can also be used for tracing the historical data of the account.
In an embodiment of this document, there is also provided a batch processing system, which includes a plurality of functional units and modules, each of which may be implemented by a dedicated or general-purpose chip, and may also be implemented by a software program, as shown in fig. 7, where the batch processing system includes:
and the locking module 710 is configured to set the accounts to be in a locked state in sequence according to the sequence of the accounts.
And a processing module 720, configured to perform batch processing on the account in the locked state.
And the unlocking module 730 is used for unlocking the account after the account completes all batch processing.
Specifically, the locking module 710 may set the locking status of the account by adding an account batch identifier to the account master profile data.
The processing module 720 sequentially starts interest bearing, overdue processing, and cost processing for each locked account i, and starts the unlocking module 730 after all operations are executed.
The unlocking module 730 may unlock the account by updating the batch id of the account in the account profile data.
The batch processing system provided by the embodiment can realize the following technical effects: the batch processing is converted from the operation unit to the granularity refinement unit by taking the account as the unit, so that the flexibility of the batch processing system at the end of the day is enhanced, and a wide space is provided for product innovation; the batch running design of the single account ensures that the online is not stopped in the batch processing stage, so that the online service can be continuously provided in the batch period, the locking time of the account in the batch processing period is greatly shortened, the service duration in the online transaction stage is prolonged, and the service capability of the system is improved; because the job batch processing is carried out according to the account as the granularity, the mutual influence does not exist among the accounts, and therefore, the probability of error account and missed account can be reduced.
As a further embodiment herein, as shown in fig. 8, the batch processing system further comprises: an online processing module 740 for receiving an online transaction request; judging whether an account associated with the online transaction request is in a locked state; if the account is in the locking state, responding to the online transaction request after the account is unlocked; and if the online transaction request is not in the locked state, responding to the online transaction request.
The embodiment can combine the online mode and the batch processing mode, ensure the efficient and accurate execution of online transactions during batch processing, really realize 7-24-hour service, namely provide 24-hour uninterrupted service for customers, including online requests initiated by the customers through various channels and timely processing, and finally return results.
In an embodiment of this document, as shown in fig. 9, the locking module 710 further includes:
the fragmentation unit 711 is configured to fragment the account according to the distributed processing capability of the computing cluster;
and a locking unit 712, configured to set accounts in each segment to be in a locked state in sequence.
According to the embodiment, computing resources can be fully utilized through the design of the account fragments, the distributed parallel processing capacity is improved, and the batch processing efficiency is improved.
As a further embodiment herein, as shown in fig. 10, the batch processing system further comprises:
the monitoring module 750 is configured to determine whether all the accounts in each segment have completed all the batch processing after one of the accounts in the segment completes all the batch processing and releases the locking state. If the result of the determination is yes, the locking module 710 sequentially sets the accounts in the next segment to be in the locked state, and the processing module 720 performs batch processing on the accounts in the next segment. If the determination result is negative, the locking module 710 sets the next account in the segment to be in a locked state.
As a further embodiment herein, the locking module 710 is further configured to set the slice to be in a locked state. The unlocking module 730 is further configured to unlock the segments after all the accounts in the segments have been batched.
The embodiment can avoid system conflict during parallel batch processing by locking the fragments.
In a further embodiment of this document, after receiving the online transaction request, the online processing module 740 is further configured to determine whether a segment where an account associated with the online transaction request is located is in a locked state; and if the segment where the online transaction request associated account is located is in a locked state, waiting for the online transaction request associated account to respond to the online transaction request after the segment where the online transaction request associated account is located is unlocked.
In a further embodiment of this document, if the online processing module 740 determines that the partition where the online transaction request associated account is located is not in the locked state, the partition unit 711 divides the account into partitions separately, the locking unit 712 locks the partition account, the processing module 720 preferentially performs batch processing on the partition account, and the online processing module 740 responds to the online transaction request after the partition is unlocked.
In the embodiment, when the account is not subjected to batch processing and receives the online transaction request, the account is divided into the sub-pieces separately, and the batch processing is preferentially carried out, so that the online transaction request can be responded as soon as possible, and the correctness of the transaction data is ensured.
As a further embodiment herein, as shown in fig. 11, the batch processing system further comprises: the backup module 760 is configured to perform backup processing on the master file data of the account before the processing module 720 performs batch processing on the account in the locked state. And after the account is unlocked, deleting the backup active data in order to ensure the usability of the storage space.
In the embodiment, the original document data can still be restored in the case of batch processing errors by means of backing up the master file data.
As a further embodiment herein, as shown in fig. 12, the batch processing system further comprises: a snapshot module 770, configured to copy the backup primary file data of the account to a snapshot document after the unlocking module 730 unlocks the account.
According to the method and the device, data preparation can be performed for other functions by copying the backup main file data to the snapshot document, and traceability of historical data is guaranteed.
The batch processing system provided herein has the following advantages:
1) the method and the device realize batch processing of the account level, greatly shorten the locking time of the account during batch processing, and really increase the service duration of the account.
2) All online transactions are completed in real time, compensation measures such as account tracking and the like are not needed, data accuracy is high, the possibility of account error and account leakage of the system is reduced, and system safety is improved.
3) The account fragmentation and the account locking are processed in parallel, computing resources are fully utilized, processing efficiency can be improved, system safety is guaranteed, and system service capacity is enhanced.
4) By the online mode during online period and the online mode during batch period, the efficient and accurate execution of online transaction during batch period is ensured, and 7 x 24 hour service is really realized.
In order to more clearly illustrate the technical solution herein, the following detailed description takes batch processing in the banking field as an example, and the batch processing triggers a batch processing program at 18:00 of T day (i.e. a certain day), and the batch processing program includes:
step one, the fragmentation program completes account fragmentation and sends a fragmentation result (which can be regarded as a task) to the distributed computing cluster, wherein an account 0001 belongs to the fragmentation A, an account 0002 belongs to the fragmentation B, an account 0003 belongs to the fragmentation B, and the account 0003 is sequentially behind the account 0002.
And step two, the fragments A and B are processed in parallel in different servers. Taking the fragment a as an example, the parallel processing process includes:
setting the account batch identifier of the account 0001 as X, namely setting the account 0001 in a locking state, and copying the master file information of the accounts in the fragment A and the fragment B to a temporary file; performing batch processing such as interest bearing, fee collection, overdue processing, report generation and the like on 0001 in the locked state; after 0001 in the locking state is processed in batches, the account batch identification of the account 0001 is set to be Y, namely the locking state of the account 0001 is released, and data in the temporary file is copied to the yesterday snapshot file.
And step three, the client initiates a repayment request by the mobile phone bank, the account related to the repayment request is 0003, namely the client initiates a repayment request of the 0003 account.
And step four, the batch processing system analyzes the repayment request message and performs data verification, wherein the verified content comprises client identity verification, repayment request validity verification and the like, after the verification is passed, an online transaction process during batch processing is started, and the online transaction process firstly judges the state of the account 0003.
In this embodiment, the partition B is currently batching the account 0002, and the account 0003 is not batched yet, so the state of the account 0003 is unlocked and is not batched.
And step five, the account 0003 is independently used as a fragment C, the fragment C is sent to an idle server to be preferentially batched and executed, and after batching, the account batch identifier of the account 0003 is set to be Y (Y represents that batch running is performed).
In this step, the specific execution process of the batch processing of the account 0003 includes:
setting the account batch identifier of the account 0003 to be X, namely setting the account 0003 to be in a locking state; carrying out batch processing such as interest bearing, fee collection, overdue processing, report processing and the like on 0003 in a locked state; after the batch processing of the account 0003 in the locked state is finished, the account batch identifier of the account 0003 is set to be Y, that is, the locked state of the account 0003 is released. Since the segment C includes only the account 0003, the segment C is released after the account 0003 is released.
And step six, after the fragment C is unlocked, executing a repayment request initiated by the client, and returning a processing result to the client (the transaction date is T +1 day).
Since the latest data after batch processing is used in response to the online transaction request when the online transaction request is received during batch processing, in order to respond to the online transaction request as soon as possible and ensure the correctness of the transaction data, when the account 0003 does not perform batch processing and receives the online transaction request, the account 0003 is divided into a slice C separately and the batch processing is performed preferentially.
And seventhly, sequentially executing the fragment B to an account 0003, checking that the batch identifier of the account is run (if the batch identifier of the account 0003 is Y, the run is indicated), skipping the account 0003, checking whether the fragment B is subjected to batch processing, reading the next account in the fragment B if the fragment B is not subjected to batch processing, and reading the next fragment if the fragment B is subjected to batch processing.
Step eight, at this time, the customer initiates a transaction request for payment, and the associated account is 0002.
And step nine, the batch processing system analyzes the branch transaction request and performs data verification, after the verification is passed, an online transaction process during batch processing is started, and the online transaction process firstly judges the state of the account 0002.
In this embodiment, the partition B has already batched the account 0002, so the state of the account 0002 is unlocked and batched, that is, the account batch identifier of the account 0002 is Y, which indicates that batched has already been batched, and directly unlocks the account 0002 and processes the branch transaction request (the transaction date is T +1 day).
And step ten, executing all the fragments in parallel until all the fragments are finished, and finishing the daily end transaction of the account, wherein all the accounts can continuously provide external services in real time.
To summarize, as shown in FIG. 13, the online transaction process generated by an account during a batch process herein includes three types: (1) during batch processing, no online transactions occur; (2) the online transaction is carried out before the account runs; (3) the online occurs after the completion of the account batch. For the case where no online transaction occurs during batch processing, after the batch is unlocked, an online transaction, such as account 0001 in this embodiment, is waited and responded to. For the online transaction before the account batch running, the batch running processing is preferentially performed after the account related to the online transaction is individually fragmented, and after the batch running is unlocked, the online transaction is directly responded, for example, the account 0003 in the embodiment. For the online transaction after the account batch running, it is checked whether the online transaction request account completes batch running, and if the batch running is completed, the online transaction is executed, for example, the account 0002 in this embodiment.
The embodiment can realize batch processing with the account as the center, changes the design idea of taking the operation as the granularity, takes the account as the minimum processing granularity, can improve the independence of the account, gets rid of the dependence of the account on the operation completion degree, and accords with the service idea of taking the client as the center at present. According to the method, the account is set to be in the locking state when the account is subjected to the operation batch processing in the polling mode by taking the account as the granularity, the account in the locking state is subjected to the batch processing, and after all batch processing of the account is completed, the locking state of the account is released, so that the continuous online service provision during the batch period becomes possible, the service time in the online transaction stage is prolonged, and the system service capacity is improved.
In an embodiment herein, a batch processing system may run in a computer device in this embodiment, as shown in FIG. 14, a computer device 1402 may include one or more processors 1404, such as one or more Central Processing Units (CPUs), each of which may implement one or more hardware threads. Computer device 1402 may also include any memory 1406 for storing any kind of information, such as code, settings, data, etc. For example, and without limitation, memory 1406 may include any one or more of the following in combination: any type of RAM, any type of ROM, flash memory devices, hard disks, optical disks, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent fixed or removable components of computer device 1402. In one case, when processor 1404 executes associated instructions stored in any memory or combination of memories, computer device 1402 can perform any of the operations of the associated instructions. Computer device 1402 also includes one or more drive mechanisms 1408 for interacting with any memory, such as a hard disk drive mechanism, an optical disk drive mechanism, and the like.
Computer device 1402 may also include input/output module 1410(I/O) for receiving various inputs (via input device 1412) and for providing various outputs (via output device 1414)). One particular output mechanism may include a presentation device 1416 and an associated graphical user interface 1418 (GUI). In other embodiments, input/output module 1410(I/O), input device 1412, and output device 1414 may also be excluded, as just one computer device in a network. Computer device 1402 may also include one or more network interfaces 1420 for exchanging data with other devices via one or more communication links 1422. One or more communication buses 1424 couple the above-described components together.
Communication link 1422 may be implemented in any manner, such as over a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. Communications link 1422 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
In an embodiment of the present disclosure, a computer-readable storage medium is further provided, in which a computer program is stored, and when the computer program is executed by a processor, the computer program performs the batch processing method according to any of the above embodiments.
There is also provided, in an embodiment herein, computer readable instructions, wherein when executed by a processor, the program causes the processor to perform the batch processing method as described in any of the embodiments above.
It should be understood that, in various embodiments herein, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments herein.
It should also be understood that, in the embodiments herein, the term "and/or" is only one kind of association relation describing an associated object, meaning that three kinds of relations may exist. For example, a and/or B, may represent: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. 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 disclosure.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided herein, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments herein.
In addition, functional units in the embodiments herein may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present invention may be implemented in a form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The principles and embodiments of this document are explained herein using specific examples, which are presented only to aid in understanding the methods and their core concepts; meanwhile, for the general technical personnel in the field, according to the idea of this document, there may be changes in the concrete implementation and the application scope, in summary, this description should not be understood as the limitation of this document.

Claims (15)

1. A batch processing method, comprising:
setting accounts to be in a locking state in sequence according to the sequence of the accounts;
carrying out batch processing on the account in the locking state;
and after the account completes all batch processing, releasing the locking state of the account.
2. The method of claim 1, wherein setting account processing lock states in order of rank of accounts comprises:
according to the distributed processing capacity of the computing cluster, the accounts are partitioned;
and sequentially setting accounts in each fragment to be in a locking state.
3. The method of claim 2, wherein before sequentially setting accounts in each segment to be in a locked state, the method further comprises: setting the fragment to be in a locking state;
the method further comprises the following steps: and after all the accounts in the fragments are subjected to batch processing, releasing the locking state of the fragments.
4. The method of claim 3, wherein the method further comprises:
receiving an online transaction request;
judging whether the fragment where the online transaction request associated account is located is in a locked state;
and if the segment where the online transaction request associated account is located is in a locked state, waiting for the online transaction request associated account to respond to the online transaction request after the segment where the online transaction request associated account is located is unlocked.
5. The method of claim 4, wherein if the partition associated with the online transaction request is not in a locked state, the account is divided into a plurality of partitions, the partitioned account is preferentially batched, and the online transaction request is responded after the partition is unlocked.
6. The method of claim 2, wherein for each segment, if one of the accounts in the segment completes all the batch processing and releases the lock state, further comprising:
judging whether all the batch processing is finished by all the accounts in the fragment;
if the judgment result is yes, performing batch processing on the account in the next fragment;
if the judgment result is negative, setting the next account in the fragment as a locking state.
7. The method of claim 1, wherein prior to batching accounts that are in a locked state, further comprising:
and carrying out backup processing on the main file data of the account.
8. The method of claim 7, wherein after unlocking the account, further comprising:
and copying the backup primary file data of the account to a snapshot document.
9. The method of claim 1, wherein the account locking status is set by adding an account batch identifier to the account master profile data.
10. The method of claim 9, wherein the account is unlocked by updating the account batch id in the account profile data after all batches have been completed for the account.
11. The method of claim 1, wherein the batching comprises: interest improvement, fee collection, overdue processing and report generation.
12. The method of claim 1, further comprising:
receiving an online transaction request;
judging whether the online transaction request associated account is in a locked state or not;
if the online transaction request associated account is in the locking state, responding to the online transaction request after the account is unlocked;
and if the online transaction request associated account is not in the locked state, responding to the online transaction request.
13. A batch processing system, comprising:
the locking module is used for setting the account to be in a locking state;
the processing module is used for carrying out batch processing on the account in the locking state;
and the unlocking module is used for unlocking the locking state of the account after the account completes all batch processing.
14. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the batch processing method according to any one of claims 1 to 12 when executing the computer program.
15. A computer-readable storage medium, characterized in that the computer-readable storage medium stores an executing computer program which, when executed by a processor, implements the batch processing method of any one of claims 1 to 12.
CN202010999483.6A 2020-09-22 2020-09-22 Batch processing method, system, computer equipment and storage medium Pending CN112099934A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010999483.6A CN112099934A (en) 2020-09-22 2020-09-22 Batch processing method, system, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010999483.6A CN112099934A (en) 2020-09-22 2020-09-22 Batch processing method, system, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112099934A true CN112099934A (en) 2020-12-18

Family

ID=73755731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010999483.6A Pending CN112099934A (en) 2020-09-22 2020-09-22 Batch processing method, system, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112099934A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347094A (en) * 2021-06-22 2021-09-03 深圳壹账通智能科技有限公司 Fragment routing method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1790416A (en) * 2004-12-17 2006-06-21 兴业银行股份有限公司 Data processing method and data processing system
US20120131582A1 (en) * 2009-07-22 2012-05-24 Alibaba Group Holding Limited System and Method for Real-Time Batch Account Processing
CN106981021A (en) * 2017-03-28 2017-07-25 中国工商银行股份有限公司 It is a kind of to realize the data processing method continuously serviced and device
CN110610414A (en) * 2019-09-19 2019-12-24 中国银行股份有限公司 Data processing method and system
CN111680080A (en) * 2020-04-16 2020-09-18 中邮消费金融有限公司 Data processing method and data processing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1790416A (en) * 2004-12-17 2006-06-21 兴业银行股份有限公司 Data processing method and data processing system
US20120131582A1 (en) * 2009-07-22 2012-05-24 Alibaba Group Holding Limited System and Method for Real-Time Batch Account Processing
CN106981021A (en) * 2017-03-28 2017-07-25 中国工商银行股份有限公司 It is a kind of to realize the data processing method continuously serviced and device
CN110610414A (en) * 2019-09-19 2019-12-24 中国银行股份有限公司 Data processing method and system
CN111680080A (en) * 2020-04-16 2020-09-18 中邮消费金融有限公司 Data processing method and data processing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347094A (en) * 2021-06-22 2021-09-03 深圳壹账通智能科技有限公司 Fragment routing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108804112B (en) Block chain settlement processing method and system
CN103677771B (en) Processing method and device for concurrent transactions
CN110659887A (en) Automatic transaction processing system and method based on block chain
CN110659983A (en) Bank accounting data processing method and device, electronic equipment and storage medium
CN115409590A (en) Unified account checking method, device, equipment and storage medium
CN111444213B (en) Ledger clearing system and method based on credit business
CN109614263B (en) Disaster tolerance data processing method, device and system
CN113112344B (en) Service processing method, device, storage medium and computer program product
DE112010004808T5 (en) Simultaneous execution of request processing and analysis of requirements
CN112099934A (en) Batch processing method, system, computer equipment and storage medium
CN106708869B (en) Group data processing method and device
CN110532069A (en) A kind of distributed transaction submission method and device
CN110827001A (en) Accounting event bookkeeping method, system, equipment and storage medium
CN111028025B (en) Bill data processing method, device, equipment and medium based on big data
US10417038B2 (en) Batched commit in distributed transactions
CN113177772A (en) Service data processing method, device and system
CN111639057A (en) Log message processing method and device, computer equipment and storage medium
Xing Financial Big Data Reconciliation Method
CN112085607A (en) Resource transfer method, device and equipment
CN113657988A (en) Service processing method, device, equipment and storage medium
CN112052016A (en) Transaction link oriented gray level publishing method and information system
CN112258306A (en) Accounting information checking method and device, electronic equipment and storage medium
CN111582851B (en) Platform money printing method and device based on big data, electronic equipment and storage medium
CN113055401B (en) Enterprise business authorization processing method and device
CN115187358B (en) Account checking engine data processing system and working method thereof

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