A Distributed Accounting Date Consistency Processing Method, Device and Equipment
By analyzing the historical transaction processing logs and constructing the relationship between transaction processing time and busyness, determining the target busyness and sending the transaction to the target processing node, the problem of the transaction processing system receiving a large number of transactions when the day-cut time is approaching, improving business processing time and reducing workload.
Patent Information
- Application Number
- CN202310896135.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-20
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2043-07-20
AI Technical Summary
As the day cutting time approaches, the transaction processing system receives a large number of transactions, but the transaction processing system has not completed the process when the day cutting time reaches, resulting in the transaction processing system requiring multiple modifications to the day cutting balance, increasing the workload and reducing the business processing time.
By analyzing the historical transaction processing log, the correlation relationship between the transaction processing time of each transaction type and the busyness degree of the transaction processing node is constructed. When a transaction of the specified transaction type is received before the cut-off time, the target busyness degree is determined based on the remaining processing time and the correlation relationship, and the transaction is sent to the target transaction processing node for processing.
As much as possible, let more transactions be processed before the day cutting time, reduce the number of changes in balance before the day cutting time after the day cutting time, reduce the workload of the trading system, and improve the timeliness of business processing.
Smart Images

Figure CN117036014B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of data processing technology and are applicable to the field of financial technology, such as accounting processing scenarios, and more particularly to a distributed accounting date consistency processing method, device and equipment. Background Art
[0002] Banking institutions need to conduct business settlement and statistics on the day's transactions every day. Regardless of whether the system runs 24 hours a day or 8 hours a day, they need to set a time point as the time point for terminating a certain business on the day, and conduct business settlement and statistics on transactions before this time point. Transactions after this time point will be counted as the next day's business, and this time point becomes the cut-off time.
[0003] The transaction processing system will set a cut-off time, at which the system date will be switched. At the same time, during the transaction processing process, it will determine whether the transaction time (i.e. the time when the transaction is received) has exceeded the cut-off time, and determine whether the transaction needs to be settled and counted on the same day based on the judgment result.
[0004] Most of the existing transaction processing systems are distributed structures, and each processing node processes transactions independently. However, since transaction processing takes a certain amount of time, it is possible that the transaction is received before the cut-off date, but the transaction has not been processed when the cut-off date arrives. Therefore, in order to ensure that the total and sub-account balances are equal, and the changes in the sub-account balances are consistent with the changes in the general ledger flow, the transaction amounts corresponding to such transactions that are received before the cut-off date and completed after the cut-off date are added to the balance before the cut-off date. If a large number of such transactions are received near the cut-off date, the transaction processing system needs to modify the balance before the cut-off date multiple times, which increases the workload of the transaction system. If a transaction is processed for a long time because the system freezes during the processing, it is necessary to continue to wait for the transaction to be processed before summarizing and analyzing the balance before the cut-off date, which seriously reduces the timeliness of business processing.
[0005] There is an urgent need for a distributed accounting date consistency processing method to solve the problem that when the cut-off date is approaching, the transaction processing system receives a large number of transactions, but has not yet processed them when the cut-off date arrives, causing the transaction processing system to modify the balance before the cut-off date multiple times, and even reducing the business processing timeliness of the transaction processing system. Summary of the invention
[0006] In order to solve the problem that when the cut-off date is approaching, the transaction processing system receives a large number of transactions, but has not yet processed them when the cut-off date arrives, resulting in the transaction processing system needing to modify the balance before the cut-off date multiple times, and even reducing the business processing timeliness of the transaction processing system, the embodiments of this specification provide a distributed account date consistency processing method, device and equipment, so that as many transactions as possible can be processed before the cut-off date, thereby reducing the number of changes to the balance before the cut-off date after the cut-off date, reducing the workload of the transaction system, and improving the business processing timeliness.
[0007] In order to solve any of the above technical problems, the specific technical solutions of the embodiments of this specification are as follows:
[0008] On the one hand, the embodiments of this specification provide a distributed accounting date consistency processing method, including:
[0009] Analyze historical transaction processing logs and build the correlation between the transaction processing time of each transaction type and the busyness or idleness of the transaction processing node;
[0010] When a transaction of a specified transaction type is received before the cut-off date time, the remaining processing time is calculated based on the transaction receiving time and the cut-off date time;
[0011] Determine the target busyness or idleness corresponding to the transaction according to the remaining processing time and the association relationship;
[0012] A target transaction processing node is determined according to the target busyness and idleness and the transaction type of the transaction, so as to send the transaction to the target transaction processing node for processing.
[0013] Furthermore, the historical transaction processing log includes the transaction type of the historical transaction, the transaction processing time, and the busyness or idleness of the transaction processing node that processed the historical transaction;
[0014] Analyzing the historical transaction processing logs and respectively establishing the correlation between the transaction processing time of each transaction type and the busyness or idleness of the transaction processing node corresponding to the transaction type further includes:
[0015] Classifying the historical transaction processing logs according to the transaction types to obtain a historical transaction processing log set corresponding to each transaction type;
[0016] For the historical transaction processing log set corresponding to a transaction type, constructing a function between the transaction processing time and the busy / idle degree according to a plurality of different transaction processing times in the historical transaction processing log set and the busy / idle degree corresponding to each transaction processing time;
[0017] The function is used as the association relationship.
[0018] Furthermore, according to a plurality of different transaction processing times in the historical transaction processing log set and the busy / idle levels corresponding to each transaction processing time, constructing a function between the transaction processing time and the busy / idle level further includes:
[0019] removing noise data in the transaction processing time and the corresponding busy / idle degree;
[0020] The function is constructed according to the transaction processing time after noise data is removed and the busy / idle degree.
[0021] Furthermore, the busyness level includes a utilization rate of computing resources of the transaction processing node.
[0022] Furthermore, determining the target transaction processing node according to the target busy / idle degree and the transaction type of the transaction further includes:
[0023] Determine a transaction processing node set corresponding to the transaction type according to the transaction type and the calculation type of each transaction processing node;
[0024] The transaction processing node whose busyness matches the target busyness is determined from the transaction processing node set as the target transaction processing node.
[0025] Furthermore, if the busyness of all transaction processing nodes in the transaction processing node set does not meet the target busyness, the method further includes:
[0026] Determine the transaction processing node to be selected according to the user corresponding to the transaction and the distribution of users corresponding to each transaction processing node in the transaction processing node set;
[0027] suspending the transaction being processed by the to-be-selected transaction processing node according to the target busyness and the current busyness of the to-be-selected transaction processing node;
[0028] The to-be-selected transaction processing node that suspends the transaction in process is used as the target transaction processing node.
[0029] Furthermore, pausing the transaction being processed by the to-be-selected transaction processing node according to the target busyness and the current busyness of the to-be-selected transaction processing node further includes:
[0030] The in-process transaction that needs to be suspended is determined according to the priority of the transaction and the priority of the in-process transaction, and the determined in-process transaction is suspended.
[0031] On the other hand, the embodiment of this specification also provides a distributed accounting date consistency processing device, the device comprising:
[0032] A historical transaction processing log analysis unit, used to analyze the historical transaction processing logs and respectively construct a correlation relationship between the transaction processing time of each transaction type and the busyness or idleness of the transaction processing node;
[0033] A remaining processing time calculation unit, configured to calculate the remaining processing time according to the receiving time of the transaction and the cutting day time when a transaction is received before the cutting day time;
[0034] A target busy-idle degree determining unit, configured to determine a target busy-idle degree corresponding to the transaction according to the remaining processing time and the association relationship;
[0035] The target transaction processing node determination unit is used to determine the target transaction processing node according to the target busyness and idleness and the transaction type of the transaction, so as to send the transaction to the target transaction processing node for processing.
[0036] On the other hand, an embodiment of the present specification further provides a computer device, including a memory, a processor, and a computer program stored in the memory, and the processor implements the above method when executing the computer program.
[0037] On the other hand, an embodiment of the present specification further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0038] Using the embodiments of the present specification, the historical transaction processing logs are first analyzed, and the correlation relationship between the transaction processing time of each transaction type and the busyness of the transaction processing node is constructed respectively. Then, when a transaction of the specified transaction type is received before the cut-off time, the remaining processing time is calculated according to the transaction reception time and the cut-off time. Then, the target busyness of the transaction processing node required to complete the transaction before the cut-off time is determined according to the remaining processing time and the constructed correlation relationship. Finally, the target processing node whose busyness meets the determined target busyness and meets the transaction type requirements of the transaction is determined, and the transaction is sent to the determined target processing node, so as to complete the processing of the transaction before the cut-off time, thereby avoiding the situation where the transaction system needs to add the transaction amount of the transaction to the balance before the cut-off time due to the completion of the transaction after the cut-off time, thereby increasing the workload of the transaction processing system. At the same time, by processing multiple transactions received before the cut-off date using the method described in the embodiments of this specification, it is possible to effectively solve the problem that when the cut-off date is approaching, the transaction processing system receives a large number of transactions, but has not yet processed them when the cut-off date arrives, causing the transaction processing system to need to modify the balance before the cut-off date multiple times, and even reducing the business processing timeliness of the transaction processing system. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 The figure shows a schematic diagram of an implementation system of a distributed accounting date consistency processing method in an embodiment of this specification;
[0041] Figure 2 The figure is a flow chart of a method for processing date consistency of distributed accounting in an embodiment of the present specification;
[0042] Figure 3 The following is a step of constructing an association relationship between the transaction processing time of each transaction type and the busyness or idleness of the transaction processing node corresponding to the transaction type in an embodiment of the present specification;
[0043] Figure 4 The figure shows the steps of removing the noise data of the function between the transaction processing time and the busyness in the embodiment of the present specification;
[0044] Figure 5The following is a step of determining a target transaction processing node according to the target busyness and idleness and the transaction type in the embodiment of the present specification;
[0045] Figure 6 The figure shows the steps of releasing the computing resources of the transaction processing nodes when the busyness of all the transaction processing nodes in the transaction processing node set does not meet the target busyness in the embodiment of the specification;
[0046] Figure 7 The figure shows a schematic diagram of the structure of a distributed accounting date consistency processing device in an embodiment of this specification;
[0047] Figure 8 The figure is a schematic diagram of the structure of a computer device in an embodiment of the present specification.
[0048]
Description of the accompanying drawings
[0049] 101. Transaction initiator;
[0050] 102. Transaction processing system;
[0051] 701. Historical transaction processing log analysis unit;
[0052] 702. Remaining processing time calculation unit;
[0053] 703. Target busyness and idleness determination unit;
[0054] 704. Target transaction processing node determination unit;
[0055] 802. Computer equipment;
[0056] 804. Processing equipment;
[0057] 806. Storage resources;
[0058] 808, driving mechanism;
[0059] 810, input / output module;
[0060] 812. Input device;
[0061] 814. Output device;
[0062] 816. Presentation equipment;
[0063] 818. Graphical user interface;
[0064] 820, network interface;
[0065] 822, communication link;
[0066] 824. Communication bus. DETAILED DESCRIPTION
[0067] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of this specification.
[0068] It should be noted that the terms "first", "second", etc. in the description and claims of the embodiments of this specification and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of this specification described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0069] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations.
[0070] like Figure 1 The diagram is a schematic diagram of a distributed ledger date consistency processing method in an embodiment of the specification, including a transaction initiator 101 and a transaction processing system 102. The transaction initiator 101 and the transaction processing system 102 can communicate through a network, which may include a local area network (LAN), a wide area network (WAN), the Internet or a combination thereof, and is connected to a website, a user device (such as a computing device) and a back-end system.
[0071] The transaction initiator 101 sends transaction-related information to the transaction processing system 102, and the transaction processing system 102 processes it. In the embodiment of the present invention, the structure of the transaction processing system 102 is a distributed structure, and the transaction processing system 102 includes multiple transaction processing nodes 1021, and each transaction processing node 1021 processes transactions that conform to its own calculation type. Because the transaction processing system 102 needs to perform business settlement and statistics on the transactions of the day every day, it is necessary to set a time point as the cut-off time for terminating a certain business on the day, and to perform business settlement and statistics on transactions before this cut-off time. If the transaction is not processed before the cut-off time, it is necessary to add the amount of the transaction to the previous day's balance after the transaction is processed, which increases the workload of the transaction processing system 102.
[0072] The distributed ledger date consistency processing method described in the embodiments of this specification realizes allocating the transactions received before the cut-off date to the best transaction processing node 1021, so as to allow as many transactions as possible to be processed before the cut-off date.
[0073] In addition, it should be noted that Figure 1 What is shown is only one application environment provided by the embodiment of this specification. In actual application, other application environments may also be included, and this specification does not limit it.
[0074] Specifically, the embodiments of this specification provide a distributed accounting date consistency processing method, which allows as many transactions as possible to be processed before the cut-off time, thereby reducing the number of changes in the balance before the cut-off date after the cut-off time, reducing the workload of the transaction system, and improving the timeliness of business processing. Figure 2 The figure shows a flow chart of a distributed ledger date consistency processing method according to an embodiment of the present specification. This figure describes the process of processing transactions of a specified transaction type. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or device product is executed, it can be executed in the order of the method shown in the embodiment or the accompanying drawings or in parallel. Specifically, Figure 2 As shown, the method may be performed by the transaction processing system 102, and the method may include:
[0075] Step 201: Analyze the historical transaction processing logs and construct the correlation between the transaction processing time of each transaction type and the busyness or idleness of the transaction processing node;
[0076] Step 202: when a transaction of a specified transaction type is received before the cut-off date time, the remaining processing time is calculated according to the receiving time of the transaction and the cut-off date time;
[0077] Step 203: determining a target busyness level corresponding to the transaction according to the remaining processing time and the association relationship;
[0078] Step 204: Determine a target transaction processing node according to the target busy / idle degree and the transaction type of the transaction, so as to send the transaction to the target transaction processing node for processing.
[0079] Using the embodiments of the present specification, the historical transaction processing logs are first analyzed, and the correlation relationship between the transaction processing time of each transaction type and the busyness of the transaction processing node is respectively constructed. Then, when a transaction of the specified transaction type is received before the cut-off time, the remaining processing time is calculated according to the transaction reception time and the cut-off time. Then, the target busyness of the transaction processing node required to complete the transaction before the cut-off time is determined according to the remaining processing time and the constructed correlation relationship. Finally, the target processing node whose busyness meets the determined target busyness and meets the transaction type requirements of the transaction is determined, and the transaction is sent to the determined target processing node, so as to complete the processing of the transaction before the cut-off time, thereby avoiding the situation where the transaction system needs to add the transaction amount of the transaction to the balance before the cut-off time due to the completion of the transaction after the cut-off time, thereby increasing the workload of the transaction processing system. At the same time, by processing multiple transactions received before the cut-off date using the method described in the embodiments of this specification, it is possible to effectively solve the problem that when the cut-off date is approaching, the transaction processing system receives a large number of transactions, but has not yet processed them when the cut-off date arrives, causing the transaction processing system to need to modify the balance before the cut-off date multiple times, and even reducing the business processing timeliness of the transaction processing system.
[0080] In the embodiments of the present specification, a transaction processing node will generate a log when processing a transaction. The log includes the transaction processing time (i.e., the time used to process the transaction) and the busyness of the transaction processing node when processing the transaction. The busyness may include the computing resource usage of the transaction processing node, such as CPU usage, memory usage, etc. The lower the CPU and memory usage of the transaction processing node, the lower the busyness of the transaction processing node. At this time, the transaction processing speed of the transaction processing node is faster and the processing efficiency is higher.
[0081] In an embodiment of the present specification, for a transaction type, a correlation relationship between the transaction processing time and the busyness of the transaction type can be established according to the processing time of multiple transactions in the historical transaction processing log and the busyness of each transaction. Specifically, according to an embodiment of the present specification, Figure 3 As shown, analyzing the historical transaction processing logs and respectively building the correlation between the transaction processing time of each transaction type and the busyness or idleness of the transaction processing node corresponding to the transaction type further includes:
[0082] Step 301: Classify the historical transaction processing logs according to the transaction type to obtain a historical transaction processing log set corresponding to each transaction type;
[0083] Step 302: for the historical transaction processing log set corresponding to a transaction type, construct a function between the transaction processing time and the busy / idle degree according to a plurality of different transaction processing times in the historical transaction processing log set and the busy / idle degree corresponding to each transaction processing time;
[0084] Step 303: Use the function as the association relationship.
[0085] In the embodiments of the present specification, for a set of historical transaction processing logs corresponding to a transaction type, the busyness or idleness of each historical transaction processing log in the set of historical transaction processing logs can be used as a dependent variable, and the corresponding transaction processing time can be used as an independent variable to construct a function between the transaction processing time and the busyness or idleness. The function can be a linear function or a nonlinear function, and the embodiments of the present specification do not limit this.
[0086] In some other embodiments of this specification, the busyness including CPU usage and memory usage can be normalized to obtain a value, and then the value is used as a dependent variable, and the transaction processing time corresponding to the value is used as an independent variable to construct the function. Exemplarily, the CPU usage and memory usage can be calculated using a weighted summation method to obtain the value. Other normalization methods can also be used, and the embodiments of this specification are not limited.
[0087] According to an embodiment of the present specification, there may be some noise data in the transaction processing time and the corresponding busyness. In order to improve the accuracy of the function, Figure 4 As shown, according to the multiple different transaction processing times in the historical transaction processing log set and the busy / idle levels corresponding to the transaction processing times, constructing a function between the transaction processing time and the busy / idle level further includes:
[0088] Step 401: removing noise data in the transaction processing time and the corresponding busy / idle degree;
[0089] Step 402: construct the function according to the transaction processing time after noise data is removed and the busy / idle degree.
[0090] In an embodiment of the present specification, data cleaning can be performed on the transaction processing time and the corresponding busyness in the historical transaction processing log set to remove noise data such as errors, duplications, deletions and outliers, and then a function can be constructed based on the transaction processing time and the corresponding busyness after removing the noise data.
[0091] In addition, in some other embodiments of the present specification, data smoothing processing may be performed on the constructed function. By performing operations such as averaging and filtering on the data, the constructed function may be made smoother and the accuracy of the function may be improved.
[0092] Then, when a transaction of a specified transaction type is received before the cut-off time, the remaining processing time is calculated based on the transaction receiving time and the cut-off time, that is, the difference between the cut-off time and the transaction receiving time is used as the remaining processing time, and the transaction needs to be completed within the remaining processing time as much as possible. The specified type of transaction can be a transaction that the staff specifies to be processed and completed before the cut-off time.
[0093] Then, the target busy-idle degree corresponding to the transaction is determined according to the remaining processing time and the associated relationship, that is, the busy-idle degree corresponding to the remaining processing time is determined by using the function established above, as the target busy-idle degree, that is, the received transaction is processed and completed within the remaining processing time, requiring the transaction processing node to have a minimum CPU and memory usage rate, as long as the CPU and memory usage rate of the transaction processing node that finally processes the transaction can meet the requirements of processing and completing the transaction within the remaining processing time, it is not required to maximize the transaction processing efficiency. It can be understood that in the embodiment of this specification, a certain number of transactions may be received before the cut-day processing time. The purpose of the distributed account date consistency processing method described in the embodiment of this specification is to process and complete the received transactions as much as possible before the cut-day time. Therefore, for a transaction, it is necessary to leave more computing resources for other transactions as much as possible when it can be processed and completed before the cut-day time.
[0094] Finally, the target transaction processing node is determined according to the target busyness and the transaction type. That is, a transaction processing node whose busyness meets the requirements of the target busyness and whose calculation type meets the transaction type is determined from multiple transaction processing nodes as the target transaction processing node. Specifically, Figure 5 As shown, determining the target transaction processing node according to the target busy / idle degree and the transaction type of the transaction further includes:
[0095] Step 501: Determine a transaction processing node set corresponding to the transaction type according to the transaction type and the calculation type of each transaction processing node;
[0096] Step 502: Determine, from the transaction processing node set, the transaction processing node whose busyness matches the target busyness as the target transaction processing node.
[0097] In the embodiment of the present specification, a plurality of transaction processing nodes whose computing types meet the transaction type requirements may be first determined as a transaction processing node set, and then a transaction processing node whose busyness matches the target busyness may be determined from the transaction processing node set as a target transaction processing node. In addition, a transaction processing node set may be first determined according to the target busyness and busyness of the transaction processing node, and then a transaction processing node whose computing type meets the transaction type requirements may be determined from the transaction processing node set as a target transaction processing node, and the embodiment of the present specification does not limit this.
[0098] According to one embodiment of this specification, Figure 6 As shown, if the busyness of all transaction processing nodes in the transaction processing node set does not meet the target busyness, the method further includes:
[0099] Step 601: determining a transaction processing node to be selected according to the user corresponding to the transaction and the distribution of users corresponding to each transaction processing node in the transaction processing node set;
[0100] Step 602: suspending the transaction being processed by the to-be-selected transaction processing node according to the target busyness and the current busyness of the to-be-selected transaction processing node;
[0101] Step 603: The to-be-selected transaction processing node that suspends the transaction being processed is used as the target transaction processing node.
[0102] In the embodiment of the present specification, because the specified type of transaction is required to be completed before the cut-off time, if the busyness of all transaction processing nodes in the transaction processing node set does not meet the target busyness, it is necessary to release the computing resources of a transaction processing node and have the transaction process node process the transaction.
[0103] The specific transaction processing node whose computing resources need to be released so that the transaction can be completed as much as possible within the remaining processing time after the computing resources are released is determined in combination with the user distribution in the embodiments of this specification.
[0104] Specifically, the transaction processing node to be selected is determined based on the user corresponding to the transaction and the distribution of users corresponding to each transaction processing node in the transaction processing node set. Each transaction processing node will record the transaction initiator user and / or transaction recipient user when processing a transaction, because the transaction processing node needs to cache user data when processing the transaction of the user. When a transaction processing node processes a transaction of a user, if it has previously processed other transactions of the user, the transaction processing node has already cached the user data of the user, and does not need to obtain the user data when processing this transaction. Therefore, the more transactions a transaction processing node processes for a user, the higher the efficiency of continuing to process the transactions of the user. In the embodiment of this specification, a transaction processing node whose user corresponding to the received transaction is the same as the user that has been processed the most is determined in the transaction processing node set as the transaction processing node to be selected.
[0105] Then, the transaction being processed by the transaction processing node to be selected is suspended according to the target busyness and the current busyness of the transaction processing node to be selected. The gradient method can be used to suspend the transaction being processed by the transaction processing node to be selected until the busyness of the transaction processing node to be selected meets the requirements of the target busyness. Then the transaction processing node is used as the target transaction processing node.
[0106] According to an embodiment of the present specification, pausing the transaction being processed by the to-be-selected transaction processing node according to the target busyness and the current busyness of the to-be-selected transaction processing node further comprises:
[0107] The in-process transaction that needs to be suspended is determined according to the priority of the transaction and the priority of the in-process transaction, and the determined in-process transaction is suspended.
[0108] In the embodiments of this specification, the priority of a transaction can indicate the level at which the transaction is required to be completed before the cut-off time, for example, some important transactions need to be completed before the cut-off time, etc. Specifically, the business personnel can set the priority according to the actual transaction requirements. In addition, there are some transactions that are in an intermediate state (processing) due to network fluctuations, system failures, etc. For these transactions, they must also be processed and completed before the start of the cut-off to avoid affecting subsequent processing, so these transactions can also be set to a high priority.
[0109] When it is necessary to suspend the processing transaction on the transaction processing node to be selected, the processing transaction with a lower priority than the received transaction can be suspended according to the transaction priority, thereby releasing the computing resources of the transaction processing node to be selected.
[0110] In some other embodiments of this specification, there may still be some transactions that are not processed until after the cut-day time. The double balance mechanism can be used to add the amount of transactions received before the cut-day time but not processed until after the cut-day time to the balance before the cut-day. Specifically, the double balance mechanism is that when the operation date and the previous day balance update date in the balance table are inconsistent, the previous day balance will be updated to the balance before the transaction, and the current day balance will be updated to the balance before the transaction + / - transaction amount. The previous day balance update date is the latest system operation date. For transactions received later, since the previous transaction has updated the previous day balance and the previous day balance update date, in order to ensure that the total score is equal, the previous day balance update is equal to the previous day balance update + / - transaction amount, and the previous day balance update date remains unchanged. In addition, the cut-day start and end flags can be added before and after the cut-day batch processing node. The cut-day end flag modification needs to be before the balance update backup, and the account adjustment accounting engine automatically compensates the judgment node to the cut-day date, and the processing needs to be completed before the start of the cut-day.
[0111] Based on the same inventive concept, the embodiment of this specification also provides a distributed accounting date consistency processing device, such as Figure 7 As shown, including:
[0112] The historical transaction processing log analysis unit 701 is used to analyze the historical transaction processing logs and respectively establish the correlation between the transaction processing time of each transaction type and the busyness or idleness of the transaction processing node;
[0113] The remaining processing time calculation unit 702 is used to calculate the remaining processing time according to the receiving time of the transaction and the cutting time when receiving the transaction before the cutting time;
[0114] A target busy-idle degree determining unit 703 is used to determine a target busy-idle degree corresponding to the transaction according to the remaining processing time and the association relationship;
[0115] The target transaction processing node determining unit 704 is used to determine the target transaction processing node according to the target busyness and idleness and the transaction type of the transaction, so as to send the transaction to the target transaction processing node for processing.
[0116] Since the principle of solving the problem by the above device is similar to that of the above method, the implementation of the above device can refer to the implementation of the above method, and the repeated parts will not be repeated.
[0117] like Figure 8The structure diagram of the computer device of the embodiment of this specification is shown. The device in the present invention can be a computer device in this embodiment, and executes the method of the present invention described above. The computer device 802 may include one or more processing devices 804, such as one or more central processing units (CPUs), and each processing unit may implement one or more hardware threads. The computer device 802 may also include any storage resource 806, which is used to store any kind of information such as code, settings, data, etc. Non-limiting, for example, the storage resource 806 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any storage resource can use any technology to store information. Further, any storage resource can provide volatile or non-volatile retention of information. Further, any storage resource can represent a fixed or removable component of the computer device 802. In one case, when the processing device 804 executes an associated instruction stored in any storage resource or a combination of storage resources, the computer device 802 can perform any operation of the associated instruction. The computer device 802 also includes one or more drive mechanisms 808 for interacting with any storage resources, such as a hard disk drive mechanism, an optical disk drive mechanism, and the like.
[0118] The computer device 802 may also include an input / output module 810 (I / O) for receiving various inputs (via input devices 812) and for providing various outputs (via output devices 814). A specific output mechanism may include a presentation device 816 and an associated graphical user interface (GUI) 818. In other embodiments, the input / output module 810 (I / O), the input device 812, and the output device 814 may not be included, and the computer device 802 may be used as a computer device in a network. The computer device 802 may also include one or more network interfaces 820 for exchanging data with other devices via one or more communication links 822. One or more communication buses 824 couple the components described above together.
[0119] The communication link 822 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 822 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.
[0120] The embodiments of the present specification also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0121] The embodiments of the present specification also provide a computer-readable instruction, wherein when a processor executes the instruction, the program therein causes the processor to execute the above method.
[0122] It should be understood that in the various embodiments of the present specification, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present specification.
[0123] It should also be understood that in the embodiments of this specification, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the embodiments of this specification generally indicates that the associated objects before and after are in an "or" relationship.
[0124] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of this specification can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of this specification.
[0125] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0126] In the several embodiments provided in the embodiments of this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0127] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this specification.
[0128] In addition, each functional unit in each embodiment of the present specification can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0129] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of this specification is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the embodiment of this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0130] The embodiments of this specification use specific embodiments to illustrate the principles and implementation methods of the embodiments of this specification. The description of the above embodiments is only used to help understand the methods and core ideas of the embodiments of this specification. At the same time, for those skilled in the art, according to the ideas of the embodiments of this specification, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the embodiments of this specification.
Claims
1. A method for processing the consistency of distributed accounting dates, characterized in that, the method includes: Analyze the historical transaction processing logs, and respectively construct the correlation between the transaction processing time of each transaction type and the busy / idle degree of the transaction processing nodes; When a transaction of a specified transaction type is received before the cut-off date, calculate the remaining processing time according to the reception time of the transaction and the cut-off date. The specified type of transaction is the transaction that the staff is required to complete before the cut-off date; Determine the target busy / idle degree corresponding to the transaction according to the remaining processing time and the correlation; Determine the target transaction processing node according to the target busy / idle degree and the transaction type of the transaction, so as to send the transaction to the target transaction processing node for processing; Determining the target transaction processing node according to the target busy / idle degree and the transaction type of the transaction further includes: Determine the set of transaction processing nodes corresponding to the transaction type according to the transaction type and the calculation types of each transaction processing node; Determine the transaction processing node in the set of transaction processing nodes whose busy / idle degree matches the target busy / idle degree as the target transaction processing node; If the busy / idle degree of all transaction processing nodes in the set of transaction processing nodes does not meet the target busy / idle degree, the method further includes: Determine the candidate transaction processing nodes according to the user corresponding to the transaction and the user distribution of each transaction processing node in the set of transaction processing nodes; Suspend the transactions being processed on the candidate transaction processing nodes according to the target busy / idle degree and the current busy / idle degree of the candidate transaction processing nodes; Use the candidate transaction processing node that suspends the transactions being processed as the target transaction processing node; Determining the candidate transaction processing nodes according to the user corresponding to the transaction and the user distribution of each transaction processing node in the set of transaction processing nodes includes: In the set of transaction processing nodes, determine the transaction processing node whose user corresponding to the received transaction is the same as the user with the most processed transactions as the candidate transaction processing node.
2. The method according to claim 1, characterized in that, the historical transaction processing logs include the transaction type of the historical transaction, the transaction processing time, and the busy / idle degree of the transaction processing node that processes the historical transaction; Analyzing the historical transaction processing logs and respectively constructing the correlation between the transaction processing time of each transaction type and the busy / idle degree of the transaction processing node corresponding to the transaction type further includes: Classify the historical transaction processing logs according to the transaction type to obtain a set of historical transaction processing logs corresponding to each transaction type; For the set of historical transaction processing logs corresponding to a transaction type, construct a function between the transaction processing time and the busy / idle degree according to multiple different transaction processing times in the set of historical transaction processing logs and the busy / idle degree corresponding to each transaction processing time; Use the function as the correlation.
3. The method according to claim 2, characterized in that, Constructing a function between the transaction processing time and the busy / idle degree according to multiple different transaction processing times in the historical transaction processing log set and the busy / idle degree corresponding to each transaction processing time further includes: Removing the noise data in the transaction processing time and the corresponding busy / idle degree; Constructing the function according to the transaction processing time and the busy / idle degree after removing the noise data.
4. The method according to claim 2, wherein, the busy / idle degree includes the computing resource utilization rate of the transaction processing node.
5. The method according to claim 1, wherein, Pausing the transactions being processed by the candidate transaction processing node according to the target busy / idle degree and the current busy / idle degree of the candidate transaction processing node further includes: Determining the transactions being processed that need to be paused according to the priority of the transaction and the priority of the transactions being processed, and pausing the determined transactions being processed.
6. A distributed accounting date consistency processing device, wherein, the device includes: A historical transaction processing log analysis unit, configured to analyze the historical transaction processing log, and respectively construct an association relationship between the transaction processing time of each transaction type and the busy / idle degree of the transaction processing node; A remaining processing time calculation unit, configured to calculate the remaining processing time according to the reception time of the transaction and the cut-off date time when a transaction is received before the cut-off date time, and the specified type of transaction is the transaction that the staff specifies to be processed and completed before the cut-off date time; A target busy / idle degree determination unit, configured to determine the target busy / idle degree corresponding to the transaction according to the remaining processing time and the association relationship; A target transaction processing node determination unit, configured to determine a target transaction processing node according to the target busy / idle degree and the transaction type of the transaction, so as to send the transaction to the target transaction processing node for processing; Determining a target transaction processing node according to the target busy / idle degree and the transaction type of the transaction further includes: Determining a set of transaction processing nodes corresponding to the transaction type according to the transaction type and the computing types of each transaction processing node; Determining the transaction processing node in the set of transaction processing nodes whose busy / idle degree matches the target busy / idle degree as the target transaction processing node; If the busy / idle degrees of all transaction processing nodes in the set of transaction processing nodes do not meet the target busy / idle degree, the method further includes: Determining a candidate transaction processing node according to the user corresponding to the transaction and the user distribution of each transaction processing node in the set of transaction processing nodes; Pausing the transactions being processed by the candidate transaction processing node according to the target busy / idle degree and the current busy / idle degree of the candidate transaction processing node; Taking the candidate transaction processing node that pauses the transactions being processed as the target transaction processing node; Determining a candidate transaction processing node according to the user corresponding to the transaction and the user distribution of each transaction processing node in the set of transaction processing nodes includes: Determine, among the transaction processing nodes in the transaction processing node set, the transaction processing node corresponding to the received transaction whose user is the same as the user with the most processed transactions as the candidate transaction processing node.
7. A computer device, comprising a memory, a processor, and a computer program stored on the memory, wherein, when the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, wherein, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Capacity prediction model establishing method and device, and computer readable storage medium
CN109543891A