CN-122023037-A - Method and device for determining cost allocation result data and readable storage medium
Abstract
The application provides a method, a device and a readable storage medium for determining cost allocation result data, wherein the method comprises the steps of obtaining accounting period cost center data, business scene data and preset classification dimensions sent by a business system, determining configuration data according to a basic configuration template and the business scene data, determining an allocation data source according to multidimensional allocation configuration data and the accounting period cost center data, splitting the allocation data source into a plurality of sub-data sets according to data partitioning rules in system optimization configuration data, respectively classifying the sub-data sets into a plurality of accounting partitions, determining a plurality of allocation data sets processed by the accounting partitions, determining a target allocation data source according to the plurality of allocation data sets, key data caching rules in the system optimization configuration data and the preset classification dimensions, and determining cost allocation result data according to the configuration data and the target allocation data source. The application uses the modes of a caching mechanism, a batch mechanism and the like to accelerate the cost allocation efficiency.
Inventors
- ZHAO JIAN
- WANG HUA
- YU CHUNYUAN
Assignees
- 用友网络科技股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260113
Claims (10)
- 1. A method of determining cost-sharing outcome data, the method for use with a server, the server communicatively coupled to a business system, the server having a plurality of accounting partitions, the method comprising: Acquiring accounting period cost center data, service scene data and preset classification dimensions sent by the service system; Acquiring a basic configuration template, and determining configuration data according to the basic configuration template and the business scene data, wherein the configuration data at least comprises multidimensional allocation configuration data and system optimization configuration data; Determining an allocation data source according to the multidimensional allocation configuration data and the accounting period cost center data; splitting the shared data source into a plurality of sub-data sets according to a data partitioning rule in the system optimization configuration data, respectively classifying the sub-data sets into a plurality of accounting partitions, and determining a plurality of shared data sets processed by the accounting partitions; Determining a target allocation data source according to the plurality of allocation data sets, the key data caching rules in the system optimization configuration data and the preset classification dimension; and determining cost allocation result data according to the configuration data and the target allocation data source, and sending the cost allocation result data to the service system.
- 2. The method of determining cost allocation result data according to claim 1, wherein the base configuration templates include a multidimensional allocation base configuration template and a system optimization base configuration template; The multidimensional allocation basic configuration template comprises a fixed dimension configuration and a custom dimension configuration and allocation rule making framework; the system optimization basic configuration template comprises a data partition basic framework, key data cache basic logic, a batch storage threshold setting framework, a multithreading processing basic rule and a memory release basic logic.
- 3. The method of claim 1, wherein the multi-dimensional allocation configuration data comprises a fixed dimension, a custom dimension, and an allocation rule, the fixed dimension comprising a cost center, subjects, and elements, the custom dimension comprising customer data, areas, and special orders, the allocation rule formulated based on cost element details, material details, or custom factors.
- 4. The method of claim 1, wherein the data partitioning rules include a main partitioning rule and a sub-partitioning rule, and wherein splitting the split data source into a plurality of sub-data sets according to the data partitioning rules in the system optimization configuration data comprises: And classifying the apportioned data sources into corresponding accounting partitions according to the main partition rules, dividing the sub-data sets according to the sub-partition rules, reserving sub-divided data of corresponding dimensions of each sub-data set to keep the data quantity of a single partition constant, and executing unloading operation on useless partitions.
- 5. The method for determining cost allocation result data according to claim 1, wherein the key data caching rule includes a cache data type and a cache logic, the cache data type is basic configuration information and service profile data which are common in a plurality of the allocation data sets, and the cache logic is used for performing memory caching on the data in a single allocation process.
- 6. The method for determining cost allocation result data according to claim 1, wherein the system optimization configuration data further includes a multithreaded IO processing rule and a memory release rule; And determining cost allocation result data according to the configuration data and the target allocation data source, and further comprising the steps of starting a multithreading parallel processing mechanism according to the multithreading IO processing rule to realize parallel writing of different data batches, and releasing memory resources occupied by corresponding temporary data variables according to the memory release rule after writing of each batch of data is completed.
- 7. The method of claim 6, wherein the configuration data further comprises result processing configuration data including process trace back rules, result check rules, and period comparison analysis rules; the determining cost allocation result data according to the configuration data and the target allocation data source further comprises: Checking an allocation link according to the process tracing rule for the target allocation data source, checking the data consistency according to the result checking rule, performing cost period difference analysis according to the period comparison analysis rule, and forming the cost allocation result data after confirming no errors.
- 8. A device for determining cost-sharing outcome data, the device being for a server, the server being communicatively coupled to a business system, the server having a plurality of accounting partitions, the device comprising: The first acquisition module is used for acquiring accounting period cost center data, service scene data and preset classification dimensions sent by the service system; the second acquisition module is used for acquiring a basic configuration template and determining configuration data according to the basic configuration template and the service scene data, wherein the configuration data at least comprises multidimensional allocation configuration data and system optimization configuration data; A first determining module for determining an apportioned data source according to the multidimensional apportionment configuration data and the accounting period cost center data; the second determining module is used for splitting the shared data source into a plurality of sub-data sets according to the data partitioning rule in the system optimization configuration data, classifying the sub-data sets into a plurality of accounting partitions respectively and determining a plurality of shared data sets processed by the accounting partitions; the third determining module is used for determining a target allocation data source according to the plurality of allocation data sets, the key data caching rules in the system optimization configuration data and the preset classification dimension; And the fourth determining module is used for determining cost allocation result data according to the configuration data and the target allocation data source and sending the cost allocation result data to the service system.
- 9. A cost sharing result data determining apparatus, comprising: A processor; a memory having stored therein a program or instructions which when executed by the processor implement the steps of the method of determining cost allocation result data according to any one of claims 1 to 7.
- 10. A readable storage medium, characterized in that the readable storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps of the method of determining cost allocation result data according to any one of claims 1 to 7.
Description
Method and device for determining cost allocation result data and readable storage medium Technical Field The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for determining cost allocation result data, and a readable storage medium. Background In the related technology, in the enterprise cost accounting scene, along with the expansion of the business scale, the situations of multi-accounting-agent parallel accounting and massive cost data surge are increasingly common, the single-partition data volume of a common cost allocation method is overlarge, and an effective multithread parallel processing, key data caching and memory release mechanism is lacked, meanwhile, the cross-company cost allocation is complex, the system integration level is low, the data processing efficiency is low, and the business requirements of enterprises cannot be met. Disclosure of Invention The present invention aims to solve at least one of the technical problems existing in the prior art or related art. To this end, a first aspect of the invention proposes a method of determining cost-sharing result data. A second aspect of the present invention proposes a determination apparatus of cost allocation result data. A third aspect of the invention proposes another cost allocation result data determining apparatus. A fourth aspect of the application proposes a readable storage medium. In view of this, a first aspect of the present invention provides a method for determining cost allocation result data, where the method is used for a server, the server is communicatively connected to a service system, and the server has a plurality of accounting partitions, the method includes obtaining accounting period cost center data, service scene data and preset classification dimensions sent from the service system, obtaining a basic configuration template, determining configuration data according to the basic configuration template and the service scene data, the configuration data including at least multidimensional allocation configuration data and system optimization configuration data, determining allocation data sources according to the multidimensional allocation configuration data and the accounting period cost center data, splitting the allocation data sources into a plurality of sub-data sets according to data partitioning rules in the system optimization configuration data, and classifying the plurality of sub-data sets into the plurality of accounting partitions, determining a plurality of allocation data sets processed by the plurality of accounting partitions, determining a target allocation data source according to the plurality of allocation data sets, key data caching rules in the system optimization configuration data and the preset classification dimensions, determining cost allocation data sources according to the configuration data and the target allocation data source, and sending the allocation result data to the service system. In the method for determining the cost allocation result data, the server is a core hardware carrier for bearing the cost allocation calculation logic, has the multi-accounting partition storage and parallel data processing capabilities, and is a hardware foundation for realizing efficient allocation of mass cost data. The business system is a data source system for providing cost sharing original data, and comprises a general ledger system, a payroll system, a fixed asset system, a material management system and the like, and is responsible for collecting and transmitting cost related data in an accounting period. The accounting partition is a logic storage partition preset in the server and is used for splitting and storing the shared data according to a specific rule, so that processing redundancy caused by data mixing is avoided, and the data reading and writing efficiency is improved. The accounting period cost center data is cost data (such as salary and depreciation) and material data (such as feed consumption) generated by each cost center in the accounting period (such as one month), and is core original data of cost allocation. The business scenario data is comprehensive data containing accounting period data volume scale, machine configuration parameters, accounting main body quantity, computing node performance and industry personalized accounting requirements (such as stock-in-stock order allocation requirements of animal husbandry) and is used for adapting to the differentiated allocation scenario. The preset classification dimension is a preset data set splitting standard, specifically a cost center and a data type, and is used for splitting the cached data set into a plurality of data batches and adapting to batch processing requirements. The basic configuration template is a preset allocation rule basic framework in the server and comprises a multidimensional allocation basic configuration template and a system optimiza