Cost distribution method and device and storage medium
By acquiring data on costs to be allocated and working hours, and automating the allocation of paths and patterns based on project type and subject type, the inefficiency and error problems caused by manual operation in existing technologies are solved, achieving efficient and accurate cost allocation.
Patent Information
- Application Number
- CN202511999517.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-02-03
AI Technical Summary
In existing technologies, the allocation of R&D expenses relies on manual operation, which results in a complicated, inefficient, and error-prone process.
By acquiring data on unallocated expenses and work hours, and matching allocation paths based on project type and allocation patterns based on subject type, the system can automatically allocate expense amounts.
The entire process of R&D expense allocation has been automated, improving processing efficiency and result accuracy, and avoiding data inconsistencies and calculation errors.
Smart Images

Figure CN121457992A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a cost allocation method, device and storage medium. Background Technology
[0002] The allocation of R&D expenses can be viewed as allocating costs from some projects to others. Currently, the allocation process is mostly done manually and offline, but this highly manual method is cumbersome, inefficient, and prone to errors. Summary of the Invention
[0003] This application provides a cost allocation method, device, and storage medium to at least solve the above-mentioned technical problems existing in the prior art.
[0004] A first aspect of this application provides a cost allocation method, the method comprising: Obtain the data of expenses to be allocated, which includes multiple items and the item type, expense amount and account type of each item; Obtain the working hours data for each project; Based on the project type of each project, determine the allocation path and target allocation projects for each project; The allocation pattern for each project is determined based on the category to which the cost amount belongs. Based on the work hour data or cost amount of each project's target allocation project, and according to the allocation path and allocation mode corresponding to each project, the cost amount of each project is allocated to its target allocation project to obtain the allocation result.
[0005] In one possible implementation, the allocation path includes an allocation stage and an allocation range; correspondingly, The process of determining the allocation path and target allocation project for each project based on its project type includes: Based on the project type of each project, the allocation stage and allocation scope of each project are obtained from the set project configuration information; Based on the allocation phase and scope of each project, the target allocation projects for each project are determined.
[0006] In one possible implementation, the allocation phase includes a zero allocation phase, a first allocation phase, and a second allocation phase; correspondingly, The determination of target allocation projects for each project, based on the allocation stage and scope of each project, includes: In response to the current project's allocation phase being designated as the first allocation phase, projects that are determined to be in the zero allocation phase and the second allocation phase and fall within the current project's allocation scope are designated as the current project's target allocation projects. In response to the current project's allocation phase being the second allocation phase, projects that are determined to be in the zero allocation phase and fall within the current project's allocation scope are identified as the target allocation projects for the current project.
[0007] In one possible implementation, the allocation of the cost amount of each project to its target allocation project based on the work hour data or cost amount of each project, according to the allocation path and allocation mode corresponding to each project, includes: For projects in the zero allocation phase, their costs are directly included in the allocation results; For projects in the first allocation phase, the cost amount is allocated to the target allocation project based on the work hour data or cost amount corresponding to the target allocation project, according to the corresponding allocation mode. For projects in the second allocation phase, the cost amount is allocated to the target allocation project based on the work hour data or cost amount corresponding to the target allocation project, according to the corresponding allocation mode.
[0008] In one possible implementation, the allocation mode includes a time-sharing allocation mode; correspondingly, The process of allocating the cost amount to the target allocation project based on the corresponding work hour data or cost amount, according to the corresponding allocation mode, includes: For each project, calculate the total hours of all its target-assigned projects based on the hour data of its target-assigned projects; Calculate the allocation amount to be allocated to each target allocation item under the current project based on the proportion of the working hours of each target allocation item to the total working hours.
[0009] In one possible implementation, the allocation mode includes a cost percentage allocation mode; correspondingly, The process of allocating the cost amount to the target allocation project based on the corresponding work hour data or cost amount, according to the corresponding allocation mode, includes: For each project, obtain the human cost rate for each researcher involved in the project's target allocation; The weighted cost of each target allocation project is calculated based on the labor cost rate of all researchers involved in each target allocation project and the corresponding working hours data of each researcher. Sum the weighted costs of all target allocation projects to obtain the total weighted cost; Calculate the allocation amount to be allocated to each target allocation item under the current project based on the proportion of the weighted cost of each target allocation item to the total weighted cost.
[0010] In one possible implementation, the allocation mode includes a cost percentage allocation mode; correspondingly, The process of allocating the cost amount to the target allocation project based on the corresponding work hour data or cost amount, according to the corresponding allocation mode, includes: For each project, calculate the total cost of all its corresponding target allocation projects; Calculate the allocation amount to be allocated to each target allocation item under the current project based on the proportion of the cost amount of each target allocation item to the total cost amount of all target allocation items corresponding to the current project.
[0011] In one possible implementation, the method further includes, before calculating the allocation ratio: If the base value of the target allocation project corresponding to the current project is negative, sort the base values of all target allocation projects corresponding to the current project and determine the minimum value among them. The minimum value is subtracted from the base value of each target allocation item under the current project to obtain the actual base value of each target allocation item. The base value is the working hours or cost amount of the target allocation item.
[0012] A second aspect of this application provides a cost allocation apparatus, the apparatus comprising: The first acquisition module is used to acquire the expense data to be allocated, which includes multiple items and the item type, expense amount and account type of each item; The second acquisition module is used to acquire the working hour data of each project; The first determination module is used to determine the allocation path and target allocation project for each project based on the project type of each project; The second determination module is used to determine the allocation mode for each project based on the account type to which the cost amount of each project belongs; The allocation module is used to allocate the working hours or cost amount of each project based on the target allocation project. According to the allocation path and allocation mode of each project, the cost amount of each project is allocated to its target allocation project to obtain the allocation result.
[0013] A third aspect of this application provides an electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in this application.
[0014] According to a fourth aspect of this application, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the methods described in this application.
[0015] The cost allocation method, equipment, and storage medium of this application ensure data consistency by acquiring and synchronizing the cost data to be allocated in real time, using working hour data as the basis for allocation, matching allocation paths based on project type, matching allocation modes based on subject type, and finally executing allocation calculations and generating allocation results. This achieves full automation of the R&D cost allocation process, avoiding data inconsistencies and calculation errors caused by manual data export, organization, and complex calculations in traditional manual operations, and effectively improving the processing efficiency and accuracy of cost allocation results.
[0016] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0017] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of this application are illustrated in the drawings by way of example and not limitation, in which: In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
[0018] Figure 1 A schematic diagram illustrating the implementation flow of the cost allocation method provided in an embodiment of this application is shown; Figure 2 This illustration shows a schematic diagram of the implementation process of the multi-stage allocation operation of the cost allocation method provided in the embodiments of this application; Figure 3 A schematic diagram of the composition structure of the cost allocation device provided in an embodiment of this application is shown; Figure 4 A schematic diagram of the composition structure of an electronic device according to an embodiment of this application is shown. Detailed Implementation
[0019] To make the objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] Figure 1 A schematic diagram illustrating the implementation flow of the cost allocation method provided in this application embodiment is shown.
[0021] refer to Figure 1This application provides a cost allocation method that can be applied to electronic devices, such as PCs and servers. The method includes: Operation 101: Obtain the data of expenses to be allocated. The data of expenses to be allocated includes multiple items and the item type, expense amount and at least one account type to which the expense amount belongs for each item.
[0022] The data to be allocated refers to the collection of all expense records that need to be allocated across projects. In this application, the specific entity executing the expense allocation method can be a expense allocation system deployed on electronic devices. This system synchronizes the data to be allocated in real time from the SAP (Systems Applications and Products in Data Processing) system through a predefined data interface, thereby ensuring the timeliness, consistency, and completeness of the data to be allocated and effectively avoiding the risk of data inconsistency caused by manual export and multiple data entry.
[0023] The data for expenses to be allocated includes multiple projects, each with its corresponding project type, expense amount, and account type. Each project is uniquely identified. The project type can be considered the category of R&D activity to which the project belongs, and can be defined based on the company's management needs as a basic research project, application development project, technology platform project, or productization project, etc. The account type can be considered the financial type of the expense, such as travel expenses, material consumption, software license fees, etc.
[0024] Operation 102: Obtain the working hours data for each project.
[0025] Work hour data can include the total work hours for each project, i.e., the total time required to complete the project. Work hour data can also include detailed work hours for each R&D personnel involved in the project, i.e., the time each R&D personnel spent on the project. Work hour data can be obtained through real-time recording by the system or submitted by each R&D personnel through the system.
[0026] Operation 103: Based on the project type of each project, determine the allocation path and target allocation project for each project.
[0027] Different types of projects have different allocation paths and require different projects to allocate funds. For example, the costs of a technology platform project may need to be allocated to all downstream application development projects, while the costs of a specific application development project may only need to be allocated among a few subtasks within the project group. Therefore, to achieve reasonable and compliant cost allocation, this application pre-configures the corresponding target allocation projects and clear allocation paths for different project types. The allocation path can be viewed as the data flow of costs from the current project to one or more target allocation projects.
[0028] Operation 104: Determine the allocation mode for each project based on the account type to which the expense amount belongs.
[0029] Different expense categories require different allocation methods. For example, personnel travel expenses need to be allocated according to participation in each project, while R&D equipment depreciation expenses need to be allocated according to usage in each project. Therefore, in order to achieve accurate allocation of different types of expenses, appropriate allocation modes can be configured for different expense categories. After determining the expense category, the system can follow the established allocation mode to perform expense allocation.
[0030] The allocation model can represent the specific calculation algorithm used when allocating costs, and can include the time-based allocation model, the cost-based allocation model, and the expense-based allocation model. The time-based allocation model can be seen as allocating costs based on the proportion of time input, and can be used for cost allocation directly related to personnel time consumption. The cost-based allocation model can be seen as allocating costs according to the R&D personnel level, and can be used for refined human resource cost allocation that needs to consider differences in personnel level. The expense-based allocation model can be seen as allocating costs based on the proportion of project costs, and can be used for indirect cost allocation related to project scale or resource consumption.
[0031] Specifically, in this embodiment, the correspondence between account types and allocation modes can be established in advance. When performing expense allocation, the system automatically matches and executes the corresponding allocation mode based on the account type to which each expense amount belongs.
[0032] Operation 105: Based on the target allocation project's work hour data or cost amount, allocate the cost amount of each project to its target allocation project according to the corresponding allocation path and allocation mode, and obtain the allocation result.
[0033] For each project that serves as a source of funding, its corresponding allocation model is executed. Using either labor hour data or cost amount as a reference, the cost amount is calculated and allocated to pre-determined target allocation projects. Finally, all allocation operation data is aggregated to generate an allocation result containing the actual cost of each project. The choice between using labor hour data or cost amount is determined by the allocation model. When the allocation model needs to measure workload, labor hour data is used; when the allocation model needs to measure project scale or resource consumption, cost amount is used.
[0034] Thus, this embodiment of the application achieves full automation of the R&D expense allocation process by acquiring the expense data to be allocated and synchronizing it in real time, acquiring the working hour data as the basis for allocation, matching the allocation path based on the project type, matching the allocation mode according to the subject type, and finally executing the allocation calculation and generating the allocation result. This avoids the data inconsistency and calculation errors caused by manual data export, sorting and complex calculations in traditional manual operations, and effectively improves the processing efficiency and accuracy of expense allocation results.
[0035] In one embodiment of this application, during the allocation process, a complete tracking record is established for each expense, saving detailed information such as the project identifier of the original project to which the expense belongs, the project identifier of the target allocation project, and the allocation ratio. After completing all allocation calculations and obtaining the allocation results, the expense details of the same project and subject are summarized to generate a summary report that is easy to analyze.
[0036] In one embodiment of this application, the allocation path includes allocation stages and allocation ranges. Based on the project type of each project, the allocation path and target allocation project of each project are determined, including: obtaining the allocation stages and allocation ranges of each project from the set project configuration information based on the project type of each project; and determining the target allocation project of each project based on the allocation stages and allocation ranges of each project.
[0037] The allocation path can specifically include the allocation stage and allocation scope corresponding to the project. This application predefines the project configuration information to configure the allocation stage and allocation scope of each project type in the allocation process, so as to define the allocation target of the project based on the allocation stage and allocation scope and ensure the accuracy of the allocation.
[0038] The allocation stage defines the project's hierarchy within the allocation process and the direction of cost flow. For example, a project configured for the first allocation stage will have its costs transferred to projects in subsequent stages (e.g., the second allocation stage); while a project configured for the zeroth allocation stage primarily receives costs from other stages and does not allocate its own costs externally. The allocation scope defines the target boundaries for cost allocation. For instance, a project configured for company-wide scope may have its costs allocated to all projects in the company; while a project configured for a specific R&D department may only have its costs allocated to projects within that department.
[0039] When it is necessary to perform cost allocation, the system first obtains the corresponding allocation stage and allocation scope from the set project configuration information according to the project type of each project. Then, based on the allocation stage and allocation scope of each project, it determines the projects that should be allocated to the corresponding allocation stage, and filters based on the allocation scope to obtain the specific projects to which the costs should ultimately flow, i.e., the target allocation projects.
[0040] In one embodiment of this application, the allocation stage includes a zero allocation stage, a first allocation stage, and a second allocation stage. Based on the allocation stage and allocation scope of each project, the target allocation project for each project is determined, including: in response to the current project's allocation stage being the first allocation stage, projects whose allocation stages are the zero allocation stage and the second allocation stage and which fall within the current project's allocation scope are determined as the target allocation projects for the current project; in response to the current project's allocation stage being the second allocation stage, projects whose allocation stages are the zero allocation stage and which fall within the current project's allocation scope are determined as the target allocation projects for the current project.
[0041] Specifically, the allocation phases of a project can be configured to include a zero allocation phase, a first allocation phase, and a second allocation phase. Projects in the zero allocation phase, also known as non-allocated projects, serve as the endpoint for cost allocation, with costs directly output as the final result. Projects in the first allocation phase typically involve general expenses, such as public expenditures or basic R&D infrastructure costs, and should be allocated to projects in the zero and second allocation phases. Projects in the second allocation phase are typically specific R&D projects that bear some public costs, and their costs need to be ultimately attributed to these specific R&D projects; therefore, they are allocated to projects in the zero allocation phase.
[0042] In addition to configuring the allocation phase, the allocation scope is also configured for projects that need to be allocated. Specifically, based on the characteristics of the enterprise's organizational structure, the allocation scope can be configured to include a global scope and a local scope. The global scope covers all projects, while the local scope covers projects in specific departments, such as projects of each business unit. Accordingly, based on the allocation phase and allocation scope, the target allocation projects for projects in the first allocation phase can be determined as projects in the zero allocation phase and the second allocation phase that fall within the current project allocation scope. The target allocation projects for projects in the second allocation phase are projects in the zero allocation phase that fall within the current project allocation scope.
[0043] Figure 2 This illustration shows a schematic diagram of the implementation process of the multi-stage allocation operation of the cost allocation method provided in the embodiments of this application.
[0044] refer to Figure 2 In one embodiment of this application, the above-mentioned operation 105, based on the working hours or cost amount of the target allocation project for each project, allocates the cost amount of each project to its target allocation project according to the allocation path and allocation mode corresponding to each project, including: Operation 201: For projects in the zero allocation phase, directly include their cost amount in the allocation results.
[0045] Specifically, projects in the zero allocation stage are non-allocated projects, and their corresponding cost amounts are directly included in the allocation results and do not participate in subsequent allocation calculations.
[0046] Operation 202: For projects in the first allocation phase, based on the work hour data or cost amount corresponding to the target allocation project, allocate the cost amount to the target allocation project according to the corresponding allocation mode.
[0047] When performing allocation calculations, for projects in the first allocation stage, the cost amount is allocated to the target allocation project according to the corresponding allocation mode based on the work hour data or cost amount of the target allocation project.
[0048] In one embodiment of this application, the allocation scope of a project in the first allocation phase is typically configured to be global to ensure that public expenses can be reasonably allocated across the entire company.
[0049] Operation 203: For projects in the second allocation phase, based on the work hour data or cost amount corresponding to the target allocation project, execute the corresponding allocation mode and allocate the cost amount to the target allocation project.
[0050] When performing allocation calculations, for projects in the second allocation phase, based on the work hour data or cost amount of their target allocation project, the corresponding allocation mode is executed, and the cost amount is allocated to their target allocation project. The allocation scope of projects in the second allocation phase is typically configured as a local domain, such as the XXX business unit.
[0051] It should be noted that this application does not impose specific restrictions on the execution order of operations 202 and 203. The two can be completed simultaneously through parallel computing; alternatively, a sequential processing method can be adopted, in which operation 202 is completed first and the cost amount of each item is updated before operation 203 is executed, thus forming a secondary allocation mechanism.
[0052] In one embodiment of this application, the allocation mode includes a time-sharing allocation mode, which allocates the cost amount to the target allocation project according to the time data or cost amount corresponding to the target allocation project, based on the time data or cost amount of the target allocation project. This includes: for each project, calculating the total time of all target allocation projects based on the time data of the target allocation project; and calculating the amount to be allocated to each target allocation project under the current project based on the proportion of the time of each target allocation project to the total time.
[0053] Specifically, the execution process of the work-hour allocation model is as follows: For each project, first determine the amount of cost Y to be allocated, and then obtain the work hours w of its target allocation projects; then calculate the total work hours W of all target allocation projects in the current project, and calculate the allocation amount that each target allocation project should receive according to its work hours w as a percentage of the total project work hours. The specific calculation formula is Y. w / W.
[0054] In one embodiment of this application, the allocation mode includes a cost percentage allocation mode, which allocates the cost amount to the target allocation project according to the corresponding allocation mode based on the working hours data or cost amount of the target allocation project. This includes: for each project, obtaining the labor cost rate of each researcher involved in the target allocation project; calculating the weighted cost of each target allocation project based on the labor cost rate of all researchers involved in each target allocation project and the working hours consumed by each researcher as shown in the corresponding working hours data; summing up the weighted costs of all target allocation projects to obtain the total weighted cost; and calculating the allocation amount to be allocated to each target allocation project under the current project based on the allocation ratio of the weighted cost of each target allocation project to the total weighted cost.
[0055] When there are significant differences in the hourly costs of researchers at different levels, such as the hourly cost of senior engineers being higher than that of ordinary engineers, allocating costs solely based on hourly percentages is insufficient to accurately reflect the actual cost distribution. Therefore, it is necessary to introduce a cost allocation model that considers differences in personnel levels. The specific execution process of this allocation model is as follows: First, determine the amount of expenses Y to be allocated to the current project. Then, obtain the average human resource cost xi (human resource cost rate) and corresponding hourly data of researchers at each level in the target allocation project. Next, multiply the hourly rate of each researcher in each target allocation project by their corresponding human resource cost rate, and sum these products to obtain the weighted cost X = Σw × xi for each target allocation project. Finally, sum the weighted costs of each target allocation project to obtain the total weighted cost W = ΣX. Calculate the allocation amount Y that each target allocation project should receive according to the allocation ratio of X / W. X / W.
[0056] In one embodiment of this application, the allocation mode includes a cost percentage allocation mode, which allocates the cost amount to the target allocation project according to the corresponding allocation mode based on the working hours data or cost amount of the target allocation project. This includes: for each project, calculating the total cost amount of all target allocation projects corresponding to it; and calculating the allocation amount to be allocated to each target allocation project under the current project according to the allocation ratio of the cost amount of each target allocation project to the total cost amount of all target allocation projects corresponding to the current project.
[0057] To adapt to scenarios where costs are allocated proportionally based on project cost size, and to ensure that cost allocation matches the actual cost size of each project, a cost percentage allocation mode is also configured. The specific execution process of the cost percentage allocation mode is as follows: For each project, the allocation amount is calculated according to the proportion of the cost amount of its target allocation project to the total cost amount of all target allocation projects.
[0058] For example, suppose the costs of target allocation projects A, B, and C in a certain project are ma, mb, and mc, respectively. Then the allocation ratio for target allocation project A is ma / (ma+mb+mc), and the allocation amount it receives is Y. ma / (ma+mb+mc).
[0059] In one embodiment of this application, before calculating the allocation ratio, the following negative value correction operation is also performed: in response to the negative value of the base value of the target allocation item corresponding to the current project, the base values of all target allocation items corresponding to the current project are sorted and the minimum value is determined; the base value of each target allocation item under the current project is subtracted from the minimum value and used as the actual base value of each target allocation item, where the base value is the working hours or cost amount of the target allocation item.
[0060] Since operations such as expense reversal and cost adjustment may result in negative values for project expenses or work hours, directly calculating allocations based on data containing negative values will produce erroneous results that deviate significantly from reality. This application's embodiments introduce a negative value correction mechanism before calculating the allocation ratio. Specifically, before calculating the allocation ratio, when allocating the amount for each project, it checks whether the base value (expense amount or work hours data) of the target allocation project has a negative value. When a negative value is detected, the base values of all target allocation projects are sorted by numerical value, the minimum value is determined, and then this minimum value is subtracted from the base value of each target allocation project, converting all base values to non-negative values.
[0061] For example, if project X has a budget of 100 yuan, and it needs to be allocated to two target projects, A and B, according to the project cost ratio, with target project A having a cost of -100 yuan and target project B having a cost of 99 yuan, then according to the rules, target project A will receive 100 yuan. (-100 / (-100+99)) = 10000, so the amount received by target allocation project B is 100. (99 / (-100+99)) = -9900. It is unreasonable to divide a cost of 100 yuan into 10000 and -9900. However, through the negative value correction in this application, all costs are sorted from smallest to largest. After subtracting the minimum value from all items, all base values become positive. For example, after modification, the amount of target allocation item A becomes 0, and the amount of target allocation item B becomes 199. Then, the allocation calculation is performed to obtain a reasonable allocation result, that is, target allocation item A receives an allocation amount of 0, and target allocation item B receives an allocation amount of 100.
[0062] Figure 3 A schematic diagram of the composition structure of the cost allocation device provided in the embodiments of this application is shown.
[0063] refer to Figure 3 Based on the above-mentioned cost allocation method, this application also provides a cost allocation device, the device comprising: The first acquisition module 301 is used to acquire the expense data to be allocated. The expense data to be allocated includes multiple items and the item type, expense amount and account type of each item. The second acquisition module 302 is used to acquire the working hour data of each project; The first determining module 303 is used to determine the allocation path and target allocation project for each project based on the project type of each project; The second determining module 304 is used to determine the allocation mode of each project based on the account type to which the cost amount of each project belongs; The allocation module 305 is used to allocate the working hours or cost amount of each project to its target allocation project based on the target allocation project's working hours or cost amount, and to allocate the cost amount of each project to its target allocation project according to the allocation path and allocation mode corresponding to each project, thereby obtaining the allocation result.
[0064] In one embodiment of this application, the allocation path includes an allocation stage and an allocation range, and the first determining module 303 includes: The first acquisition submodule is used to obtain the allocation stage and allocation range of each project from the set project configuration information based on the project type of each project. The first determination submodule is used to determine the target allocation projects for each project based on the allocation stage and allocation scope of each project.
[0065] In one embodiment of this application, the allocation stage includes a zero allocation stage, a first allocation stage, and a second allocation stage; correspondingly, the first determining submodule includes: The first determining unit is used to determine, in response to the current project's allocation phase being the first allocation phase, projects whose allocation phases are the zero allocation phase and the second allocation phase and which fall within the current project's allocation scope are the current project's target allocation projects. The second determining unit is used to determine, in response to the current project's allocation stage being the second allocation stage, projects that are in the zero allocation stage and fall within the current project's allocation scope as the current project's target allocation projects.
[0066] In one embodiment of this application, the allocation module 305 includes: The first allocation submodule is used to directly include the cost amount of projects in the zero allocation stage into the allocation results. The second allocation submodule is used to allocate the cost amount to the target allocation project based on the working hours data or cost amount corresponding to the target allocation project, according to the corresponding allocation mode, for projects in the first allocation stage. The third allocation submodule is used to allocate the cost amount to the target allocation project based on the working hours or cost amount corresponding to the target allocation project, according to the corresponding allocation mode, for projects in the second allocation stage.
[0067] In one embodiment of this application, the allocation mode includes a time-sharing allocation mode; correspondingly, the second and third allocation sub-modules include a first algorithm execution unit, which is used for: For each project, calculate the total hours of all its target-assigned projects based on the hour data of its target-assigned projects; Calculate the amount to be allocated to each target allocation item under the current project based on the proportion of the working hours of each target allocation item to the total working hours.
[0068] In one embodiment of this application, the allocation mode includes a cost percentage allocation mode; correspondingly, the second and third allocation sub-modules include a second algorithm execution unit, which is used for: For each project, obtain the human cost rate for each researcher involved in the project's target allocation; The weighted cost of each target allocation project is calculated based on the labor cost rate of all researchers involved in each target allocation project and the corresponding working hours data of each researcher. Sum the weighted costs of all target allocation projects to obtain the total weighted cost; Calculate the allocation amount to be allocated to each target allocation item under the current project based on the proportion of the weighted cost of each target allocation item to the total weighted cost.
[0069] In one embodiment of this application, the allocation mode includes a cost percentage allocation mode. Correspondingly, the second and third allocation sub-modules include a third algorithm execution unit, which is used for: For each project, calculate the total cost of all its corresponding target allocation projects; Calculate the allocation amount to be allocated to each target allocation item under the current project based on the proportion of the cost amount of each target allocation item to the total cost amount of all target allocation items corresponding to the current project.
[0070] In one embodiment of this application, the device further includes a negative value correction module, which is used for: If the base value of the target allocation project corresponding to the current project is negative, sort the base values of all target allocation projects corresponding to the current project and determine the minimum value among them. The minimum value is subtracted from the base value of each target allocation item under the current project to obtain the actual base value of each target allocation item. The base value is the working hours or cost amount of the target allocation item.
[0071] Regarding the apparatus in the above embodiments, the specific manner in which each module and unit performs its operations has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0072] According to embodiments of this application, this application also provides an electronic device and a readable storage medium.
[0073] Figure 4 A schematic block diagram of an example electronic device 400 that can be used to implement embodiments of this application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.
[0074] like Figure 4 As shown, the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. The RAM 403 may also store various programs and data required for the operation of the electronic device 400. The computing unit 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0075] Multiple components in electronic device 400 are connected to I / O interface 405, including: input unit 406, such as keyboard, mouse, etc.; output unit 407, such as various types of displays, speakers, etc.; storage unit 408, such as disk, optical disk, etc.; and communication unit 409, such as network card, modem, wireless transceiver, etc. Communication unit 409 allows electronic device 400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0076] The computing unit 401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above, such as the cost allocation method. For example, in some embodiments, the cost allocation method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by the computing unit 401, one or more steps of the cost allocation method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the cost allocation method by any other suitable means (e.g., by means of firmware).
[0077] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.
[0078] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0079] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0080] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0081] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0082] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0083] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this application can be achieved, and this is not limited herein.
[0084] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0085] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A cost allocation method, characterized in that, The method includes: Obtain the data of expenses to be allocated, which includes multiple items and the item type, expense amount and account type of each item; Obtain the working hours data for each project; Based on the project type of each project, determine the allocation path and target allocation projects for each project; The allocation pattern for each project is determined based on the category to which the cost amount belongs. Based on the work hour data or cost amount of each project's target allocation project, and according to the allocation path and allocation mode corresponding to each project, the cost amount of each project is allocated to its target allocation project to obtain the allocation result.
2. The cost allocation method according to claim 1, characterized in that, The allocation path includes allocation stages and allocation scope; correspondingly... The process of determining the allocation path and target allocation project for each project based on its project type includes: Based on the project type of each project, the allocation stage and allocation scope of each project are obtained from the set project configuration information; Based on the allocation phase and scope of each project, the target allocation projects for each project are determined.
3. The cost allocation method according to claim 2, characterized in that, The allocation phase includes the zero allocation phase, the first allocation phase, and the second allocation phase; correspondingly, The determination of target allocation projects for each project, based on the allocation stage and scope of each project, includes: In response to the current project's allocation phase being designated as the first allocation phase, projects that are determined to be in the zero allocation phase and the second allocation phase and fall within the current project's allocation scope are designated as the current project's target allocation projects. In response to the current project's allocation phase being the second allocation phase, projects that are determined to be in the zero allocation phase and fall within the current project's allocation scope are identified as the target allocation projects for the current project.
4. The cost allocation method according to claim 3, characterized in that, The allocation of project costs based on the target allocation data or cost amount for each project, according to the allocation path and allocation mode corresponding to each project, includes: For projects in the zero allocation phase, their costs are directly included in the allocation results; For projects in the first allocation phase, the cost amount is allocated to the target allocation project based on the work hour data or cost amount corresponding to the target allocation project, according to the corresponding allocation mode. For projects in the second allocation phase, the cost amount is allocated to the target allocation project based on the work hour data or cost amount corresponding to the target allocation project, according to the corresponding allocation mode.
5. The cost allocation method according to claim 4, characterized in that, The allocation mode includes a working hour percentage allocation mode; correspondingly... The process of allocating the cost amount to the target allocation project based on the corresponding work hour data or cost amount, according to the corresponding allocation mode, includes: For each project, calculate the total hours of all its target-assigned projects based on the hour data of its target-assigned projects; Calculate the allocation amount to be allocated to each target allocation item under the current project based on the proportion of the working hours of each target allocation item to the total working hours.
6. The cost allocation method according to claim 4, characterized in that, The allocation model includes a cost percentage allocation model; correspondingly... The process of allocating the cost amount to the target allocation project based on the corresponding work hour data or cost amount, according to the corresponding allocation mode, includes: For each project, obtain the human cost rate for each researcher involved in its target allocation project; The weighted cost of each target allocation project is calculated based on the labor cost rate of all researchers involved in each target allocation project and the corresponding working hours data of each researcher. Sum the weighted costs of all target allocation projects to obtain the total weighted cost; Calculate the allocation amount to be allocated to each target allocation item under the current project based on the proportion of the weighted cost of each target allocation item to the total weighted cost.
7. The cost allocation method according to claim 4, characterized in that, The allocation model includes a cost percentage allocation model; correspondingly... The process of allocating the cost amount to the target allocation project based on the corresponding work hour data or cost amount, according to the corresponding allocation mode, includes: For each project, calculate the total cost of all its corresponding target allocation projects; Calculate the allocation amount to be allocated to each target allocation item under the current project based on the proportion of the cost amount of each target allocation item to the total cost amount of all target allocation items corresponding to the current project.
8. The cost allocation method according to any one of claims 5-7, characterized in that, Before calculating the allocation ratio, the method further includes: If the base value of the target allocation project corresponding to the current project is negative, sort the base values of all target allocation projects corresponding to the current project and determine the minimum value among them. The minimum value is subtracted from the base value of each target allocation item under the current project to obtain the actual base value of each target allocation item. The base value is the working hours or cost amount of the target allocation item.
9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-8.