Transaction data processing method and device, equipment and medium
By setting scanning rules and creating temporary accounts in transaction data processing, the resource consumption problem caused by repeated scanning of delayed account transactions is solved, and more efficient transaction data processing is achieved, real-time and flexibility are improved.
Patent Information
- Application Number
- CN202311862948.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2025-07-01
AI Technical Summary
When processing delayed accounted transaction data, there is a large resource consumption in the prior art, which affects the processing speed and database performance of real-time accounted transactions, and delayed accounted transactions may be scanned repeatedly, resulting in transaction failure.
By setting scanning rules and scanning progress information, ensure that the transaction data scanned during each scanning cycle is different, create a temporary account to update the resource value, and adjust it when the accounting time reaches to avoid repeated scanning.
Save resource consumption, improve processing speed and database performance, ensure real-time real-time account entry transactions, improve customer experience, and improve the flexibility of delayed account entry transactions.
Smart Images

Figure CN120235698A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and in particular, to a method, apparatus, device, and medium for processing transaction data. Background Art
[0002] In financial accounting management-related systems, delayed posting is a common business requirement, that is, after receiving a posting request, the remaining resource value (balance) of the receiving account is not immediately adjusted, and the posting process is not immediately performed. Instead, according to business requirements, the posting process is performed after a certain period of time. In related technologies, when processing delayed posting transaction data, before the posting time of this delayed posting transaction data is reached, this delayed posting transaction may be repeatedly scanned in multiple scan cycles until its posting time is reached and the posting process is performed on it. It can be seen that in related technologies, at least when processing delayed posting transaction data, there is a technical problem of relatively high resource consumption.
[0003] Therefore, there is an urgent need for a technical solution that can save resource consumption when processing transaction data such as delayed posting transaction data. Summary of the Invention
[0004] This application provides a method, apparatus, device, and medium for processing transaction data, which can save resource consumption when processing transaction data such as delayed posting transaction data.
[0005] In a first aspect, this application provides a method for processing transaction data, and the method includes:
[0006] For any scan cycle, based on a set scan rule, scan a transaction data table to obtain the transaction data scanned in the scan cycle; wherein, the transaction data scanned in different scan cycles are different from each other;
[0007] For any delayed posting transaction data scanned, determine a temporary account corresponding to the posting time and the receiving account according to the posting time and the receiving account indicated by the delayed posting transaction data; update the resource value in the temporary account according to the resource value indicated by the delayed posting transaction data; when it is recognized that the posting time is reached, adjust the remaining resource value in the receiving account according to the resource value in the temporary account.
[0008] In a possible implementation manner, the step of scanning the transaction data table based on a set scan rule for any scan cycle includes:
[0009] For any scan cycle, scan the transaction data table based on scan progress information.
[0010] In a possible implementation, the scanning of the transaction data table based on the scanning progress information includes:
[0011] Obtaining the cut-off time of transaction data generation corresponding to the previous scanning cycle;
[0012] Based on the cut-off time of transaction data generation and the set time interval of transaction data generation, determining the time period of transaction data generation corresponding to the scanning cycle;
[0013] Scanning each transaction data in the transaction data table whose transaction data generation time is within the time period of transaction data generation.
[0014] In a possible implementation, the scanning of the transaction data table based on the set scanning rules for any scanning cycle includes:
[0015] For any scanning cycle, scanning each transaction data marked as pending entry in the transaction data table;
[0016] After updating the resource value in the temporary account, before adjusting the remaining resource value in the receiving account according to the resource value in the temporary account when it is recognized that the entry time is reached, the method further includes:
[0017] Marking the delayed entry transaction data as having been entered.
[0018] In a possible implementation, the updating of the resource value in the temporary account according to the entry resource value indicated by the delayed entry transaction data includes:
[0019] If it is recognized that among the delayed entry transaction data scanned within the scanning cycle, there is at least one first other transaction data with the same entry time and receiving account as the delayed entry transaction data, then updating the resource value in the temporary account according to the entry resource value indicated by the delayed entry transaction data and the entry resource value indicated by the at least one first other transaction data.
[0020] In a possible implementation, the method further includes:
[0021] For any real-time entry transaction data scanned, obtaining the receiving account indicated by the real-time entry transaction data;
[0022] Based on the entry resource value indicated by the real-time entry transaction data, adjusting the remaining resource value in the receiving account.
[0023] In a possible implementation manner, adjusting the remaining resource value in the receiving account based on the incoming resource value indicated by the real-time incoming transaction data includes:
[0024] If at least one second other transaction data with the same receiving account as the real-time incoming transaction data is identified among the real-time incoming transaction data scanned within the scanning period, then adjust the remaining resource value in the receiving account according to the incoming resource value indicated by the real-time incoming transaction data and the incoming resource value indicated by the at least one second other transaction data.
[0025] In a possible implementation manner, the method further includes:
[0026] Closing the temporary account.
[0027] In a possible implementation manner, after updating the resource value in the temporary account and before, when it is recognized that the incoming time is reached, adjusting the remaining resource value in the receiving account according to the resource value in the temporary account, the method further includes:
[0028] Cleaning and archiving the delayed incoming transaction data.
[0029] In a second aspect, the present application provides a transaction data processing device, and the device includes:
[0030] A scanning module, configured to scan a transaction data table for any scanning period based on a set scanning rule to obtain the transaction data scanned within the scanning period; wherein, the transaction data scanned in different scanning periods are different from each other;
[0031] A determining module, configured to, for any delayed incoming transaction data scanned, determine a temporary account corresponding to the incoming time and the receiving account according to the incoming time and the receiving account indicated by the delayed incoming transaction data; and update the resource value in the temporary account according to the incoming resource value indicated by the delayed incoming transaction data;
[0032] An adjusting module, configured to, when it is recognized that the incoming time is reached, adjust the remaining resource value in the receiving account according to the resource value in the temporary account.
[0033] In a possible implementation manner, the scanning module is specifically configured to:
[0034] For any scanning period, scan the transaction data table based on the scanning progress information.
[0035] In a possible implementation manner, the scanning module is specifically configured to:
[0036] Obtain the cut-off time for generating transaction data corresponding to the previous scan cycle; determine the time period for generating transaction data corresponding to the scan cycle based on the cut-off time for generating transaction data and the set time interval for generating transaction data; scan each piece of transaction data in the transaction data table whose generation time of the transaction data is within the time period for generating transaction data.
[0037] In a possible implementation manner, the scanning module is specifically configured to:
[0038] For any scan cycle, scan each piece of transaction data marked as pending entry in the transaction data table;
[0039] The scanning module is further configured to: after updating the resource value in the temporary account, when it is recognized that the entry time is reached, before adjusting the remaining resource value in the receiving account according to the resource value in the temporary account, mark the delayed entry transaction data as having been entered.
[0040] In a possible implementation manner, the determining module is specifically configured to:
[0041] If it is recognized that among each piece of delayed entry transaction data scanned within the scan cycle, there is at least one first other transaction data with the same entry time and receiving account as the delayed entry transaction data, then update the resource value in the temporary account according to the entry resource value indicated by the delayed entry transaction data and the entry resource value indicated by the at least one first other transaction data.
[0042] In a possible implementation manner, the adjusting module is further configured to:
[0043] For any real-time entry transaction data scanned, obtain the receiving account indicated by the real-time entry transaction data; adjust the remaining resource value in the receiving account based on the entry resource value indicated by the real-time entry transaction data.
[0044] In a possible implementation manner, the adjusting module is specifically configured to:
[0045] If it is recognized that among each piece of real-time entry transaction data scanned within the scan cycle, there is at least one second other transaction data with the same receiving account as the real-time entry transaction data, then adjust the remaining resource value in the receiving account according to the entry resource value indicated by the real-time entry transaction data and the entry resource value indicated by the at least one second other transaction data.
[0046] In a possible implementation manner, the determining module is further configured to:
[0047] Close the temporary account.
[0048] In a possible implementation, the determining module is further configured to:
[0049] Clean up and archive the delayed posting transaction data.
[0050] In a third aspect, the present application provides an electronic device, which at least includes a processor and a memory. When the processor executes a computer program stored in the memory, the steps of the method described in any one of the first aspects are implemented.
[0051] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method described in any one of the first aspects are implemented.
[0052] In a fifth aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, the steps of the method described in any one of the first aspects are implemented.
[0053] Since in the embodiments of the present application, the transaction data scanned in different scanning cycles are different from each other, it is possible to avoid the same delayed posting transaction data being repeatedly scanned in different scanning cycles, and the purpose of saving resource consumption can be achieved. In addition, since resource consumption can be saved, on the basis of saving resource consumption, the present application can improve the processing speed, such as improving the processing speed of other transactions such as real-time posting transactions, and can largely ensure the real-time nature of real-time posting transactions and improve the customer experience of real-time posting transactions; in addition, since resource consumption can be saved, the present application can also improve the database performance, etc., and can to a certain extent avoid the situation where transactions fail due to the failure to successfully write the posting water flow of transactions.
[0054] In addition, compared with the related art in which the number of repeated scans of delayed posting transactions is reduced by restricting the length of the delayed posting time (such as the delayed time of delayed posting cannot exceed a few days, etc.), since the present application can avoid the repeated scanning of delayed posting transaction data, regardless of the length of the delayed time of the delayed posting, each transaction data only needs to be scanned once. Therefore, the length of the delayed time of the delayed posting transaction data in the present application can be unrestricted, thereby improving the flexibility of the delayed posting and improving the customer experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] To more clearly illustrate the embodiments of the present application or the implementation manners in the related art, the following will briefly introduce the drawings required for use in the description of the embodiments or the related art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.
[0056] Figure 1 Fig. shows a schematic diagram of a transaction data processing process provided by the related art;
[0057] Figure 2 Fig. shows a schematic diagram of a first transaction data processing process provided by some embodiments of the present application;
[0058] Figure 3 Fig. shows a schematic diagram of a second transaction data processing process provided by some embodiments of the present application;
[0059] Figure 4 Fig. shows a schematic diagram of a third transaction data processing process provided by some embodiments of the present application;
[0060] Figure 5 Fig. shows a schematic diagram of a fourth transaction data processing process provided by some embodiments of the present application;
[0061] Figure 6 Fig. shows a schematic diagram of a fifth transaction data processing process provided by some embodiments of the present application;
[0062] Figure 7 Fig. shows a schematic diagram of a sixth transaction data processing process provided by some embodiments of the present application;
[0063] Figure 8 Fig. shows a schematic diagram of a seventh transaction data processing process provided by some embodiments of the present application;
[0064] Figure 9 Fig. shows a schematic diagram of an eighth transaction data processing process provided by some embodiments of the present application;
[0065] Figure 10 Fig. shows a schematic diagram of a ninth transaction data processing process provided by some embodiments of the present application;
[0066] Figure 11 Fig. shows a schematic diagram of a transaction data processing device provided by some embodiments of the present application;
[0067] Figure 12 Fig. shows a schematic diagram of the structure of an electronic device provided by some embodiments of the present application. Detailed implementation manners
[0068] In order to make the objectives, technical solutions, and advantages of this application clearer, the following will further describe this application in detail with reference to the accompanying drawings. Obviously, the embodiments described in this application are only a part of the embodiments of this application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.
[0069] It should be noted that the brief description of the terms in this application is only for the convenience of understanding the embodiments described next, rather than intending to limit the embodiments of this application. Unless otherwise specified, these terms should be understood in their ordinary and common meanings.
[0070] In this application, terms such as "first", "second", "third", etc. in the specification, claims, and the above-mentioned drawings are used to distinguish similar or homogeneous objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that such terms can be interchanged under appropriate circumstances.
[0071] The terms "comprising" and "having" and any variations thereof are intended to cover but not exclude inclusion. For example, a product or device comprising a series of components does not necessarily have to be limited to all the components clearly listed, but may include other components not clearly listed or inherent to these products or devices.
[0072] The term "module" refers to any known or later-developed hardware, software, firmware, artificial intelligence, fuzzy logic, or a combination of hardware and / or software code that can perform functions related to that element.
[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of this application.
[0074] In order to save resource consumption, this application provides a method, device, equipment, and storage medium for processing transaction data.
[0075] First, a brief introduction to the design concept of the embodiments of this application will be given below:
[0076] In financial accounting management related systems, real-time posting and delayed posting are two common business requirements. Among them, real-time posting usually means that the account balance is adjusted immediately after receiving the posting request (i.e., the remaining resource value of the receiving account is adjusted), and the posting process is carried out immediately. Delayed posting usually means that the account balance is not adjusted immediately after receiving the posting request, and the posting process is not carried out immediately. Instead, according to business requirements, the posting process is carried out after a certain period of time. The following are some common business scenarios for delayed posting: 1) Delayed posting is required due to trading time restrictions: For example, there is a time difference between domestic and foreign systems, or for financial products such as funds and stocks that are open for trading at fixed times, fund posting requests outside of trading hours are generally recorded as accepted first and the account balance adjustment is carried out after business hours; 2) Delayed posting is required due to risk control needs: For example, when some financial institutions receive large incoming payments, in order to prevent liquidity risks or for reasons such as audit verification, they will use delayed posting to prevent customers from withdrawing funds too quickly, etc.
[0077] See Figure 1 , Figure 1 shows a schematic diagram of a transaction data processing process provided by the related art. The processing process of transaction data in the related art is as follows:
[0078] After receiving the credit notice for any transaction data, the credit statement of the transaction data can be saved first, and the statement status of the transaction data can be marked (recorded) as pending credit. A batch processing task (scheduled batch credit task) can be used to periodically scan (read) the transaction data with the status marked as pending credit at a set frequency according to the set time interval. For any transaction data marked as pending credit scanned within any scanning cycle, it can be first determined whether the transaction data is deferred credit transaction data or real-time credit transaction data. If it is identified that the transaction data is deferred credit transaction data, it can then be determined whether the current time has reached the credit time of the deferred credit transaction data; if the credit time of the deferred credit transaction data has been reached, the credit resource value carried by the transaction data can be counted in the memory, etc., and according to the credit resource value counted in the memory, the remaining resource value (balance) in the account (also known as the main account, receiving account) can be adjusted, that is, the transaction data is credited, and at the same time the statement status of the transaction data is modified to credited; if the credit time of the deferred credit transaction data has not been reached, the transaction data can be left unprocessed, and the transaction data can be repeatedly scanned by the batch processing task in subsequent scanning cycles, and repeatedly determined whether the credit time has been reached until the credit time is reached and it is credited. In addition, if it is identified that the transaction data is real-time credit transaction data, the credit resource value carried by the transaction data can be directly counted in the memory, etc., and according to the credit resource value counted in the memory, the remaining resource value (balance) in the receiving account can be adjusted, and at the same time the statement status of the transaction data is modified to credited.
[0079] However, considering the actual application scenarios, the amount of transaction data is usually very large. For example, the highest transaction peak of a certain retail clearing platform can reach 93,500 transactions per second (Transaction Per Second, TPS), with a daily trading volume of more than 2 billion transactions and a daily peak of more than 50,000 TPS. Due to the large amount of transaction data, if the transaction data processing solution in the related technology is adopted, since the deferred credit transaction data may be repeatedly scanned and repeatedly determined whether the credit time has been reached, there is a problem of large resource consumption, which may affect the processing speed of real-time credit transaction data, cannot meet the real-time nature of real-time credit transactions, and reduces the customer experience of real-time credit services. In addition, it may also affect the database performance, etc., and even easily affect the writing (saving) of the credit statement of the transaction, etc., and easily cause transaction failures, etc.
[0080] In view of this, in order to solve the technical problem of large resource consumption in the related art, the embodiments of the present application provide a transaction data processing method, apparatus, device and medium. The following describes the preferred embodiments of the present application with reference to the accompanying drawings of the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. And without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
[0081] All embodiments of the embodiments of the present application comply with the relevant regulations of national laws and regulations for the acquisition, storage, use, processing, etc. of data.
[0082] Embodiment 1:
[0083] Figure 2 FIG. 1 shows a schematic diagram of the first transaction data processing process provided by some embodiments of the present application. As Figure 2 shown, the process includes the following steps:
[0084] S201: For any scanning period, based on the set scanning rules, scan the transaction data table to obtain the transaction data scanned within the scanning period; wherein, the transaction data scanned in different scanning periods is different from each other.
[0085] The transaction data processing method provided by the embodiments of the present application is applied to an electronic device, which may be, for example, a device such as a PC or a mobile terminal, or a device such as a server.
[0086] In a possible implementation manner, when the electronic device receives an incoming notice for any transaction data, it may first save the incoming transaction record of the transaction data, mark the transaction record status as pending incoming, and save the transaction data to the transaction data table. The electronic device may use a batch processing task (timed batch incoming task) to scan the transaction data table at a set time interval based on the set scanning rules to obtain the transaction data scanned within any scanning period. Among them, in order to save resource consumption and avoid the same transaction data from being repeatedly scanned in different scanning periods, the transaction data scanned by the electronic device in different scanning periods may be different from each other.
[0087] Optionally, in order to ensure that the transaction data scanned in different scanning periods is different from each other, when scanning the transaction data table based on the set scanning rules for any scanning period, the transaction data table may be scanned based on the scanning progress information, so as to ensure that the transaction data scanned in different scanning periods is different from each other. Specifically, each scanning period may be configured with certain scanning progress information, and the transaction data table may be scanned based on the corresponding scanning progress information.
[0088] For example, the scanning progress information corresponding to each scanning cycle can be pre-specified. For example, in the first scanning cycle, the transaction data generated during the time period from 08:00 to 08:10 in the morning is scanned, and in the second scanning cycle, the transaction data generated during the time period from 08:10 to 08:30 in the morning is scanned, etc. The scanning progress information (transaction data generation time period) corresponding to each scanning cycle is different, so that it can be ensured that the transaction data scanned in different scanning cycles is different from each other, and the same transaction data is avoided from being scanned repeatedly.
[0089] Again, for example, for each scanning cycle, when obtaining the transaction data that should be scanned within the scanning cycle, the cut-off time for the generation of the transaction data corresponding to the previous scanning cycle can be obtained first, that is, the scanning progress information of the previous scanning cycle can be obtained (read). Based on the cut-off time for the generation of the transaction data corresponding to the previous scanning cycle and the set time interval for the generation of the transaction data, the time period for the generation of the transaction data corresponding to the scanning cycle can be determined, and the transaction data generated during the time period for the generation of the transaction data is scanned. Exemplarily, assuming that the scanning progress information of the previous scanning cycle is to scan the transaction data generated before 9:00 in the morning on a certain date, that is, the cut-off time for the generation of the transaction data corresponding to the previous scanning cycle is: 9:00 in the morning on a certain date, and the set time interval for the generation of the transaction data is 10 minutes, then the time period for the generation of the transaction data corresponding to the current scanning cycle can be determined to be from 9:00 to 9:10 in the morning on a certain date, and the transaction data generated from 9:00 to 9:10 in the morning on a certain date can be scanned.
[0090] Considering that if the time interval for the generation of the transaction data corresponding to the scanning cycle is relatively long, the time required to complete a scanning cycle (for the convenience of description, referred to as the scanning cycle time span) may be relatively long. If the scanning cycle time span is too long, it may not be possible to ensure the timeliness and stability of the transaction posting timeliness, and may reduce the customer experience of the real-time posting service and the delayed posting service. In order to ensure the timeliness and stability of the transaction data processing and improve the customer experience, the time interval for the generation of the transaction data corresponding to each scanning cycle can be relatively short. For example, the time interval for the generation of the transaction data corresponding to each scanning cycle can be at the minute level or the second level. This application does not specifically limit the time interval for the generation of the transaction data corresponding to each scanning cycle, and can be flexibly set according to requirements.
[0091] S202: For any scanned deferred credit transaction data, determine a temporary account corresponding to the credit time and the receiving account according to the credit time and the receiving account indicated by the deferred credit transaction data; update the resource value in the temporary account according to the resource value for credit indicated by the deferred credit transaction data; when it is recognized that the credit time is reached, adjust the remaining resource value in the receiving account according to the resource value in the temporary account.
[0092] In a possible implementation, for each scanned transaction data, the electronic device can determine whether the transaction data is deferred credit transaction data or real-time credit transaction data. For example, it can be determined whether the transaction data is deferred credit transaction data or real-time credit transaction data based on the transaction type identifier carried in the transaction data, etc. This application does not make specific limitations in this regard.
[0093] Optionally, for any scanned transaction data, when it is recognized that the transaction data is deferred credit transaction data, in order to save resource consumption, the credit time and the information of the receiving account of the transaction data can be obtained based on the credit information carried in the transaction data, and a temporary account corresponding to the credit time and the receiving account of the deferred credit transaction data can be created. First, update the resource value in the temporary account according to the resource value for credit indicated by the deferred credit transaction data to implement the credit processing of the deferred credit transaction data; then, when it is subsequently recognized that the credit time of the deferred credit transaction data is reached, adjust the remaining resource value in the receiving account according to the resource value in the temporary account.
[0094] Among them, the receiving account can also be referred to as the main account, account, etc. This application does not make specific limitations on the specific credit time and the receiving account. For any deferred credit transaction data, it can first be determined whether a temporary account corresponding to the credit time and the receiving account of the deferred credit transaction data has been created currently. If the temporary account has been created currently, a duplicate temporary account does not need to be created, and the deferred credit transaction data can be directly processed for credit based on this temporary account; otherwise, if a temporary account corresponding to the credit time and the receiving account of the deferred credit transaction data has not been created currently, a temporary account corresponding to the credit time and the receiving account of the deferred credit transaction data can be created.
[0095] Exemplarily, assume that the posting time of a certain deferred posting transaction data is 9:00 am next Monday, and the receiving account is Merchant A. If there is no corresponding temporary account for 9:00 am next Monday and Merchant A created yet, a temporary account can be created, which can be used to post the deferred posting transaction data for Merchant A at 9:00 am next Monday. If a temporary account corresponding to 9:00 am next Monday and Merchant A has been created in a previous scan cycle, the deferred posting transaction can be directly posted based on this temporary account. Another example, for each deferred posting transaction with a posting time of 9:00 am next Tuesday and a receiving account of Merchant B, a dedicated temporary account can be created, which can be used to post several deferred posting transactions for Merchant B at 9:00 am next Tuesday. That is to say, the temporary account can be created in the current scan cycle or in any previous scan cycle. For the same posting time and receiving account, only one temporary account needs to be created. Multiple deferred posting transaction data with the same posting time and receiving account can share one temporary account.
[0096] In a possible implementation manner, for any deferred posting transaction data, the electronic device can obtain the created temporary account corresponding to the posting time and receiving account of the deferred posting transaction data, and update the resource value (such as the amount) in the temporary account based on the posting resource value (such as the transaction amount, etc.) indicated (carried) by the deferred posting transaction data, so as to post the deferred posting transaction data. Exemplarily, assume that the current resource value of the temporary account is 0, and the posting resource value of a certain deferred posting transaction data is 20 yuan, then the resource value in the temporary account can be updated to 20 yuan.
[0097] In addition, the present application also provides another scanning method that can ensure that the transaction data scanned in different scan cycles are different from each other and avoid the deferred posting transaction data from being scanned repeatedly. Specifically, in order to save resource consumption, after updating the resource value in the temporary account according to the posting resource value indicated by the deferred posting transaction data, the deferred posting transaction data can be immediately marked (modified) as posted. Correspondingly, in any scan cycle, when scanning the transaction data table based on the set scanning rules, only the transaction data marked as pending posting in the transaction data table can be scanned, so as to avoid the deferred posting transaction data from being scanned repeatedly and ensure that the transaction data scanned in different scan cycles are different from each other.
[0098] In a possible implementation, to save resource consumption, the resource value in the temporary account can be updated according to the credited resource value indicated by the deferred credit transaction data. That is, after the deferred credit transaction data is credited based on the temporary account, the data such as the credit transaction record related to the transaction data can be immediately cleared and archived, so as to clear and archive the deferred credit transaction data. Compared with the related art where the deferred credit transaction data can only be cleared and archived after it is credited at the credited time of the deferred credit transaction data, the present application can promptly clear and archive the deferred credit transaction data, further saving resource consumption and improving the processing speed.
[0099] In a possible implementation, after updating the resource value in the temporary account based on the credited resource value carried by the transaction data, when it is recognized that the credited time of the transaction is reached, the remaining resource value in the receiving account can be adjusted according to the resource value in the temporary account. That is, the resource value in the temporary account is transferred to the receiving account. Exemplarily, assuming that the current resource value (such as the balance) in the receiving account is 100 yuan and the resource value in the temporary account is 20 yuan, the resource value in the receiving account can be adjusted to 120 yuan.
[0100] In a possible implementation, after the remaining resource value in the receiving account is adjusted according to the resource value in the temporary account when the credited time is reached, the temporary account can be closed.
[0101] Optionally, to save resources and avoid repeatedly determining whether the credited time is reached, when determining whether the credited time is reached, a timer can be used to determine whether the current time reaches the credited time of the deferred credit transaction data. If the current time reaches the credited time of the deferred credit transaction data, it can be promptly recognized that the credited time is reached, and the subsequent step of adjusting the remaining resource value in the receiving account according to the resource value in the temporary account can be promptly performed.
[0102] In addition, when determining whether the credited time is reached, it can also be determined in each scanning cycle whether the credited time corresponding to the temporary account is reached. Exemplarily, if the credited time corresponding to the temporary account is not reached in the current scanning cycle, it can be continuously determined in the next scanning cycle whether the credited time corresponding to the temporary account is reached until it is recognized that the credited time is reached and the step of adjusting the remaining resource value in the receiving account according to the resource value in the temporary account is executed. The present application does not specifically limit the method for determining whether the credited time is reached, and it can be flexibly set according to requirements.
[0103] Since in the embodiments of the present application, the transaction data scanned in different scanning cycles are different from each other, it is possible to avoid the same delayed posting transaction data being repeatedly scanned in different scanning cycles, thereby achieving the purpose of saving resource consumption. In addition, since resource consumption can be saved, on the basis of saving resource consumption, the present application can improve the processing speed, such as improving the processing speed of other transactions such as real-time posting transactions, and can largely ensure the real-time nature of real-time posting transactions, improving the customer experience of real-time posting transactions; in addition, since resource consumption can be saved, the present application can also improve the database performance, etc., and can to a certain extent avoid the situation where transactions fail due to the posting flow of transactions that have not been successfully written.
[0104] In addition, compared with the related art in which the number of repeated scans of delayed posting transactions is reduced by restricting the length of the delayed posting time (such as the delay time of delayed posting cannot exceed several days, etc.), since the present application can avoid the repeated scanning of delayed posting transaction data, regardless of the length of the delay time of the delayed posting, each transaction data only needs to be scanned once. Therefore, the length of the delay time of the delayed posting transaction data in the present application can be unrestricted, thereby improving the flexibility of the delayed posting and improving the customer experience.
[0105] For ease of understanding, the following will further explain the transaction data processing process provided by the present application through a specific embodiment. Refer to Figure 3 , Figure 3 FIG. shows a schematic diagram of a second transaction data processing process provided by some embodiments of the present application, and this process includes the following steps:
[0106] S301: Obtain the cut-off time of transaction data generation corresponding to the previous scanning cycle, and based on the cut-off time of transaction data generation and the set transaction data generation time interval, determine the transaction data generation time period corresponding to the current scanning cycle, and scan each transaction data generated during this transaction data generation time period.
[0107] S302: For any transaction data scanned during the current scanning cycle, if it is identified that the transaction data is delayed posting transaction data, then based on the posting information carried by the transaction data, obtain the posting time of the transaction data and the information of the receiving account.
[0108] S303: Obtain the created temporary account corresponding to the posting time and the receiving account, and update the resource value in the temporary account based on the posting resource value carried by the transaction.
[0109] S304: When it is identified that the posting time of the corresponding transaction is reached, adjust the remaining resource value in the receiving account according to the resource value in the temporary account.
[0110] For ease of understanding, the following will further explain the transaction data processing process provided in this application through a specific embodiment. Refer to Figure 4 , Figure 4 FIG. Figure 4 shows a schematic diagram of a third transaction data processing process provided by some embodiments of this application. This process includes the following steps:
[0111] S401: For any scanning cycle, scan each transaction data marked as pending posting in the transaction data table.
[0112] S402: For any transaction data scanned in this scanning cycle, if it is identified that the transaction data is a delayed posting transaction data, based on the posting information carried by the transaction data, obtain the posting time of the transaction data and the information of the receiving account.
[0113] S403: Obtain the created temporary account corresponding to the posting time and the receiving account, update the resource value in the temporary account based on the posting resource value carried by the transaction, and mark the delayed posting transaction data as posted.
[0114] Among them, marking the delayed posting transaction data as posted can make the delayed posting transaction data not be scanned in any subsequent scanning cycle.
[0115] S404: Clean up and file the delayed posting transaction data.
[0116] S405: When it is identified that the posting time of the corresponding transaction is reached, adjust the remaining resource value in the receiving account according to the resource value in the temporary account.
[0117] Among them, S405 can also be directly executed after step S403 without executing step S404. In the figure, step S404 is represented by a dotted line.
[0118] Embodiment 2:
[0119] Considering that the number of concurrent transactions corresponding to a hot account (a hot account can refer to an account with frequent quota increases and decreases) may be relatively large. If each transaction of the hot account is processed separately, it may consume more resources and affect the processing speed. To save resource consumption, improve the processing speed, and support high concurrency of transactions, based on the above embodiments, in the embodiments of this application, updating the resource value in the temporary account according to the posting resource value indicated by the delayed posting transaction data includes:
[0120] If, among the delayed posting transaction data scanned within the scanning period, there is at least one first other transaction data with the same posting time and receiving account as the delayed posting transaction data, then update the resource value in the temporary account according to the posting resource value indicated by the delayed posting transaction data and the posting resource value indicated by the at least one first other transaction data.
[0121] In a possible implementation manner, for any delayed posting transaction data, when updating the resource value in the temporary account according to the posting resource value indicated by the delayed posting transaction data, it can first be determined whether there is at least one other transaction data (hereinafter referred to as the first other transaction data for convenience of description) with the same posting time and receiving account as the delayed posting transaction data among the delayed posting transaction data scanned within the current scanning period. If there is, then the resource value in the temporary account can be updated based on the posting resource value indicated by this transaction data (delayed posting transaction data) and the posting resource values indicated by each first other transaction data, and the posting process for this transaction data (delayed posting transaction data) and each first other transaction data can be completed, and this transaction data and each first other transaction data can be respectively marked as posted. That is to say, for any scanning period, if there are multiple delayed posting transaction data with the same posting time and receiving account among the transaction data scanned in this scanning period, then these multiple delayed posting transaction data can be processed simultaneously at one time, so as to achieve the purpose of saving resource consumption, improving processing speed, and supporting high concurrency.
[0122] Optionally, when updating the resource value in the temporary account based on the posting resource values carried by multiple delayed posting transaction data, the posting resource values carried by these multiple delayed posting transaction data can be added up, and the sum value obtained by the addition can be accumulated into the current resource value of the temporary account. Exemplarily, assume that the current resource value of the temporary account is 0, and the sum value of the posting resource values carried by these multiple delayed posting transaction data is 50 yuan, then the resource value in the temporary account can be updated to 50 yuan. Assume that the current resource value of the temporary account is 100 yuan, and the sum value of the posting resource values carried by these multiple delayed posting transaction data is 50 yuan, then the resource value in the temporary account can be updated to 150 yuan.
[0123] For ease of understanding, the following uses a specific embodiment to illustrate the transaction data processing process provided by this application. Refer to Figure 5 , Figure 5 shows a schematic diagram of the fourth transaction data processing process provided by some embodiments of this application, and this process includes the following steps:
[0124] S501: For any transaction data marked as pending entry scanned within any scanning cycle, if it is recognized that the transaction data is delayed entry transaction data, then based on the entry information carried by the transaction data, obtain the entry time of the transaction data and the information of the receiving account.
[0125] S502: Obtain the created temporary account corresponding to the entry time of the transaction data and the receiving account. If it is recognized that among the pending delayed entry transaction data scanned within this scanning cycle, there is at least one first other transaction data with the same entry time and receiving account as this transaction data, then based on this transaction data and the entry resource values carried by each first other transaction data, update the resource value in the temporary account; mark this transaction data and each first other transaction data as having been entered.
[0126] S503: When it is recognized that the entry time of the corresponding temporary account is reached, adjust the remaining resource value in the receiving account according to the resource value in the temporary account.
[0127] For ease of understanding, the following will further illustrate the transaction data processing process provided by this application through a specific embodiment. Refer to Figure 6 , Figure 6 FIG. shows a schematic diagram of the fifth transaction data processing process provided by some embodiments of this application, and this process includes the following steps:
[0128] S601: Obtain the transaction data generation cut-off time corresponding to the previous scanning cycle. Based on this transaction data generation cut-off time and the set transaction data generation time interval, determine the transaction data generation time period corresponding to this scanning cycle, and scan each transaction data generated within this transaction data generation time period.
[0129] S602: For any transaction data scanned within this scanning cycle, if it is recognized that the transaction data is delayed entry transaction data, then based on the entry information carried by the transaction data, obtain the entry time of the transaction data and the information of the receiving account.
[0130] S603: Obtain the created temporary account corresponding to the entry time of the transaction data and the receiving account. If it is recognized that among the delayed entry transaction data scanned within this scanning cycle, there is at least one first other transaction data with the same entry time and receiving account as this transaction data, then based on this transaction data and the entry resource values carried by each first other transaction data, determine the resource value in the temporary account.
[0131] S604: When it is recognized that the entry time of the corresponding temporary account is reached, adjust the remaining resource value in the receiving account according to the resource value in the temporary account.
[0132] Since this application can process multiple delayed posting transaction data simultaneously, it can save resource consumption, improve processing speed, and support high concurrency of transactions.
[0133] Embodiment 3:
[0134] Considering that if the resource value in the temporary account is 0, it may not be necessary to adjust the resource value in the corresponding receiving account (main account). To save resource consumption, after updating the resource value in the temporary account based on the resource value carried in the transaction data, before adjusting the remaining resource value in the receiving account according to the resource value in the temporary account when it is recognized that the corresponding posting time has arrived, it is also possible to first determine whether the resource value in the temporary account is 0. If the resource value in the temporary account is 0, it can be considered that there is temporarily no need to adjust the remaining resource value in the receiving account, and the step of adjusting the remaining resource value in the receiving account according to the resource value in the temporary account when it is recognized that the posting time has arrived can be temporarily skipped.
[0135] Optionally, if the resource value in the temporary account is not 0, it can be considered that the resource value in the temporary account needs to be transferred to the receiving account, and the step of adjusting the remaining resource value in the receiving account according to the resource value in the temporary account when it is recognized that the posting time has arrived can be performed.
[0136] For ease of understanding, the following uses a specific embodiment to explain the transaction data processing process provided by this application. Refer to Figure 7 , Figure 7 shows a schematic diagram of the sixth transaction data processing process provided by some embodiments of this application. This process includes the following steps:
[0137] S701: Obtain the cut-off time for generating transaction data corresponding to the previous scan cycle. Based on this cut-off time for generating transaction data and the set time interval for generating transaction data, determine the time period for generating transaction data corresponding to the current scan cycle, and scan each transaction data marked as pending posting generated within this time period for generating transaction data.
[0138] S702: For any transaction data marked as pending posting scanned within the current scan cycle, if it is recognized that this transaction data is delayed posting transaction data, obtain the posting time of this transaction data and the information of the receiving account based on the posting information carried in this transaction data.
[0139] S703: Obtain the created temporary account corresponding to the posting time of the transaction data and the receiving account. If, among the pending delayed posting transaction data scanned within the scanning period, there is at least one first other transaction data with the same posting time and receiving account as the transaction data, then determine the resource value in the temporary account based on the transaction data and the posting resource values carried by each first other transaction data; mark the transaction data and each first other transaction data as posted.
[0140] S704: Determine whether the resource value in the temporary account is 0. If not, when it is recognized that the posting time corresponding to the temporary account is reached, adjust the remaining resource value in the receiving account according to the resource value in the temporary account.
[0141] Embodiment 4:
[0142] To ensure the timeliness of processing real-time posting transaction data, based on the above embodiments, in the embodiments of the present application, the method further includes:
[0143] For any real-time posting transaction data scanned, obtain the receiving account indicated by the real-time posting transaction data;
[0144] Based on the posting resource value indicated by the real-time posting transaction data, adjust the remaining resource value in the receiving account.
[0145] In a possible implementation manner, after obtaining the transaction data scanned within the current scanning period, for any one of the transaction data, if it is recognized that the transaction data is real-time posting transaction data, the transaction data can be processed (posting process) in a timely and real-time manner. Specifically, when processing the real-time posting transaction data, based on the posting information carried by the transaction data, etc., the information of the receiving account indicated by the transaction data can be obtained, and based on the posting resource value indicated by (carried by) the real-time posting transaction data, the remaining resource value in the receiving account can be adjusted, that is, transfer the posting resource value to the receiving account. Exemplarily, assuming that the posting resource value carried by the transaction data is 10 yuan and the remaining resource value (balance) of the receiving account is 200 yuan, then the remaining resource value in the receiving account can be adjusted to 210 yuan.
[0146] Optionally, after adjusting the remaining resource value in the receiving account based on the posting resource value carried by the real-time posting transaction data, the real-time posting transaction data can be marked as posted to avoid the real-time posting transaction data being repeatedly scanned in subsequent scanning periods, etc.
[0147] For ease of understanding, the following uses a specific embodiment to explain the transaction data processing process provided by the present application. Refer to Figure 8 ,Figure 8 The figure shows a schematic diagram of the seventh transaction data processing process provided by some embodiments of the present application. The process includes the following steps:
[0148] S801: Obtain the cut-off time for transaction data generation corresponding to the previous scan cycle. Based on this cut-off time for transaction data generation and the set time interval for transaction data generation, determine the time period for transaction data generation corresponding to the current scan cycle, and scan each transaction marked as pending for posting within this time period for transaction data generation.
[0149] S802: For any transaction data marked as pending for posting scanned within the current scan cycle, if it is identified that the transaction data is real-time posting transaction data, obtain the information of the receiving account of the transaction data based on the posting information carried by the transaction data; adjust the remaining resource value in the receiving account based on the posting resource value carried by the transaction data, and mark the transaction data as posted.
[0150] Embodiment 5:
[0151] Considering that if there are a large number of concurrent real-time posting transactions for a hot account, processing each real-time posting transaction for the hot account separately may consume a large amount of resources. To save resource consumption, improve processing speed, and support high concurrency of transactions, based on the above embodiments, in the embodiments of the present application, the adjustment of the remaining resource value in the receiving account based on the posting resource value indicated by the real-time posting transaction data includes:
[0152] If it is identified that among the real-time posting transaction data scanned within the scan cycle, there is at least one second other transaction data with the same receiving account as the real-time posting transaction data, adjust the remaining resource value in the receiving account according to the posting resource value indicated by the real-time posting transaction data and the posting resource value indicated by the at least one second other transaction data.
[0153] In a possible implementation, for any real-time incoming transaction data, when adjusting the remaining resource value in the receiving account based on the incoming resource value of the real-time incoming transaction data, it is possible to first determine whether there is at least one other transaction data (hereinafter referred to as the second other transaction data for convenience of description) in the real-time incoming transaction data scanned within the current scan cycle that has the same receiving account as the real-time incoming transaction data. If so, the remaining resource value in the receiving account can be adjusted based on the incoming resource value carried by this transaction data (real-time incoming transaction data) and each second other transaction data, and the incoming processing of this transaction data (real-time incoming transaction data) and each second other transaction data can be completed, and this transaction data and each second other transaction data can be marked as having been recorded. That is to say, for any scan cycle, if there are multiple real-time incoming transaction data with the same receiving account in the transactions scanned in this scan cycle, these multiple real-time incoming transaction data can be processed simultaneously at one time, so as to achieve the purpose of saving resource consumption, improving processing speed, and supporting high concurrency of transactions.
[0154] For ease of understanding, the following uses a specific embodiment to illustrate the transaction data processing process provided by the present application. Refer to Figure 9 , Figure 9 FIG. shows a schematic diagram of the eighth transaction data processing process provided by some embodiments of the present application, and this process includes the following steps:
[0155] S901: Obtain the transaction data generation cut-off time corresponding to the previous scan cycle, and based on this transaction data generation cut-off time and the set transaction data generation time interval, determine the transaction data generation time period corresponding to the current scan cycle, and scan each transaction data marked as to be recorded generated within this transaction data generation time period.
[0156] S902: For any transaction data marked as to be recorded scanned within the current scan cycle, if it is recognized that this transaction data is real-time incoming transaction data, and it is recognized that there is at least one second other transaction in the real-time incoming transaction data to be processed scanned within this scan cycle that has the same receiving account as this transaction data, then adjust the remaining resource value in the receiving account based on the incoming resource value carried by this transaction data and each second other transaction data; mark this transaction data and each second other transaction data as having been recorded.
[0157] Since the present application can process multiple real-time incoming transaction data simultaneously, it can save resource consumption, improve processing speed, and support high concurrency of transactions.
[0158] For ease of understanding, the following further uses a specific embodiment to explain the transaction data processing process provided by the present application. Refer toFigure 10 , Figure 10 shows a schematic diagram of the ninth transaction data processing process provided by some embodiments of the present application. The transaction data processing process is as follows:
[0159] After receiving the posting notice for any transaction data, the posting transaction record of the transaction data can be saved first, and the transaction record status of the transaction data can be marked (recorded) as pending posting. A batch processing task (timed batch posting task) can be used to periodically scan (read) the transaction data marked as pending posting in the transaction data table at a set frequency according to the set time interval. Wherein, a certain scan progress information can be configured for each scan cycle, and the transaction data table can be scanned based on the scan progress information. Specifically, for each scan cycle, when scanning, the scan progress information of the previous scan cycle can be read first to obtain the cut-off time of the generation of the transaction data corresponding to the previous scan cycle. Based on the cut-off time of the generation of the transaction data and the set time interval of the generation of the transaction data, the time period of the generation of the transaction data corresponding to the current scan cycle can be determined, and each piece of transaction data marked as pending posting in the transaction data table whose generation time of the transaction data is within this time period of the generation of the transaction data can be scanned.
[0160] For any piece of transaction data marked as pending posting scanned in any scan cycle, it can be first determined whether the transaction data is delayed posting transaction data or real-time posting transaction data. If it is recognized that the transaction data is delayed posting transaction data, and if at least one first other transaction data with the same posting time and receiving account as the transaction data is found among the delayed posting transaction data to be processed scanned in the scan cycle, the posting resource values carried by the transaction data and each first other transaction data can be added up in the memory to obtain the sum value of the posting resource values of the transaction data and each first other transaction data, and then the sum value of the posting resource values of the transaction data and each first other transaction data obtained in the memory can be transferred and stored in a disk or the like to prevent the loss of data such as the sum value due to sudden power failure or the like. Optionally, based on the sum value of the posting resource values of the transaction data and each first other transaction data stored in a disk or the like, the resource value in the temporary account corresponding to the posting time and receiving account of the transaction data can be determined, and the transaction data and each first other transaction data can be marked as posted. When the resource value in the temporary account is not 0, the temporary account can be obtained based on the quota transfer task in the electronic device or the like, and it can be recognized whether the posting time corresponding to the temporary account is reached. If it is recognized that the posting time of the transaction is reached, the remaining resource value in the receiving account can be adjusted according to the resource value in the temporary account, that is, the resource value in the temporary account is transferred to the receiving account.
[0161] Optionally, for any transaction data marked as pending entry scanned within any scan cycle, if it is recognized that the transaction data is a real-time entry transaction, and if among the real-time entry transaction data to be processed scanned within the scan cycle, there is at least one second other transaction data with the same receiving account as the transaction data, the entry resource values carried by the transaction data and each second other transaction data can be added up in memory first to obtain the sum value of the entry resource values of the transaction data and each second other transaction data, and then the sum value of the entry resource values of the transaction data and each second other transaction data obtained in memory can be transferred and stored in a disk or the like to prevent the loss of data such as the sum value due to sudden power failure or the like. Optionally, based on the sum value of the entry resource values of the transaction data and each second other transaction data stored in a disk or the like, the remaining resource value in the receiving account can be adjusted, and the transaction data and each second other transaction data can be marked as having been entered.
[0162] For ease of understanding, the specific process by which the present application can save resource consumption will be further explained below through a specific embodiment.
[0163] Assume that the current time is now, the entry time of all delayed entry transaction data is now + T, and the receiving accounts of all delayed entry transaction data are the accounts of merchant A. Assume that the scanning task scans once every t time intervals, that is, the total number of scans required k = T / t. Assume that within the T time starting from the current time now, a total of n real-time entry transaction data and m delayed entry transaction data arrive uniformly and evenly, and n / k real-time entry transaction data and m / k delayed entry transaction data are newly added in each scan cycle.
[0164] In the related art, in the first scan cycle, the number of delayed entry transaction data scanned is m / k. Since these delayed entry transaction data are not processed in time, they will be scanned again in the second scan cycle. The total number of delayed entry transaction data scanned in the second scan cycle is 2m / k. Similarly, the total number of delayed entry transaction data scanned in the third scan cycle is 3m / k, ……, and the total number of delayed entry transaction data scanned in the kth scan cycle is km / k = m. Then the total number of delayed entry transaction data scanned in these k scan cycles is: m / k + 2m / k + 3m / k + …… + km / k = ((m / k + km / k) × k) / 2 = (m + km) / 2 = m × (1 + k) / 2.
[0165] In the related art, the number of real-time entry transaction data scanned in each scan cycle is n / k. The number of real-time entry transaction data scanned in k scan cycles is n, and the total number of transaction data scanned in k scan cycles is n + m × (1 + k) / 2.
[0166] In the embodiment of the present application, since each delayed credit transaction data can be processed in a timely manner when it is scanned for the first time, each delayed credit transaction data can be scanned only once and does not need to be scanned repeatedly. The total number of delayed credit transaction data scanned within k scanning cycles is m. Each real-time credit transaction data is also scanned only once, and the total number of real-time credit transaction data scanned within k scanning cycles is n. The total number of transaction data scanned within k scanning cycles is n + m.
[0167] Thus, it can be roughly estimated that, compared with the related art, for the delayed credit transaction data, the embodiment of the present application can optimize and reduce the number of repeated transaction scans by about (1 + k) / 2 times, that is, (T / 2t) + 0.5 times. The shorter the time interval t between scanning cycles, and the longer the delayed credit time T of the delayed credit transaction data, the higher the optimization degree of the embodiment of the present application. When the transaction volume (m and n) is large, the optimization effect of the present application is more significant. Usually, the time interval t between scanning cycles should be at the minute level. The delayed credit scenario usually spans 2 days of the weekend, that is, 2880 minutes. If the total daily transaction volume (m + n) is 2 billion pens, and assuming that 1% of the transactions are delayed credit transactions, that is, 20 million delayed credit transactions, it can be roughly estimated that, compared with the prior art, the present application can reduce the scanning volume by about 1440 times. When encountering long holidays such as the National Day, the present application can reduce the scanning volume by up to about 5040 times, that is, the scanning time-consuming and resource consumption such as the Central Processing Unit (CPU) are reduced by 5040 times, which is very remarkable in terms of cost reduction and efficiency improvement.
[0168] In addition, even if the present application checks whether the temporary account has reached the credit time in each scanning cycle, the total number of checks within k scanning cycles is k times. For the delayed credit transaction data, the total number of scanned transactions and the number of checks (total number of checks) of the present application are m + k times.
[0169] In the related art, each time a delayed credit transaction data is scanned, it is at least judged once whether the credit time of the transaction has been reached. In the related art, for the delayed credit transaction data, the total number of scanned transactions is m×(1 + k) / 2, and the total number of checks for whether the account has been credited is also assumed to be m×(1 + k) / 2. Then, the total number of scanned transactions and the total number of checks for the delayed credit transaction data in the related art are m×(1 + k), that is, m + mk times. It can also be seen from this that the total number of scanned transactions and the total number of checks of the present application also show a quantitative decrease, and the effect of reducing resource consumption of the present application is significant.
[0170] Embodiment 6:
[0171] Based on the same inventive concept, this application provides a transaction data processing device. Refer to Figure 11 , Figure 11 which shows a schematic diagram of a transaction data processing device provided by some embodiments of this application. The device includes:
[0172] A scanning module 111, configured to scan a transaction data table based on a set scanning rule for any scanning period, and obtain the transaction data scanned during the scanning period; wherein, the transaction data scanned in different scanning periods are different from each other;
[0173] A determination module 112, configured to, for any delayed posting transaction data scanned, determine a temporary account corresponding to the posting time and the receiving account according to the posting time and the receiving account indicated by the delayed posting transaction data; and update the resource value in the temporary account according to the resource value indicated by the delayed posting transaction data;
[0174] An adjustment module 113, configured to, when it is recognized that the posting time has arrived, adjust the remaining resource value in the receiving account according to the resource value in the temporary account.
[0175] In a possible implementation manner, the scanning module 111 is specifically configured to:
[0176] Scan the transaction data table based on the scanning progress information for any scanning period.
[0177] In a possible implementation manner, the scanning module 111 is specifically configured to:
[0178] Obtain the cut-off time of transaction data generation corresponding to the previous scanning period; determine the transaction data generation time period corresponding to the scanning period based on the cut-off time of transaction data generation and the set transaction data generation time interval; and scan each transaction data in the transaction data table whose transaction data generation time is within the transaction data generation time period.
[0179] In a possible implementation manner, the scanning module 111 is specifically configured to:
[0180] Scan each transaction data marked as pending posting in the transaction data table for any scanning period;
[0181] The scanning module 111 is further configured to: after updating the resource value in the temporary account and before adjusting the remaining resource value in the receiving account according to the resource value in the temporary account when it is recognized that the posting time has arrived, mark the delayed posting transaction data as posted.
[0182] In a possible implementation manner, the determining module 112 is specifically configured to:
[0183] If it is recognized that among the delayed posting transaction data scanned within the scanning period, there is at least one first other transaction data with the same posting time and receiving account as the delayed posting transaction data, then update the resource value in the temporary account according to the posting resource value indicated by the delayed posting transaction data and the posting resource values indicated by the at least one first other transaction data.
[0184] In a possible implementation manner, the adjusting module 113 is further configured to:
[0185] For any real-time posting transaction data scanned, obtain the receiving account indicated by the real-time posting transaction data; based on the posting resource value indicated by the real-time posting transaction data, adjust the remaining resource value in the receiving account.
[0186] In a possible implementation manner, the adjusting module 113 is specifically configured to:
[0187] If it is recognized that among the real-time posting transaction data scanned within the scanning period, there is at least one second other transaction data with the same receiving account as the real-time posting transaction data, then adjust the remaining resource value in the receiving account according to the posting resource value indicated by the real-time posting transaction data and the posting resource values indicated by the at least one second other transaction data.
[0188] In a possible implementation manner, the determining module 112 is further configured to:
[0189] Cancel the account of the temporary account.
[0190] In a possible implementation manner, the determining module 112 is further configured to:
[0191] Clean up and file the delayed posting transaction data.
[0192] Embodiment 7:
[0193] Based on the same technical concept, the present application further provides an electronic device. Figure 12 The following shows a schematic structural diagram of an electronic device provided in some embodiments of the present application. As Figure 12 shown, the electronic device includes: a processor 121, a communication interface 122, a memory 123, and a communication bus 124. Among them, the processor 121, the communication interface 122, and the memory 123 communicate with each other through the communication bus 124.
[0194] A computer program is stored in the memory 123. When the program is executed by the processor 121, the processor 121 is caused to execute the steps of the transaction data processing method described in any one of the above embodiments, which will not be elaborated herein.
[0195] The communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, only a thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
[0196] The communication interface 122 is used for communication between the above electronic device and other devices.
[0197] The memory may include a Random Access Memory (RAM), and may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.
[0198] The above processor may be a general-purpose processor, including a central processing unit, a Network Processor (NP), etc.; it may also be a Digital Signal Processing (DSP), an application-specific integrated circuit, a field-programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0199] Embodiment 8:
[0200] Based on the same technical concept, an embodiment of the present application provides a computer-readable storage medium. A computer program executable by an electronic device is stored in the computer-readable storage medium. When the program runs on the electronic device, the electronic device is caused to execute the steps of the transaction data processing method described in any one of the above embodiments, which will not be elaborated herein.
[0201] The above computer-readable storage medium may be any available medium or data storage device accessible by a processor in an electronic device, including but not limited to magnetic memories such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc., optical memories such as CDs, DVDs, BDs, HVDs, etc., and semiconductor memories such as ROMs, EPROMs, EEPROMs, non-volatile memories (NANDFLASH), solid state drives (SSD), etc.
[0202] Based on the same technical concept, the present application provides a computer program product, which includes: computer program code, when the computer program code runs on a computer, it enables the computer to execute the method described in any of the above embodiments of the transaction data processing method applied to an electronic device.
[0203] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof, and can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part.
[0204] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.
[0205] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0206] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means that implement the function specified in the flowchart(s) Figure 1 a flowchart or flowcharts and / or block(s) Figure 1 a block or blocks.
[0207] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable apparatus provide steps for implementing the function specified in the flowchart(s) Figure 1 a flowchart or flowcharts and / or block(s) Figure 1 a block or blocks.
[0208] It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit and scope of the application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.
Claims
1. A method for processing transaction data, characterized in that, The method includes: For any scanning period, based on the set scanning rule, scan the transaction data table to obtain the transaction data scanned during the scanning period; wherein, the transaction data scanned in different scanning periods are different from each other; For any delayed posting transaction data scanned, determine a temporary account corresponding to the posting time and the receiving account according to the posting time and the receiving account indicated by the delayed posting transaction data; update the resource value in the temporary account according to the posting resource value indicated by the delayed posting transaction data; when it is recognized that the posting time is reached, adjust the remaining resource value in the receiving account according to the resource value in the temporary account.
2. The method according to claim 1, characterized in that, The step of, for any scanning period, scanning the transaction data table based on the set scanning rule includes: For any scanning period, scan the transaction data table based on the scanning progress information.
3. The method according to claim 2, wherein The step of scanning the transaction data table based on the scanning progress information includes: Obtain the cut-off time of transaction data generation corresponding to the previous scanning period; Based on the cut-off time of transaction data generation and the set time interval of transaction data generation, determine the time period of transaction data generation corresponding to the scanning period; Scan each transaction data in the transaction data table whose transaction data generation time is within the time period of transaction data generation.
4. The method according to claim 1, characterized in that, The step of, for any scanning period, scanning the transaction data table based on the set scanning rule includes: For any scanning period, scan each transaction data marked as pending posting in the transaction data table; After updating the resource value in the temporary account and before adjusting the remaining resource value in the receiving account according to the resource value in the temporary account when it is recognized that the posting time is reached, the method further includes: Mark the delayed posting transaction data as posted.
5. The method according to any one of claims 1 to 4, characterized in that The step of updating the resource value in the temporary account according to the posting resource value indicated by the delayed posting transaction data includes: If it is recognized that among the delayed posting transaction data scanned during the scanning period, there is at least one first other transaction data with the same posting time and receiving account as the delayed posting transaction data, then update the resource value in the temporary account according to the posting resource value indicated by the delayed posting transaction data and the posting resource value indicated by the at least one first other transaction data.
6. The method according to any one of claims 1-4, characterized in that The method further includes: For any real-time posting transaction data scanned, obtain the receiving account indicated by the real-time posting transaction data; Adjust the remaining resource value in the receiving account based on the posting resource value indicated by the real-time posting transaction data.
7. The method according to claim 6, wherein The step of adjusting the remaining resource value in the receiving account based on the posting resource value indicated by the real-time posting transaction data includes: If among the real-time incoming transaction data scanned within the said scanning period, there is at least one second other transaction data with the same receiving account as that of the real-time incoming transaction data, then the remaining resource value in the receiving account is adjusted according to the incoming resource value indicated by the real-time incoming transaction data and the incoming resource value indicated by the at least one second other transaction data.
8. The method according to any one of claims 1 to 4, characterized in that The method further includes: Closing the temporary account.
9. The method according to any one of claims 1-4, characterized in that, After updating the resource value in the temporary account, before adjusting the remaining resource value in the receiving account according to the resource value in the temporary account when it is recognized that the incoming time has arrived, the method further includes: Cleaning and archiving the delayed incoming transaction data.
10. A transaction data processing device, characterized in that, The device includes: A scanning module, configured to scan a transaction data table for any scanning period based on a set scanning rule, and obtain the transaction data scanned within the scanning period; wherein the transaction data scanned in different scanning periods are different from each other; A determination module, configured to, for any delayed incoming transaction data scanned, determine a corresponding temporary account according to the incoming time and the receiving account indicated by the delayed incoming transaction data; and update the resource value in the temporary account according to the incoming resource value indicated by the delayed incoming transaction data; An adjustment module, configured to adjust the remaining resource value in the receiving account according to the resource value in the temporary account when it is recognized that the incoming time has arrived.