Business data consolidation general ledger method, device, computer equipment and medium
By identifying the business account flow data and transferring it to the preset account pool, and distributing the thread number according to the data volume and processing in parallel, the problem of inefficient business data merging general ledgers in the existing technology is solved, and efficient data merging and general ledgers are realized deal with.
Patent Information
- Application Number
- CN202210724103.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-24
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-06-24
AI Technical Summary
The existing business data merging general ledger method is inefficient, especially in multi-system environments, and the serial merging method leads to low processing efficiency.
By identifying the account type to which the business account flow data belongs, transfer it to the preset account pool, and allocating the number of task processing threads according to the size of the data stored in the preset account pool, the general ledger processing is carried out by parallel processing to achieve efficient business data merging General ledger.
It improves the processing efficiency of business data merging general ledgers, can effectively handle scenarios with large data volume and high complexity in multiple systems, and improves the accuracy and efficiency of general ledger processing.
Smart Images

Figure CN115185677B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for consolidating business data into a general ledger. Background Art
[0002] As the scale of enterprises continues to expand and information-based business systems continue to grow, accounting records from different business systems need to be pushed to the general ledger system for consolidation. With the increase in source systems and the increasing amount of data in independent systems, higher requirements are placed on the processing efficiency of the consolidated general ledger.
[0003] Currently, most business data consolidation general ledger solutions are to push source data through files. The large general ledger platform analyzes the transactions of a single system one by one. If there are multiple systems, the general ledgers are merged serially.
[0004] Although the above-mentioned business data consolidation general ledger method can realize the general ledger, the entire general ledger consolidation process is inefficient due to the use of a serial consolidation method. Summary of the invention
[0005] Based on this, it is necessary to provide an efficient business data consolidation general ledger method, device, computer equipment, storage medium and computer program product to address the above technical problems.
[0006] In a first aspect, the present application provides a method for merging business data into a general ledger. The method comprises:
[0007] Obtain business account flow data;
[0008] Identify the account type to which the business account journal data belongs, and transfer the business account journal data to a preset account pool corresponding to the type. The preset account pools include multiple preset account pools, and different preset account pools correspond to different account types.
[0009] According to the size of the data stored in the preset subject pool, the number of task processing threads corresponding to each preset subject pool is allocated respectively;
[0010] Parallel control of each preset account pool to execute general ledger processing according to the assigned task processing thread to obtain sub-general ledger data;
[0011] Collect sub-ledger data to obtain the consolidated general ledger result of business data.
[0012] In one embodiment, according to the size of the data stored in the preset subject pool, respectively allocating the number of task processing threads corresponding to each preset subject pool includes:
[0013] Get the processing performance parameters of the preset subject pool;
[0014] According to the size of the data stored in the preset subject pool and the processing performance parameters of the preset subject pool, the number of task processing threads corresponding to each preset subject pool is allocated respectively.
[0015] In one embodiment, according to the size of the data stored in the preset subject pool and the processing performance parameters of the preset subject pool, respectively allocating the number of task processing threads corresponding to each preset subject pool includes:
[0016] Determine the optimal number of threads corresponding to the preset subject pool according to the processing performance parameters of the preset subject pool;
[0017] According to the size of the data stored in the preset subject pool, determine the required number of threads corresponding to the preset subject pool;
[0018] Based on the optimal number of threads and the required number of threads, the number of task processing threads corresponding to the preset subject pool is determined.
[0019] In one embodiment, determining the optimal number of threads corresponding to the preset subject pool according to the processing performance parameter of the preset subject pool includes:
[0020] Get the preset automatic thread allocation model;
[0021] The optimal number of threads corresponding to the preset subject pool is determined according to the processing performance parameters of the preset subject pool and the preset automatic thread allocation model. The preset automatic thread allocation model is obtained by running batch training using a large data volume stress testing method.
[0022] In one embodiment, determining the number of task processing threads corresponding to the preset subject pool based on the optimal number of threads and the required number of threads includes:
[0023] Compare the optimal number of threads to the required number of threads;
[0024] If the optimal number of threads is not less than the required number of threads, the number of task processing threads corresponding to the preset subject pool is determined to be the required number of threads;
[0025] If the optimal number of threads is less than the required number of threads, the number of task processing threads corresponding to the preset subject pool is determined to be the optimal number of threads.
[0026] In one embodiment, identifying the account type to which the business account flow data belongs includes:
[0027] Extract the account number carried in the business account flow data;
[0028] According to the account number, identify the account type to which the business account transaction data belongs.
[0029] In a second aspect, the present application also provides a business data consolidation general ledger device. The device includes:
[0030] Data acquisition module, used to obtain business account flow data;
[0031] The identification and transfer module is used to identify the account type to which the business account flow data belongs, and transfer the business account flow data to a preset account pool corresponding to the type. The preset account pool includes multiple preset account pools, and different preset account pools correspond to different account types.
[0032] The thread allocation module is used to allocate the number of task processing threads corresponding to each preset subject pool according to the size of the data stored in the preset subject pool;
[0033] The parallel processing module is used to control each preset account pool in parallel to execute general ledger processing according to the assigned task processing thread to obtain sub-general ledger data;
[0034] The general ledger module is used to aggregate sub-general ledger data and obtain the general ledger results of business data consolidation.
[0035] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0036] Obtain business account flow data;
[0037] Identify the account type to which the business account journal data belongs, and transfer the business account journal data to a preset account pool corresponding to the type. The preset account pools include multiple preset account pools, and different preset account pools correspond to different account types.
[0038] According to the size of the data stored in the preset subject pool, the number of task processing threads corresponding to each preset subject pool is allocated respectively;
[0039] Parallel control of each preset account pool to execute general ledger processing according to the assigned task processing thread to obtain sub-general ledger data;
[0040] Collect sub-ledger data to obtain the consolidated general ledger result of business data.
[0041] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0042] Obtain business account flow data;
[0043] Identify the account type to which the business account journal data belongs, and transfer the business account journal data to a preset account pool corresponding to the type. The preset account pools include multiple preset account pools, and different preset account pools correspond to different account types.
[0044] According to the size of the data stored in the preset subject pool, the number of task processing threads corresponding to each preset subject pool is allocated respectively;
[0045] Parallel control of each preset account pool to execute general ledger processing according to the assigned task processing thread to obtain sub-general ledger data;
[0046] Collect sub-ledger data to obtain the consolidated general ledger result of business data.
[0047] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0048] Obtain business account flow data;
[0049] Identify the account type to which the business account journal data belongs, and transfer the business account journal data to a preset account pool corresponding to the type. The preset account pools include multiple preset account pools, and different preset account pools correspond to different account types.
[0050] According to the size of the data stored in the preset subject pool, the number of task processing threads corresponding to each preset subject pool is allocated respectively;
[0051] Parallel control of each preset account pool to execute general ledger processing according to the assigned task processing thread to obtain sub-general ledger data;
[0052] Collect sub-ledger data to obtain the consolidated general ledger result of business data.
[0053] The above-mentioned business data consolidation general ledger method, device, computer equipment, storage medium and computer program product obtain business subject flow data, transfer these business subject flow data to the preset subject pool corresponding to the type, allocate task processing threads according to the size of the data stored in the preset subject pool, and use each preset subject pool as a separate general ledger processing sub-unit for parallel processing. Use each preset subject pool as a separate general ledger processing unit to collect the sub-general ledger data of each preset subject pool to obtain the business data consolidation general ledger result. During the whole process, the business subject flow data is allocated to the preset subject pool corresponding to the type for processing, and efficient business data consolidation general ledger is achieved through parallel processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 This is an application environment diagram of a method for merging business data into a general ledger in an embodiment;
[0055] Figure 2 A schematic diagram of a process of merging business data into a general ledger in one embodiment;
[0056] Figure 3 A schematic diagram of a flow chart of a method for merging business data into a general ledger in another embodiment;
[0057] Figure 4This is a schematic diagram of the architecture for merging the general ledger for business data in the application example;
[0058] Figure 5 It is a structural block diagram of a business data merging general ledger device in one embodiment;
[0059] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0061] The business data consolidation general ledger method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 sends the business subject flow data to the server 104, and the server 104 obtains the business subject flow data; identifies the subject type to which the business subject flow data belongs, and transfers the business subject flow data to the preset subject pool corresponding to the type, and allocates the number of task processing threads corresponding to each preset subject pool according to the size of the data stored in the preset subject pool; parallelly controls each preset subject pool to perform general ledger processing according to the allocated task processing thread to obtain sub-general ledger data; collects the sub-general ledger data to obtain the business data merged general ledger result. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0062] In one embodiment, Figure 2 As shown, a method for consolidating general ledgers of business data is provided, and the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate, and the following steps are included:
[0063] S100: Obtain business account flow data.
[0064] Business account flow data refers to the account flow uploaded by the business system. Different business systems generate corresponding business account flow when performing business processing. These business account flow are uploaded to the server, and the server performs the consolidated general ledger processing. Furthermore, the server can actively scan the temporary storage space used to cache the business account flow data uploaded by the business system to determine whether there is new business account flow data uploaded to the temporary storage space. If so, read the new business account flow data. In actual applications, different file storage directories can be specified for different business systems. The server continuously scans these file storage directories to determine whether there is business account flow. The server can use the OK file method to determine whether the business account flow of a certain system is fully ready. If it is ready, it will enter the subsequent processing flow.
[0065] S200: Identify the account type to which the business account transaction data belongs, and transfer the business account transaction data to a preset account pool corresponding to the type. The preset account pools include multiple preset account pools, and different preset account pools correspond to different account types.
[0066] Different business account transactions are uploaded by different business systems, and different business systems may be systems that provide services for different business accounts. Therefore, different business account transaction data may belong to different account types. The preset account pool is pre-set, and specifically includes multiple ones. The specific number of settings corresponds to the number of business account types. For example, if the account system represents 8 categories of accounts, 8 account pools can be set, and each account pool corresponds to a different account type. Furthermore, the server can identify the account type to which each business account transaction belongs by identifying the account number in each business account transaction. Specifically, it can identify which category each account transaction belongs to based on the first 4 digits of the account number. After identifying which category the business account transaction belongs to, the business account transaction data is transferred to the preset account pool corresponding to the type.
[0067] S300: Allocate the number of task processing threads corresponding to each preset subject pool according to the size of the data stored in the preset subject pool.
[0068] The business account flow data stored in different preset account pools are of different sizes, that is, different preset account pools need to process different quantities. Different account pools are used as independent consolidated general ledger processing units. According to the size of the data stored in each preset account pool, a corresponding number of task processing threads are allocated. It can be understood that the more data a subject pool stores, the larger the amount of data it needs to process, and the more task processing threads need to be allocated; while the less data a subject pool stores, the smaller the amount of data it needs to process, and the fewer task processing threads need to be allocated.
[0069] S400: Controlling each preset subject pool in parallel to execute general ledger processing according to the assigned task processing thread to obtain sub-general ledger data.
[0070] As mentioned above, each preset subject pool acts as a separate consolidated general ledger processing unit, that is, each preset subject pool independently performs general ledger processing based on the assigned task processing thread. From the overall point of view, the server controls each preset subject pool in parallel to perform general ledger processing according to the assigned task processing thread to obtain sub-general ledger data. That is, different subject pools run in parallel and process business subject flows at the same time. A single preset subject pool obtains a small general ledger. From the subject level, each preset subject pool is processed independently to ensure the accuracy of the general ledger.
[0071] S500: Collect sub-general ledger data to obtain a business data consolidated general ledger result.
[0072] The server collects the sub-general ledger data processed by each preset subject pool, and collects / aggregates the business data. The collection here can be easily understood as summarizing each sub-general ledger data. For example, if the entire system is set up with 1,000 subjects, the maximum number of general ledger data is 1,000. When all preset subject pools have completed the general ledger processing, the general ledger data corresponding to each preset subject pool is merged into the aggregation library, thereby obtaining the general ledger data of the entire subject system.
[0073] The above-mentioned business data consolidation general ledger method obtains business account flow data, transfers these business account flow data to the preset account pool corresponding to the type, allocates task processing threads according to the size of the data stored in the preset account pool, and processes each preset account pool as a separate general ledger processing sub-unit in parallel. Each preset account pool is used as a separate general ledger processing unit to collect the sub-general ledger data of each preset account pool to obtain the business data consolidation general ledger result. During the whole process, the business account flow data is allocated to the preset account pool corresponding to the type for processing, and efficient business data consolidation general ledger is achieved through parallel processing.
[0074] like Figure 3 As shown, in one embodiment, S300 includes:
[0075] S320: Obtaining processing performance parameters of a preset subject pool;
[0076] S340: Allocate the number of task processing threads corresponding to each preset subject pool according to the size of the data stored in the preset subject pool and the processing performance parameters of the preset subject pool.
[0077] The processing performance parameters are used to characterize the data processing capabilities of the preset subject pool. Generally speaking, the preset subject pool can be understood as a separate data processing unit. The data processing capabilities of each data processing unit are mainly characterized by the memory and the number of CPU cores. The optimal number of threads can be analyzed based on the memory and the number of CPU cores. For example, the optimal number of threads for 4 cores and 8G is 16; the optimal number of threads for 4 cores and 16G is 32. The optimal number of threads is analyzed based on the processing performance parameters of the preset subject pool. The number of threads required to process the data is analyzed based on the size of the data stored in the preset subject pool. The final number of task processing threads is obtained by combining the optimal number of threads and the required number of threads.
[0078] In one embodiment, according to the size of the data stored in the preset subject pool and the processing performance parameters of the preset subject pool, respectively allocating the number of task processing threads corresponding to each preset subject pool includes:
[0079] According to the processing performance parameters of the preset subject pool, determine the optimal number of threads corresponding to the preset subject pool; according to the size of the data stored in the preset subject pool, determine the required number of threads corresponding to the preset subject pool; based on the optimal number of threads and the required number of threads, determine the number of task processing threads corresponding to the preset subject pool.
[0080] As mentioned above, the optimal number of threads corresponding to the preset subject pool can be determined by analyzing the processing performance parameters of the preset subject pool. The specific analysis process can be obtained based on historical experience data or by using an experimental test method, that is, analyzing the optimal number of threads corresponding to the preset subject under different processing energy parameters. Specifically, the optimal number of threads corresponding to the system with different CPU core numbers and memory combinations under experimental conditions can be tested. Specifically, the optimal number of threads corresponding to different CPU core numbers and memory combination configurations can be obtained by monitoring the CPU and memory usage of the system, and this data is stored as empirical data, that is, the corresponding relationship between the number of CPU cores-memory-optimal number of threads is stored. When it is necessary to determine the optimal number of threads, it can be directly obtained based on the corresponding relationship. Similarly, according to the size of the data stored in the preset subject pool, the required number of threads corresponding to the preset subject pool can also be obtained based on empirical data analysis, which will not be repeated here.
[0081] In one embodiment, determining the optimal number of threads corresponding to the preset subject pool according to the processing performance parameter of the preset subject pool includes:
[0082] Obtain a preset automatic thread allocation model; determine the optimal number of threads corresponding to the preset subject pool according to the processing performance parameters of the preset subject pool and the preset automatic thread allocation model, and the preset automatic thread allocation model is obtained by running batch training using a large data volume stress testing method.
[0083] In this embodiment, a large amount of training data is obtained by batch running using a large data volume stress testing method. An automatic thread allocation model is trained based on the large amount of training data. When the optimal number of threads needs to be determined, the processing performance parameters of the preset subject pool are input into the preset automatic thread allocation model to obtain the optimal number of threads corresponding to the preset subject pool.
[0084] In one embodiment, determining the number of task processing threads corresponding to the preset subject pool based on the optimal number of threads and the required number of threads includes:
[0085] Compare the optimal number of threads with the required number of threads; if the optimal number of threads is not less than the required number of threads, determine the number of task processing threads corresponding to the preset subject pool as the required number of threads; if the optimal number of threads is less than the required number of threads, determine the number of task processing threads corresponding to the preset subject pool as the optimal number of threads.
[0086] In this embodiment, the number of task processing threads corresponding to the preset subject pool is determined by comprehensively comparing the optimal number of threads and the required number of threads. Specifically, if the optimal number of threads is not less than the required number of threads, it indicates that the preset subject pool has a small demand for the number of task processing threads, and its data processing demand can be met without reaching the optimal number of threads. At this time, the number of task processing threads corresponding to the preset subject pool is determined to be the required number of threads; if the optimal number of threads is less than the required number of threads, it indicates that the preset subject pool has a large amount of business subject flow data to be processed, and it needs to allocate a large number of task processing threads to process these data, but if the number of task processing threads is too large, it will reduce the overall processing efficiency of the entire preset subject pool. Therefore, at this time, the optimal number of threads is used as the number of task processing threads corresponding to the preset subject pool.
[0087] In one embodiment, identifying the account type to which the business account flow data belongs includes:
[0088] Extract the account number carried in the business account journal data; based on the account number, identify the account type to which the business account journal data belongs.
[0089] The business account flow data will carry an account number, which is used to characterize the account type to which the business account flow belongs. Therefore, in practical applications, the account type of each business account flow can be identified based on the account number. Specifically, the account type of each business account flow can be identified based on the first 4 digits of the account number.
[0090] To explain the technical solution of the method for merging business data into a general ledger in this application in detail, the following will take the scenario where the existing credit system and the capital system are separately calculated to generate separate account accounting details, which need to be pushed to the financial system to merge the general ledger as an example to explain the whole process in detail. The overall data processing architecture is as follows: Figure 4 As shown, it specifically includes the following steps:
[0091] 1. The credit system pushes account details to the designated directory at 4 p.m., and pool scheduling A monitors in real time whether there are ready files. Normally, it takes 1 hour for the credit system to process all the details.
[0092] 2. The funding system pushes the details to the designated directory at 4:30 p.m., and pool scheduling B monitors in real time whether there are ready files;
[0093] 3. Starting at 4 pm, the account flow of the credit system enters pool 1, pool 2, etc. according to the account number. At the same time, the node scheduling of the small general ledger finds that there is flow in the pool and merges the general ledger;
[0094] 4. At 4:30 in the evening, the account flow of the credit system is still entering the general ledger, and at the same time, the account flow of the capital system begins to enter pool 1 and pool 2 in parallel.... The node scheduling of the small general ledger works endlessly;
[0095] 5. After all the small general ledgers of the pools are merged, the small general ledger of a single subject is obtained, which is pushed to the aggregation library to obtain the large general ledger of all subjects.
[0096] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0097] Based on the same inventive concept, the embodiment of the present application also provides a business data consolidation ledger device for implementing the business data consolidation ledger method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in the one or more business data consolidation ledger device embodiments provided below can refer to the limitations of the business data consolidation ledger method above, and will not be repeated here.
[0098] like Figure 5 As shown, the present application also provides a business data consolidation general ledger device. The device includes:
[0099] The data acquisition module 100 is used to acquire business subject flow data;
[0100] The identification and transfer module 200 is used to identify the account type to which the business account flow data belongs, and transfer the business account flow data to a preset account pool corresponding to the type. The preset account pool includes multiple preset account pools, and different preset account pools correspond to different account types.
[0101] The thread allocation module 300 is used to allocate the number of task processing threads corresponding to each preset subject pool according to the size of the data stored in the preset subject pool;
[0102] The parallel processing module 400 is used to control each preset subject pool in parallel to perform general ledger processing according to the assigned task processing thread to obtain sub-general ledger data;
[0103] The general ledger module 500 is used to aggregate sub-general ledger data to obtain a consolidated general ledger result of business data.
[0104] The business data merging general ledger device obtains business subject flow data, transfers these business subject flow data to the preset subject pool corresponding to the type, allocates task processing threads according to the size of the data stored in the preset subject pool, and processes each preset subject pool as a separate general ledger processing sub-unit in parallel, and uses each preset subject pool as a separate general ledger processing unit to collect the sub-general ledger data of each preset subject pool to obtain the business data merging general ledger result. During the whole process, the business subject flow data is allocated to the preset subject pool corresponding to the type for processing, and efficient business data merging general ledger is realized through parallel processing.
[0105] In one embodiment, the thread allocation module 300 is also used to obtain the processing performance parameters of the preset subject pools; and allocate the number of task processing threads corresponding to each preset subject pool according to the size of the data stored in the preset subject pools and the processing performance parameters of the preset subject pools.
[0106] In one of the embodiments, the thread allocation module 300 is also used to determine the optimal number of threads corresponding to the preset subject pool based on the processing performance parameters of the preset subject pool; determine the required number of threads corresponding to the preset subject pool based on the size of the data stored in the preset subject pool; and determine the number of task processing threads corresponding to the preset subject pool based on the optimal number of threads and the required number of threads.
[0107] In one of the embodiments, the thread allocation module 300 is also used to obtain a preset automatic thread allocation model; based on the processing performance parameters of the preset subject pool and the preset automatic thread allocation model, the optimal number of threads corresponding to the preset subject pool is determined, and the preset automatic thread allocation model is obtained by running batch training using a large data volume stress testing method.
[0108] In one embodiment, the thread allocation module 300 is also used to compare the optimal number of threads and the required number of threads; if the optimal number of threads is not less than the required number of threads, the number of task processing threads corresponding to the preset subject pool is determined to be the required number of threads; if the optimal number of threads is less than the required number of threads, the number of task processing threads corresponding to the preset subject pool is determined to be the optimal number of threads.
[0109] In one embodiment, the identification transfer module 200 is further used to extract the account number carried in the business account flow data; and identify the account type to which the business account flow data belongs based on the account number.
[0110] Each module in the above-mentioned business data consolidation general ledger device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0111] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data related to the preset subject pool. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for consolidating general ledgers of business data is implemented.
[0112] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0113] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0114] Obtain business account flow data;
[0115] Identify the account type to which the business account journal data belongs, and transfer the business account journal data to a preset account pool corresponding to the type. The preset account pools include multiple preset account pools, and different preset account pools correspond to different account types.
[0116] According to the size of the data stored in the preset subject pool, the number of task processing threads corresponding to each preset subject pool is allocated respectively;
[0117] Parallel control of each preset account pool to execute general ledger processing according to the assigned task processing thread to obtain sub-general ledger data;
[0118] Collect sub-ledger data to obtain the consolidated general ledger result of business data.
[0119] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0120] The processing performance parameters of the preset subject pool are obtained; and the number of task processing threads corresponding to each preset subject pool is allocated according to the size of the data stored in the preset subject pool and the processing performance parameters of the preset subject pool.
[0121] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0122] According to the processing performance parameters of the preset subject pool, determine the optimal number of threads corresponding to the preset subject pool; according to the size of the data stored in the preset subject pool, determine the required number of threads corresponding to the preset subject pool; based on the optimal number of threads and the required number of threads, determine the number of task processing threads corresponding to the preset subject pool.
[0123] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0124] Obtain a preset automatic thread allocation model; determine the optimal number of threads corresponding to the preset subject pool according to the processing performance parameters of the preset subject pool and the preset automatic thread allocation model, and the preset automatic thread allocation model is obtained by running batch training using a large data volume stress testing method.
[0125] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0126] Compare the optimal number of threads with the required number of threads; if the optimal number of threads is not less than the required number of threads, determine the number of task processing threads corresponding to the preset subject pool as the required number of threads; if the optimal number of threads is less than the required number of threads, determine the number of task processing threads corresponding to the preset subject pool as the optimal number of threads.
[0127] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0128] Extract the account number carried in the business account journal data; based on the account number, identify the account type to which the business account journal data belongs.
[0129] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0130] Obtain business account flow data;
[0131] Identify the account type to which the business account journal data belongs, and transfer the business account journal data to a preset account pool corresponding to the type. The preset account pools include multiple preset account pools, and different preset account pools correspond to different account types.
[0132] According to the size of the data stored in the preset subject pool, the number of task processing threads corresponding to each preset subject pool is allocated respectively;
[0133] Parallel control of each preset account pool to execute general ledger processing according to the assigned task processing thread to obtain sub-general ledger data;
[0134] Collect sub-ledger data to obtain the consolidated general ledger result of business data.
[0135] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0136] The processing performance parameters of the preset subject pool are obtained; and the number of task processing threads corresponding to each preset subject pool is allocated according to the size of the data stored in the preset subject pool and the processing performance parameters of the preset subject pool.
[0137] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0138] According to the processing performance parameters of the preset subject pool, determine the optimal number of threads corresponding to the preset subject pool; according to the size of the data stored in the preset subject pool, determine the required number of threads corresponding to the preset subject pool; based on the optimal number of threads and the required number of threads, determine the number of task processing threads corresponding to the preset subject pool.
[0139] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0140] Obtain a preset automatic thread allocation model; determine the optimal number of threads corresponding to the preset subject pool according to the processing performance parameters of the preset subject pool and the preset automatic thread allocation model, and the preset automatic thread allocation model is obtained by running batch training using a large data volume stress testing method.
[0141] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0142] Compare the optimal number of threads with the required number of threads; if the optimal number of threads is not less than the required number of threads, determine the number of task processing threads corresponding to the preset subject pool as the required number of threads; if the optimal number of threads is less than the required number of threads, determine the number of task processing threads corresponding to the preset subject pool as the optimal number of threads.
[0143] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0144] Extract the account number carried in the business account journal data; based on the account number, identify the account type to which the business account journal data belongs.
[0145] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0146] Obtain business account flow data;
[0147] Identify the account type to which the business account journal data belongs, and transfer the business account journal data to a preset account pool corresponding to the type. The preset account pools include multiple preset account pools, and different preset account pools correspond to different account types.
[0148] According to the size of the data stored in the preset subject pool, the number of task processing threads corresponding to each preset subject pool is allocated respectively;
[0149] Parallel control of each preset account pool to execute general ledger processing according to the assigned task processing thread to obtain sub-general ledger data;
[0150] Collect sub-ledger data to obtain the consolidated general ledger result of business data.
[0151] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0152] The processing performance parameters of the preset subject pool are obtained; and the number of task processing threads corresponding to each preset subject pool is allocated according to the size of the data stored in the preset subject pool and the processing performance parameters of the preset subject pool.
[0153] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0154] According to the processing performance parameters of the preset subject pool, determine the optimal number of threads corresponding to the preset subject pool; according to the size of the data stored in the preset subject pool, determine the required number of threads corresponding to the preset subject pool; based on the optimal number of threads and the required number of threads, determine the number of task processing threads corresponding to the preset subject pool.
[0155] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0156] Obtain a preset automatic thread allocation model; determine the optimal number of threads corresponding to the preset subject pool according to the processing performance parameters of the preset subject pool and the preset automatic thread allocation model, and the preset automatic thread allocation model is obtained by running batch training using a large data volume stress testing method.
[0157] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0158] Compare the optimal number of threads with the required number of threads; if the optimal number of threads is not less than the required number of threads, determine the number of task processing threads corresponding to the preset subject pool as the required number of threads; if the optimal number of threads is less than the required number of threads, determine the number of task processing threads corresponding to the preset subject pool as the optimal number of threads.
[0159] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0160] Extract the account number carried in the business account journal data; based on the account number, identify the account type to which the business account journal data belongs.
[0161] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0162] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0163] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0164] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for consolidating business data into a general ledger, characterized in that: The method comprises: Obtain business account transaction data; different business account transactions are uploaded by different business systems; Identify the account type to which the business account flow data belongs, and transfer the business account flow data to a preset account pool corresponding to the type, wherein the preset account pools include a plurality of preset account pools, and different preset account pools correspond to different account types; According to the size of the data stored in the preset subject pool, the number of task processing threads corresponding to each preset subject pool is allocated respectively; Parallel control of each of the preset subject pools to perform general ledger processing according to the assigned task processing threads to obtain sub-general ledger data; Collect the sub-general ledger data to obtain a business data consolidated general ledger result; The identifying the subject type to which the business subject flow data belongs includes: extracting the subject number carried in the business subject flow data; and identifying the subject type to which the business subject flow data belongs according to the subject number; The allocating the number of task processing threads corresponding to each preset subject pool according to the size of the data stored in the preset subject pool comprises: obtaining the processing performance parameters of the preset subject pool; allocating the number of task processing threads corresponding to each preset subject pool according to the size of the data stored in the preset subject pool and the processing performance parameters of the preset subject pool, wherein the processing performance parameters of the preset subject pool include memory and CPU core number; The allocating the number of task processing threads corresponding to each preset subject pool according to the size of the data stored in the preset subject pool and the processing performance parameters of the preset subject pool respectively comprises: determining the optimal number of threads corresponding to the preset subject pool according to the processing performance parameters of the preset subject pool; determining the required number of threads corresponding to the preset subject pool according to the size of the data stored in the preset subject pool; determining the number of task processing threads corresponding to the preset subject pool based on the optimal number of threads and the required number of threads; Determining the optimal number of threads corresponding to the preset subject pool according to the processing performance parameters of the preset subject pool includes: obtaining a preset automatic thread allocation model; determining the optimal number of threads corresponding to the preset subject pool according to the processing performance parameters of the preset subject pool and the preset automatic thread allocation model, wherein the preset automatic thread allocation model is obtained by running batch training using a large data volume stress testing method.
2. The method according to claim 1, characterized in that The determining the number of task processing threads corresponding to the preset subject pool based on the optimal number of threads and the required number of threads includes: comparing the optimal number of threads with the required number of threads; If the optimal number of threads is not less than the required number of threads, determining the number of task processing threads corresponding to the preset subject pool to be the required number of threads; If the optimal number of threads is less than the required number of threads, the number of task processing threads corresponding to the preset subject pool is determined to be the optimal number of threads.
3. The method according to claim 1, characterized in that If the processing performance parameters of the preset subject pool are 4 CPU cores and 8 GB memory, the optimal number of threads is 16.
4. The method according to claim 1, characterized in that: If the processing performance parameters of the preset subject pool are 4 CPU cores and 1 GB memory, the optimal number of threads is 32.
5. A business data consolidation general ledger device, characterized in that: The device comprises: The data acquisition module is used to obtain business account flow data; different business account flow data are uploaded by different business systems; An identification and transfer module is used to identify the subject type to which the business subject flow data belongs, and transfer the business subject flow data to a preset subject pool corresponding to the type, wherein the preset subject pools include multiple preset subject pools, and different preset subject pools correspond to different subject types; A thread allocation module, used to allocate the number of task processing threads corresponding to each preset subject pool according to the size of the data stored in the preset subject pool; A parallel processing module, used for controlling in parallel each of the preset subject pools to perform general ledger processing according to the assigned task processing threads to obtain sub-general ledger data; A general ledger module is used to collect the sub-general ledger data and obtain a consolidated general ledger result of business data; The identification transfer module is also used to extract the account number carried in the business account flow data; and identify the account type to which the business account flow data belongs according to the account number; The thread allocation module is also used to obtain the processing performance parameters of the preset subject pool; according to the size of the data stored in the preset subject pool and the processing performance parameters of the preset subject pool, the number of task processing threads corresponding to each preset subject pool is allocated respectively, and the processing performance parameters of the preset subject pool include memory and CPU core number; The allocating the number of task processing threads corresponding to each preset subject pool according to the size of the data stored in the preset subject pool and the processing performance parameters of the preset subject pool respectively comprises: determining the optimal number of threads corresponding to the preset subject pool according to the processing performance parameters of the preset subject pool; determining the required number of threads corresponding to the preset subject pool according to the size of the data stored in the preset subject pool; determining the number of task processing threads corresponding to the preset subject pool based on the optimal number of threads and the required number of threads; Determining the optimal number of threads corresponding to the preset subject pool according to the processing performance parameters of the preset subject pool includes: obtaining a preset automatic thread allocation model; determining the optimal number of threads corresponding to the preset subject pool according to the processing performance parameters of the preset subject pool and the preset automatic thread allocation model, wherein the preset automatic thread allocation model is obtained by running batch training using a large data volume stress testing method.
6. The device according to claim 5, characterized in that If the processing performance parameters of the preset subject pool are 4 CPU cores and 8 GB memory, the optimal number of threads is 16.
7. The device according to claim 5, characterized in that If the processing performance parameters of the preset subject pool are 4 CPU cores and 1 GB memory, the optimal number of threads is 32.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Multi-thread concurrent system
CN106325980A
Distributed transaction processing method and system, transaction manager and terminal device
CN108958894A
Request processing method and device, electronic equipment and medium
CN111796936A
Task processing method and device, storage medium and electronic equipment
CN111831411A
Accounting data processing method and device, electronic equipment and storage medium
CN112907344A
